/* JeevanDrishti — base layout (Phase 0 shell) */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--jd-bg);
  color: var(--jd-text);
  font-family: var(--jd-font-body);
  font-size: var(--jd-fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--jd-font-head); color: var(--jd-secondary); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: var(--jd-fs-hero); }
h2 { font-size: var(--jd-fs-h2); }
p  { margin: 0 0 1em; }
a  { color: var(--jd-primary-text); }

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

/* Header */
.jd-header { background: var(--jd-surface); border-bottom: 1px solid var(--jd-border); position: sticky; top: 0; z-index: 10; }
.jd-header .jd-wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.jd-logo { font-family: var(--jd-font-head); font-size: 1.35rem; font-weight: 700; color: var(--jd-secondary); text-decoration: none; }
.jd-logo span { color: var(--jd-primary-text); }
.jd-tagline { font-size: var(--jd-fs-small); color: var(--jd-text-muted); margin-inline-start: 4px; }
.jd-spacer { margin-inline-start: auto; }

/* Language switcher */
.jd-lang { display: inline-flex; border: 1px solid var(--jd-border); border-radius: 999px; overflow: hidden; }
.jd-lang a { padding: 6px 14px; font-size: var(--jd-fs-small); text-decoration: none; color: var(--jd-text-muted); background: var(--jd-surface); }
.jd-lang a[aria-current="true"] { background: var(--jd-secondary); color: var(--jd-text-on-dark); }

/* Buttons */
.jd-btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px; border: 0;
  background: var(--jd-primary-text); color: #fff; text-decoration: none;
  font-weight: 600; cursor: pointer;
}
.jd-btn:hover { background: var(--jd-primary); }
.jd-btn-ghost { background: transparent; color: var(--jd-secondary); border: 1px solid var(--jd-secondary); }

/* Hero */
.jd-hero { padding: 56px 0 40px; }
.jd-hero .jd-kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; color: var(--jd-primary-text); font-weight: 600; }

/* Cards */
.jd-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin: 24px 0 48px; }
.jd-card { background: var(--jd-surface); border: 1px solid var(--jd-border); border-radius: var(--jd-radius); padding: 20px; box-shadow: var(--jd-shadow); }
.jd-card h3 { font-size: 1.05rem; margin-bottom: .25em; }
.jd-card p { color: var(--jd-text-muted); font-size: var(--jd-fs-small); margin: 0; }

/* Status pills — colour is never the only signal, the text label carries it too */
.jd-pill { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: var(--jd-fs-small); font-weight: 600; }
.jd-pill-favourable { background: var(--jd-success-soft); color: var(--jd-success-text); }
.jd-pill-mixed      { background: var(--jd-mixed-soft); color: var(--jd-text); }
.jd-pill-transition { background: var(--jd-neutral);     color: var(--jd-secondary); }
.jd-pill-caution    { background: var(--jd-caution-soft); color: var(--jd-caution); }

/* Footer */
.jd-footer { border-top: 1px solid var(--jd-border); padding: 28px 0; color: var(--jd-text-muted); font-size: var(--jd-fs-small); }

/* Disclaimer — required by the trust rules, shown on every page */
.jd-disclaimer { background: var(--jd-secondary-soft); border-radius: var(--jd-radius-sm); padding: 14px 18px; font-size: var(--jd-fs-small); color: var(--jd-secondary); }

@media (max-width: 600px) {
  .jd-hero { padding: 32px 0 24px; }
  .jd-tagline { display: none; }
}

/* ------------------------------------------------------------- Phase 1 */

.jd-nav { display: flex; align-items: center; gap: 14px; margin-inline-end: 12px; }
.jd-nav a { color: var(--jd-secondary); text-decoration: none; font-size: var(--jd-fs-small); font-weight: 500; }
.jd-nav a:hover { text-decoration: underline; }
.jd-btn-sm { padding: 7px 14px; font-size: var(--jd-fs-small); }
.jd-lede { max-width: 54ch; color: var(--jd-text-muted); }
.jd-narrow { max-width: 620px; }
.jd-muted { color: var(--jd-text-muted); }
.jd-small { font-size: var(--jd-fs-small); }

.jd-panel {
  background: var(--jd-surface); border: 1px solid var(--jd-border);
  border-radius: var(--jd-radius); padding: 24px; margin-bottom: 24px;
  box-shadow: var(--jd-shadow);
}
.jd-panel > h2:first-child, .jd-panel > h1:first-child { margin-top: 0; }

