/* ------------------------------------------------------------------
   MigrateWP — static site styles
   Single stylesheet, no build step.
   ------------------------------------------------------------------ */

/* 1. Tokens ------------------------------------------------------- */

:root {
  color-scheme: light;

  --ink:        #131a22;
  --ink-soft:   #45525f;
  --ink-faint:  #6c7a89;
  --rule:       #e2e6ea;
  --rule-soft:  #eef1f4;
  --page:       #ffffff;
  --panel:      #f7f9fa;
  --panel-2:    #eef2f4;

  --brand:       #1c7dfe;   /* the blue in the logo artwork */
  --accent:      #1a6ee0;   /* fills: buttons, focus, borders */
  --accent-deep: #0d4ea8;   /* link and heading text */
  --accent-wash: #e9f2fe;
  --on-accent:   #ffffff;   /* text on an --accent fill */
  --warm:        #b4632c;

  --term-bg:    #0d1117;
  --term-fg:    #e6edf3;
  --term-dim:   #8b98a5;
  --term-green: #56d39a;
  --term-amber: #e3b341;

  --shadow-sm: 0 1px 2px rgba(19, 26, 34, .06), 0 1px 3px rgba(19, 26, 34, .05);
  --shadow-md: 0 4px 12px rgba(19, 26, 34, .07), 0 12px 32px rgba(19, 26, 34, .06);

  --radius:    10px;
  --radius-lg: 14px;

  --measure: 68ch;
  --wrap:    1140px;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ink:       #e8edf2;
    --ink-soft:  #b0bcc8;
    --ink-faint: #8593a1;
    --rule:      #262e38;
    --rule-soft: #1c232b;
    --page:      #0f141a;
    --panel:     #161d25;
    --panel-2:   #1d262f;
    --brand:       #4e9bff;
    --accent:      #6fb4ff;
    --accent-deep: #8cc2ff;
    --accent-wash: #102740;
    --on-accent:   #08213a;
    --warm:        #e0925c;
    --term-bg:   #080c11;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .35), 0 12px 32px rgba(0, 0, 0, .3);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink:       #e8edf2;
  --ink-soft:  #b0bcc8;
  --ink-faint: #8593a1;
  --rule:      #262e38;
  --rule-soft: #1c232b;
  --page:      #0f141a;
  --panel:     #161d25;
  --panel-2:   #1d262f;
  --brand:       #4e9bff;
  --accent:      #6fb4ff;
  --accent-deep: #8cc2ff;
  --accent-wash: #102740;
  --on-accent:   #08213a;
  --warm:        #e0925c;
  --term-bg:   #080c11;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .35), 0 12px 32px rgba(0, 0, 0, .3);
}

/* 2. Base --------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; }

a { color: var(--accent-deep); text-underline-offset: 2px; }
a:hover { color: var(--accent); }

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

h1, h2, h3, h4 {
  line-height: 1.2;
  letter-spacing: -.018em;
  font-weight: 650;
  margin: 0 0 .5em;
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); letter-spacing: -.028em; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1.1vw, 1.95rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.02rem; }

p, ul, ol { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.35em; }
li { margin-bottom: .4em; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

code, kbd, samp {
  font-family: var(--mono);
  font-size: .885em;
}

:not(pre) > code {
  background: var(--panel-2);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: .12em .4em;
  color: var(--ink);
  word-break: break-word;
}

kbd {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: .1em .45em;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.measure { max-width: var(--measure); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--on-accent);
  padding: .6rem 1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* 3. Header ------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
  text-decoration: none;
  flex: none;
}
.brand img {
  display: block;
  height: 30px;
  width: auto;
}
.site-footer .brand img { height: 28px; }

/* One artwork per theme: the supplied logo, and the same logo with its
   near-black wordmark relit so it holds on a dark ground. These selectors
   must outrank `.brand img` above, hence the `.brand` prefix throughout. */
.brand .logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand .logo-light { display: none; }
  :root:not([data-theme="light"]) .brand .logo-dark  { display: block; }
}
:root[data-theme="dark"] .brand .logo-light { display: none; }
:root[data-theme="dark"] .brand .logo-dark  { display: block; }
:root[data-theme="light"] .brand .logo-light { display: block; }
:root[data-theme="light"] .brand .logo-dark  { display: none; }

