/* ==========================================================================
   TDEENet — stylesheet
   Palette: deep aubergine structure, mineral teal action, amber for exertion.
   Type: Bricolage Grotesque (display) / Instrument Sans (body) / IBM Plex Mono (data)
   ========================================================================== */

:root {
  --ink:        #23122b;
  --ink-soft:   #3d2547;
  --plum:       #4a2d55;
  --plum-light: #7b5a86;
  --paper:      #f7f4f6;
  --surface:    #ffffff;
  --rule:       #e5dae7;
  --rule-soft:  #f0e9f1;
  --muted:      #6e5b75;
  --teal:       #0e7c86;
  --teal-deep:  #0a5c64;
  --teal-wash:  #e2f0f1;
  --amber:      #d98a2b;
  --amber-wash: #fbf0df;
  --rose:       #a83a5e;
  --rose-wash:  #fbe9ee;

  --seg-bmr:  #4a2d55;
  --seg-neat: #0e7c86;
  --seg-tef:  #7fb8bd;
  --seg-eat:  #d98a2b;

  --font-display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1120px;
  --radius: 4px;
  --radius-lg: 10px;
  --shadow: 0 1px 2px rgba(35, 18, 43, .06), 0 8px 28px rgba(35, 18, 43, .06);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--teal-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }

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

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 18px;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- Type scale ---------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.14;
  letter-spacing: -0.022em;
  margin: 0 0 .5em;
  font-weight: 700;
}

h1 { font-size: clamp(2.15rem, 5.2vw, 3.4rem); font-weight: 800; letter-spacing: -0.032em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.22rem; letter-spacing: -0.012em; }
h4 { font-size: 1.02rem; letter-spacing: 0; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin: 0 0 14px;
  font-weight: 500;
}

.lede { font-size: 1.12rem; color: var(--ink-soft); }
.small { font-size: .92rem; color: var(--muted); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 244, 246, .92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 66px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.16rem; letter-spacing: -.03em;
  color: var(--ink); text-decoration: none; display: flex; align-items: baseline; gap: 2px;
}
.brand span { color: var(--teal); }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a {
  font-size: .93rem; color: var(--ink-soft); text-decoration: none;
  padding: 8px 12px; border-radius: var(--radius);
}
.nav a:hover { background: var(--rule-soft); color: var(--ink); }

/* ---------- Hero + calculator ---------- */

.hero { padding: 52px 0 20px; }
.hero h1 { max-width: 15ch; }
.hero .lede { max-width: 58ch; margin-top: 6px; }

