/* The Enclave — Client Portal presentation layer (Build #005 Client Portal, CP1).
   ONE stylesheet for every Client Portal page: it replaces the Client Portal V1 base (client.css) and the first Build #005
   client layer, which loaded together and contradicted each other (two palettes, 960px vs 1320px content width, every
   <article> drawn as a shadowed card - so each record row became a card inside a card - and two mobile breakpoints).
   Mobile-first, no external assets (CSP: 'self'; no inline styles or scripts). The Enclave dark green with a gold
   accent; calmer and simpler than the administration portal. Legacy token names are kept because the Help & Training
   Center stylesheet (help_center/help.css) reads them. */

:root {
  --ec-forest: #0b3a30; --ec-forest-2: #165745; --ec-forest-3: #1f6b55; --ec-green-50: #eef5f1; --ec-green-100: #dcebe3;
  --ec-gold: #b18436; --ec-gold-soft: #f7efdf; --ec-gold-ink: #7a5719;
  --ec-ink: #17221e; --ec-ink-2: #34423c; --ec-muted: #5f6c66; --ec-line: #dce4df; --ec-line-2: #e9eeeb;
  --ec-bg: #f4f7f5; --ec-white: #ffffff;
  --ec-red: #a8323c; --ec-red-soft: #fbe9ea; --ec-amber: #8a5a00; --ec-amber-soft: #fdf3dd; --ec-blue: #24486e; --ec-blue-soft: #eef4fb;
  --ec-radius: 12px; --ec-radius-sm: 8px;
  --ec-shadow: 0 1px 2px rgba(13, 37, 29, .05), 0 6px 18px rgba(13, 37, 29, .05);
  --ec-focus: 0 0 0 3px rgba(177, 132, 54, .45);
  --ec-content: 1120px;
  /* Legacy names (Client Portal V1, help_center/help.css) mapped onto the one palette. */
  --ink: var(--ec-ink); --muted: var(--ec-muted); --line: var(--ec-line); --bg: var(--ec-bg); --card: var(--ec-white);
  --brand: var(--ec-forest-2); --brand-ink: #ffffff; --accent: var(--ec-gold); --ok: var(--ec-green-50); --ok-ink: var(--ec-forest-2);
  --bad: var(--ec-red-soft); --bad-ink: var(--ec-red); --info: var(--ec-blue-soft); --info-ink: var(--ec-blue);
}

