  :root {
    --bg: #F1ECE2;
    --bg-warm: #E8E1D2;
    --paper: #FBF7EE;
    --paper-warm: #F6F0E2;
    --ink: #1A1815;
    --ink-soft: #4D473E;
    --ink-mute: #908878;
    --ink-faint: #B8B0A0;
    --line: #1A1815;
    --line-soft: rgba(26, 24, 21, 0.12);
    --line-faint: rgba(26, 24, 21, 0.06);
    --hibiscus: #C73E50;
    --hibiscus-deep: #8E1F2E;
    --petroleum: #1E3F44;
    --petroleum-soft: #2D5A60;
    --amber: #B8821F;
    --amber-soft: #D4AC4A;
    --moss: #4D6B3E;
    --sky: #2E5A8C;
    --canvas: #161412;
    --canvas-soft: #221E1A;
  }

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

  html { scroll-behavior: smooth; }

  body {
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.5;
    font-feature-settings: 'ss01', 'cv11';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
  }

  /* Background grain */
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.4;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.09 0 0 0 0 0.08 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  }

  .display { font-family: 'Fraunces', Georgia, serif; font-variation-settings: 'opsz' 144, 'SOFT' 50; }
  .display-italic { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-variation-settings: 'opsz' 144, 'SOFT' 100; }
  .mono { font-family: 'Geist Mono', 'SF Mono', monospace; }
  .small-caps { text-transform: uppercase; letter-spacing: 0.14em; font-size: 11px; font-weight: 500; }

  /* ---------- Top strip ---------- */
  .top-strip {
    border-bottom: 1px solid var(--line);
    padding: 14px 36px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
  }
  .top-strip .left { display: flex; gap: 18px; align-items: center; }
  .top-strip .center { text-align: center; font-weight: 500; }
  .top-strip .right { text-align: right; display: flex; gap: 18px; justify-content: flex-end; }
  .top-strip .dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--hibiscus); display: inline-block; margin-right: 8px;
    animation: pulse 2.4s ease-in-out infinite;
  }
  @keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
  }

  /* ---------- Layout ---------- */
  .wrap {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 36px;
  }
  .wrap-narrow { max-width: 980px; margin: 0 auto; padding: 0 36px; }

  /* ---------- Hero ---------- */
  .hero {
    padding: 120px 0 100px;
    position: relative;
  }
  .hero-meta {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-soft);
    padding-bottom: 56px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 56px;
  }
  .hero-meta .label { color: var(--ink-mute); display: block; margin-bottom: 6px; font-size: 10px; }
  .hero-meta strong { color: var(--ink); font-weight: 500; }

  .hero h1 {
    font-family: 'Fraunces', Georgia, serif;
    font-variation-settings: 'opsz' 144, 'SOFT' 30;
    font-weight: 360;
    font-size: clamp(64px, 11vw, 168px);
    line-height: 0.92;
    letter-spacing: -0.035em;
    color: var(--ink);
    margin-bottom: 48px;
  }
  .hero h1 em {
    font-style: italic;
    font-variation-settings: 'opsz' 144, 'SOFT' 100;
    font-weight: 340;
    color: var(--hibiscus);
  }
  .hero h1 .ampersand {
    font-style: italic;
    font-variation-settings: 'opsz' 144, 'SOFT' 100;
    color: var(--ink-soft);
    padding: 0 0.05em;
  }

  .hero-deck {
    display: grid;
    grid-template-columns: 240px 1fr 1fr;
    gap: 56px;
    align-items: start;
  }
  .hero-deck .col-1 {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-mute);
    line-height: 1.7;
  }
  .hero-deck .col-2 {
    font-size: 17px;
    line-height: 1.45;
    font-weight: 400;
    color: var(--ink);
  }
  .hero-deck .col-2 .lead {
    font-family: 'Fraunces', Georgia, serif;
    font-variation-settings: 'opsz' 60;
    font-weight: 380;
    font-size: 24px;
    line-height: 1.25;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
  }
  .hero-deck .col-3 {
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink-soft);
  }
  .hero-deck .col-3 p + p { margin-top: 14px; }

  /* ---------- Big mark ---------- */
  .mark {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 40px 0;
    margin-top: 80px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 36px;
  }
  .mark-item .num {
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    font-variation-settings: 'opsz' 144, 'SOFT' 100;
    font-weight: 300;
    font-size: 72px;
    line-height: 1;
    color: var(--ink);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
  }
  .mark-item .num .small { font-size: 36px; vertical-align: super; color: var(--ink-mute); }
  .mark-item .label {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-soft);
  }

  /* ---------- Section frame ---------- */
  .section {
    padding: 120px 0;
    position: relative;
  }
  .section + .section { border-top: 1px solid var(--line); }
  .section-dark {
    background: var(--canvas);
    color: var(--paper);
  }
  .section-dark { --line: rgba(251, 247, 238, 0.18); --line-soft: rgba(251, 247, 238, 0.1); --ink: #FBF7EE; --ink-soft: #B8B0A0; --ink-mute: #80796D; }

  .section-head {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 56px;
    margin-bottom: 80px;
    align-items: start;
  }
  .chapter {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-mute);
  }
  .chapter .num {
    display: block;
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    font-variation-settings: 'opsz' 144, 'SOFT' 100;
    font-size: 96px;
    line-height: 1;
    color: var(--ink);
    font-style: italic;
    font-weight: 300;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
  }
  .section-head h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-variation-settings: 'opsz' 144, 'SOFT' 30;
    font-weight: 360;
    font-size: clamp(40px, 5.6vw, 76px);
    line-height: 1;
    letter-spacing: -0.025em;
    margin-bottom: 24px;
  }
  .section-head h2 em {
    font-style: italic;
    font-variation-settings: 'opsz' 144, 'SOFT' 100;
    color: var(--hibiscus);
  }
  .section-head .deck {
    font-size: 18px;
    line-height: 1.45;
    color: var(--ink-soft);
    max-width: 680px;
    font-weight: 380;
  }
  .section-head .deck .strong { color: var(--ink); font-weight: 480; }

  /* ---------- Scope grid ---------- */
  .scope-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
  .scope-col {
    padding: 40px 36px 48px;
  }
  .scope-col + .scope-col { border-left: 1px solid var(--line); }
  .scope-col h3 {
    font-family: 'Fraunces', Georgia, serif;
    font-variation-settings: 'opsz' 60;
    font-weight: 400;
    font-size: 24px;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
  }
  .scope-col h3 em { color: var(--hibiscus); font-style: italic; font-variation-settings: 'opsz' 60, 'SOFT' 100; }
  .scope-col h3.out em { color: var(--ink-mute); }
  .scope-col .sub {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-mute);
    margin-bottom: 28px;
  }
  .scope-list { list-style: none; }
  .scope-list li {
    display: grid;
    grid-template-columns: 28px 1fr;
    padding: 14px 0;
    border-bottom: 1px dashed var(--line-soft);
    align-items: baseline;
    font-size: 15px;
    line-height: 1.4;
  }
  .scope-list li:last-child { border-bottom: none; }
  .scope-list li .idx {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    color: var(--ink-mute);
  }
  .scope-out .scope-list li { color: var(--ink-soft); }
  .scope-out .scope-list li .idx { color: var(--petroleum); }

  /* ---------- Mockup container ---------- */
  .mockup {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 40px 80px -32px rgba(26, 24, 21, 0.25), 0 4px 12px -2px rgba(26, 24, 21, 0.06);
    position: relative;
  }
  .mockup-chrome {
    background: var(--bg-warm);
    border-bottom: 1px solid var(--line);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    color: var(--ink-mute);
  }
  .mockup-chrome .dots { display: flex; gap: 6px; }
  .mockup-chrome .dots span {
    width: 9px; height: 9px; border-radius: 50%; background: var(--ink-faint);
    border: 1px solid var(--line-soft);
  }
  .mockup-chrome .url {
    flex: 1; text-align: center;
    background: var(--paper);
    padding: 4px 12px;
    border-radius: 3px;
    color: var(--ink-soft);
    font-size: 10.5px;
    border: 1px solid var(--line-soft);
    letter-spacing: 0;
    max-width: 360px;
    margin: 0 auto;
  }
  .mockup-chrome .url .lock { color: var(--moss); }

  /* ---------- App shell mockup ---------- */
  .app {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 600px;
    background: var(--paper);
    font-size: 13px;
  }
  .app-side {
    background: var(--paper-warm);
    border-right: 1px solid var(--line-soft);
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .app-side .logo {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 460;
    font-size: 22px;
    letter-spacing: -0.02em;
    color: var(--ink);
    padding: 4px 8px 28px;
    display: flex;
    align-items: center;
    gap: 9px;
  }
  .app-side .logo .logo-mark { width: 26px; height: 26px; flex-shrink: 0; }
  .app-side .logo .k {
    color: var(--hibiscus);
    font-style: italic;
    font-variation-settings: 'opsz' 60, 'SOFT' 100;
  }
  .app-side .nav-label {
    font-family: 'Geist Mono', monospace;
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-mute);
    padding: 14px 8px 6px;
  }
  .app-side .nav-item {
    padding: 9px 10px;
    border-radius: 4px;
    color: var(--ink-soft);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 450;
    cursor: pointer;
  }
  .app-side .nav-item.active {
    background: var(--ink);
    color: var(--paper);
  }
  .app-side .nav-item .ic { width: 14px; height: 14px; opacity: 0.7; }
  .app-side .nav-item .badge {
    margin-left: auto;
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    background: var(--hibiscus);
    color: var(--paper);
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 500;
  }
  .app-side .nav-item.active .badge { background: var(--paper); color: var(--ink); }

  .app-main {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .app-top {
    border-bottom: 1px solid var(--line-soft);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--paper);
  }
  .app-top .crumb {
    font-size: 12.5px;
    color: var(--ink-soft);
  }
  .app-top .crumb .sep { color: var(--ink-faint); margin: 0 8px; }
  .app-top .crumb .cur { color: var(--ink); font-weight: 480; }
  /* right cluster (bell + identity) pushed to the right edge of the top bar */
  .app-top .app-top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
  .app-top .role-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 6px 6px;
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    background: var(--paper-warm);
    font-size: 12px;
  }
  .app-top .role-switch .avatar {
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--hibiscus);
    color: var(--paper);
    display: grid; place-items: center;
    font-size: 10px;
    font-weight: 600;
  }
  .app-top .role-switch .name { font-weight: 500; }
  .app-top .role-switch .role { color: var(--ink-mute); font-family: 'Geist Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; }
  .app-top .role-switch .chev { color: var(--ink-mute); }
  .app-top .bell {
    width: 32px; height: 32px;
    border: 1px solid var(--line-soft);
    border-radius: 50%;
    display: grid; place-items: center;
    position: relative;
    color: var(--ink-soft);
  }
  .app-top .bell.has-unread::after {
    content: "";
    position: absolute; top: 4px; right: 5px;
    width: 7px; height: 7px;
    background: var(--hibiscus);
    border-radius: 50%;
    border: 2px solid var(--paper);
  }
  /* Notifications dropdown (the bell) */
  details.bell-details { position: relative; }
  details.bell-details > summary { list-style: none; }
  details.bell-details > summary::-webkit-details-marker { display: none; }
  .notif-panel {
    position: absolute; top: calc(100% + 8px); right: 0; z-index: 200;
    width: 330px; max-width: 88vw; max-height: 72vh; overflow-y: auto;
    background: var(--paper); border: 1px solid var(--line-soft); border-radius: 8px;
    box-shadow: 0 22px 44px -18px rgba(26, 24, 21, 0.32); padding: 6px;
  }
  .np-head { font-family: 'Geist Mono', monospace; font-size: 10px; text-transform: uppercase;
    letter-spacing: 0.12em; color: var(--ink-mute); padding: 8px 10px 6px; }
  .np-badge { color: var(--hibiscus); }
  .np-section { font-family: 'Geist Mono', monospace; font-size: 9px; text-transform: uppercase;
    letter-spacing: 0.14em; color: var(--ink-faint); padding: 10px 10px 4px; }
  .np-section-row { display: flex; align-items: center; justify-content: space-between; padding-right: 6px; }
  .np-seen { margin: 0; }
  .np-markread { background: none; border: none; cursor: pointer; padding: 8px 4px 4px;
    font-family: 'Geist Mono', monospace; font-size: 9px; text-transform: uppercase;
    letter-spacing: 0.12em; color: var(--hibiscus); }
  .np-markread:hover { text-decoration: underline; }
  .np-item { display: flex; align-items: flex-start; gap: 9px; padding: 9px 10px;
    border-radius: 5px; text-decoration: none; color: inherit; cursor: pointer; }
  .np-item:hover { background: var(--paper-warm); }
  .np-item.unread { background: color-mix(in srgb, var(--hibiscus) 5%, transparent); }
  .np-item.unread .np-title { font-weight: 540; }
  .np-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--hibiscus);
    margin-top: 5px; flex-shrink: 0; }
  .np-title { font-size: 12.5px; color: var(--ink); font-weight: 460; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .np-sub { font-size: 11px; color: var(--ink-mute); margin-top: 1px; }
  .np-empty { padding: 20px 12px; text-align: center; color: var(--ink-mute); font-size: 12.5px; }

  .app-body {
    padding: 32px 28px 36px;
    overflow: hidden;
  }
  .app-h {
    display: flex; align-items: baseline; gap: 16px;
    margin-bottom: 6px;
  }
  .app-h h1 {
    font-family: 'Fraunces', Georgia, serif;
    font-variation-settings: 'opsz' 60;
    font-weight: 420;
    font-size: 30px;
    letter-spacing: -0.02em;
  }
  .app-h .greet { color: var(--ink-mute); font-family: 'Geist Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; }
  .app-sub { color: var(--ink-soft); font-size: 13.5px; margin-bottom: 22px; }

  .stat-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border: 1px solid var(--line-soft);
    border-radius: 4px;
    margin-bottom: 28px;
    overflow: hidden;
  }
  .stat {
    padding: 18px 18px 20px;
    border-right: 1px solid var(--line-soft);
    background: var(--paper);
    position: relative;
  }
  .stat:last-child { border-right: none; }
  .stat .lbl {
    font-family: 'Geist Mono', monospace;
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-mute);
    margin-bottom: 8px;
  }
  .stat .val {
    font-family: 'Fraunces', Georgia, serif;
    font-variation-settings: 'opsz' 144;
    font-weight: 380;
    font-size: 38px;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--ink);
  }
  .stat .val .unit { font-size: 14px; color: var(--ink-mute); margin-left: 4px; font-family: 'Geist Mono', monospace; vertical-align: super; }
  .stat .delta {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    margin-top: 8px;
    color: var(--moss);
  }
  .stat .delta.bad { color: var(--hibiscus); }
  .stat .spark {
    position: absolute;
    right: 14px;
    top: 14px;
    width: 50px;
    height: 18px;
    opacity: 0.4;
  }

  .ctrl-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
  }
  .ctrl-row .filter {
    border: 1px solid var(--line-soft);
    border-radius: 3px;
    padding: 6px 10px;
    font-size: 12px;
    background: var(--paper);
    color: var(--ink-soft);
    display: flex; align-items: center; gap: 6px;
  }
  .ctrl-row .filter .chev { color: var(--ink-mute); }
  .ctrl-row .filter.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
  .ctrl-row .search {
    flex: 1; max-width: 260px;
    padding: 6px 10px;
    background: var(--paper-warm);
    border: 1px solid var(--line-soft);
    border-radius: 3px;
    font-size: 12px;
    color: var(--ink-mute);
  }
  .ctrl-row .btn {
    margin-left: auto;
    background: var(--ink);
    color: var(--paper);
    padding: 7px 14px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    display: flex; align-items: center; gap: 6px;
  }
  /* functional filter controls — native selects/search styled as the pill look */
  .ctrl-row select.filter {
    appearance: none; -webkit-appearance: none;
    padding-right: 26px; cursor: pointer; line-height: 1.4;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none' stroke='%238a8580' stroke-width='1.4'><path d='M1 1l4 4 4-4'/></svg>");
    background-repeat: no-repeat; background-position: right 9px center;
  }
  .ctrl-row input.search {
    font-family: 'Geist', sans-serif; color: var(--ink); line-height: 1.4;
  }
  .ctrl-row input.search::placeholder { color: var(--ink-mute); }
  .ctrl-row select.filter:focus,
  .ctrl-row input.search:focus { outline: none; border-color: var(--ink-soft); }
  a.filter { text-decoration: none; }

  /* pagination controls (below the list tables) */
  .pager { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
  .pager-info { margin-right: auto; font-family: 'Geist Mono', monospace; font-size: 10.5px;
    text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-mute); }
  .pager-cur { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--ink-soft); }
  .pager-btn { border: 1px solid var(--line-soft); border-radius: 4px; padding: 5px 12px;
    text-decoration: none; color: var(--ink); background: var(--paper); font-size: 12px; }
  .pager-btn:hover { background: var(--paper-warm); }
  .pager-btn.disabled { color: var(--ink-faint); pointer-events: none; opacity: 0.55; }

  table.req {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
  }
  table.req thead th {
    text-align: left;
    font-family: 'Geist Mono', monospace;
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-mute);
    font-weight: 500;
    padding: 12px 12px 12px 0;
    border-bottom: 1px solid var(--line-soft);
  }
  table.req tbody td {
    padding: 14px 12px 14px 0;
    border-bottom: 1px dashed var(--line-soft);
    vertical-align: middle;
    color: var(--ink);
  }
  table.req .id { font-family: 'Geist Mono', monospace; color: var(--ink-mute); font-size: 11px; }
  table.req .title { font-weight: 460; }
  table.req .sub { font-size: 11px; color: var(--ink-mute); margin-top: 2px; }
  table.req .ts { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--ink-soft); }

  .badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: 2px;
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
    border: 1px solid currentColor;
    background: transparent;
  }
  .badge::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
  }
  .badge-draft { color: #807868; }
  .badge-submitted { color: #2E5A8C; }
  .badge-review { color: #B8821F; }
  .badge-pending { color: #4D7898; }
  .badge-approved, .badge-confirmed { color: #4D6B3E; }
  .badge-rejected { color: var(--hibiscus); }
  .badge-closed { color: #3D3833; }
  .badge.solid { background: currentColor; }
  .badge.solid::before { background: var(--paper); }
  .badge.solid .badge-txt { color: var(--paper); }

  /* ---------- Marginalia ---------- */
  .mockup-wrap {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 36px;
    align-items: start;
    margin-bottom: 80px;
  }
  .mockup-wrap.flip { grid-template-columns: 1fr 200px; }
  .margin {
    font-family: 'Geist Mono', monospace;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-mute);
    line-height: 1.6;
    position: sticky;
    top: 100px;
  }
  .margin .lbl {
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    font-variation-settings: 'opsz' 60, 'SOFT' 100;
    font-size: 28px;
    color: var(--ink);
    letter-spacing: -0.01em;
    text-transform: none;
    line-height: 1;
    margin-bottom: 14px;
    font-weight: 320;
    display: block;
  }
  .margin .lbl .num {
    color: var(--ink-mute);
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    font-style: normal;
    font-weight: 500;
    letter-spacing: 0.14em;
    vertical-align: top;
    margin-right: 8px;
    text-transform: uppercase;
  }
  .margin p { text-transform: none; font-family: 'Geist', sans-serif; font-size: 13px; color: var(--ink-soft); line-height: 1.5; letter-spacing: 0; }
  .margin p + p { margin-top: 12px; }
  .margin .tag {
    display: inline-block;
    padding: 3px 8px;
    border: 1px solid var(--line);
    margin-top: 16px;
    margin-right: 6px;
    color: var(--ink);
  }

  /* ---------- Request detail mockup ---------- */
  .detail-head {
    padding: 28px 28px 0;
  }
  .detail-head .row1 { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
  .detail-head .id-pill {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    color: var(--ink-mute);
    text-transform: uppercase;
    letter-spacing: 0.14em;
  }
  .detail-head h1 {
    font-family: 'Fraunces', Georgia, serif;
    font-variation-settings: 'opsz' 60;
    font-weight: 400;
    font-size: 30px;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
  }
  .detail-head .meta-row { font-size: 12px; color: var(--ink-mute); display: flex; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line-soft); }
  .detail-head .meta-row .v { color: var(--ink); }

  .tab-strip {
    display: flex;
    gap: 0;
    padding: 0 28px;
    border-bottom: 1px solid var(--line-soft);
  }
  .tab-strip .tab {
    padding: 12px 16px 14px;
    font-size: 12.5px;
    font-weight: 450;
    color: var(--ink-mute);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    display: flex; gap: 6px; align-items: center;
  }
  .tab-strip .tab.active {
    color: var(--ink);
    border-bottom-color: var(--hibiscus);
  }
  .tab-strip .tab .count {
    background: var(--paper-warm);
    color: var(--ink-mute);
    font-family: 'Geist Mono', monospace;
    font-size: 9.5px;
    padding: 1px 5px;
    border-radius: 3px;
  }
  .tab-strip .tab.active .count { background: var(--ink); color: var(--paper); }

  .detail-body { padding: 28px; }

  /* Timeline */
  .timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
  }
  .timeline::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 14px; bottom: 14px;
    width: 1px;
    background: var(--line-soft);
  }
  .tl {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: 16px;
    padding: 10px 0;
    align-items: start;
  }
  .tl-dot {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--paper);
    border: 1.5px solid var(--ink-mute);
    margin-top: 3px;
    margin-left: 7px;
    position: relative;
    z-index: 1;
  }
  .tl-dot.done {
    background: var(--moss);
    border-color: var(--moss);
  }
  .tl-dot.done::after {
    content: "✓";
    position: absolute;
    inset: 0;
    color: var(--paper);
    font-size: 8px;
    text-align: center;
    line-height: 11px;
    font-weight: 700;
  }
  .tl-dot.current {
    background: var(--hibiscus);
    border-color: var(--hibiscus);
    box-shadow: 0 0 0 4px rgba(199, 62, 80, 0.18);
    animation: pulseDot 2s ease-in-out infinite;
  }
  @keyframes pulseDot {
    0%, 100% { box-shadow: 0 0 0 4px rgba(199, 62, 80, 0.18); }
    50% { box-shadow: 0 0 0 8px rgba(199, 62, 80, 0.05); }
  }
  .tl-dot.future {
    background: var(--paper);
    border-color: var(--ink-faint);
  }
  .tl-body .step {
    font-size: 14px;
    font-weight: 480;
    color: var(--ink);
  }
  .tl-body .step.future { color: var(--ink-mute); font-weight: 420; }
  .tl-body .actor {
    font-size: 11.5px;
    color: var(--ink-mute);
    margin-top: 2px;
    font-family: 'Geist Mono', monospace;
  }
  .tl-body .note {
    margin-top: 6px;
    padding: 8px 10px;
    background: var(--paper-warm);
    border-left: 2px solid var(--hibiscus);
    font-size: 12px;
    color: var(--ink-soft);
    line-height: 1.45;
    font-style: italic;
  }
  .tl-time {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    color: var(--ink-mute);
    text-align: right;
    white-space: nowrap;
    padding-top: 3px;
  }

  /* ---------- Form mockup ---------- */
  .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 32px;
  }
  .form-grid .full { grid-column: span 2; }
  .field label {
    display: block;
    font-family: 'Geist Mono', monospace;
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-mute);
    margin-bottom: 6px;
  }
  .field label .req { color: var(--hibiscus); margin-left: 2px; }
  .field .input {
    width: 100%;
    padding: 10px 12px;
    background: var(--paper);
    border: 1px solid var(--line-soft);
    border-radius: 3px;
    font-size: 13px;
    color: var(--ink);
    font-family: 'Geist', sans-serif;
    display: flex; align-items: center; gap: 8px;
  }
  .field .input.empty { color: var(--ink-mute); }
  .field .input.focused {
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(26, 24, 21, 0.06);
  }
  .field .input.readonly { background: var(--paper-warm); color: var(--ink-soft); }
  .field .input .ic { color: var(--ink-mute); }
  .field .input.textarea {
    min-height: 88px;
    align-items: flex-start;
    line-height: 1.5;
  }
  .field .radios {
    display: flex; gap: 10px; flex-wrap: wrap;
  }
  .field .radios .r {
    padding: 8px 14px;
    border: 1px solid var(--line-soft);
    border-radius: 3px;
    font-size: 12.5px;
    color: var(--ink-soft);
    cursor: pointer;
    display: flex; align-items: center; gap: 8px;
  }
  .field .radios .r.active {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--paper);
  }
  .field .radios .r .dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
  }
  .field .radios .r.active .dot {
    background: var(--paper);
    border-color: var(--paper);
    position: relative;
  }
  .field .radios .r.active .dot::after {
    content: "";
    position: absolute;
    inset: 2.5px;
    background: var(--ink);
    border-radius: 50%;
  }

  .file-drop {
    border: 1.5px dashed var(--line-soft);
    border-radius: 4px;
    padding: 22px;
    text-align: center;
    background: var(--paper-warm);
    color: var(--ink-mute);
    font-size: 12.5px;
  }
  .file-drop strong { color: var(--ink); font-weight: 480; }

  .form-actions {
    display: flex;
    gap: 10px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--line-soft);
    align-items: center;
  }
  .form-actions .left { color: var(--ink-mute); font-size: 11.5px; font-family: 'Geist Mono', monospace; }
  .btn-primary {
    background: var(--ink);
    color: var(--paper);
    padding: 10px 18px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 500;
    margin-left: auto;
    display: inline-flex; align-items: center; gap: 6px;
  }
  .btn-secondary {
    background: transparent;
    color: var(--ink);
    padding: 10px 18px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--line-soft);
  }

  /* ---------- Inbox mockup ---------- */
  .inbox-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
  .inbox-table thead th {
    text-align: left;
    font-family: 'Geist Mono', monospace;
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-mute);
    font-weight: 500;
    padding: 12px 12px;
    border-bottom: 1px solid var(--line-soft);
    background: var(--paper-warm);
  }
  .inbox-table tbody td {
    padding: 14px 12px;
    border-bottom: 1px dashed var(--line-soft);
    vertical-align: middle;
  }
  .inbox-table tbody tr.urgent { background: rgba(199, 62, 80, 0.04); }
  .inbox-table tbody tr.highlight { background: rgba(184, 130, 31, 0.06); }
  .inbox-table .check { width: 14px; height: 14px; border: 1px solid var(--line-soft); border-radius: 2px; }
  .inbox-table .check.on { background: var(--ink); border-color: var(--ink); position: relative; }
  .inbox-table .check.on::after { content: "✓"; position: absolute; color: var(--paper); font-size: 9px; line-height: 12px; text-align: center; width: 100%; font-weight: 700; }
  .inbox-table .req-id { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--ink-mute); }
  .inbox-table .req-title { font-weight: 460; color: var(--ink); }
  .inbox-table .req-sub { font-size: 11px; color: var(--ink-mute); margin-top: 2px; }
  .inbox-table .avatar-sm {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--paper);
    display: inline-grid;
    place-items: center;
    font-size: 9px;
    font-weight: 600;
    margin-right: 6px;
    vertical-align: middle;
  }
  .inbox-table .avatar-sm.h { background: var(--hibiscus); }
  .inbox-table .avatar-sm.p { background: var(--petroleum); }
  .inbox-table .avatar-sm.a { background: var(--amber); }
  .inbox-table .row-act {
    display: flex; gap: 4px; opacity: 0.7;
  }
  .inbox-table .row-act .ic {
    width: 26px; height: 26px;
    border: 1px solid var(--line-soft);
    border-radius: 3px;
    display: grid; place-items: center;
    color: var(--ink-soft);
    background: var(--paper);
  }
  .inbox-table .row-act .ic.review { background: var(--ink); color: var(--paper); border-color: var(--ink); }
  .inbox-table .age {
    font-family: 'Geist Mono', monospace;
    font-size: 10.5px;
    color: var(--ink-mute);
  }
  .inbox-table .age.over { color: var(--hibiscus); }

  /* ---------- Modal mockup ---------- */
  .modal-shell {
    background: linear-gradient(180deg, var(--paper-warm) 0%, var(--paper) 100%);
    padding: 80px 40px;
    border: 1px solid var(--line);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 40px 80px -32px rgba(26, 24, 21, 0.25);
  }
  .modal-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, var(--line-soft) 1px, transparent 0);
    background-size: 20px 20px;
    opacity: 0.5;
  }
  .modal {
    position: relative;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: 0 30px 60px -20px rgba(26, 24, 21, 0.3);
    max-width: 520px;
    margin: 0 auto;
  }
  .modal-head {
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--line-soft);
  }
  .modal-head .ttl-mono {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-mute);
    margin-bottom: 6px;
  }
  .modal-head .ttl {
    font-family: 'Fraunces', Georgia, serif;
    font-variation-settings: 'opsz' 60;
    font-weight: 420;
    font-size: 22px;
    letter-spacing: -0.015em;
  }
  .modal-body { padding: 20px 24px 24px; }
  .modal-body .summary {
    background: var(--paper-warm);
    border: 1px solid var(--line-soft);
    border-radius: 3px;
    padding: 14px 16px;
    margin-bottom: 22px;
  }
  .modal-body .summary .row {
    display: grid;
    grid-template-columns: 100px 1fr;
    font-size: 12px;
    padding: 4px 0;
  }
  .modal-body .summary .row .k {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-mute);
  }
  .modal-body .summary .row .v { color: var(--ink); }
  .modal-body .question {
    font-family: 'Fraunces', Georgia, serif;
    font-variation-settings: 'opsz' 60;
    font-weight: 400;
    font-size: 17px;
    margin-bottom: 14px;
    letter-spacing: -0.01em;
  }
  .modal-body .question em { font-style: italic; color: var(--hibiscus); font-variation-settings: 'opsz' 60, 'SOFT' 100; }
  .yn {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
  }
  .yn .opt {
    padding: 14px 16px;
    border: 1px solid var(--line-soft);
    border-radius: 4px;
    cursor: pointer;
    display: flex; align-items: center; gap: 12px;
  }
  .yn .opt.sel {
    border-color: var(--moss);
    background: rgba(77, 107, 62, 0.05);
  }
  .yn .opt.sel.no {
    border-color: var(--hibiscus);
    background: rgba(199, 62, 80, 0.05);
  }
  .yn .opt .check {
    width: 18px; height: 18px;
    border: 1.5px solid var(--ink-faint);
    border-radius: 50%;
    flex-shrink: 0;
  }
  .yn .opt.sel .check {
    border-color: var(--moss);
    background: var(--moss);
    position: relative;
  }
  .yn .opt.sel .check::after {
    content: "";
    position: absolute;
    inset: 4px;
    background: var(--paper);
    border-radius: 50%;
  }
  .yn .opt .lbl-yn { font-weight: 500; font-size: 14px; }
  .yn .opt .sub-yn { font-size: 11px; color: var(--ink-mute); display: block; margin-top: 2px; }
  .modal-foot {
    padding: 16px 24px;
    border-top: 1px solid var(--line-soft);
    background: var(--paper-warm);
    display: flex; gap: 8px;
    border-radius: 0 0 4px 4px;
  }
  .modal-foot .spacer { flex: 1; font-family: 'Geist Mono', monospace; font-size: 10px; color: var(--ink-mute); display: flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: 0.12em; }

  /* ---------- Notifications panel ---------- */
  .notif-panel {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
    max-width: 420px;
    box-shadow: 0 30px 60px -20px rgba(26, 24, 21, 0.25);
  }
  .notif-head {
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--line-soft);
    display: flex; align-items: baseline; gap: 12px;
  }
  .notif-head h3 {
    font-family: 'Fraunces', Georgia, serif;
    font-variation-settings: 'opsz' 60;
    font-weight: 420;
    font-size: 20px;
    letter-spacing: -0.01em;
    flex: 1;
  }
  .notif-head .markread {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-mute);
  }
  .notif-tabs {
    display: flex; gap: 0;
    border-bottom: 1px solid var(--line-soft);
    padding: 0 20px;
  }
  .notif-tabs .nt {
    padding: 10px 0;
    margin-right: 18px;
    font-size: 12px;
    color: var(--ink-mute);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
  }
  .notif-tabs .nt.active {
    color: var(--ink);
    border-bottom-color: var(--ink);
    font-weight: 500;
  }
  .notif-tabs .nt .ct {
    background: var(--paper-warm);
    color: var(--ink-mute);
    padding: 1px 5px;
    border-radius: 8px;
    font-family: 'Geist Mono', monospace;
    font-size: 9px;
    margin-left: 4px;
  }
  .notif-list .ni {
    padding: 14px 20px;
    border-bottom: 1px dashed var(--line-soft);
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 12px;
    position: relative;
  }
  .notif-list .ni.unread { background: rgba(199, 62, 80, 0.03); }
  .notif-list .ni.unread::before {
    content: ""; position: absolute; left: 8px; top: 22px;
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--hibiscus);
  }
  .notif-list .ni .av {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: grid; place-items: center;
    font-size: 10px;
    font-weight: 600;
    color: var(--paper);
    background: var(--ink);
  }
  .notif-list .ni .av.h { background: var(--hibiscus); }
  .notif-list .ni .av.p { background: var(--petroleum); }
  .notif-list .ni .av.a { background: var(--amber); }
  .notif-list .ni .av.m { background: var(--moss); }
  .notif-list .ni .txt { font-size: 12.5px; line-height: 1.4; color: var(--ink); }
  .notif-list .ni .txt strong { font-weight: 530; }
  .notif-list .ni .txt .req { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--ink-mute); }
  .notif-list .ni .time { font-family: 'Geist Mono', monospace; font-size: 10px; color: var(--ink-mute); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.08em; }
  .notif-list .ni .preview {
    margin-top: 8px;
    padding: 8px 10px;
    background: var(--paper-warm);
    border-left: 2px solid var(--ink-faint);
    font-size: 11.5px;
    font-style: italic;
    color: var(--ink-soft);
    line-height: 1.45;
  }

  /* ---------- MOC stepper ---------- */
  .stepper {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    border-bottom: 1px solid var(--line-soft);
    padding: 0 28px;
    background: var(--paper-warm);
  }
  .stepper .step {
    padding: 18px 8px 16px;
    text-align: center;
    position: relative;
    font-size: 11px;
    color: var(--ink-mute);
    border-right: 1px solid var(--line-soft);
  }
  .stepper .step:last-child { border-right: none; }
  .stepper .step .n {
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    font-variation-settings: 'opsz' 60, 'SOFT' 100;
    font-size: 26px;
    font-weight: 320;
    color: var(--ink-faint);
    margin-bottom: 2px;
    line-height: 1;
  }
  .stepper .step .lbl {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-mute);
  }
  .stepper .step.active { background: var(--paper); }
  .stepper .step.active .n { color: var(--hibiscus); }
  .stepper .step.active .lbl { color: var(--ink); font-weight: 500; }
  .stepper .step.active::after {
    content: "";
    position: absolute;
    bottom: -1px; left: 0; right: 0;
    height: 2px;
    background: var(--hibiscus);
  }
  .stepper .step.done .n { color: var(--moss); }
  .stepper .step.done .lbl { color: var(--ink-soft); }

  /* ---------- Routing diagram (dark) ---------- */
  .routing-canvas {
    position: relative;
    padding: 40px 0;
    min-height: 760px;
  }
  .routing-svg {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
  }
  .routing-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto auto auto auto auto auto auto;
    gap: 38px;
    justify-items: center;
  }
  .node {
    background: var(--canvas-soft);
    border: 1px solid var(--line);
    padding: 14px 22px;
    border-radius: 3px;
    text-align: center;
    min-width: 200px;
    position: relative;
    color: var(--paper);
  }
  .node.start { background: var(--paper); color: var(--ink); border-color: var(--paper); }
  .node.terminal { background: var(--hibiscus); color: var(--paper); border-color: var(--hibiscus); }
  .node.success { background: var(--moss); color: var(--paper); border-color: var(--moss); }
  .node.diamond {
    background: transparent;
    border: 1px solid var(--paper);
    color: var(--paper);
    transform: rotate(45deg);
    width: 180px; height: 180px;
    min-width: 0;
    padding: 0;
    display: grid; place-items: center;
  }
  .node.diamond .inner {
    transform: rotate(-45deg);
    text-align: center;
    width: 200px;
  }
  .node .ttl {
    font-family: 'Geist Mono', monospace;
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-soft);
    margin-bottom: 4px;
  }
  .node.start .ttl, .node.terminal .ttl, .node.success .ttl { color: rgba(255,255,255,0.7); }
  .node.start .ttl { color: var(--ink-mute); }
  .node .nm {
    font-family: 'Fraunces', Georgia, serif;
    font-variation-settings: 'opsz' 60;
    font-weight: 400;
    font-size: 17px;
    letter-spacing: -0.01em;
    line-height: 1.15;
  }
  .node .sub {
    font-size: 11px;
    color: var(--ink-soft);
    margin-top: 6px;
    line-height: 1.4;
  }
  .node .keyva-tag {
    position: absolute;
    top: -10px; right: -10px;
    background: var(--hibiscus);
    color: var(--paper);
    font-family: 'Geist Mono', monospace;
    font-size: 9px;
    padding: 3px 7px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
    white-space: nowrap;
  }
  .node.diamond .keyva-tag { transform: rotate(-45deg); top: -16px; right: -16px; }

  .branch-row {
    display: flex; gap: 80px; align-items: center; justify-content: center;
  }
  .branch-row .col {
    display: flex; flex-direction: column; gap: 24px; align-items: center;
  }
  .branch-row .col .branch-lbl {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-soft);
  }

  /* ---------- Comments mockup ---------- */
  .comment {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px dashed var(--line-soft);
  }
  .comment:last-child { border-bottom: none; }
  .comment .av {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--paper);
    display: grid; place-items: center;
    font-size: 11px;
    font-weight: 600;
  }
  .comment .av.h { background: var(--hibiscus); }
  .comment .av.p { background: var(--petroleum); }
  .comment .av.a { background: var(--amber); }
  .comment .head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 4px; }
  .comment .nm { font-weight: 530; font-size: 13.5px; }
  .comment .role { font-family: 'Geist Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-mute); }
  .comment .when { font-family: 'Geist Mono', monospace; font-size: 10px; color: var(--ink-mute); margin-left: auto; }
  .comment .body { font-size: 13px; color: var(--ink); line-height: 1.55; }

  /* ---------- Files mockup ---------- */
  .file-row {
    display: grid;
    grid-template-columns: 36px 1fr 100px 140px 24px;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--line-soft);
    align-items: center;
    font-size: 12.5px;
  }
  .file-row .ext {
    width: 32px; height: 36px;
    background: var(--paper-warm);
    border: 1px solid var(--line-soft);
    border-radius: 2px;
    display: grid; place-items: center;
    font-family: 'Geist Mono', monospace;
    font-size: 9px;
    color: var(--ink-soft);
    font-weight: 600;
  }
  .file-row .ext.pdf { color: var(--hibiscus); }
  .file-row .ext.xlsx { color: var(--moss); }
  .file-row .ext.docx { color: var(--sky); }
  .file-row .ext.png { color: var(--amber); }
  .file-row .nm { font-weight: 460; color: var(--ink); }
  .file-row .meta { font-size: 11px; color: var(--ink-mute); font-family: 'Geist Mono', monospace; }
  .file-row .meta a { color: var(--petroleum); text-decoration: none; font-size: 15px; }
  .file-row .meta a:hover { color: var(--hibiscus); }

  /* Attach-a-document control (Documents tab) */
  .doc-upload { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
  .doc-file { display: flex; align-items: center; gap: 8px; flex: 1; cursor: pointer;
    border: 1px dashed var(--line-soft); border-radius: 6px; padding: 9px 12px; min-width: 0; }
  .doc-file:hover { border-color: var(--petroleum); background: var(--paper-warm); }
  .doc-file input[type=file] { display: none; }
  .doc-file .doc-name { font-size: 12.5px; color: var(--ink-mute); white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; }
  .btn-mini { border: 1px solid var(--petroleum); background: var(--petroleum); color: #fff;
    border-radius: 6px; padding: 9px 16px; font-size: 12.5px; font-weight: 500; cursor: pointer;
    white-space: nowrap; }
  .btn-mini:hover { filter: brightness(1.06); }
  .doc-error { margin-top: 14px; padding: 9px 12px; border-radius: 6px; font-size: 12.5px;
    color: var(--hibiscus); background: color-mix(in srgb, var(--hibiscus) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--hibiscus) 24%, transparent); }

  /* ---------- Reports ---------- */
  .rep-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px; margin-top: 22px; }
  .rep-card { background: var(--paper); border: 1px solid var(--line-soft); border-radius: 10px;
    padding: 18px 20px; }
  .rep-title { font-family: 'Geist Mono', monospace; font-size: 10px; text-transform: uppercase;
    letter-spacing: 0.14em; color: var(--ink-mute); margin-bottom: 16px; }
  .rep-chart { display: flex; flex-direction: column; gap: 11px; }
  .rb-row { display: grid; grid-template-columns: 130px 1fr 34px; align-items: center; gap: 12px; }
  .rb-label { font-size: 12px; color: var(--ink-soft); white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; }
  .rb-track { height: 9px; background: var(--paper-warm); border-radius: 5px; overflow: hidden; }
  .rb-fill { height: 100%; border-radius: 5px; background: var(--petroleum); min-width: 2px;
    transition: width .3s ease; }
  .rb-fill.c-cat { background: var(--moss); }
  .rb-fill.c-risk { background: var(--amber); }
  .rb-val { font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--ink);
    text-align: right; }

  /* Throughput columns */
  .rep-cols { display: flex; align-items: flex-end; gap: 10px; height: 130px; padding-top: 6px; }
  .rc-month { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
  .rc-bars { flex: 1; display: flex; align-items: flex-end; gap: 3px; width: 100%;
    justify-content: center; }
  .rc-bar { width: 42%; max-width: 20px; border-radius: 3px 3px 0 0; min-height: 2px; }
  .rc-bar.created { background: var(--petroleum); }
  .rc-bar.completed { background: var(--moss); }
  .rc-label { font-family: 'Geist Mono', monospace; font-size: 9.5px; color: var(--ink-mute);
    margin-top: 6px; }
  .rc-legend { display: flex; align-items: center; gap: 6px; margin-top: 12px;
    font-size: 11px; color: var(--ink-mute); }
  .rc-legend .ck { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
  .rc-legend .ck.created { background: var(--petroleum); }
  .rc-legend .ck.completed { background: var(--moss); margin-left: 8px; }

  /* Connect Power BI panel */
  .rep-connect { margin-top: 16px; background: var(--paper); border: 1px solid var(--line-soft);
    border-radius: 10px; padding: 18px 20px; }
  .rc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
  .rc-head .rep-title { margin-bottom: 0; }
  .rc-status { font-family: 'Geist Mono', monospace; font-size: 9px; text-transform: uppercase;
    letter-spacing: 0.1em; padding: 3px 8px; border-radius: 20px; }
  .rc-status.on { color: var(--moss); background: color-mix(in srgb, var(--moss) 12%, transparent); }
  .rc-status.off { color: var(--ink-mute); background: var(--paper-warm); }
  .rc-desc { font-size: 13px; color: var(--ink-soft); line-height: 1.55; margin: 0 0 12px; }
  .rc-url { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: var(--paper-warm); border: 1px solid var(--line-soft); border-radius: 7px;
    padding: 10px 12px; }
  .rc-url-label { font-family: 'Geist Mono', monospace; font-size: 9px; text-transform: uppercase;
    letter-spacing: 0.12em; color: var(--ink-mute); }
  .rc-url code, .rc-note code { font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--ink); }
  .rc-url code { word-break: break-all; }
  .rc-note { font-size: 12px; color: var(--ink-mute); line-height: 1.5; margin: 12px 0 0; }

  /* ---------- Demo flow ---------- */
  .demo-track {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 36px;
  }
  .demo-step {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 36px;
    padding: 28px 0;
    border-bottom: 1px solid var(--line-soft);
    align-items: start;
  }
  .demo-step .num {
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    font-variation-settings: 'opsz' 144, 'SOFT' 100;
    font-size: 64px;
    line-height: 0.85;
    color: var(--ink-faint);
    font-weight: 300;
  }
  .demo-step.active .num { color: var(--hibiscus); }
  .demo-step .body { padding-top: 14px; }
  .demo-step .body .role-tag {
    display: inline-block;
    font-family: 'Geist Mono', monospace;
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-mute);
    margin-bottom: 8px;
    padding: 2px 8px;
    border: 1px solid var(--line-soft);
    border-radius: 2px;
  }
  .demo-step .body .role-tag.req { color: var(--hibiscus); border-color: var(--hibiscus); }
  .demo-step .body .role-tag.gs { color: var(--petroleum); border-color: var(--petroleum); }
  .demo-step .body .role-tag.agent { color: var(--amber); border-color: var(--amber); }
  .demo-step .body h4 {
    font-family: 'Fraunces', Georgia, serif;
    font-variation-settings: 'opsz' 60;
    font-weight: 420;
    font-size: 22px;
    margin-bottom: 8px;
    letter-spacing: -0.015em;
  }
  .demo-step .body p {
    font-size: 14px;
    color: var(--ink-soft);
    line-height: 1.5;
    max-width: 640px;
  }
  .demo-step .body .narration {
    margin-top: 12px;
    padding: 10px 14px;
    border-left: 2px solid var(--hibiscus);
    background: var(--paper-warm);
    font-style: italic;
    font-family: 'Fraunces', Georgia, serif;
    font-variation-settings: 'opsz' 60, 'SOFT' 100;
    font-size: 14px;
    color: var(--ink);
    line-height: 1.5;
    max-width: 640px;
  }

  /* ---------- State machine ---------- */
  .state-machine {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 40px;
    position: relative;
    overflow: hidden;
  }
  .sm-flow {
    display: grid;
    gap: 0;
    position: relative;
  }
  .sm-node {
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 10px 18px;
    border-radius: 3px;
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 500;
    text-align: center;
    margin: 0 auto;
    min-width: 180px;
    position: relative;
    z-index: 2;
  }
  .sm-arrow {
    text-align: center;
    color: var(--ink-mute);
    font-size: 18px;
    line-height: 1;
    padding: 6px 0;
    font-family: 'Geist Mono', monospace;
  }
  .sm-node.start { background: var(--ink); color: var(--paper); border-color: var(--ink); }
  .sm-node.terminal-bad { background: var(--hibiscus); color: var(--paper); border-color: var(--hibiscus); }
  .sm-node.terminal-good { background: var(--moss); color: var(--paper); border-color: var(--moss); }
  .sm-node.decision {
    border-style: dashed;
    border-color: var(--amber);
    color: var(--amber);
    background: rgba(184, 130, 31, 0.05);
  }
  .sm-branches {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 8px 0;
  }
  .sm-branch {
    border: 1px dashed var(--line-soft);
    padding: 16px;
    border-radius: 4px;
    text-align: center;
    background: var(--paper-warm);
  }
  .sm-branch .case {
    font-family: 'Geist Mono', monospace;
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-mute);
    margin-bottom: 10px;
  }
  .sm-loop {
    border: 1px dashed var(--hibiscus);
    color: var(--hibiscus);
    padding: 6px 10px;
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: 8px;
    display: inline-block;
  }

  /* ---------- Footer ---------- */
  .footer {
    border-top: 1px solid var(--line);
    padding: 80px 0 60px;
    background: var(--bg-warm);
  }
  .footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
  }
  .footer h4 {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-mute);
    margin-bottom: 16px;
  }
  .footer .big {
    font-family: 'Fraunces', Georgia, serif;
    font-variation-settings: 'opsz' 144, 'SOFT' 50;
    font-weight: 360;
    font-size: 48px;
    line-height: 1;
    letter-spacing: -0.025em;
    margin-bottom: 16px;
  }
  .footer .big em { font-style: italic; font-variation-settings: 'opsz' 144, 'SOFT' 100; color: var(--hibiscus); }
  .footer p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; max-width: 360px; }
  .footer ul { list-style: none; }
  .footer ul li { padding: 4px 0; font-size: 13px; color: var(--ink); }
  .footer ul li .k { color: var(--ink-mute); font-family: 'Geist Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; display: block; margin-bottom: 1px; }
  .footer-bottom {
    border-top: 1px solid var(--line-soft);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-mute);
  }

  /* ---------- Helpers ---------- */
  .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
  .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

  .pull-quote {
    font-family: 'Fraunces', Georgia, serif;
    font-variation-settings: 'opsz' 144, 'SOFT' 100;
    font-style: italic;
    font-weight: 320;
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--ink);
    padding: 60px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin: 60px 0;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }
  .pull-quote .accent { color: var(--hibiscus); }

  /* Reveal animation */
  .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .reveal.in {
    opacity: 1;
    transform: translateY(0);
  }

  .hero h1 .line {
    display: block;
    overflow: hidden;
  }
  .hero h1 .line .inner {
    display: inline-block;
    transform: translateY(100%);
    animation: lineRise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  }
  .hero h1 .line:nth-child(2) .inner { animation-delay: 0.12s; }
  .hero h1 .line:nth-child(3) .inner { animation-delay: 0.24s; }
  @keyframes lineRise {
    to { transform: translateY(0); }
  }

  /* Decorative compass / mark */
  .mark-deco {
    width: 80px; height: 80px;
    border: 1px solid var(--ink);
    border-radius: 50%;
    display: grid; place-items: center;
    position: relative;
    background: var(--paper);
    flex-shrink: 0;
  }
  .mark-deco::before, .mark-deco::after {
    content: "";
    position: absolute;
    background: var(--ink);
  }
  .mark-deco::before { width: 1px; height: 100%; left: 50%; transform: translateX(-50%); }
  .mark-deco::after { width: 100%; height: 1px; top: 50%; transform: translateY(-50%); }
  .mark-deco .center {
    width: 12px; height: 12px;
    background: var(--hibiscus);
    border-radius: 50%;
    position: relative;
    z-index: 2;
  }

  /* Inline mini icons */
  .ic-sm { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.5; vertical-align: middle; }

  /* Responsive */
  @media (max-width: 980px) {
    .hero-deck, .section-head, .mockup-wrap, .mockup-wrap.flip, .demo-step, .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .margin { position: static; }
    .stat-row { grid-template-columns: repeat(2, 1fr); }
    .stat:nth-child(2) { border-right: none; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .full { grid-column: span 1; }
    /* marketing mockup preview only — the real app (.app--full) uses the drawer below */
    .app:not(.app--full) { grid-template-columns: 1fr; }
    .app:not(.app--full) .app-side { display: none; }
    .hero-meta { grid-template-columns: 1fr; gap: 12px; }
    .mark { grid-template-columns: 1fr 1fr; }
  }

  /* ============================================================
     APP SHELL — full-viewport overrides (SPA, not preview)
     The mockup's .app lived inside a .mockup preview box. Here it
     fills the browser and scrolls its own body.
     ============================================================ */
  html, body { height: 100%; }
  body { overflow: hidden; }
  body::before { display: none; } /* drop the grain overlay for the working app */

  .app.app--full {
    grid-template-columns: 232px 1fr;
    height: 100vh;
    min-height: 0;
    font-size: 13px;
    background: var(--paper);
  }
  .app--full .app-side {
    padding: 20px 14px;
    overflow-y: auto;
  }
  .app--full .app-side .nav-item { user-select: none; }
  .app--full .app-side .nav-item:hover:not(.active) { background: var(--paper); }
  .app--full .app-side .nav-item.disabled { opacity: 0.45; cursor: not-allowed; }
  .app--full .app-side .side-foot {
    margin-top: auto;
    padding: 12px 8px 0;
    font-family: 'Geist Mono', monospace;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-faint);
    border-top: 1px solid var(--line-faint);
  }
  .app--full .app-main { min-width: 0; }
  .app--full .app-top { flex-shrink: 0; }
  .app--full .app-top .bell { cursor: pointer; }
  .app--full .app-top .role-switch { cursor: pointer; user-select: none; position: relative; }
  .app--full .app-body {
    overflow-y: auto;
    flex: 1;
    padding: 32px 40px 60px;
  }
  .app--full .app-body .view-wide { max-width: 1120px; }

  /* interactive affordances layered on the lifted design system */
  .nav-item, .filter, .tab, .r, .yn .opt, .btn-primary, .btn-secondary,
  .btn, .row-act .ic, .markread, .nt, table.req tbody tr, .inbox-table tbody tr,
  .role-menu .role-opt, .id-link { cursor: pointer; }
  table.req tbody tr:hover { background: var(--paper-warm); }
  .btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
  .btn-primary, .btn-secondary, .btn { border: 1px solid transparent; font-family: inherit; }
  .btn-secondary { border-color: var(--line-soft); }
  button { font-family: inherit; cursor: pointer; }
  .id-link { color: var(--ink); text-decoration: none; }
  .id-link:hover { color: var(--hibiscus); }

  /* view switching */
  .view { display: none; }
  .view.active { display: block; }
  .fade-in { animation: fadeIn 0.35s cubic-bezier(0.2,0.7,0.2,1); }
  @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

  /* ---------- Toast ---------- */
  .toast-wrap {
    position: fixed;
    right: 24px; bottom: 24px;
    z-index: 4000;
    display: flex; flex-direction: column; gap: 10px;
    max-width: 380px;
  }
  .toast {
    background: var(--ink);
    color: var(--paper);
    border-radius: 5px;
    padding: 14px 16px;
    box-shadow: 0 20px 40px -16px rgba(26,24,21,0.5);
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 12px;
    align-items: start;
    animation: toastIn 0.4s cubic-bezier(0.2,0.7,0.2,1);
  }
  .toast.leaving { animation: toastOut 0.35s forwards; }
  @keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
  @keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }
  .toast .tmark { color: var(--amber-soft); margin-top: 1px; }
  .toast.ok .tmark { color: #8FBF6E; }
  .toast.bad .tmark { color: #E88; }
  .toast .tbody .th { font-weight: 560; font-size: 13px; margin-bottom: 2px; }
  .toast .tbody .tp { font-size: 12px; color: rgba(251,247,238,0.7); line-height: 1.4; }
  .toast .tbody .tp a { color: var(--paper); text-decoration: underline; }

  /* ---------- Modal overlay ---------- */
  .overlay {
    position: fixed; inset: 0;
    background: rgba(26,24,21,0.42);
    backdrop-filter: blur(2px);
    z-index: 3000;
    display: grid; place-items: center;
    padding: 40px;
    animation: fadeIn 0.25s;
  }
  .overlay .modal { margin: 0; max-height: 90vh; overflow-y: auto; animation: modalPop 0.3s cubic-bezier(0.2,0.7,0.2,1); }
  @keyframes modalPop { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }
  .modal .close-x {
    position: absolute; top: 16px; right: 16px;
    width: 26px; height: 26px; border-radius: 50%;
    border: 1px solid var(--line-soft); background: var(--paper);
    display: grid; place-items: center; color: var(--ink-mute);
    font-size: 14px; line-height: 1;
  }
  .modal-body .rej-reason { display: none; }
  .modal-body .rej-reason.show { display: block; }
  .modal-body textarea {
    width: 100%; min-height: 80px; margin-top: 8px;
    padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 3px;
    font-family: 'Geist', sans-serif; font-size: 13px; color: var(--ink);
    background: var(--paper); resize: vertical; line-height: 1.5;
  }
  .modal-foot .btn-primary.danger { background: var(--hibiscus); }
  .modal-foot .btn-primary.approve { background: var(--moss); }

  /* ---------- Slide-out notifications ---------- */
  .drawer-scrim {
    position: fixed; inset: 0; z-index: 3500;
    background: rgba(26,24,21,0.35);
    animation: fadeIn 0.25s;
  }
  .drawer {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: 420px; max-width: 92vw;
    background: var(--paper);
    border-left: 1px solid var(--line);
    box-shadow: -30px 0 60px -20px rgba(26,24,21,0.25);
    z-index: 3600;
    display: flex; flex-direction: column;
    animation: drawerIn 0.35s cubic-bezier(0.2,0.7,0.2,1);
  }
  @keyframes drawerIn { from { transform: translateX(100%); } to { transform: none; } }
  .drawer .notif-panel { border: none; box-shadow: none; max-width: none; height: 100%; display: flex; flex-direction: column; border-radius: 0; }
  .drawer .notif-list { overflow-y: auto; flex: 1; }
  .drawer .notif-list .ni { cursor: pointer; }
  .drawer .notif-list .ni:hover { background: var(--paper-warm); }

  /* ---------- Role menu dropdown ---------- */
  .role-menu {
    position: absolute;
    top: calc(100% + 8px); right: 0;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 5px;
    box-shadow: 0 24px 48px -16px rgba(26,24,21,0.28);
    width: 260px;
    overflow: hidden;
    z-index: 20;
  }
  .role-menu .rm-head {
    font-family: 'Geist Mono', monospace; font-size: 9px; text-transform: uppercase;
    letter-spacing: 0.14em; color: var(--ink-mute);
    padding: 12px 14px 8px;
  }
  .role-menu .role-opt {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; font-size: 13px;
    border-top: 1px solid var(--line-faint);
  }
  .role-menu .role-opt:hover { background: var(--paper-warm); }
  .role-menu .role-opt.active { background: var(--paper-warm); }
  .role-menu .role-opt .avatar { width: 26px; height: 26px; border-radius: 50%; color: var(--paper); display: grid; place-items: center; font-size: 10px; font-weight: 600; flex-shrink: 0; }
  .role-menu .role-opt .rn { font-weight: 500; }
  .role-menu .role-opt .rr { font-family: 'Geist Mono', monospace; font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-mute); }
  .role-menu .role-opt .tick { margin-left: auto; color: var(--moss); }

  .avatar.c-h { background: var(--hibiscus); }
  .avatar.c-p { background: var(--petroleum); }
  .avatar.c-a { background: var(--amber); }
  .avatar.c-m { background: var(--moss); }
  .avatar.c-s { background: var(--sky); }

  /* empty state */
  .empty-state {
    text-align: center; padding: 80px 20px; color: var(--ink-mute);
  }
  .empty-state .es-mark { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-size: 40px; color: var(--ink-faint); margin-bottom: 12px; }
  .empty-state p { font-size: 14px; }

  /* routing page wrapper on light bg */
  .routing-page { background: var(--canvas); margin: -32px -40px -60px; padding: 48px 40px 80px; min-height: calc(100vh - 60px); }
  .routing-page .rp-head h1 { color: var(--paper); font-family: 'Fraunces', Georgia, serif; font-variation-settings: 'opsz' 60; font-weight: 420; font-size: 34px; letter-spacing: -0.02em; }
  .routing-page .rp-head p { color: rgba(251,247,238,0.7); font-size: 14px; max-width: 620px; margin-top: 10px; line-height: 1.55; }
  .routing-page .rp-legend { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 22px; }
  .routing-page .rp-legend .lg { display: flex; align-items: center; gap: 8px; font-family: 'Geist Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(251,247,238,0.7); }
  .routing-page .rp-legend .sw { width: 14px; height: 14px; border-radius: 3px; }

  /* small helper for detail summary grid */
  .detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 40px; }
  .detail-grid .full { grid-column: span 2; }
  .detail-grid .dk { font-family: 'Geist Mono', monospace; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-mute); margin-bottom: 6px; }
  .detail-grid .dv { font-size: 14px; color: var(--ink); line-height: 1.5; }

  @media (max-width: 860px) {
    .detail-grid { grid-template-columns: 1fr; }
    .detail-grid .full { grid-column: span 1; }
  }

  /* ============================================================
     Server-rendered (Django + HTMX) specifics
     ============================================================ */
  a.nav-item { text-decoration: none; color: var(--ink-soft); }
  a.nav-item.active { color: var(--paper); }

  /* role switcher as a native <details> dropdown */
  details.role-details { position: relative; }
  details.role-details > summary { list-style: none; cursor: pointer; }
  details.role-details > summary::-webkit-details-marker { display: none; }
  details.role-details[open] > summary .chev { transform: rotate(180deg); }
  details.role-details .role-menu { display: block; }
  .role-menu form { margin: 0; }
  .role-menu .role-opt {
    width: 100%; border: 0; background: transparent; text-align: left;
    font-family: inherit; border-top: 1px solid var(--line-faint);
  }
  .role-menu .role-opt:first-of-type { border-top: 0; }

  /* server-rendered form inputs reuse the .input look */
  .field input.input, .field textarea.input {
    width: 100%; font-family: 'Geist', sans-serif;
  }
  .field textarea.input { resize: vertical; }
  .field .input::placeholder, .field textarea.input::placeholder { color: var(--ink-faint); }

  /* messages/toasts stack from the server render use existing .toast styles */

  /* N+1 reason block on the stage page (outside modal scope) */
  .rej-reason { display: none; }
  .rej-reason.show { display: block; }
  .rej-reason textarea {
    width: 100%; min-height: 80px; margin-top: 8px; padding: 10px 12px;
    border: 1px solid var(--line-soft); border-radius: 3px;
    font-family: 'Geist', sans-serif; font-size: 13px; color: var(--ink);
    background: var(--paper); resize: vertical; line-height: 1.5;
  }

  /* ============================================================
     Auth pages (login / register) — Keyva design, standalone
     ============================================================ */
  .auth-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: var(--bg);
    padding: 48px 20px;
  }
  .auth-inner { width: 100%; max-width: 400px; }
  .auth-card {
    background: var(--paper);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    padding: 40px 36px 36px;
    box-shadow: 0 40px 80px -32px rgba(26, 24, 21, 0.25), 0 4px 12px -2px rgba(26, 24, 21, 0.06);
  }
  .auth-brand {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 460;
    font-size: 26px;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 26px;
    display: flex;
    align-items: center;
    gap: 11px;
  }
  .auth-brand .brand-mark { width: 30px; height: 30px; flex-shrink: 0; }
  /* Microsoft SSO button + divider on the login card */
  .btn-ms {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 11px 14px; margin-bottom: 6px;
    border: 1px solid var(--line-soft); border-radius: 6px;
    background: var(--paper); color: var(--ink);
    font-family: 'Geist', sans-serif; font-size: 13.5px; font-weight: 500;
    text-decoration: none; cursor: pointer; transition: background 0.15s, border-color 0.15s;
  }
  .btn-ms:hover { background: var(--paper-warm); border-color: var(--line); }
  .auth-or {
    display: flex; align-items: center; gap: 12px;
    margin: 18px 0; color: var(--ink-mute);
    font-family: 'Geist Mono', monospace; font-size: 10px;
    text-transform: uppercase; letter-spacing: 0.12em;
  }
  .auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
  .auth-alt {
    display: block; width: 100%; margin-top: 12px; padding: 6px;
    border: 0; background: none; cursor: pointer;
    color: var(--ink-mute); font-family: 'Geist', sans-serif; font-size: 12.5px;
    text-align: center; text-decoration: underline; text-underline-offset: 3px;
  }
  .auth-alt:hover { color: var(--ink); }
  .auth-brand .k { color: var(--hibiscus); font-style: italic; font-variation-settings: 'opsz' 60, 'SOFT' 100; }
  .auth-h {
    font-family: 'Fraunces', Georgia, serif;
    font-variation-settings: 'opsz' 60;
    font-weight: 420;
    font-size: 28px;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 6px;
  }
  .auth-sub { color: var(--ink-soft); font-size: 13.5px; margin-bottom: 26px; line-height: 1.5; }
  .auth-card .field { margin-bottom: 16px; }
  .auth-submit { width: 100%; justify-content: center; margin-top: 8px; margin-left: 0; }
  .auth-alt { margin-top: 22px; font-size: 13px; color: var(--ink-mute); text-align: center; line-height: 1.6; }
  .auth-alt a { color: var(--hibiscus); text-decoration: none; font-weight: 480; }
  .auth-alt a:hover { text-decoration: underline; }
  .auth-foot {
    text-align: center;
    margin-top: 20px;
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-faint);
  }
  .auth-msg {
    padding: 11px 14px;
    border-radius: 4px;
    font-size: 12.5px;
    margin-bottom: 18px;
    line-height: 1.4;
  }
  .auth-msg.error { background: rgba(199, 62, 80, 0.06); border: 1px solid var(--hibiscus); color: var(--hibiscus-deep); }
  .auth-msg.success { background: rgba(77, 107, 62, 0.07); border: 1px solid var(--moss); color: var(--ink); }
  .auth-msg.info { background: var(--paper-warm); border: 1px solid var(--line-soft); color: var(--ink-soft); }

  /* ============================================================
     RESPONSIVE — the working app (.app--full) across all sizes.
     Tiers:  ≥1600 large · 1025–1599 laptop (base) · ≤1024 tablet
     (sidebar → off-canvas drawer) · ≤768 small · ≤640 mobile
     (tables → cards, full-screen modals). Rules are scoped to
     .app--full so the marketing mockup preview is unaffected.
     ============================================================ */

  /* hamburger + drawer backdrop: hidden until drawer mode kicks in */
  .nav-toggle { display: none; }
  .drawer-backdrop { display: none; }

  /* ---- Large screens: more room ---- */
  @media (min-width: 1600px) {
    .app.app--full { grid-template-columns: 264px 1fr; }
    .app--full .app-body { padding: 40px 56px 72px; }
    .app--full .app-body .view-wide { max-width: 1360px; }
  }

  /* ---- Tablet & below: sidebar becomes an off-canvas drawer ---- */
  @media (max-width: 1024px) {
    .app.app--full { grid-template-columns: 1fr; }
    .nav-toggle {
      display: grid; place-items: center;
      width: 34px; height: 34px; flex-shrink: 0; padding: 0;
      border: 1px solid var(--line-soft); border-radius: 7px;
      background: var(--paper); color: var(--ink-soft); cursor: pointer;
    }
    .nav-toggle svg { width: 18px; height: 18px; }
    .app--full .app-side {
      display: flex;                       /* override marketing display:none */
      position: fixed; top: 0; left: 0; z-index: 4000;
      width: 264px; max-width: 82vw; height: 100%;
      transform: translateX(-100%);
      transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
      box-shadow: 0 0 60px -12px rgba(26, 24, 21, 0.4);
    }
    .app--full.drawer-open .app-side { transform: translateX(0); }
    .drawer-backdrop {
      display: block; position: fixed; inset: 0; z-index: 3900;
      background: rgba(26, 24, 21, 0.42); backdrop-filter: blur(1px);
      opacity: 0; pointer-events: none; transition: opacity 0.28s;
    }
    .app--full.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
    .app--full .app-top { padding: 12px 18px; }
    .app--full .app-body { padding: 24px 22px 48px; }
    /* routing page bleeds to the app-body edges — match the reduced padding */
    .routing-page { margin: -24px -22px -48px; padding: 36px 22px 64px; }
  }

  /* ---- Small tablet / large phone ---- */
  @media (max-width: 768px) {
    .stat-row { grid-template-columns: repeat(2, 1fr); }
    .stat:nth-child(2) { border-right: none; }
    .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
    .app-h { flex-wrap: wrap; gap: 4px 12px; }
    .app-h h1 { font-size: 24px; }
    .detail-head .meta-row { flex-wrap: wrap; gap: 10px 18px; }
  }

  /* ---- Mobile: card tables, single column, full-screen modals ---- */
  @media (max-width: 640px) {
    .app--full .app-top { padding: 10px 14px; gap: 10px; }
    .app-top .crumb { display: none; }          /* the page H1 carries context */
    .app-top .role-switch { padding: 5px 8px 5px 5px; }
    .app-top .role-switch .role { display: none; }
    .app--full .app-body { padding: 18px 14px 40px; }
    .app-h h1 { font-size: 22px; }

    /* filter / search / new-button row → wrap to full width */
    .ctrl-row { flex-wrap: wrap; }
    .ctrl-row .search { flex: 1 1 100%; max-width: none; order: -1; }
    .ctrl-row .btn { margin-left: 0; flex: 1 1 100%; justify-content: center; }

    /* opt-in card reflow (table.req.cards) — shared skeleton */
    table.req.cards, table.req.cards tbody { display: block; }
    table.req.cards thead { display: none; }
    table.req.cards tbody tr {
      display: grid; grid-template-columns: 1fr auto;
      align-items: center; gap: 4px 10px;
      border: 1px solid var(--line-soft); border-radius: 6px;
      padding: 12px 14px; margin-bottom: 10px;
    }
    table.req.cards tbody td { display: block; padding: 0; border: none; }
    /* empty-state row keeps its normal full-width block */
    table.req.cards tbody tr:has(td[colspan]) { display: block; border: none; padding: 0; margin: 0; }
    table.req.cards tbody tr:has(td[colspan]) td { display: block; }

    /* MOC request list mapping: id · title · status · created · updated */
    table.req.cards:not(.userlist) tbody tr {
      grid-template-areas: "id status" "title title" "created updated";
    }
    table.req.cards:not(.userlist) tbody td:nth-child(1) { grid-area: id; }
    table.req.cards:not(.userlist) tbody td:nth-child(2) { grid-area: title; }
    table.req.cards:not(.userlist) tbody td:nth-child(3) { grid-area: status; justify-self: end; }
    table.req.cards:not(.userlist) tbody td:nth-child(4) { grid-area: created; }
    table.req.cards:not(.userlist) tbody td:nth-child(5) { grid-area: updated; justify-self: end; }
    table.req.cards:not(.userlist) tbody td:nth-child(4) .ts::before { content: "Created "; color: var(--ink-faint); }
    table.req.cards:not(.userlist) tbody td:nth-child(5) .ts::before { content: "Updated "; color: var(--ink-faint); }

    /* Users list mapping: user · email · role · access · status · actions */
    table.req.cards.userlist tbody tr {
      grid-template-areas: "user access" "email email" "role status" "act act";
    }
    table.req.cards.userlist tbody td:nth-child(1) { grid-area: user; }
    table.req.cards.userlist tbody td:nth-child(2) { grid-area: email; }
    table.req.cards.userlist tbody td:nth-child(3) { grid-area: role; }
    table.req.cards.userlist tbody td:nth-child(4) { grid-area: access; justify-self: end; }
    table.req.cards.userlist tbody td:nth-child(5) { grid-area: status; justify-self: end; }
    table.req.cards.userlist tbody td:nth-child(6) { grid-area: act; padding-top: 6px; }

    /* inbox table → stacked cards */
    .inbox-table, .inbox-table tbody { display: block; }
    .inbox-table thead { display: none; }
    .inbox-table tbody tr {
      display: grid;
      grid-template-columns: 1fr auto;
      grid-template-areas: "id status" "title title" "who who" "action arrow";
      align-items: center; gap: 6px 10px;
      border: 1px solid var(--line-soft); border-radius: 6px;
      padding: 12px 14px; margin-bottom: 10px;
    }
    .inbox-table tbody td { display: block; padding: 0; border: none; }
    .inbox-table tbody td:nth-child(1) { grid-area: id; }
    .inbox-table tbody td:nth-child(2) { grid-area: title; }
    .inbox-table tbody td:nth-child(3) { grid-area: who; }
    .inbox-table tbody td:nth-child(4) { grid-area: status; justify-self: end; }
    .inbox-table tbody td:nth-child(5) { grid-area: action; }
    .inbox-table tbody td:nth-child(6) { grid-area: arrow; justify-self: end; }
    .inbox-table tbody tr:has(td[colspan]) { display: block; border: none; padding: 0; margin: 0; }
    .inbox-table tbody tr:has(td[colspan]) td { display: block; }

    /* modals fill the screen on a phone */
    .overlay { padding: 0; place-items: stretch; }
    .overlay .modal {
      max-width: 100% !important; width: 100%;
      max-height: 100vh; height: 100%; border-radius: 0; border: none;
    }
    .modal-head { padding: 18px 16px 14px; }
    .modal-body { padding: 18px 16px; }
    .modal-foot { flex-wrap: wrap; gap: 10px; }
    /* detail modal has inline paddings — tighten them on mobile */
    .modal .detail-head { padding: 16px 16px 0 !important; }
    .modal .detail-head + div,             /* action panel */
    .detail-body { padding-left: 16px !important; padding-right: 16px !important; }
    .tab-strip { overflow-x: auto; }
    .tab-strip .tab { flex-shrink: 0; white-space: nowrap; }
    /* initiate stepper scrolls rather than squashing */
    .stepper { overflow-x: auto; }
    .stepper .step { flex-shrink: 0; min-width: 120px; }

    /* routing page: match mobile padding + let the wide flow diagram scroll */
    .routing-page { margin: -18px -14px -40px; padding: 26px 14px 48px; }
    .routing-page .rp-head h1 { font-size: 26px; }
    .routing-grid { overflow-x: auto; overflow-y: hidden; padding-bottom: 10px; justify-items: start; }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-grid .full { grid-column: span 1; }
  }