.calc {
  display: block;
  margin: 34px 0 14px;
}
.calc > .panel + .panel { margin-top: 22px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.panel__head {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--rule-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.panel__head h2 { font-size: 1.02rem; margin: 0; letter-spacing: -.005em; }
.panel__body { padding: 20px 22px 24px; }

/* form */

.field { margin-bottom: 16px; }
.field > label,
.fieldset > legend {
  display: block; font-size: .84rem; font-weight: 600;
  color: var(--ink-soft); margin-bottom: 6px; letter-spacing: .005em;
}
.fieldset { border: 0; padding: 0; margin: 0 0 16px; }

input[type="number"], input[type="text"], input[type="email"], select, textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 10px 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input[type="number"] { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
input:hover, select:hover { border-color: var(--plum-light); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-wash);
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%236e5b75' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 11px;
  padding-right: 34px;
}

.row { display: grid; gap: 12px; }
.row--2 { grid-template-columns: 1fr 1fr; }

.suffix { position: relative; }
.suffix input { padding-right: 46px; }
.suffix::after {
  content: attr(data-unit);
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: .78rem; color: var(--muted);
  pointer-events: none;
}

/* segmented toggles */

.seg { position: relative; display: inline-flex; background: var(--rule-soft); border-radius: var(--radius); padding: 3px; gap: 3px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  font-size: .86rem; font-weight: 600; color: var(--muted);
  padding: 6px 14px; border-radius: 3px; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.seg input:checked + label { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(35,18,43,.12); }
.seg input:focus-visible + label { outline: 2px solid var(--teal); outline-offset: 1px; }
.seg--full { display: grid; grid-template-columns: 1fr 1fr; }
.seg--full label { text-align: center; }

/* buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-size: .98rem; font-weight: 600;
  padding: 12px 22px; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, transform .06s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--teal); color: #fff; width: 100%; }
.btn--primary:hover { background: var(--teal-deep); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink-soft); border-color: var(--rule); }
.btn--ghost:hover { background: var(--rule-soft); color: var(--ink); }
.btn--sm { padding: 7px 13px; font-size: .85rem; }

.form-note { margin-top: 12px; font-size: .82rem; color: var(--muted); line-height: 1.5; }

/* ---------- Results ---------- */

.result__empty {
  padding: 46px 26px; text-align: center; color: var(--muted);
}
.result__empty svg { margin: 0 auto 16px; opacity: .5; }
.result__empty p { max-width: 34ch; margin-inline: auto; font-size: .95rem; }

.headline-figure {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 14px;
  padding-bottom: 6px;
}
.headline-figure .value {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 3.8rem);
  font-weight: 800; letter-spacing: -.04em; line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.headline-figure .unit { font-family: var(--font-mono); font-size: .9rem; color: var(--muted); letter-spacing: .06em; }
.headline-figure .range {
  font-family: var(--font-mono); font-size: .8rem; color: var(--muted);
  background: var(--rule-soft); padding: 4px 9px; border-radius: 20px;
}

/* signature: the energy budget bar */

.budget { margin: 22px 0 6px; }
.budget__bar {
  display: flex; width: 100%; height: 46px;
  border-radius: var(--radius); overflow: hidden;
  background: var(--rule-soft);
}
.budget__seg {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-mono); font-size: .74rem;
  min-width: 0; overflow: hidden; white-space: nowrap;
  width: 0;
  transition: width .7s cubic-bezier(.22,.7,.3,1);
}
.budget__seg[data-seg="bmr"]  { background: var(--seg-bmr); }
.budget__seg[data-seg="tef"]  { background: var(--seg-tef); color: var(--ink); }
.budget__seg[data-seg="neat"] { background: var(--seg-neat); }
.budget__seg[data-seg="eat"]  { background: var(--seg-eat); }

.budget__key {
  display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 14px;
  list-style: none; padding: 0;
}
.budget__key li { display: flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--ink-soft); }
.budget__key .dot { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.budget__key .kcal { font-family: var(--font-mono); color: var(--muted); font-size: .8rem; }

/* target table */

.targets { width: 100%; border-collapse: collapse; margin-top: 6px; }
.targets caption { text-align: left; font-size: .84rem; color: var(--muted); padding-bottom: 10px; }
.targets th, .targets td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--rule-soft); }
.targets thead th {
  font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase;
  letter-spacing: .1em; color: var(--muted); font-weight: 500; border-bottom-color: var(--rule);
}
.targets tbody th { font-weight: 600; font-size: .93rem; color: var(--ink); }
.targets td { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: .95rem; }
.targets tr[data-highlight="true"] { background: var(--teal-wash); }
.targets tr[data-highlight="true"] td, .targets tr[data-highlight="true"] th { border-bottom-color: transparent; }
.targets .floored { color: var(--rose); }

/* stat grid */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; margin-top: 4px; }
.stat { background: var(--surface); padding: 14px 16px; }
.stat dt { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 5px; }
.stat dd { margin: 0; font-family: var(--font-mono); font-size: 1.18rem; font-variant-numeric: tabular-nums; color: var(--ink); }
.stat dd small { display: block; font-family: var(--font-body); font-size: .78rem; color: var(--muted); margin-top: 3px; letter-spacing: 0; }

/* macros */

.macro-list { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 10px; }
.macro-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--rule-soft); }
.macro-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.macro-list .name { font-weight: 600; font-size: .95rem; }
.macro-list .name small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
.macro-list .grams, .macro-list .kcals { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: .95rem; }
.macro-list .kcals { color: var(--muted); font-size: .82rem; }

/* result sub-blocks */

.result-block { padding: 22px; border-top: 1px solid var(--rule-soft); }
.result-block:first-child { border-top: 0; }
.result-block > h3 {
  font-family: var(--font-mono); font-size: .72rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .12em; color: var(--muted);
  margin-bottom: 14px;
}

/* notices */

