:root {
  --paper: #f1f1ec;
  --paper-deep: #e7e7df;
  --ink: #151713;
  --muted: #62665d;
  --line: #cecec4;
  --dark: #111411;
  --dark-soft: #181c18;
  --dark-line: #30362f;
  --code: #d9dfd5;
  --code-muted: #788076;
  --accent: #d6ff43;
  --danger: #a22b24;
  --max-width: 1320px;
  --header-height: 62px;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; }

::selection {
  background: var(--accent);
  color: var(--ink);
}

.skip-link {
  position: fixed;
  z-index: 100;
  left: 16px;
  top: -60px;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
}

.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-height);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 max(24px, calc((100vw - var(--max-width)) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  width: max-content;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.wordmark-mark {
  width: 14px;
  height: 14px;
  display: inline-block;
  border: 4px solid var(--ink);
  background: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.site-nav a {
  padding: 7px 0 5px;
  border-bottom: 1px solid transparent;
  text-decoration: none;
}

.site-nav a:hover { border-color: var(--ink); }

.engine-state {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.header-account { justify-self: end; display: flex; align-items: center; gap: 18px; }
.header-account .engine-state { justify-self: auto; }
.account-link { color: var(--ink); font-size: 11px; font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--ink); }
.button-link { padding: 0; border: 0; border-bottom: 1px solid var(--ink); background: none; cursor: pointer; }

.state-light {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a66e29;
  box-shadow: 0 0 0 3px rgba(166, 110, 41, 0.12);
}

.engine-state.online .state-light {
  background: #2d7d3e;
  box-shadow: 0 0 0 3px rgba(45, 125, 62, 0.13);
}

main, .site-footer {
  width: min(calc(100% - 48px), var(--max-width));
  margin-inline: auto;
}

.product-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.72fr);
  gap: 80px;
  padding: 65px 0 54px;
  align-items: end;
}

.eyebrow {
  margin: 0 0 17px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.product-intro h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(42px, 5.1vw, 72px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.product-intro h1 span { color: #70756d; }

.intro-copy > p {
  max-width: 520px;
  margin: 0 0 30px;
  font-size: 16px;
  line-height: 1.55;
}

.intro-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  border-top: 1px solid var(--line);
}

.intro-facts div {
  padding: 13px 12px 0 0;
  border-right: 1px solid var(--line);
}

.intro-facts div + div { padding-left: 14px; }
.intro-facts div:last-child { border-right: 0; }

.intro-facts dt,
.result-grid dt,
.api-facts dt {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.intro-facts dd,
.api-facts dd {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 700;
}

.workbench {
  border: 1px solid var(--ink);
  background: var(--dark);
  box-shadow: 0 18px 55px rgba(24, 27, 22, 0.12);
}

.workbench-bar {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 15px 10px 18px;
  border-bottom: 1px solid var(--dark-line);
  color: var(--code);
}

.window-label {
  display: flex;
  align-items: center;
  gap: 13px;
}

.window-index {
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.window-label h2 {
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 700;
}

.window-label p {
  margin: 0;
  color: var(--code-muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.workbench-actions { display: flex; gap: 6px; }

.button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 14px;
  border: 1px solid currentColor;
  border-radius: 1px;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.button:disabled { cursor: not-allowed; opacity: 0.38; }

.button-quiet {
  border-color: var(--dark-line);
  color: #a7afa4;
}

.button-quiet:not(:disabled):hover {
  border-color: #717a6e;
  color: #fff;
}

.workbench-grid {
  min-height: 590px;
  display: grid;
  grid-template-columns: 204px minmax(420px, 1fr) 318px;
}

.file-rail {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 19px 13px 14px;
  border-right: 1px solid var(--dark-line);
  color: var(--code-muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.rail-section + .rail-section { margin-top: 27px; }

.rail-heading {
  margin: 0 0 9px;
  color: #8f998d;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.file-row {
  width: 100%;
  display: grid;
  grid-template-columns: 21px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border: 0;
  background: transparent;
  color: #aeb6ab;
  text-align: left;
  cursor: default;
}

.file-row.active { background: #20251f; color: #f3f5f1; }

.file-glyph {
  width: 17px;
  height: 19px;
  display: grid;
  place-items: center;
  border: 1px solid #586056;
  color: var(--accent);
  font-size: 8px;
  font-weight: 700;
}

.file-row > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-dot { width: 5px; height: 5px; border-radius: 50%; background: #656d63; }

.rail-meta p:not(.rail-heading) { margin: 5px 0; }

.rail-note {
  margin-top: auto;
  padding: 13px 9px 4px;
  border-top: 1px solid var(--dark-line);
  line-height: 1.5;
}

.rail-note span { color: #b7beb4; }
.rail-note p { margin: 5px 0 0; color: #8f998d; }

.editor-panel {
  min-width: 0;
  display: grid;
  grid-template-rows: 43px minmax(0, 1fr) 29px;
  background: var(--dark);
}

.editor-tabs {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--dark-line);
}

.editor-tab {
  min-width: 90px;
  padding: 0 16px;
  border: 0;
  border-right: 1px solid var(--dark-line);
  background: transparent;
  color: var(--code-muted);
  cursor: pointer;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  text-align: left;
}

.editor-tab.active {
  box-shadow: inset 0 2px var(--accent);
  background: #151915;
  color: var(--code);
}

.editor-tab:disabled { cursor: not-allowed; color: #4a5049; }

.editor-language {
  align-self: center;
  margin-left: auto;
  padding-right: 15px;
  color: #9ba499;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.editor-shell {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-columns: 51px minmax(0, 1fr);
  overflow: hidden;
}

.line-numbers {
  overflow: hidden;
  padding: 19px 13px 20px 0;
  border-right: 1px solid #20241f;
  color: #8f998d;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 20px;
  text-align: right;
  white-space: pre;
  user-select: none;
}

#source-editor {
  width: 100%;
  height: 100%;
  min-height: 0;
  resize: none;
  padding: 19px 22px 40px;
  border: 0;
  outline: 0;
  background: #151915;
  color: var(--code);
  caret-color: var(--accent);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 20px;
  tab-size: 4;
  white-space: pre;
  overflow: auto;
}

#source-editor[readonly] { color: #b9c2b6; }

.editor-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 19px;
  padding: 0 13px;
  border-top: 1px solid var(--dark-line);
  color: #929c90;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.editor-status span:first-child { margin-right: auto; }

.build-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 22px;
  background: var(--paper-deep);
  color: var(--ink);
}

.panel-heading,
.field-label-row,
.result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.panel-heading .eyebrow { margin-bottom: 0; }

.shortcut {
  padding: 3px 5px;
  border: 1px solid #c5c5bb;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.tier-select {
  margin: 26px 0 0;
  padding: 0;
  border: 0;
}

.tier-select legend,
.form-group > label,
.field-label-row > label:first-child {
  margin-bottom: 9px;
  font-size: 11px;
  font-weight: 700;
}

.tier-test-note {
  margin: 0 0 8px;
  color: #525d1f;
  font-size: 9px;
  line-height: 1.45;
}

.tier-test-note[hidden] { display: none; }

.tier-option {
  position: relative;
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr) auto;
  align-items: start;
  gap: 11px;
  padding: 14px 0;
  border-top: 1px solid #c8c8be;
  cursor: pointer;
}

.tier-option:last-child { border-bottom: 1px solid #c8c8be; }
.tier-option input { position: absolute; opacity: 0; pointer-events: none; }

.radio-mark {
  width: 13px;
  height: 13px;
  margin-top: 2px;
  border: 1px solid #757970;
  border-radius: 50%;
}

.tier-option input:checked + .radio-mark {
  border: 4px solid var(--ink);
  background: var(--accent);
}

.tier-option:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }

.tier-copy strong,
.tier-copy small { display: block; }
.tier-copy strong { margin-bottom: 4px; font-size: 12px; }
.tier-copy small { color: var(--muted); font-size: 10px; line-height: 1.45; }

.tier-tag {
  margin-top: 1px;
  padding: 2px 4px;
  border: 1px solid #bdbdb4;
  color: #595e56;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
  font-weight: 700;
}

.tier-tag.accent { border-color: #a8bd45; color: #525d1f; background: rgba(214, 255, 67, 0.33); }

.form-group { margin-top: 24px; }
.field-label-row > label:first-child { margin-bottom: 0; }

.mini-check {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
  cursor: pointer;
}

input[type="checkbox"] { accent-color: var(--ink); }

.text-input {
  width: 100%;
  height: 37px;
  padding: 0 10px;
  border: 1px solid #bfc0b5;
  border-radius: 0;
  background: #f4f4ef;
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.text-input:disabled { background: #dfdfd7; color: #8c8f86; }

.form-group p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0;
  font-size: 10px;
  cursor: pointer;
}

.button-primary {
  width: 100%;
  min-height: 44px;
  justify-content: space-between;
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.button-primary:hover:not(:disabled) { background: #282c26; }
.button-primary:disabled { opacity: 0.62; }

.build-error {
  margin-top: 12px;
  padding: 10px;
  border-left: 2px solid var(--danger);
  background: rgba(162, 43, 36, 0.06);
  color: var(--danger);
  font-size: 10px;
  line-height: 1.45;
}

.build-result {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid #c8c8be;
}

.result-heading { justify-content: flex-start; }

.result-check {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.result-heading strong,
.result-heading small { display: block; }
.result-heading strong { font-size: 11px; }
.result-heading small { margin-top: 1px; color: var(--muted); font-family: "SFMono-Regular", Consolas, monospace; font-size: 9px; }

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px 16px;
  margin: 18px 0 0;
}

.result-grid div { min-width: 0; }
.result-grid dd { margin: 3px 0 0; font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; font-weight: 700; }

.method-section { padding: 130px 0 110px; }

.section-heading {
  display: grid;
  grid-template-columns: 0.75fr 1.2fr 0.8fr;
  gap: 55px;
  align-items: start;
  padding-bottom: 43px;
  border-bottom: 1px solid var(--ink);
}

.section-heading > div { display: flex; align-items: baseline; gap: 15px; }
.section-heading .eyebrow { margin-bottom: 0; }

.section-number {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.section-heading h2,
.truth-section h2,
.api-section h2 {
  margin: 0;
  font-size: clamp(30px, 3.2vw, 46px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.section-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.method-table { display: grid; grid-template-columns: repeat(4, 1fr); }

.method-table article {
  min-height: 285px;
  display: flex;
  flex-direction: column;
  padding: 25px 22px 22px 0;
  border-right: 1px solid var(--line);
}

.method-table article + article { padding-left: 22px; }
.method-table article:last-child { border-right: 0; }

.method-index {
  color: #62675f;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.method-table h3 { margin: 38px 0 14px; font-size: 17px; letter-spacing: -0.02em; }
.method-table p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

.method-detail {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  text-transform: uppercase;
}

.truth-section {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 90px;
  padding: 75px 70px;
  background: var(--ink);
  color: #f3f3ee;
}

.truth-statement .eyebrow { color: #92988f; }
.truth-section h2 { max-width: 690px; }

.truth-copy {
  padding-top: 30px;
  color: #b9beb6;
  font-size: 13px;
  line-height: 1.65;
}

.truth-copy p { margin: 0 0 18px; }

.api-section {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 95px;
  padding: 120px 0;
  align-items: center;
}

.faq-section { padding: 0 0 120px; }

.faq-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}

.faq-list article {
  min-height: 180px;
  padding: 28px 42px 28px 0;
  border-bottom: 1px solid var(--line);
}

.faq-list article:nth-child(even) {
  padding-right: 0;
  padding-left: 42px;
  border-left: 1px solid var(--line);
}

.faq-list h3 { margin: 0 0 14px; font-size: 16px; letter-spacing: -0.02em; }
.faq-list p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }

.api-copy > .eyebrow { margin-top: 18px; }
.api-copy > p:not(.eyebrow) { max-width: 460px; margin: 24px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.api-facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 36px 0 0; border-top: 1px solid var(--line); }
.api-facts div { padding: 13px 10px 0 0; }

.code-sample { border: 1px solid var(--ink); background: var(--dark); color: var(--code); }
.code-sample-bar { height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border-bottom: 1px solid var(--dark-line); color: var(--code-muted); font-family: "SFMono-Regular", Consolas, monospace; font-size: 9px; }
.code-sample pre { min-height: 270px; margin: 0; padding: 29px 28px; overflow: auto; font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; line-height: 1.8; }

.site-footer {
  min-height: 116px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.footer-mark { color: var(--ink); }
.footer-meta { justify-self: end; font-family: "SFMono-Regular", Consolas, monospace; text-transform: uppercase; }

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  max-width: 340px;
  padding: 11px 14px;
  border: 1px solid #3c423b;
  background: var(--dark);
  color: #e7ebe4;
  box-shadow: 0 12px 35px rgba(20, 23, 19, 0.25);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.toast.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1120px) {
  .product-intro { gap: 45px; }
  .workbench-grid { grid-template-columns: minmax(420px, 1fr) 310px; }
  .file-rail { display: none; }
  .section-heading { grid-template-columns: 0.6fr 1fr 0.7fr; gap: 35px; }
  .truth-section { gap: 55px; padding: 65px 50px; }
}

@media (max-width: 820px) {
  :root { --header-height: 56px; }
  .site-header { grid-template-columns: 1fr auto; padding-inline: 20px; }
  .site-nav { display: none; }
  main, .site-footer { width: min(calc(100% - 32px), var(--max-width)); }
  .product-intro { grid-template-columns: 1fr; gap: 34px; padding: 48px 0 42px; }
  .product-intro h1 { font-size: clamp(38px, 11vw, 62px); }
  .workbench-bar { align-items: flex-start; flex-direction: column; padding: 15px; }
  .workbench-actions { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
  .workbench-grid { grid-template-columns: 1fr; }
  .editor-panel { min-height: 530px; }
  .build-panel { min-height: 520px; }
  .method-section { padding: 95px 0 80px; }
  .section-heading { grid-template-columns: 1fr; gap: 24px; }
  .method-table { grid-template-columns: 1fr 1fr; }
  .method-table article { min-height: 245px; border-bottom: 1px solid var(--line); }
  .method-table article:nth-child(2) { border-right: 0; }
  .method-table article:nth-child(3) { padding-left: 0; }
  .truth-section { grid-template-columns: 1fr; gap: 32px; padding: 55px 35px; }
  .truth-copy { padding-top: 0; }
  .api-section { grid-template-columns: 1fr; gap: 45px; padding: 90px 0; }
  .faq-section { padding-bottom: 90px; }
  .site-footer { grid-template-columns: 1fr auto; }
  .site-footer > p:nth-child(2) { display: none; }
}

@media (max-width: 520px) {
  .engine-state span:last-child { display: none; }
  .product-intro { padding-top: 38px; }
  .product-intro h1 { font-size: 39px; }
  .intro-facts { grid-template-columns: 1fr; }
  .intro-facts div { display: flex; justify-content: space-between; padding: 9px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .intro-facts div + div { padding-left: 0; }
  .intro-facts dd { margin: 0; }
  .workbench-actions .button { padding-inline: 7px; font-size: 9px; }
  .editor-panel { min-height: 460px; }
  .line-numbers { width: 42px; padding-right: 9px; }
  .editor-shell { grid-template-columns: 42px minmax(0, 1fr); }
  #source-editor { padding-inline: 14px; font-size: 11px; }
  .editor-status { gap: 10px; }
  .editor-status span:nth-child(3), .editor-status span:nth-child(4) { display: none; }
  .method-table { grid-template-columns: 1fr; }
  .method-table article, .method-table article + article, .method-table article:nth-child(3) { min-height: 220px; padding: 24px 0; border-right: 0; }
  .truth-section { margin-inline: -16px; padding: 50px 24px; }
  .truth-section h2 { font-size: 30px; }
  .code-sample pre { padding: 21px 17px; font-size: 10px; }
  .faq-list { grid-template-columns: 1fr; }
  .faq-list article, .faq-list article:nth-child(even) { min-height: 0; padding: 25px 0; border-left: 0; }
  .footer-meta { display: none; }
  .site-footer { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .toast { transition: none; }
}

/* Account */
.account-page { min-height: 100vh; background: var(--dark); }
.account-header { background: var(--paper); }
.auth-layout { width: 100%; min-height: calc(100vh - var(--header-height)); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(430px, 0.95fr); margin: 0; }
.auth-context { display: flex; flex-direction: column; justify-content: center; padding: clamp(60px, 8vw, 125px); color: #eef1eb; background: var(--dark); }
.auth-context .eyebrow { color: #8c9489; }
.auth-context h1 { max-width: 720px; margin: 0; font-size: clamp(43px, 5vw, 76px); font-weight: 600; line-height: 0.98; letter-spacing: -0.06em; }
.auth-context h1 span { color: #737b71; }
.auth-context > p:not(.eyebrow) { max-width: 570px; margin: 38px 0 0; color: #aeb5ab; font-size: 14px; line-height: 1.65; }
.auth-facts { max-width: 650px; display: grid; grid-template-columns: repeat(3, 1fr); margin: 70px 0 0; border-top: 1px solid var(--dark-line); }
.auth-facts div { padding: 14px 18px 0 0; border-right: 1px solid var(--dark-line); }
.auth-facts div + div { padding-left: 18px; }
.auth-facts div:last-child { border-right: 0; }
.auth-facts dt { color: #737b71; font-family: "SFMono-Regular", Consolas, monospace; font-size: 9px; text-transform: uppercase; }
.auth-facts dd { margin: 5px 0 0; color: #d8ded4; font-size: 11px; font-weight: 700; }
.auth-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(45px, 7vw, 110px); background: var(--paper); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 48px; border-bottom: 1px solid var(--line); }
.auth-tabs button { min-height: 42px; padding: 0; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 700; text-align: left; }
.auth-tabs button.active { border-color: var(--ink); color: var(--ink); }
.auth-form { width: min(100%, 450px); }
.auth-form h2 { margin: 0 0 35px; font-size: 32px; letter-spacing: -0.04em; }
.auth-form > label, .settings-panel > label { display: grid; gap: 8px; margin-bottom: 19px; font-size: 10px; font-weight: 700; }
.auth-form .text-input { height: 44px; background: #fafaf7; }
.auth-form label small { color: var(--muted); font-size: 9px; font-weight: 400; }
.auth-form .button-primary { margin-top: 9px; }
.text-button { padding: 0; border: 0; border-bottom: 1px solid currentColor; background: none; color: var(--muted); cursor: pointer; font-size: 10px; }
.auth-form > .text-button { margin-top: 18px; }
.auth-message { width: min(100%, 450px); margin-top: 25px; padding: 12px 14px; border-left: 2px solid #4d7c38; background: rgba(77, 124, 56, 0.08); font-size: 11px; }
.auth-message.error { border-color: var(--danger); color: var(--danger); background: rgba(162, 43, 36, 0.06); }

/* Dashboard */
.dashboard-page { min-height: 100vh; background: #e9e9e3; }
.dashboard-header { position: fixed; width: 100%; background: rgba(241, 241, 236, 0.98); }
.dashboard-breadcrumb { display: flex; align-items: center; gap: 9px; color: var(--muted); font-family: "SFMono-Regular", Consolas, monospace; font-size: 9px; text-transform: uppercase; }
.dashboard-breadcrumb strong { color: var(--ink); }
.plan-badge { padding: 4px 7px; border: 1px solid var(--line); color: var(--muted); font-family: "SFMono-Regular", Consolas, monospace; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.dashboard-shell { width: 100%; min-height: 100vh; display: grid; grid-template-columns: 228px minmax(0, 1fr); margin: 0; padding-top: var(--header-height); }
.dashboard-sidebar { position: fixed; top: var(--header-height); bottom: 0; left: 0; width: 228px; display: flex; flex-direction: column; padding: 24px 15px 18px; border-right: 1px solid #d1d1c8; background: var(--paper); }
.sidebar-account { display: grid; grid-template-columns: 35px minmax(0, 1fr); align-items: center; gap: 10px; padding: 0 7px 24px; border-bottom: 1px solid var(--line); }
.account-avatar { width: 35px; height: 35px; display: grid; place-items: center; background: var(--ink); color: var(--accent); font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; font-weight: 700; }
.sidebar-account strong, .sidebar-account small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account strong { font-size: 11px; }
.sidebar-account small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.dashboard-sidebar nav { display: grid; gap: 3px; margin-top: 25px; }
.dashboard-nav { min-height: 38px; display: grid; grid-template-columns: 27px 1fr; align-items: center; padding: 0 9px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 700; text-align: left; }
.dashboard-nav span { color: #999c94; font-family: "SFMono-Regular", Consolas, monospace; font-size: 8px; }
.dashboard-nav.active { background: var(--ink); color: #f5f5f0; }
.dashboard-nav.active span { color: var(--accent); }
.sidebar-foot { display: grid; grid-template-columns: 8px 1fr; align-items: start; gap: 8px; margin-top: auto; padding: 16px 8px 0; border-top: 1px solid var(--line); }
.sidebar-foot .state-light { margin-top: 3px; background: #2d7d3e; }
.sidebar-foot p { margin: 0; color: var(--muted); font-family: "SFMono-Regular", Consolas, monospace; font-size: 8px; line-height: 1.55; }
.sidebar-foot strong { color: var(--ink); font-weight: 700; }
.dashboard-content { grid-column: 2; min-width: 0; padding: 45px clamp(28px, 4vw, 70px) 70px; }
.verification-banner { max-width: 1440px; display: flex; align-items: center; justify-content: space-between; gap: 28px; margin: 0 auto 28px; padding: 18px 20px; border: 1px solid #a6aa9f; border-left: 4px solid var(--ink); background: #f4f4ef; }
.verification-banner[hidden] { display: none; }
.verification-banner .eyebrow { margin: 0 0 5px; }
.verification-banner strong { display: block; font-size: 13px; }
.verification-banner strong span { font-family: "SFMono-Regular", Consolas, monospace; font-size: 11px; }
.verification-banner p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.verification-banner .button { flex: 0 0 auto; }
.dashboard-view { max-width: 1440px; margin: 0 auto; }
.console-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; padding-bottom: 33px; }
.console-heading.compact { border-bottom: 1px solid var(--line); }
.console-heading .eyebrow { margin-bottom: 12px; }
.console-heading h1 { margin: 0; font-size: clamp(34px, 4vw, 55px); font-weight: 600; line-height: 1; letter-spacing: -0.055em; }
.console-heading h1 span { color: #777c73; }
.console-primary { border-color: var(--ink); background: var(--ink); color: #fff; }
.console-primary:hover:not(:disabled) { background: #2b2f29; }
.metric-strip { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: var(--paper); }
.metric-strip article { min-height: 135px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; padding: 16px 19px; border-right: 1px solid var(--line); }
.metric-strip article:last-child { border-right: 0; }
.metric-strip article > span { color: #9a9e95; font-family: "SFMono-Regular", Consolas, monospace; font-size: 8px; }
.metric-strip article p { grid-column: 1 / -1; align-self: end; margin: 0 0 4px; color: var(--muted); font-size: 10px; }
.metric-strip article strong { grid-column: 1 / -1; align-self: end; font-size: 28px; font-weight: 600; line-height: 1; letter-spacing: -0.04em; text-transform: capitalize; }
.console-section { margin-top: 48px; }
.console-section > header { display: flex; align-items: flex-end; justify-content: space-between; padding-bottom: 15px; }
.console-section h2 { margin: 0; font-size: 21px; letter-spacing: -0.03em; }
.console-section .eyebrow { margin-bottom: 5px; }
.data-table { --columns: 5; width: 100%; overflow-x: auto; border-top: 1px solid var(--ink); }
.data-row { min-width: 720px; display: grid; grid-template-columns: repeat(var(--columns), minmax(100px, 1fr)); align-items: center; border-bottom: 1px solid var(--line); background: rgba(241, 241, 236, 0.48); }
.data-row > span { min-width: 0; padding: 13px 11px; overflow: hidden; color: #4f534d; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.data-row.data-head { background: transparent; }
.data-row.data-head > span { color: var(--muted); font-family: "SFMono-Regular", Consolas, monospace; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.table-empty { padding: 22px 11px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.row-link { padding: 0; border: 0; border-bottom: 1px solid var(--ink); background: none; color: var(--ink); cursor: pointer; font-weight: 700; }
.status-label { display: inline-flex; align-items: center; gap: 6px; font-family: "SFMono-Regular", Consolas, monospace; font-size: 8px; text-transform: uppercase; }
.status-label i { width: 5px; height: 5px; border-radius: 50%; background: #8d9188; }
.status-label.positive i { background: #3e874d; }
.script-console { min-height: 700px; display: grid; grid-template-columns: 260px minmax(0, 1fr); margin-top: 24px; border: 1px solid var(--line); background: var(--paper); }
.script-list-panel { min-width: 0; border-right: 1px solid var(--line); }
.panel-search { padding: 12px; border-bottom: 1px solid var(--line); }
.panel-search input { width: 100%; height: 35px; padding: 0 9px; border: 1px solid var(--line); border-radius: 0; background: #fafaf7; font-size: 10px; }
.script-list { padding: 7px; }
.script-list-row { width: 100%; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 10px 9px; border: 0; background: transparent; cursor: pointer; text-align: left; }
.script-list-row.active { background: var(--ink); color: #fff; }
.script-mark { width: 24px; height: 27px; display: grid; place-items: center; border: 1px solid #a7aaa2; color: #687064; font-family: "SFMono-Regular", Consolas, monospace; font-size: 9px; }
.script-list-row.active .script-mark { border-color: #5e655c; color: var(--accent); }
.script-list-copy strong, .script-list-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.script-list-copy strong { font-size: 10px; }
.script-list-copy small { margin-top: 2px; color: #777c74; font-family: "SFMono-Regular", Consolas, monospace; font-size: 7px; }
.script-list-row.active small { color: #868e83; }
.list-empty { padding: 14px; color: var(--muted); font-size: 10px; }
.script-detail { min-width: 0; }
.empty-state { min-height: 650px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 50px; text-align: center; }
.empty-state > span { color: #9a9e95; font-family: "SFMono-Regular", Consolas, monospace; font-size: 9px; }
.empty-state h2 { margin: 20px 0 8px; font-size: 24px; letter-spacing: -0.04em; }
.empty-state p { max-width: 410px; margin: 0; color: var(--muted); font-size: 11px; }
.detail-heading { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.detail-heading .eyebrow { margin-bottom: 4px; }
.title-input { width: min(100%, 500px); padding: 0; border: 0; border-bottom: 1px solid transparent; outline: 0; background: transparent; color: var(--ink); font-size: 21px; font-weight: 700; letter-spacing: -0.03em; }
.title-input:focus { border-color: var(--ink); }
.detail-actions { display: flex; gap: 7px; }
.button-danger { border-color: rgba(162, 43, 36, 0.45); color: var(--danger); }
.button-danger:hover { border-color: var(--danger); background: rgba(162, 43, 36, 0.05); }
.detail-tabs { display: flex; min-height: 43px; border-bottom: 1px solid var(--line); }
.detail-tabs button { min-width: 90px; padding: 0 13px; border: 0; border-right: 1px solid var(--line); border-bottom: 2px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: 9px; font-weight: 700; }
.detail-tabs button.active { border-bottom-color: var(--ink); color: var(--ink); }
.script-tab-panel { padding: 18px; }
.settings-row { display: grid; grid-template-columns: 1.2fr 1.3fr 0.75fr auto auto; gap: 10px; align-items: end; margin-bottom: 14px; }
.settings-row label { display: grid; gap: 5px; color: var(--muted); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.settings-row select, .settings-row input[type="number"] { height: 34px; min-width: 0; padding: 0 8px; border: 1px solid var(--line); border-radius: 0; background: #fafaf7; color: var(--ink); font-size: 9px; }
.settings-row .toggle-label { display: flex; align-items: center; min-height: 34px; text-transform: none; white-space: nowrap; }
.dashboard-code { width: 100%; min-height: 475px; resize: vertical; padding: 18px; border: 1px solid var(--dark-line); border-radius: 0; outline: 0; background: var(--dark); color: var(--code); caret-color: var(--accent); font-family: "SFMono-Regular", Consolas, monospace; font-size: 11px; line-height: 1.65; tab-size: 4; }
.dashboard-code:focus { border-color: #6c7669; }
.build-output { margin-top: 16px; }
.build-output header { display: flex; align-items: center; justify-content: space-between; min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-bottom: 0; font-family: "SFMono-Regular", Consolas, monospace; font-size: 9px; }
.dashboard-code.output { min-height: 260px; color: #adb6aa; }
.inline-form { display: grid; grid-template-columns: 1fr 120px auto; gap: 8px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.inline-form.key-policy-form { grid-template-columns: minmax(130px, 1fr) 110px 120px minmax(170px, 0.8fr) auto; }
.inline-form input { height: 36px; padding: 0 9px; border: 1px solid var(--line); border-radius: 0; background: #fafaf7; font-size: 10px; }
.one-time-secret { margin: 17px 0; padding: 15px; border-left: 3px solid var(--accent); background: var(--ink); color: #e8ece6; }
.one-time-secret p { margin: 0 0 10px; color: #91998e; font-size: 9px; }
.one-time-secret code { display: block; overflow-wrap: anywhere; font-size: 11px; }
.one-time-secret .text-button { margin-top: 12px; color: var(--accent); }
.row-actions { display: flex; gap: 9px; }
.text-button.danger { color: var(--danger); }
.compact-select { width: 100%; height: 29px; border: 1px solid var(--line); border-radius: 0; background: #fafaf7; color: var(--ink); font-size: 9px; }
.compact-metrics { margin-bottom: 25px; }
.compact-metrics article { min-height: 100px; }
.loader-note { max-width: 700px; margin-bottom: 18px; color: var(--muted); font-size: 11px; }
.loader-note .eyebrow { margin-bottom: 8px; }
.dashboard-code.loader { min-height: 250px; }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 25px; }
.settings-panel { padding: 28px; border: 1px solid var(--line); background: var(--paper); }
.settings-panel .text-input { background: #fafaf7; }
.billing-panel { display: flex; flex-direction: column; }
.billing-panel h2 { margin: 13px 0; font-size: 28px; line-height: 1.05; letter-spacing: -0.04em; }
.billing-panel > p:not(.eyebrow) { max-width: 520px; margin: 0 0 32px; color: var(--muted); font-size: 11px; }
.billing-panel .button { margin-top: auto; }
.create-dialog { width: min(600px, calc(100% - 32px)); padding: 0; border: 1px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); }
.create-dialog::backdrop { background: rgba(16, 19, 16, 0.72); }
.create-dialog form { padding: 25px; }
.create-dialog header { display: flex; align-items: start; justify-content: space-between; margin-bottom: 24px; }
.create-dialog h2 { margin: 0; font-size: 29px; letter-spacing: -0.04em; }
.dialog-close { padding: 0; border: 0; background: none; cursor: pointer; font-size: 25px; line-height: 1; }
.create-dialog label { display: grid; gap: 7px; margin-bottom: 16px; font-size: 9px; font-weight: 700; }
.dialog-code { min-height: 230px; }
.toast.error { border-color: #7e332e; color: #ffb8b1; }

@media (max-width: 1000px) {
  .auth-layout { grid-template-columns: 1fr 420px; }
  .auth-context { padding: 60px; }
  .dashboard-shell { grid-template-columns: 190px minmax(0, 1fr); }
  .dashboard-sidebar { width: 190px; }
  .metric-strip { grid-template-columns: 1fr 1fr; }
  .metric-strip article:nth-child(2) { border-right: 0; }
  .metric-strip article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .script-console { grid-template-columns: 210px minmax(0, 1fr); }
  .settings-row { grid-template-columns: 1fr 1fr 100px; }
  .settings-row .toggle-label { grid-row: 2; }
  .inline-form.key-policy-form { grid-template-columns: 1fr 1fr; }
  .inline-form.key-policy-form .console-primary { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .auth-layout { display: block; }
  .auth-context { min-height: 500px; padding: 60px 28px; }
  .auth-context h1 { font-size: 46px; }
  .auth-panel { min-height: 650px; padding: 55px 28px; }
  .dashboard-breadcrumb { display: none; }
  .dashboard-shell { display: block; padding-bottom: 62px; }
  .dashboard-sidebar { z-index: 15; top: auto; right: 0; bottom: 0; width: 100%; height: 58px; padding: 0; border-top: 1px solid var(--line); border-right: 0; }
  .sidebar-account, .sidebar-foot { display: none; }
  .dashboard-sidebar nav { height: 100%; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 0; }
  .dashboard-nav { min-height: 58px; grid-template-columns: 1fr; place-items: center; padding: 0; text-align: center; }
  .dashboard-nav span { display: none; }
  .dashboard-content { padding: 34px 16px 45px; }
  .verification-banner { align-items: flex-start; flex-direction: column; }
  .console-heading { align-items: start; flex-direction: column; }
  .script-console { display: block; }
  .script-list-panel { max-height: 260px; overflow: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .settings-row { grid-template-columns: 1fr 1fr; }
  .settings-row label:nth-child(3) { grid-column: 1 / -1; }
  .account-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .header-account .engine-state { display: none; }
  .auth-facts { grid-template-columns: 1fr; }
  .auth-facts div, .auth-facts div + div { display: flex; justify-content: space-between; padding: 10px 0; border-right: 0; border-bottom: 1px solid var(--dark-line); }
  .auth-facts dd { margin: 0; }
  .dashboard-header .plan-badge { display: none; }
  .metric-strip { grid-template-columns: 1fr 1fr; }
  .metric-strip article { min-height: 110px; }
  .detail-heading { align-items: start; flex-direction: column; }
  .detail-actions { width: 100%; }
  .detail-actions .button { flex: 1; }
  .detail-tabs { overflow-x: auto; }
  .settings-row { grid-template-columns: 1fr; }
  .settings-row label:nth-child(3) { grid-column: auto; }
  .inline-form { grid-template-columns: 1fr; }
  .inline-form.key-policy-form { grid-template-columns: 1fr; }
}