/* Forms */
.jd-form { margin-top: 12px; }
.jd-field { margin-bottom: 18px; position: relative; }
.jd-field label, .jd-fieldset legend { display: block; font-weight: 600; font-size: var(--jd-fs-small); margin-bottom: 6px; }
.jd-field input, .jd-field select {
  width: 100%; padding: 11px 13px; font: inherit; color: var(--jd-text);
  background: var(--jd-surface); border: 1px solid var(--jd-border);
  border-radius: var(--jd-radius-sm);
}
.jd-field input:focus, .jd-field select:focus {
  outline: 2px solid var(--jd-secondary); outline-offset: 1px; border-color: var(--jd-secondary);
}
.jd-field input:disabled { background: var(--jd-bg); color: var(--jd-text-muted); }
.jd-row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.jd-fieldset { border: 1px solid var(--jd-border); border-radius: var(--jd-radius-sm); padding: 14px 16px; }
.jd-radio { display: flex; align-items: center; gap: 8px; font-weight: 400; margin-bottom: 6px; }
.jd-radio input { width: auto; }
.jd-hint { font-size: var(--jd-fs-small); color: var(--jd-text-muted); margin: 6px 0 0; }
.jd-linkbtn { background: none; border: 0; padding: 0; color: var(--jd-primary-text); cursor: pointer; font: inherit; text-decoration: underline; }

.jd-error { background: var(--jd-caution-soft); color: var(--jd-caution); padding: 12px 16px; border-radius: var(--jd-radius-sm); }
.jd-warn  { background: var(--jd-mixed-soft); color: var(--jd-text); padding: 12px 16px; border-radius: var(--jd-radius-sm); margin-bottom: 20px; }
.jd-flash { background: var(--jd-success-soft); color: var(--jd-success-text); padding: 12px 16px; border-radius: var(--jd-radius-sm); margin-top: 16px; }

/* Place autocomplete */
.jd-autocomplete {
  list-style: none; margin: 4px 0 0; padding: 4px; position: absolute; z-index: 20;
  left: 0; right: 0; max-height: 260px; overflow-y: auto;
  background: var(--jd-surface); border: 1px solid var(--jd-border);
  border-radius: var(--jd-radius-sm); box-shadow: var(--jd-shadow);
}
.jd-autocomplete li { padding: 9px 12px; cursor: pointer; border-radius: 6px; font-size: var(--jd-fs-small); }
.jd-autocomplete li:hover, .jd-autocomplete li:focus { background: var(--jd-primary-soft); outline: none; }