.nav {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.nav a {
  display: inline-block;
  padding: .42rem .68rem;
  border-radius: 7px;
  font-size: .935rem;
  font-weight: 520;
  color: var(--ink-soft);
  text-decoration: none;
}
.nav a:hover { background: var(--panel); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--accent-deep); background: var(--accent-wash); }

.nav .nav-cta {
  margin-left: .35rem;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  padding: .45rem .85rem;
}
.nav .nav-cta:hover { background: var(--accent-deep); color: var(--on-accent); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--page);
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0;
}
.icon-btn:hover { background: var(--panel); color: var(--ink); }
.icon-btn svg { width: 17px; height: 17px; }

#theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] #theme-toggle .icon-moon,
:root[data-theme="dark"] #theme-toggle .icon-sun { display: initial; }
:root[data-theme="dark"] #theme-toggle .icon-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) #theme-toggle .icon-moon { display: initial; }
}

#nav-toggle { display: none; }

@media (max-width: 860px) {
  #nav-toggle { display: inline-grid; }
  .nav {
    position: absolute;
    inset: 62px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--page);
    border-bottom: 1px solid var(--rule);
    padding: .6rem 24px 1rem;
    box-shadow: var(--shadow-md);
  }
  .nav[hidden] { display: none; }
  .nav a { padding: .6rem .7rem; font-size: 1rem; }
  .nav .nav-cta { margin-left: 0; text-align: center; margin-top: .4rem; }
}

/* 4. Hero --------------------------------------------------------- */

.hero {
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--rule);
  background:
    radial-gradient(60rem 26rem at 15% -10%, var(--accent-wash), transparent 65%),
    var(--page);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

@media (max-width: 940px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--accent-deep);
  background: var(--accent-wash);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  padding: .3rem .7rem;
  border-radius: 100px;
  margin-bottom: 1.1rem;
}

.hero h1 { margin-bottom: .55rem; }
.hero .lede {
  font-size: clamp(1.06rem, 1rem + .4vw, 1.24rem);
  color: var(--ink-soft);
  max-width: 40ch;
  margin-bottom: 1.6rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  align-items: center;
}

.hero-note {
  margin: 1.1rem 0 0;
  font-size: .875rem;
  color: var(--ink-faint);
}

/* 5. Buttons ------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font: inherit;
  font-size: .96rem;
  font-weight: 600;
  padding: .68rem 1.15rem;
  border-radius: 9px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-deep); color: var(--on-accent); }

.btn-ghost {
  background: var(--page);
  border-color: var(--rule);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--panel); color: var(--ink); border-color: var(--ink-faint); }

/* 6. Terminal ----------------------------------------------------- */

.terminal {
  background: var(--term-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .07);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .62rem .85rem;
  background: rgba(255, 255, 255, .05);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.terminal-bar i {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #3d4650;
  display: block;
}
.terminal-bar i:nth-child(1) { background: #ff5f57; }
.terminal-bar i:nth-child(2) { background: #febc2e; }
.terminal-bar i:nth-child(3) { background: #28c840; }
.terminal-bar span {
  margin-left: auto;
  font-family: var(--mono);
  font-size: .74rem;
  color: var(--term-dim);
}

.terminal pre {
  margin: 0;
  padding: 1.15rem 1.25rem 1.35rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: .845rem;
  line-height: 1.75;
  color: var(--term-fg);
  tab-size: 2;
}

.terminal .p { color: var(--term-green); user-select: none; }
.terminal .c { color: var(--term-dim); }
.terminal .k { color: var(--term-amber); }
.terminal .ok { color: var(--term-green); }

/* 7. Code blocks (docs) ------------------------------------------- */

.code {
  position: relative;
  margin: 0 0 1.4rem;
  background: var(--term-bg);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .07);
  overflow: hidden;
}

.code pre {
  margin: 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: .845rem;
  line-height: 1.7;
  color: var(--term-fg);
}
.code .p { color: var(--term-green); user-select: none; }
.code .c { color: var(--term-dim); }

.copy-btn {
  position: absolute;
  top: 8px; right: 8px;
  font: inherit;
  font-size: .74rem;
  font-weight: 600;
  font-family: var(--mono);
  color: var(--term-dim);
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 6px;
  padding: .22rem .5rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s ease;
}
.code:hover .copy-btn, .copy-btn:focus-visible { opacity: 1; }
.copy-btn:hover { color: var(--term-fg); background: rgba(255, 255, 255, .12); }
.copy-btn[data-copied="true"] { color: var(--term-green); }

@media (hover: none) {
  .copy-btn { opacity: 1; }
}

/* 8. Sections & cards --------------------------------------------- */

.section { padding: clamp(3rem, 6vw, 4.75rem) 0; }
.section + .section { border-top: 1px solid var(--rule-soft); }
.section-panel { background: var(--panel); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

.section-head { max-width: 58ch; margin-bottom: 2.4rem; }
.section-head p { color: var(--ink-soft); margin-bottom: 0; }

.grid { display: grid; gap: 1.15rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }

.card {
  background: var(--page);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.45rem;
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .4rem; font-size: 1.08rem; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--ink-soft); font-size: .96rem; }

a.card { display: block; text-decoration: none; color: inherit; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
a.card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); color: inherit; }
a.card h3 { color: var(--accent-deep); }

.card-icon {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--accent-wash);
  color: var(--accent-deep);
  margin-bottom: .95rem;
}
.card-icon svg { width: 19px; height: 19px; }

.cmd-card code {
  display: inline-block;
  font-size: .95rem;
  margin-bottom: .5rem;
  background: var(--term-bg);
  color: var(--term-fg);
  border: 0;
  padding: .3rem .6rem;
  border-radius: 6px;
}

/* Stat strip */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat { background: var(--page); padding: 1.4rem 1.3rem; }
.stat b {
  display: block;
  font-size: 1.85rem;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--accent-deep);
  font-weight: 700;
  margin-bottom: .15rem;
}
.stat span { font-size: .9rem; color: var(--ink-soft); }

