/* ==========================================================================
   crofters.org - shared stylesheet
   Layered over Bootstrap 5.3.3 (CDN). Mobile-first: base rules target a
   360px screen, wider layouts arrive with min-width queries at 480 / 768 / 1024.
   Light theme only.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  color-scheme: only light;

  --bg: #FFFBEB;
  --surface: #FDF0C8;
  --ink: #1A1A1A;
  --muted: #5C5A4F;
  --accent: #111111;
  --accent-ink: #FFFBEB;
  --rule: rgba(92, 90, 79, 0.55);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --radius: 6px;
  --gutter: 16px;
  --rail: 160px;
  --half: 24px;

  --f-bg: #FDF0C8;
  --f-card: #FFFBEB;
  --f-border: #111111;
  --f-rule: rgba(92, 90, 79, 0.45);
  --f-ink: #1A1A1A;
  --f-muted: #5C5A4F;

  --bs-body-bg: #FFFBEB;
  --bs-body-color: #1A1A1A;
  --bs-body-font-family: var(--font-body);
  --bs-link-color-rgb: 17, 17, 17;
  --bs-link-hover-color-rgb: 17, 17, 17;
}

@media (min-width: 768px) {
  :root { --gutter: 24px; }
}

@media (min-width: 1024px) {
  :root { --rail: 200px; --half: 30px; }
}

/* ---------- 2. Base ---------- */
html {
  background-color: #FFFBEB;
  color: #1A1A1A;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body.layout-article {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

body.layout-article img,
body.layout-article video {
  max-width: 100%;
  height: auto;
}

body.layout-article a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

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

.layout-article .container {
  width: 100%;
  max-width: calc(940px + var(--gutter) * 2);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

main { display: block; }

/* ---------- 3. Masthead (boxed) ---------- */
.masthead {
  background-color: var(--bg);
  color: var(--ink);
  padding-top: 18px;
}

.masthead-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 42px 18px 18px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background-color: var(--bg);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover { background-color: transparent; }

.brand-mark {
  display: block;
  flex: none;
  width: 56px;
  height: auto;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 1.4rem + 3.6vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand-domain {
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.ad-label {
  position: absolute;
  top: 12px;
  right: 16px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.2;
  color: var(--accent);
}

.masthead-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding: 8px 0 6px;
  background-color: var(--bg);
}

.masthead-nav .nav-toggle {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background-color: var(--bg);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: background-color .18s ease, color .18s ease;
}

.masthead-nav .nav-toggle:hover,
.masthead-nav .nav-toggle[aria-expanded="true"] {
  background-color: var(--accent);
  color: var(--accent-ink);
}

.masthead-nav .nav-toggle:focus { box-shadow: none; }

.masthead-nav .navbar-collapse { flex-basis: 100%; }

.masthead-nav .navbar-nav {
  width: 100%;
  margin: 8px 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
  list-style: none;
}

.masthead-nav .nav-link {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 48px;
  padding: 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.masthead-nav .nav-link:hover,
.masthead-nav .nav-link:focus-visible {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 6px;
}

.divider {
  display: block;
  height: 5px;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: transparent;
  color: var(--rule);
  opacity: 1;
}

@media (min-width: 768px) {
  .masthead { padding-top: 28px; }

  .masthead-box {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    padding: 48px 28px 22px;
  }

  .brand-mark { width: 72px; }
  .brand-domain { padding-bottom: 8px; }
  .ad-label { top: 16px; right: 22px; }

  .masthead-nav .navbar-nav { flex-direction: row; justify-content: flex-end; width: auto; margin: 0; border-top: 0; }
  .masthead-nav .nav-link { justify-content: flex-start; padding: 0 0 0 30px; border-bottom: 0; }
}

/* ---------- 4. Hero (headline, dek, two-image mosaic) ---------- */
.hero {
  background-color: var(--bg);
  color: var(--ink);
  padding: 30px 0 36px;
}

.meta-line {
  margin: 0 0 14px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.hero h1 {
  max-width: 21em;
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.85rem, 1.25rem + 2.9vw, 3.3rem);
  line-height: 1.07;
  letter-spacing: -0.018em;
  color: var(--ink);
  text-wrap: balance;
}

.dek {
  max-width: 44rem;
  margin: 0 0 30px;
  font-size: clamp(1.05rem, 1rem + 0.45vw, 1.28rem);
  line-height: 1.55;
  color: var(--ink);
}

.mosaic {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 10px;
}

.mosaic figure { display: flex; flex-direction: column; margin: 0; min-width: 0; }

.mosaic img {
  display: block;
  width: 100%;
  height: clamp(190px, 44vw, 410px);
  object-fit: cover;
  border-radius: var(--radius);
  background-color: var(--surface);
}

.mosaic-main img { object-position: 50% 28%; }
.mosaic-side img { object-position: 40% 20%; }

.mosaic figcaption {
  margin-top: 10px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
}

@media (min-width: 768px) {
  .hero { padding: 44px 0 56px; }
  .mosaic { gap: 14px; }
}

/* ---------- 5. Article grid: asymmetric left rail ---------- */
.section { padding: 40px 0; background-color: var(--bg); color: var(--ink); }

@media (min-width: 768px) {
  .section { padding: 64px 0; }
}

.article-row { align-items: flex-start; }

.rail { margin-bottom: 20px; }

.rail-kicker {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.rail h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.8rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.rail-note {
  margin: 20px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
}

.rail-note strong { display: block; margin-bottom: 2px; font-weight: 600; color: var(--ink); }

.rail > .rail-note:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.story { min-width: 0; }

.story p { margin: 0 0 1.15em; }

.story h3 {
  margin: 2rem 0 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.2rem, 1.1rem + 0.45vw, 1.4rem);
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--ink);
}

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

.story ul { margin: 0 0 1.15em; }

@media (min-width: 768px) {
  .article-row > .rail {
    flex: 0 0 var(--rail);
    width: var(--rail);
    max-width: var(--rail);
    margin-bottom: 0;
    position: sticky;
    top: 20px;
    align-self: flex-start;
  }

  .article-row > .story {
    flex: 1 1 0;
    width: auto;
    max-width: 680px;
    margin-left: var(--half);
    padding-left: var(--half);
    border-left: 1px solid var(--rule);
  }
}

/* ---------- 6. Components ---------- */
.eyebrow {
  margin: 1.8rem 0 0.7rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* definition / key-concept cards */
.concepts {
  display: grid;
  gap: 12px;
  margin: 0 0 1.8rem;
  padding: 0;
}

.concept {
  margin: 0;
  padding: 16px 18px 18px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background-color: var(--bg);
  transition: border-color .18s ease, background-color .18s ease;
}

.concept:hover { border-color: var(--accent); background-color: #FFFDF4; }

.concept dt {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.25;
  color: var(--ink);
}

.concept dd { margin: 0; font-size: 0.9375rem; line-height: 1.6; color: var(--ink); }

@media (min-width: 1024px) {
  .concepts { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}

/* key takeaway: offset surface and a 3px accent bar */
.takeaway {
  margin: 1.8rem 0;
  padding: 20px 22px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background-color: var(--surface);
  color: var(--ink);
}

.takeaway-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.takeaway p {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.1rem, 1.02rem + 0.4vw, 1.3rem);
  line-height: 1.45;
  color: var(--ink);
}

/* stage list (unnumbered) */
.stages {
  margin: 0 0 1.4em;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--rule);
}

.stages li {
  position: relative;
  padding: 14px 0 14px 28px;
  border-top: 1px solid var(--rule);
  font-size: 1rem;
  line-height: 1.6;
}

.stages li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 1.35rem;
  width: 9px;
  height: 9px;
  background-color: var(--accent);
  border-radius: 1px;
}

.stages strong {
  display: inline-block;
  margin-right: 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
}

/* media */
.media-loop {
  position: relative;
  margin: 2rem 0;
  aspect-ratio: 1200 / 630;
  overflow: hidden;
  border-radius: var(--radius);
  background-color: var(--surface);
}

.media-loop video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* boxed call-to-action card */
.cta-card {
  margin: 2.2rem 0;
  padding: 24px 20px 26px;
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  background-color: var(--bg);
  color: var(--ink);
}

.cta-card h2,
.cta-card .cta-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 1.15rem + 0.7vw, 1.6rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.cta-card p { margin: 0 0 18px; font-size: 1rem; line-height: 1.55; color: var(--ink); }

.btn-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 26px;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  background-color: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

body.layout-article a.btn-cta { color: var(--accent-ink); text-decoration: none; }

.btn-cta:hover,
body.layout-article a.btn-cta:hover {
  background-color: var(--bg);
  color: var(--accent);
}

.btn-cta:active { transform: translateY(1px); }

@media (min-width: 480px) {
  .btn-cta { display: inline-flex; }
  .cta-card { padding: 28px 28px 30px; }
}

/* question-and-answer blocks (accordion, open by default) */
.qa {
  margin: 1.8rem 0;
  border-top: 1px solid var(--accent);
}

.qa-item { border-bottom: 1px solid var(--rule); }

.qa-q {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 16px 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.1rem, 1.02rem + 0.4vw, 1.25rem);
  line-height: 1.3;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  transition: color .18s ease;
}

.qa-q::-webkit-details-marker { display: none; }

.qa-q::after {
  content: "+";
  flex: none;
  width: 28px;
  height: 28px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.1rem;
  line-height: 25px;
  text-align: center;
  color: var(--accent);
  transition: background-color .18s ease, color .18s ease;
}

.qa-item[open] > .qa-q::after { content: "\2212"; }

.qa-q:hover::after { background-color: var(--accent); color: var(--accent-ink); }

.qa-a { padding: 0 0 18px; }
.qa-a p { margin: 0 0 0.9em; font-size: 1rem; }
.qa-a p:last-child { margin-bottom: 0; }

.end-note { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.55; }

/* ---------- 7. Footer colophon (bordered imprint card) ---------- */
.colophon {
  margin-top: 0;
  padding: 40px 0 48px;
  background-color: var(--f-bg);
  color: var(--f-ink);
}

.colophon-card {
  padding: 22px 18px 8px;
  border: 1px solid var(--f-border);
  border-radius: var(--radius);
  background-color: var(--f-card);
  color: var(--f-ink);
}

.closing_note {
  margin: 0 0 18px;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--f-ink);
}

.company {
  margin: 0 0 12px;
  padding-top: 18px;
  border-top: 1px solid var(--f-rule);
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--f-muted);
}

