/* =============================================================================
   SEKUREX CORE | Verified Purchase Record — the only theme in this app.
   Palette, type and components follow the house tokens on sekurex.co
   (public/css/tokens.css) and support.sekurex.co: obsidian ground, gold
   hairlines rationed to frames and small caps, amethyst for light and glow.
   Everything is scoped under .sxc.
   ============================================================================= */

.sxc {
  --void: #05050b;
  --obsidian: #0a0a14;
  --panel: #0e0e1a;
  --panel-2: #13131f;
  --gold-700: #8a6420;
  --gold-600: #a87a26;
  --gold-500: #c08a2e;
  --gold-400: #d9a441;
  --gold-300: #e9c46a;
  --gold-200: #f2dba0;
  --amethyst-700: #4b2a8f;
  --amethyst-600: #6d3fc4;
  --amethyst-500: #8b5cf6;
  --amethyst-400: #a78bfa;
  --bone: #f5f3ef;
  --pearl: #e4e2ec;
  --silver: #cfceda;
  --ash: #9a98ad;
  --slate: #6a6880;
  --ok: #5fd08a;
  --danger: #ef7a6a;
  --hair: rgba(217, 164, 65, .20);
  --hair-strong: rgba(217, 164, 65, .46);
  --edge: rgba(255, 255, 255, .07);
  --edge-2: rgba(255, 255, 255, .12);
  --plate: linear-gradient(168deg, rgba(20, 20, 33, .92) 0%, rgba(12, 12, 22, .96) 52%, rgba(8, 8, 15, .98) 100%);
  --font-display: 'Archivo', 'Inter', system-ui, -apple-system, sans-serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);

  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--silver);
  background:
    radial-gradient(ellipse 90% 460px at 50% -140px, rgba(109, 63, 196, .30), transparent 72%),
    radial-gradient(ellipse 60% 320px at 50% -60px, rgba(217, 164, 65, .10), transparent 70%),
    var(--void);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
.sxc *, .sxc *::before, .sxc *::after { box-sizing: border-box; }
.sxc [hidden] { display: none !important; }
.sxc a { color: inherit; text-decoration: none; }
.sxc img { display: block; max-width: 100%; }
.sxc ::selection { background: rgba(217, 164, 65, .26); color: var(--bone); }
.sxc :focus-visible { outline: 2px solid var(--gold-300); outline-offset: 3px; border-radius: 2px; }

.sxc-app { width: 100%; max-width: 480px; margin: 0 auto; }
.sxc-screen { padding: 0 max(16px, env(safe-area-inset-left)) 120px max(16px, env(safe-area-inset-right)); }
.sxc-center { text-align: center; }

/* ── Brand bar ─────────────────────────────────────────────────────────────── */
.sxc-bar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 60px; padding: 0 max(16px, env(safe-area-inset-left)); }
.sxc-bar::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--hair) 18%, var(--hair-strong) 50%, var(--hair) 82%, transparent); }
.sxc-lockup { display: inline-flex; align-items: center; gap: 10px; }
.sxc-lockup svg { width: 28px; height: 28px; flex: 0 0 auto; }
.sxc-word { font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: .16em; color: var(--bone); }
.sxc-word b { font-weight: 600; color: var(--gold-300); margin-left: .35em; }
.sxc-bar-tag { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--ash); }

