/* ---------- Tokens ---------- */
:root {
  /* Pantone-anchored palette.
     Base: PANTONE 11-4201 Cloud Dancer (2026 Color of the Year).
     Accent: PANTONE 19-5917 Sycamore (deep forest green, SS2026). */
  --bg: #f5f3ef;          /* Cloud Dancer */
  --bg-alt: #e8e5df;      /* White Onyx — companion off-white */
  --ink: #1a1a1a;         /* Near Black */
  --muted: #6b6860;       /* Warm Gray */
  --line: #d8d4cc;        /* Warm Border */
  --accent: #3c5541;      /* Sycamore */
  --accent-ink: #2c4031;  /* deep Sycamore — text/hover */
  --accent-soft: #e5ebe4; /* sage wash */
  --white: #ffffff;

  --maxw: 1080px;
  --pad: clamp(20px, 5vw, 48px);
  --radius: 16px;

  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

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

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

a { color: inherit; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--pad);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav__brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 30px);
}
.nav__links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color .2s ease;
}
.nav__links a:hover { color: var(--ink); }
.nav__links .nav__cta {
  color: var(--accent-ink);
  font-weight: 600;
}
/* Hamburger toggle — hidden on desktop, shown on mobile */
.nav__toggle { display: none; }
.nav__bar { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.25s ease, opacity 0.2s ease; }

@media (max-width: 880px) {
  .nav__inner { position: relative; }
  .nav__toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    margin-right: -10px;
    padding: 0 11px;
    background: none;
    border: 0;
    cursor: pointer;
  }
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 26px rgba(26, 26, 26, 0.07);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.3s ease, opacity 0.2s ease, visibility 0.3s;
  }
  .nav.is-open .nav__links {
    max-height: calc(100vh - 68px);
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
  }
  .nav__links a {
    display: block;
    padding: 15px var(--pad);
    font-size: 1.05rem;
    color: var(--ink);
    border-top: 1px solid var(--line);
  }
  .nav__links a:first-child { border-top: none; }
  .nav__link--primary, .nav__cta { color: var(--accent-ink); }
  .nav.is-open .nav__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.is-open .nav__bar:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.97rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--accent);
  color: var(--white);
}
.btn--primary:hover { background: var(--accent-ink); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(60px, 10vw, 120px);
  padding-bottom: clamp(48px, 8vw, 96px);
}
.hero__eyebrow {
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.hero__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 6.4vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 16ch;
}
.hero__lede {
  margin: 26px 0 0;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--muted);
  max-width: 54ch;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

/* ---------- Photos ---------- */
.hero__grid {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
@media (max-width: 760px) { .hero__grid { grid-template-columns: 1fr; } }
.hero__portrait { margin: 0; }
.hero__portrait img {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin-inline: auto;
  box-shadow: 0 18px 44px rgba(26, 26, 26, 0.13);
}
@media (max-width: 760px) { .hero__portrait img { max-width: 210px; } }

.section-figure { margin: clamp(28px, 4vw, 48px) 0 0; }
.section-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 62%;
  border-radius: var(--radius);
  display: block;
}
.section-figure figcaption,
.recognition__photo figcaption {
  margin-top: 0.7em;
  font-size: 0.86rem;
  color: var(--muted);
}

.recognition__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}
@media (max-width: 760px) { .recognition__grid { grid-template-columns: 1fr; } }
.recognition__photo { margin: 0; }
.recognition__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 28%;
  border-radius: var(--radius);
  display: block;
}

/* ---------- Stats ---------- */
.stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 40px);
  margin: clamp(48px, 7vw, 80px) 0 0;
  padding: clamp(28px, 4vw, 40px) 0 0;
  border-top: 1px solid var(--line);
}
.stats__item { display: flex; flex-direction: column; gap: 4px; }
.stats__num {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
}
.stats__label { color: var(--muted); font-size: 0.92rem; }
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; gap: 22px; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(56px, 9vw, 110px); }
.section--alt { background: var(--bg-alt); }

.section__head { margin-bottom: clamp(28px, 4vw, 48px); }
.section__head--center { text-align: center; max-width: 40ch; margin-inline: auto; }
.kicker {
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.section__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0;
}