/* Dashboard */
.jd-dash { padding-top: 28px; }
.jd-profilecard { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.jd-profilecard h1 { margin-bottom: 4px; font-size: clamp(1.5rem, 4vw, 2.1rem); }
.jd-profileactions { display: flex; gap: 8px; align-items: center; }
.jd-profilerow { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.jd-profilerow h3 { margin: 0 0 2px; }

.jd-keyfacts { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 24px; }
.jd-fact { background: var(--jd-surface); border: 1px solid var(--jd-border); border-radius: var(--jd-radius); padding: 14px 16px; }
.jd-fact-label { display: block; font-size: var(--jd-fs-small); color: var(--jd-text-muted); margin-bottom: 2px; }
.jd-fact-value { font-weight: 600; color: var(--jd-secondary); }

.jd-grid2 { display: grid; gap: 24px; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: start; }
.jd-chart { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.jd-current { font-size: 1.15rem; margin-bottom: 14px; }
.jd-current strong { color: var(--jd-primary-text); }

.jd-tablewrap { overflow-x: auto; }
.jd-table { width: 100%; border-collapse: collapse; font-size: var(--jd-fs-small); }
.jd-table th, .jd-table td { text-align: start; padding: 9px 10px; border-bottom: 1px solid var(--jd-border); white-space: nowrap; }
.jd-table th { color: var(--jd-text-muted); font-weight: 600; }
.jd-table tbody tr:last-child td { border-bottom: 0; }
.jd-row-now td { background: var(--jd-secondary-soft); font-weight: 600; }

.jd-cta { border-color: var(--jd-primary); }

@media (max-width: 820px) {
  .jd-grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .jd-row { grid-template-columns: 1fr; }
  .jd-panel { padding: 18px; }
  .jd-nav { gap: 10px; }
}

/* ------------------------------------------------------------- Phase 2 */

/* Status colours. Every use is paired with a text label — colour never carries
   meaning on its own. */
.jd-st-favourable { background: var(--jd-success);  }
.jd-st-mixed      { background: var(--jd-mixed);    }
.jd-st-transition { background: var(--jd-neutral);  }
.jd-st-caution    { background: var(--jd-caution);  }

.jd-pill-favourable { background: var(--jd-success-soft); color: var(--jd-success-text); }
.jd-pill-mixed      { background: var(--jd-mixed-soft);   color: var(--jd-text); }
.jd-pill-transition { background: var(--jd-neutral);      color: var(--jd-secondary); }
.jd-pill-caution    { background: var(--jd-caution-soft); color: var(--jd-caution); }
.jd-pill-now        { background: var(--jd-secondary);    color: var(--jd-text-on-dark); }

.jd-st-border-favourable { border-inline-start: 4px solid var(--jd-success); }
.jd-st-border-mixed      { border-inline-start: 4px solid var(--jd-mixed); }
.jd-st-border-transition { border-inline-start: 4px solid var(--jd-secondary); }
.jd-st-border-caution    { border-inline-start: 4px solid var(--jd-caution); }

/* Life overview bar — the whole 120-year cycle */
.jd-lifebar {
  position: relative; height: 54px; margin: 8px 0 6px;
  border: 1px solid var(--jd-border); border-radius: var(--jd-radius-sm);
  overflow: hidden; background: var(--jd-bg);
}
.jd-lifeseg {
  position: absolute; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center;
  border-inline-end: 1px solid rgba(255,255,255,.65); text-decoration: none;
  font-size: 12px; font-weight: 600; color: var(--jd-text); overflow: hidden;
}
.jd-lifeseg span { opacity: .85; }
.jd-lifeseg:hover { filter: brightness(1.06); }
.jd-lifeseg:focus-visible { outline: 3px solid var(--jd-secondary); outline-offset: -3px; }
.jd-lifeseg.is-now { box-shadow: inset 0 0 0 2px var(--jd-secondary); }
.jd-nowline { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--jd-secondary); }
.jd-nowline::after {
  content: ''; position: absolute; top: -1px; left: -4px;
  border: 5px solid transparent; border-top-color: var(--jd-secondary);
}
.jd-lifeaxis { display: flex; justify-content: space-between; font-size: var(--jd-fs-small); color: var(--jd-text-muted); }

.jd-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 14px; padding: 0; margin: 14px 0 6px; font-size: var(--jd-fs-small); }
.jd-legend li { display: flex; align-items: center; gap: 6px; }
.jd-swatch { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid rgba(0,0,0,.08); }

/* Upcoming */
.jd-upcoming { list-style: none; padding: 0; margin: 0; }
.jd-upcoming li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--jd-border); }
.jd-upcoming li:last-child { border-bottom: 0; }

/* Period cards */
.jd-sectionhead { margin: 28px 0 14px; }
.jd-period {
  background: var(--jd-surface); border: 1px solid var(--jd-border);
  border-radius: var(--jd-radius); padding: 18px 20px; margin-bottom: 14px;
  box-shadow: var(--jd-shadow);
}
.jd-period.is-now { border-color: var(--jd-secondary); }
.jd-period-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.jd-period-head h3, .jd-period-head h1 { margin: 0 0 2px; }
.jd-rule { color: var(--jd-text-muted); font-size: var(--jd-fs-small); margin: 10px 0 6px; }
.jd-periodlinks { margin: 0; font-size: var(--jd-fs-small); }
.jd-subtable { margin-top: 12px; }
.jd-breadcrumb { margin: 18px 0 8px; font-size: var(--jd-fs-small); }
.jd-narrow-wide { max-width: 860px; }

.jd-progress { height: 8px; border-radius: 999px; background: var(--jd-border); overflow: hidden; margin: 12px 0 4px; }
.jd-progress > span { display: block; height: 100%; background: var(--jd-secondary); }

@media (max-width: 560px) {
  .jd-lifebar { height: 44px; }
  .jd-lifeseg { font-size: 10px; }
  .jd-period { padding: 14px 16px; }
}

