/* JervisBox — now styled with the Claude/Anthropic warm editorial design system
   Cream canvas × coral primary × dark surfaces × slab-serif display
*/

:root {
  /* ===== Anthropic-derived palette ===== */
  --primary:          #cc785c;
  --primary-active:   #a9583e;
  --primary-disabled: #e6dfd8;

  --ink:              #141413;
  --body:             #3d3d3a;
  --body-strong:      #252523;
  --muted:            #6c6a64;
  --muted-soft:       #8e8b82;

  --hairline:         #e6dfd8;
  --hairline-soft:    #ebe6df;

  --canvas:           #faf9f5;
  --surface-soft:     #f5f0e8;
  --surface-card:     #efe9de;
  --surface-cream-strong: #e8e0d2;

  --surface-dark:          #181715;
  --surface-dark-elevated: #252320;
  --surface-dark-soft:     #1f1e1b;

  --on-primary:  #ffffff;
  --on-dark:     #faf9f5;
  --on-dark-soft:#a09d96;

  --accent-teal:  #5db8a6;
  --accent-amber: #e8a55a;
  --success:      #5db872;
  --warning:      #d4a017;
  --error:        #c64545;

  /* ===== Aliases used by legacy class names ===== */
  --paper:   var(--canvas);
  --paper-2: var(--surface-soft);
  --paper-3: var(--surface-card);
  --ink-2:   var(--body-strong);
  --ink-3:   var(--body);
  --ink-4:   var(--muted-soft);
  --line:    var(--hairline);
  --line-2:  var(--hairline-soft);

  --seal:      var(--primary);
  --seal-2:    var(--primary-active);
  --seal-soft: color-mix(in oklab, var(--primary) 14%, var(--canvas));
  --verified:      var(--success);
  --verified-soft: color-mix(in oklab, var(--success) 14%, var(--canvas));
  --pending:  var(--warning);
  --danger:   var(--error);

  --eth:       #4a5878;
  --polygon:   #7a4fbf;
  --avalanche: #c8443f;
  --arbitrum:  #2d7fb8;
  --base:      #2b5cd8;

  /* ===== Type =====
     Pretendard sits directly behind the Latin faces in every stack. None of
     Inter/Newsreader/JetBrains Mono ship Hangul, so Korean falls through to
     it — while Latin still renders in the intended face, unchanged.
     It has to come BEFORE -apple-system/system-ui/serif/monospace: those do
     carry Hangul, so anywhere further down the list they'd win instead and
     Korean would go back to looking different on every OS. */
  --sans:   'Inter', 'Pretendard Variable', Pretendard, -apple-system, 'Segoe UI', system-ui, sans-serif;
  --serif:  'Newsreader', 'Tiempos Headline', 'Copernicus', 'Georgia', 'Pretendard Variable', Pretendard, serif;
  --mono:   'JetBrains Mono', 'Pretendard Variable', Pretendard, ui-monospace, monospace;

  /* ===== Radius ===== */
  --r-xs:  4px;
  --r-sm:  6px;
  --r-md:  8px;
  --r-lg:  12px;
  --r-xl:  16px;
  --r-pill: 9999px;

  --radius:    var(--r-md);
  --radius-lg: var(--r-lg);
}

/* ===== Base ===== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
::selection { background: color-mix(in oklab, var(--primary) 40%, transparent); color: var(--ink); }

/* ===== Typography ===== */
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.mono  { font-family: var(--mono); font-feature-settings: "ss01","zero"; }

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.h1 em, .h2 em, .h3 em { font-style: italic; }
.h1 em.accent, .h2 em.accent, .h3 em.accent { color: var(--primary); font-style: italic; }
.h1 { font-family: var(--serif); font-size: clamp(48px, 7vw, 88px); line-height: 1.02; letter-spacing: -0.028em; font-weight: 400; }
.h2 { font-family: var(--serif); font-size: clamp(36px, 4.6vw, 56px); line-height: 1.06; letter-spacing: -0.024em; font-weight: 400; }
.h3 { font-family: var(--serif); font-size: 28px; line-height: 1.2; letter-spacing: -0.012em; font-weight: 400; }
.h4 { font-family: var(--sans); font-size: 18px; font-weight: 500; letter-spacing: 0; line-height: 1.4; }
.small { font-size: 14px; color: var(--body); line-height: 1.55; }
.tiny  { font-family: var(--sans); font-size: 12px; color: var(--muted); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }

