/* Runtime Bound public website — shared styles.
   Original, standalone. No framework, no remote assets, no scripts required for layout.
   Tokens are the whole design system: colour, type, space, radius, focus, state, motion. */

:root {
  --paper: #faf9f6;
  --paper-2: #f3f1ec;
  --ink: #0c1f33;
  --muted: #42566b;
  --faint: #6b7d8f;
  --line: #cdd9e4;
  --ice: #e8f1f8;
  --surface: #ffffff;
  --accent: #c4471a;        /* button fill: white text 4.9:1 */
  --accent-hover: #a63b14;
  --accent-ink: #a93a12;    /* orange used as text on paper: 5.9:1 */
  --orange: #f26a2e;        /* decorative only: rules, dots, the boundary tab */
  --glass: #dbe8f1;
  --shadow: 0 24px 64px rgb(12 31 51 / 0.09);
  --radius: 18px;
  --max: 1320px;
  --font: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #0d1b29;
  --paper-2: #11263a;
  --ink: #f4f6f8;
  --muted: #b4c6d6;
  --faint: #8fa6ba;
  --line: #2f4a60;
  --ice: #13293c;
  --surface: #16293b;
  --accent: #b8471e;
  --accent-hover: #d2562a;
  --accent-ink: #ffa273;
  --orange: #f58a54;
  --glass: #1d3b52;
  --shadow: 0 24px 64px rgb(0 0 0 / 0.35);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1b29; --paper-2: #11263a; --ink: #f4f6f8; --muted: #b4c6d6; --faint: #8fa6ba;
    --line: #2f4a60; --ice: #13293c; --surface: #16293b; --accent: #b8471e; --accent-hover: #d2562a;
    --accent-ink: #ffa273; --orange: #f58a54; --glass: #1d3b52; --shadow: 0 24px 64px rgb(0 0 0 / 0.35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a, button { touch-action: manipulation; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; }
svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; border-radius: 4px; }
::selection { background: #ffc9ab; color: #0c1f33; }
.wrap { width: min(var(--max), calc(100% - 96px)); margin-inline: auto; }
.skip { position: absolute; top: -80px; left: 24px; z-index: 20; background: var(--ink); color: var(--paper); padding: 14px 18px; border-radius: 6px; }
.skip:focus { top: 12px; }

/* ---- header ---- */
.site-header { display: flex; align-items: center; gap: 28px; min-height: 104px; }
.brand { display: inline-flex; align-items: center; gap: 16px; font-size: 17px; font-weight: 700; letter-spacing: 0.16em; white-space: nowrap; min-height: 44px; }
.boundary-mark { width: 31px; height: 31px; border: 3px solid currentColor; position: relative; flex: none; }
.boundary-mark::after { content: ""; position: absolute; right: -4px; top: 5px; width: 5px; height: 14px; background: var(--paper); }
.site-nav { display: flex; gap: 32px; font-size: 15px; margin-right: auto; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; border-bottom: 2px solid transparent; }
.site-nav a:hover { text-decoration: underline; text-underline-offset: 7px; }
.site-nav a[aria-current="page"] { border-bottom-color: var(--orange); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.theme { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: transparent; }
.theme:hover { background: var(--ice); }
.theme svg { width: 22px; height: 22px; }

/* ---- buttons and links ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 12px 22px;
  border-radius: 5px; font-weight: 600; font-size: 15px; border: 1px solid transparent; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { border-color: var(--ink); background: transparent; font-weight: 500; }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.link-arrow { display: inline-flex; align-items: center; gap: 14px; min-height: 48px; font-size: 15px; }
.link-arrow:hover span:first-child { text-decoration: underline; text-underline-offset: 6px; }
.link-arrow .arrow { font-size: 22px; line-height: 1; transition: transform 0.2s ease; }
.link-arrow:hover .arrow { transform: translateX(4px); }

/* ---- hero ---- */
.hero { position: relative; overflow: hidden; padding: 40px 0 72px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
@media (min-width: 1200px) { .hero-grid > div:first-child { padding-left: clamp(0px, 4.2vw, 72px); } }
.eyebrow { margin: 0 0 26px; font-size: 12px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
h1.display { margin: 0 0 30px; font-size: clamp(54px, 6.4vw, 100px); line-height: 0.98; letter-spacing: -0.045em; font-weight: 800; }
h1.display span { display: block; }
.lead { margin: 0 0 20px; max-width: 600px; font-size: clamp(19px, 1.6vw, 23px); line-height: 1.5; color: var(--muted); }
.support { margin: 0; max-width: 560px; font-size: 18px; line-height: 1.6; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 36px; }
.hero-status { margin: 22px 0 0; max-width: 560px; font-size: 14px; line-height: 1.55; color: var(--muted); padding-left: 14px; border-left: 3px solid var(--orange); }

/* the boundary-frame illustration */
.visual { position: relative; isolation: isolate; padding: 24px 24px 0; }
.skyline { position: absolute; inset: -140px -240px -60px -90px; z-index: -2; opacity: 0.9; pointer-events: none;
  background:
    radial-gradient(ellipse at 72% 18%, rgb(242 170 130 / 0.22), transparent 52%),
    linear-gradient(112deg, transparent 12%, rgb(180 204 224 / 0.35) 36%, transparent 66%);
  mask-image: radial-gradient(ellipse 58% 62% at 60% 48%, #000 30%, rgb(0 0 0 / 0.5) 55%, transparent 100%); }
.skyline svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.frame { position: relative; padding: 28px; border: 1px solid #b4c8d8; border-radius: var(--radius);
  background: linear-gradient(140deg, rgb(255 255 255 / 0.55), rgb(219 232 241 / 0.4));
  box-shadow: inset 0 0 0 3px rgb(255 255 255 / 0.65), var(--shadow); backdrop-filter: blur(2px); }
:root[data-theme="dark"] .frame { border-color: #36556c; background: linear-gradient(140deg, rgb(49 81 106 / 0.4), rgb(21 44 64 / 0.4));
  box-shadow: inset 0 0 0 3px rgb(255 255 255 / 0.04), var(--shadow); }
.frame::after { content: ""; position: absolute; right: -3px; top: 96px; width: 5px; height: 92px; border-radius: 5px; background: var(--orange); }
.order { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 30px; box-shadow: 0 8px 32px rgb(12 31 51 / 0.07); }
.order-top { display: flex; align-items: center; justify-content: space-between; }
.tag-sim { font-size: 10.5px; font-weight: 700; letter-spacing: 0.18em; color: #345774; text-transform: uppercase; }
:root[data-theme="dark"] .tag-sim { color: #b8d5ee; }
.dots { letter-spacing: 3px; color: var(--faint); }
.order-label { margin: 28px 0 4px; font-size: 14px; color: var(--muted); }
.amount { margin: 0; font-size: 36px; line-height: 1.15; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.order-context { margin: 8px 0 22px; font-size: 14px; }
.capacity { padding-top: 20px; border-top: 1px solid var(--line); }
.capacity-label { margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.capacity-row { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; font-size: 12px; color: var(--muted); }
.bar { height: 12px; border-radius: 4px; background: #e3ecf3; overflow: hidden; }
:root[data-theme="dark"] .bar { background: #2b475d; }
.bar span { display: block; width: 25%; height: 100%; background: var(--orange); }
.usage { margin: 8px 0 22px; font-size: 12px; color: var(--muted); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.steps li { position: relative; padding-left: 28px; font-size: 13.5px; }
.steps li::before { content: ""; position: absolute; left: 0; top: 4px; width: 11px; height: 11px; border-radius: 50%; background: var(--orange); z-index: 1; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 5px; top: 14px; width: 1px; height: calc(100% + 12px); background: var(--orange); }
.steps strong { display: block; font-weight: 600; }
.steps small { display: block; margin-top: 3px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.visual-caption { margin: 22px -16px 0; text-align: center; font-size: 13px; line-height: 1.6; color: var(--muted); }

/* ---- three-stage band ---- */
.band { background: var(--ice); padding: 38px 0; }
.band-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.stage { display: flex; gap: 20px; padding: 0 32px; border-right: 1px solid var(--line); }
.stage:first-child { padding-left: 0; }
.stage:last-child { padding-right: 0; border-right: 0; }
.stage .number { font-size: 44px; font-weight: 250; letter-spacing: -0.04em; color: #587790; line-height: 1; }
:root[data-theme="dark"] .stage .number { color: #9db9ce; }
.stage h2 { margin: 2px 0 8px; font-size: 19px; letter-spacing: -0.01em; }
.stage p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); }

/* ---- illustrated outcomes (tabs) ---- */
.examples { padding: 68px 0 56px; text-align: center; }
h2.section { margin: 0 0 14px; font-size: clamp(30px, 3vw, 40px); line-height: 1.1; letter-spacing: -0.035em; }
.section-note { max-width: 620px; margin: 0 auto 26px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.tabs { display: flex; justify-content: center; gap: 36px; width: fit-content; max-width: 100%; margin: auto; border-bottom: 1px solid var(--line); }
.tab { min-height: 48px; padding: 14px 2px; background: transparent; color: var(--muted); border-bottom: 3px solid transparent; font-size: 15px; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--accent-ink); border-bottom-color: var(--orange); font-weight: 600; }
.panel { max-width: 800px; margin: 28px auto 0; padding: 26px; display: grid; grid-template-columns: 1fr 1.5fr; gap: 28px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.panel h3 { margin: 0 0 8px; font-size: 18px; }
.panel p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); }
.panel .tag-sim { display: block; margin-bottom: 10px; }
.disclaimer { margin: 24px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted); }

/* ---- documentation / status ---- */
.docs { border-top: 1px solid var(--line); padding: 44px 0 48px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; }
.docs h2 { margin: 0 0 12px; font-size: 24px; letter-spacing: -0.025em; line-height: 1.2; }
.docs p { margin: 0 0 14px; font-size: 15px; line-height: 1.65; color: var(--muted); max-width: 640px; }
.status-block { border-left: 3px solid var(--orange); padding: 2px 0 2px 22px; }
.status-block h3 { margin: 0 0 8px; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.status-block p { color: var(--ink); font-size: 15px; }
.doc-links { display: flex; flex-wrap: wrap; gap: 6px 28px; margin-top: 20px; }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--line); padding: 22px 0 28px; font-size: 13px; color: var(--muted); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer-row a { text-decoration: underline; text-underline-offset: 3px; }

/* ---- inner pages (architecture, demonstration) ---- */
.page-hero { padding: 36px 0 28px; }
.page-hero h1 { margin: 0 0 18px; font-size: clamp(38px, 4.6vw, 64px); line-height: 1.04; letter-spacing: -0.04em; font-weight: 800; max-width: 900px; }
.page-hero .lead { max-width: 720px; }
.prose { max-width: 760px; }
.prose h2 { margin: 52px 0 12px; font-size: 28px; letter-spacing: -0.03em; line-height: 1.15; }
.prose h3 { margin: 28px 0 8px; font-size: 18px; }
.prose p, .prose li { font-size: 17px; line-height: 1.65; color: var(--muted); }
.prose p { margin: 0 0 16px; }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose code, code { font-family: var(--mono); font-size: 0.88em; background: var(--paper-2); padding: 1px 6px; border-radius: 4px; color: var(--ink); }
.notice { margin: 28px 0; padding: 18px 22px; border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: 8px; background: var(--surface); font-size: 15px; color: var(--muted); }
.notice strong { color: var(--ink); }
.cmd { margin: 14px 0 22px; padding: 18px 22px; background: #0d1b29; color: #e8eef4; border-radius: 10px; font: 14px/1.7 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.cmd .c { color: #8fa6ba; }
.states { width: 100%; border-collapse: collapse; margin: 14px 0 24px; font-size: 15px; }
.states th, .states td { text-align: left; vertical-align: top; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); }
.states th { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.states td:first-child { white-space: nowrap; font-weight: 600; font-family: var(--mono); font-size: 13px; color: var(--ink); padding-right: 28px; }
.states td { color: var(--muted); }
.diagram { margin: 28px 0 8px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.diagram svg { width: 100%; height: auto; }
.diagram text { font-family: var(--font); fill: var(--ink); }
.diagram .sub { fill: var(--muted); }
.flow { display: none; margin: 18px 0 0; padding-left: 22px; }
.flow li { margin-bottom: 10px; font-size: 16px; line-height: 1.55; color: var(--muted); }
.diagram-note { font-size: 13px; color: var(--muted); margin: 10px 0 0; }

/* ---- responsive ---- */
@media (min-width: 1700px) { .hero { padding-top: 72px; padding-bottom: 96px; } }
@media (max-width: 1100px) {
  .wrap { width: calc(100% - 56px); }
  .site-nav { gap: 20px; }
  .header-actions .btn { display: none; }
  .hero-grid { gap: 28px; }
  .visual { padding: 18px 4px 0; }
  .frame { padding: 18px; }
  .order { padding: 24px; }
  .stage { padding: 0 18px; gap: 14px; }
  .docs { gap: 36px; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 40px); }
  .site-header { flex-wrap: wrap; min-height: 0; padding: 14px 0 6px; gap: 6px 14px; }
  .brand { font-size: 14px; letter-spacing: 0.12em; gap: 12px; }
  .boundary-mark { width: 26px; height: 26px; }
  .header-actions { margin-left: auto; }
  .site-nav { order: 3; width: 100%; gap: 22px; font-size: 14px; margin: 0; overflow-x: auto; }
  .hero { padding: 28px 0 44px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  h1.display { font-size: clamp(46px, 13vw, 68px); letter-spacing: -0.04em; margin-bottom: 22px; }
  .eyebrow { font-size: 10.5px; letter-spacing: 0.16em; margin-bottom: 20px; }
  .lead { font-size: 19px; }
  .support { font-size: 16px; }
  .hero-actions { margin-top: 26px; gap: 6px 22px; }
  .visual { max-width: 500px; width: 100%; margin: auto; padding: 0 6px; }
  .visual-caption { margin: 18px 0 0; font-size: 12px; }
  .band { padding: 28px 0; }
  .band-grid { grid-template-columns: 1fr; gap: 24px; }
  .stage, .stage:first-child, .stage:last-child { padding: 0; border: 0; gap: 20px; }
  .stage .number { font-size: 36px; min-width: 44px; }
  .examples { padding: 44px 0 36px; }
  .tabs { width: 100%; gap: 14px; justify-content: space-between; }
  .tab { font-size: 13px; text-align: left; }
  .panel { grid-template-columns: 1fr; gap: 16px; padding: 22px; }
  .docs { grid-template-columns: 1fr; padding: 32px 0 36px; }
  .states td:first-child { white-space: normal; }
  .diagram { display: none; }
  .flow { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .link-arrow .arrow { transition: none; }
}
@media print {
  .site-header .theme, .skip { display: none; }
  body { background: #fff; color: #000; }
}