.section__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 760px) {
  .section__grid { grid-template-columns: 1fr; }
}

/* ---------- Prose ---------- */
.prose p { margin: 0 0 1.1em; color: #34352c; }
.prose p:last-child { margin-bottom: 0; }

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.5vw, 26px);
}
@media (max-width: 760px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 32px);
}
.card__index {
  display: inline-block;
  font-family: var(--serif);
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 14px;
}
.card__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.4rem;
  margin: 0 0 8px;
}
.card__body { margin: 0; color: var(--muted); font-size: 0.97rem; }

/* ---------- Feature (Work) ---------- */
.feature {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 760px) { .feature { grid-template-columns: 1fr; } }
.feature__body { padding: clamp(28px, 4vw, 44px); }
.feature__body > p { margin-top: 0; color: #34352c; }
.feature__tag {
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 0.88rem;
  margin: 0 0 14px;
}
.feature__list {
  list-style: none;
  padding: 0;
  margin: 18px 0 22px;
  display: grid;
  gap: 8px;
}
.feature__list li {
  padding-left: 18px;
  position: relative;
  color: var(--muted);
  font-size: 0.97rem;
}
.feature__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.65em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.feature__aside {
  align-self: stretch;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}
.feature__mark {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0.18em;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--accent-ink);
}

.link-arrow {
  display: inline-block;
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.link-arrow:hover { border-bottom-color: var(--accent-ink); }

/* ---------- Awards ---------- */
.awards { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.award {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.award:last-child { border-bottom: 1px solid var(--line); }
.award__year { font-family: var(--serif); color: var(--muted); font-size: 1.05rem; }
.award__title { font-size: 1.15rem; font-weight: 600; margin: 0 0 4px; }
.award__desc { margin: 0; color: var(--muted); font-size: 0.95rem; }
@media (max-width: 560px) {
  .award { grid-template-columns: 60px 1fr; gap: 14px; }
}

/* ---------- Contact ---------- */
.contact__intro { color: var(--muted); margin: 16px 0 20px; }
.social { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 22px; }
.social a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--line);
  transition: color .2s ease, border-color .2s ease;
}
.social a:hover { color: var(--ink); border-bottom-color: var(--ink); }

.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 0.88rem; font-weight: 600; color: var(--muted); }
.field input, .field textarea {
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  width: 100%;
  resize: vertical;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form .btn { justify-self: start; }
.form__status { margin: 4px 0 0; font-size: 0.92rem; min-height: 1.2em; }
.form__status.is-ok { color: var(--accent-ink); }
.form__status.is-error { color: #a8352e; } /* Pantone Lava Falls */

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 28px; }
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Reveal animation (only when JS is on, so no-JS users see content) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Nav: Writing link ---------- */
.nav__link--primary { color: var(--ink); font-weight: 600; }

/* ---------- Reading column ---------- */
.container--reading { max-width: 720px; }

/* ---------- Writing index ---------- */
.writing { padding-block: clamp(48px, 7vw, 88px); }
.writing__head { margin-bottom: clamp(28px, 4vw, 44px); }
.writing__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0.15em 0 0;
}
.writing__intro { color: var(--muted); font-size: 1.1rem; margin: 0.6em 0 0; max-width: 60ch; }

.writing-list { list-style: none; padding: 0; margin: 0; }
.writing-item { border-top: 1px solid var(--line); }
.writing-item:last-child { border-bottom: 1px solid var(--line); }
.writing-item__link { display: block; padding: clamp(20px, 3vw, 30px) 0; text-decoration: none; color: inherit; }
.writing-item__date { font-size: 0.85rem; color: var(--muted); }
.writing-item__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  letter-spacing: -0.01em;
  margin: 0.25em 0 0.3em;
  transition: color 0.2s ease;
}
.writing-item__link:hover .writing-item__title { color: var(--accent-ink); }
.writing-item__summary { color: var(--muted); margin: 0; }
.writing-empty { color: var(--muted); padding: 2rem 0; }