.company p { margin: 0; }

.legal { padding-top: 6px; border-top: 1px solid var(--f-rule); }

.legal ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--f-ink);
  font-size: 0.9375rem;
  font-weight: 500;
}

.legal a:hover { background-color: var(--surface); }

@media (min-width: 768px) {
  .colophon { padding: 56px 0 64px; }
  .colophon-card { padding: 30px 32px 10px; }
}

/* ---------- 8. Legal and about pages ---------- */
.page-head { padding: 34px 0 28px; background-color: var(--bg); color: var(--ink); }

.page-head h1 {
  max-width: 18em;
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}

.page-head .updated,
.updated {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.page-head .lead { max-width: 40rem; margin: 12px 0 0; font-size: 1.1rem; line-height: 1.6; }

.qa-row { padding: 28px 0; border-top: 1px solid var(--rule); background-color: var(--bg); }
.qa-row .rail { margin-bottom: 12px; }
.qa-row .rail h2 { font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.4rem); }

.legal-body { padding-bottom: 24px; background-color: var(--bg); color: var(--ink); }

.story ul.plain { padding-left: 1.2rem; }
.story ul.plain li { margin-bottom: 0.4em; }

@media (min-width: 768px) {
  .qa-row { padding: 36px 0; }
}

/* ==========================================================================
   OFFER PAGE - body.consultation-portal
   A separate identity: cool slate and cobalt, Inter only, soft rounded cards.
   ========================================================================== */
