/* ARN Smart bar: one thin row above every product header (build-site.cjs, renderArnBar), the same on every site
   (user decision 2026-11-02). build-site.cjs puts this file in front of the product's site.css. The bar scrolls
   away with the page; the product header below it stays sticky. Values are fixed here, not taken from the product's
   variables, so the bar looks the same on all fourteen sites. */
.arn-bar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #18191c;
  color: #c9ccd2;
  font: 500 13px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.arn-bar__row {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 1440px;
  min-height: 36px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 32px);
}

.arn-bar a {
  color: #e7e9ec;
  text-decoration: none;
}

.arn-bar a:hover,
.arn-bar a:focus-visible {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.arn-bar__home {
  display: flex;
  flex: none;
}

.arn-bar__home img {
  display: block;
  width: auto;
  height: 18px;
}

.arn-bar__contact {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  list-style: none;
}

.arn-bar__contact li {
  margin: 0;
  padding: 0 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  white-space: nowrap;
}

.arn-bar__links {
  display: flex;
  gap: 18px;
  margin-left: auto;
  white-space: nowrap;
}

@media (max-width: 999.98px) {
  .arn-bar__place,
  .arn-bar__extra {
    display: none;
  }
}

@media (max-width: 639.98px) {
  .arn-bar__row {
    gap: 10px;
  }

  .arn-bar__contact li {
    padding: 0 10px;
  }

  .arn-bar__mail {
    display: none;
  }
}

/* The narrowest phones keep the logo (arnsmart.com) and the phone number. */
@media (max-width: 359.98px) {
  .arn-bar__links {
    display: none;
  }
}

/* ARN Connect (ARN Operations) mini site — "operations desk" design.
   Warm ivory paper, ink text and the brass of the product illustrations and the ARN Connect logo: the centred hero
   sits on ruled ledger paper, the Explore cards hang like tags with a brass ring and sections read like rows of an
   operations ledger; the header is one row like the other mini sites. Type: one family, ARN Smart Utility (Medium
   for text, Demi for controls, Bold for headings). Markup contract: site/README.md. */

@font-face {
  font-family: "ARN Smart Utility";
  src: url("fonts/ARNSmartUtility-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "ARN Smart Utility";
  src: url("fonts/ARNSmartUtility-Demi.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "ARN Smart Utility";
  src: url("fonts/ARNSmartUtility-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f5f1e8;
  --paper-deep: #ece6d8;
  --card: #fffdf8;
  --ink: #1d1b16;
  --ink-soft: #37332a;
  --muted: #5f5a4e;
  --line: #ddd5c4;
  --line-strong: #c4b99f;
  --brass: #a98e54;
  --brass-light: #d6c193;
  --brass-text: #6e5728;
  --night: #1d1b16;
  --night-text: #f1ebdc;
  --night-muted: #c6bda9;
  --ok: #2f8a57;
  --warn: #c98a12;
  --crit: #c2412d;
  --radius: 6px;
  --radius-card: 10px;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 72px;
  --toc-h: 56px;
  --font: "ARN Smart Utility", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

/* ---------- Base ---------- */

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

html {
  background: var(--paper);
  scroll-padding-top: calc(var(--header-h) + var(--toc-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--brass-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--ink);
}

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

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
}

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.wrap--narrow {
  max-width: 880px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn--primary {
  background: var(--ink);
  color: var(--paper);
}

.btn--primary:hover {
  background: var(--brass-text);
  color: var(--paper);
}

.btn--secondary {
  border-color: var(--ink);
  background: transparent;
  color: var(--ink);
}

.btn--secondary:hover {
  border-color: var(--brass-text);
  color: var(--brass-text);
}

.btn--ghost-light {
  border-color: var(--night-muted);
  background: transparent;
  color: var(--night-text);
}

.btn--ghost-light:hover {
  border-color: var(--brass-light);
  color: var(--brass-light);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.actions--center {
  justify-content: center;
}

/* ---------- Header: one row like the other mini sites (logo, the ten pages, demo request) ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line-strong);
  background: rgba(245, 241, 232, 0.96);
  backdrop-filter: blur(8px);
}

.site-header__row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 72px;
  margin-right: auto;
  text-decoration: none;
}

.brand__wordmark {
  display: block;
  width: auto;
  height: 32px;
}

.site-header__action {
  min-height: 40px;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.nav-toggle__bars {
  position: relative;
  width: 16px;
  height: 2px;
  background: currentColor;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
}

.nav-toggle__bars::before {
  top: -5px;
}

.nav-toggle__bars::after {
  top: 5px;
}

.nav-open .nav-toggle__bars {
  background: transparent;
}

.nav-open .nav-toggle__bars::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-open .nav-toggle__bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.main-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

/* Below 1360px the ten pages do not fit beside the logo and the button: they open as a numbered index below the
   header. */
@media (max-width: 1359px) {
  .main-nav {
    display: none;
  }

  .nav-open .main-nav {
    display: block;
    position: absolute;
    top: 100%;
    right: var(--gutter);
    left: var(--gutter);
    max-height: calc(100vh - var(--header-h) - 16px);
    overflow-y: auto;
    padding: 12px;
    border: 1px solid var(--line-strong);
    border-top: 0;
    border-radius: 0 0 var(--radius-card) var(--radius-card);
    background: var(--card);
    box-shadow: 0 24px 40px -24px rgba(29, 27, 22, 0.45);
  }

  .main-nav ul {
    display: grid;
    counter-reset: ops-page;
  }

  .main-nav li {
    counter-increment: ops-page;
  }

  .main-nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
  }

  .main-nav a::before {
    content: counter(ops-page, decimal-leading-zero);
    flex: none;
    min-width: 2ch;
    color: var(--brass-text);
    font-variant-numeric: tabular-nums;
  }

  .main-nav a:hover {
    background: var(--paper);
  }

  .main-nav a[aria-current="page"] {
    background: var(--paper);
    box-shadow: inset 3px 0 0 var(--brass);
  }
}

@media (min-width: 768px) and (max-width: 1359px) {
  .nav-open .main-nav {
    left: auto;
    width: 560px;
  }

  .main-nav ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
  }
}

/* Wide screens: the pages sit between the logo and the button in a header row a little wider than the page;
   the current page carries a brass rule on the header's bottom edge. */
@media (min-width: 1360px) {
  .site-header__row {
    flex-wrap: nowrap;
    max-width: 1440px;
    column-gap: 24px;
  }

  .nav-toggle {
    display: none;
  }

  .main-nav {
    flex: 1 1 auto;
    align-self: stretch;
  }

  .main-nav ul {
    display: flex;
    justify-content: center;
    height: 100%;
  }

  .main-nav li {
    display: flex;
  }

  .main-nav a {
    display: flex;
    align-items: center;
    padding: 0 8px;
    color: var(--ink-soft);
    font-size: 0.875rem;
    white-space: nowrap;
  }

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

  .main-nav a[aria-current="page"] {
    box-shadow: inset 0 -3px 0 var(--brass);
    color: var(--ink);
  }
}

@media (max-width: 599px) {
  .site-header__action {
    display: none;
  }

  .brand__wordmark {
    height: 28px;
  }
}

@media (max-width: 419px) {
  .nav-toggle__text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* ---------- Hero ---------- */

/* Centred hero (site.json hero.layout "center"): eyebrow, title, summary, points and actions read as one block on
   ruled ledger paper that fades out towards the top and the bottom. */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 8vw, 104px) 0 clamp(56px, 7vw, 96px);
  border-bottom: 3px double var(--line-strong);
  background: var(--paper);
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg, transparent 0 35px, rgba(196, 185, 159, 0.2) 35px 36px);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  color: var(--muted);
  font-size: 0.88rem;
  list-style: none;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb li + li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-top: 1.5px solid var(--line-strong);
  border-right: 1.5px solid var(--line-strong);
  transform: rotate(45deg);
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--ink);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  padding: 5px 12px 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(47, 138, 87, 0.18);
}

.hero h1 {
  max-width: 19ch;
  margin: 0;
  font-size: clamp(2.1rem, 4.6vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.page-topic .hero h1 {
  max-width: 24ch;
  font-size: clamp(2rem, 3.8vw, 3.1rem);
}

.hero__summary {
  max-width: 62ch;
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.hero__summary p {
  margin: 0 0 0.8em;
}

.hero__summary p:last-child {
  margin-bottom: 0;
}

/* Overview's three statements: ledger slips, each with a green status light. */
.hero__points {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 1080px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.hero__point {
  position: relative;
  padding: 18px 20px 18px 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: 0 12px 24px -20px rgba(29, 27, 22, 0.55);
  color: var(--ink-soft);
  font-size: 0.97rem;
  text-align: left;
}

.hero__point::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 20px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(47, 138, 87, 0.18);
}

@media (min-width: 900px) {
  .hero__points {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- "On this page" bar ---------- */

.toc {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 241, 232, 0.97);
  backdrop-filter: blur(8px);
}

.toc__inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-height: var(--toc-h);
}

.toc__toggle {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.toc__label {
  flex: none;
  padding: 3px 9px;
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.toc__current {
  overflow: hidden;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.toc__toggle::after {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
}

.toc--open .toc__toggle::after {
  margin-top: 4px;
  transform: rotate(-135deg);
}

.toc__steps {
  display: flex;
  gap: 8px;
}

.toc__step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.toc__step:hover {
  border-color: var(--ink);
}

.toc__step[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.toc__list {
  flex-basis: 100%;
  margin: 0;
  padding: 0 0 12px;
  list-style: none;
}

.js .toc__list {
  display: none;
  position: absolute;
  top: 100%;
  left: var(--gutter);
  width: min(560px, calc(100% - var(--gutter) * 2));
  max-height: min(70vh, 560px);
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-top: 0;
  border-radius: 0 0 var(--radius-card) var(--radius-card);
  background: var(--card);
  box-shadow: 0 24px 40px -24px rgba(29, 27, 22, 0.45);
}

.js .toc--open .toc__list {
  display: block;
}

.toc__list a {
  display: flex;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  text-decoration: none;
}

.toc__list a:hover {
  background: var(--paper);
  color: var(--ink);
}

.toc__list a.is-active {
  background: var(--paper);
  box-shadow: inset 3px 0 0 var(--brass);
  color: var(--ink);
}

.toc__num {
  flex: none;
  min-width: 2ch;
  color: var(--brass-text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 559px) {
  .toc__label {
    display: none;
  }

  .toc__step {
    padding: 0 11px;
  }

  .toc__step-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* ---------- Sections ---------- */

.block {
  padding: clamp(56px, 7vw, 96px) 0;
}

.tint {
  background: var(--paper-deep);
}

.section-head {
  max-width: 760px;
  margin-bottom: 36px;
}

/* Text sections in the narrow column stand on the centre line like every section without a picture beside it. */
.section-head--center,
.wrap--narrow > .section-head {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.wrap--narrow > .figure {
  max-width: 640px;
  margin: 40px auto 0;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  letter-spacing: -0.02em;
}

.section-head__lead {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1.1rem;
}

/* ---------- Prose ---------- */

.prose {
  color: var(--ink-soft);
}

.prose > :first-child {
  margin-top: 0;
}

.prose p {
  margin: 0 0 1em;
}

.prose strong {
  color: var(--ink);
}

.prose ul,
.prose ol {
  margin: 0 0 1.2em;
  padding: 0;
  list-style: none;
}

.prose li {
  position: relative;
  margin-bottom: 0.5em;
  padding-left: 22px;
}

.prose ul > li::before {
  content: "";
  position: absolute;
  top: 0.6em;
  left: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid var(--brass);
}

.prose ol {
  counter-reset: ops-item;
}

.prose ol > li {
  padding-left: 40px;
  counter-increment: ops-item;
}

.prose ol > li::before {
  content: counter(ops-item, decimal-leading-zero);
  position: absolute;
  top: 0.05em;
  left: 0;
  color: var(--brass-text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.prose code {
  padding: 0.1em 0.35em;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--card);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.86em;
  overflow-wrap: anywhere;
}

.prose blockquote {
  margin: 0 0 1.2em;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--brass);
  color: var(--ink);
}

.prose hr {
  margin: 2em 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.prose--center {
  max-width: 680px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

/* Tables are ledger pages: ruled rows, ink header rule. */
.table-wrap {
  margin: 0 0 1.4em;
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--card);
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  font-variant-numeric: tabular-nums;
}

.table-wrap th {
  padding: 11px 14px;
  border-bottom: 2px solid var(--ink);
  color: var(--ink);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
}

.table-wrap td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table-wrap tr:last-child td {
  border-bottom: 0;
}

/* ---------- Figures: pinned to the desk with a brass clip ---------- */

.figure {
  position: relative;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: 0 16px 30px -24px rgba(29, 27, 22, 0.55);
}

.figure::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 48px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(180deg, #d9c48f, var(--brass));
  box-shadow: 0 2px 4px rgba(29, 27, 22, 0.25);
  transform: translateX(-50%);
}

.figure__link {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: zoom-in;
}

.figure img {
  display: block;
  width: 100%;
  height: auto;
}

.figure--tall .figure__link {
  max-height: 640px;
}

.figure figcaption {
  padding: 10px 4px 2px;
  color: var(--muted);
  font-size: 0.88rem;
}

.image-placeholder {
  display: grid;
  aspect-ratio: 4 / 3;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: repeating-linear-gradient(135deg, transparent 0 12px, rgba(169, 142, 84, 0.08) 12px 24px);
}

.image-placeholder span {
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- Feature sections: one ledger row ---------- */

/* With a picture: the entry and its details on the left (7), the picture beside them (5). Without one, and on the
   Overview, where the product picture runs large below the text: the entry stands on the centre line and the
   details sit in a centred column, lines left-aligned for reading. */

.feature {
  padding: clamp(48px, 6vw, 80px) 0;
  border-top: 1px solid var(--line);
}

.feature__grid {
  display: grid;
  gap: 24px;
  grid-template-areas:
    "head"
    "prose";
}

.feature--figure .feature__grid {
  grid-template-areas:
    "head"
    "prose"
    "media";
}

.feature__text {
  display: contents;
}

.feature__head {
  grid-area: head;
}

.feature__grid > .prose,
.feature__text > .prose {
  grid-area: prose;
  min-width: 0;
}

.feature__media {
  display: grid;
  grid-area: media;
  gap: 24px;
  align-self: start;
  min-width: 0;
  padding-top: 8px;
}

.feature__kicker {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* The entry number is a small tag with its own brass ring. */
.feature__number {
  position: relative;
  flex: none;
  padding: 4px 9px 4px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--card);
  color: var(--brass-text);
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.feature__number::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 7px;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--brass);
  border-radius: 50%;
  transform: translateY(-50%);
}

.feature__label {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
}

.feature__title {
  max-width: 34ch;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
}

.feature--text .feature__head,
.page-overview .feature__head {
  text-align: center;
}

.feature--text .feature__kicker,
.page-overview .feature__kicker {
  justify-content: center;
}

.feature--text .feature__title,
.page-overview .feature__title {
  margin-inline: auto;
}

.feature--text .feature__grid > .prose,
.feature--text .feature__text > .prose,
.page-overview .feature__text > .prose {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
}

.page-overview .feature__media {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
}

@media (min-width: 1024px) {
  .feature__grid {
    gap: 28px 56px;
  }

  .page-topic .feature--figure .feature__grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "head media"
      "prose media";
  }

  .page-topic .feature--figure .feature__media {
    position: sticky;
    top: calc(var(--header-h) + var(--toc-h) + 24px);
  }
}

/* ---------- Cards: hanging tags with a punched brass ring ---------- */

.cards {
  display: grid;
  gap: 22px 18px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 14px 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: 0 14px 26px -22px rgba(29, 27, 22, 0.55);
  transition: border-color 0.15s ease, transform 0.2s ease;
}

.card::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 50%;
  width: 12px;
  height: 12px;
  border: 3px solid var(--brass);
  border-radius: 50%;
  background: var(--paper);
  transform: translateX(-50%);
}

.card:hover,
.card:focus-within {
  border-color: var(--brass);
}

.card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper);
}

.card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px 8px 20px;
}

.card__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.card__title::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ok);
}

.card__body p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

.card__link {
  margin-top: auto;
  font-weight: 600;
  text-decoration: none;
}

/* The whole card opens its page; the link stays the one focusable target. */
.card__link::after {
  content: "";
  position: absolute;
  inset: 0;
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- Steps: stations along a brass rail ---------- */

.steps {
  position: relative;
  display: grid;
  gap: 28px;
  margin: 0;
  padding: 0 0 0 28px;
  list-style: none;
}

.steps::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 6px;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, #d9c48f, var(--brass));
}

.steps__item {
  position: relative;
  padding: 18px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--card);
}

.steps__item::before {
  content: "";
  position: absolute;
  top: 22px;
  left: -28px;
  width: 16px;
  height: 16px;
  border: 3px solid var(--brass);
  border-radius: 50%;
  background: var(--paper);
}

.tint .steps__item::before {
  background: var(--paper-deep);
}

.steps__title {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.steps__text,
.steps__item > p {
  margin: 0;
  color: var(--muted);
}

.steps__text p {
  margin: 0 0 0.8em;
}

.steps__text p:last-child {
  margin-bottom: 0;
}

.steps__figure {
  max-width: 880px;
  margin: 48px auto 0;
}

@media (min-width: 900px) {
  .steps {
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    gap: 18px;
    padding: 30px 0 0;
  }

  .steps::before {
    top: 6px;
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: 4px;
    background: linear-gradient(180deg, #d9c48f, var(--brass));
  }

  .steps__item::before {
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* ---------- Audience tiles ---------- */

.tiles {
  display: grid;
  gap: 16px;
}

.tile {
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-top: 3px solid var(--brass);
  border-radius: var(--radius-card);
  background: var(--card);
}

.tile p {
  margin: 0;
  color: var(--muted);
}

.tile p + p {
  margin-top: 10px;
}

.tile__title strong {
  color: var(--ink);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tiles__figure {
  max-width: 880px;
  margin: 40px auto 0;
}

@media (min-width: 768px) {
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* One row of equal tiles, however many audiences the section names. */
@media (min-width: 1100px) {
  .tiles {
    grid-template-columns: none;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
  }
}

/* ---------- Choose: an agreement card with a double rule ---------- */

.pricing {
  display: grid;
  gap: 32px;
  align-items: start;
}

.pricing__intro h2 {
  margin: 0;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  letter-spacing: -0.02em;
}

.pricing__lead {
  margin: 12px 0 20px;
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 500;
}

.pricing__card {
  padding: 28px;
  border: 3px double var(--ink);
  border-radius: 12px;
  background: var(--card);
}

.pricing__card .prose p:last-child {
  margin-bottom: 0;
}

.pricing__checkout,
.pricing__links {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.pricing__figure,
.guide__figure,
.workflow__figure {
  margin-top: 28px;
}

@media (min-width: 1024px) {
  .pricing {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 56px;
  }
}

/* ---------- Getting started: a checklist ---------- */

.guide {
  display: grid;
  gap: 32px;
}

.guide__intro h2 {
  margin: 0;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  letter-spacing: -0.02em;
}

.guide__lead {
  margin: 12px 0 20px;
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 500;
}

.guide__steps ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide__steps li {
  position: relative;
  margin-bottom: 10px;
  padding: 14px 16px 14px 50px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink-soft);
}

.guide__steps li::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 16px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--brass);
  border-radius: 3px;
}

@media (min-width: 1024px) {
  .guide {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 56px;
  }
}

/* ---------- Questions ---------- */

.faq {
  display: grid;
  gap: 0 48px;
}

.faq__item {
  padding: 22px 0;
  border-top: 1px solid var(--line-strong);
}

.faq__item h3 {
  display: flex;
  gap: 12px;
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.faq__item h3::before {
  content: "";
  flex: none;
  width: 10px;
  height: 2px;
  margin-top: 0.62em;
  background: var(--brass);
}

.faq__item .prose {
  padding-left: 22px;
  color: var(--muted);
}

.faq__item .prose p:last-child {
  margin-bottom: 0;
}

@media (min-width: 1024px) {
  .faq {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- A practical routine: a ruled sheet on a clipboard ---------- */

.workflow__panel {
  position: relative;
  max-width: 920px;
  padding: clamp(36px, 5vw, 56px) clamp(24px, 4vw, 48px) clamp(24px, 4vw, 40px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: 0 20px 36px -28px rgba(29, 27, 22, 0.6);
}

.workflow__panel::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  width: 96px;
  height: 18px;
  border-radius: 5px;
  background: linear-gradient(180deg, #d9c48f, var(--brass));
  box-shadow: 0 2px 4px rgba(29, 27, 22, 0.25);
  transform: translateX(-50%);
}

.workflow__panel > h2 {
  margin: 0;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
}

.workflow__panel > h3 {
  margin: 10px 0 24px;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 500;
}

.workflow__panel .prose ol > li {
  margin-bottom: 0;
  padding: 11px 0 11px 48px;
  border-bottom: 1px solid var(--line);
}

.workflow__panel .prose ol > li::before {
  top: 11px;
}

/* ---------- Closing: the one dark band ---------- */

.closing {
  padding: clamp(64px, 8vw, 112px) 0;
  background: var(--night);
  color: var(--night-text);
  text-align: center;
}

.closing h2 {
  max-width: 22ch;
  margin: 0 auto 16px;
  color: var(--night-text);
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
  letter-spacing: -0.02em;
}

.closing .prose {
  color: var(--night-muted);
}

.closing .btn--primary {
  background: var(--brass-light);
  color: var(--ink);
}

.closing .btn--primary:hover {
  background: var(--night-text);
}

.closing :focus-visible {
  outline-color: var(--night-text);
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 48px 0 40px;
  border-top: 3px double var(--line-strong);
  background: var(--paper-deep);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer__grid {
  display: grid;
  gap: 32px;
}

.site-footer__brand img {
  display: block;
  width: 200px;
  height: auto;
}

.site-footer__nav ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

.site-footer__nav a:hover {
  color: var(--brass-text);
}

.site-footer__publisher img {
  display: block;
  width: 120px;
  height: auto;
}

.site-footer__publisher p {
  margin: 12px 0 0;
}

@media (min-width: 900px) {
  .site-footer__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
  }

  .site-footer__nav ul {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- Badges, review line, image viewer ---------- */

.edition {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid var(--brass);
  border-radius: 4px;
  color: var(--brass-text);
  font-size: 0.7em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}

.badge-new {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--ok);
  color: #ffffff;
  font-size: 0.72em;
  font-weight: 700;
  vertical-align: middle;
}

.page-review {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 24px;
  padding-bottom: 24px;
  color: var(--muted);
  font-size: 0.85rem;
}

.lightbox {
  max-width: 94vw;
  max-height: 92vh;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--card);
}

.lightbox::backdrop {
  background: rgba(29, 27, 22, 0.86);
}

.lightbox img {
  display: block;
  max-width: 94vw;
  max-height: 88vh;
  width: auto;
  height: auto;
}

.lightbox__close {
  position: fixed;
  top: 16px;
  right: 16px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* ---------- Motion (only when the visitor allows it) ---------- */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .card:hover {
    transform: rotate(-0.6deg);
  }
}