/* ---------- Article (single essay) ---------- */
.article { padding-block: clamp(40px, 6vw, 80px); }
.article__back {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  margin-bottom: clamp(20px, 3vw, 36px);
  transition: color 0.2s ease;
}
.article__back:hover { color: var(--ink); }
.article__head { margin-bottom: clamp(24px, 3vw, 40px); }
.article__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.4em;
}
.article__meta { color: var(--muted); font-size: 0.9rem; margin: 0; }

.article__body { font-family: var(--serif); font-size: 1.22rem; line-height: 1.8; color: #2b2c23; }
.article__body > :first-child { margin-top: 0; }
.article__body p { margin: 0 0 1.35em; }
.article__body h2 { font-family: var(--serif); font-weight: 600; font-size: 1.6rem; line-height: 1.2; margin: 1.8em 0 0.5em; }
.article__body h3 { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; margin: 1.6em 0 0.4em; }
.article__body a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.article__body ul, .article__body ol { margin: 0 0 1.35em; padding-left: 1.4em; }
.article__body li { margin: 0.4em 0; }
.article__body blockquote {
  margin: 1.6em 0;
  padding: 0.4em 0 0.4em 1.2em;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-style: italic;
}
.article__body img { max-width: 100%; height: auto; border-radius: 12px; }
.article__body hr { border: none; border-top: 1px solid var(--line); margin: 2.4em 0; }
.article__body code { background: var(--bg-alt); padding: 0.15em 0.4em; border-radius: 5px; font-size: 0.88em; }
.article__body pre { background: #14150f; color: #f4f3ee; padding: 1em 1.2em; border-radius: 12px; overflow-x: auto; font-size: 0.92rem; }
.article__body pre code { background: none; padding: 0; color: inherit; }

/* ---------- Subscribe ---------- */
.subscribe {
  margin-top: clamp(40px, 6vw, 64px);
  padding: clamp(22px, 3vw, 30px);
  background: var(--accent-soft);
  border-radius: var(--radius);
}
.subscribe__label { font-weight: 600; margin: 0 0 0.9rem; }
.subscribe__form { display: flex; gap: 10px; flex-wrap: wrap; }
.subscribe__form input {
  flex: 1 1 220px;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.subscribe__form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(60, 85, 65, 0.18); }
.subscribe__form .btn { flex-shrink: 0; }
.subscribe .form__status { margin-top: 0.7rem; }

/* ---------- Calculator ---------- */
.container--calc { max-width: 940px; }
.calc { padding-block: clamp(36px, 5vw, 72px); }
.calc__head { margin-bottom: clamp(26px, 4vw, 40px); }
.calc__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 4.2vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0.15em 0 0;
  max-width: 20ch;
}
.calc__intro { color: var(--muted); font-size: 1.08rem; margin: 0.7em 0 0; max-width: 62ch; }

.calc__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2.5vw, 26px);
  align-items: start;
}
@media (max-width: 760px) { .calc__grid { grid-template-columns: 1fr; } }

.calc__inputs, .calc__output {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 28px);
}