body.consultation-portal {
  --p-bg: #EEF2F8;
  --p-card: #FFFFFF;
  --p-navy: #0E1A33;
  --p-ink: #10203F;
  --p-muted: #4B5A78;
  --p-line: #CBD5E6;
  --p-accent: #1F4FD8;
  --p-accent-dark: #173BA6;
  --p-soft: #E4ECFC;

  --f-bg: #EEF2F8;
  --f-card: #FFFFFF;
  --f-border: #CBD5E6;
  --f-rule: #D8E0EE;
  --f-ink: #10203F;
  --f-muted: #4B5A78;

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

.consultation-portal .container {
  width: 100%;
  max-width: calc(1040px + var(--gutter) * 2);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

body.consultation-portal a { color: var(--p-accent); text-underline-offset: 3px; transition: color .18s ease, background-color .18s ease; }
body.consultation-portal a:hover { color: var(--p-accent-dark); }
body.consultation-portal :focus-visible { outline: 3px solid var(--p-accent); outline-offset: 3px; border-radius: 4px; }
body.consultation-portal a.portal-brand,
body.consultation-portal a.portal-brand:hover { color: var(--p-ink); text-decoration: none; }

.portal-bar {
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--p-line);
}

.portal-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--p-ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.consultation-portal a.portal-brand { color: var(--p-ink); }
.portal-brand img { display: block; width: 48px; height: auto; }
.portal-brand small { display: none; font-weight: 500; font-size: 0.875rem; color: var(--p-muted); }

.portal-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.portal-hero {
  padding: 34px 0 96px;
  background-color: var(--p-navy);
  color: #FFFFFF;
}

.portal-eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 6px 14px;
  border: 1px solid #3A4C75;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #C9D8FF;
}