.italic { font-style: italic; }
.ink   { color: var(--ink); }
.ink-2 { color: var(--body-strong); }
.ink-3 { color: var(--body); }
.ink-4 { color: var(--muted); }

/* ===== Layout ===== */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.container        { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.container-narrow { width: 100%; max-width: 880px;  margin: 0 auto; padding: 0 32px; }
.divider        { border-top: 1px solid var(--hairline); }
.divider-dashed { border-top: 1px dashed var(--hairline); }

/* ===== Nav ===== */
.nav {
  border-bottom: 1px solid var(--hairline);
  background: var(--canvas);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: color-mix(in oklab, var(--canvas) 90%, transparent);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 16px 32px;
  max-width: 1280px;
  margin: 0 auto;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.brand-glyph {
  width: 22px; height: 22px;
  flex-shrink: 0;
}
.brand-mark {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-mark em {
  color: var(--primary);
  font-style: italic;
}
.brand-tag {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  padding-left: 10px;
  border-left: 1px solid var(--hairline);
  margin-left: 4px;
}
.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
  align-items: center;
}
.nav-link {
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--body);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--surface-soft); color: var(--ink); }
.nav-link.active { color: var(--ink); background: var(--surface-card); }

.nav-cta {
  margin-left: 12px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--canvas);
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
}
.nav-cta:hover { background: var(--body-strong); }

.wallet-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--body);
  cursor: pointer;
  background: var(--canvas);
  transition: border-color 0.15s;
}
.wallet-chip:hover { border-color: var(--muted-soft); }

/* Language switcher */
.lang-switcher {
  position: relative;
  margin-left: 8px;
  margin-right: 4px;
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--canvas);
  color: var(--body);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  height: 32px;
}
.lang-btn:hover { border-color: var(--muted-soft); background: var(--surface-soft); }
.lang-code {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  box-shadow: 0 8px 24px -8px rgba(20,20,19,0.12), 0 2px 6px rgba(20,20,19,0.04);
  padding: 4px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--body);
  text-align: left;
  width: 100%;
  transition: background 0.12s;
}
.lang-option:hover { background: var(--surface-soft); }
.lang-option.active { color: var(--ink); background: var(--surface-card); }
.lang-option-code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-soft);
  letter-spacing: 0.08em;
}
.lang-check {
  color: var(--primary);
  font-weight: 500;
  margin-left: 4px;
}
.wallet-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px color-mix(in oklab, var(--success) 20%, transparent); }

/* ===== Ticker ===== */
.ticker {
  border-bottom: 1px solid var(--hairline);
  background: var(--surface-soft);
  overflow: hidden;
  height: 34px;
  display: flex;
  align-items: center;
  position: relative;
}
.ticker-label {
  flex-shrink: 0;
  /* The track is a later sibling, so by default it paints OVER this label and
     the scrolling hashes ride across the caption. Lift the label so the track
     passes behind its opaque background instead. */
  position: relative;
  z-index: 1;
  padding: 0 16px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-card);
  height: 100%;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--hairline);
}
.ticker-track {
  display: flex;
  gap: 44px;
  animation: ticker-scroll 90s linear infinite;
  white-space: nowrap;
  padding-left: 40px;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--body);
}
.ticker-item .mono { font-size: 12px; }
.ticker-item .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--primary); }
.ticker-item .time { color: var(--muted-soft); font-family: var(--mono); font-size: 11px; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
  line-height: 1;
  height: 40px;
}
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-active); }
.btn-primary:disabled { background: var(--primary-disabled); color: var(--muted); cursor: not-allowed; }
.btn-secondary { background: var(--canvas); color: var(--ink); border-color: var(--hairline); }
.btn-secondary:hover { border-color: var(--muted-soft); background: var(--surface-soft); }
.btn-seal { background: var(--ink); color: var(--canvas); }
.btn-seal:hover { background: var(--body-strong); }
.btn-ghost { background: transparent; color: var(--body); }
.btn-ghost:hover { color: var(--ink); background: var(--surface-soft); }
.btn-lg { padding: 14px 24px; font-size: 15px; height: 48px; }
.btn-sm { padding: 8px 14px; font-size: 13px; height: 32px; }
.btn-on-dark { background: var(--surface-dark-elevated); color: var(--on-dark); border-color: transparent; }
.btn-on-dark:hover { background: color-mix(in oklab, var(--surface-dark-elevated) 80%, var(--on-dark) 20%); }

