/* ============================================================
   SOLACE LEDGER · DUAL-PALETTE SYSTEM
   Case Study 02 · Maniyarasi
   Portfolio shell = LIGHT editorial.
   Product UI inside mockups = DARK institutional.
   Coral accent threads both zones.
   ============================================================ */

:root {
  /* ============== EDITORIAL · PORTFOLIO SHELL (light, default) ============== */
  --bg: #F4F4F2;
  --surface: #FFFFFF;
  --surface-alt: #FAFAF7;
  --surface-elev: #FFFFFF;
  --surface-raised: #FFFFFF;

  --ink: #0C0D10;
  --ink-soft: #3E4148;
  --ink-dim: #6C6C66;
  --muted: #8A8A84;
  --muted-soft: #B8B7B1;

  --border: #DEDCD3;
  --border-soft: #EAE8DF;
  --border-bright: #C9C6BA;

  /* ============== SHARED ACCENTS ============== */
  --accent: #E84F30;            /* slightly deeper coral — reads better on white */
  --accent-light: #FF5A43;      /* brighter — for dark surfaces */
  --accent-hover: #D04326;
  --accent-pressed: #B73B21;
  --accent-soft-light: #FFF1ED;
  --accent-dim-light: #F3B8A6;
  --accent-soft: #2A1410;       /* tints — used inside dark product UI */
  --accent-dim: #82372A;
  --accent-bright: #FFB4A1;

  --signal: #B47210;            /* editorial signal yellow */
  --signal-bright: #F4C14D;     /* brighter — for dark */
  --signal-soft-light: #FBF2DE;
  --signal-soft: #2B2413;
  --signal-dim: #82661F;

  /* Status — portfolio-mode palette */
  --success: #117A4F;
  --success-bright: #3FB984;
  --success-soft-light: #E3F1EA;
  --success-soft: #0E2620;
  --success-dim: #1F6247;

  --error: #B23B2B;
  --error-bright: #F56565;
  --error-soft-light: #FAE6E1;
  --error-soft: #2A1518;
  --error-dim: #8B2E34;

  --info: #2B6CB0;
  --info-bright: #5B9FE8;
  --info-soft-light: #E2ECF8;
  --info-soft: #0F1F30;
  --info-dim: #2C567C;

  --warn: #8C5A12;
  --warn-bright: #F59E0B;
  --warn-soft-light: #FBEED8;
  --warn-soft: #2B1F09;
  --warn-dim: #8C5F16;

  /* Payment state palette (dark-surface-optimized, used inside product UI) */
  --st-initiated: #8A8A84;
  --st-authorized: #5B9FE8;
  --st-captured: #FF5A43;
  --st-reconciled: #3FB984;
  --st-closed: #C8C7C2;
  --st-refunded: #F4C14D;
  --st-failed: #F56565;
  --st-disputed: #B794F4;

  /* Typography */
  --display: 'Instrument Serif', 'Source Serif 4', Georgia, serif;
  --sans: 'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Geist Mono', 'IBM Plex Mono', 'SF Mono', Menlo, Consolas, monospace;

  /* Spacing */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px;

  /* Radii */
  --r-sm: 2px;
  --r-md: 4px;
  --r-lg: 8px;
  --r-xl: 12px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(20,24,32,0.04), 0 0 0 1px rgba(20,24,32,0.02);
  --shadow-md: 0 6px 20px rgba(20,24,32,0.06), 0 2px 4px rgba(20,24,32,0.04);
  --shadow-lg: 0 24px 60px rgba(20,24,32,0.1), 0 6px 14px rgba(20,24,32,0.06);

  --hit: 44px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01", "ss03";
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { max-width: 100%; display: block; }

.num, .mono, code, kbd, .num-tabular {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum", "ss01";
}

:focus { outline: none; }
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 1.5px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -40px; left: var(--s-4);
  background: var(--ink); color: var(--bg);
  padding: 10px 14px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600;
  z-index: 100;
}
.skip-link:focus { top: var(--s-4); }

