/* Trosmere — black and tan, measured. */

:root {
  --bg: #121214;
  --bg-glass: rgba(18, 18, 20, 0.94);
  --surface: #1B1B1F;
  --line: #2C2C31;
  --field-line: #6B665F;
  --text: #ECE8E1;
  --muted: #A39E95;
  --accent: #C8A27C;
  --accent-hover: #D6B591;
  --on-accent: #121214;

  --font-head: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;

  --radius: 4px;
  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 56px);
  --header-h: 64px;
  --chapter-gap: clamp(88px, 11vw, 160px);
  --row-gap: clamp(56px, 7vw, 104px);

  color-scheme: dark;
}

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
table { border-collapse: collapse; }

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

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

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

.skip {
  position: absolute;
  left: 16px;
  top: -120px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; }

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

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border-color: var(--accent); color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--surface); }
.btn-sm { min-height: 40px; padding: 9px 16px; font-size: 0.875rem; }
.btn[disabled] { opacity: 0.65; cursor: progress; }

.link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--accent);
  color: var(--text);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 0.2s ease;
}
.link:hover { color: var(--accent); }

.kicker {
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-glass);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.header-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-head);
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.brand-mark { flex: none; width: 26px; height: 26px; color: var(--accent); }

.site-nav { display: flex; align-items: center; gap: 32px; }
.site-nav ul { display: flex; gap: 26px; }
.site-nav ul a {
  display: inline-block;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  color: var(--muted);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.site-nav ul a:hover { color: var(--text); border-bottom-color: var(--accent); }

.burger {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
}
.burger-lines { position: relative; width: 16px; height: 10px; }
.burger-lines::before,
.burger-lines::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.2s ease;
}
.burger-lines::before { top: 1px; }
.burger-lines::after { bottom: 1px; }
.burger[aria-expanded="true"] .burger-lines::before { transform: translateY(3.25px) rotate(45deg); }
.burger[aria-expanded="true"] .burger-lines::after { transform: translateY(-3.25px) rotate(-45deg); }

@media (max-width: 1079.98px) {
  /* Without JavaScript the menu simply wraps under the name. */
  .header-in { flex-wrap: wrap; row-gap: 4px; }
  .site-nav { width: 100%; flex-wrap: wrap; gap: 10px 24px; padding-bottom: 12px; }
  .site-nav ul { flex-wrap: wrap; gap: 4px 18px; }

  .js .header-in { flex-wrap: nowrap; }
  .js .burger { display: inline-flex; }
  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: 4px var(--gutter) 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--accent);
  }
  .js.menu-open .site-nav { display: flex; }
  .js .site-nav ul { flex-direction: column; gap: 0; }
  .js .site-nav ul a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    font-size: 1.0625rem;
  }
  .js .site-nav .btn { width: 100%; min-height: 48px; }
}

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

.hero { padding: clamp(24px, 3vw, 40px) 0 var(--chapter-gap); }

.masthead {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: end;
  padding-top: clamp(56px, 9vw, 128px);
}

h1 {
  font-size: clamp(2.125rem, 5.4vw, 4.75rem);
  font-weight: 500;
  line-height: 1.03;
  letter-spacing: -0.025em;
}
h1 .line { display: block; }

.hero-lead {
  max-width: 56ch;
  margin-top: 28px;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1.35vw, 1.25rem);
}

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