/* ===== Cards ===== */
.card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.card-flat {
  background: var(--surface-card);
  border-radius: var(--r-lg);
  padding: 24px;
}
.card-cream {
  background: var(--surface-card);
  border-radius: var(--r-lg);
  padding: 32px;
}
.card-dark {
  background: var(--surface-dark);
  color: var(--on-dark);
  border-radius: var(--r-lg);
  padding: 32px;
}

/* ===== Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: 1px solid var(--hairline);
  color: var(--body);
  background: var(--canvas);
  white-space: nowrap;
  line-height: 1.4;
}
.badge-verified { border-color: color-mix(in oklab, var(--success) 40%, var(--hairline)); color: var(--success); background: var(--verified-soft); }
.badge-seal { border-color: color-mix(in oklab, var(--primary) 40%, var(--hairline)); color: var(--primary-active); background: var(--seal-soft); }
.badge-ai { border-color: color-mix(in oklab, var(--primary) 35%, var(--hairline)); color: var(--primary-active); background: color-mix(in oklab, var(--primary) 10%, var(--canvas)); }
.badge-human { border-color: color-mix(in oklab, var(--accent-teal) 40%, var(--hairline)); color: color-mix(in oklab, var(--accent-teal) 80%, var(--ink)); background: color-mix(in oklab, var(--accent-teal) 12%, var(--canvas)); }
.badge-eth { border-color: color-mix(in oklab, var(--eth) 30%, var(--hairline)); color: var(--eth); }
.badge-polygon { border-color: color-mix(in oklab, var(--polygon) 30%, var(--hairline)); color: var(--polygon); }
.badge-avalanche { border-color: color-mix(in oklab, var(--avalanche) 30%, var(--hairline)); color: var(--avalanche); }
.badge-arbitrum { border-color: color-mix(in oklab, var(--arbitrum) 30%, var(--hairline)); color: var(--arbitrum); }
.badge-base { border-color: color-mix(in oklab, var(--base) 30%, var(--hairline)); color: var(--base); }

/* A chain option that exists on the roadmap but has no deployed contract yet. */
.chain-option-soon {
  opacity: 0.55;
  cursor: not-allowed;
  filter: saturate(0.5);
}
.chain-option-soon .badge { background: transparent; }
.badge-soon {
  border-color: var(--hairline);
  color: var(--muted);
  background: var(--surface-card);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dot-verified { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.dot-pending { width: 6px; height: 6px; border-radius: 50%; background: var(--warning); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ===== Hash display ===== */
.hash {
  font-family: var(--mono);
  color: var(--body);
  letter-spacing: 0;
}
.hash-mono-lg {
  font-family: var(--mono);
  font-size: clamp(18px, 2.8vw, 34px);
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.005em;
  word-break: break-all;
  font-weight: 400;
}
.hash-block {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--body);
  padding: 12px 14px;
  background: var(--surface-soft);
  border-radius: var(--r-sm);
  border: 1px solid var(--hairline);
  word-break: break-all;
  line-height: 1.6;
}

/* ===== Forms ===== */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field-label {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.input, .textarea, .select {
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--canvas);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
  line-height: 1.4;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 18%, transparent);
}
.textarea { min-height: 96px; resize: vertical; font-family: inherit; }
.mono-input { font-family: var(--mono); font-size: 13px; }

/* ===== Landing hero ===== */
.hero {
  padding: 96px 0 120px;
  position: relative;
  overflow: hidden;
}
.hero-eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-active);
  margin-bottom: 32px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.hero-eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--primary-active);
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(56px, 8.6vw, 128px);
  line-height: 0.98;
  letter-spacing: -0.032em;
  margin: 0 0 32px;
  font-weight: 400;
  color: var(--ink);
}
.hero-title em {
  font-style: italic;
  color: var(--primary);
}
.hero-sub {
  font-size: 18px;
  color: var(--body);
  max-width: 560px;
  line-height: 1.55;
  margin: 0 0 40px;
}