/* ============================================================
   PAGE CHROME (editorial / light)
   ============================================================ */

.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--s-10) var(--s-10) var(--s-16);
}

.page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-8);
  padding-bottom: var(--s-6);
  margin-bottom: var(--s-8);
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.page-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: var(--s-5);
  line-height: 1.6;
  font-weight: 500;
}
.page-eyebrow .accent { color: var(--accent); font-weight: 600; }

.page-title {
  font-family: var(--sans);
  font-size: 42px;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.06;
  color: var(--ink);
  margin-bottom: var(--s-4);
}
.page-title em {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.page-thesis {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 760px;
  border-left: 2px solid var(--accent);
  padding-left: var(--s-5);
  letter-spacing: -0.005em;
}

.page-meta {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  align-items: flex-end;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-align: right;
  white-space: nowrap;
  font-weight: 500;
}
.page-meta strong { color: var(--ink); font-weight: 600; letter-spacing: 0.1em; }
.page-meta .ties { color: var(--accent); font-weight: 600; }

/* ============================================================
   METRIC STRIP (editorial · light)
   ============================================================ */

.metric-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: var(--s-8);
  background: var(--surface);
}
.metric-strip > .m-cell {
  padding: var(--s-5);
  border-right: 1px solid var(--border);
  position: relative;
}
.metric-strip > .m-cell:last-child { border-right: 0; }

/* Four-card strips reflow to a clean 2×2 grid when the container
   gets narrower than ~900px (e.g., embedded in an iframe inside
   the case-study article column). Without this the 4th card wraps
   alone to a second row, which the user flagged as broken. Three
   and two-card strips keep the auto-fit behavior. */
@media (max-width: 900px) {
  .metric-strip:has(.m-cell:nth-child(4):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* In a 2×2 layout, the right edge cells (2nd, 4th) drop their
     right border, and the top row (1st, 2nd) gets a bottom border
     so the row separator reads cleanly. */
  .metric-strip:has(.m-cell:nth-child(4):last-child) > .m-cell:nth-child(2n) {
    border-right: 0;
  }
  .metric-strip:has(.m-cell:nth-child(4):last-child) > .m-cell:nth-child(-n+2) {
    border-bottom: 1px solid var(--border);
  }
}
@media (max-width: 560px) {
  /* Drop to 1 column at very narrow widths so labels don't crush. */
  .metric-strip:has(.m-cell:nth-child(4):last-child),
  .metric-strip {
    grid-template-columns: 1fr;
  }
  .metric-strip > .m-cell { border-right: 0; border-bottom: 1px solid var(--border); }
  .metric-strip > .m-cell:last-child { border-bottom: 0; }
}
.metric-strip > .m-cell::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 24px;
  background: var(--border);
}
.metric-strip > .m-cell.accent-rule::before { background: var(--accent); }
.metric-strip > .m-cell .m-lbl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 8px;
}
.metric-strip > .m-cell .m-val {
  font-family: var(--sans);
  font-size: 30px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
}
.metric-strip > .m-cell .m-val.accent { color: var(--accent); }
.metric-strip > .m-cell .m-sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  line-height: 1.5;
}

/* ============================================================
   VIEWPORT SECTIONS (editorial)
   ============================================================ */

.viewport-section { margin-bottom: var(--s-16); }
.viewport-section + .viewport-section {
  padding-top: var(--s-12);
  border-top: 1px solid var(--border-soft);
}

.viewport-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-5);
  margin-bottom: var(--s-6);
  flex-wrap: wrap;
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--border-soft);
}
.viewport-label .vp-name {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.viewport-label .vp-desc {
  font-family: var(--display);
  font-style: italic;
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.45;
}

/* ============================================================
   LAYOUT GRIDS
   ============================================================ */

.surface-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--s-8);
  align-items: start;
}