/* ── Type ──────────────────────────────────────────────────────────────────── */
.sxc-kicker { display: block; font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  letter-spacing: .28em; text-transform: uppercase; color: var(--gold-400); margin: 0 0 12px; }
.sxc-h1, .sxc-h2 { font-family: var(--font-display); font-weight: 800; color: var(--bone); letter-spacing: -.03em; margin: 0; text-wrap: balance; }
.sxc-h1 { font-size: clamp(32px, 9vw, 40px); line-height: 1.04; }
.sxc-h2 { font-size: clamp(26px, 7.4vw, 32px); line-height: 1.08; }
.sxc-h1 em, .sxc-h2 em { font-style: normal;
  background: linear-gradient(180deg, var(--gold-200), var(--gold-400) 60%, var(--gold-600));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.sxc-lead { margin: 12px 0 0; color: var(--ash); font-size: 15px; text-wrap: pretty; }
.sxc-center .sxc-lead { margin-left: auto; margin-right: auto; max-width: 330px; }
.sxc-detail { margin: 16px auto 0; font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; color: var(--slate); }
.sxc-rule { height: 1px; border: 0; margin: 0;
  background: linear-gradient(90deg, transparent, var(--hair-strong) 22%, var(--hair-strong) 78%, transparent); }

/* ── Seal (state screens + sealed step) ────────────────────────────────────── */
.sxc-seal { width: 68px; height: 68px; margin: 0 auto 22px; filter: drop-shadow(0 0 22px rgba(217, 164, 65, .28)); }
.sxc-seal.is-muted { filter: drop-shadow(0 0 18px rgba(139, 92, 246, .30)); }
.sxc-seal .ring { stroke-dasharray: 189; stroke-dashoffset: 189; animation: sxc-draw 1s var(--ease) .15s forwards; }
.sxc-seal .tick { stroke-dasharray: 36; stroke-dashoffset: 36; animation: sxc-draw .55s var(--ease) .85s forwards; }
@keyframes sxc-draw { to { stroke-dashoffset: 0; } }
.sxc-state { padding-top: 22vh; }

/* ── Progress rail (packing flow) ──────────────────────────────────────────── */
.sxc-rail { position: sticky; top: 0; z-index: 20; padding: 14px max(16px, env(safe-area-inset-left)) 12px;
  background: linear-gradient(180deg, rgba(5, 5, 11, .96) 70%, rgba(5, 5, 11, 0)); }
.sxc-rail-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 9px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .22em; text-transform: uppercase; }
.sxc-rail-label { color: var(--gold-400); }
.sxc-rail-count { color: var(--ash); letter-spacing: .12em; }
.sxc-rail-segs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.sxc-rail-seg { height: 2px; background: var(--edge-2); border-radius: 2px; transition: background .3s var(--ease), box-shadow .3s var(--ease); }
.sxc-rail-seg.is-on { background: linear-gradient(90deg, var(--gold-500), var(--gold-300)); box-shadow: 0 0 10px rgba(217, 164, 65, .35); }

/* ── Steps ─────────────────────────────────────────────────────────────────── */
.sxc-step { display: none; padding-top: 18px; }
.sxc-step.is-active { display: block; animation: sxc-rise .4s var(--ease); }
@keyframes sxc-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.sxc-head { margin-bottom: 22px; }
.sxc-status { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 16px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-300); }
.sxc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-400); box-shadow: 0 0 10px var(--gold-400); animation: sxc-blink 1.6s ease-in-out infinite; }
@keyframes sxc-blink { 50% { opacity: .35; } }

/* ── Plate (ledger, review, identifiers) ───────────────────────────────────── */
/* overflow: clip (not hidden) so focus / find-in-page can never scroll a plate's
   contents out from under its frame; hidden stays as the fallback. */
.sxc-plate { position: relative; background: var(--plate); border: 1px solid var(--edge-2); border-radius: 3px; overflow: hidden; overflow: clip; }
.sxc-plate::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--hair-strong) 30%, var(--hair-strong) 70%, transparent); }
.sxc-ledger { margin: 26px 0 22px; }
.sxc-ledger-cap { padding: 16px 18px 6px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--ash); }
.sxc-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 13px 18px; border-top: 1px solid var(--edge); }
.sxc-row:first-of-type { border-top: 0; }
.sxc-k { flex: 0 0 auto; font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ash); }
.sxc-v { min-width: 0; text-align: right; font-size: 14px; color: var(--bone); overflow-wrap: anywhere; }
.sxc-v.mono { font-family: var(--font-mono); font-size: 12.5px; }
.sxc-v.gold { color: var(--gold-300); }
.sxc-v.muted { color: var(--slate); }
.sxc-ledger-foot { display: flex; align-items: center; gap: 9px; padding: 12px 18px; border-top: 1px solid var(--edge);
  font-size: 12.5px; color: var(--ash); background: rgba(217, 164, 65, .03); }
.sxc-ledger-foot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--amethyst-400); box-shadow: 0 0 10px var(--amethyst-500); }

/* ── Fields ────────────────────────────────────────────────────────────────── */
.sxc-field { display: block; margin: 0 0 20px; }
.sxc-label { display: block; margin-bottom: 8px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ash); }
.sxc-label .req { color: var(--gold-400); }
.sxc-label .opt { color: var(--slate); letter-spacing: .1em; }
.sxc-input, .sxc-textarea {
  width: 100%; padding: 14px 14px; border: 1px solid var(--edge-2); border-radius: 3px;
  background: rgba(255, 255, 255, .025); color: var(--bone); font-family: var(--font-sans); font-size: 16px;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.sxc-input.mono { font-family: var(--font-mono); font-size: 15px; letter-spacing: .04em; }
.sxc-textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.sxc-input::placeholder, .sxc-textarea::placeholder { color: var(--slate); }
.sxc-input:focus, .sxc-textarea:focus { outline: none; border-color: var(--gold-400); background: rgba(217, 164, 65, .04); }
.sxc-hint { margin: 7px 0 0; font-size: 12.5px; color: var(--slate); }
.sxc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sxc-chip { min-height: 42px; padding: 9px 14px; border: 1px solid var(--edge-2); border-radius: 2px; background: transparent;
  color: var(--silver); font-family: var(--font-sans); font-size: 14px; cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease); }