/* Lifeline SVG accents */
.lifeline-svg { display: block; overflow: visible; }
.lifeline-svg .line { stroke: var(--ink); stroke-width: 1; fill: none; }
.lifeline-svg .node { fill: var(--canvas); stroke: var(--ink); stroke-width: 1; }

/* ===== Timeline (vertical) ===== */
.timeline {
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: var(--hairline);
}
.timeline-item {
  position: relative;
  padding-bottom: 24px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--canvas);
  border: 1.5px solid var(--ink);
}
.timeline-item.seal::before { background: var(--primary); border-color: var(--primary-active); }
.timeline-item.verified::before { background: var(--accent-teal); border-color: var(--accent-teal); }

/* ===== Lifeline card (dashboard) ===== */
.lifeline-card {
  padding: 28px 32px;
  border-radius: var(--r-lg);
  border: 1px solid var(--hairline);
  background: var(--canvas);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  display: block;
}
.lifeline-card:hover { border-color: var(--muted-soft); background: color-mix(in oklab, var(--canvas) 60%, var(--surface-soft)); }
.lifeline-track {
  position: relative;
  height: 64px;
  margin: 24px 0 8px;
}
.lifeline-track-line {
  position: absolute;
  top: 32px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--hairline);
}
.lifeline-track-line-active {
  position: absolute;
  top: 32px;
  left: 0;
  height: 1px;
  background: var(--ink);
}
.lifeline-node {
  position: absolute;
  top: 26px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transform: translateX(-50%);
  border: 1.5px solid var(--canvas);
  box-shadow: 0 0 0 1px var(--ink);
}
.lifeline-node.ai { background: var(--primary); box-shadow: 0 0 0 1px var(--primary-active); }
.lifeline-node.human { background: var(--accent-teal); box-shadow: 0 0 0 1px var(--accent-teal); }
.lifeline-node.commit { background: var(--ink); box-shadow: 0 0 0 1px var(--ink); width: 14px; height: 14px; top: 25px; }
.lifeline-node-label {
  position: absolute;
  top: 46px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transform: translateX(-50%);
  white-space: nowrap;
}

/* ===== Placeholder art ===== */
.placeholder {
  position: relative;
  background:
    repeating-linear-gradient(45deg, transparent 0 8px, var(--surface-cream-strong) 8px 9px),
    var(--surface-soft);
  border: 1px dashed var(--hairline);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.placeholder.square { aspect-ratio: 1; }
.placeholder.tall   { aspect-ratio: 3/4; }

/* ===== Utility ===== */
.row { display: flex; align-items: center; gap: 12px; }
.col { display: flex; flex-direction: column; gap: 12px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.grid { display: grid; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; } .gap-48 { gap: 48px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; } .mt-64 { margin-top: 64px; }
.mb-4 { margin-bottom: 4px; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; } .mb-40 { margin-bottom: 40px; } .mb-48 { margin-bottom: 48px; }
.py-16 { padding-top: 16px; padding-bottom: 16px; }
.py-24 { padding-top: 24px; padding-bottom: 24px; }
.py-48 { padding-top: 48px; padding-bottom: 48px; }
.py-80 { padding-top: 96px; padding-bottom: 96px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.w-full { width: 100%; }

/* ===== Certificate ===== */
.certificate {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 64px 72px;
  position: relative;
  overflow: hidden;
}
.certificate::before,
.certificate::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  border: 1px solid var(--ink);
}
.certificate::before { top: 20px; left: 20px; border-right: none; border-bottom: none; }
.certificate::after  { bottom: 20px; right: 20px; border-left: none; border-top: none; }
.certificate-seal {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1;
  text-align: center;
  letter-spacing: 0.04em;
  position: relative;
  box-shadow: 0 0 0 4px var(--canvas), 0 0 0 5px var(--primary);
}
.certificate-seal::before {
  content: '';
  position: absolute;
  inset: -14px;
  border: 1px dashed var(--primary-active);
  border-radius: 50%;
  opacity: 0.5;
}

/* ===== Scramble text ===== */
.scramble-hash { font-family: var(--mono); letter-spacing: 0; }

/* ===== File chip ===== */
.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--surface-soft);
  border-radius: var(--r-sm);
  border: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--body);
}
.file-chip .ext {
  font-weight: 600;
  color: var(--ink);
  text-transform: uppercase;
}