.mobile-layout {
  display: grid;
  grid-template-columns: 412px minmax(0, 1fr);
  gap: var(--s-8);
  align-items: start;
}

@media (max-width: 1100px) {
  .surface-grid, .mobile-layout { grid-template-columns: 1fr; }
  /* When the layout collapses to one column, mobile mockups have
     extra horizontal room beside them. Center the phone / terminal
     so it doesn't drift to the left edge of the panel. */
  .surface-grid > .phone,
  .surface-grid > .term-stage,
  .surface-grid > .terminal-wrap,
  .mobile-layout > .phone,
  .mobile-layout > .term-stage,
  .mobile-layout > .terminal-wrap,
  .link-stage > .phone {
    justify-self: center;
    margin-left: auto;
    margin-right: auto;
  }
  .link-stage { grid-template-columns: 1fr; }
}

/* Even at desktop widths, when the iframe content is narrower than
   the viewport (e.g. embedded in a constrained article column), give
   single mobile mockups a centered position to avoid the awkward
   left-aligned-with-empty-right layout the user flagged. */
.mobile-layout > .phone,
.link-stage > .phone {
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   MOCKUP FRAMES — THIS IS WHERE THE DARK PRODUCT UI LIVES
   Scoped token override cascades to all children.
   ============================================================ */

.mockup-frame {
  /* Token override: dark product surface */
  --bg: #0C0D10;
  --surface: #15171B;
  --surface-alt: #1B1E24;
  --surface-elev: #20232A;
  --surface-raised: #262A32;

  --ink: #F2F1EE;
  --ink-soft: #C8C7C2;
  --ink-dim: #8A8A84;
  --muted: #6C6C66;
  --muted-soft: #4A4B48;

  --border: #2A2D35;
  --border-soft: #1F2128;
  --border-bright: #3A3D45;

  --accent: var(--accent-light);   /* brighter coral on dark */
  --accent-soft: #2A1410;
  --accent-dim: #82372A;

  --success: var(--success-bright);
  --error: var(--error-bright);
  --info: var(--info-bright);
  --warn: var(--warn-bright);
  --signal: var(--signal-bright);

  background: var(--bg);
  color: var(--ink);
  border: 1px solid #2A2D35;
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-md);
}