.facts { padding-top: 14px; border-top: 1px solid var(--accent); }
.facts-title {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.facts dl { margin: 6px 0 0; }
.fact {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.fact dt { max-width: 14ch; color: var(--muted); font-size: 0.9375rem; line-height: 1.4; }
.fact dd {
  margin: 0;
  color: var(--accent);
  font-family: var(--font-head);
  font-size: clamp(2.25rem, 3.6vw, 3.25rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums;
  white-space: nowrap;
}
.facts-note { margin-top: 16px; color: var(--muted); font-size: 0.875rem; }

@media (max-width: 899.98px) {
  .hero-grid { grid-template-columns: 1fr; align-items: start; }
}

/* ---------- Chapters ---------- */

.chapter { padding-bottom: var(--chapter-gap); }

.ch-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px clamp(16px, 2.4vw, 28px);
  margin-bottom: clamp(36px, 5vw, 64px);
  padding-top: 16px;
  border-top: 1px solid var(--accent);
}
.ch-num {
  min-width: 2.4ch;
  color: var(--accent);
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 4.6vw, 3.75rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: 0.01em;
}
.ch-label {
  color: var(--muted);
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.ch-badge {
  margin-left: auto;
  padding: 4px 10px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* A row = marginal column + main column. */
.row {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 24px clamp(32px, 5vw, 72px);
}
.row + .row { margin-top: var(--row-gap); }

.note {
  max-width: 30ch;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.55;
}
.note a { color: var(--text); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.note-mark {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.margin-label {
  padding-top: 12px;
  border-top: 1px solid var(--accent);
  color: var(--text);
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.margin-label + .note { margin-top: 16px; border-top: 0; padding-top: 0; }

h2 {
  max-width: 22ch;
  font-size: clamp(1.875rem, 3.7vw, 3.125rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.lead {
  max-width: 60ch;
  margin-top: 22px;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1.35vw, 1.25rem);
}
.body-text { margin-top: 16px; color: var(--muted); max-width: 64ch; }
.sub-title { font-size: clamp(1.375rem, 2.2vw, 1.75rem); }

.cols-2 { max-width: none; }
.cols-2 p + p { margin-top: 1em; }

@media (min-width: 760px) {
  .cols-2 {
    columns: 2;
    column-gap: clamp(28px, 4vw, 56px);
    column-rule: 1px solid var(--line);
  }
  .cols-2 p { break-inside: avoid; }
  .cols-2 p + p { margin-top: 0; }
}

@media (max-width: 959.98px) {
  .row { grid-template-columns: 1fr; }
  .row-note .margin { order: 2; }
  .note { max-width: 52ch; }
}

/* ---------- I. Formats ---------- */

.formats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px) clamp(16px, 2.4vw, 32px);
  margin-top: clamp(44px, 6vw, 80px);
}
.format { margin: 0; }
.plate {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.plate::before,
.plate::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
}
.plate::before { top: 12px; right: 12px; border-top: 1px solid var(--accent); border-right: 1px solid var(--accent); }
.plate::after { bottom: 12px; left: 12px; border-bottom: 1px solid var(--accent); border-left: 1px solid var(--accent); }
.plate img {
  position: absolute;
  top: 44px;
  left: 28px;
  width: calc(100% - 56px);
  height: calc(100% - 76px);
  object-fit: contain;
}
.plate-tag {
  position: absolute;
  top: 13px;
  left: 16px;
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
}
.format figcaption {
  padding-top: 16px;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}
.fig {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.format figcaption strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-family: var(--font-head);
  font-size: 1.125rem;
  font-weight: 500;
}

@media (max-width: 899.98px) {
  .formats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 559.98px) {
  .formats { grid-template-columns: 1fr; gap: 28px; }
  .format {
    display: grid;
    grid-template-columns: minmax(0, 46%) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
  }
  .format figcaption { padding-top: 4px; font-size: 0.875rem; }
  .plate img { top: 30px; left: 12px; width: calc(100% - 24px); height: calc(100% - 44px); }
  .plate-tag { top: 9px; left: 11px; font-size: 0.6875rem; }
  .plate::before { top: 9px; right: 9px; width: 7px; height: 7px; }
  .plate::after { bottom: 9px; left: 9px; width: 7px; height: 7px; }
}

/* ---------- Ruled tables ---------- */

.ruled { width: 100%; margin-top: 32px; font-size: 1rem; }
.ruled thead th {
  padding: 0 20px 12px 0;
  border-bottom: 1px solid var(--accent);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-align: left;
  text-transform: uppercase;
}
.ruled tbody th,
.ruled tbody td {
  padding: 16px 20px 16px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: baseline;
}
.ruled tbody th {
  color: var(--text);
  font-family: var(--font-head);
  font-weight: 500;
}
.ruled tbody td { color: var(--muted); }
.ruled tbody tr > :last-child,
.ruled thead tr > :last-child { padding-right: 0; }
.ruled .num {
  width: 3.5rem;
  color: var(--accent);
  font-family: var(--font-head);
  font-variant-numeric: tabular-nums;
}
.ruled .figure {
  color: var(--accent);
  font-family: var(--font-head);
  font-size: 1.375rem;
  line-height: 1.2;
  white-space: nowrap;
}
.ruled tfoot td {
  padding-top: 14px;
  color: var(--muted);
  font-size: 0.875rem;
}
.spec tbody th { width: 9rem; }
.stack tbody th { width: 34%; }
.stack .cat { width: 24%; }
.extra tbody th { width: 30%; }

@media (max-width: 639.98px) {
  .ruled thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .ruled,
  .ruled tbody,
  .ruled tfoot { display: block; }
  .ruled tr {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }
  .ruled tbody tr:first-child { border-top: 1px solid var(--accent); }
  .ruled tbody th,
  .ruled tbody td,
  .ruled tfoot td { display: block; width: auto; padding: 0; border: 0; }
  .ruled tbody tr > :last-child { grid-column: 1 / -1; margin-top: 4px; }
  .ruled tfoot tr { display: block; }
  .ruled .figure { font-size: 1.125rem; text-align: right; }
  .stack .cat { text-align: right; font-size: 0.875rem; }
  .ruled tfoot tr { padding-bottom: 0; border-bottom: 0; }
  .ruled .num { width: auto; }
}

/* ---------- II. Factory ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.process { border-top: 1px solid var(--accent); }
.process li {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 4px 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.process .num {
  grid-row: span 2;
  color: var(--accent);
  font-family: var(--font-head);
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}
.process h3 { font-size: 1.0625rem; line-height: 1.5; }
.process p { color: var(--muted); font-size: 0.9375rem; }

.callout { padding: 4px 0 4px clamp(20px, 3vw, 32px); border-left: 1px solid var(--accent); }
.callout .kicker { margin-bottom: 14px; font-size: 0.75rem; }
.callout h3 { font-size: clamp(1.375rem, 2.2vw, 1.75rem); }
.callout p:last-child { max-width: 52ch; margin-top: 14px; color: var(--muted); }

@media (max-width: 1023.98px) {
  .split { grid-template-columns: 1fr; }
}

/* Batch planner */
.planner {
  padding: clamp(22px, 4vw, 44px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.planner-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 28px;
}
.planner h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.planner-rate { color: var(--accent); font-size: 0.875rem; letter-spacing: 0.04em; }
.planner-label { display: block; margin-bottom: 10px; color: var(--muted); font-size: 0.9375rem; }

.range {
  --p: 33.333%;
  display: block;
  width: 100%;
  height: 32px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.range:focus { outline: none; }
.range:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.range::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(to right, var(--accent) 0 var(--p), var(--line) var(--p) 100%);
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -10px;
  border: 4px solid var(--surface);
  border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.range::-moz-range-track { height: 2px; background: var(--line); }
.range::-moz-range-progress { height: 2px; background: var(--accent); }
.range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 4px solid var(--surface);
  border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.range-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.planner-out {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.planner-out > div { padding: 18px 20px 18px 0; }
.planner-out > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.po-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.po-val {
  display: block;
  color: var(--text);
  font-family: var(--font-head);
  font-size: clamp(1.625rem, 2.6vw, 2.25rem);
  font-weight: 500;
  line-height: 1.1;
}
.po-small { font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.35; }
.po-accent { color: var(--accent); }
.po-from { display: block; margin-bottom: 4px; color: var(--muted); font-family: var(--font-body); font-size: 0.875rem; font-weight: 400; line-height: 1.3; }

.planner-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: 24px;
}
.planner-note { color: var(--muted); font-size: 0.875rem; }

@media (max-width: 719.98px) {
  .planner-out { grid-template-columns: 1fr; }
  .planner-out > div { padding: 14px 0; }
  .planner-out > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .planner-foot .btn { width: 100%; }
}

/* ---------- III. Playbooks ---------- */

.playbooks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(44px, 6vw, 72px);
  border-top: 1px solid var(--accent);
}
.playbook { display: flex; flex-direction: column; padding: 22px 24px 4px 0; }
.playbook + .playbook { padding-left: 24px; border-left: 1px solid var(--line); }
.pb-sector {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.pb-metric {
  margin-top: 28px;
  color: var(--accent);
  font-family: var(--font-head);
  font-size: clamp(1.625rem, 2.4vw, 2.25rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.pb-metric-label { margin-top: 8px; color: var(--muted); font-size: 0.8125rem; }
.playbook h3 {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 1.1875rem;
  line-height: 1.3;
}
.pb-text { margin-top: 10px; color: var(--muted); font-size: 0.9375rem; }
.playbook .link { align-self: flex-start; margin-top: auto; }
.playbook .pb-text { margin-bottom: 24px; }

.after { margin-top: clamp(36px, 5vw, 56px); }

@media (max-width: 1023.98px) {
  .playbooks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .playbook:nth-child(odd) { padding-left: 0; border-left: 0; }
  .playbook:nth-child(n+3) { margin-top: 24px; border-top: 1px solid var(--line); }
}
@media (max-width: 559.98px) {
  .playbooks { grid-template-columns: 1fr; }
  .playbook,
  .playbook + .playbook { padding: 22px 0 6px; border-left: 0; }
  .playbook + .playbook { margin-top: 18px; border-top: 1px solid var(--line); }
}

/* ---------- IV. Services ---------- */

.discipline { padding-top: 28px; border-top: 1px solid var(--line); }
.row + .discipline,
.discipline + .discipline { margin-top: clamp(40px, 5vw, 72px); }
.disc-num {
  color: var(--accent);
  font-family: var(--font-head);
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.disc-tag {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.discipline h3 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
.discipline .link { margin-top: 24px; }

@media (max-width: 959.98px) {
  .discipline .margin { display: flex; align-items: baseline; gap: 16px; }
  .disc-tag { margin-top: 0; }
}

.chain {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 24px;
  border-top: 1px solid var(--accent);
}
.chain li { position: relative; padding: 20px 18px 4px 0; }
.chain li + li { padding-left: 18px; border-left: 1px solid var(--line); }
.chain li + li::before {
  content: "→";
  position: absolute;
  top: -0.8em;
  left: -0.75em;
  padding: 0 4px;
  background: var(--bg);
  color: var(--accent);
  font-size: 0.875rem;
  line-height: 1.6;
}
.chain .num {
  display: block;
  color: var(--accent);
  font-family: var(--font-head);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}
.chain strong {
  display: block;
  margin-top: 10px;
  color: var(--text);
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 500;
}
.chain .c-text { display: block; margin-top: 6px; color: var(--muted); font-size: 0.9375rem; line-height: 1.5; }

@media (max-width: 899.98px) {
  .chain { grid-template-columns: 1fr; }
  .chain li,
  .chain li + li {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    gap: 2px 16px;
    padding: 14px 0;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }
  .chain li + li::before { content: none; }
  .chain .num { grid-row: span 2; line-height: 1.9; }
  .chain strong { margin-top: 0; font-size: 1.125rem; }
  .chain .c-text { margin-top: 0; }
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 24px;
  border-top: 1px solid var(--accent);
}
.step { padding: 22px 20px 0 0; }
.step + .step { padding-left: 20px; border-left: 1px solid var(--line); }
.step-num {
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.step h4 { margin-top: 14px; font-size: 1.1875rem; line-height: 1.25; }
.step > p:not(.step-num) { margin-top: 10px; color: var(--muted); font-size: 0.9375rem; }
.step ul { margin-top: 16px; border-top: 1px solid var(--line); }
.step ul li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.875rem; line-height: 1.45; }

@media (max-width: 1179.98px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(odd) { padding-left: 0; border-left: 0; }
  .step:nth-child(n+3) { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
}
@media (max-width: 559.98px) {
  .steps { grid-template-columns: 1fr; }
  .step,
  .step + .step { padding: 22px 0 0; border-left: 0; }
  .step + .step { margin-top: 28px; border-top: 1px solid var(--line); }
}

/* ---------- V. About ---------- */

#about .cols-2 { margin-top: 28px; }

.principles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(24px, 4vw, 56px);
  margin-top: clamp(40px, 5vw, 56px);
  border-top: 1px solid var(--accent);
}
.principle {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 6px 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.principle .num {
  grid-row: span 2;
  color: var(--accent);
  font-family: var(--font-head);
  font-size: 1.5rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.principle h3 { font-size: 1.25rem; line-height: 1.3; }
.principle p { color: var(--muted); font-size: 0.9375rem; }

@media (max-width: 719.98px) {
  .principles { grid-template-columns: 1fr; }
}

/* ---------- VII. FAQ ---------- */

.faq { margin-top: 32px; border-top: 1px solid var(--accent); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) 14px;
  align-items: baseline;
  gap: 16px;
  padding: 20px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-head);
  font-size: clamp(1.0625rem, 1.6vw, 1.3125rem);
  font-weight: 500;
  line-height: 1.35;
  transition: color 0.2s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover .q-text { color: var(--accent); }
.q-num { color: var(--accent); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.plus { position: relative; align-self: center; width: 14px; height: 14px; }
.plus::before,
.plus::after {
  content: "";
  position: absolute;
  top: 6.25px;
  left: 0;
  width: 14px;
  height: 1.5px;
  background: var(--accent);
  transition: transform 0.2s ease;
}
.plus::after { transform: rotate(90deg); }
.faq details[open] .plus::after { transform: rotate(0deg); }
.answer { padding: 0 30px 24px calc(2.75rem + 16px); color: var(--muted); }
.answer p { max-width: 68ch; }
.answer a { color: var(--text); text-decoration-color: var(--accent); text-underline-offset: 3px; }

@media (max-width: 559.98px) {
  .faq summary { grid-template-columns: 2rem minmax(0, 1fr) 14px; gap: 12px; }
  .answer { padding: 0 0 22px calc(2rem + 12px); }
}

/* ---------- VIII. Contact ---------- */

.chapter-last { padding-bottom: clamp(72px, 9vw, 128px); }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(36px, 5vw, 64px);
  align-items: start;
  margin-top: clamp(36px, 5vw, 56px);
}
.ticks { margin: 0 0 28px; border-top: 1px solid var(--accent); }
.ticks li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.ticks li::before {
  content: "";
  flex: none;
  width: 10px;
  height: 5px;
  border-left: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: translateY(-3px) rotate(-45deg);
}

.form-panel {
  padding: clamp(22px, 3.5vw, 40px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 1px solid var(--accent);
  border-radius: var(--radius);
}
.form-title { margin-bottom: 24px; font-size: clamp(1.375rem, 2vw, 1.625rem); }
#lead { position: relative; }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 8px; color: var(--text); font-size: 0.875rem; font-weight: 500; }
.opt { margin-left: 4px; color: var(--muted); font-weight: 400; }
.field input,
.field textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 0.2s ease;
}
.field textarea { min-height: 128px; resize: vertical; }
.field input:hover,
.field textarea:hover { border-color: var(--muted); }
.field input:focus,
.field textarea:focus { border-color: var(--accent); outline: 1px solid var(--accent); outline-offset: 0; }

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn-submit { width: 100%; margin-top: 6px; }
.form-status { min-height: 1.5em; margin-top: 14px; color: var(--text); font-size: 0.9375rem; }
.form-status.is-error { padding-left: 12px; border-left: 2px solid var(--accent); }
.form-note { margin-top: 6px; color: var(--muted); font-size: 0.875rem; }

.form-done { padding: 8px 0 4px; }
.form-done:focus { outline: none; }
.form-done-title {
  color: var(--text);
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 500;
  line-height: 1.2;
}
.form-done-text { margin-top: 12px; color: var(--muted); }
.form-done::before {
  content: "";
  display: block;
  width: 48px;
  height: 1px;
  margin-bottom: 20px;
  background: var(--accent);
}

@media (max-width: 1023.98px) {
  .contact-grid { grid-template-columns: 1fr; }
}

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

.site-footer { padding: 56px 0 32px; border-top: 1px solid var(--accent); }
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 40px clamp(32px, 5vw, 72px);
}
.foot-brand p { max-width: 36ch; margin-top: 16px; color: var(--muted); font-size: 0.9375rem; }
.foot-title {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.toc { columns: 2; column-gap: clamp(24px, 4vw, 48px); }
.toc li { break-inside: avoid; border-bottom: 1px solid var(--line); }
.toc a {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  color: var(--muted);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 0.2s ease;
}
.toc a:hover { color: var(--text); }
.toc .r { min-width: 2.75rem; color: var(--accent); font-family: var(--font-head); }
.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}
.foot-base a { color: var(--text); text-decoration: none; }
.foot-base a:hover { color: var(--accent); }

@media (max-width: 759.98px) {
  .foot-grid { grid-template-columns: 1fr; }
}
@media (max-width: 419.98px) {
  .toc { columns: 1; }
}

/* ---------- Motion ---------- */

/* Smooth in-page scrolling is switched on by main.js after load,
   so an address with #contact does not glide down the whole page. */
@media (prefers-reduced-motion: no-preference) {
  html.smooth { scroll-behavior: smooth; }
}

.reveal { transition: opacity 0.8s ease; }
.reveal.is-pending { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .reveal.is-pending { opacity: 1; }
}