.sxc-chip:hover { border-color: var(--hair-strong); }
.sxc-chip.is-sel { border-color: var(--gold-400); color: var(--gold-200); background: rgba(217, 164, 65, .08); }
.sxc-file { position: relative; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 12px 14px;
  border: 1px dashed var(--hair-strong); border-radius: 3px; color: var(--gold-300); font-size: 14px; cursor: pointer;
  background: rgba(217, 164, 65, .03); }
.sxc-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sxc-file svg { width: 20px; height: 20px; flex: 0 0 auto; }
.sxc-file-thumb { margin-top: 12px; border: 1px solid var(--edge-2); border-radius: 3px; max-height: 240px; object-fit: cover; width: 100%; }

/* ── Record card (buyer page + packing preview) ────────────────────────────── */
.sxc-card { position: relative; margin: 26px 0 10px; padding: 22px 20px 20px; background: var(--plate);
  border: 1px solid var(--hair); border-radius: 4px; overflow: hidden; overflow: clip;
  box-shadow: 0 30px 60px -28px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .02) inset; }
.sxc-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-400) 30%, var(--gold-300) 50%, var(--gold-400) 70%, transparent); }
.sxc-card::after { content: ''; position: absolute; inset: auto -40% -60% auto; width: 90%; height: 90%; pointer-events: none;
  background: radial-gradient(circle, rgba(139, 92, 246, .16), transparent 62%); }
.sxc-card > * { position: relative; z-index: 1; }
.sxc-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sxc-card-eyebrow { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold-400); }
.sxc-card-org { margin-top: 5px; font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: .14em; color: var(--bone); }
.sxc-card-head svg { width: 40px; height: 40px; flex: 0 0 auto; }
.sxc-card .sxc-rule { margin: 18px 0 16px; }
.sxc-card-title { font-family: var(--font-display); font-weight: 700; font-size: 21px; line-height: 1.25; letter-spacing: -.01em; color: var(--bone); overflow-wrap: anywhere; }
.sxc-card-sub { margin-top: 6px; font-family: var(--font-mono); font-size: 12px; color: var(--ash); }
.sxc-card-sub a { color: var(--gold-300); text-decoration: underline; text-decoration-color: var(--hair-strong); text-underline-offset: 3px; }
.sxc-exhibit { margin: 18px 0 4px; }
.sxc-exhibit-lbl { margin-bottom: 8px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--ash); }
.sxc-exhibit img { width: 100%; max-height: 360px; object-fit: cover; border: 1px solid var(--edge-2); border-radius: 3px; background: var(--obsidian); }
.sxc-exhibit-pdf { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--edge-2); border-radius: 3px; color: var(--silver); font-size: 13.5px; }
.sxc-exhibit-pdf .go { margin-left: auto; color: var(--gold-300); font-family: var(--font-mono); font-size: 11px; }
.sxc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 14px; margin-top: 18px; }
.sxc-cell-k { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--ash); }
.sxc-cell-v { margin-top: 4px; font-size: 14px; color: var(--bone); overflow-wrap: anywhere; }
.sxc-cell-v.mono { font-family: var(--font-mono); font-size: 13px; letter-spacing: .03em; }
.sxc-cell-wide { grid-column: 1 / -1; }
.sxc-hash { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--edge); }
.sxc-hash-v { margin-top: 5px; font-family: var(--font-mono); font-size: 10.5px; line-height: 1.55; color: var(--amethyst-400); word-break: break-all; }
.sxc-cap { margin: 0 0 22px; text-align: center; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--slate); }

.sxc-ids { margin: 0 0 22px; }
.sxc-ids .sxc-v { font-family: var(--font-mono); font-size: 13px; color: var(--gold-200); letter-spacing: .04em; }