/* ------------------------------------------------------------------------------------------------ base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.client { margin: 0; min-width: 0; font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ec-ink); background: var(--ec-bg); }
a { color: var(--ec-forest-2); text-underline-offset: 2px; }
a:hover { color: var(--ec-forest); }
/* Build #005 CP5: one clearly visible focus ring for every interactive element (also visible in forced-colours mode). */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--ec-gold); outline-offset: 2px; border-radius: 6px; }
.topbar a:focus-visible, .topbar button:focus-visible { outline-color: #f0d48a; }
img { max-width: 100%; }
svg { max-width: 100%; }
h1 { font-size: clamp(1.55rem, 1.2rem + 1.4vw, 2.05rem); line-height: 1.2; letter-spacing: -.02em; margin: .25rem 0 .6rem; }
h2 { font-size: 1.15rem; line-height: 1.3; letter-spacing: -.01em; margin: 0 0 .75rem; }
h3 { font-size: 1rem; margin: 1rem 0 .5rem; }
.skip-link { position: absolute; left: -999px; top: .5rem; z-index: 10; background: #fff; color: var(--ec-forest); padding: .5rem .8rem; border-radius: var(--ec-radius-sm); }
.skip-link:focus { left: .5rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.env-banner { background: #7a3e00; color: #fff; padding: .45rem 1rem; font-weight: 600; text-align: center; font-size: .9rem; }

/* ------------------------------------------------------------------------------------------------ shell */
.topbar { background: linear-gradient(100deg, #082b24, var(--ec-forest)); color: #fff; border-bottom: 2px solid var(--ec-gold); }
.topbar-inner { max-width: var(--ec-content); margin: 0 auto; padding: .8rem 1rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.brand { display: inline-flex; align-items: baseline; gap: .6rem; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand .mark { font-weight: 800; font-size: 1.05rem; letter-spacing: .06em; text-transform: uppercase; }
.brand .sub { color: #e2c27e; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.userbar { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .9rem; font-size: .88rem; color: #d9e7e1; }
.userbar .who { font-weight: 600; color: #fff; overflow-wrap: anywhere; }
.userbar form { margin: 0; }
.userlink { color: #d9e7e1; background: none; border: 0; padding: .35rem 0; margin: 0; min-height: 0; font: inherit; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .35); cursor: pointer; }
.userlink:hover, .userlink[aria-current="page"] { color: #fff; text-decoration-color: var(--ec-gold); }
.clientnav { background: #fff; border-bottom: 1px solid var(--ec-line); }
.clientnav-inner { max-width: var(--ec-content); margin: 0 auto; padding: .4rem 1rem; display: flex; gap: .25rem; }
.clientnav a { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: .45rem .85rem; border-radius: var(--ec-radius-sm); color: var(--ec-ink-2); font-weight: 600; font-size: .93rem; text-decoration: none; }
.clientnav a:hover { background: var(--ec-green-50); color: var(--ec-forest); }
.clientnav a[aria-current="page"] { background: var(--ec-green-50); color: var(--ec-forest); box-shadow: inset 0 -3px 0 var(--ec-gold); }
.subnav { display: flex; flex-wrap: wrap; gap: .25rem; margin: 0 0 1.1rem; padding: .25rem; background: #fff; border: 1px solid var(--ec-line); border-radius: 10px; width: fit-content; max-width: 100%; }
.subnav a { display: inline-flex; align-items: center; min-height: 40px; padding: .35rem .9rem; border-radius: 7px; color: var(--ec-ink-2); font-weight: 600; font-size: .92rem; text-decoration: none; }
.subnav a[aria-current="page"] { background: var(--ec-forest-2); color: #fff; }
.page { max-width: var(--ec-content); margin: 0 auto; padding: 1.5rem 1rem 2.5rem; }
.foot { max-width: var(--ec-content); margin: 0 auto; padding: 1.25rem 1rem 2rem; color: var(--ec-muted); font-size: .8rem; border-top: 1px solid var(--ec-line); }

/* ------------------------------------------------------------------------------------------------ components */
.card { background: var(--ec-white); border: 1px solid var(--ec-line); border-radius: var(--ec-radius); padding: 1.15rem; margin: 0 0 1rem; box-shadow: var(--ec-shadow); min-width: 0; }
.card.narrow { max-width: 480px; margin: 1.5rem auto; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.card.stat { display: flex; flex-direction: column; text-decoration: none; color: var(--ec-ink); margin: 0; }
.stat .k { color: var(--ec-muted); font-size: .9rem; }
.stat .v { font-size: 1.8rem; font-weight: 700; }
/* A record row inside a card: a separator, never a nested shadowed card. */
article { min-width: 0; }
.item { border-top: 1px solid var(--ec-line-2); padding: .9rem 0; }
.item:first-of-type { border-top: 0; padding-top: 0; }
.item > header { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .6rem 1rem; margin: .6rem 0; }
.facts > div { min-width: 0; }
.facts dt { color: var(--ec-muted); font-size: .84rem; }
.facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.chip { display: inline-block; padding: .14rem .6rem; border-radius: 999px; background: #eef1ef; color: var(--ec-ink-2); font-size: .82rem; font-weight: 600; line-height: 1.5; }
.chip.ok, .chip.interest-transfer, .chip.project-completed { background: var(--ec-green-100); color: var(--ec-forest); }
.chip.interest-allocation, .chip.project-active { background: var(--ec-green-50); color: var(--ec-forest-2); border: 1px solid #c4ddd0; }
.chip.interest-reservation, .chip.project-pre_construction, .chip.project-ready_to_start { background: var(--ec-gold-soft); color: var(--ec-gold-ink); }
.chip.project-on_hold { background: var(--ec-amber-soft); color: var(--ec-amber); }
.chip.project-practical_completion, .chip.project-snagging { background: var(--ec-blue-soft); color: var(--ec-blue); }
.chip.bad { background: var(--ec-red-soft); color: var(--ec-red); }
.chip.id { font-family: ui-monospace, Menlo, monospace; font-weight: 500; }
.note { border-radius: var(--ec-radius-sm); padding: .75rem .95rem; margin: 0 0 1rem; border-left: 3px solid transparent; }
.note.bad { background: var(--ec-red-soft); color: var(--ec-red); border-left-color: var(--ec-red); }
.note.ok { background: var(--ec-green-50); color: var(--ec-forest-2); border-left-color: #4d9c78; }
.note.info { background: var(--ec-blue-soft); color: var(--ec-blue); border-left-color: #6b8fb5; }
.note.attention { background: var(--ec-gold-soft); color: var(--ec-ink); border-left-color: var(--ec-gold); }
.muted { color: var(--ec-muted); }
.small { font-size: .9rem; }
.strong { font-weight: 700; }
.empty { color: var(--ec-muted); font-style: italic; }
.lede { color: var(--ec-muted); font-size: 1.02rem; max-width: 46rem; margin: 0 0 1.1rem; }
.crumbs { margin: 0; font-size: .9rem; color: var(--ec-muted); }
.text-link { font-weight: 600; font-size: .92rem; }
.prose { white-space: pre-line; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
table { width: 100%; border-collapse: collapse; min-width: 520px; background: #fff; }
th, td { text-align: left; padding: .6rem .55rem; border-bottom: 1px solid var(--ec-line-2); vertical-align: top; }
th { font-size: .8rem; color: var(--ec-muted); font-weight: 650; background: #f6f9f7; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.code, code { font-family: ui-monospace, Menlo, monospace; font-size: .92em; }
code.key { word-break: break-all; }
.pager { text-align: center; }
.qr img { max-width: 100%; height: auto; }
.legal { background: #fffdf6; border: 1px solid #ecdfb8; border-radius: var(--ec-radius); padding: .9rem 1.1rem; font-size: .88rem; margin-top: 1.25rem; color: var(--ec-ink-2); }
.legal h2 { font-size: .95rem; margin-bottom: .4rem; }
.legal ul { margin: 0; padding-left: 1.1rem; }
.legal li + li { margin-top: .25rem; }

/* ------------------------------------------------------------------------------------------------ forms and buttons */
label { display: block; margin: .8rem 0 .3rem; font-weight: 600; }
input[type=text], input[type=email], input[type=password], input:not([type]), textarea, select { width: 100%; min-height: 48px; padding: .6rem .7rem; font: inherit; color: var(--ec-ink); background: #fff; border: 1px solid #b9c6be; border-radius: var(--ec-radius-sm); }
label.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
label.check input { width: auto; min-height: auto; margin-top: .3rem; }
.stack-form label { font-weight: 500; }
.button, button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .55rem 1rem; border-radius: var(--ec-radius-sm); border: 1px solid var(--ec-forest-2); color: var(--ec-forest-2); background: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; margin: .5rem .25rem 0 0; }
.button:hover, button:hover { background: var(--ec-green-50); color: var(--ec-forest); }
.button.primary, button.primary { background: var(--ec-forest-2); border-color: var(--ec-forest-2); color: #fff; }
.button.primary:hover, button.primary:hover { background: var(--ec-forest); color: #fff; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; margin: .75rem 0 0; }
.actions .button { margin: 0; }

/* ------------------------------------------------------------------------------------------------ Home (CP1) */
.home-hero { margin: 0 0 1.25rem; }
.eyebrow { margin: 0; color: var(--ec-gold-ink); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.home-hero .lede { margin-bottom: 0; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 1.25rem; align-items: start; }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; margin-bottom: .75rem; }
.panel-head h2 { margin: 0; }
.panel-head a { font-weight: 600; font-size: .92rem; }
.prop-card { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; padding: .9rem 0; border-top: 1px solid var(--ec-line-2); }
.prop-card:first-of-type { border-top: 0; padding-top: .1rem; }
.prop-main { min-width: 0; flex: 1 1 15rem; }
.prop-main p { margin: 0; }
.prop-id .k { color: var(--ec-muted); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.prop-id .v { font-size: 1.12rem; font-weight: 700; color: var(--ec-ink); overflow-wrap: anywhere; }
.prop-meta { color: var(--ec-ink-2); }
.prop-build { margin-top: .3rem !important; font-size: .92rem; }
.prop-side { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; }
.build-card + .build-card { border-top: 1px solid var(--ec-line-2); margin-top: 1rem; padding-top: 1rem; }
.build-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: .5rem 1rem; }
.build-head p { margin: 0; }
.build-plan { font-size: 1.12rem; font-weight: 700; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .5rem 1rem; margin: .8rem 0; }
.kv > div { min-width: 0; }
.kv dt { color: var(--ec-muted); font-size: .82rem; }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.kv.money { grid-template-columns: minmax(0, 1fr); gap: .35rem; }
.kv.money > div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dashed var(--ec-line-2); padding-bottom: .3rem; }
.kv.money dd { font-variant-numeric: tabular-nums; text-align: right; }
.milestone-track { list-style: none; margin: .25rem 0 .9rem; padding: 0; display: flex; gap: 3px; }
.milestone-track li { flex: 1 1 0; height: .55rem; border-radius: 3px; background: #dfe6e2; }
.milestone-track li.ms-completed { background: var(--ec-forest-3); }
.milestone-track li.ms-in_progress { background: var(--ec-gold); }
.milestone-track li.ms-on_hold { background: #d39b3a; }
.milestone-track li.is-current { outline: 2px solid var(--ec-ink); outline-offset: 1px; }
.milestone-track li { position: relative; overflow: hidden; }
.figures { background: var(--ec-bg); border: 1px solid var(--ec-line-2); border-radius: 10px; padding: .75rem .9rem; }
.figures-caption { margin: 0 0 .5rem; color: var(--ec-muted); font-size: .8rem; font-weight: 600; }
.figures dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .5rem 1rem; margin: 0; }
.figures dt { color: var(--ec-muted); font-size: .8rem; }
.figures dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.figures p { margin: .5rem 0 0; }
.update-card p { margin: 0 0 .35rem; }
.update-when { color: var(--ec-muted); font-size: .86rem; }
.update-headline { font-weight: 700; font-size: 1.05rem; }
.thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-top: .6rem; }
.thumbs img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--ec-radius-sm); border: 1px solid var(--ec-line); }
.doc-line { display: flex; flex-direction: column; margin: 0; padding: .55rem 0; border-top: 1px solid var(--ec-line-2); }
.doc-line:first-of-type { border-top: 0; padding-top: 0; }
.doc-line a { font-weight: 600; overflow-wrap: anywhere; }
.next-links { list-style: none; margin: 0; padding: 0; }
.next-links li { display: flex; flex-direction: column; padding: .5rem 0; border-top: 1px solid var(--ec-line-2); }
.next-links li:first-child { border-top: 0; padding-top: 0; }
.next-links a { font-weight: 600; }
.next-links span { color: var(--ec-muted); font-size: .86rem; }
.empty-state { background: var(--ec-bg); border: 1px dashed #c9d5ce; border-radius: 10px; padding: .9rem 1rem; color: var(--ec-ink-2); }
.empty-state p { margin: 0 0 .35rem; }
.empty-state p:last-child { margin-bottom: 0; }
.empty-title { font-weight: 700; color: var(--ec-ink); }

/* ------------------------------------------------------------------------------------------------ My Properties (CP2) */
.page-actions { margin: -.25rem 0 1rem; }
.property-record { padding-bottom: 1rem; }
.record-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: .5rem 1rem; }
.record-head p { margin: 0; }
.record-id { min-width: 0; flex: 1 1 15rem; }
.record-status { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; }
.record-steps { list-style: none; margin: .9rem 0 .5rem; padding: 0 0 0 1rem; border-left: 2px solid var(--ec-line); }
.record-steps li { position: relative; padding: .15rem 0 .45rem .35rem; }
.record-steps li::before { content: ""; position: absolute; left: -1.43rem; top: .55rem; width: .62rem; height: .62rem; border-radius: 50%; background: #c9d5ce; border: 2px solid #fff; }
.record-steps li.step-allocation::before, .record-steps li.step-completion::before { background: var(--ec-forest-3); }
.record-steps li.step-transfer::before { background: var(--ec-forest); }
.record-steps li.step-reservation::before { background: var(--ec-gold); }
.step-label { font-weight: 600; }
.step-when { color: var(--ec-muted); font-size: .88rem; }
.step-note { display: block; color: var(--ec-muted); font-size: .86rem; }
.record-build { margin: .25rem 0 0; }
.property-record .actions { margin-top: .6rem; }
.previous-record .prop-id { margin: 0; }
.property-hero { margin: 0 0 1.1rem; }
.property-hero h1 { overflow-wrap: anywhere; }
.hero-meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .6rem; }
#plan .plot-card { margin-bottom: 0; }
.kv.kv-wide { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.kv .kv-full { grid-column: 1 / -1; }
.account-form button { margin-top: .9rem; }
.account-form p { margin: .5rem 0 0; }

/* ------------------------------------------------------------------------------------------------ My Build (CP3) */
.client-lifecycle { list-style: none; margin: 0 0 1.1rem; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .25rem; counter-reset: lc; }
.client-lifecycle li { position: relative; padding-top: .95rem; font-size: .82rem; color: var(--ec-muted); text-align: center; min-width: 0; overflow-wrap: anywhere; }
.client-lifecycle li::before { content: ""; position: absolute; top: .3rem; left: 0; right: 0; height: 3px; background: #dfe6e2; border-radius: 2px; }
.client-lifecycle .lc-dot { position: absolute; top: 0; left: 50%; width: .8rem; height: .8rem; margin-left: -.4rem; border-radius: 50%; background: #fff; border: 2px solid #c9d5ce; z-index: 1; }
.client-lifecycle li.lc-done::before { background: var(--ec-forest-3); }
.client-lifecycle li.lc-done .lc-dot { background: var(--ec-forest-3); border-color: var(--ec-forest-3); }
.client-lifecycle li.lc-current { color: var(--ec-ink); font-weight: 700; }
.client-lifecycle li.lc-current::before { background: linear-gradient(90deg, var(--ec-forest-3) 50%, #dfe6e2 50%); }
.client-lifecycle li.lc-current .lc-dot { background: var(--ec-gold); border-color: var(--ec-gold); box-shadow: 0 0 0 3px var(--ec-gold-soft); }
.client-lifecycle li.lc-not_reached .lc-dot { border-style: dashed; }
.client-lifecycle .lc-label { display: block; margin-top: .35rem; }
.client-lifecycle .lc-flag { display: block; color: var(--ec-amber); font-weight: 600; }
.build-summary .client-lifecycle { margin: .9rem 0 .4rem; }
.build-plan a { color: var(--ec-ink); text-decoration: none; }
.build-plan a:hover { text-decoration: underline; }
.latest-line { margin: .25rem 0 0; color: var(--ec-ink-2); }
.build-hero { margin-bottom: .9rem; }
.kv.dates { border-top: 1px solid var(--ec-line-2); padding-top: .8rem; margin-bottom: 0; }
.kv.dates dd { font-weight: 500; }
/* Progress timeline: the released-update rows (shared partial _progress_entry.html, unchanged) laid out as a timeline. */
.timeline { position: relative; }
.timeline .progress-entry { position: relative; border-top: 0; padding: 0 0 1.25rem 1.35rem; margin: 0; border-left: 2px solid var(--ec-line); }
.timeline .progress-entry:last-child { padding-bottom: .25rem; }
.timeline .progress-entry::before { content: ""; position: absolute; left: -.45rem; top: .2rem; width: .8rem; height: .8rem; border-radius: 50%; background: var(--ec-forest-3); border: 2px solid #fff; }
.timeline .progress-entry:first-child::before { background: var(--ec-gold); }
.progress-entry header { display: block; margin-bottom: .35rem; }
.progress-entry header strong { font-size: 1.05rem; }
.progress-entry .facts { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); background: var(--ec-bg); border-radius: 8px; padding: .6rem .75rem; }
.progress-entry .gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.progress-entry .gallery img { height: auto; aspect-ratio: 4 / 3; }
.snag-entry header { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; }
.milestone-list { list-style: none; margin: 0; padding: 0; }
.ms-row { padding: .75rem 0; border-top: 1px solid var(--ec-line-2); }
.ms-row:first-child { border-top: 0; padding-top: 0; }
.ms-row p { margin: .25rem 0 0; }
.ms-row-head { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; }
.ms-seq { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: #eef1ef; color: var(--ec-ink-2); font-size: .8rem; font-weight: 700; }
.ms-row-completed .ms-seq { background: var(--ec-forest-3); color: #fff; }
.ms-row-in_progress .ms-seq { background: var(--ec-gold); color: #fff; }
.figure-help { margin: .75rem 0 0; padding-left: 1rem; }
.ms-dates { list-style: none; margin: .25rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 .9rem; }
.kv.money dt { min-width: 0; }
.kv.money dd { white-space: nowrap; }
.figure-help li + li { margin-top: .25rem; }
.fin-details summary { cursor: pointer; font-weight: 600; color: var(--ec-forest-2); min-height: 44px; display: flex; align-items: center; }
.fin-details[open] summary { margin-bottom: .5rem; }
.handover-panel { border-left: 3px solid var(--ec-gold); }

/* ------------------------------------------------------------------------------------------------ Plans & Requests (CP3) */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 1rem; }
.plan-card { border: 1px solid var(--ec-line); border-radius: 10px; padding: 1rem; background: #fff; }
.plan-card header p { margin: 0; }
.plan-card .facts { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.money-range { white-space: nowrap; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 1.25rem; align-items: start; }
.list-row { padding: .75rem 0; border-top: 1px solid var(--ec-line-2); }
.list-row:first-of-type { border-top: 0; padding-top: 0; }
.list-row p { margin: 0; }
.list-row-head { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; }
.plain-list { margin: 0; padding-left: 1.1rem; }
.plain-list li + li { margin-top: .35rem; }
.request-hero .chip, .proposal-hero .chip { vertical-align: middle; }
@media (min-width: 900px) { .two-col { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* ------------------------------------------------------------------------------------------------ Finances + Documents (CP4) */
.finance-block { margin: 0 0 1.75rem; }
.block-head { margin: 0 0 .75rem; }
.block-head h2 { margin-bottom: .2rem; }
.block-head p { margin: 0; }
.panel-title { font-size: 1rem; margin: 0 0 .6rem; }
.currency-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: .5rem 1.5rem; }
.account-card .account-figures { margin-top: .75rem; }
@media (min-width: 641px) {
  /* Wide cards: the figures as columns (label above value) rather than rows stretched across the card. */
  .kv.money.account-figures, .currency-totals .kv.money { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem 1.25rem; }
  .kv.money.account-figures > div, .currency-totals .kv.money > div { display: block; border-bottom: 0; padding: .55rem .75rem; background: var(--ec-bg); border-radius: 8px; }
  .kv.money.account-figures dd, .currency-totals .kv.money dd { text-align: left; font-size: 1.05rem; margin-top: .15rem; }
  .currency-totals { grid-template-columns: minmax(0, 1fr); }
}
.figure-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: .75rem; margin: 0 0 1rem; }
.figure-tile { background: var(--ec-bg); border: 1px solid var(--ec-line-2); border-radius: 10px; padding: .75rem .85rem; min-width: 0; }
.figure-tile p { margin: 0; }
.figure-tile .k { color: var(--ec-muted); font-size: .82rem; font-weight: 600; }
.figure-tile .v { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; margin: .15rem 0 .25rem; }
.figure-tile .d { color: var(--ec-muted); font-size: .82rem; }
.figure-tile.is-key { border-color: #c4ddd0; background: var(--ec-green-50); }
.doc-filter .count { display: inline-block; min-width: 1.4rem; margin-left: .3rem; padding: 0 .35rem; border-radius: 999px; background: #eef1ef; color: var(--ec-ink-2); font-size: .78rem; text-align: center; }
.doc-group { margin: 1.1rem 0 .4rem; padding-top: .9rem; border-top: 1px solid var(--ec-line); }
.panel-head + .doc-group { margin-top: 0; padding-top: 0; border-top: 0; }
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; padding: .7rem 0; border-top: 1px solid var(--ec-line-2); }
.doc-row:first-child { border-top: 0; }
.doc-main { min-width: 0; flex: 1 1 18rem; }
.doc-main p { margin: 0; }
.doc-title { font-weight: 650; overflow-wrap: anywhere; }
.doc-context { margin-top: .2rem !important; }
.doc-action .button { margin: 0; }
/* Finance tables: on a phone each row becomes a labelled card instead of a sideways-scrolling table. */
@media screen and (max-width: 640px) {
  .table-scroll:has(> .stack-table) { overflow-x: visible; }
  table.stack-table { min-width: 0; border: 0; }
  .stack-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stack-table tbody, .stack-table tr, .stack-table td { display: block; width: 100%; }
  .stack-table tr { border: 1px solid var(--ec-line); border-radius: 10px; padding: .4rem .75rem; margin: 0 0 .6rem; background: #fff; }
  .stack-table td { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dashed var(--ec-line-2); padding: .4rem 0; text-align: right; overflow-wrap: anywhere; }
  .stack-table td:last-child { border-bottom: 0; }
  .stack-table td::before { content: attr(data-label); color: var(--ec-muted); font-size: .82rem; font-weight: 600; text-align: left; flex: 0 0 auto; }
  .stack-table td.num { white-space: normal; }
  .stack-table tr.empty-row td { display: block; text-align: left; }
  .stack-table tr.empty-row td::before { content: none; }
  .doc-action, .doc-action .button { width: 100%; }
}

/* ------------------------------------------------------------------------------------------------ statements, plan view */
.statement header h1 { margin-bottom: .2rem; }
.statement .totals { border-top: 2px solid var(--ec-ink); padding-top: .5rem; }
.plot-card { overflow: hidden; }
.plot-frame { width: 100%; overflow: hidden; border: 1px solid var(--ec-line); border-radius: 10px; background: #f1f4f1; }
.client-plot { display: block; width: 100%; height: auto; min-height: 320px; }
.plot-context { fill: #eef1ee; stroke: #9aa79f; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.plot-context-label { fill: #66736b; font-size: 13px; font-weight: 600; text-anchor: middle; dominant-baseline: middle; paint-order: stroke; stroke: #f1f4f1; stroke-width: 3px; stroke-linejoin: round; }
.plot-owned { fill: #b9dbc5; stroke: var(--ec-forest-2); stroke-width: 3; vector-effect: non-scaling-stroke; }
.plot-label { fill: var(--ec-ink); font-size: 18px; font-weight: 700; text-anchor: middle; dominant-baseline: middle; paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }

/* ------------------------------------------------------------------------------------------------ My Build records */
.progress-entry .when { color: var(--ec-muted); font-size: .85rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; margin: .6rem 0 0; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: 150px; object-fit: cover; border-radius: var(--ec-radius-sm); border: 1px solid var(--ec-line); display: block; }
.gallery figcaption { font-size: .8rem; color: var(--ec-muted); margin-top: .2rem; overflow-wrap: anywhere; }
.checklist { list-style: none; padding-left: 0; }

/* ------------------------------------------------------------------------------------------------ responsive */
@media (min-width: 641px) {
  .prop-side, .record-status { align-items: flex-end; text-align: right; }
}
@media (min-width: 900px) {
  .topbar-inner, .clientnav-inner, .page, .foot { padding-left: 1.5rem; padding-right: 1.5rem; }
  .page { padding-top: 2rem; }
  .home-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); }
  .card { padding: 1.35rem; }
}
@media (max-width: 640px) {
  .page { padding-top: 1.1rem; }
  .topbar-inner { padding-top: .7rem; padding-bottom: .7rem; }
  /* Six destinations as a 3 x 2 grid: every item visible, nothing scrolls sideways. */
  .clientnav-inner { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .25rem; padding: .4rem .5rem; }
  .clientnav a { padding: .4rem .3rem; font-size: .86rem; text-align: center; }
  .card { padding: 1rem; border-radius: 10px; }
  .client-plot { min-height: 240px; }
  .plot-context-label { font-size: 11px; }
  .thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .thumbs a:nth-child(3) { display: none; }
  .client-lifecycle { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: .75rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
@media print {
  .topbar, .clientnav, .subnav, .foot, .noprint, .env-banner, .skip-link { display: none !important; }
  body.client { background: #fff; font-size: 12pt; }
  .card, .statement { border: 0; padding: 0; box-shadow: none; }
  table { min-width: 0; }
}