.calc-field { display: grid; gap: 6px; margin-bottom: 16px; }
.calc-field label { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.calc-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.calc input {
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.calc input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(60, 85, 65, 0.18); }

.calc-label { font-size: 0.85rem; font-weight: 600; color: var(--muted); margin: 4px 0 10px; }
.calc-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.calc-preset {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  padding: 11px 13px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.calc-preset b { font-size: 0.92rem; color: var(--ink); }
.calc-preset span { font-size: 0.74rem; color: var(--muted); }
.calc-preset:hover { border-color: var(--accent); }
.calc-preset.is-active { border-color: var(--accent); background: var(--accent-soft); }

.calc-advanced { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.calc-advanced summary { cursor: pointer; font-size: 0.9rem; font-weight: 600; color: var(--accent-ink); }
.calc-rates { display: grid; gap: 10px; margin-top: 14px; }
.calc-rate { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.calc-rate > span:first-child { font-size: 0.9rem; }
.calc-rate small { display: block; font-size: 0.72rem; color: var(--muted); }
.calc-rate__field { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
.calc-rate__field input { width: 76px; padding: 7px 9px; }
.calc-rate__field i { color: var(--muted); font-style: normal; font-size: 0.85rem; }

/* Output */
.calc-headline { display: grid; gap: 2px; margin-bottom: 18px; }
.calc-headline__label { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.calc-landed { font-family: var(--serif); font-weight: 600; font-size: clamp(2.1rem, 6vw, 3rem); line-height: 1.05; color: var(--accent-ink); }
.calc-landed-usd { font-size: 0.95rem; color: var(--muted); }
.calc-tti { font-size: 0.95rem; color: var(--ink); margin-top: 6px; }
.calc-tti b { color: var(--accent-ink); }

.calc-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--bg-alt); }
.calc-bar__seg { height: 100%; transition: width 0.35s ease; }
.calc-bar__veh { background: var(--accent); }
.calc-bar__tax { background: #d18851; } /* Pantone Muskmelon */
.calc-bar__key { display: flex; gap: 18px; margin: 8px 0 0; font-size: 0.82rem; color: var(--muted); }
.calc-bar__key .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.dot--veh { background: var(--accent); }
.dot--tax { background: #d18851; }

.calc-table { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 0.92rem; }
.calc-table td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.calc-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.calc-table__sub td { font-weight: 600; }
.calc-table__total td { font-weight: 700; font-size: 1.05rem; color: var(--accent-ink); border-bottom: none; padding-top: 12px; }

.calc-takeaway {
  margin: 18px 0 0;
  padding: 14px 16px;
  background: var(--accent-soft);
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.55;
}
.calc-disclaimer { margin: clamp(20px, 3vw, 28px) 0 0; font-size: 0.8rem; color: var(--muted); max-width: 70ch; }

/* ---------- Featured tool card (homepage) ---------- */
.tool-feature {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.tool-feature:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(26, 26, 26, 0.08);
  border-color: var(--accent);
}
@media (max-width: 700px) { .tool-feature { grid-template-columns: 1fr; } }
.tool-feature__body { padding: clamp(24px, 4vw, 40px); }
.tool-feature__eyebrow {
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.tool-feature__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.tool-feature__desc { color: var(--muted); margin: 0 0 18px; max-width: 48ch; }
.tool-feature__cta { color: var(--accent-ink); font-weight: 600; }
.tool-feature:hover .tool-feature__cta { text-decoration: underline; text-underline-offset: 3px; }
.tool-feature__stat {
  background: var(--accent);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(24px, 4vw, 40px);
  gap: 8px;
}
.tool-feature__big { font-family: var(--serif); font-weight: 600; font-size: clamp(3rem, 9vw, 4.6rem); line-height: 1; }
.tool-feature__cap { font-size: 0.88rem; opacity: 0.85; max-width: 18ch; }

/* ---------- Engineering tools (efficiency + range) ---------- */
.calc select {
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  width: 100%;
}
.calc select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(60, 85, 65, 0.18); }

.eff-section-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}
.eff-headline { display: grid; gap: 2px; margin-bottom: 16px; }
.eff-metric { margin: 0 0 14px; }
.eff-metric__top { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.92rem; gap: 12px; }
.eff-metric__top b { font-variant-numeric: tabular-nums; }
.eff-bar { height: 12px; border-radius: 999px; background: var(--bg-alt); overflow: hidden; margin-top: 6px; }
.eff-bar__fill { display: block; height: 100%; border-radius: 999px; transition: width 0.35s ease; }
.eff-bar__fill--ice { background: #d18851; }     /* Muskmelon */
.eff-bar__fill--ev { background: var(--accent); }  /* Sycamore */
.eff-bar__fill--neutral { background: #9ca982; }  /* Sage Green */

.calc-check { display: flex; align-items: center; gap: 9px; font-size: 0.92rem; padding: 7px 0; cursor: pointer; }
.calc-check input { width: auto; }

.tool-explainer { margin-top: clamp(28px, 4vw, 44px); border-top: 1px solid var(--line); padding-top: clamp(20px, 3vw, 30px); }
.tool-explainer h2 { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; margin: 0 0 0.6em; }
.tool-explainer > p { color: #2c2d24; max-width: 70ch; margin: 0 0 1em; }

.standard-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 10px; }
@media (max-width: 640px) { .standard-cards { grid-template-columns: 1fr; } }
.standard-card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.standard-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.standard-card__head b { font-size: 1.05rem; }
.standard-card__head span { font-size: 0.78rem; color: var(--muted); }
.standard-card p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

/* ---------- Storybook (/story) ---------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--accent);
  z-index: 60;
  transition: width 0.1s linear;
}

.book-cover {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(48px, 9vw, 100px) var(--pad) clamp(32px, 5vw, 56px);
}
.book__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.8rem, 9vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0.2em 0 0;
}
.book__subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 2.6vw, 1.45rem);
  color: var(--muted);
  margin: 0.5em 0 0;
}
.book__byline {
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1.4em 0 0;
}
.book__intro {
  color: #34352c;
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 52ch;
  margin: 1.6em auto 2em;
}

/* Contents */
.contents {
  text-align: left;
  max-width: 540px;
  margin: clamp(36px, 6vw, 64px) auto 0;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.contents__label {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}
.contents__item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 12px 4px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease, padding-left 0.15s ease;
}
.contents__item:hover { background: var(--accent-soft); padding-left: 10px; }
.contents__num {
  font-family: var(--serif);
  color: var(--accent);
  font-size: 1rem;
  min-width: 2em;
  text-align: right;
  flex-shrink: 0;
}
.contents__text { display: flex; flex-direction: column; gap: 3px; }
.contents__title { font-weight: 500; line-height: 1.3; }
.contents__date { color: var(--muted); font-size: 0.82rem; }

/* Chapters */
.book__body { padding-bottom: clamp(40px, 7vw, 80px); }
.chapter {
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 72px) var(--pad);
  scroll-margin-top: 80px;
}
.chapter__eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 0 0 0.7em;
}
.chapter__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.8em;
}
.chapter__body {
  font-family: var(--serif);
  font-size: clamp(1.12rem, 2.4vw, 1.27rem);
  line-height: 1.85;
  color: #2b2c23;
}
.chapter__body p { margin: 0 0 1.25em; }
.chapter__body > p:first-of-type::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: 3.6em;
  line-height: 0.74;
  font-weight: 500;
  color: var(--accent);
  padding: 0.02em 0.1em 0 0;
}
.chapter__body a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.chapter__top {
  display: inline-block;
  margin-top: 1.5em;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
}
.chapter__top:hover { color: var(--ink); }

.chapter-divider {
  text-align: center;
  color: var(--accent);
  font-size: 1.5rem;
  margin: 0;
  opacity: 0.7;
}

.book-end {
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 56px) var(--pad);
  text-align: center;
  color: var(--muted);
}
.book-end__mark { color: var(--accent); font-size: 1.4rem; margin: 0 0 0.6em; }
.book-end a { margin: 0 6px; }

@media (max-width: 560px) {
  .chapter__body > p:first-of-type::first-letter { font-size: 3em; }
}

/* Chapter links, translated badge, prev/next */
.chapter__xlated {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 9px;
  margin-left: 4px;
  vertical-align: middle;
}
.chapter__title a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
.chapter__title a:hover { color: var(--accent-ink); }
.chapter-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(28px, 4vw, 44px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}
.chapter-nav a { color: var(--accent-ink); text-decoration: none; max-width: 48%; }
.chapter-nav__next { text-align: right; margin-left: auto; }
.chapter-nav a:hover { text-decoration: underline; }
.chapter-readfull { margin-top: 1.4em; }

/* Unified blog: post tags + prev/next */
.writing-item__tag { color: var(--accent-ink); }
.article__tag {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 9px;
  margin-left: 4px;
  vertical-align: middle;
}
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: clamp(28px, 4vw, 48px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.post-nav a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 47%;
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 500;
  line-height: 1.3;
}
.post-nav a span { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.post-nav a:hover { text-decoration: underline; }
.post-nav__next { text-align: right; margin-left: auto; align-items: flex-end; }