.mockup-chrome {
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  padding: var(--s-3) var(--s-4);
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.mockup-dots { display: flex; gap: 6px; flex-shrink: 0; }
.mockup-dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border-bright);
}
.mockup-dots span:nth-child(1) { background: #E86C6C; }
.mockup-dots span:nth-child(2) { background: #E8B04E; }
.mockup-dots span:nth-child(3) { background: #7FCB8E; }

.mockup-url {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-dim);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* ============================================================
   PHONE FRAME · dark device body, inner scope dark product
   ============================================================ */

.phone {
  width: 412px;
  background: linear-gradient(180deg, #22252C, #0A0B0E);
  border: 1px solid #0A0B0E;
  border-radius: 44px;
  padding: 10px;
  box-shadow:
    0 30px 60px rgba(0,0,0,0.22),
    0 12px 28px rgba(0,0,0,0.16),
    inset 0 0 0 1px rgba(255,255,255,0.04),
    inset 0 2px 0 rgba(255,255,255,0.06);
  position: relative;
}

.phone-inner {
  /* Token override: dark product UI inside phone */
  --bg: #0C0D10;
  --surface: #15171B;
  --surface-alt: #1B1E24;
  --surface-elev: #20232A;
  --ink: #F2F1EE;
  --ink-soft: #C8C7C2;
  --ink-dim: #8A8A84;
  --muted: #6C6C66;
  --border: #2A2D35;
  --border-soft: #1F2128;
  --border-bright: #3A3D45;
  --accent: var(--accent-light);
  --accent-soft: #2A1410;
  --accent-dim: #82372A;

  background: var(--surface);
  color: var(--ink);
  border-radius: 34px;
  overflow: hidden;
  position: relative;
  min-height: 820px;
}

/* Family-facing mobile link page has its own light brand — override product dark */
.phone-inner.family-brand {
  --bg: #FBFAF5;
  --surface: #FFFFFF;
  --ink: #2A2420;
  --ink-soft: #5A4E44;
  --ink-dim: #8B6F4A;
  --border: #E8E2D0;
  background: #FBFAF5;
  color: #2A2420;
}

.phone-status {
  background: var(--surface);
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px 6px;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   TERMINAL S700 — HARDWARE DEVICE
   Near-black body, speaker grille, chin with branding, depth shadow.
   ============================================================ */

.terminal {
  width: 340px;
  background: linear-gradient(180deg, #242731, #0A0B0F);
  border-radius: 28px;
  padding: 44px 14px 50px;
  box-shadow:
    0 40px 80px rgba(0,0,0,0.32),
    0 20px 40px rgba(0,0,0,0.22),
    0 6px 12px rgba(0,0,0,0.16),
    inset 0 0 0 1px rgba(255,255,255,0.05),
    inset 0 2px 0 rgba(255,255,255,0.07);
  position: relative;
}
/* Speaker grille */
.terminal::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 5px;
  background-image:
    radial-gradient(circle at 2px 2px, rgba(255,255,255,0.16) 0.8px, transparent 1.1px);
  background-size: 6px 5px;
  border-radius: 2px;
}
/* Power LED */
.terminal::after {
  content: '';
  position: absolute;
  top: 20px;
  right: 28px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #7FCB8E;
  box-shadow: 0 0 6px rgba(127,203,142,0.5);
}

.terminal-chin {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.28em;
  color: rgba(255,255,255,0.32);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.terminal-chin .sq {
  display: inline-block;
  width: 6px; height: 6px;
  background: rgba(255,255,255,0.2);
  border-radius: 1px;
}

.terminal-screen {
  background: #FAFAF7;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 9/16;
  min-height: 540px;
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,0.35),
    inset 0 3px 10px rgba(0,0,0,0.22);
}

/* ============================================================
   APP CHROME — inside mockup (dark)
   ============================================================ */

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  padding: var(--s-3) var(--s-5);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.app-logo .mark {
  width: 22px; height: 22px;
  background: var(--accent);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--bg);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: -0.02em;
}
.app-logo .sub { color: var(--ink-dim); font-weight: 400; }

.app-tenant {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding: 4px 10px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-weight: 500;
}

.app-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0; padding: 0;
  flex: 1;
  justify-content: center;
}
.app-nav li { margin: 0; }
.app-nav a {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 var(--s-3);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-dim);
  border-radius: var(--r-sm);
  white-space: nowrap;
  letter-spacing: -0.005em;
}
.app-nav a:hover { color: var(--ink); background: var(--surface-alt); }
.app-nav a.active { color: var(--accent); background: var(--accent-soft); }

.app-utility {
  display: flex;
  align-items: center;
  gap: 4px;
}
.app-util-btn {
  min-width: 36px; height: 36px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--ink-dim);
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--r-sm);
}
.app-util-btn:hover { color: var(--ink); background: var(--surface-alt); }

.kbd {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-dim);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.m-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  min-height: 52px;
}
.m-topbar .m-brand {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.m-topbar .m-brand .mark {
  width: 22px; height: 22px;
  background: var(--accent); color: var(--bg);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  letter-spacing: -0.02em;
}

/* ============================================================
   STATE PILLS
   ============================================================ */

.state-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 7px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--r-full);
  background: var(--surface-alt);
  color: var(--ink-soft);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.state-pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* Inside dark product: */