/* ===== Numbered list ===== */
.numbered { counter-reset: n; }
.numbered > * {
  counter-increment: n;
  position: relative;
  padding-left: 44px;
}
.numbered > *::before {
  content: counter(n, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 4px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--primary-active);
  letter-spacing: 0.06em;
  font-weight: 500;
}

/* ===== Upload steps ===== */
.stepper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}
.stepper-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid transparent;
}
.stepper-item.active { color: var(--ink); border-color: var(--hairline); background: var(--canvas); }
.stepper-item.done { color: var(--success); }
.stepper-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface-card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
}
.stepper-item.active .stepper-num { background: var(--ink); color: var(--canvas); }
.stepper-item.done .stepper-num { background: var(--success); color: var(--on-primary); }
.stepper-line { flex: 1; height: 1px; background: var(--hairline); max-width: 40px; }

/* ===== Drag-drop ===== */
.dropzone {
  border: 1.5px dashed var(--hairline);
  border-radius: var(--r-lg);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: var(--canvas);
}
.dropzone:hover { border-color: var(--primary); background: color-mix(in oklab, var(--primary) 4%, var(--canvas)); }

/* ===== Verify status ===== */
.verify-result {
  padding: 32px;
  border-radius: var(--r-lg);
  border: 1px solid var(--hairline);
}
.verify-result.match {
  background: color-mix(in oklab, var(--success) 8%, var(--canvas));
  border-color: color-mix(in oklab, var(--success) 40%, var(--hairline));
}
.verify-result.nomatch {
  background: color-mix(in oklab, var(--error) 8%, var(--canvas));
  border-color: color-mix(in oklab, var(--error) 40%, var(--hairline));
}

/* Segmented control */
.seg {
  display: inline-flex;
  padding: 3px;
  background: var(--surface-soft);
  border-radius: var(--r-md);
  border: 1px solid var(--hairline);
}
.seg-item {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--body);
  line-height: 1;
}
.seg-item.active { background: var(--canvas); color: var(--ink); box-shadow: 0 1px 2px rgba(20,20,19,0.06); }

/* Footer */
.footer {
  border-top: 1px solid var(--hairline);
  padding: 48px 0 64px;
  color: var(--muted);
  font-size: 14px;
  margin-top: 96px;
}

/* ===== Public certificate top bar (dark surface) ===== */
.pub-bar {
  background: var(--surface-dark);
  color: var(--on-dark);
  padding: 12px 32px;
}
.pub-bar .btn-secondary { background: transparent; color: var(--on-dark); border-color: color-mix(in oklab, var(--on-dark) 20%, transparent); }
.pub-bar .btn-secondary:hover { background: var(--surface-dark-elevated); border-color: color-mix(in oklab, var(--on-dark) 40%, transparent); }

/* Brand mark in the public bar — the only route back into the app from a
   certificate, since that page renders without the global Nav. */
.pub-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding-right: 12px;
  margin-right: 2px;
  border-right: 1px solid color-mix(in oklab, var(--on-dark) 20%, transparent);
  opacity: 0.9;
  transition: opacity 120ms ease;
}
.pub-brand:hover { opacity: 1; }
/* Scoped to .pub-brand so it beats `.anthropic-mark { color: var(--ink) }`,
   which is defined further down the file and would otherwise render the
   glyph near-black on the dark bar. */
.pub-brand .pub-brand-glyph { width: 16px; height: 16px; flex-shrink: 0; color: var(--on-dark); }
.pub-brand-mark {
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--on-dark);
  white-space: nowrap;
}
.pub-brand-mark em { color: var(--primary); font-style: italic; }

/* Anthropic-style radial spike mark */
.anthropic-mark {
  width: 22px;
  height: 22px;
  display: inline-block;
  color: var(--ink);
}

/* ===== Beta / test-network notice ===== */
.chain-notice-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 32px;
  background: color-mix(in oklab, var(--warning) 13%, var(--canvas));
  border-bottom: 1px solid color-mix(in oklab, var(--warning) 30%, var(--canvas));
  font-family: var(--sans);
  font-size: 13px;
  color: var(--body-strong);
}
.chain-notice-inline {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: color-mix(in oklab, var(--warning) 11%, var(--canvas));
  border: 1px solid color-mix(in oklab, var(--warning) 32%, var(--canvas));
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.55;
  color: var(--body-strong);
}
.chain-notice-tag {
  flex-shrink: 0;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--warning) 72%, var(--ink));
  white-space: nowrap;
}
.chain-notice-inline .chain-notice-tag { padding-top: 1px; }