/* ── Explainer + links (buyer page) ────────────────────────────────────────── */
.sxc-explain { margin: 0 0 22px; padding: 18px; }
.sxc-explain h3 { margin: 0 0 8px; font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--bone); }
.sxc-explain p { margin: 0; font-size: 14px; color: var(--ash); }
.sxc-explain p + p { margin-top: 10px; }
.sxc-links { list-style: none; margin: 0 0 26px; padding: 0; border-top: 1px solid var(--edge); }
.sxc-links a { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 4px; border-bottom: 1px solid var(--edge);
  transition: background .22s var(--ease), padding .22s var(--ease); }
.sxc-links a:hover { background: linear-gradient(90deg, rgba(217, 164, 65, .07), transparent 80%); padding-left: 10px; }
.sxc-links strong { display: block; font-weight: 600; font-size: 15px; color: var(--bone); line-height: 1.3; }
.sxc-links small { display: block; margin-top: 2px; font-size: 13px; color: var(--ash); line-height: 1.45; }
.sxc-links .go { margin-left: auto; flex: 0 0 auto; color: var(--gold-400); }
.sxc-foot { padding: 0 0 36px; font-size: 12px; line-height: 1.6; color: var(--slate); text-align: center; }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.sxc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px;
  padding: 13px 24px 13px calc(24px + .14em); border: 1px solid var(--gold-400); border-radius: 2px;
  font-family: var(--font-sans); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: #120d02; background: linear-gradient(180deg, var(--gold-300), var(--gold-500)); cursor: pointer;
  box-shadow: 0 10px 34px rgba(192, 138, 46, .22);
  transition: background .22s var(--ease), box-shadow .22s var(--ease), opacity .22s var(--ease);
}
.sxc-btn:hover { background: linear-gradient(180deg, var(--gold-200), var(--gold-400)); box-shadow: 0 14px 44px rgba(217, 164, 65, .30); }
.sxc-btn:disabled { opacity: .35; cursor: not-allowed; box-shadow: none; }
.sxc-btn-full { width: 100%; }
.sxc-btn-ghost { color: var(--gold-300); background: transparent; border-color: var(--hair-strong); box-shadow: none; font-weight: 600; }
.sxc-btn-ghost:hover { background: rgba(217, 164, 65, .07); color: var(--gold-200); border-color: var(--gold-400); box-shadow: 0 0 26px rgba(217, 164, 65, .13); }
.sxc-btn-back { flex: 0 0 50px; height: 50px; border: 1px solid var(--edge-2); border-radius: 2px; background: transparent; color: var(--silver); font-size: 18px; cursor: pointer; }
.sxc-btn-back:hover { border-color: var(--hair-strong); color: var(--gold-300); }
.sxc-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 14px max(16px, env(safe-area-inset-left)) max(14px, env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(5, 5, 11, .98) 64%, rgba(5, 5, 11, 0)); }
.sxc-nav-inner { display: flex; gap: 10px; max-width: 448px; margin: 0 auto; }
.sxc-nav-inner .sxc-btn { flex: 1 1 auto; }

/* ── Approval + messages ───────────────────────────────────────────────────── */
.sxc-approve { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 14px; padding: 15px 16px;
  border: 1px solid var(--edge-2); border-radius: 3px; font-size: 14px; color: var(--silver); cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease); }
.sxc-approve input { width: 18px; height: 18px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--gold-400); }
.sxc-approve.is-checked { border-color: var(--gold-400); background: rgba(217, 164, 65, .05); }
.sxc-approve strong { color: var(--bone); }
.sxc-msg { min-height: 20px; margin: 0; font-size: 13.5px; color: var(--ash); }
.sxc-msg.is-error { color: var(--danger); }
.sxc-msg.is-ok { color: var(--ok); }

.sxc-actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 4px; }

/* ── Pack & ship checklist (sealed step) ───────────────────────────────────── */
.sxc-check { margin-top: 18px; }
.sxc-check-row { display: flex; gap: 12px; align-items: flex-start; padding: 13px 18px; border-top: 1px solid var(--edge); font-size: 14px; cursor: pointer; }
.sxc-check-row:first-of-type { border-top: 0; }
.sxc-check-row input { width: 18px; height: 18px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--gold-400); }
.sxc-check-row.is-done span { color: var(--ash); text-decoration: line-through; text-decoration-color: var(--slate); }

@media (min-width: 520px) {
  .sxc-card { padding: 26px 26px 22px; }
  .sxc-bar { padding: 0 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .sxc *, .sxc *::before, .sxc *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .sxc-seal .ring, .sxc-seal .tick { stroke-dashoffset: 0; }
}