.mockup-frame .state-initiated,
.phone-inner .state-initiated { color: var(--st-initiated); background: #18191D; border-color: #2A2D35; }
.mockup-frame .state-authorized,
.phone-inner .state-authorized { color: var(--st-authorized); background: var(--info-soft); border-color: var(--info-dim); }
.mockup-frame .state-captured,
.phone-inner .state-captured {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-dim);
}
.mockup-frame .state-reconciled,
.phone-inner .state-reconciled { color: var(--st-reconciled); background: var(--success-soft); border-color: var(--success-dim); }
.mockup-frame .state-closed,
.phone-inner .state-closed { color: var(--ink); background: var(--surface-elev); border-color: var(--border-bright); }
.mockup-frame .state-refunded,
.phone-inner .state-refunded { color: var(--st-refunded); background: var(--warn-soft); border-color: var(--warn-dim); }
.mockup-frame .state-failed,
.phone-inner .state-failed { color: var(--st-failed); background: var(--error-soft); border-color: var(--error-dim); }

/* Outside (portfolio light): */
.state-initiated { color: var(--ink-dim); background: #EDECE7; border-color: var(--border); }
.state-authorized { color: var(--info); background: var(--info-soft-light); border-color: #BCD0E7; }
.state-captured { color: var(--accent); background: var(--accent-soft-light); border-color: var(--accent-dim-light); }
.state-reconciled { color: var(--success); background: var(--success-soft-light); border-color: #B7DCCA; }
.state-closed { color: var(--ink); background: #E6E5DE; border-color: var(--border); }
.state-refunded { color: var(--warn); background: var(--warn-soft-light); border-color: #E0C082; }
.state-failed { color: var(--error); background: var(--error-soft-light); border-color: #E8B4A5; }

/* ============================================================
   FIELDS & INPUTS
   ============================================================ */

.field-group { margin-bottom: var(--s-4); }
.field-group label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 500;
  margin-bottom: 8px;
}
.input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--sans);
  font-size: 14px;
  background: var(--bg);
  color: var(--ink);
  min-height: var(--hit);
  transition: border-color 0.15s ease, background 0.15s ease;
  letter-spacing: -0.005em;
}
.input:hover { border-color: var(--border-bright); }
.input:focus-visible {
  border-color: var(--accent);
  outline: 1px solid var(--accent-dim);
  outline-offset: 1px;
  background: var(--surface);
}

/* ============================================================
   ANNOTATION PINS
   ============================================================ */

.pin {
  position: absolute;
  width: 28px; height: 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 11px;
  box-shadow: 0 0 0 3px rgba(232,79,48,0.2), 0 4px 14px rgba(232,79,48,0.25);
  z-index: 10;
  transition: transform 0.15s ease;
  letter-spacing: 0;
}
.pin:hover { transform: scale(1.08); }
.pin-sm { width: 22px; height: 22px; font-size: 10px; }

/* ============================================================
   ANNOTATIONS (editorial · light)
   ============================================================ */

.annotations {
  position: sticky;
  top: var(--s-6);
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}
@media (max-width: 1100px) { .annotations { position: static; } }

.annotations-title {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}
.annotation {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: var(--s-3);
}
.annotation-num {
  width: 22px; height: 22px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 10px;
  margin-top: 2px;
  letter-spacing: 0;
}
.annotation-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.4;
}
.annotation-note {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--hit);
  padding: 0 var(--s-5);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--r-sm);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  letter-spacing: -0.005em;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { background: var(--accent-pressed); }
.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--border-bright); background: var(--surface-alt); }

/* ============================================================
   FOOTER
   ============================================================ */

.page-footer {
  margin-top: var(--s-16);
  padding-top: var(--s-6);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  flex-wrap: wrap;
  gap: var(--s-4);
  font-weight: 500;
}
.page-footer nav { display: flex; gap: var(--s-6); flex-wrap: wrap; }
.page-footer a { padding: 6px 0; }
.page-footer a:hover { color: var(--accent); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 960px) {
  .page { padding: var(--s-6); }
  .page-header { grid-template-columns: 1fr; }
  .page-meta { align-items: flex-start; text-align: left; }
  .page-title { font-size: 30px; }
  .page-thesis { font-size: 16px; }
  .app-nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