/* A table inside a card must scroll within the card, never widen the page.
   Found by measuring document.scrollWidth against the viewport on a phone. */
.jd-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.jd-period, .jd-panel { overflow-wrap: anywhere; }

/* ------------------------------------------------------------- Phase 3 */

.jd-card-link { text-decoration: none; color: inherit; display: block; transition: border-color .12s; }
.jd-card-link:hover { border-color: var(--jd-primary); }
.jd-card-link h3 { color: var(--jd-secondary); }

.jd-period.is-past { opacity: .78; }

.jd-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; }
.jd-filters a {
  padding: 6px 13px; border: 1px solid var(--jd-border); border-radius: 999px;
  text-decoration: none; font-size: var(--jd-fs-small); color: var(--jd-text-muted);
  background: var(--jd-surface);
}
.jd-filters a.is-on { background: var(--jd-secondary); color: var(--jd-text-on-dark); border-color: var(--jd-secondary); }

.jd-rulerow { padding: 14px 16px; margin-bottom: 10px; }
.jd-rulerow.has-error { border-color: var(--jd-caution); }
.jd-rulerow label { display: block; font-weight: 600; font-size: var(--jd-fs-small); margin-bottom: 6px; }
.jd-rulerow textarea {
  width: 100%; padding: 10px 12px; font: inherit; line-height: 1.6;
  border: 1px solid var(--jd-border); border-radius: var(--jd-radius-sm);
  background: var(--jd-surface); color: var(--jd-text); resize: vertical;
}
.jd-rulerow textarea:focus { outline: 2px solid var(--jd-secondary); outline-offset: 1px; }

/* --------------------------------------------------- Landing page */

.jd-hero2 {
  background:
    radial-gradient(1100px 460px at 78% -12%, var(--jd-primary-soft) 0%, transparent 62%),
    linear-gradient(180deg, var(--jd-bg) 0%, var(--jd-surface) 100%);
  padding: 56px 0 44px;
  border-bottom: 1px solid var(--jd-border);
}
.jd-hero2-grid {
  display: grid; gap: 40px; align-items: center;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
}
.jd-hero2-copy h1 { margin-bottom: .35em; }
.jd-hero2-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 22px 0 26px; }
.jd-btn-lg { padding: 14px 30px; font-size: 1.05rem; }
.jd-inline { margin: 0; }

.jd-hero-art { width: 100%; max-width: 420px; height: auto; display: block; margin-inline-start: auto; }

