:root {
  color-scheme: light;
  --paper: #f8f8f4;
  --ink: #202d2b;
  --muted: #586460;
  --line: #d9ded7;
  --green: #216449;
  --lime: #d8f782;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
a:focus-visible { outline: 3px solid #146fbb; outline-offset: 5px; }
.skip-link { position: absolute; z-index: 2; top: -100px; padding: 12px; background: white; }
.skip-link:focus { top: 8px; left: 8px; }
.site-header, main, footer { max-width: 1240px; margin: 0 auto; padding-left: 48px; padding-right: 48px; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 26px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; font-size: 17px; font-weight: 750; letter-spacing: -.5px; white-space: nowrap; }
.wordmark-light { font-weight: 400; margin-left: -3px; }
.logo { display: inline-flex; align-items: center; justify-content: center; margin-right: 5px; width: 32px; height: 32px; background: var(--ink); color: var(--lime); border-radius: 8px; font-size: 19px; }
.header-label, .eyebrow, .small-code { font-family: var(--mono); font-size: 11px; letter-spacing: 1.1px; }
.header-label { color: var(--muted); }
.status { display: inline-flex; gap: 8px; align-items: center; font-size: 12px; white-space: nowrap; }
.status > span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.hero { display: grid; grid-template-columns: 1.12fr 1fr; gap: 72px; align-items: center; padding: 88px 0 76px; }
.eyebrow { color: var(--green); font-weight: 650; margin: 0 0 17px; }
h1 { font-size: clamp(40px, 4.8vw, 59px); line-height: 1.09; letter-spacing: -2.5px; font-weight: 650; margin: 0 0 24px; }
.intro { color: var(--muted); font-size: 17px; line-height: 1.75; margin: 0 0 29px; max-width: 580px; }
.button { display: inline-flex; gap: 23px; align-items: center; justify-content: space-between; background: var(--ink); color: white; padding: 15px 20px; border-radius: 6px; text-decoration: none; font-size: 14px; font-weight: 600; transition: background .15s ease; }
.button:hover { background: var(--green); }
.button > span { color: var(--lime); font-size: 20px; line-height: 1; }
.button-note { color: var(--muted); font-size: 11px; margin-top: 12px; }
.experiment-card { background: white; border: 1px solid var(--line); padding: 28px; border-radius: 14px; box-shadow: 0 18px 45px -30px #25433455; }
.card-heading { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 21px; margin-bottom: 25px; }
.card-heading .eyebrow { margin: 0; }
.small-code { color: var(--muted); }
.page-row { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 7px; padding: 17px 14px; }
.page-number { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.page-row > div { flex: 1; }
.page-row strong { display: block; font-size: 14px; font-weight: 650; }
.page-row code { display: block; font-size: 10px; padding: 0; background: transparent; margin-top: 2px; }
.pill { font-family: var(--mono); font-size: 8px; letter-spacing: .5px; padding: 4px 7px; border-radius: 4px; }
.pill-public { background: #edf0e9; color: #42514a; }
.pill-protected { background: var(--lime); color: var(--ink); }
.protected-row { border-color: #9cae7c; background: #fbfdf5; }
.connector { color: #768570; padding: 6px 0 6px 21px; line-height: 1.3; }
.card-caption { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 22px 0 0; }
.request-path { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 26px 0; }
.request-path h2 { margin: 0 0 20px; font-size: 12px; color: var(--muted); font-weight: 500; }
.path-nodes { display: flex; gap: 20px; justify-content: space-between; align-items: center; font-size: 14px; }
.path-nodes strong { font-weight: 650; }
.path-nodes small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.path-arrow { color: #73827b; }
.request-path > p { margin: 20px 0 0; font-size: 11px; color: var(--muted); }
.how-section { padding: 64px 0; }
.section-heading .eyebrow { margin-bottom: 10px; }
h2 { font-size: 28px; line-height: 1.25; letter-spacing: -.8px; font-weight: 620; margin: 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 35px; }
.step-number { display: inline-block; font-family: var(--mono); color: var(--green); font-size: 12px; margin-bottom: 13px; }
h3 { font-size: 17px; line-height: 1.4; font-weight: 650; margin: 0 0 10px; letter-spacing: -.3px; }
.steps p { font-size: 13px; color: var(--muted); margin: 0; }
code { font-family: var(--mono); font-size: .88em; background: #e9ede5; border-radius: 3px; padding: 2px 4px; overflow-wrap: anywhere; }
.inspector { display: grid; grid-template-columns: 1fr 1.25fr; align-items: center; gap: 55px; background: #edf1e6; border: 1px solid #dae2cc; border-radius: 10px; padding: 29px 32px; }
.inspector .eyebrow { margin-bottom: 9px; }
.inspector h2 { font-size: 23px; }
.inspector p:last-child { font-size: 13px; color: #445247; margin: 0; }
.inspector code { background: #dfe7d2; }
.scope-note { font-size: 11px; line-height: 1.8; color: var(--muted); margin: 20px 0 0; }
footer { display: flex; justify-content: space-between; gap: 20px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 62px; padding-top: 21px; padding-bottom: 26px; }
.success-hero { text-align: center; max-width: 760px; margin: 0 auto; padding: 66px 0 60px; border-bottom: 1px solid var(--line); }
.success-icon { display: inline-flex; align-items: center; justify-content: center; background: var(--lime); color: var(--green); border: 1px solid #bfdf76; font-size: 33px; border-radius: 50%; width: 66px; height: 66px; margin-bottom: 24px; }
.success-hero .intro { margin-left: auto; margin-right: auto; }
.marker { display: block; max-width: 430px; background: white; border: 1px solid var(--line); padding: 19px; border-radius: 8px; margin: 0 auto 30px; }
.marker > span { display: block; font-family: var(--mono); font-size: 9px; color: var(--muted); letter-spacing: 1px; margin-bottom: 6px; }
.marker code { font-size: 13px; background: transparent; color: var(--green); }
.action-row { display: flex; align-items: center; justify-content: center; gap: 26px; }
.text-link { font-size: 13px; font-weight: 550; text-underline-offset: 4px; }
.text-link > span { margin-left: 8px; }
@media (max-width: 980px) {
  .site-header, main, footer { padding-left: 28px; padding-right: 28px; }
  .hero { gap: 35px; }
  .header-label { display: none; }
  .experiment-card { padding: 20px; }
  .page-row { gap: 10px; padding: 15px 10px; }
  .page-row strong { font-size: 12px; }
  .steps { gap: 25px; }
  .inspector { gap: 28px; }
}
@media (max-width: 700px) {
  .site-header, main, footer { padding-left: 22px; padding-right: 22px; }
  .site-header { padding-top: 20px; padding-bottom: 20px; gap: 12px; }
  .wordmark { font-size: 15px; }
  .status { font-size: 10px; }
  .hero { grid-template-columns: 1fr; gap: 33px; padding: 44px 0 40px; }
  h1 { font-size: 45px; letter-spacing: -1.7px; }
  .intro { font-size: 16px; }
  .experiment-card { padding: 22px; }
  .page-row strong { font-size: 14px; }
  .path-nodes { flex-wrap: wrap; gap: 18px 12px; }
  .path-nodes > span:not(.path-arrow) { flex-basis: calc(50% - 25px); }
  .path-nodes > .path-arrow:nth-child(4) { display: none; }
  .how-section { padding: 40px 0; }
  .steps { grid-template-columns: 1fr; gap: 28px; margin-top: 28px; }
  .step-number { margin-bottom: 7px; }
  .steps p { font-size: 14px; }
  .inspector { grid-template-columns: 1fr; gap: 18px; padding: 24px; }
  footer { flex-direction: column; gap: 5px; margin-top: 42px; }
  .success-hero { padding: 40px 0; }
  .action-row { flex-direction: column; gap: 20px; }
}
@media (prefers-reduced-motion: reduce) { .button { transition: none; } }

/* Interactive experiments */
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, summary:focus-visible { outline: 3px solid #146fbb; outline-offset: 4px; }
button:disabled { cursor: wait; opacity: .55; }
.button { border: 1px solid transparent; }
.button.secondary { color: var(--ink); border-color: #aebca7; background: transparent; }
.button.secondary:hover { background: #eaf1dc; }
.button.secondary > span { color: var(--green); }
.quiet-button { background: transparent; border: 1px solid var(--line); border-radius: 5px; padding: 8px 12px; color: var(--green); font-size: 12px; }
.demo-nav { display: flex; gap: 20px; font-size: 12px; }
.demo-nav a { text-decoration: none; text-underline-offset: 5px; }
.demo-nav a:hover { text-decoration: underline; }
.compact-hero { padding-top: 65px; padding-bottom: 55px; gap: 50px; }
.page-row small { display: block; font-size: 11px; color: var(--muted); }
.experiment-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.demo-card { display: flex; flex-direction: column; border: 1px solid var(--line); background: white; border-radius: 12px; padding: 27px; }
.demo-card h2 { font-size: 25px; }
.demo-card > p { font-size: 14px; color: var(--muted); }
.demo-card dl { margin: 0 0 24px; }
dt { font-size: 10px; text-transform: uppercase; letter-spacing: .7px; color: var(--green); font-weight: 650; margin-top: 12px; }
dd { margin: 3px 0 0; font-size: 13px; }
.demo-card .button { margin-top: auto; gap: 12px; }
.controls { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 25px; }
.live-status { padding: 15px 18px; border: 1px solid var(--line); border-left: 4px solid #b3bea7; background: #f0f3eb; border-radius: 5px; font-size: 13px; line-height: 1.65; }
.live-status[data-state="success"] { border-left-color: var(--green); }
.live-status[data-state="error"] { border-left-color: #b34e2d; background: #fff3ed; }
.timeline-panel, .result-panel { background: white; border: 1px solid var(--line); border-radius: 10px; padding: 25px; min-width: 0; }
.panel-heading { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.timeline-panel h2, .result-panel h2 { font-size: 21px; }
.panel-description { color: var(--muted); font-size: 12px; margin: 10px 0 20px; }
.event-log { list-style: none; padding: 0; margin: 0; max-height: 440px; overflow-y: auto; }
.event-log li { border-top: 1px solid #e7ebe3; padding: 15px 0; font-size: 12px; }
.event-log li p { margin: 7px 0 0; color: var(--muted); }
.event-top { display: flex; gap: 15px; justify-content: space-between; }
.event-top strong { font-size: 13px; }
.event-top time { font: 10px var(--mono); color: var(--muted); white-space: nowrap; padding-top: 4px; }
.http-badge { display: inline-block; font: 11px var(--mono); color: var(--green); background: #eaf0dd; padding: 4px 6px; border-radius: 3px; margin-top: 8px; }
.spaced { margin-top: 40px; }
.demo-intro { padding-top: 45px; max-width: 850px; }
.demo-intro .intro { max-width: 740px; }
.back-link { display: inline-block; font-size: 12px; margin-bottom: 30px; color: var(--muted); text-decoration: none; }
.flow-steps { padding: 30px 0 38px; margin-top: 0; border-bottom: 1px solid var(--line); }
.control-panel { padding: 40px 0 20px; }
.control-panel h2 { font-size: 28px; }
.control-panel > div > p:not(.eyebrow) { color: var(--muted); font-size: 14px; }
.lab-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; margin-top: 15px; }
.result-panel pre { color: var(--green); padding: 18px; font: 12px/1.7 var(--mono); background: #f3f6ed; border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.puzzle-panel { border: 1px solid #a4b885; background: #fff; border-radius: 10px; padding: 25px; margin: 15px 0 25px; }
.puzzle-panel[hidden] { display: none; }
.puzzle-panel h2 { font-size: 23px; }
.puzzle-panel p { font-size: 13px; color: var(--muted); }
.puzzle-container { min-height: 120px; overflow: auto; max-width: 100%; }
.explanation { margin-top: 30px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 20px 0; }
.explanation summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.explanation p { max-width: 900px; font-size: 13px; color: var(--muted); }
.state-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 30px; background: white; border: 1px solid var(--line); border-radius: 8px; padding: 12px 24px 23px; margin-top: 22px; }
.state-grid dd { font-size: 14px; }
.table-wrap { margin-top: 25px; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th { text-align: left; font-size: 11px; color: var(--green); font-weight: 600; }
th, td { padding: 15px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
td:first-child { min-width: 210px; }
@media (max-width: 1000px) {
  .site-header { flex-wrap: wrap; gap: 16px; }
  .demo-nav { order: 3; width: 100%; }
  .experiment-grid { gap: 12px; }
  .demo-card { padding: 20px; }
  .demo-card h2 { font-size: 22px; }
}
@media (max-width: 760px) {
  .experiment-grid, .lab-grid { grid-template-columns: 1fr; }
  .compact-hero { padding-top: 40px; }
  .demo-nav { gap: 18px; flex-wrap: wrap; }
  .demo-card .button { align-self: flex-start; }
  .demo-intro { padding-top: 25px; }
  .state-grid { grid-template-columns: 1fr; gap: 6px; }
  .panel-heading { align-items: flex-start; }
  .timeline-panel, .result-panel { padding: 20px; }
  .controls .button { width: 100%; justify-content: center; }
  .flow-steps { padding-top: 10px; }
}


/* Token session monitor */
.token-monitor { margin: 15px 0 42px; padding: 28px; border: 1px solid #b8c9a6; border-radius: 14px; background: #edf2e6; }
.demo-intro + .token-monitor { margin-top: 32px; }
.success-hero + .token-monitor { margin-top: 40px; }
.token-monitor-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.token-monitor-heading .eyebrow { margin-bottom: 8px; }
.token-monitor-heading h2 { font-size: 27px; }
.token-monitor-heading button { background: #f8fbf3; flex-shrink: 0; }
.token-session-meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 17px 0 22px; color: var(--muted); font-size: 12px; }
.token-session-meta strong { color: var(--ink); font-weight: 550; }
.token-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.token-card { min-width: 0; padding: 23px; border: 1px solid #d6dfcc; border-radius: 10px; background: #fff; }
.token-card-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.token-card h3 { margin: 0; font-size: 16px; }
.token-state { display: inline-flex; align-items: center; gap: 7px; padding: 4px 9px; border-radius: 20px; background: #edf0eb; color: #586460; font-size: 11px; font-weight: 650; }
.token-state::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.token-state[data-state="active"] { background: #dff1cd; color: #205d36; }
.token-state[data-state="inactive"], .token-state[data-state="expired"] { background: #fff0e6; color: #924c2c; }
.token-clock-label { margin: 24px 0 1px; color: var(--muted); font-size: 11px; }
.token-clock { font-family: var(--mono); font-size: clamp(32px, 4.2vw, 48px); letter-spacing: -2px; line-height: 1.3; font-variant-numeric: tabular-nums; color: var(--ink); }
.token-progress { display: block; width: 100%; height: 7px; margin: 17px 0 14px; overflow: hidden; border: 0; border-radius: 5px; appearance: none; background: #e9eee3; color: var(--green); accent-color: var(--green); }
.token-progress::-webkit-progress-bar { background: #e9eee3; border-radius: 5px; }
.token-progress::-webkit-progress-value { background: var(--green); border-radius: 5px; }
.token-progress::-moz-progress-bar { background: var(--green); border-radius: 5px; }
.token-card[data-state="expired"] .token-progress { accent-color: #a65a32; color: #a65a32; }
.token-detail { min-height: 3.2em; margin: 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.token-monitor-note { margin: 18px 0 0; font-size: 11px; line-height: 1.75; color: #526149; max-width: 960px; }
@media (max-width: 760px) {
  .token-monitor { padding: 20px; margin-bottom: 30px; }
  .token-monitor-heading { align-items: flex-start; flex-direction: column; gap: 16px; }
  .token-monitor-heading h2 { font-size: 25px; }
  .token-session-meta { flex-direction: column; margin-bottom: 18px; }
  .token-cards { grid-template-columns: 1fr; gap: 14px; }
  .token-card { padding: 20px; }
  .token-clock { font-size: clamp(25px, 6.7vw, 36px); }
  .token-detail { min-height: 0; }
}