.portal-hero h1 {
  max-width: 17em;
  margin: 0 0 14px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.8rem, 1.3rem + 2.4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: #FFFFFF;
}

.portal-hero .portal-lede {
  max-width: 38rem;
  margin: 0;
  font-size: clamp(1rem, 0.96rem + 0.3vw, 1.15rem);
  line-height: 1.6;
  color: #D5DEF2;
}

.portal-main { position: relative; margin-top: -64px; padding-bottom: 48px; }

.portal-grid { display: grid; gap: 20px; }

.portal-card {
  padding: 22px 18px 26px;
  border: 1px solid var(--p-line);
  border-radius: 16px;
  background-color: var(--p-card);
  color: var(--p-ink);
  box-shadow: 0 14px 34px rgba(14, 26, 51, 0.12);
}

.portal-aside {
  padding: 22px 18px;
  border: 1px solid var(--p-line);
  border-radius: 16px;
  background-color: #F8FAFD;
  color: var(--p-ink);
}

.portal-aside h2 {
  margin: 0 0 12px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--p-ink);
}

.portal-aside p { margin: 0 0 12px; font-size: 0.9375rem; color: var(--p-muted); }

.portal-points { margin: 0 0 16px; padding: 0; list-style: none; }

.portal-points li {
  position: relative;
  margin: 0;
  padding: 10px 0 10px 28px;
  border-top: 1px solid var(--p-line);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--p-ink);
}

.portal-points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 1.05rem;
  width: 12px;
  height: 12px;
  border: 2px solid var(--p-accent);
  border-radius: 50%;
  background-color: var(--p-soft);
}

/* quiz */
.quiz-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }

.quiz-count { margin: 0; font-size: 0.875rem; font-weight: 600; color: var(--p-muted); }

.quiz-progress { display: flex; gap: 6px; margin: 0 0 20px; padding: 0; list-style: none; }

.quiz-progress li {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background-color: var(--p-line);
  transition: background-color .25s ease;
}

.quiz-progress li.is-done { background-color: var(--p-accent); }
.quiz-progress li.is-current { background-color: var(--p-accent-dark); }

.quiz-step { margin: 0; padding: 0; border: 0; min-width: 0; }
.quiz-step[hidden] { display: none; }
.quiz-step + .quiz-step { margin-top: 28px; }

.quiz-step legend {
  float: none;
  width: 100%;
  margin: 0 0 4px;
  padding: 0;
  font-weight: 700;
  font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--p-ink);
}

.quiz-hint { margin: 0 0 4px; font-size: 0.9375rem; color: var(--p-muted); }

.quiz-options { display: grid; gap: 10px; margin: 14px 0 0; }

.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 56px;
  padding: 14px 16px;
  border: 1.5px solid var(--p-line);
  border-radius: 12px;
  background-color: #FFFFFF;
  color: var(--p-ink);
  font-size: 1rem;
  line-height: 1.45;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease;
}

.quiz-option:hover { border-color: var(--p-accent); background-color: #F6F9FF; }
.quiz-option input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--p-accent); }
.quiz-option:has(input:checked) { border-color: var(--p-accent); background-color: var(--p-soft); }
.quiz-option:focus-within { outline: 3px solid var(--p-accent); outline-offset: 2px; }