.jd-trustrow {
  list-style: none; padding: 0; margin: 0; display: grid; gap: 14px 22px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.jd-trustrow li { display: flex; flex-direction: column; gap: 2px; }
.jd-trustrow strong { color: var(--jd-secondary); font-size: var(--jd-fs-small); }
.jd-trustrow span { color: var(--jd-text-muted); font-size: var(--jd-fs-small); }

.jd-formpanel { margin-top: -30px; position: relative; z-index: 2; }
@media (max-width: 900px) { .jd-formpanel { margin-top: 24px; } }

/* Band with the sample timeline */
.jd-band { background: var(--jd-surface); border-block: 1px solid var(--jd-border); padding: 44px 0; margin: 44px 0; }
.jd-sampletl { display: flex; gap: 3px; margin: 20px 0 10px; height: 62px; }
.jd-sampleseg {
  display: flex; align-items: center; justify-content: center; border-radius: 6px;
  min-width: 0; padding: 0 6px;
}
.jd-sampleseg em {
  font-style: normal; font-size: var(--jd-fs-small); font-weight: 600; color: var(--jd-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.jd-st-transition .jd-sampleseg em { color: var(--jd-secondary); }

/* Feature cards */
.jd-card.is-soon { background: var(--jd-bg); }
.jd-tag {
  display: inline-block; vertical-align: middle; margin-inline-start: 6px;
  padding: 2px 9px; border-radius: 999px; font-size: .7rem; font-weight: 600;
  background: var(--jd-secondary-soft); color: var(--jd-secondary);
}

/* Quote */
.jd-quote { background: var(--jd-secondary); color: var(--jd-text-on-dark); padding: 40px 0; margin: 44px 0; }
.jd-quote blockquote {
  margin: 0; font-family: var(--jd-font-head); font-size: clamp(1.25rem, 3vw, 1.8rem);
  line-height: 1.45; text-align: center; max-width: 30ch; margin-inline: auto;
}

/* How it works */
.jd-steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 26px;
  display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.jd-steps li { counter-increment: s; position: relative; padding-inline-start: 46px; }
.jd-steps li::before {
  counter-content: ''; content: counter(s);
  position: absolute; inset-inline-start: 0; top: 0;
  width: 32px; height: 32px; border-radius: 999px;
  background: var(--jd-primary-text); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: .95rem;
}
.jd-steps strong { display: block; color: var(--jd-secondary); margin-bottom: 2px; }
.jd-steps span { color: var(--jd-text-muted); font-size: var(--jd-fs-small); }

@media (max-width: 900px) {
  .jd-hero2-grid { grid-template-columns: 1fr; gap: 28px; }
  .jd-hero2-art { order: -1; }
  .jd-hero-art { max-width: 280px; margin-inline: auto; }
  .jd-hero2 { padding: 34px 0 30px; }
}
@media (max-width: 560px) {
  .jd-sampletl { height: 54px; gap: 2px; }
  .jd-sampleseg em { font-size: .72rem; }
  .jd-band { padding: 32px 0; margin: 32px 0; }
}

/* Sample-timeline labels sit ON the colour, so the fill must carry 4.5:1 against
   the label. Measured: sage #5E8B68 gives only 3.97 with charcoal and 3.91 with
   white, so the darker sage is used here. Gold and lavender already pass. */
.jd-sampleseg.jd-st-favourable { background: var(--jd-success-text); }
.jd-sampleseg.jd-st-favourable em { color: #fff; }
.jd-sampleseg.jd-st-mixed em      { color: var(--jd-text); }
.jd-sampleseg.jd-st-transition em { color: var(--jd-secondary); }
.jd-sampleseg.jd-st-caution       { background: #A34E3D; }
.jd-sampleseg.jd-st-caution em    { color: #fff; }

/* =================================================== Landing redesign ==== */

.jd-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.jd-i { flex: none; }

/* ---- header ---- */
.jd-headbar { display: flex; align-items: center; gap: 18px; min-height: 76px; }
.jd-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.jd-brand-mark { display: block; }
.jd-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.jd-brand-name { font-family: var(--jd-font-head); font-size: 1.45rem; font-weight: 700; color: var(--jd-secondary); }
.jd-brand-name span { color: var(--jd-primary-text); }
.jd-brand-tag { font-size: .66rem; color: var(--jd-text-muted); letter-spacing: .01em; }

.jd-mainnav { display: flex; align-items: center; gap: 22px; margin-inline-start: auto; }
.jd-mainnav a { color: var(--jd-text); text-decoration: none; font-size: .94rem; font-weight: 500; white-space: nowrap; }
.jd-mainnav a:hover { color: var(--jd-primary-text); }
.jd-nav-soon { display: inline-flex; align-items: center; gap: 5px; }

.jd-headactions { display: flex; align-items: center; gap: 12px; }
.jd-iconlink { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; color: var(--jd-secondary); }
.jd-iconlink:hover { background: var(--jd-secondary-soft); }

.jd-navtoggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; margin-inline-start: auto; }
.jd-navtoggle span { display: block; width: 22px; height: 2px; background: var(--jd-secondary); margin: 4px 0; border-radius: 2px; }

.jd-tag-xs { font-size: .6rem; padding: 1px 6px; }

/* ---- hero ---- */
.jd-hero3 { background: linear-gradient(180deg, #FDF6EC 0%, var(--jd-bg) 100%); overflow: hidden; }
.jd-hero3-inner {
  max-width: 1440px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 54%); align-items: center;
}
.jd-hero3-copy { padding: 54px clamp(20px, 4vw, 56px) 54px clamp(20px, 5vw, 64px); }
.jd-hero3-brand {
  font-family: var(--jd-font-head); font-weight: 700; line-height: 1;
  font-size: clamp(2.4rem, 5.2vw, 3.6rem); color: var(--jd-secondary); margin: 6px 0 10px;
}
.jd-hero3-brand span { color: var(--jd-primary-text); }
.jd-hero3-copy h1 { font-size: clamp(1.35rem, 2.5vw, 1.95rem); color: var(--jd-text); margin-bottom: .5em; }
.jd-hero3-cta { margin: 24px 0 26px; }
.jd-btn .jd-i { vertical-align: -3px; margin-inline-start: 6px; }

.jd-heropoints { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 20px 26px; }
.jd-heropoints li { display: flex; flex-direction: column; align-items: center; gap: 7px; width: 96px; text-align: center; }
.jd-hp-icon {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px;
  background: var(--jd-surface); color: var(--jd-primary-text);
  border: 1px solid var(--jd-border); box-shadow: var(--jd-shadow);
}
.jd-hp-label { font-size: .76rem; font-weight: 600; color: var(--jd-secondary); line-height: 1.3; }

.jd-hero3-media { position: relative; align-self: stretch; min-height: 420px; }
.jd-hero3-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jd-hero3-media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--jd-bg) 0%, rgba(252,248,241,.35) 14%, transparent 34%);
  pointer-events: none;
}
.jd-hero3-quote {
  position: absolute; right: clamp(16px, 3vw, 40px); top: 50%; transform: translateY(-50%);
  max-width: 190px; margin: 0; z-index: 2;
  font-family: var(--jd-font-head); font-style: italic; font-size: clamp(.95rem, 1.35vw, 1.2rem);
  line-height: 1.45; color: var(--jd-secondary); text-align: center;
  text-shadow: 0 1px 10px rgba(255,255,255,.85);
}

/* ---- sections ---- */
.jd-section { padding: 52px 0 12px; }
.jd-section > h2 { margin-bottom: .2em; }

/* feature grid */
.jd-featgrid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin: 26px 0 40px; }
.jd-feat {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  background: var(--jd-surface); border: 1px solid var(--jd-border); border-radius: var(--jd-radius);
  padding: 22px 20px; text-decoration: none; color: inherit; box-shadow: var(--jd-shadow);
  transition: border-color .12s, transform .12s;
}
a.jd-feat:hover { border-color: var(--jd-primary); transform: translateY(-2px); }
.jd-feat.is-soon { background: var(--jd-bg); box-shadow: none; }
.jd-feat-icon {
  width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px;
  background: var(--jd-primary-soft); color: var(--jd-primary-text);
}
.jd-feat h3 { margin: 4px 0 0; font-size: 1.05rem; }
.jd-feat p { margin: 0; color: var(--jd-text-muted); font-size: var(--jd-fs-small); }
.jd-feat-more { margin-top: auto; padding-top: 8px; color: var(--jd-primary-text); font-size: var(--jd-fs-small); font-weight: 600; }

/* life stages strip */
.jd-glance { display: grid; gap: 34px; grid-template-columns: minmax(0, .8fr) minmax(0, 2fr); align-items: center; }
.jd-stages {
  list-style: none; padding: 0; margin: 0 0 10px;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px;
  position: relative; overflow-x: auto; padding-bottom: 6px;
}
.jd-stages::before {
  content: ''; position: absolute; left: 6%; right: 6%; top: 23px; height: 0;
  border-top: 2px dotted var(--jd-border);
}
.jd-stage { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; position: relative; min-width: 82px; }
.jd-stage-dot {
  width: 46px; height: 46px; border-radius: 999px; display: grid; place-items: center;
  background: var(--jd-surface); border: 2px solid currentColor; margin-bottom: 4px;
}
.jd-stage strong { font-size: .86rem; color: var(--jd-text); }
.jd-stage-age { font-size: .72rem; color: var(--jd-text-muted); }
.jd-stage-sub { font-size: .7rem; color: var(--jd-text-muted); }
.jd-tone-favourable .jd-stage-dot { color: var(--jd-success-text); }
.jd-tone-mixed      .jd-stage-dot { color: #A8761E; }
.jd-tone-transition .jd-stage-dot { color: var(--jd-secondary); }

/* quote band over the photograph */
.jd-quote2 {
  position: relative; margin: 48px 0 0; padding: 74px 0;
  background: #2E2846 url('/assets/img/quote-1600.jpg') center/cover no-repeat;
}
.jd-quote2::before { content: ''; position: absolute; inset: 0; background: rgba(38,32,62,.55); }
.jd-quote2 .jd-wrap { position: relative; }
.jd-quote2 blockquote {
  margin: 0 auto; max-width: 26ch; text-align: center; color: #FFF8EC;
  font-family: var(--jd-font-head); font-style: italic;
  font-size: clamp(1.3rem, 3vw, 2rem); line-height: 1.45;
  text-shadow: 0 2px 16px rgba(0,0,0,.45);
}

/* footer */
.jd-footgrid { display: grid; gap: 26px; grid-template-columns: 2fr 1fr 1fr; padding-bottom: 22px; }
.jd-footgrid nav { display: flex; flex-direction: column; gap: 8px; }
.jd-footgrid nav a { color: var(--jd-text-muted); text-decoration: none; font-size: var(--jd-fs-small); }
.jd-footgrid nav a:hover { color: var(--jd-primary-text); }
.jd-brand-foot { margin-bottom: 8px; }
.jd-brand-foot .jd-brand-name { font-size: 1.2rem; }

@media (max-width: 1080px) {
  .jd-mainnav { gap: 15px; }
  .jd-mainnav a { font-size: .87rem; }
  .jd-brand-tag { display: none; }
}
@media (max-width: 900px) {
  .jd-hero3-inner { grid-template-columns: 1fr; }
  .jd-hero3-media { min-height: 300px; order: -1; }
  .jd-hero3-media::after { background: linear-gradient(180deg, transparent 55%, var(--jd-bg) 100%); }
  .jd-hero3-quote { right: 50%; transform: translate(50%, 0); top: auto; bottom: 14px; max-width: 240px; }
  .jd-hero3-copy { padding: 26px 20px 40px; }
  .jd-glance { grid-template-columns: 1fr; gap: 22px; }
  .jd-navtoggle { display: block; }
  .jd-mainnav {
    display: none; order: 10; width: 100%; flex-direction: column; align-items: flex-start;
    gap: 2px; padding: 10px 0 14px; border-top: 1px solid var(--jd-border);
  }
  .jd-mainnav.is-open { display: flex; }
  .jd-mainnav a { padding: 9px 2px; width: 100%; }
  .jd-headbar { flex-wrap: wrap; min-height: 64px; }
  .jd-headactions { margin-inline-start: 0; }
  .jd-footgrid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .jd-heropoints { gap: 14px; justify-content: space-between; }
  .jd-heropoints li { width: 70px; }
  .jd-hp-label { font-size: .68rem; }
  .jd-quote2 { padding: 52px 0; }
  .jd-footgrid { grid-template-columns: 1fr; }
}

/* Grid items default to min-width:auto, so the 7-stage strip pushed the whole
   page to 626px on a 390px phone even though the strip itself scrolls.
   Caught by measuring scrollWidth, not by looking at a screenshot. */
.jd-glance > * { min-width: 0; }
.jd-glance-strip { max-width: 100%; }
.jd-stages { scrollbar-width: thin; }

/* The Phase 0 rule `.jd-header .jd-wrap { flex-wrap: wrap }` was still winning and
   pushing the actions onto a second row at desktop width. */
@media (min-width: 901px) {
  .jd-header .jd-wrap.jd-headbar { flex-wrap: nowrap; }
}
.jd-headbar { gap: 14px; }
.jd-mainnav { gap: 18px; }
.jd-headactions { gap: 10px; flex: none; }
.jd-lang a { padding: 5px 11px; }

/* Softer blend from the photograph into the page, closer to the mockup. */
.jd-hero3-media::after {
  background: linear-gradient(90deg,
    var(--jd-bg) 0%, rgba(253,246,236,.55) 7%, rgba(253,246,236,.12) 16%, transparent 26%);
}

/* Six features leave an orphan on a five-across row. A 3x2 grid balances it. */
.jd-featgrid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
@media (min-width: 1000px) { .jd-featgrid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px) and (max-width: 999px) { .jd-featgrid { grid-template-columns: repeat(2, 1fr); } }

/* On a phone the pull-quote sits over the busiest part of the photograph, where a
   text-shadow is not enough. Give it a translucent panel instead. */
@media (max-width: 900px) {
  .jd-hero3-quote {
    background: rgba(252,248,241,.92);
    padding: 10px 16px;
    border-radius: var(--jd-radius-sm);
    max-width: min(300px, 82%);
    text-shadow: none;
    box-shadow: 0 2px 14px rgba(37,35,41,.16);
  }
}
@media (max-width: 560px) {
  .jd-heropoints li { width: 78px; }
  .jd-heropoints .jd-tag-xs { display: block; margin: 3px auto 0; width: fit-content; }
}

/* ---- hero, full-bleed image as in the mockup ---- */
.jd-hero4 { position: relative; overflow: hidden; background: #FBF3E8; }
.jd-hero4-bg { position: absolute; inset: 0; z-index: 0; }
.jd-hero4-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; display: block; }
.jd-hero4-inner { position: relative; z-index: 1; min-height: 560px; display: flex; align-items: center; }
.jd-hero4-copy { max-width: 470px; padding: 54px 0; }
.jd-hero4-copy .jd-kicker { letter-spacing: .14em; }
.jd-hero4-copy .jd-lede { color: var(--jd-text); opacity: .86; }

.jd-hero4-quote {
  position: absolute; right: 0; top: 50%; transform: translateY(-58%);
  width: 150px; margin: 0; text-align: left;
  font-family: var(--jd-font-head); font-style: italic;
  font-size: clamp(1rem, 1.5vw, 1.32rem); line-height: 1.35; color: var(--jd-secondary);
}
.jd-hero4-rule { display: block; width: 70px; height: 1px; background: var(--jd-primary); margin-top: 12px; position: relative; }
.jd-hero4-rule::after {
  content: '✦'; position: absolute; left: 76px; top: -11px; font-size: .8rem; color: var(--jd-primary); font-style: normal;
}
/* the image itself is pale on the left; a light veil keeps the text safe on any monitor */
.jd-hero4::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(252,248,241,.55) 0%, rgba(252,248,241,.25) 38%, transparent 55%);
}

@media (max-width: 900px) {
  .jd-hero4-bg { position: relative; inset: auto; aspect-ratio: 1600 / 711; }
  .jd-hero4::before { display: none; }
  .jd-hero4-inner { min-height: 0; display: block; }
  .jd-hero4-copy { padding: 22px 0 36px; max-width: none; }
  .jd-hero4-quote {
    position: static; transform: none; width: auto; text-align: center;
    margin: 0 0 4px; padding: 0 12px;
  }
  .jd-hero4-rule { margin: 10px auto 0; }
  .jd-hero4-rule::after { left: 76px; }
}

/* ---- hero v5: ivory copy column + the mockup's illustration, blended at the seam ---- */
.jd-hero5 { background: #FBF3E8; overflow: hidden; }
.jd-hero5-inner {
  max-width: 1440px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 58%); align-items: center;
}
.jd-hero5-copy { padding: 54px clamp(16px, 3vw, 40px) 54px clamp(20px, 5vw, 64px); }
.jd-hero5-copy .jd-kicker { letter-spacing: .14em; }
.jd-hero5-media { position: relative; align-self: stretch; min-height: 520px; margin-inline-start: -60px; }
.jd-hero5-media img { width: 100%; height: 100%; object-fit: cover; object-position: 100% 50%; display: block; }
.jd-hero5-media .jd-hero4-quote { right: clamp(18px, 3vw, 44px); }

@media (max-width: 900px) {
  .jd-hero5-inner { grid-template-columns: 1fr; }
  .jd-hero5-media { order: -1; min-height: 0; margin-inline-start: 0; }
  .jd-hero5-media img { height: auto; aspect-ratio: 1200 / 1078; object-position: 50% 40%; }
  .jd-hero5-copy { padding: 8px 20px 40px; }
  .jd-hero5-media .jd-hero4-quote {
    position: absolute; right: 50%; transform: translateX(50%); top: auto; bottom: 14px;
    width: auto; max-width: 84%; text-align: center;
    background: rgba(252,248,241,.92); padding: 10px 16px; border-radius: var(--jd-radius-sm);
    box-shadow: 0 2px 14px rgba(37,35,41,.16);
  }
  .jd-hero5-media .jd-hero4-rule { margin: 8px auto 0; }
}

/* Keep the faded LEFT edge of the illustration: crop from the right instead.
   Scoped to desktop — an unscoped rule here re-applied two columns on phones. */
@media (min-width: 901px) {
  .jd-hero5-inner { grid-template-columns: minmax(0, 47%) minmax(0, 53%); }
  .jd-hero5-media { margin-inline-start: 0; }
  .jd-hero5-media img { object-position: 0% 50%; }
  .jd-hero5-copy .jd-heropoints { gap: 16px 18px; }
  .jd-hero5-copy .jd-heropoints li { width: 88px; }
}
.jd-hero5-copy h1 { font-size: clamp(1.3rem, 2.1vw, 1.7rem); }
