/* site.css */
@font-face {
  font-family: Inter;
  src: url("inter.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("plex-mono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #111017;
  --surface: #181720;
  --surface-high: #211e2c;
  --text: #f8f7fc;
  --muted: #c9c4d4;
  --accent: #d4baff;
  --line: #8f78be;
  --border: #635676;
  --ink: #151321;
  --light: #f9f8fe;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse at 67% 5%, #22193252 0%, transparent 33rem),
    repeating-linear-gradient(119deg, transparent 0 43px, #b394f404 52px, transparent 69px 125px),
    var(--background);
  color: var(--text);
  font: 400 1rem/1.52 Inter, system-ui, sans-serif;
}

button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, a, input, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #bd9aff; outline-offset: 4px; }
[hidden] { display: none !important; }

h1, h2, h3, p, ol, ul, dl, dd, pre { margin: 0; }
h1, h2, h3 { font-weight: 750; line-height: 1.03; letter-spacing: -.045em; }
h2 { font-size: clamp(1.9rem, 3.3vw, 3.05rem); }
h3 { font-size: 1.12rem; letter-spacing: -.025em; }
p { text-wrap: pretty; }

.wrap { width: min(100% - var(--gutter) * 2, 1220px); margin-inline: auto; }
.section-line { border-top: 1px solid var(--line); }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  display: inline-block;
  inline-size: 1.25rem;
  block-size: 1.25rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.skip-link { position: fixed; z-index: 10; left: 1rem; top: 1rem; transform: translateY(-200%); background: #e5d7ff; color: var(--ink); padding: .6rem 1rem; border-radius: .4rem; }
.skip-link:focus { transform: none; }

.topbar {
  min-height: 4.8rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  position: relative;
  border-bottom: 1px solid var(--line);
  z-index: 2;
}
.brand { display: inline-flex; width: fit-content; align-items: center; gap: .65rem; white-space: nowrap; font-size: 1.55rem; line-height: 1; font-weight: 700; letter-spacing: -.05em; }
.brand img { width: 2.05rem; height: auto; }
.main-nav { display: flex; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.main-nav a { padding-block: .65rem; }
.main-nav a:hover, .footer nav a:hover, .footer nav button:hover { color: var(--accent); }

.button {
  border: 1px solid #c1a3ff;
  border-radius: .48rem;
  color: #110b1c;
  background:
    repeating-linear-gradient(95deg, transparent 0 18px, #fff1 23px, transparent 33px),
    linear-gradient(102deg, #a080fa, #ba9bff 51%, #a180f2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-height: 2.75rem;
  padding: .53rem 1rem;
  font-weight: 680;
  line-height: 1.15;
  box-shadow: inset 0 1px 0 #fff3, 0 3px 10px #08061129;
  transition: filter .18s, transform .18s, box-shadow .18s;
}
.button:hover { filter: brightness(1.14); box-shadow: 0 0 1rem #c193ff38; }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: .65; cursor: progress; }
.button-top { justify-self: end; min-width: 9.1rem; font-size: .92rem; }
.nav-toggle { display: none; }

.hero { position: relative; overflow: clip; isolation: isolate; }
.hero-grid {
  position: absolute;
  inset: auto -35% -1rem;
  z-index: -1;
  height: 10rem;
  background-image: linear-gradient(#a075eea8 1px, transparent 1px), linear-gradient(90deg, #a075eea8 1px, transparent 1px);
  background-size: 100% 2.7rem, 4.5rem 100%;
  transform: perspective(12rem) rotateX(44deg);
  transform-origin: center bottom;
  mask-image: linear-gradient(transparent, #000 73%);
  opacity: .82;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, .99fr) minmax(0, 2.07fr);
  align-items: center;
  gap: clamp(1.25rem, 3.1vw, 2.7rem);
  padding-block: clamp(3rem, 5.8vw, 5.35rem) clamp(3rem, 5.4vw, 4.85rem);
}
.eyebrow { color: var(--accent); font: 400 clamp(.78rem, 1.4vw, 1rem)/1.3 var(--mono); margin-bottom: 1.25rem; }
h1 { font-size: clamp(2.6rem, 4.2vw, 4.2rem); line-height: .99; letter-spacing: -.066em; }
.hero-description { margin-top: 1.15rem; color: var(--muted); }
.button-hero { margin-top: 1.55rem; padding-inline: 1.35rem; min-height: 3rem; }

.workbench {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, .28fr) minmax(0, .72fr);
  grid-template-rows: minmax(0, 1fr) auto;
  border: 1px solid #9d86c5;
  border-radius: .8rem;
  overflow: hidden;
  background: #16151dee;
  box-shadow: 0 20px 48px #08050b55, inset 0 1px 0 #fff1;
}
.file-tree { padding: .85rem .55rem; border-right: 1px solid #454051; color: #e4deec; font-family: var(--mono); font-size: clamp(.65rem, 1vw, .84rem); }
.file-tree > div { min-width: 0; min-height: 2rem; padding-inline: .42rem; display: flex; align-items: center; gap: .45rem; border-radius: .25rem; white-space: nowrap; }
.file-tree .icon { inline-size: .96rem; block-size: .96rem; }
.tree-folder { gap: .25rem !important; }
.tree-expander { inline-size: .65rem !important; }
.file-tree .tree-file { padding-inline-start: 1.66rem; }
.tree-file.is-current { background: linear-gradient(110deg, #6952aa, #4f3e82); color: #fff; }
.editor { min-width: 0; }
.editor-tabs { display: flex; align-items: end; gap: .16rem; min-width: 0; min-height: 3.2rem; padding: .55rem .6rem 0; border-bottom: 1px solid #454051; overflow-x: auto; }
.editor-tab { padding: .55rem .7rem .6rem; border: 0; border-radius: .4rem .4rem 0 0; background: transparent; color: #c0b5cf; white-space: nowrap; font: 400 clamp(.66rem, 1.12vw, .87rem)/1.15 var(--mono); }
.editor-tab[aria-selected="true"] { color: #fff; background: linear-gradient(100deg, #665194, #48375f); box-shadow: inset 0 1px 0 #fff2; }
.editor-tab:hover { color: #fff; }
.editor-tab:focus-visible { outline-offset: -3px; }
.editor-body { min-height: 15rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(6.3rem, .49fr); }
.code-example { padding: .95rem .75rem .9rem 1rem; min-width: 0; overflow-x: auto; }
.code-lines { counter-reset: code; list-style: none; padding: 0; font: 400 clamp(.7rem, 1.16vw, .92rem)/1.59 var(--mono); }
.code-lines li { display: flex; white-space: pre; min-height: 1.59em; min-width: max-content; }
.code-lines li::before { counter-increment: code; content: counter(code); color: #a49bae; text-align: right; font-size: .86em; margin-right: 1.05em; flex: 0 0 1.15em; }
.code-lines code { font: inherit; }
.syntax-keyword { color: #f395e8; }
.syntax-call { color: #ffe3a5; }
.syntax-string { color: #ffa7a2; }
.syntax-number { color: #b9e8ac; }
.receipt {
  container-type: inline-size;
  min-width: 0;
  margin: .7rem .7rem .7rem 0;
  padding: clamp(.62rem, 1.05vw, .95rem);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "mark tag" "amount amount" "state state";
  align-items: center;
  align-content: space-between;
  gap: .65rem .35rem;
  border: 1px solid #775ca2;
  border-radius: .65rem;
  background:
    repeating-radial-gradient(circle at 108% -8%, transparent 0 18px, #dbc3ff14 18px 19px, transparent 19px 32px),
    radial-gradient(ellipse at 100% 0%, #694597a8, transparent 78%),
    linear-gradient(150deg, #2d2044, #21192f 72%);
  box-shadow: inset 0 1px 0 #e2c9ff26, 0 6px 18px #09051138;
  color: #fbf6ff;
}
.receipt-mark {
  grid-area: mark;
  inline-size: 2.1rem;
  block-size: 2.1rem;
  display: grid;
  place-items: center;
  border: 1px solid #cdb5fa9e;
  border-radius: .64rem;
  background: linear-gradient(135deg, #f0e3ff, #be9bed);
  color: #342050;
  box-shadow: 0 0 1.15rem #b48bf254;
}
.receipt-mark .icon { inline-size: 1.29rem; block-size: 1.29rem; stroke-width: 2.35; }
.receipt-tag {
  grid-area: tag;
  justify-self: end;
  padding: .17rem .36rem;
  border: 1px solid #bda2e65c;
  border-radius: .3rem;
  background: #332447a1;
  color: #efe0ff;
  font: 400 .64rem/1.25 var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
}
.receipt-amount {
  grid-area: amount;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .2rem .38rem;
  color: #f2e4ff;
  font-weight: 760;
  font-size: clamp(1.28rem, 23cqw, 2.55rem);
  line-height: .97;
  letter-spacing: -.068em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.receipt-currency { color: #d1b8ea; font: 400 .65rem/1 var(--mono); letter-spacing: .04em; }
.receipt-state {
  grid-area: state;
  width: 100%;
  border-top: 1px solid #9a77c166;
  padding-top: .6rem;
  color: #f2e7fb;
  font-size: clamp(.71rem, 1vw, .86rem);
  font-weight: 630;
  line-height: 1.28;
  letter-spacing: -.022em;
}
.editor-status { grid-column: 1/-1; min-width: 0; display: flex; align-items: center; padding: .6rem .9rem; color: #dcd3e7; border-top: 1px solid #454051; font: 400 clamp(.61rem, 1.1vw, .8rem)/1.2 var(--mono); }
.editor-status span { display: inline-flex; align-items: center; gap: .5rem; padding-inline: .85rem; border-left: 1px solid #5b5069; white-space: nowrap; }
.editor-status span:first-child { padding-left: 0; border-left: 0; }
.editor-status i { inline-size: .65rem; block-size: .65rem; border-radius: 50%; background: #a47df6; }

.stages { padding: 2rem 0 2.25rem; }
.stage-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; padding: 0; margin-top: 1.45rem; }
.stage-grid li { position: relative; padding-inline: clamp(.8rem, 2.25vw, 1.75rem); border-left: 1px solid #51435f; }
.stage-grid li:first-child { border: 0; padding-left: .4rem; }
.stage-grid li:last-child { padding-right: 0; }
.stage-heading { display: flex; gap: .7rem; align-items: center; }
.stage-heading .icon { color: var(--accent); inline-size: 2rem; block-size: 2rem; }
.stage-grid p { margin-top: .45rem; color: var(--muted); font-size: .94rem; max-width: 15rem; }
.stage-grid li:not(:last-child) p { padding-right: 1.2rem; }
.stage-arrow { position: absolute; right: .6rem; top: 45%; color: var(--accent); inline-size: 1.1rem; block-size: 1.1rem; }

.light-panel { color-scheme: light; background: linear-gradient(110deg, #fff, #f6f4fb 92%); color: var(--ink); border: 1px solid #fff; border-radius: .85rem; box-shadow: 0 3px 18px #0806112e; }
.policy-panel { display: grid; grid-template-columns: minmax(0, .87fr) minmax(0, 1fr) minmax(0, .82fr); gap: clamp(.85rem, 2.25vw, 2rem); padding: clamp(1.05rem, 2.7vw, 2.05rem); margin-bottom: 1.55rem; align-items: stretch; }
.policy-copy { padding: .35rem 1rem .4rem 0; border-right: 1px solid #cdc5df; }
.policy-copy h2 { font-size: clamp(1.85rem, 3.15vw, 2.8rem); }
.policy-copy p { margin-top: .8rem; max-width: 17.5rem; color: #333043; }
.policy-json { min-width: 0; border: 1px solid #c6bfdd; border-radius: .55rem; background: #f8f7fc; padding: .7rem .55rem; overflow-x: auto; }
.policy-json .code-lines { font-size: clamp(.72rem, 1.27vw, .96rem); line-height: 1.46; }
.policy-json li::before { color: #635c77; }
.json-key { color: #a62b4a; }
.json-number { color: #1c6847; }
.json-bool { color: #6541bb; }
.policy-summary { padding: .95rem; border-radius: .6rem; background: linear-gradient(135deg, #e8ddfd, #e0d5f8); }
.policy-summary h3, .settlement-card h3 { font-size: clamp(1.18rem, 1.9vw, 1.55rem); font-weight: 800; }
.policy-summary h3 { padding-bottom: .55rem; border-bottom: 1px solid #bcb0d7; }
.policy-summary ul { margin-top: .55rem; padding: 0; list-style: none; display: grid; gap: .5rem; }
.policy-summary li { display: flex; align-items: start; gap: .55rem; font-size: .91rem; }
.policy-summary .icon { stroke-width: 2; }

.split-section { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.68fr); gap: clamp(1.15rem, 3.2vw, 3rem); align-items: start; padding-block: 1.85rem; }
.section-copy { padding-top: .22rem; }
.section-copy h2 { font-size: clamp(1.9rem, 3.1vw, 2.75rem); }
.settlement, .exceptions { grid-template-columns: minmax(0, .93fr) minmax(0, 1.57fr); }
.section-copy p { margin-top: .8rem; max-width: 26ch; color: var(--muted); }
.task-card, .control-card, .resource-card, .exception-table, .log-window { background: linear-gradient(120deg, #1d1b26, #16151e); border: 1px solid var(--border); border-radius: .72rem; }
.task-card { min-width: 0; padding: .9rem 1.05rem; }
.task-header { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: .85rem; padding-bottom: .9rem; }
.task-icon { inline-size: 2.75rem; block-size: 2.75rem; display: grid; place-items: center; color: var(--accent); background: #30283d; border-radius: .45rem; }
.task-icon .icon { inline-size: 1.45rem; block-size: 1.45rem; }
.task-copy p { margin-top: .23rem; color: var(--muted); font-size: .85rem; }
.run-button { min-width: 7.5rem; font-size: .88rem; }
.run-button .icon { inline-size: 1rem; block-size: 1rem; }
.expense-table { width: 100%; font-size: .9rem; border-spacing: 0; }
.expense-table :is(th, td) { padding: .59rem .6rem; text-align: left; }
.expense-table thead th { color: #ddd6e8; font-size: .8rem; font-weight: 500; border-top: 1px solid #625671; }
.expense-table :is(th, td):last-child { text-align: right; white-space: nowrap; }
.expense-table tbody th { font-weight: 600; text-align: left; }
.expense-table tbody th span { display: inline-flex; align-items: center; gap: .65rem; }
.expense-table tbody :is(td, th) { border-top: 1px solid #413a4c; }
.expense-table tbody td { color: #d5cfe0; }
.expense-table tbody td:last-child { font-family: var(--mono); color: var(--text); }
.expense-table .icon { color: var(--accent); }
.expense-table tfoot :is(th, td) { background: #353047; border-block: 1px solid #584d6d; font-weight: 700; }
.expense-table tfoot th { border-left: 1px solid #584d6d; border-radius: .35rem 0 0 .35rem; }
.expense-table tfoot td { border-right: 1px solid #584d6d; border-radius: 0 .35rem .35rem 0; font-size: 1rem; }
.task-message { padding: .65rem .15rem .1rem; font-size: .89rem; color: #d2befa; }
.task-message[data-tone="hold"] { color: #ffdbad; }

.controls { padding-block: 1.75rem; }
.controls-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, .88fr) minmax(0, 1.19fr) minmax(0, .8fr); gap: .85rem; margin-top: 1rem; align-items: start; }
.controls-grid > p { color: var(--muted); max-width: 25ch; padding-right: .3rem; }
.control-card { min-width: 0; padding: .85rem; min-height: 6rem; }
.control-card > label, .control-label { display: block; font-size: .9rem; line-height: 1.2; font-weight: 650; margin-bottom: .66rem; }
.currency-input, .allowlist summary { display: flex; align-items: center; gap: .45rem; min-width: 0; min-height: 2.5rem; padding: .2rem .62rem; border: 1px solid #887b9b; border-radius: .4rem; color: var(--text); background: #2a2634; }
.currency-input:focus-within { outline: 2px solid #b590f2; outline-offset: 2px; }
.currency-input input { width: 100%; min-height: 2rem; color: inherit; padding: 0; outline: 0; border: 0; background: transparent; appearance: textfield; }
.currency-input input::-webkit-inner-spin-button, .currency-input input::-webkit-outer-spin-button { appearance: none; }
.field-error { color: #ffc8b8; font-size: .82rem; margin-top: .45rem; }
.allowlist { position: relative; }
.allowlist summary { list-style: none; cursor: pointer; justify-content: space-between; font-size: .85rem; }
.allowlist summary::-webkit-details-marker, .faq summary::-webkit-details-marker { display: none; }
.allowlist summary .icon { inline-size: .9rem; block-size: .9rem; }
.allowlist[open] summary .icon { transform: rotate(180deg); }
.allowlist-options { position: absolute; z-index: 2; right: 0; left: 0; top: calc(100% + .35rem); padding: .4rem; border: 1px solid #887b9b; background: #211d2d; border-radius: .42rem; box-shadow: 0 .65rem 1.75rem #080611b3; }
.allowlist-options label { min-height: 2.45rem; display: flex; align-items: center; gap: .55rem; padding-inline: .35rem; cursor: pointer; border-radius: .25rem; font-size: .88rem; }
.allowlist-options label:hover { background: #342a47; }
.allowlist-options input { accent-color: #b498f7; inline-size: 1rem; block-size: 1rem; }
.switch-row { display: flex; align-items: center; gap: .65rem; min-height: 2.5rem; font-size: .88rem; }
.switch { display: flex; align-items: center; border: 1px solid #876ab2; border-radius: 2rem; background: #31253f; inline-size: 3.15rem; block-size: 1.6rem; padding: .14rem; transition: background .18s; }
.switch span { inline-size: 1.2rem; block-size: 1.2rem; border-radius: 50%; background: #fff; transition: transform .18s; }
.switch[aria-checked="true"] { background: #ad83f4; }
.switch[aria-checked="true"] span { transform: translateX(1.48rem); }

.settlement-card { padding: 1rem 1.3rem; }
.settlement-card h3 { padding-bottom: .7rem; border-bottom: 1px solid #d1c8e0; }
.settlement-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-block: .95rem; border-bottom: 1px solid #d1c8e0; }
.settlement-metrics div { display: flex; flex-direction: column-reverse; min-width: 0; padding-left: clamp(.6rem, 2vw, 1.35rem); border-left: 1px solid #c1b5d5; }
.settlement-metrics div:first-child { border: 0; padding-left: .2rem; }
.settlement-metrics dd { color: #623dd2; font-size: clamp(1.55rem, 3.4vw, 2.65rem); line-height: 1; font-weight: 790; letter-spacing: -.05em; }
.settlement-metrics dt { font-weight: 650; line-height: 1.2; margin-top: .2rem; }
.settlement-card > p { color: #60566e; margin-top: .65rem; font-size: .87rem; }
.exception-table { overflow: hidden; }
.exception-table div { display: grid; grid-template-columns: 1fr 1fr; }
.exception-table div + div { border-top: 1px solid #645673; }
.exception-table :is(dt,dd) { padding: .62rem 1rem; }
.exception-table dt { display: flex; align-items: center; gap: .7rem; font-weight: 650; }
.exception-table dt .icon { color: var(--accent); inline-size: 1.5rem; block-size: 1.5rem; }
.exception-table dd { border-left: 1px solid #645673; color: var(--muted); font-size: .92rem; }

.developer-band {
  color: #171022;
  background:
    repeating-linear-gradient(104deg, transparent 0 68px, #d9ccfc32 72px, transparent 103px),
    linear-gradient(90deg, #b696f4, #c6adff 44%, #b49af0);
}
.developer-heading { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 1.85rem; padding-block: 1.05rem; }
.developer-heading p { border-left: 1px solid #675483; padding: .35rem 0 .35rem 1.85rem; font-weight: 550; }
.resource-grid { gap: 1rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-block: 1.35rem; }
.resource-card { padding: 1rem; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: .85rem; min-height: 7rem; color: var(--text); text-align: left; transition: background .18s, border-color .18s; }
.resource-card:hover { background: #282035; border-color: #b69be0; }
.resource-card .icon { color: var(--accent); inline-size: 2rem; block-size: 2rem; }
.resource-card strong { display: block; font-size: 1.02rem; font-weight: 690; }
.resource-card small { display: block; margin-top: .35rem; color: var(--muted); font-size: .87rem; line-height: 1.4; }
.log-section { padding-block: 1.3rem 1.5rem; }
.log-window { margin-top: .9rem; padding: .7rem .8rem; max-height: 12.5rem; overflow: auto; scrollbar-color: #aa79ef #2b2338; }
.event-log { counter-reset: events; padding: 0; list-style: none; font: 400 .83rem/1.55 var(--mono); }
.event-log li { display: grid; grid-template-columns: 1.65rem 5.4rem minmax(10rem, .64fr) minmax(0, 1fr); gap: .65rem; padding: .15rem .3rem; color: #e6deee; }
.event-log li::before { content: counter(events, decimal-leading-zero); counter-increment: events; color: #a59bb7; }
.event-log time { color: var(--accent); }
.event-log strong { font-weight: 400; }
.event-log span { border-left: 1px solid #625671; padding-left: .75rem; color: #d6c9e6; overflow-wrap: anywhere; }

.faq { padding-block: 1.25rem 1.75rem; }
.faq h2 { margin-bottom: .8rem; }
.faq details { border: 1px solid #79698c; border-radius: .52rem; background: linear-gradient(100deg, #1d1a27, #17151e); }
.faq details + details { margin-top: .48rem; }
.faq summary { min-height: 2.9rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer; list-style: none; padding: .5rem .92rem; font-weight: 650; }
.faq summary:hover { color: var(--accent); }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq details p { color: var(--muted); padding: .05rem .92rem .85rem; max-width: 73ch; }
.footer { padding-block: 1.5rem 1.8rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.footer .brand { font-size: 1.28rem; }
.footer .brand img { width: 1.7rem; }
.footer nav { display: flex; gap: 1rem; align-items: center; }
.footer nav > * { padding: .15rem 0; border: 0; background: transparent; color: var(--muted); font-size: .88rem; }
.footer nav > * + * { padding-left: 1rem; border-left: 1px solid #7d6e91; }

.doc-dialog { background: #1e192b; color: var(--text); border: 1px solid #a38ac7; border-radius: .85rem; padding: 0; width: min(36rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); box-shadow: 0 24px 80px #08050dd9; }
.doc-dialog::backdrop { background: #0b0813bd; backdrop-filter: blur(4px); }
.dialog-inner { padding: clamp(1.1rem, 4vw, 1.85rem); }
.dialog-header { display: flex; align-items: start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.dialog-header h2 { font-size: clamp(1.65rem, 5vw, 2.4rem); }
.close-dialog { display: grid; place-items: center; border-radius: .4rem; border: 1px solid #756290; color: var(--text); background: #302542; inline-size: 2.75rem; block-size: 2.75rem; }
#dialog-content { color: var(--muted); }
#dialog-content > * + * { margin-top: .9rem; }
#dialog-content pre { font: 400 .82rem/1.55 var(--mono); color: #e9d8ff; background: #130f1d; border: 1px solid #625171; border-radius: .55rem; padding: .8rem; overflow: auto; }
#dialog-content code { font: inherit; }

@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: minmax(0, .9fr) minmax(0, 1.85fr); }
  .workbench { grid-template-columns: minmax(0, .26fr) minmax(0, .74fr); }
  .file-tree .tree-file { padding-inline-start: 1.2rem; }
  .editor-body { min-height: 13.9rem; }
  .stage-grid li { padding-inline: .95rem; }
  .stage-arrow { right: .35rem; }
}

@media (max-width: 850px) {
  .hero-inner { grid-template-columns: minmax(0, .8fr) minmax(0, 1.55fr); }
  .desktop-break { display: none; }
  .workbench { grid-template-columns: minmax(0, 1fr); }
  .file-tree { display: none; }
  .code-example { padding-inline: .7rem .45rem; }
  .policy-panel { grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); align-items: stretch; }
  .policy-summary { grid-column: 1/-1; }
  .policy-summary ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .controls-grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.35fr) minmax(0, .85fr); }
  .controls-grid > p { grid-column: 1/-1; max-width: none; }
  .section-copy h2, .developer-heading h2 { font-size: clamp(1.82rem, 4vw, 2.4rem); }
}

@media (max-width: 640px) {
  :root { --gutter: clamp(1rem, 4.6vw, 1.5rem); }
  .topbar { min-height: 4.2rem; grid-template-columns: 1fr auto auto; gap: .6rem; }
  .brand { font-size: 1.25rem; gap: .42rem; }
  .brand img { width: 1.65rem; }
  .button-top { font-size: .77rem; min-width: 0; min-height: 2.5rem; padding-inline: .72rem; }
  .nav-toggle { display: grid; place-items: center; inline-size: 2.5rem; block-size: 2.5rem; border: 1px solid var(--border); border-radius: .45rem; color: var(--text); background: #201a2a; }
  .main-nav { display: none; position: absolute; inset: calc(100% + .4rem) 0 auto; padding: .35rem; background: #201a2b; border: 1px solid #8e70b6; border-radius: .55rem; box-shadow: 0 8px 24px #08051196; }
  .main-nav.is-open { display: grid; gap: 0; }
  .main-nav a { padding: .62rem .75rem; border-radius: .25rem; }
  .main-nav a:hover { background: #37274b; }

  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 1.7rem; padding-block: 2.65rem 2.1rem; }
  h1 { font-size: clamp(2.65rem, 10.2vw, 4.15rem); max-width: 10ch; }
  .desktop-break { display: none; }
  .eyebrow { margin-bottom: .78rem; font-size: .78rem; }
  .hero-description { margin-top: .8rem; }
  .button-hero { margin-top: 1.1rem; }
  .hero-grid { bottom: -1.4rem; transform: perspective(11rem) rotateX(40deg); }
  .editor-tabs { min-height: 2.75rem; gap: .12rem; padding-top: .35rem; }
  .editor-tab { font-size: .76rem; padding-inline: .55rem; min-height: 2.3rem; }
  .editor-body { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .code-example { min-height: 11.15rem; padding: .7rem .65rem; }
  .code-lines { font-size: .8rem; }
  .receipt {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "mark state amount" "mark tag amount";
    gap: .27rem .64rem;
    margin: 0 .6rem .6rem;
    padding: .56rem .68rem;
    min-height: 3.55rem;
  }
  .receipt-mark { inline-size: 1.97rem; block-size: 1.97rem; border-radius: .56rem; }
  .receipt-mark .icon { inline-size: 1.13rem; block-size: 1.13rem; }
  .receipt-state { padding: 0; border: 0; font-size: .81rem; align-self: end; }
  .receipt-tag { justify-self: start; align-self: start; font-size: .58rem; padding: .08rem .26rem; }
  .receipt-amount { justify-content: end; gap: .2rem; font-size: clamp(1.12rem, 5.65vw, 1.62rem); }
  .receipt-currency { font-size: .55rem; }
  .editor-status { padding: .54rem .68rem; }
  .editor-status span { padding-inline: .57rem; }

  .stages { padding-block: 1.4rem 1.6rem; }
  .stage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: .95rem; margin-top: .95rem; }
  .stage-grid li { padding: .12rem .85rem; }
  .stage-grid li:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stage-grid li:nth-child(even) { padding-right: 0; }
  .stage-grid li:not(:last-child) p { padding-right: 0; }
  .stage-grid p { font-size: .87rem; }
  .stage-arrow { display: none; }
  .stage-heading .icon { inline-size: 1.55rem; block-size: 1.55rem; }
  .stage-heading { gap: .45rem; }
  .stage-heading h3 { font-size: 1.02rem; }

  .policy-panel { grid-template-columns: minmax(0,1fr); padding: .95rem; gap: .8rem; margin-bottom: 1.2rem; }
  .policy-copy { border: 0; padding: .05rem .1rem .15rem; }
  .policy-copy h2 { max-width: 13ch; }
  .policy-copy p { margin-top: .5rem; }
  .policy-summary ul { grid-template-columns: minmax(0, 1fr); gap: .34rem; }
  .policy-json .code-lines { font-size: .82rem; }

  .split-section { grid-template-columns: minmax(0,1fr); gap: .9rem; padding-block: 1.25rem; }
  .section-copy p { max-width: 37ch; margin-top: .48rem; }
  .task-card { padding: .68rem .7rem; }
  .task-header { gap: .55rem; padding-bottom: .6rem; }
  .task-icon { width: 2.25rem; height: 2.25rem; }
  .task-copy h3 { font-size: 1rem; }
  .task-copy p { font-size: .75rem; }
  .run-button { min-width: 0; min-height: 2.7rem; padding-inline: .55rem; font-size: .76rem; gap: .22rem; }
  .run-button .icon { inline-size: .8rem; block-size: .8rem; }
  .expense-table { font-size: .82rem; }
  .expense-table :is(td,th) { padding: .46rem .25rem; }
  .expense-table thead th { font-size: .73rem; }
  .expense-table tbody th span { gap: .24rem; }
  .expense-table .icon { inline-size: .85rem; block-size: .85rem; }
  .expense-table tfoot th { padding-left: .45rem; }
  .expense-table tfoot td { padding-right: .45rem; }

  .controls { padding-block: 1.25rem; }
  .controls-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: .6rem; margin-top: .6rem; }
  .control-card { padding: .68rem; min-height: 5.5rem; }
  .allowlist-card { grid-row: 3; grid-column: 1/-1; }
  .allowlist-options { position: static; margin-top: .35rem; box-shadow: none; }
  .settlement-card { padding: .85rem; }
  .settlement-metrics dt { font-size: .85rem; }
  .exception-table :is(dt,dd) { padding: .57rem .62rem; font-size: .84rem; }
  .exception-table dt { gap: .38rem; }
  .exception-table dt .icon { inline-size: 1.15rem; block-size: 1.15rem; }

  .developer-heading { grid-template-columns: minmax(0,1fr); gap: .4rem; padding-block: .85rem; }
  .developer-heading p { border: 0; padding: 0; font-size: .9rem; }
  .resource-grid { grid-template-columns: minmax(0,1fr); gap: .55rem; padding-block: .85rem; }
  .resource-card { min-height: auto; padding: .78rem; gap: .65rem; }
  .resource-card .icon { inline-size: 1.6rem; block-size: 1.6rem; }
  .resource-card small { margin-top: .18rem; }
  .log-section { padding-block: 1rem 1.15rem; }
  .log-window { padding: .45rem; max-height: 13rem; }
  .event-log { font-size: .74rem; }
  .event-log li { grid-template-columns: minmax(3.9rem, auto) minmax(0, 1fr); gap: .03rem .42rem; padding: .28rem .32rem; }
  .event-log li + li { border-top: 1px solid #3e344a; }
  .event-log li::before { display: none; }
  .event-log span { grid-column: 2; padding-left: 0; border: 0; }
  .faq { padding-block: 1rem 1.2rem; }
  .faq summary { min-height: 2.85rem; font-size: .91rem; padding-inline: .72rem; }
  .faq details p { font-size: .9rem; padding-inline: .72rem; }
  .footer { flex-direction: column; align-items: start; gap: .7rem; padding-block: 1rem 1.25rem; }
  .footer nav { flex-wrap: wrap; gap: .55rem; }
  .footer nav > * { font-size: .8rem; }
  .footer nav > * + * { padding-left: .55rem; }
}

@media (max-width: 365px) {
  .topbar { gap: .45rem; }
  .brand { font-size: 1.1rem; }
  .brand img { width: 1.45rem; }
  .editor-status span { padding-inline: .42rem; }
  .expense-table thead th:last-child span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* public-platform.css */
.public-platform {
  --public-bg: #100f18;
  --public-panel: #181624;
  --public-raised: #201b2d;
  --public-line: #3b334d;
  --public-accent: #cdb3ff;
  --public-text: #f9f7ff;
  --public-muted: #c7bed6;
  color: var(--public-text);
  background: var(--public-bg);
}
.public-width { width: min(calc(100% - 2 * clamp(1rem, 5vw, 4.25rem)), 1220px); margin-inline: auto; }
.public-header { position: relative; z-index: 2; border-bottom: 1px solid var(--public-line); background: #12111b; }
.header-layout { min-height: 4.65rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.public-brand { display: inline-flex; align-items: center; gap: .55rem; font-size: 1.25rem; font-weight: 750; letter-spacing: -.042em; white-space: nowrap; }
.public-brand img { width: 2.16rem; height: auto; }
.public-top-nav, .header-actions { display: flex; align-items: center; gap: clamp(.7rem, 2.2vw, 1.65rem); }
.public-top-nav a, .public-sign-in { color: var(--public-muted); font-size: .9rem; white-space: nowrap; }
.public-top-nav a:hover, .public-sign-in:hover, .public-footer a:hover { color: var(--public-accent); }
.public-button { display: inline-flex; min-height: 2.75rem; align-items: center; justify-content: center; padding: .5rem .86rem; border: 1px solid var(--public-line); border-radius: .48rem; font-weight: 680; font-size: .88rem; line-height: 1.32; text-align: center; }
.public-button.primary { background: #cdb3ff; color: #201433; border-color: #e1cdff; }
.public-button.primary:hover { background: #e3d3ff; }
.public-button.secondary { color: var(--public-text); background: #211a2c; }
.public-button.secondary:hover { background: #2d2240; }
.public-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; margin-top: 1.2rem; }
.public-menu { display: none; }
.public-kicker { margin-bottom: .63rem; color: var(--public-accent); font: 500 .74rem/1.4 var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.public-lead { color: var(--public-muted); font-size: clamp(1rem, 1.8vw, 1.13rem); line-height: 1.56; }
.public-hero {
  overflow: hidden;
  background: radial-gradient(ellipse at 73% 60%, #40265d4f, transparent 57%),
              linear-gradient(180deg, #12101c 78%, #171320);
}
.public-hero-layout { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, .88fr); align-items: center; gap: clamp(1.6rem, 6vw, 5.7rem); padding-block: clamp(2.6rem, 7vw, 6.1rem); }
.public-hero h1 { max-width: 13ch; font-size: clamp(2.78rem, 5.05vw, 4.85rem); line-height: 1; color: var(--public-text); }
.public-hero h1 span { color: var(--public-accent); }
.public-hero .public-lead { max-width: 50ch; margin-top: 1.05rem; }
.system-map { margin: 0; border: 1px solid #59496e; border-radius: .9rem; padding: clamp(.75rem, 2.5vw, 1.6rem); background: linear-gradient(140deg,#242034,#161420); box-shadow: 0 1.7rem 4rem #08071155; }
.system-map figcaption { display: flex; align-items: center; gap: .62rem; padding-bottom: .72rem; margin-bottom: .72rem; border-bottom: 1px solid #4e4164; font-weight: 650; }
.system-map figcaption img { width: 1.3rem; }
.system-step { display: grid; gap: .26rem; padding: .78rem min(3.5vw, 1.15rem); border: 1px solid #514566; border-radius: .55rem; background: #272035; }
.system-step span { color: var(--public-accent); font: .71rem/1.35 var(--mono); }
.system-step strong { font-size: clamp(1.03rem, 2vw, 1.22rem); line-height: 1.25; letter-spacing: -.025em; }
.system-step small { color: var(--public-muted); font-size: .83rem; }
.system-connector { width: 1px; height: 1.02rem; margin-inline: auto; background: #9e77d3; }
.system-resource-row { display: grid; grid-template-columns: repeat(3,minmax(0, 1fr)); gap: .3rem; }
.system-resource-row div { min-width: 0; padding: .49rem .24rem; background: #181321; border: 1px solid #4f4163; border-radius: .36rem; color: #e6d9f8; font-size: .75rem; text-align: center; }
.system-settlement { background: #211b30; border-color: #675183; }
.public-section { padding-block: clamp(1.7rem, 5vw, 3.85rem); border-top: 1px solid var(--public-line); }
.public-heading { margin-bottom: 1.15rem; }
.public-heading h2, .feature-split h2 { font-size: clamp(1.85rem, 4.1vw, 3.25rem); }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .72rem; }
.feature-block { display: grid; align-content: start; gap: .56rem; min-width: 0; padding: clamp(.8rem, 2vw, 1.32rem); border: 1px solid var(--public-line); border-radius: .62rem; background: var(--public-panel); }
.feature-block h3 { font-size: 1.15rem; }
.feature-block p, .feature-split p:not(.public-kicker) { color: var(--public-muted); }
.feature-block a, .related-link, .editorial-section a { color: var(--public-accent); text-decoration: underline; text-underline-offset: .24em; width: fit-content; }
.feature-split { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,.75fr); gap: 1rem 2rem; align-items: center; }
.feature-split p:not(.public-kicker) { max-width: 52ch; margin-top: .55rem; }
.public-related { display: grid; border: 1px solid var(--public-line); border-radius: .57rem; background: var(--public-panel); }
.public-related a { min-height: 2.85rem; display: flex; align-items: center; padding: .45rem .85rem; color: var(--public-accent); }
.public-related a + a { border-top: 1px solid var(--public-line); }
.public-related a:hover { text-decoration: underline; text-underline-offset: .21em; }
.public-footer { border-top: 1px solid var(--public-line); background: #14111d; padding-block: clamp(1.45rem, 4vw, 3rem) 1.12rem; }
.footer-grid { display: grid; grid-template-columns: 1.2fr .85fr 1.08fr .82fr 1fr; gap: 1rem min(3vw, 2rem); }
.footer-category h2 { font-size: .94rem; letter-spacing: -.01em; margin-bottom: .59rem; }
.footer-category ul { list-style: none; display: grid; gap: .32rem; padding: 0; }
.footer-category a { display: inline-block; padding-block: .11rem; color: var(--public-muted); font-size: .85rem; }
.footer-category small { display: block; margin-top: .12rem; color: var(--public-accent); font: .68rem/1.4 var(--mono); }
.footer-floor { border-top: 1px solid var(--public-line); padding-top: .72rem; margin-top: 1.45rem; display: flex; align-items: center; gap: .6rem 1.35rem; color: var(--public-muted); flex-wrap: wrap; font-size: .83rem; }
.footer-floor .public-brand { color: var(--public-text); font-size: 1.13rem; }
.footer-floor .public-brand img { width: 1.54rem; }
.footer-floor > a:last-child { margin-left: auto; }
.editorial { padding-block: clamp(1.8rem, 6vw, 4.75rem); }
.editorial-hero { max-width: 52rem; padding-bottom: .84rem; }
.editorial-hero h1, .docs-header h1 { max-width: none; font-size: clamp(2.12rem, 5.1vw, 3.9rem); line-height: 1.04; letter-spacing: -.055em; }
.editorial-hero .public-lead, .docs-header .public-lead { margin-top: .67rem; margin-bottom: .44rem; }
.editorial-body { max-width: 52rem; border-top: 1px solid var(--public-line); }
.editorial-section { padding-block: clamp(.8rem, 2vw, 1.2rem); border-bottom: 1px solid var(--public-line); }
.editorial-section h2, .calculation-output h2 { font-size: clamp(1.15rem, 2.7vw, 1.56rem); line-height: 1.2; letter-spacing: -.03em; }
.editorial-section p { color: var(--public-muted); margin-top: .36rem; max-width: 75ch; }
.public-faq { border-bottom: 1px solid var(--public-line); padding: .7rem .12rem; }
.public-faq summary { font-weight: 650; cursor: pointer; }
.public-faq p { color: var(--public-muted); margin-top: .44rem; }
.brand-plate { display: flex; gap: 1rem; align-items: center; margin: .4rem 0 1rem; width: min(100%, 42rem); background: #eee7fa; color: #171125; border-radius: .72rem; padding: clamp(1rem, 5vw, 2.8rem); font-size: clamp(1.65rem, 4.8vw, 3.25rem); letter-spacing: -.065em; }
.brand-plate img { width: clamp(3.3rem, 12vw, 5rem); height: auto; }
.docs-grid { display: grid; grid-template-columns: minmax(11.5rem,.31fr) minmax(0, 1fr); gap: 1.35rem clamp(1.4rem, 5vw, 5.4rem); padding-block: clamp(1.45rem, 4.4vw, 3.7rem); align-items: start; }
.docs-sidebar { grid-column: 1; grid-row: 1/3; position: sticky; top: 1rem; display: grid; gap: .48rem; border: 1px solid var(--public-line); border-radius: .65rem; background: var(--public-panel); padding: .77rem; }
.docs-sidebar label { font-size: .82rem; font-weight: 680; }
.docs-sidebar input, .calculation-input input { width: 100%; min-width: 0; background: #15111e; border: 1px solid var(--public-line); border-radius: .34rem; padding: .46rem .62rem; color: var(--public-text); }
.docs-sidebar nav ul { list-style: none; display: grid; padding: 0; }
.docs-sidebar a { display: block; padding: .34rem .39rem; color: var(--public-muted); border-radius: .33rem; font-size: .87rem; }
.docs-sidebar a:hover { background: var(--public-raised); color: var(--public-accent); }
.docs-side-related { border-top: 1px solid var(--public-line); padding-top: .37rem; }
.docs-body { grid-column: 2; grid-row: 2; width: min(100%, 52rem); min-width: 0; }
.docs-header { grid-column: 2; grid-row: 1; max-width: 52rem; padding-bottom: .35rem; }
.docs-section { border-top: 1px solid var(--public-line); padding-block: clamp(.9rem, 2.8vw, 1.8rem); scroll-margin-top: 1rem; }
.docs-section h2 { font-size: clamp(1.33rem, 2.95vw, 2rem); }
.docs-section p { color: var(--public-muted); line-height: 1.63; margin-top: .48rem; overflow-wrap: anywhere; }
.docs-section pre { margin-block: .64rem .12rem; padding: .64rem .75rem; overflow: auto; font: .79rem/1.52 var(--mono); background: #171320; border: 1px solid var(--public-line); border-radius: .44rem; }
.docs-section a { display: inline-block; margin-top: .5rem; }
#docs-empty { color: var(--public-muted); margin: .8rem 0; }
.document-links { display: grid; gap: .35rem; list-style: none; padding: 0; }
.document-links a { color: var(--public-accent); }
.document-links span { color: var(--public-muted); margin-left: .43rem; font: .71rem var(--mono); }
.calculator-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.82fr); gap: .85rem; max-width: 58rem; }
.calculation-form, .calculation-output { padding: .85rem clamp(.75rem, 2vw, 1.25rem); border: 1px solid var(--public-line); border-radius: .69rem; background: var(--public-panel); }
.calculation-form { display: grid; gap: .52rem; }
.calculation-form button { justify-self: start; }
.calculation-input { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(4.3rem,.85fr); align-items: center; gap: .42rem; }
.calculation-input label { font-size: .88rem; }
.calculation-input span { position: relative; }
.calculation-input b { position: absolute; top: .45rem; left: .55rem; color: var(--public-muted); font: .87rem/1.4 var(--mono); }
.calculation-input input { padding-left: 1.5rem; }
.calculation-output dl { display: grid; gap: .4rem; margin-block: .7rem; }
.calculation-output dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: .35rem; border-bottom: 1px solid var(--public-line); padding-block: .36rem; }
.calculation-output dd { display: block; font: .89rem/1.3 var(--mono); text-align: end; }
.calculation-output p { color: var(--public-muted); font-size: .84rem; }
#calculator-error { color: #ffc1d7; font-size: .84rem; }
.video-guide-panel { max-width: 52rem; padding: .65rem; border: 1px solid var(--public-line); border-radius: .62rem; background: var(--public-panel); }
.video-guide-panel video { display: block; width: 100%; height: auto; border-radius: .43rem; background: #0d0b12; }
.video-guide-panel details { padding: .55rem .35rem .2rem; color: var(--public-muted); }
.video-guide-panel summary { cursor: pointer; }
.video-guide-panel li + li { margin-top: .29rem; }
@media (max-width: 760px) {
  .header-layout { justify-content: start; min-height: 3.8rem; }
  .public-top-nav, .public-sign-in { display: none; }
  .header-actions { margin-left: auto; }
  .public-menu { display: block; }
  .public-menu summary { display: grid; place-content: center; gap: .25rem; width: 2.56rem; height: 2.49rem; border-radius: .42rem; border: 1px solid var(--public-line); cursor: pointer; list-style: none; }
  .public-menu summary::-webkit-details-marker { display: none; }
  .public-menu summary span { width: 1rem; height: 1.5px; background: var(--public-text); }
  .public-menu nav { position: absolute; inset: calc(100% + .12rem) 1rem auto; padding: .45rem; border: 1px solid var(--public-line); border-radius: .52rem; background: var(--public-panel); box-shadow: 0 .8rem 1.6rem #07050c99; }
  .public-menu nav a { display: block; padding: .57rem .53rem; border-radius: .31rem; }
  .public-menu nav a:hover { background: var(--public-raised); }
  .header-actions .public-button { min-height: 2.49rem; padding-inline: .58rem; }
  .public-hero-layout { grid-template-columns: 1fr; gap: 1.35rem; }
  .public-hero h1 { max-width: 14ch; font-size: clamp(2.45rem, 8.45vw, 4.4rem); }
  .feature-grid, .feature-split, .calculator-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.3rem; }
  .footer-floor > a:last-child { margin-left: 0; }
  .docs-grid { grid-template-columns: minmax(0,1fr); }
  .docs-sidebar { position: static; }
  .docs-header, .docs-sidebar, .docs-body { grid-column: 1; grid-row: auto; }
  .docs-sidebar nav ul { display: flex; flex-wrap: wrap; gap: .16rem .31rem; }
  .docs-sidebar a { background: #232033; }
  .docs-side-related { display: flex; gap: .28rem; flex-wrap: wrap; }
}
@media (max-width: 370px) {
  .header-layout { gap: .5rem; }
  .public-brand { font-size: 1.06rem; gap: .38rem; }
  .public-brand img { width: 1.56rem; }
  .header-actions .public-button { font-size: .78rem; }
}

/* company-directory.css */
.directory-footer{background:#17131d;color:#f3edf9;padding:clamp(2rem,5vw,4rem) 0 1.3rem;border-top:1px solid #433949;font:400 .9rem/1.55 Inter,Arial,sans-serif}
.directory-inner{width:min(1180px,calc(100% - 2.5rem));margin:auto}
.directory-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:1.8rem}
.directory-group h2{font:650 .96rem/1.25 Inter,Arial,sans-serif;margin:0 0 .8rem;color:#f7f2fa}
.directory-group ul{list-style:none;margin:0;padding:0}
.directory-group li{margin:0 0 .32rem}
.directory-footer a{color:#cfc5d7;text-decoration:none;overflow-wrap:anywhere}
.directory-group a{display:inline-block;padding:.13rem 0}
.directory-group a:hover,.directory-floor a:hover{text-decoration:underline;text-underline-offset:.22em;color:white}
.directory-group small{display:block;font-size:.7rem;color:#bda8d6}
.directory-floor{display:flex;align-items:center;gap:1rem;flex-wrap:wrap;border-top:1px solid #433949;margin-top:2rem;padding-top:1rem}
.directory-floor p{margin:0;font-size:.82rem}
.directory-floor>a:last-child{margin-left:auto}
.directory-brand{font-weight:680;display:inline-flex;align-items:center;gap:.45rem}
.company-overview .editorial-hero{max-width:56rem;border-left:3px solid #b79be5;padding:1rem 0 1.4rem clamp(1.15rem,3vw,2.5rem)}
.company-overview .editorial-body{max-width:none;margin-top:2.2rem;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;border:0}
.company-overview .editorial-section{padding:clamp(1.2rem,3vw,2.1rem);background:#1b1723;border:1px solid #443a4e;border-radius:.65rem}
.company-overview .editorial-section p{line-height:1.65;margin-top:.65rem}
.company-intake{background:#f7f6f9;color:#221e2c;min-height:100vh}
.company-intake .auth-top{border-color:#d5cedb}
.company-intake .brand,.company-intake h1,.company-intake h2{color:#251e30}
.company-intake .language-switch,.company-intake .company-back,.company-intake small a{color:#584071}
.company-intake .auth-layout{align-items:start;padding-block:clamp(2.2rem,6vw,5rem)}
.company-intake .auth-intro h1{margin-top:1.1rem;font-size:clamp(2.35rem,5vw,4rem);letter-spacing:-.055em;line-height:1.06}
.company-intake .auth-intro>p,.company-intake .auth-card p{color:#534c5b;line-height:1.6}
.company-intake .auth-card{background:#fff;color:#251e30;border:1px solid #d7cfde;border-top:3px solid #77608d;box-shadow:0 14px 40px #35283f0a;padding:clamp(1.25rem,3vw,2.2rem);border-radius:.55rem;min-width:0}
.company-intake .auth-card h2{font-size:1.5rem;letter-spacing:-.03em}
.company-intake .auth-form :is(input,select,textarea){color:#251e30;background:#fcfbfd;border-color:#bdb2c7}
.company-intake .auth-form :focus-visible,.company-back:focus-visible{outline:2px solid #74539b;outline-offset:2px}
.company-intake .auth-form small{color:#655c6c}
.company-intake .auth-form button{background:#34283f;color:white;min-height:3rem;border:0;margin-top:.65rem}
.company-process{margin-top:1.7rem;border-top:1px solid #cdc5d4;padding-top:1.2rem}
.company-process h2{font-size:1.1rem}
.company-process ol{padding-left:1.2rem;color:#534c5b;max-width:45ch}
.company-process li{margin:.5rem 0}
.company-intake .auth-form .error{color:#732137;background:#fff5f5;border-color:#bd8692}
@media(max-width:800px){.directory-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.directory-floor>a:last-child{margin-left:0}.directory-group a{padding:.3rem 0}.company-overview .editorial-body{grid-template-columns:1fr}.company-intake .auth-layout{display:flex;flex-direction:column;gap:1.5rem}.company-intake .auth-card{width:100%}.company-process{margin-top:1rem}}

.directory-legal {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: .65rem 1.4rem;
  margin-top: clamp(1.35rem, 3vw, 2rem);
  padding: clamp(.85rem, 2vw, 1.25rem);
  border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
  border-radius: .7rem;
  background: color-mix(in srgb, currentColor 4%, transparent);
  scroll-margin-top: 4.5rem;
}
.directory-legal h2 {
  margin: 0 0 .3rem;
  font: 680 .93rem/1.3 Inter, Arial, sans-serif;
}
.directory-legal p {
  margin: 0;
  max-width: 72ch;
  font-size: .85rem;
  line-height: 1.5;
}
.directory-legal > a {
  display: inline-flex;
  gap: .35rem;
  align-items: center;
  width: fit-content;
  min-height: 2.5rem;
  font-size: .84rem;
  font-weight: 620;
  text-decoration: underline;
  text-underline-offset: .2em;
}
.directory-legal > a span { flex: none; }
@media (max-width: 760px) {
  .directory-legal { grid-template-columns: minmax(0,1fr); gap: .35rem; }
}

/* product-pages.css */
.product-platform {
  color-scheme: light;
  --public-bg: #f8f8fa;
  --public-panel: #fff;
  --public-raised: #f1eef7;
  --public-line: #e2dfe8;
  --public-accent: #57368b;
  --public-text: #211a2e;
  --public-muted: #51495f;
  background: var(--public-bg);
}

.product-platform .public-header { background: #fff; }
.product-platform .public-top-nav a[href="/how-it-works"],
.product-platform .public-top-nav a[href="/ru/how-it-works"] { color: var(--public-accent); font-weight: 700; }
.product-platform .public-button.primary {
  color: #fff;
  background: #422962;
  border-color: #422962;
}
.product-platform .public-button.primary:hover { background: #57368b; border-color: #57368b; }
.product-platform .public-button.secondary { background: #fff; color: #3f2a57; }
.product-platform .public-button.secondary:hover { background: #f4effa; }
.product-platform :focus-visible { outline-color: #774ab6; }
.product-platform .public-menu nav { box-shadow: 0 .9rem 2rem #2c17431c; }

.product-layout {
  display: grid;
  grid-template-columns: minmax(10.5rem, 15rem) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.3rem, 4vw, 3.8rem);
  padding-block: clamp(1.8rem, 4vw, 3.6rem) clamp(2.5rem, 6vw, 5rem);
}
.product-sidebar {
  position: sticky;
  top: 1.3rem;
  min-width: 0;
  padding: .9rem .75rem;
  background: #fff;
  border: 1px solid var(--public-line);
  border-radius: .8rem;
}
.product-sidebar-label {
  padding-inline: .72rem;
  margin: .2rem 0 .68rem;
  color: #61566d;
  font-weight: 710;
  font-size: .82rem;
  list-style: none;
  cursor: pointer;
}
.product-sidebar-label::-webkit-details-marker { display: none; }
.product-sidebar-label::after { content: "+"; float: right; }
.product-sections[open] .product-sidebar-label::after { content: "−"; }
.product-sidebar ul { list-style: none; padding: 0; display: grid; gap: .2rem; }
.product-sidebar a {
  display: block;
  padding: .67rem .7rem;
  border: 1px solid transparent;
  border-radius: .45rem;
  color: var(--public-muted);
  line-height: 1.28;
  font-size: .86rem;
}
.product-sidebar a:hover { background: #f6f3f9; }
.product-sidebar a[aria-current="page"] {
  background: #eee7f8;
  border-color: #e1d6ed;
  color: #462a67;
  font-weight: 710;
}
.product-content { min-width: 0; }
.product-intro {
  margin-bottom: clamp(1.7rem, 4vw, 2.8rem);
  padding: clamp(1.15rem, 4vw, 3rem);
  border: 1px solid var(--public-line);
  border-radius: .92rem;
  background:
    radial-gradient(ellipse at 100% 0, #ece4f6, transparent 58%),
    #fff;
}
.product-overview-link { display: inline-block; margin-bottom: 1rem; font-size: .8rem; color: var(--public-accent); }
.product-overview-link:hover { text-decoration: underline; text-underline-offset: .24em; }
.product-intro h1 {
  max-width: 20ch;
  font-size: clamp(2.2rem, 5.1vw, 4.3rem);
  line-height: .99;
  letter-spacing: -.055em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.product-intro > p { max-width: 61ch; margin-top: .9rem; color: var(--public-muted); font-size: clamp(.94rem, 1.6vw, 1.1rem); }
.product-section + .product-section, .calculator-layout + .product-section { margin-top: clamp(1.65rem, 4vw, 3.1rem); }
.product-section h2, .calculation-form h2, .calculation-output h2 {
  margin-bottom: .8rem;
  font-size: clamp(1.32rem, 3vw, 2.04rem);
  line-height: 1.12;
  letter-spacing: -.04em;
}
.product-section h3 { line-height: 1.19; }
.product-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}
.product-cards article, .product-report-status {
  display: grid;
  align-content: start;
  gap: .45rem;
  padding: clamp(1rem, 2.7vw, 1.55rem);
  background: #fff;
  border: 1px solid var(--public-line);
  border-radius: .72rem;
}
.product-cards p, .product-report-status p, .product-steps p {
  color: var(--public-muted);
  font-size: .9rem;
}
.product-report-status {
  border-left: 3px solid #9874c8;
  background: #f3eef8;
}
.product-report-status h2 { margin-bottom: 0; }
.product-report-status p:first-of-type { color: var(--public-text); font-weight: 680; }
.product-text-link {
  display: inline-flex;
  align-items: baseline;
  gap: .35rem;
  width: fit-content;
  max-width: 100%;
  margin-top: .5rem;
  color: var(--public-accent);
  font-size: .85rem;
  font-weight: 670;
  text-underline-offset: .22em;
}
.product-text-link + .product-text-link { margin-inline-start: .8rem; }
.product-text-link:hover { text-decoration: underline; }

.product-steps {
  list-style: none;
  padding: .15rem clamp(.9rem, 3vw, 1.6rem);
  border: 1px solid var(--public-line);
  background: #fff;
  border-radius: .7rem;
}
.product-steps li {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  align-items: start;
  gap: .7rem;
  padding-block: .82rem;
}
.product-steps li + li { border-top: 1px solid var(--public-line); }
.product-steps li > span {
  display: grid;
  place-items: center;
  width: 1.76rem;
  height: 1.76rem;
  background: #eee7f7;
  color: #57368b;
  border-radius: .38rem;
  font: .76rem/1 var(--mono);
}
.product-steps p { margin-top: .28rem; }

.product-table {
  width: 100%;
  table-layout: fixed;
  border-spacing: 0;
  background: #fff;
  border: 1px solid var(--public-line);
  border-radius: .7rem;
  text-align: start;
}
.product-table caption {
  padding: 0 0 .5rem;
  text-align: start;
  color: var(--public-muted);
  font-size: .85rem;
}
.product-table :is(td, th) {
  padding: .7rem min(1.6vw, 1rem);
  overflow-wrap: anywhere;
  text-align: start;
  vertical-align: top;
  font-size: .87rem;
}
.product-table :is(td, th):first-child { width: 30%; }
.product-table thead th { background: #efeaf5; color: #3d3250; font-weight: 710; }
.product-table thead th:first-child { border-top-left-radius: .65rem; }
.product-table thead th:last-child { border-top-right-radius: .65rem; }
.product-table tbody :is(td, th) { border-top: 1px solid var(--public-line); }
.product-table td { color: var(--public-muted); }

.product-ledger {
  max-width: 41rem;
  padding: clamp(1.05rem, 2.6vw, 1.75rem);
  border: 1px solid #e1d9eb;
  border-radius: .82rem;
  background: #fff;
}
.product-panel-label { margin-bottom: .55rem; color: var(--public-muted); font: .76rem/1.4 var(--mono); }
.product-ledger dl > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .65rem;
  padding: .55rem .65rem;
  border-bottom: 1px solid var(--public-line);
}
.product-ledger dd { flex: none; font: .95rem/1.4 var(--mono); }
.product-ledger dl > .product-ledger-total { border: 0; margin-top: .55rem; border-radius: .42rem; background: #eee7f7; color: #372251; font-weight: 700; }
.product-ledger-total dd { font-size: 1.14rem; }
.product-ledger > p:last-child { margin-top: .8rem; font-size: .85rem; color: var(--public-muted); }

.product-platform .calculator-layout { max-width: none; gap: .85rem; }
.product-platform .calculation-form, .product-platform .calculation-output {
  padding: clamp(1rem, 2.6vw, 1.6rem);
  align-content: start;
}
.product-platform .calculation-form { gap: .85rem; }
.product-platform .calculation-form h2 { margin: 0; }
.product-platform .calculation-form fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
  display: grid;
  gap: .62rem;
}
.product-platform .calculation-input input, #calculator-example {
  border-radius: .45rem;
  border: 1px solid #cfc5d9;
  color: var(--public-text);
  background: #faf8fc;
  min-height: 2.6rem;
}
#calculator-scenarios {
  display: grid;
  gap: .3rem;
  margin-bottom: .08rem;
  font-size: .82rem;
  font-weight: 690;
  color: #564465;
}
#calculator-example { width: 100%; padding: .25rem .55rem; font: inherit; }
.product-platform .calculation-output { background: #281f35; border-color: #554267; color: #f8f2ff; }
.product-platform .calculation-output p { color: #e0d1ef; }
.product-platform .calculation-output dl > div { border-color: #554267; font-size: .86rem; }
.product-platform #margin-result { color: #bcf0d7; }
.product-platform #margin-result.is-loss { color: #ffb9ca; }
.product-platform #calculator-error { color: #a02145; }

.product-platform .directory-footer { background: #f1eef6; color: #382c49; border-color: #e0d9ea; }
.product-platform .directory-footer h2 { color: #352646; }
.product-platform .directory-footer a, .product-platform .directory-footer small { color: #554465; }
.product-platform .directory-footer a:hover { color: #4a2b73; }
.product-platform .directory-floor { border-color: #dcd3e8; }

@media (max-width: 900px) {
  .product-layout { grid-template-columns: minmax(0, 1fr); padding-top: 1.2rem; }
  .product-sidebar { position: static; padding: .56rem .6rem; }
  .product-sidebar-label { margin: 0; padding: .55rem .45rem; }
  .product-sidebar ul { grid-template-columns: repeat(2, minmax(0,1fr)); padding: .25rem 0 0; }
  .product-sidebar a { padding: .55rem .45rem; overflow-wrap: anywhere; }
  .product-sidebar a:focus-visible { outline-offset: -2px; }
}

@media (max-width: 540px) {
  .product-cards { grid-template-columns: minmax(0, 1fr); }
  .product-intro .public-actions { align-items: stretch; }
  .product-table :is(td, th) { font-size: .8rem; padding: .57rem .43rem; }
  .product-table :is(td, th):first-child { width: 28%; }
}

@media (max-width: 370px) {
  .product-platform .header-actions .public-button { display: none; }
  .product-platform .calculation-input { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); }
}

/* site-navigation.css */
.site-header {
  --site-header-height: 4.5rem;
  position: relative;
  z-index: 8;
  color: #f8f4ff;
  background: #15121c;
  border-bottom: 1px solid #372d43;
  font: 400 .9rem/1.4 Inter, system-ui, sans-serif;
}

.site-header.doc-header {
  --site-header-height: var(--doc-header);
  position: sticky;
  top: 0;
}

.site-header-inner {
  width: min(calc(100% - 2 * clamp(1rem, 4vw, 3.5rem)), 1220px);
  min-height: calc(var(--site-header-height) - 1px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(.5rem, 2vw, 1.5rem);
}

.site-header a { color: inherit; text-decoration: none; }
.site-header :focus-visible { outline: 2px solid #caa6ff; outline-offset: 3px; }

.site-brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: .58rem;
  white-space: nowrap;
  font-size: 1.45rem;
  font-weight: 750;
  letter-spacing: -.055em;
}

.site-brand img { width: 2.05rem; height: auto; display: block; }
.site-menu { display: flex; align-items: center; gap: clamp(.15rem, 1.5vw, 1rem); }
.site-menu-group { position: relative; }
.site-menu-group > summary {
  display: flex;
  align-items: center;
  gap: .42rem;
  list-style: none;
  border-radius: .48rem;
  color: #e5daee;
  font-weight: 620;
  padding: .7rem .8rem;
  cursor: pointer;
}

.site-menu-group > summary::-webkit-details-marker { display: none; }
.site-menu-group > summary svg { color: #c7a8e3; transition: transform .18s ease; }
.site-menu-group[open] > summary svg { transform: rotate(180deg); }
.site-menu-group.is-current > summary { color: #e4c5ff; }
.site-menu-group[open] > summary, .site-menu-group > summary:hover { background: #2a2035; color: #fbf6ff; }

.site-menu-panel {
  position: absolute;
  inset: calc(100% + .5rem) auto auto 50%;
  transform: translateX(-50%);
  width: 20rem;
  padding: .45rem;
  margin: 0;
  border-radius: .8rem;
  border: 1px solid #51415f;
  background: linear-gradient(140deg, #251c30, #1a1521 72%);
  box-shadow: 0 18px 34px #0c0814a1;
  list-style: none;
}

.site-menu-panel a {
  display: grid;
  gap: .2rem;
  padding: .63rem .75rem;
  border-radius: .5rem;
  color: #f3eaf8;
  font-weight: 630;
}

.site-menu-panel a:hover, .site-menu-panel a[aria-current="page"] { background: #382848; }
.site-menu-panel small { font-size: .76rem; line-height: 1.4; font-weight: 400; color: #cec0db; }
.site-header-actions { display: flex; justify-self: end; align-items: center; gap: .55rem; }
.site-header-actions .language-switch { --language-line: #655371; color: #f6eeff; }
.site-header .site-workspace {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: .42rem .85rem;
  border-radius: .49rem;
  background: linear-gradient(105deg, #caadff, #ab89ec);
  color: #1a1126;
  white-space: nowrap;
  font-weight: 720;
}
.site-header .site-workspace:hover { background: #dbbfff; }
.site-menu-toggle, .site-menu-cross, .site-header .site-doc-jump { display: none; }

@media (max-width: 960px) {
  .site-header { --site-header-height: 3.85rem; }
  .site-header-inner { grid-template-columns: minmax(0,1fr) auto; }
  .site-brand { font-size: 1.18rem; gap: .38rem; }
  .site-brand img { width: 1.65rem; }
  .site-header .site-workspace { min-height: 2.3rem; padding-inline: .6rem; font-size: .82rem; }
  .site-header-actions { gap: .4rem; }
  .site-menu { grid-row: 2; grid-column: 1/-1; display: grid; gap: .24rem; }
  .site-header[data-menu-ready] .site-menu {
    display: none;
    position: absolute;
    inset: calc(100% + .35rem) max(1rem,4vw) auto;
    max-height: calc(100dvh - var(--site-header-height) - 1rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: .45rem;
    border: 1px solid #51415f;
    border-radius: .8rem;
    background: #1d1727;
    box-shadow: 0 16px 30px #0c0814bb;
  }
  .site-header[data-menu-ready] .site-menu.is-open { display: grid; }
  .site-header[data-menu-ready] .site-menu-toggle {
    display: grid;
    place-items: center;
    width: 2.3rem;
    height: 2.3rem;
    color: #f2eaff;
    background: #261c31;
    border: 1px solid #634e73;
    border-radius: .48rem;
    cursor: pointer;
  }
  .site-menu-toggle[aria-expanded="true"] .site-menu-bars { display: none; }
  .site-menu-toggle[aria-expanded="true"] .site-menu-cross { display: inline; }
  .site-menu-group > summary { justify-content: space-between; min-height: 2.7rem; padding: .5rem .7rem; }
  .site-menu-panel { position: static; transform: none; width: auto; border: 0; box-shadow: none; background: transparent; padding: .15rem 0 .35rem .35rem; }
  .site-menu-panel a { padding: .5rem .65rem; }
}

@media (max-width: 780px) {
  .site-header .site-doc-jump { display: block; padding: .65rem .7rem; color: #e3c9fd; }
}

@media (prefers-reduced-motion: reduce) {
  .site-menu-group > summary svg { transition: none; }
}

/* protocol-disclosure.css */
.protocol-hero-notice { margin:1.15rem 0; padding:.9rem 1rem; border:1px solid var(--theme-line,#483950); border-radius:.65rem; background:color-mix(in srgb,var(--theme-panel,#1d1727) 80%,transparent); max-width:55ch; }
.protocol-hero-notice strong { color:var(--theme-text,#f8f4ff); font-size:.95rem; }
.protocol-hero-notice p { margin:.4rem 0 .55rem; color:var(--theme-muted,#c7bbd4); font-size:.9rem; line-height:1.6; }
.protocol-hero-notice a { color:var(--theme-accent,#d7b7fb); font-size:.9rem; font-weight:600; text-decoration:underline; text-underline-offset:.2em; }
.protocol-technology-note { margin:.65rem 0 1.3rem; color:var(--theme-muted,#c7bbd4); font-size:.86rem; line-height:1.6; max-width:80ch; }
.protocol-footer-links { display:flex; flex-direction:column; gap:.55rem; font-size:.9rem; }
.protocol-footer-links a { text-decoration:underline; text-underline-offset:.2em; }
.protocol-notice { padding:1.2rem; margin:1rem 0 1.6rem; border:1px solid var(--theme-line,#483950); border-radius:.7rem; background:var(--theme-panel,#1d1727); color:var(--theme-text,#f8f4ff); }
.protocol-notice p { margin:.5rem 0 .8rem; line-height:1.65; color:var(--theme-muted,#c7bbd4); }
.protocol-notice nav { display:flex; flex-wrap:wrap; gap:.7rem 1.5rem; }
.protocol-notice a { color:var(--theme-accent,#d7b7fb); text-decoration:underline; text-underline-offset:.2em; }
.protocol-page { padding-block:clamp(2rem,6vw,5rem); color:var(--theme-text); }
.protocol-heading { max-width:57rem; padding-bottom:2rem; }
.protocol-heading h1 { max-width:none; overflow-wrap:normal; word-break:normal; margin:.6rem 0 1.4rem; font-size:clamp(1.95rem,5vw,4.2rem); line-height:1.08; letter-spacing:-.045em; text-wrap:balance; }
.protocol-manifest { padding:1.2rem 1.4rem; border-inline-start:3px solid var(--theme-accent); border-radius:0 .65rem .65rem 0; background:var(--theme-panel); font-size:clamp(1rem,2vw,1.22rem); line-height:1.7; margin:0 0 1.2rem; }
.protocol-shortcuts { display:flex; flex-wrap:wrap; gap:.6rem 1.4rem; margin-top:1rem; }
.protocol-shortcuts a { color:var(--theme-accent); text-decoration:underline; text-underline-offset:.2em; line-height:1.6; }
.protocol-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1.1rem; }
.protocol-grid article { padding:clamp(1.2rem,3vw,2rem); border:1px solid var(--theme-line); border-radius:.75rem; background:var(--theme-panel); }
.protocol-caption { display:block; color:var(--theme-accent); font:550 .8rem/1.5 var(--mono,monospace); margin:0 0 .75rem; }
.protocol-page h2 { font-size:clamp(1.4rem,3vw,2rem); line-height:1.25; margin:.3rem 0 1rem; letter-spacing:-.025em; }
.protocol-page h3 { font-size:1.1rem; line-height:1.4; margin:0 0 .5rem; }
.protocol-page p { line-height:1.7; }
.protocol-grid p,.protocol-section>p,.protocol-section header>p:not(.protocol-caption),.protocol-exit-list p { color:var(--theme-muted); margin:0; }
.protocol-section { margin-top:clamp(2rem,5vw,4rem); padding-top:clamp(1.5rem,3vw,2.5rem); border-top:1px solid var(--theme-line); scroll-margin-top:6rem; }
.protocol-identity { display:flex; gap:1rem; padding:1.3rem; border:1px solid var(--theme-line); border-radius:.75rem; background:var(--theme-panel); }
.protocol-identity p { color:var(--theme-muted); margin:0; }
.protocol-identity a { color:var(--theme-accent); }
.protocol-account-mark { flex:0 0 3rem; height:3rem; display:grid; place-items:center; background:var(--theme-raised); border:1px solid var(--theme-line); border-radius:.65rem; color:var(--theme-accent); font:600 1.6rem var(--mono,monospace); }
.protocol-link-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.8rem; margin:1rem 0; }
.protocol-link-grid a { display:grid; gap:.45rem; padding:1.1rem; border:1px solid var(--theme-line); border-radius:.65rem; background:var(--theme-panel); }
.protocol-link-grid strong { color:var(--theme-accent); }
.protocol-link-grid span { font-size:.9rem; color:var(--theme-muted); line-height:1.6; }
.protocol-limit { padding:1.1rem; border-inline-start:2px solid var(--theme-line); font-size:.95rem; }
.protocol-section>p+p { margin-top:1rem; }
.protocol-exit-list { display:grid; gap:.9rem; margin-top:1.3rem; }
.protocol-exit-list article { display:grid; grid-template-columns:minmax(12rem,.8fr) minmax(0,2fr); gap:1.3rem; padding:1.3rem; border:1px solid var(--theme-line); border-radius:.65rem; background:var(--theme-panel); }
@media(max-width:760px) { .protocol-grid,.protocol-link-grid { grid-template-columns:minmax(0,1fr); } .protocol-exit-list article { grid-template-columns:minmax(0,1fr); gap:.3rem; } .protocol-identity { align-items:start; } }

@media (max-width: 760px) { .directory-grid .directory-group:last-child { grid-column:1/-1; } .directory-grid .directory-group:last-child ul { display:flex; flex-wrap:wrap; gap:.4rem 1.35rem; } }

/* company-identity.css */
.company-founders,.company-registration { color:var(--theme-text); }
.identity-eyebrow { color:var(--theme-accent); font:550 .75rem/1.6 var(--mono,monospace); letter-spacing:.08em; text-transform:uppercase; margin:0 0 .8rem; }
.company-founders { display:grid; grid-template-columns:minmax(0,.82fr) minmax(0,1.7fr); gap:2rem; padding-block:clamp(2rem,5vw,4rem); scroll-margin-top:6rem; }
.company-founders-intro h2 { font-size:clamp(1.9rem,3.1vw,3rem); line-height:1.12; letter-spacing:-.04em; margin:0 0 1.1rem; }
.company-founders-intro>p:not(.identity-eyebrow) { color:var(--theme-muted); line-height:1.75; font-size:.98rem; margin:0 0 1.15rem; }
.company-founders-story,.company-founders-company a,.company-registration-source a { color:var(--theme-accent); font-weight:600; font-size:.9rem; text-decoration:underline; text-underline-offset:.24em; }
.company-founders-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1.1rem; min-width:0; }
.founder-card { min-width:0; overflow:hidden; border:1px solid var(--theme-line); background:var(--theme-panel); border-radius:1rem; }
.founder-portrait { aspect-ratio:1/1.12; overflow:hidden; background:var(--theme-raised); }
.founder-portrait img { width:100%; height:100%; display:block; object-fit:cover; object-position:center 35%; transition:transform .45s ease; }
@media(hover:hover) { .founder-card:hover .founder-portrait img { transform:scale(1.025); } }
.founder-details { padding:1.25rem; }
.founder-role { color:var(--theme-muted); font-size:.75rem; line-height:1.55; margin:0 0 .55rem; }
.founder-details h3 { color:var(--theme-text); font-size:clamp(1.1rem,1.5vw,1.4rem); line-height:1.25; letter-spacing:-.025em; margin:0 0 .7rem; }
.founder-experience { color:var(--theme-accent); font-size:.82rem; line-height:1.6; margin:0 0 .5rem; font-weight:600; }
.founder-summary,.founder-detail { color:var(--theme-muted); font-size:.88rem; line-height:1.75; margin:0; }
.founder-detail { margin-top:.85rem; }
.founder-skills { display:flex; flex-wrap:wrap; gap:.45rem; list-style:none; padding:0; margin:1rem 0 0; }
.founder-skills li { color:var(--theme-accent); background:var(--theme-raised); border:1px solid var(--theme-line); border-radius:.4rem; font-size:.7rem; line-height:1.5; padding:.3rem .5rem; }
.company-founders-company { grid-column:1/-1; display:flex; flex-wrap:wrap; align-items:center; gap:.6rem 1.5rem; color:var(--theme-muted); font-size:.8rem; padding-top:1.1rem; border-top:1px solid var(--theme-line); }
.company-founders-company a { margin-left:auto; font-size:.8rem; }
.company-founders-detailed { grid-template-columns:minmax(0,1fr); }
.company-founders-detailed .company-founders-intro { max-width:48rem; }
.company-founders-detailed .founder-portrait { aspect-ratio:1.35/1; }
.company-founders-detailed .founder-details { padding:clamp(1.2rem,3vw,1.8rem); }
.company-founders-detailed .founder-details h3 { font-size:1.6rem; }
.company-registration { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.15fr); gap:1.5rem 2rem; padding:clamp(1.2rem,3vw,2.25rem); margin:2rem 0; border:1px solid var(--theme-line); border-radius:1rem; background:var(--theme-panel); scroll-margin-top:6rem; }
.company-registration-heading h2 { font-size:clamp(1.5rem,3vw,2.2rem); line-height:1.2; letter-spacing:-.03em; margin:0 0 1rem; }
.company-registration-heading>p:not(.identity-eyebrow) { color:var(--theme-muted); line-height:1.75; font-size:.95rem; }
.company-registration-facts { display:grid; gap:.85rem; margin:0; }
.company-registration-facts>div { border-bottom:1px solid var(--theme-line); padding-bottom:.85rem; min-width:0; }
.company-registration-facts dt { color:var(--theme-muted); font-size:.75rem; margin-bottom:.35rem; }
.company-registration-facts dd { margin:0; color:var(--theme-text); font-size:.92rem; line-height:1.6; overflow-wrap:anywhere; }
.company-registration-source { grid-column:1/-1; padding-top:1rem; border-top:1px solid var(--theme-line); }
.company-registration-source p { color:var(--theme-muted); font-size:.78rem; line-height:1.6; margin:.55rem 0 0; }
.directory-legal .company-footer-address { display:block; color:var(--theme-muted); font-size:.77rem; line-height:1.6; margin-top:.55rem; }
.company-inline-registration { color:var(--theme-muted); line-height:1.7; font-size:.9rem; margin-top:1rem; }
.company-inline-registration a { color:var(--theme-accent); text-decoration:underline; text-underline-offset:.2em; }
@media(max-width:1000px) { .company-founders { grid-template-columns:minmax(0,1fr); } .company-founders-intro { max-width:45rem; } }
@media(max-width:640px) { .company-founders-grid,.company-registration { grid-template-columns:minmax(0,1fr); } .company-founders { gap:1.35rem; } .company-founders-company { gap:.5rem 1rem; } .company-founders-company a { margin-left:0; width:100%; } .founder-portrait,.company-founders-detailed .founder-portrait { aspect-ratio:1.2/1; } .founder-details h3 { font-size:1.45rem; } .company-registration { gap:1.35rem; } }
@media(prefers-reduced-motion:reduce) { .founder-portrait img { transition:none; } .founder-card:hover .founder-portrait img { transform:none; } }
.company-story-page { padding-bottom:2rem; }
.company-story-page>.company-heading { max-width:58rem; }
.company-story-chapters { margin-top:2rem; }
.company-story-chapter { display:grid; grid-template-columns:minmax(8rem,.45fr) minmax(0,2fr); gap:1.25rem 3rem; padding:2rem 0; border-top:1px solid var(--theme-line); }
.company-story-chapter h2 { font-size:clamp(1.45rem,2.8vw,2.2rem); line-height:1.25; letter-spacing:-.025em; margin:0 0 1.1rem; }
.company-story-chapter p { color:var(--theme-muted); max-width:76ch; line-height:1.8; margin:0 0 .9rem; }
.company-story-chapter p:last-child { margin-bottom:0; }
.company-published-record { padding:clamp(1.2rem,3vw,2rem); border:1px solid var(--theme-line); background:var(--theme-panel); border-radius:1rem; margin:1.5rem 0; scroll-margin-top:6rem; }
.company-published-record h2 { font-size:clamp(1.35rem,2.8vw,1.9rem); line-height:1.3; margin-bottom:1.5rem; }
.company-published-record dl { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; margin:0 0 1.25rem; }
.company-published-record dt { color:var(--theme-muted); font-size:.8rem; line-height:1.5; margin-bottom:.5rem; }
.company-published-record dd { margin:0; font:650 clamp(1.8rem,4vw,2.6rem)/1.2 var(--mono,monospace); color:var(--theme-accent); }
.company-published-record>p { font-size:.88rem; line-height:1.75; color:var(--theme-muted); }
.company-roadmap { padding-block:clamp(2rem,5vw,4rem); scroll-margin-top:6rem; }
.company-roadmap header { max-width:53rem; margin-bottom:1.5rem; }
.company-roadmap h2 { font-size:clamp(1.65rem,3vw,2.5rem); line-height:1.2; margin:0 0 1rem; letter-spacing:-.03em; }
.company-roadmap header>p:not(.identity-eyebrow) { color:var(--theme-muted); font-size:.95rem; line-height:1.75; }
.company-roadmap ol { list-style:none; padding:0; margin:0; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1rem; }
.company-roadmap li { padding:1.25rem; border:1px solid var(--theme-line); background:var(--theme-panel); border-radius:.85rem; }
.roadmap-status { display:inline-block; color:var(--theme-accent); font:500 .7rem/1.6 var(--mono,monospace); margin-bottom:1.1rem; }
.roadmap-status.is-live { color:var(--theme-success); }
.company-roadmap h3 { font-size:1.08rem; line-height:1.4; margin:0 0 .8rem; letter-spacing:-.02em; }
.company-roadmap li>p { font-size:.85rem; line-height:1.75; color:var(--theme-muted); margin:0; }
@media(max-width:1000px) { .company-roadmap ol { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:640px) { .company-story-chapter,.company-roadmap ol { grid-template-columns:minmax(0,1fr); } .company-story-chapter { gap:.4rem; padding:1.5rem 0; } .company-published-record dl { grid-template-columns:minmax(0,1fr); } .company-published-record dl>div { padding-bottom:.8rem; border-bottom:1px solid var(--theme-line); } }

/* site-theme.css */
/* Shared palette for public pages, documentation and the integration form. */
:root {
  color-scheme: dark;
  --theme-canvas: #111017;
  --theme-header: #15121c;
  --theme-panel: #1d1727;
  --theme-raised: #291f36;
  --theme-text: #f8f4ff;
  --theme-muted: #c7bbd4;
  --theme-line: #483950;
  --theme-accent: #d7b7fb;
  --theme-hover: #352745;
  --theme-success: #abdfc3;
  --theme-danger: #ffb5c7;
  --theme-warning: #f6cb97;
  --theme-focus: #d1adff;
}

html[data-theme="light"] {
  color-scheme: light;
  --theme-canvas: #f6f5fa;
  --theme-header: #fff;
  --theme-panel: #fff;
  --theme-raised: #f3edf9;
  --theme-text: #272034;
  --theme-muted: #574b65;
  --theme-line: #dcd3e6;
  --theme-accent: #613b8d;
  --theme-hover: #ede3f6;
  --theme-success: #236047;
  --theme-danger: #922d51;
  --theme-warning: #784a1b;
  --theme-focus: #7751ad;
  --background: var(--theme-canvas);
  --surface: var(--theme-panel);
  --surface-high: var(--theme-raised);
  --text: var(--theme-text);
  --muted: var(--theme-muted);
  --accent: var(--theme-accent);
  --line: var(--theme-line);
  --border: var(--theme-line);
}

.site-header { color: var(--theme-text); background: var(--theme-header); border-color: var(--theme-line); }
.site-header .language-switch { color: var(--theme-text); --language-line: var(--theme-line); }
.site-header :focus-visible, html[data-theme="light"] :focus-visible { outline-color: var(--theme-focus); }
.site-menu-group > summary, .site-menu-panel small { color: var(--theme-muted); }
.site-menu-group.is-current > summary, .site-menu-group > summary svg, .site-header .site-doc-jump { color: var(--theme-accent); }
.site-menu-group[open] > summary, .site-menu-group > summary:hover,
.site-menu-panel a:hover, .site-menu-panel a[aria-current="page"] { background: var(--theme-hover); color: var(--theme-text); }
.site-header .site-menu-panel {
  color: var(--theme-text);
  border-color: var(--theme-line);
  background: var(--theme-panel);
  box-shadow: 0 15px 28px #1e10252e;
}

.site-header[data-menu-ready] .site-menu-toggle, .site-header .site-theme-toggle {
  color: var(--theme-text);
  background: var(--theme-raised);
  border: 1px solid var(--theme-line);
}
.site-theme-toggle:not([hidden]) { display: grid; place-items: center; }
.site-theme-toggle {
  width: 2.45rem;
  height: 2.45rem;
  padding: 0;
  border-radius: .48rem;
  cursor: pointer;
}
.site-header .site-theme-toggle:hover, .site-header .site-menu-toggle:hover { background: var(--theme-hover); }
.site-theme-toggle .site-theme-moon, .site-theme-toggle[aria-checked="true"] .site-theme-sun { display: none; }
.site-theme-toggle[aria-checked="true"] .site-theme-moon { display: block; }
html[data-theme="light"] .site-header .site-workspace {
  color: #fff;
  background: #603b90;
}
html[data-theme="light"] .site-header .site-workspace:hover { background: #7047a2; }

@media (max-width: 960px) {
  .site-theme-toggle { width: 2.3rem; height: 2.3rem; }
  .site-header[data-menu-ready] .site-menu { background: var(--theme-panel); border-color: var(--theme-line); }
  .site-header .site-menu-panel { background: transparent; box-shadow: none; }
}
@media (max-width: 390px) {
  .site-header-inner { width: calc(100% - 1.5rem); gap: .4rem; }
  .site-header .site-brand { font-size: 1.06rem; }
  .site-header .site-brand img { width: 1.4rem; }
  .site-header-actions { gap: .28rem; }
  .site-header-actions .language-switch, .site-header[data-menu-ready] .site-menu-toggle, .site-header .site-theme-toggle {
    width: 2rem;
    min-width: 2rem;
    height: 2.15rem;
    min-height: 2.15rem;
    padding: 0;
  }
  .site-header .site-workspace { min-height: 2.15rem; padding-inline: .5rem; font-size: .75rem; }
}

:root .directory-footer {
  background: var(--theme-header);
  color: var(--theme-text);
  border-color: var(--theme-line);
}
:root .directory-footer h2 { color: var(--theme-text); }
:root .directory-footer a, :root .directory-footer small { color: var(--theme-muted); }
:root .directory-footer a:hover { color: var(--theme-accent); }
:root .directory-floor { border-color: var(--theme-line); }

/* Product pages share the same surfaces as the rest of the site. */
.public-platform {
  color-scheme: inherit;
  --public-bg: var(--theme-canvas);
  --public-panel: var(--theme-panel);
  --public-raised: var(--theme-raised);
  --public-line: var(--theme-line);
  --public-text: var(--theme-text);
  --public-muted: var(--theme-muted);
  --public-accent: var(--theme-accent);
}
.product-platform { color-scheme: inherit; }
.product-platform :is(.product-sidebar,.product-intro,.product-cards article,.product-steps,.product-table,.product-ledger,.pool-model-card,.pool-sim) {
  background: var(--theme-panel);
  border-color: var(--theme-line);
}
.product-platform :is(.product-sidebar-label,#calculator-scenarios) { color: var(--theme-muted); }
.product-sidebar a:hover, .product-platform .public-button.secondary:hover { background: var(--theme-hover); }
.product-sidebar a[aria-current="page"], .product-platform :is(.product-steps li > span,.product-table thead th,.product-ledger dl > .product-ledger-total,.pool-sim-results > div:last-child) {
  background: var(--theme-raised);
  color: var(--theme-accent);
  border-color: var(--theme-line);
}
.product-platform .public-button.secondary, html[data-theme="light"] .public-button.secondary {
  background: var(--theme-panel);
  color: var(--theme-accent);
}
.product-platform .public-button.primary, html[data-theme="light"] .public-button.primary {
  background: #603b90;
  border-color: #603b90;
  color: #fff;
}
.product-platform .public-button.primary:hover, html[data-theme="light"] .public-button.primary:hover {
  background: #7047a2;
  border-color: #7047a2;
}
.product-platform :is(.pool-sim-fields input,.pool-sim-fields select,.calculation-input input,#calculator-example) {
  color: var(--theme-text);
  background: var(--theme-panel);
  border-color: var(--theme-line);
}
.product-platform .product-report-status { background: var(--theme-raised); border-color: var(--theme-line); }
.product-platform :is(.pool-sim-error,#pool-calendar-error,#calculator-error) { color: var(--theme-danger); }
html[data-theme="light"] .product-platform .calculation-output {
  background: var(--theme-raised);
  color: var(--theme-text);
  border-color: var(--theme-line);
}
html[data-theme="light"] .product-platform .calculation-output p { color: var(--theme-muted); }
html[data-theme="light"] .product-platform .calculation-output dl > div { border-color: var(--theme-line); }
html[data-theme="light"] .product-platform #margin-result { color: var(--theme-success); }
html[data-theme="light"] .product-platform #margin-result.is-loss { color: var(--theme-danger); }

/* Keep the reference text and controls legible in either palette. */
.documentation-page {
  --doc-bg: var(--theme-canvas);
  --doc-paper: var(--theme-panel);
  --doc-ink: var(--theme-text);
  --doc-text: var(--theme-muted);
  --doc-muted: var(--theme-muted);
  --doc-line: var(--theme-line);
  --doc-link: var(--theme-accent);
  --doc-soft: var(--theme-hover);
}
.documentation-page a:hover { color: var(--theme-accent); }
.documentation-page :focus-visible { outline-color: var(--theme-focus); }
.documentation-page .site-header a:hover { color: var(--theme-text); }
.documentation-page .site-header .site-workspace:hover { color: #1a1126; }
html[data-theme="light"] .documentation-page .site-header .site-workspace:hover { color: #fff; }
.documentation-page .doc-hero {
  background: linear-gradient(125deg, var(--theme-raised), var(--theme-panel) 80%);
}
.documentation-page :is(.doc-skip,.doc-search-field,.doc-search-panel,.doc-hero-links a,.doc-code-heading button) {
  background: var(--theme-panel);
  color: var(--theme-accent);
  border-color: var(--theme-line);
}
.documentation-page :is(.doc-sidebar,.doc-right) a:hover, .documentation-page .doc-downloads a:hover {
  background: var(--theme-hover);
}
.documentation-page .doc-hero-links a:first-child { background: #603b90; border-color: #603b90; color: #fff; }
.documentation-page :is(.doc-search kbd,.doc-table thead th,.doc-section code,.doc-section pre,.doc-code,.doc-note) {
  background: var(--theme-raised);
  border-color: var(--theme-line);
}
.documentation-page .doc-note { border-left-color: var(--theme-accent); }
.documentation-page .doc-section code { color: var(--theme-accent); }
.documentation-page .doc-section pre code { background: transparent; color: var(--theme-text); }

/* Landing and company pages use the light palette across reading and form surfaces. */
html[data-theme="light"] .infrastructure-page {
  color: var(--theme-text);
  background: radial-gradient(ellipse at 74% 0, #fcfaff, transparent 42rem), var(--theme-canvas);
  --landing-border: var(--theme-line);
  --landing-soft: var(--theme-muted);
}
html[data-theme="light"] .infrastructure-page #headline span { color: var(--theme-accent); }
html[data-theme="light"] .infrastructure-page #headline .hero-title-main { color: var(--theme-text); }
html[data-theme="light"] :is(.hero-secondary,.hero-settlement-flow) { color: var(--theme-muted); }
html[data-theme="light"] .hero-halo { background: radial-gradient(ellipse at 68% 30%, #ede4f666, transparent 70%); }
html[data-theme="light"] .infrastructure-page .hero-grid { opacity: .2; }
html[data-theme="light"] .ecosystem-references .technology-brand { color: var(--theme-text); }
html[data-theme="light"] .ecosystem-references .technology-brand img[src$=".svg"] { filter: brightness(0) saturate(100%) opacity(.8); }
html[data-theme="light"] :is(.process-grid li,.capacity-card,.stage,.task-card,.control-card,.resource-card,.exception-table,.faq details,.pool-terms) {
  background: var(--theme-panel);
  border-color: var(--theme-line);
}
html[data-theme="light"] :is(.pool-terms,.resource-card,.task-card,.exception-table,.faq details) { color: var(--theme-text); }
html[data-theme="light"] :is(.task-icon,.process-icon,.currency-input,.allowlist summary,.allowlist-options) {
  background: var(--theme-raised);
  color: var(--theme-accent);
  border-color: var(--theme-line);
}
html[data-theme="light"] .allowlist-options label:hover, html[data-theme="light"] .resource-card:hover { background: var(--theme-hover); }
html[data-theme="light"] :is(.expense-table thead th,.expense-table tbody td) { color: var(--theme-muted); border-color: var(--theme-line); }
html[data-theme="light"] .expense-table tfoot :is(th, td) { background: var(--theme-raised); border-color: var(--theme-line); }
html[data-theme="light"] :is(.task-message,.task-message[data-tone="hold"]) { color: var(--theme-accent); }
html[data-theme="light"] :is(.product-gateway,.architecture-notes article,.docs-links a,.team-grid article) {
  background: var(--theme-panel);
  border-color: var(--theme-line);
}
html[data-theme="light"] .docs-links a:hover { background: var(--theme-hover); }

html[data-theme="light"] .operations-strip { background: var(--theme-raised); border-color: var(--theme-line); }
html[data-theme="light"] :is(.operations-metric,.operations-status) {
  background: var(--theme-panel);
  border-color: var(--theme-line);
  color: var(--theme-text);
}
html[data-theme="light"] .operations-payout[data-metric-state="reported"] { background: #f0e7fa; border-color: #c8b4e0; }
html[data-theme="light"] :is(.operations-heading-mark,.operations-metric[data-metric-state="empty"] .operations-reading strong) {
  background: var(--theme-raised);
  border-color: var(--theme-line);
  color: var(--theme-accent);
}
html[data-theme="light"] :is(.operations-metric dt,.operations-reading) { color: var(--theme-text); }
html[data-theme="light"] :is(.operations-unit,.operations-metric small,.operations-rework) {
  color: var(--theme-muted);
  border-color: var(--theme-line);
}
html[data-theme="light"] :is(.operations-metric dt .icon,.operations-rework .icon) { color: var(--theme-accent); }

/* Code windows retain a dark editor palette inside the light site. */
html[data-theme="light"] :is(.architecture-window,.quickstart-window,.technical-lab .workbench,.company-window) {
  color: #f3e9ff;
  --landing-soft: #d1c1df;
  --accent: #dab9f9;
  --muted: #d1c1df;
}
html[data-theme="light"] .infrastructure-page .settlement-console {
  box-shadow: 0 1.5rem 3.25rem #311d4526;
}
html[data-theme="light"] .company-platform {
  --company-panel: var(--theme-panel);
  --company-icon-bg: var(--theme-raised);
  --company-icon-line: #d8c8e7;
}
html[data-theme="light"] .company-platform #main { background: radial-gradient(ellipse at 75% 0, #eee6f7, transparent 43rem); }
html[data-theme="light"] .company-window { box-shadow: 0 1.2rem 2.8rem #311d4526; }
html[data-theme="light"] .infrastructure-page .button { background: #603b90; border-color: #603b90; color: #fff; }
html[data-theme="light"] .infrastructure-page .button:hover { background: #7047a2; }
html[data-theme="light"] .company-nav-bar { background: var(--theme-panel); }
html[data-theme="light"] .company-nav a.is-active { background: var(--theme-hover); border-color: var(--theme-line); }
html[data-theme="light"] :is(.company-story,.company-next) {
  background: var(--theme-raised);
  border-color: var(--theme-line);
}
html[data-theme="light"] .company-window .support-map {
  --public-accent: #dfc4ff;
  --company-icon-line: #624d79;
}
html:not([data-theme="light"]) .company-doc-body {
  --public-line: var(--theme-line);
  --public-muted: var(--theme-muted);
  --public-accent: var(--theme-accent);
  background: var(--theme-panel);
  color: var(--theme-text);
}

html[data-theme="light"] .package-board {
  background: var(--theme-panel);
  color: var(--theme-text);
  border-color: var(--theme-line);
}
html[data-theme="light"] :is(.package-titlebar,.package-icon) {
  background: var(--theme-raised);
  color: var(--theme-accent);
  border-color: var(--theme-line);
}
html[data-theme="light"] .package-grid { background: var(--theme-line); }
html[data-theme="light"] .package-card { background: var(--theme-panel); }
html[data-theme="light"] .package-board :is(h2,h3,.package-metrics dd) { color: var(--theme-text); }
html[data-theme="light"] .package-board :is(code,.package-volume,.package-acceptance strong) { color: var(--theme-accent); }
html[data-theme="light"] .package-board :is(.package-metrics dt,.package-status,.package-entry-period,.package-acceptance label) { color: var(--theme-muted); }
html[data-theme="light"] .package-board [data-state="active"] .package-status { color: var(--theme-success); }
html[data-theme="light"] .package-board [data-state="dispute"] .package-status { color: var(--theme-warning); }
html[data-theme="light"] :is(.package-metrics,.package-entry + .package-entry) { border-color: var(--theme-line); }
html[data-theme="light"] :is(.package-entry summary:hover,.package-entry[open] summary) { background: var(--theme-hover); }
html[data-theme="light"] .package-entry summary::after { color: var(--theme-accent); }
html[data-theme="light"] .package-acceptance meter::-webkit-meter-bar { background: var(--theme-hover); }

html:not([data-theme="light"]) .company-intake { background: var(--theme-canvas); color: var(--theme-text); }
html:not([data-theme="light"]) .company-intake :is(.auth-top,.auth-card,.company-process) { border-color: var(--theme-line); }
html:not([data-theme="light"]) .company-intake :is(.brand,h1,h2,.auth-card) { color: var(--theme-text); }
html:not([data-theme="light"]) .company-intake :is(.language-switch,.company-back,small a) { color: var(--theme-accent); }
html:not([data-theme="light"]) .company-intake :is(.auth-intro > p,.auth-card p,.company-process ol,.auth-form small) { color: var(--theme-muted); }
html:not([data-theme="light"]) .company-intake .auth-card { background: var(--theme-panel); }
html:not([data-theme="light"]) .company-intake .auth-form :is(input,select,textarea) {
  background: var(--theme-raised);
  color: var(--theme-text);
  border-color: var(--theme-line);
}
html:not([data-theme="light"]) .company-intake .auth-form .error {
  background: var(--theme-raised);
  color: var(--theme-danger);
  border-color: var(--theme-line);
}
html[data-theme="light"] .company-intake .theme-toggle {
  background: var(--theme-panel);
  color: var(--theme-accent);
  border-color: var(--theme-line);
}

@media (max-width: 530px) {
  .company-nav:has(> a[href$="/help"]) { display: flex; }
  .company-nav:has(> a[href$="/help"]) a {
    flex: 1 0 auto;
    justify-content: center;
    font-size: .73rem;
    white-space: nowrap;
  }
}

/* language.css */
.language-switch {
  --language-line: #8c78aa;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex: none;
  min-width: 2.45rem;
  min-height: 2.35rem;
  padding: .25rem .48rem;
  border: 1px solid var(--language-line);
  border-radius: .45rem;
  color: inherit;
  font: 720 .72rem/1.15 Inter, system-ui, sans-serif;
  letter-spacing: .04em;
  text-decoration: none;
}
.language-switch:hover { background: color-mix(in srgb, currentColor 9%, transparent); }
.language-switch:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.home-header-actions { display:flex; align-items:center; justify-self:end; gap:.65rem; }
.home-header-actions .button-top { white-space:nowrap; }
.doc-header .language-switch { --language-line:#c2c8db; }
html[lang=ru] :is(.doc-hero h1,.infrastructure-page .hero h1) { letter-spacing:-.045em; }
html[lang=ru] .infrastructure-page .hero h1 { max-width:16ch; font-size:clamp(2.5rem,4.45vw,4.25rem); }
html[lang=ru] .main-nav { gap:clamp(.68rem,2.5vw,2.3rem); }
html[lang=ru] .doc-hero h1 { font-size:clamp(2rem,5.1vw,4.1rem); overflow-wrap:anywhere; }
html[lang=ru] .doc-header-links { gap:clamp(.45rem,1.4vw,1.3rem); }
html[lang=ru] .code-lines { font-variant-ligatures:none; }
@media(max-width:900px) { .public-header .header-layout { gap:.6rem; } }
@media(max-width:780px) {
  .doc-header .doc-header-links > a.language-switch { display:inline-flex; }
  .doc-header .language-switch { min-width:2rem; min-height:2rem; }
  html[lang=ru] .doc-header .doc-label { display:none; }
}
@media(max-width:640px) {
  .home-header-actions { gap:.45rem; justify-self:end; grid-column:2 / -1; }
  html[lang=ru] .infrastructure-page .hero h1 { max-width:17ch; font-size:clamp(2.35rem,7.5vw,3.7rem); }
}
@media(max-width:380px) {
  .language-switch { min-width:2.1rem; min-height:2.1rem; }
  .doc-header-links .doc-workspace { padding-inline:.38rem; }
}

html[lang=ru] .workbench-nav { gap:.2rem; }
html[lang=ru] .workbench-nav a { padding-inline:.48rem; }
html[lang=ru] .auth-intro h1 { letter-spacing:-.035em; }
@media(max-width:1100px) { html[lang=ru] .workbench-profile .env-pill { display:none; } }
@media(max-width:420px) { .public-header .header-actions { gap:.4rem; } .public-header .header-actions .public-button { padding-inline:.46rem; } }
@media (641px <= width <= 840px) {
  .infrastructure-page .topbar { grid-template-columns:1fr auto; gap:.6rem; }
  .infrastructure-page .home-header-actions { grid-column:2; }
  .infrastructure-page .nav-toggle { display:grid; place-items:center; width:2.5rem; height:2.5rem; border:1px solid var(--border); border-radius:.45rem; color:var(--text); background:#201a2a; }
  .infrastructure-page .main-nav { display:none; position:absolute; inset:calc(100% + .4rem) 0 auto; padding:.35rem; background:#201a2b; border:1px solid #8e70b6; border-radius:.55rem; box-shadow:0 8px 24px #08051196; }
  .infrastructure-page .main-nav.is-open { display:grid; gap:0; }
  .infrastructure-page .main-nav a { padding:.62rem .75rem; border-radius:.25rem; }
  .infrastructure-page .main-nav a:hover { background:#37274b; }
}
html[lang=ru] .doc-footer nav { flex-wrap:wrap; gap:.5rem .85rem; }
html[lang=ru] .doc-table :is(td,th) { overflow-wrap:anywhere; }
html[lang=ru] .home-header-actions .button-top { min-width:0; }
html[lang=ru] .hero h1 { overflow-wrap:anywhere; }
@media(max-width:475px) {
  html[lang=ru] .expense-table { table-layout:fixed; }
  html[lang=ru] .expense-table :is(td,th) { white-space:normal; overflow-wrap:anywhere; }
  html[lang=ru] .expense-table :is(td,th):last-child { width:23%; }
  html[lang=ru] .expense-table tbody th span { display:block; }
  html[lang=ru] .expense-table tbody th .icon { margin-right:.24rem; vertical-align:-.12em; }
}
html[lang=ru] .infrastructure-page :is(.capacity-card,.settlement-card,.resource-card,.policy-summary,.receipt,.developer-heading) { overflow-wrap:anywhere; }
html[lang=ru] .infrastructure-page .expense-table :is(th,td) { overflow-wrap:anywhere; }
html[lang=ru] .infrastructure-page .receipt-state { white-space:normal; }
@media(min-width:641px) {
  html[lang=ru] .infrastructure-page .developer-heading { grid-template-columns:minmax(0,1.05fr) minmax(0,1fr); gap:1.1rem; }
  html[lang=ru] .infrastructure-page .developer-heading p { padding-inline-start:1.1rem; }
}
@media (761px <= width <= 880px) {
  html[lang=ru] .workbench-top { gap:.55rem; }
  html[lang=ru] .workbench-brand { padding-inline-end:.55rem; }
  html[lang=ru] .workbench-nav a { padding-inline:.36rem; font-size:.8rem; }
}
@media(max-width:390px) {
  html[lang=ru] .paid-header { flex-wrap:wrap; }
  html[lang=ru] .paid-balance { text-align:start; }
}

/* support-chat.css */
.support-launcher {
  position: fixed;
  z-index: 20;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: .52rem;
  padding: .68rem .94rem;
  min-height: 2.75rem;
  border: 1px solid #ad8bd5;
  border-radius: .8rem;
  background: #7049a3;
  box-shadow: 0 .6rem 1.75rem #100b214d;
  color: #fff;
  font-size: .87rem;
  font-weight: 690;
}
.support-launcher:hover, .support-button:not(.secondary):hover { background: #5e3a91; }
.support-launcher:focus-visible, .support-widget-dialog :focus-visible, .support-page :focus-visible {
  outline: 2px solid var(--theme-focus);
  outline-offset: 3px;
}
.support-widget-dialog {
  position: fixed;
  inset: auto max(1rem, env(safe-area-inset-right)) max(4.65rem, env(safe-area-inset-bottom)) auto;
  width: min(26.5rem, calc(100% - 2rem));
  height: min(34rem, calc(100dvh - 6rem));
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--theme-line);
  border-radius: 1rem;
  background: var(--theme-canvas);
  color: var(--theme-text);
  box-shadow: 0 1.35rem 4rem #160f254d;
}
.support-widget-dialog[open] { display: grid; grid-template-rows: auto minmax(0,1fr); }
.support-widget-dialog::backdrop { background: #100b2040; }
.support-widget-header, .support-page-header, .support-inbox-heading, .support-ticket-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.support-widget-header {
  padding: .7rem .85rem .7rem 1rem;
  background: var(--theme-panel);
  border-bottom: 1px solid var(--theme-line);
}
.support-widget-header h2 { font-size: 1rem; }
.support-widget-close, .support-header-actions .theme-toggle {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border: 1px solid var(--theme-line);
  border-radius: .5rem;
  color: var(--theme-text);
  background: var(--theme-raised);
  cursor: pointer;
}
.support-widget-close:hover, .support-header-actions .theme-toggle:hover { background: var(--theme-hover); }
.support-widget-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

.support-page { color: var(--theme-text); background: var(--theme-canvas); }
.support-page-header {
  min-height: 4.2rem;
  padding: .65rem clamp(1rem, 3vw, 2.1rem);
  border-bottom: 1px solid var(--theme-line);
  background: var(--theme-header);
}
.support-brand, .support-header-actions { display: flex; gap: .6rem; align-items: center; }
.support-brand { min-width: 0; color: var(--theme-text); font-weight: 720; }
.support-brand img, .support-header-actions { flex: none; }
.support-brand span { font-size: .78rem; font-weight: 510; color: var(--theme-muted); }
.support-header-actions .icon { width: 1.05rem; height: 1.05rem; }
.support-page-main { width: min(100% - 2rem, 43rem); margin: 0 auto; padding: clamp(1.3rem, 5vw, 3.2rem) 0; }
.support-page-main > h1 { margin: 0 0 1rem; font-size: clamp(1.7rem, 5vw, 2.5rem); }
.support-thread {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: min(35rem, 74dvh);
  min-height: 18rem;
  overflow: hidden;
  border: 1px solid var(--theme-line);
  border-radius: .8rem;
  background: var(--theme-panel);
}
.support-embedded .support-page-main { width: 100%; padding: 0; }
.support-embedded .support-thread { height: 100dvh; min-height: 0; border: 0; border-radius: 0; }
.support-thread-info { display: flex; justify-content: space-between; align-items: center; padding: .45rem .85rem; }
.support-thread-info, .support-ticket-reference { color: var(--theme-muted); font-size: .8rem; }
.support-state { padding: .2rem .5rem; border-radius: .4rem; background: var(--theme-raised); color: var(--theme-muted); font-size: .73rem; }
.support-state[data-state="open"] { color: var(--theme-warning); }
.support-state[data-state="answered"] { color: var(--theme-success); }
.support-transcript { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--theme-canvas); scrollbar-width: thin; }
.support-transcript:focus-visible { outline-offset: -2px; }
.support-welcome { padding: 1.55rem 1rem; text-align: center; }
.support-welcome-icon { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; margin: 0 auto .7rem; border-radius: .8rem; color: var(--theme-accent); background: var(--theme-raised); }
.support-welcome h2 { font-size: 1.16rem; }
.support-welcome p { margin: .4rem auto 0; max-width: 28ch; font-size: .87rem; color: var(--theme-muted); }
.support-messages { display: grid; gap: .7rem; list-style: none; padding: .85rem; margin: 0; }
.support-messages:empty { display: none; }
.support-message { justify-self: start; max-width: min(100%, 32rem); padding: .55rem .7rem; border: 1px solid var(--theme-line); border-radius: .62rem; background: var(--theme-panel); }
.support-page:not(.support-admin) .support-message[data-sender="visitor"], .support-admin .support-message[data-sender="admin"] { justify-self: end; background: var(--theme-raised); }
.support-message-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .7rem; margin-bottom: .25rem; }
.support-message-meta strong { font-size: .8rem; color: var(--theme-accent); }
.support-message-meta time { color: var(--theme-muted); font-size: .69rem; }
.support-message p { font-size: .9rem; line-height: 1.48; white-space: pre-wrap; overflow-wrap: anywhere; }
.support-composer { flex: none; padding: .65rem .85rem .75rem; border-top: 1px solid var(--theme-line); }
.support-input-label { display: block; margin: 0 0 .35rem; font-size: .78rem; color: var(--theme-muted); }
.support-input-row { display: flex; align-items: flex-end; gap: .55rem; }
.support-input-row textarea { min-width: 0; width: 100%; min-height: 2.65rem; max-height: 9rem; resize: vertical; border: 1px solid var(--theme-line); padding: .48rem .55rem; border-radius: .48rem; color: var(--theme-text); background: var(--theme-canvas); font: inherit; font-size: .88rem; }
.support-input-row textarea::placeholder { color: var(--theme-muted); opacity: 1; }
.support-button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.55rem; padding: .48rem .7rem; border: 1px solid #7651a7; border-radius: .48rem; background: #7049a3; color: #fff; font: inherit; font-size: .83rem; font-weight: 670; cursor: pointer; }
.support-button.secondary { background: var(--theme-panel); color: var(--theme-accent); border-color: var(--theme-line); }
.support-button.secondary:hover { background: var(--theme-hover); }
.support-button:disabled { opacity: .65; cursor: wait; }
.support-composer-note, .support-error { margin-top: .38rem; color: var(--theme-muted); font-size: .75rem; }
.support-error { color: var(--theme-danger); margin: 0 0 .4rem; }

.support-inbox-filters a { display: block; color: var(--theme-muted); border-radius: .44rem; }
.support-inbox-filters a[aria-current], .support-inbox-list a[aria-current] { color: var(--theme-accent); background: var(--theme-raised); }
.support-inbox-filters a:hover, .support-inbox-list a:hover { color: var(--theme-text); background: var(--theme-hover); }
.support-inbox-heading { align-items: end; margin-bottom: 1rem; }
.support-inbox-heading h1 { font-size: clamp(1.55rem, 4vw, 2.5rem); }
.support-inbox-placeholder p { color: var(--theme-muted); font-size: .88rem; margin-top: .35rem; }
.support-inbox-columns { display: grid; grid-template-columns: minmax(14rem, .72fr) minmax(0,1.28fr); gap: .9rem; align-items: start; }
.support-inbox-queue, .support-inbox-placeholder { min-width: 0; border: 1px solid var(--theme-line); border-radius: .8rem; background: var(--theme-panel); }
.support-inbox-filters { display: flex; flex-wrap: wrap; gap: .2rem; padding: .5rem; border-bottom: 1px solid var(--theme-line); }
.support-inbox-filters a { font-size: .78rem; padding: .32rem .42rem; }
.support-inbox-list { list-style: none; margin: 0; padding: 0; max-height: 60dvh; overflow-y: auto; }
.support-inbox-list li + li { border-top: 1px solid var(--theme-line); }
.support-inbox-list a { display: grid; gap: .24rem; padding: .58rem .72rem; color: var(--theme-text); }
.support-inbox-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .2rem .35rem; font-size: .77rem; }
.support-inbox-subject { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .9rem; }
.support-inbox-list small, .support-inbox-empty { color: var(--theme-muted); font-size: .8rem; }
.support-inbox-empty, .support-inbox-placeholder { padding: 1rem; }
.support-inbox-placeholder h2 { font-size: 1.2rem; }
.support-inbox-pagination { display: flex; gap: .8rem; padding: .65rem; }
.support-inbox-pagination a { color: var(--theme-accent); font-size: .83rem; }
.support-ticket-heading { align-items: flex-start; padding: .7rem .85rem; }
.support-ticket-heading h2 { font-size: 1rem; overflow-wrap: anywhere; }
.support-ticket-heading p { margin-top: .22rem; color: var(--theme-muted); font-size: .8rem; overflow-wrap: anywhere; }
.support-ticket-heading .support-state { flex-shrink: 0; }
.support-inbox-thread { height: min(47rem, 77dvh); min-height: 23rem; }
.support-ticket-actions { padding: 0 .85rem .7rem; }
.support-ticket-actions .support-button { min-height: 2rem; }

@media (max-width: 800px) {
  .support-inbox-columns { grid-template-columns: minmax(0,1fr); }
  .support-inbox-list { max-height: 16rem; }
}
@media (max-width: 530px) {
  .support-launcher span { display: none; }
  .support-launcher { justify-content: center; padding: 0; width: 2.95rem; height: 2.95rem; }
  .support-widget-dialog { inset: auto .6rem max(.6rem, env(safe-area-inset-bottom)) .6rem; width: calc(100% - 1.2rem); height: min(34rem, calc(100dvh - 1.2rem)); }
  .support-brand span { display: none; }
  .support-inbox-heading { align-items: flex-start; flex-direction: column; gap: .6rem; }
  .support-ticket-heading { gap: .45rem; flex-wrap: wrap; }
  .support-input-row { gap: .4rem; }
  .support-input-row .support-button { max-width: 7rem; white-space: normal; }
}