/* Callouts */
.note {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  background: var(--panel);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.15rem;
  margin: 0 0 1.4rem;
  font-size: .95rem;
}
.note :last-child { margin-bottom: 0; }
.note strong:first-child { color: var(--accent-deep); }
.note.warn { border-left-color: var(--warm); }
.note.warn strong:first-child { color: var(--warm); }

/* 9. Docs layout --------------------------------------------------- */

.page-head {
  padding: clamp(2.4rem, 5vw, 3.4rem) 0 clamp(1.6rem, 3vw, 2.2rem);
  border-bottom: 1px solid var(--rule);
  background: var(--panel);
}
.page-head h1 { margin-bottom: .35rem; }
.page-head p { color: var(--ink-soft); margin-bottom: 0; max-width: 62ch; }

.breadcrumb {
  font-size: .84rem;
  color: var(--ink-faint);
  margin-bottom: .8rem;
}
.breadcrumb a { color: var(--ink-faint); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-deep); text-decoration: underline; }
.breadcrumb span { padding: 0 .35rem; opacity: .55; }

.docs-layout {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  padding: clamp(2rem, 4vw, 3rem) 0 4.5rem;
  align-items: start;
}

@media (max-width: 880px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
}

.docs-nav {
  position: sticky;
  top: 82px;
  font-size: .93rem;
}
@media (max-width: 880px) {
  .docs-nav {
    position: static;
    background: var(--panel);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
  }
}
.docs-nav h2 {
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-faint);
  margin-bottom: .6rem;
}
.docs-nav ul { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.docs-nav li { margin: 0; }
.docs-nav a {
  display: block;
  padding: .35rem .6rem;
  margin-left: -.6rem;
  border-radius: 6px;
  color: var(--ink-soft);
  text-decoration: none;
}
.docs-nav a:hover { background: var(--panel-2); color: var(--ink); }
.docs-nav a[aria-current="page"] {
  color: var(--accent-deep);
  background: var(--accent-wash);
  font-weight: 600;
}

.prose { max-width: var(--measure); }
.prose > h2 {
  margin-top: 2.6rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-soft);
}
.prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose > h3 { margin-top: 2rem; }
.prose ol li, .prose ul li { padding-left: .15em; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
  margin: 0 0 1.5rem;
}
.table-scroll { overflow-x: auto; margin-bottom: 1.5rem; }
.table-scroll table { margin-bottom: 0; }
.prose th, .prose td {
  text-align: left;
  padding: .6rem .7rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.prose th {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-faint);
  border-bottom-color: var(--ink-faint);
}
.prose td code { white-space: nowrap; }

.next-prev {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: .95rem;
}

/* 10. Releases ----------------------------------------------------- */