.quiz-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.portal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 28px;
  border: 2px solid var(--p-accent);
  border-radius: 999px;
  background-color: var(--p-accent);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

.portal-btn:hover { background-color: var(--p-accent-dark); border-color: var(--p-accent-dark); }
.portal-btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.portal-btn[disabled]:hover { background-color: var(--p-accent); border-color: var(--p-accent); }

.portal-btn-ghost { background-color: transparent; color: var(--p-accent); }
.portal-btn-ghost:hover { background-color: var(--p-soft); border-color: var(--p-accent); color: var(--p-accent-dark); }

.quiz-error,
.field-error {
  margin: 8px 0 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #B42318;
}

.quiz-error:empty,
.field-error:empty { display: none; }

/* contact form */
.contact-block h2 {
  margin: 0 0 6px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--p-ink);
}

.contact-block h2:focus { outline: none; }

.contact-intro { margin: 0 0 16px; font-size: 0.9375rem; color: var(--p-muted); }

.summary-box {
  margin: 0 0 22px;
  padding: 14px 16px;
  border: 1px solid var(--p-line);
  border-radius: 12px;
  background-color: var(--p-soft);
}

.summary-box h3 { margin: 0 0 8px; font-size: 0.875rem; font-weight: 700; letter-spacing: 0.02em; color: var(--p-muted); }

.summary-box dl { display: grid; gap: 8px; margin: 0; }
.summary-box dt { margin: 0; font-size: 0.8125rem; font-weight: 600; color: var(--p-muted); }
.summary-box dd { margin: 0; font-size: 0.9375rem; font-weight: 500; color: var(--p-ink); }

.summary-box .summary-edit {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--p-accent);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.form-grid { display: grid; gap: 16px; }

.field label,
.field .label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--p-ink);
}

.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field select {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 10px 14px;
  border: 1.5px solid #9AA9C4;
  border-radius: 10px;
  background-color: #FFFFFF;
  color: var(--p-ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.field input:hover,
.field select:hover { border-color: var(--p-accent); }

.field input:focus,
.field select:focus {
  border-color: var(--p-accent);
  box-shadow: 0 0 0 3px rgba(31, 79, 216, 0.22);
  outline: none;
}

.field input[aria-invalid="true"] { border-color: #B42318; }

.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 20px 0 0;
  padding: 14px 16px;
  border: 1.5px solid var(--p-line);
  border-radius: 12px;
  background-color: #F8FAFD;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--p-ink);
  cursor: pointer;
}

.consent input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--p-accent); }

.form-submit { margin-top: 22px; }
.form-submit .portal-btn { width: 100%; }

.form-note { margin: 14px 0 0; font-size: 0.875rem; color: var(--p-muted); }

.portal-success {
  padding: 22px 18px;
  border: 1px solid var(--p-accent);
  border-radius: 14px;
  background-color: var(--p-soft);
  color: var(--p-ink);
}

.portal-success h2 { margin: 0 0 8px; font-size: 1.3rem; font-weight: 700; letter-spacing: -0.015em; }
.portal-success p { margin: 0; }

/* hide the contact block until the check is complete (script adds .js) */
.js .contact-block[hidden] { display: none; }
.portal-btn[hidden] { display: none; }
html:not(.js) .summary-box { display: none; }

.consultation-portal .colophon { padding: 36px 0 48px; border-top: 1px solid var(--p-line); }
.consultation-portal .colophon-card { border-radius: 14px; }
.consultation-portal .legal a { color: var(--p-ink); }
.consultation-portal .legal a:hover { background-color: var(--p-soft); color: var(--p-ink); }

@media (min-width: 480px) {
  .portal-brand small { display: inline; }
  .form-submit .portal-btn { width: auto; }
}

@media (min-width: 768px) {
  .portal-hero { padding: 52px 0 112px; }
  .portal-main { margin-top: -72px; }
  .portal-card { padding: 34px 34px 38px; }
  .portal-aside { padding: 28px 26px; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .field-wide { grid-column: 1 / -1; }
  .portal-brand img { width: 56px; }
}

@media (min-width: 1024px) {
  .portal-grid { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 28px; align-items: flex-start; }
  .portal-aside { position: sticky; top: 20px; }
}

/* ---------- 9. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
