/* ibm plex sans 100/400/500 + ibm plex mono 400 — self-hosted latin subsets, sil ofl 1.1 (fonts/OFL.txt) */
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/ibm-plex-sans-latin-100.woff2') format('woff2');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/ibm-plex-sans-latin-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/ibm-plex-sans-latin-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('fonts/ibm-plex-mono-latin-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #fcfaf5; --panel: #f2efe9; --ink: #12163a; --muted: #706c61;
  --line: #e3ded3; --accent: #2032d6; --accent-soft: rgba(32,50,214,.07); --error: #b3261e;
  --mono: 'IBM Plex Mono', ui-monospace, monospace; --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --space-xs: 8px; --space-sm: 12px; --space-md: 24px; --space-lg: 32px; --space-xl: 48px;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--paper); scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
body, input, button, select { text-transform: lowercase; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
::selection { background: var(--accent); color: var(--paper); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
h1,h2,h3 { font-weight: 500; text-wrap: balance; }
h1 { margin: 0; font-size: 36px; line-height: 1.2; letter-spacing: -.025em; }
h2 { font-size: 22px; line-height: 1.3; margin: 0 0 16px; }
h3 { font-size: 17px; margin: 0 0 8px; }
p { max-width: 70ch; margin: 0 0 16px; text-wrap: pretty; }
.secondary,.field-note,.form-note,.state-note { color: var(--muted); }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 3; background: var(--paper); padding: 12px; }
.skip-link:focus { top: 8px; }
.app-layout { display: grid; grid-template-columns: 192px minmax(0, 1fr); gap: 64px; max-width: 1200px; margin: 0 auto; padding: 40px 32px 0; }
.sidebar { position: sticky; top: 40px; align-self: start; display: flex; flex-direction: column; min-height: calc(100vh - 80px); }
.brand-word { font-size: 38px; font-weight: 500; line-height: 1; letter-spacing: -.035em; color: transparent; -webkit-text-stroke: 1px var(--accent); }
.brand-word:hover { text-decoration: none; }
.brand-caption { margin: 14px 0 36px; font-size: 14px; color: var(--muted); }
.main-nav { display: flex; flex-direction: column; gap: 8px; }
.main-nav a { padding: 12px; margin-left: -12px; color: var(--ink); line-height: 1.35; min-height: 44px; transition: background-color 160ms ease; }
.main-nav a span { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.main-nav a:hover { background: var(--panel); text-decoration: none; }
.main-nav a[aria-current=page] { color: var(--accent); background: var(--accent-soft); }
.sidebar-foot { margin-top: auto; padding-top: 48px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }
.sidebar-foot a { min-height: 44px; display: inline-flex; align-items: center; }
.workspace { min-width: 0; }
.workspace-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 20px; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.state-note { font-size: 13px; margin: 0; max-width: 60ch; }
.page-heading { margin-bottom: 32px; }
.page-heading p { margin: 12px 0; color: var(--muted); }
.inline-link { font-size: 14px; display: inline-flex; min-height: 32px; align-items: center; }
button,.action,input,select { font: inherit; }
input { text-transform: none; }
button,.action { cursor: pointer; min-height: 44px; padding: 10px 16px; border: 1px solid var(--line); background: transparent; color: var(--accent); transition: background-color 160ms ease; }
button:hover { background: var(--accent-soft); }
button:active { background: var(--panel); }
button:disabled { opacity: .6; cursor: not-allowed; }
.action { display: inline-flex; align-items: center; justify-content: center; color: var(--paper); background: var(--accent); border-color: var(--accent); }
.action:hover { color: var(--paper); background: var(--ink); border-color: var(--ink); text-decoration: none; }
.text-button { padding: 0; min-height: 32px; display: inline; border: 0; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { background: transparent; }
.disclosure { border-top: 1px solid var(--line); margin: 0; }
.disclosure > summary { position: relative; list-style: none; padding: 20px 32px 20px 0; min-height: 64px; cursor: pointer; font-weight: 500; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary::after { content: '+'; position: absolute; right: 4px; top: 18px; font-size: 24px; font-weight: 400; color: var(--muted); transition: transform 160ms ease; }
.disclosure[open] > summary::after { transform: rotate(45deg); }
.disclosure-body { padding: 4px 0 28px; }
.action-disclosure > summary { display: flex; align-items: center; gap: 24px; }
.action-name { min-width: 88px; color: var(--accent); font-size: 26px; font-weight: 400; line-height: 1.2; }
.action-description,.summary-note { color: var(--muted); font-size: 14px; font-weight: 400; }
.summary-note { margin-left: 12px; }
.action-form { max-width: 540px; }
.action-form > label,.bind-form > label { display: flex; align-items: baseline; gap: 12px; font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.action-form > label span { font-size: 12px; font-weight: 400; color: var(--muted); }
.action-form > input,.bind-line input { width: 100%; background: transparent; border: 1px solid var(--line); border-radius: 0; min-height: 48px; padding: 12px; color: var(--ink); margin-bottom: 20px; }
input::placeholder { color: var(--muted); opacity: 1; }
.action-form > input[aria-invalid=true] { border-color: var(--error); }
.period-picker { border: 0; padding: 0; margin: 0 0 20px; }
.period-picker legend { font-size: 14px; font-weight: 500; padding: 0 0 8px; }
.period-options { display: flex; }
.period-options label { flex: 1; min-width: 0; cursor: pointer; }
.period-options input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.period-options label > span { border: 1px solid var(--line); display: block; padding: 12px; margin-right: -1px; line-height: 1.4; }
.period-options small { display: block; font-size: 12px; margin-top: 4px; color: var(--muted); }
.period-options input:checked + span { background: var(--accent-soft); border-color: var(--accent); position: relative; color: var(--accent); }
.period-options input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.form-note,.field-note { font-size: 13px; line-height: 1.6; }
.field-note { margin-top: -8px; }
.form-note { margin: 0 0 20px; }
.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.terminal-panel { margin-top: 16px; }
.terminal-panel > summary { font-size: 15px; }
.term { background: var(--panel); border: 1px solid var(--line); font: 13px/1.65 var(--mono); text-transform: none; min-width: 0; }
.term * { text-transform: none; }
.out { padding: 20px 20px 12px; min-height: 120px; max-height: 480px; overflow-y: auto; overflow-wrap: anywhere; }
.out div { white-space: pre-wrap; }
.out .k-cmd { margin-top: 12px; color: var(--ink); }
.out .k-cmd::before { content: '› '; color: var(--muted); }
.out .k-dim { color: var(--muted); }
.out .k-plan,.out .k-ok { color: var(--accent); }
.out .k-err { color: var(--error); }
.line { display: flex; align-items: center; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.prompt { color: var(--accent); }
.line input { min-width: 0; flex: 1; border: 0; background: transparent; color: var(--ink); padding: 8px 0; font: inherit; }
.line button { min-height: 36px; font-size: 12px; padding: 8px 12px; }
.transaction-answer { padding: 16px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--ink); }
.command-menu { margin: 0; border-top: 1px solid var(--line); }
.command-menu > summary { padding: 12px 16px; cursor: pointer; color: var(--muted); min-height: 44px; }
.taps button { display: flex; justify-content: space-between; text-align: left; width: 100%; border: 0; border-top: 1px solid var(--line); padding: 12px 16px; gap: 20px; font: inherit; color: var(--ink); }
.taps button span:last-child { color: var(--muted); font-family: var(--sans); font-size: 13px; }
.taps .yn { display: flex; }
.taps .yn button { width: 50%; justify-content: center; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.section-heading h2 { margin: 0; }
.rows { margin-bottom: 32px; }
.rows > p { font-size: 14px; }
.row { display: flex; justify-content: space-between; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.row span:first-child { color: var(--muted); }
.row span:last-child { text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.row .stale { color: var(--error); }
.read-output { margin-top: 16px; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.read-output p { white-space: pre-wrap; margin: 8px 0; }
.read-output .k-err { color: var(--error); }
.first-steps { margin: 0 0 32px; padding-left: 24px; }
.first-steps li { padding-left: 8px; margin-bottom: 24px; }
.first-steps p { font-size: 15px; }
.next-link { margin-top: 24px; font-size: 14px; color: var(--muted); }
code,pre { font: 13px/1.7 var(--mono); text-transform: none; }
#cli details { margin: 24px 0; }
#cli summary { min-height: 44px; cursor: pointer; padding: 10px 0; color: var(--accent); }
.code-row { display: flex; align-items: flex-start; gap: 12px; margin: 16px 0; }
.code-row pre,.examples { background: var(--panel); padding: 16px; margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.code-row pre { flex: 1; min-width: 0; }
.examples { margin: 20px 0; }
.digest { overflow-wrap: anywhere; text-transform: none; }
.bind-form { margin: 24px 0; }
.bind-line { display: flex; gap: 12px; }
.bind-line input { flex: 1; min-width: 0; font-family: var(--mono); margin: 0; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.panel-body { padding-bottom: 24px; }
.foot { margin-top: 40px; padding: 20px 0 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.foot p { margin: 0 0 8px; }
.foot a { display: inline-block; padding: 4px 0; }
.whitepaper-layout { max-width: 1200px; display: grid; grid-template-columns: 192px minmax(0,1fr); gap: 64px; margin: 0 auto; padding: 40px 32px 0; }
.whitepaper-content { max-width: 780px; min-width: 0; }
.whitepaper-content .page-heading { border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.whitepaper-content section { margin-bottom: 40px; scroll-margin-top: 24px; }
.whitepaper-content p,.whitepaper-content li { font-size: 16px; line-height: 1.8; }
.whitepaper-content ul,.whitepaper-content ol { padding-left: 24px; }
.whitepaper-content li { margin: 8px 0; }
.whitepaper-content .article-opening { font-size: 20px; }
.whitepaper-content table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 20px 0; }
.whitepaper-content th,.whitepaper-content td { text-align: left; vertical-align: top; padding: 12px 8px; border-bottom: 1px solid var(--line); }
.whitepaper-content th { font-weight: 500; }
.whitepaper-content dl { margin: 20px 0; }
.whitepaper-content dt { font-weight: 500; margin-top: 16px; }
.whitepaper-content dd { margin: 4px 0 16px; }
.whitepaper-content blockquote { margin: 24px 0; padding: 16px; background: var(--panel); }
.whitepaper-content blockquote p { margin: 0; }
.contract-list a { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; text-transform: none; }
.whitepaper-content .doc-meta { font-size: 13px; color: var(--muted); }
@media (max-width: 840px) {
  .app-layout,.whitepaper-layout { grid-template-columns: 160px minmax(0,1fr); gap: 32px; padding: 32px 24px 0; }
  .sidebar { top: 32px; }
  .summary-note { display: block; margin: 4px 0 0; font-size: 12px; }
  .action-disclosure > summary { gap: 12px; }
  .action-description { font-size: 13px; }
}
@media (max-width: 620px) {
  .app-layout,.whitepaper-layout { display: block; padding: 24px 20px 0; }
  .sidebar { position: static; min-height: auto; margin-bottom: 24px; }
  .brand-word { font-size: 32px; }
  .brand-caption { margin: 8px 0 20px; font-size: 13px; }
  .main-nav { flex-direction: row; flex-wrap: wrap; gap: 4px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
  .main-nav a { margin: 0; padding: 10px; font-size: 13px; min-height: 44px; }
  .main-nav a span { display: none; }
  .sidebar-foot { display: none; }
  .workspace-bar { margin-bottom: 24px; gap: 12px; align-items: flex-start; }
  .workspace-bar button { flex-shrink: 0; font-size: 13px; padding: 10px 12px; }
  h1 { font-size: 30px; }
  .page-heading { margin-bottom: 24px; }
  .page-heading p { font-size: 14px; }
  .action-name { font-size: 24px; min-width: 76px; }
  .action-description { max-width: 190px; line-height: 1.5; }
  .period-options label > span { padding: 12px 8px; font-size: 14px; }
  .period-options small { font-size: 11px; }
  .disclosure > summary { padding-top: 18px; padding-bottom: 18px; }
  .row { gap: 16px; font-size: 13px; }
  .row span:last-child { max-width: 44%; }
  .code-row,.bind-line { flex-wrap: wrap; }
  .code-row pre { flex-basis: 100%; }
  .bind-line input { flex-basis: 100%; }
  .transaction-answer { flex-wrap: wrap; }
  .taps button { flex-direction: column; gap: 4px; }
  .out { padding: 16px 12px; font-size: 12px; }
  .whitepaper-content p,.whitepaper-content li { font-size: 15px; }
  .whitepaper-content .article-opening { font-size: 18px; }
  .whitepaper-content table { font-size: 12px; }
  .whitepaper-content th,.whitepaper-content td { padding: 10px 6px; }
}
@media print { .sidebar,.workspace-bar,.foot { display: none; } .whitepaper-layout { display: block; padding: 0; } .whitepaper-content { max-width: none; } .whitepaper-content section { break-inside: avoid; } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior: auto !important; transition: none !important; } }