.release {
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.6rem 1.35rem;
  margin-bottom: 1.25rem;
  background: var(--page);
  box-shadow: var(--shadow-sm);
}
.release-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .75rem;
  margin-bottom: .9rem;
}
.release-head h2 { margin: 0; font-size: 1.3rem; }
.tag {
  font-family: var(--mono);
  font-size: .76rem;
  font-weight: 600;
  padding: .2rem .55rem;
  border-radius: 100px;
  background: var(--accent-wash);
  color: var(--accent-deep);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}
.tag-muted { background: var(--panel-2); color: var(--ink-faint); border-color: var(--rule); }
.release time { font-size: .87rem; color: var(--ink-faint); margin-left: auto; }
.release ul { margin-bottom: 1rem; }

/* 11. Forms -------------------------------------------------------- */

.form { max-width: 34rem; }
.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: .35rem;
}
.field input, .field textarea, .field select {
  width: 100%;
  font: inherit;
  font-size: .97rem;
  color: var(--ink);
  background: var(--page);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: .6rem .75rem;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}
.field textarea { min-height: 8.5rem; resize: vertical; }
.field-hint { font-size: .84rem; color: var(--ink-faint); margin: .3rem 0 0; }

/* 12. Footer ------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--panel);
  padding: 3rem 0 2.25rem;
  font-size: .93rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2.5rem;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.75rem; }
}
.footer-grid h2 {
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-faint);
  margin-bottom: .7rem;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .38rem; }
.footer-grid a { color: var(--ink-soft); text-decoration: none; }
.footer-grid a:hover { color: var(--accent-deep); text-decoration: underline; }
.footer-blurb { color: var(--ink-soft); max-width: 32ch; margin: .9rem 0 0; }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.25rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-faint);
  font-size: .875rem;
}
.footer-base a { color: var(--ink-faint); }

/* 13. Misc --------------------------------------------------------- */

.centred { text-align: center; }
.cta-band { text-align: center; }
.cta-band .hero-actions { justify-content: center; }
.cta-band h2 { margin-bottom: .5rem; }
.cta-band p { color: var(--ink-soft); max-width: 48ch; margin-inline: auto; margin-bottom: 1.6rem; }

.error-page { padding: clamp(4rem, 12vw, 8rem) 0; text-align: center; }
.error-page .code-num {
  font-family: var(--mono);
  font-size: clamp(3.5rem, 12vw, 6rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -.04em;
  margin-bottom: .4rem;
}

/* 14. Late refinements --------------------------------------------- */

/* Short label columns should not wrap mid-token. */
.prose td:first-child { white-space: nowrap; }
@media (max-width: 560px) {
  .prose td:first-child { white-space: normal; }
}

/* Numbered step columns: keep the code samples on a common baseline. */
.steps > div { display: flex; flex-direction: column; }
.steps .code { margin-top: auto; margin-bottom: 0; }
.steps h3 { font-size: 1.05rem; }

/* 15. Legal documents ---------------------------------------------- */

.legal { max-width: 74ch; }

.legal .toc {
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--panel);
  padding: 1.25rem 1.4rem;
  margin-bottom: 2.75rem;
}
.legal .toc h2 {
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-faint);
  margin: 0 0 .8rem;
  border: 0;
  padding: 0;
}
.legal .toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 2rem;
  font-size: .93rem;
}
@media (max-width: 620px) { .legal .toc ol { columns: 1; } }
.legal .toc li {
  margin: 0 0 .3rem;
  break-inside: avoid;
  display: grid;
  grid-template-columns: 1.6rem 1fr;
}
.legal .toc span { color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.legal .toc a { color: var(--ink-soft); text-decoration: none; }
.legal .toc a:hover { color: var(--accent-deep); text-decoration: underline; }

.legal h2 {
  display: grid;
  grid-template-columns: 3.1rem 1fr;
  font-size: 1.18rem;
  margin-top: 2.6rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-soft);
  scroll-margin-top: 5rem;
}
.legal h2:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.legal h2 .num {
  color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.legal .clause {
  display: grid;
  grid-template-columns: 3.1rem 1fr;
  margin-bottom: .9rem;
}
.legal .clause > .num {
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  font-size: .93em;
  padding-top: .1em;
}

.legal .sub {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  margin: 0 0 .7rem 3.1rem;
}
.legal .sub > .num {
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  font-size: .93em;
  padding-top: .1em;
}

@media (max-width: 560px) {
  .legal h2, .legal .clause { grid-template-columns: 2.5rem 1fr; }
  .legal .sub { grid-template-columns: 2.1rem 1fr; margin-left: 1.4rem; }
}

.legal dfn { font-style: normal; font-weight: 620; }