/* ===== Korean typography =====
   Scoped to html:lang(ko), which I18nProvider keeps in sync with the language
   toggle. Latin-only pages are untouched.

   The Latin display faces are set tight and light — right for Newsreader,
   wrong for Hangul, whose glyphs fill the em box and need air. These rules
   re-tune the same headings for Pretendard. */
html:lang(ko) {
  /* Hangul words are space-delimited, but the default breaking rules split
     mid-word ("파일이" → "파일" / "이"). keep-all breaks at spaces only;
     break-word stays as the escape hatch for a long unbroken token. */
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* Pretendard ships no true italic, so a slant on Hangul is a browser-
   synthesised fake. Korean typography carries emphasis with weight and colour
   instead — the accent colour on these <em>s already does that job.
   Set explicitly rather than via font-synthesis-style so that Latin inside a
   Korean phrase ("단 하나의 URL") goes upright with the rest of it. */
html:lang(ko) .italic,
html:lang(ko) em,
html:lang(ko) .hero-title em,
html:lang(ko) .h1 em, html:lang(ko) .h2 em, html:lang(ko) .h3 em,
html:lang(ko) .h1 em.accent, html:lang(ko) .h2 em.accent, html:lang(ko) .h3 em.accent {
  font-style: normal;
}

/* Display headings: smaller, heavier, and with real leading so two lines of
   Hangul don't collide the way they do at the Latin line-height of ~1.0. */
html:lang(ko) .hero-title {
  font-size: clamp(36px, 4.6vw, 62px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.012em;
}
html:lang(ko) .h1 {
  font-size: clamp(32px, 4.2vw, 56px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
/* Capped at 36px, not 42: the manifesto .h2 sits in the 1fr of a 1fr/1.6fr
   grid (~437px at 1280), and above 36px its second line spills past the
   authored <br/> into a third. */
html:lang(ko) .h2 {
  font-size: clamp(24px, 2.9vw, 36px);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.008em;
}
html:lang(ko) .h3 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.005em;
}

/* Certificate display title + Merkle root — kept in CSS (not inline styles) so
   the print rules below can shrink them to fit the paper. */
.cert-display-title { font-size: 64px; }
.cert-final-hash { font-size: 24px; }

/* ===== Public certificate: embed snippet panel ===== */
.cert-embed-panel {
  border-top: 1px solid var(--hairline);
  padding-top: 16px;
}
.cert-embed-code {
  width: 100%;
  resize: vertical;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--body);
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ===== Print — this is what the certificate's "Download PDF" produces ===== */
@page { size: A4; margin: 14mm; }
@media print {
  /* Chrome/Safari drop background colours when printing unless told not to;
     without this the coral seal and the badges come out blank. */
  body, .cert-page, .certificate, .certificate-seal, .badge, .pub-bar,
  .chain-notice-inline {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  /* Must never be dropped from a printed certificate — it's the disclosure
     that travels with the PDF once someone forwards it. */
  .chain-notice-inline { display: flex !important; break-inside: avoid; }
  .pub-bar,
  .cert-share-strip,
  .cert-embed-panel { display: none !important; }

  body, .cert-page { background: #fff !important; min-height: 0 !important; }
  /* max-width must stay a percentage — `none` lets the layout keep the
     on-screen viewport width and the right edge falls off the sheet. */
  .cert-page .container-narrow { padding: 0 !important; max-width: 100% !important; }

  .certificate {
    background: transparent;
    border: none;
    border-radius: 0;
    /* Not 0 — the seal's dashed outer ring sits ~20px outside the circle and
       gets sliced off by the paper edge otherwise. */
    padding: 4px 20px;
    overflow: visible;
  }
  .certificate::before, .certificate::after { display: none; }

  .cert-display-title { font-size: 36px; }
  .cert-final-hash { font-size: 15px; }

  /* Keep each labelled block whole rather than splitting a heading from its
     content across the page boundary. */
  .certificate > div { break-inside: avoid; page-break-inside: avoid; }

  /* Browsers append the href after every link in print — noise on a document
     whose only link is the in-app explorer route. */
  a[href]::after { content: none !important; }
}