.notice {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 13px 15px; border-radius: var(--radius);
  font-size: .9rem; line-height: 1.55; margin-bottom: 14px;
}
.notice:last-child { margin-bottom: 0; }
.notice svg { flex: none; margin-top: 2px; }
.notice--warn { background: var(--rose-wash); color: #6d2340; border: 1px solid #f0cdd8; }
.notice--info { background: var(--teal-wash); color: #0a4a51; border: 1px solid #c3e2e4; }
.notice--caution { background: var(--amber-wash); color: #7a4a10; border: 1px solid #f0dbba; }
.notice strong { font-weight: 700; }
.notice a { color: inherit; }

.blocked { padding: 30px 24px; }

/* ---------- Content sections ---------- */

.section { padding: 64px 0; border-top: 1px solid var(--rule); }
.section--plain { border-top: 0; }
.section__intro { max-width: 68ch; margin-bottom: 34px; }

.prose { max-width: 68ch; }
.prose h3 { margin-top: 2em; }
.prose ul, .prose ol { padding-left: 1.15em; margin: 0 0 1.1em; }
.prose li { margin-bottom: .5em; }
.prose strong { font-weight: 700; color: var(--ink); }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }

.card {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); padding: 22px;
}
.card h3 { margin-bottom: .45em; }
.card p { font-size: .96rem; color: var(--ink-soft); }
.card .tag {
  display: inline-block; font-family: var(--font-mono); font-size: .7rem;
  letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px;
  border-radius: 3px; margin-bottom: 12px; color: #fff;
}

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 560px; }
table.data caption { text-align: left; font-size: .86rem; color: var(--muted); padding-bottom: 12px; }
table.data th, table.data td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.data thead th {
  font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase;
  letter-spacing: .1em; color: var(--muted); font-weight: 500;
  background: var(--rule-soft); border-bottom-color: var(--rule);
}
table.data tbody th { font-weight: 600; color: var(--ink); width: 22%; }
table.data code { font-family: var(--font-mono); font-size: .84rem; background: var(--rule-soft); padding: 2px 5px; border-radius: 3px; }

/* FAQ */

.faq { max-width: 76ch; }
.faq details {
  border-bottom: 1px solid var(--rule);
  padding: 4px 0;
}
.faq summary {
  cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 700; font-size: 1.06rem;
  letter-spacing: -.012em; color: var(--ink);
  padding: 18px 40px 18px 0; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%;
  width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--plum-light); border-bottom: 2px solid var(--plum-light);
  transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq summary:hover { color: var(--teal-deep); }
.faq .answer { padding: 0 8px 22px 0; color: var(--ink-soft); font-size: .98rem; }

/* references */

.refs { max-width: 78ch; counter-reset: ref; list-style: none; padding: 0; margin: 0; }
.refs li {
  position: relative; padding: 0 0 16px 40px; margin-bottom: 16px;
  border-bottom: 1px solid var(--rule-soft); font-size: .92rem; color: var(--ink-soft);
  line-height: 1.55;
}
.refs li::before {
  counter-increment: ref; content: counter(ref);
  position: absolute; left: 0; top: 1px;
  font-family: var(--font-mono); font-size: .78rem; color: var(--teal-deep);
  background: var(--teal-wash); width: 26px; height: 26px;
  display: grid; place-items: center; border-radius: 3px;
}
.refs cite { font-style: normal; font-weight: 600; color: var(--ink); }

.reviewed {
  display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center;
  font-size: .86rem; color: var(--muted);
  padding: 14px 0 0; margin-top: 8px; border-top: 1px solid var(--rule);
}
.reviewed span { display: flex; align-items: center; gap: 7px; }

/* disclaimer strip */

.disclaimer {
  background: var(--ink); color: #e9dced;
  padding: 30px 0;
}
.disclaimer .wrap { display: flex; gap: 18px; align-items: flex-start; }
.disclaimer h2 { color: #fff; font-size: 1.02rem; margin-bottom: .4em; }
.disclaimer p { font-size: .92rem; line-height: 1.6; margin: 0; color: #d7c6db; max-width: 78ch; }
.disclaimer a { color: #9fd8dc; }

/* footer */

.site-footer { background: var(--surface); border-top: 1px solid var(--rule); padding: 46px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(2, 1fr); gap: 32px; }
.footer-grid h3 { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 500; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 9px; }
.footer-grid a { font-size: .93rem; color: var(--ink-soft); text-decoration: none; }
.footer-grid a:hover { color: var(--teal-deep); text-decoration: underline; }
.footer-grid p { font-size: .92rem; color: var(--muted); max-width: 40ch; }
.footer-bottom {
  margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between;
  font-size: .86rem; color: var(--muted);
}

/* utility */
.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;
}
.is-hidden { display: none !important; }

/* ---------- Responsive ---------- */

@media (max-width: 940px) {
  .calc { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 18px; }
  .hero { padding-top: 34px; }
  .section { padding: 46px 0; }
  .nav a { padding: 8px 9px; font-size: .88rem; }
  .nav a[data-optional] { display: none; }
  .panel__body, .result-block { padding-left: 17px; padding-right: 17px; }
  .row--2 { grid-template-columns: 1fr; }
  .budget__bar { height: 40px; }
  .budget__seg { font-size: .68rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .disclaimer .wrap { flex-direction: column; gap: 12px; }
}

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

@media print {
  .site-header, .site-footer, .faq, .btn { display: none; }
  body { background: #fff; }
  .panel { box-shadow: none; }
}

/* ==========================================================================
   Additions: stacked calculator, steps, features, wider result layout
   ========================================================================== */

/* ---------- form laid out across the full width ---------- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0 22px;
  align-items: start;
}
.form-grid .field, .form-grid .fieldset { margin-bottom: 18px; }
.form-grid .field--wide { grid-column: span 2; }

.form-actions {
  margin-top: 6px; padding-top: 20px; border-top: 1px solid var(--rule-soft);
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
}
.form-actions .btn--primary { width: auto; min-width: 260px; flex: 1 1 260px; }
.form-actions .form-note { margin: 0; flex: 1 1 240px; }

/* ---------- results, now full width ---------- */

.result-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 30px; align-items: center;
}
.result-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0;
}
.result-grid > .result-block { border-top: 1px solid var(--rule-soft); }
.result-grid > .result-block:nth-child(even) { border-left: 1px solid var(--rule-soft); }

.result-controls {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
  margin-bottom: 16px;
}
.result-controls .field { margin: 0; flex: 1 1 170px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .04em;
  padding: 5px 10px; border-radius: 20px;
  background: var(--rule-soft); color: var(--muted);
}

@media (max-width: 820px) {
  .result-head { grid-template-columns: 1fr; gap: 18px; }
  .result-grid > .result-block:nth-child(even) { border-left: 0; }
  .form-grid .field--wide { grid-column: span 1; }
}

/* ---------- three-step explainer ---------- */

.steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 26px; counter-reset: step;
}
.step {
  position: relative; background: var(--surface);
  border: 1px solid var(--rule); border-radius: var(--radius-lg);
  padding: 26px 24px 24px;
}
.step__num {
  counter-increment: step;
  position: absolute; top: -13px; left: 24px;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em;
  background: var(--ink); color: #fff;
  padding: 4px 11px; border-radius: 20px;
}
.step__num::before { content: "STEP " counter(step); }
.step__art {
  width: 100%; height: 116px; margin: 6px 0 18px;
  display: grid; place-items: center;
  background: linear-gradient(180deg, var(--rule-soft), var(--surface));
  border-radius: var(--radius); border: 1px solid var(--rule-soft);
}
.step h3 { font-size: 1.1rem; margin-bottom: .4em; }
.step p { font-size: .95rem; color: var(--ink-soft); margin: 0; }

/* ---------- feature strip ---------- */

.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px; background: var(--rule);
  border: 1px solid var(--rule); border-radius: var(--radius-lg); overflow: hidden;
}
.feature { background: var(--surface); padding: 26px 24px; }
.feature__icon {
  width: 40px; height: 40px; border-radius: 9px;
  display: grid; place-items: center; margin-bottom: 15px;
  background: var(--teal-wash); color: var(--teal-deep);
}
.feature:nth-child(2) .feature__icon { background: var(--amber-wash); color: #8a5514; }
.feature:nth-child(3) .feature__icon { background: #efe6f1; color: var(--plum); }
.feature:nth-child(4) .feature__icon { background: var(--rose-wash); color: var(--rose); }
.feature h3 { font-size: 1.04rem; margin-bottom: .35em; }
.feature p { font-size: .92rem; color: var(--muted); margin: 0; line-height: 1.55; }

/* ---------- inner page furniture ---------- */

.page-head { padding: 52px 0 8px; }
.page-head h1 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); max-width: 20ch; }
.page-head .lede { max-width: 62ch; }

.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.crumbs li::after { content: "/"; margin-left: 8px; color: var(--rule); }
.crumbs li:last-child::after { content: ""; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--teal-deep); text-decoration: underline; }

.toc {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); padding: 20px 24px; margin-bottom: 34px;
}
.toc h2 { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 500; margin-bottom: 12px; }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc li { margin-bottom: 6px; font-size: .94rem; }

.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 34px; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.updated {
  font-family: var(--font-mono); font-size: .78rem; color: var(--muted);
  letter-spacing: .04em; margin-bottom: 26px;
}
