/*
  Eds Estate design system ("Open Book", reports/brand-brief.md; the designs in
  EdsEstate/design/project/*.dc.html). One hand-written stylesheet for the new
  site, the owner portal and the staff area. No Bootstrap on these pages.

  Contrast rules the tokens cannot enforce:
  - no green text on mist; no slate, red or amber text on ink;
  - amber (#B8620E) only for large text (24 px, or 19 px bold) and icons;
    small "money out" labels use amber-deep;
  - hairline is decorative only (never text or input borders: inputs use slate);
  - money in and out are never shown by colour alone: use "+", "−" and words.
  Targets are at least 44 px; focus is a 2 px green ring (mint on ink).

  Sections: tokens · base · layout · public header and footer · buttons · cards
  and KPI tiles · tables · badges · forms · notices · page header · app shell
  (portal and staff sidebar) · tabs · month switcher · gallery · dialog · misc.
*/

/* ---------- fonts ----------
   Served from this site (no request to Google Fonts), variable woff2 in Latin and Latin Extended subsets,
   OFL licences in static/eds/fonts/. document.html preloads the two Latin files. The "fallback" faces are
   Georgia and Arial resized to the real fonts' measurements (fontTools, at the weights the site uses), so
   if a font arrives after the first paint the text barely moves (layout shift). */
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../fonts/fraunces-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../fonts/fraunces-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../fonts/ibm-plex-sans-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../fonts/ibm-plex-sans-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Fraunces fallback'; font-weight: 100 500; src: local('Georgia');
  size-adjust: 106%; ascent-override: 92.3%; descent-override: 24.1%; line-gap-override: 0%; }
@font-face { font-family: 'Fraunces fallback'; font-weight: 600 900; src: local('Georgia Bold'), local('Georgia-Bold');
  size-adjust: 92%; ascent-override: 106.3%; descent-override: 27.7%; line-gap-override: 0%; }
@font-face { font-family: 'IBM Plex Sans fallback'; src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('Helvetica');
  size-adjust: 101.56%; ascent-override: 100.93%; descent-override: 27.08%; line-gap-override: 0%; }

/* ---------- tokens ---------- */
:root {
  --ink: #0f1e2e;
  --paper: #f7f5f0;
  --white: #ffffff;
  --mist: #dce5e3;
  --slate: #4f5f6b;
  --green: #1e7a55; /* Ledger Green: one action per screen, links, money in, the ledger rule */
  --green-deep: #17633f;
  --green-tint: #e3f1ea;
  --mint: #9fe1c2; /* on ink only */
  --amber: #b8620e; /* large labels and icons only */
  --amber-deep: #9a5209;
  --amber-tint: #f6eadc;
  --red: #b4332b;
  --red-tint: #f5e3e1;
  --hairline: #d9d4c7; /* decorative only */
  --line-soft: #ebe7dd;
  --ink-raised: #1c3247;
  --ink-line: #2d3f52;

  --font-display: 'Fraunces', 'Fraunces fallback', Georgia, 'Times New Roman', serif;
  --font-sans: 'IBM Plex Sans', 'IBM Plex Sans fallback', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius-control: 8px;
  --radius-card: 12px;
  --radius-chip: 999px;

  --gutter: clamp(16px, 3vw, 24px);
  --page-max: 1200px;
  --sidebar-width: 248px;

  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
@media (min-width: 768px) { body { font-size: 18px; } }

h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
h1, h2 { font-family: var(--font-display); font-weight: 600; }
h1 { font-variation-settings: 'opsz' 144, 'SOFT' 0, 'WONK' 0; letter-spacing: -0.01em; line-height: 1.1; text-wrap: balance; }
h2 { font-variation-settings: 'opsz' 72, 'SOFT' 0, 'WONK' 0; line-height: 1.2; }
h3 { font-size: 1.25rem; line-height: 1.3; font-weight: 600; }
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
ul, ol { margin: 0; padding: 0; }

a { color: var(--green); text-decoration-line: underline; text-underline-offset: 3px; }
a:hover { color: var(--green-deep); }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
input, select, textarea { font: inherit; color: inherit; }
th, td { text-align: left; vertical-align: top; }

:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.on-ink :focus-visible, .app-sidebar :focus-visible, .site-footer :focus-visible { outline-color: var(--mint); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: var(--radius-control);
  background: var(--ink); color: var(--paper); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--paper); }

/* utilities */
.eyebrow { font-size: 13px; line-height: 1.3; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate); }
.figures { font-variant-numeric: tabular-nums lining-nums; }
.display { font-family: var(--font-display); font-weight: 600; font-variation-settings: 'SOFT' 0, 'WONK' 0; font-variant-numeric: lining-nums; }
.muted { color: var(--slate); }
.small { font-size: 15px; }
.basis { font-size: 16px; line-height: 1.5; color: var(--slate); }
.money-in { color: var(--green-deep); }
.money-out { color: var(--amber-deep); }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--page-max); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 760px; }
.section { padding-block: clamp(48px, 7vw, 96px); }
.section--mist { background: var(--mist); }
.section--white { background: var(--white); }
.section--ink { background: var(--ink); color: var(--paper); }
.stack > * + * { margin-top: var(--stack-gap, 16px); }
.stack--lg { --stack-gap: 28px; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.grid { display: grid; gap: var(--grid-gap, 20px); grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--grid-min, 260px)), 1fr)); }
.lede { font-size: clamp(17px, 1.25vw, 19px); line-height: 1.55; max-width: 38em; }
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: clamp(26px, 2.6vw, 34px); margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }

.title-xl { font-size: clamp(38px, 3.9vw, 56px); }
.title-lg { font-size: clamp(30px, 3vw, 44px); }
.title-md { font-size: clamp(24px, 2.2vw, 30px); }

/* ---------- wordmark ---------- */
.wordmark { display: inline-flex; flex-direction: column; align-items: flex-start; padding: 6px 0; text-decoration: none; color: var(--ink); }
.wordmark:hover { color: var(--ink); }
.wordmark__name {
  font-family: var(--font-display); font-weight: 600; font-size: 28px; line-height: 1; letter-spacing: -0.01em;
  font-variation-settings: 'opsz' 144, 'SOFT' 0, 'WONK' 0; white-space: nowrap; color: inherit;
}
.wordmark__ate { position: relative; display: inline-block; }
.wordmark__ate::before, .wordmark__ate::after {
  content: ''; position: absolute; left: 1px; right: 1px; height: 2px; background: var(--green);
}
.wordmark__ate::before { bottom: -6px; }
.wordmark__ate::after { bottom: -10px; }
.wordmark__descriptor { margin-top: 15px; font-size: 13px; line-height: 1.2; font-weight: 500; color: var(--slate); }
.wordmark--dark { color: var(--paper); }
.wordmark--dark:hover { color: var(--paper); }
.wordmark--dark .wordmark__ate::before, .wordmark--dark .wordmark__ate::after { background: var(--mint); }
.wordmark--dark .wordmark__descriptor { color: var(--mist); }

/* The "E" mark (OwnerLogin design). */
.mark {
  width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: var(--paper);
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0;
}
.mark__e { font-family: var(--font-display); font-weight: 600; font-size: 26px; line-height: 1; margin-top: 2px; font-variation-settings: 'opsz' 144; }
.mark__rule { display: block; width: 15px; height: 6px; margin-top: 3px; border-top: 2px solid var(--mint); border-bottom: 2px solid var(--mint); }

/* ---------- public header ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--hairline); padding: 12px var(--gutter); }
.site-header__inner { max-width: var(--page-max); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 32px; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 32px; min-width: 0; }
.site-nav__list { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; }
@media (min-width: 768px) { .site-nav__list { gap: 0 28px; } }
.site-nav__link {
  display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; font-weight: 500;
  color: var(--ink); text-decoration: none; border-bottom: 2px solid transparent;
}
.site-nav__link:hover { color: var(--green-deep); }
.site-nav__link[aria-current='page'] { border-bottom-color: var(--green); font-weight: 600; }
.site-nav__login { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; font-weight: 500; color: var(--slate); text-decoration: none; }
.site-nav__login:hover, .site-nav__login[aria-current='page'] { color: var(--ink); }
/* Below 768 px the public menu folds behind a Menu button. early.js puts .js on <html> before the first
   paint, so the menu is folded from the start (no layout shift); eds.js sets data-menu="open" | "closed".
   Without JavaScript there is no .js and the links show as before. */
.site-nav__toggle {
  display: none; align-items: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--slate); border-radius: var(--radius-control); background: transparent;
  color: var(--ink); font-weight: 500; font-size: 15px; line-height: 1;
}
.site-nav__toggle:hover, .site-nav__toggle[aria-expanded='true'] { background: var(--white); border-color: var(--ink); }
@media (max-width: 767.98px) {
  .js .site-nav__toggle { display: inline-flex; }
  .js .site-header:not([data-menu='open']) .site-nav { display: none; }
  .site-header[data-menu='open'] .site-nav { flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 4px; }
  .site-header[data-menu='open'] .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .site-header[data-menu='open'] .site-nav__link,
  .site-header[data-menu='open'] .site-nav__login { min-height: 48px; border-bottom: 1px solid var(--line-soft); }
  .site-header[data-menu='open'] .site-nav__link[aria-current='page'] { border-bottom-color: var(--green); }
}

/* ---------- public footer ---------- */
.site-footer { background: var(--ink); color: var(--paper); padding: 64px var(--gutter) 40px; }
.site-footer__inner { max-width: var(--page-max); margin: 0 auto; }
.site-footer__cols { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px 64px; }
.site-footer__brand { flex: 1 1 260px; min-width: 0; }
.site-footer__col { flex: 0 1 200px; min-width: 0; }
.site-footer__col--contact { flex: 0 1 300px; }
.site-footer__heading { margin: 0 0 8px; font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mist); }
.site-footer__links { list-style: none; }
.site-footer__link {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 16px;
  color: var(--paper); text-decoration: none; overflow-wrap: anywhere;
}
.site-footer__link:hover { color: var(--mint); text-decoration: underline; }
.site-footer__link svg { color: var(--mint); flex-shrink: 0; }
.site-footer__legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--ink-line); display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 40px; }
.site-footer__trading { max-width: 820px; font-size: 14px; line-height: 1.6; color: var(--mist); }
.site-footer__legal-links { list-style: none; display: flex; flex-wrap: wrap; gap: 0 24px; }
.site-footer__legal-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; color: var(--mist); text-underline-offset: 4px; }
.site-footer__legal-links a:hover { color: var(--paper); }

/* ---------- cookie banner (partials/consent_banner.html; js/analytics.js shows it) ----------
   A band above the header, in the flow: it pushes the page down rather than covering any of it. Opened
   again from "Cookie settings" it is a panel at the foot of the screen (consent--panel). The two choices
   are the same button at the same width. */
.consent { padding: 14px var(--gutter); background: var(--white); color: var(--ink); border-bottom: 1px solid var(--hairline); }
.consent[hidden] { display: none; }
.consent:focus-visible { outline-offset: -4px; }
.consent--panel {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  border-bottom: 0; border-top: 1px solid var(--hairline); box-shadow: 0 -6px 24px rgba(15, 30, 46, 0.1);
}
.consent__inner { max-width: var(--page-max); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
.consent__text { flex: 1 1 420px; min-width: 0; font-size: 15px; line-height: 1.5; }
.consent__title { font-weight: 600; }
.consent__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; flex: 0 0 auto; }
.consent__btn {
  min-height: 44px; padding: 10px 20px; border: 1px solid var(--ink); border-radius: var(--radius-control);
  background: var(--white); color: var(--ink); font-size: 16px; font-weight: 600; line-height: 1.2;
}
.consent__btn:hover { background: var(--paper); }
@media (max-width: 559.98px) { .consent__actions { flex: 1 1 100%; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 10px 18px; border: 1px solid transparent; border-radius: var(--radius-control);
  font-size: 16px; font-weight: 600; line-height: 1.2; text-align: center; text-decoration: none;
  cursor: pointer; transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn:disabled, .btn[aria-disabled='true'] { opacity: 0.5; pointer-events: none; }
.btn--primary { background: var(--green); border-color: var(--green); color: var(--white); }
.btn--primary:hover { background: var(--green-deep); border-color: var(--green-deep); color: var(--white); }
.btn--secondary { background: var(--white); border-color: var(--slate); color: var(--ink); }
.btn--secondary:hover { background: var(--paper); color: var(--ink); }
.btn--outline { background: var(--white); border-color: var(--green); color: var(--green); }
.btn--outline:hover { background: var(--green-tint); color: var(--green-deep); }
.btn--danger { background: var(--white); border-color: var(--red); color: var(--red); }
.btn--danger:hover { background: var(--red-tint); color: var(--red); }
.btn--danger-solid { background: var(--red); border-color: var(--red); color: var(--white); }
.btn--quiet { background: transparent; color: var(--green); text-decoration: underline; text-underline-offset: 4px; padding-inline: 4px; }
.btn--quiet:hover { color: var(--green-deep); }
.btn--on-dark { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.btn--on-dark:hover { background: var(--mist); color: var(--ink); }
.btn--sm { padding: 8px 12px; font-size: 15px; }
.btn--lg { min-height: 48px; padding: 12px 26px; font-size: 17px; }
.btn--block { display: flex; width: 100%; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 500; }

/* ---------- cards and KPI tiles ---------- */
.card {
  background: var(--white); border: 1px solid var(--hairline); border-radius: var(--radius-card);
  padding: clamp(16px, 2vw, 28px); min-width: 0;
}
.card > * + * { margin-top: 14px; }
.card--mist { background: var(--mist); border-color: var(--mist); }
.card--table { padding-block: 12px 4px; }
.card--flush { padding: 0; overflow: hidden; }
.card__title { font-family: var(--font-display); font-weight: 600; font-size: 24px; line-height: 1.2; font-variation-settings: 'opsz' 72, 'SOFT' 0, 'WONK' 0; }
.card__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }

.kpi-row { display: flex; flex-wrap: wrap; gap: 16px; }
.kpi-row > .kpi { flex: 1 1 230px; }
.kpi {
  min-width: 0; display: flex; flex-direction: column; gap: 6px;
  padding: 20px 22px 22px; background: var(--white); border: 1px solid var(--hairline); border-radius: var(--radius-card);
}
.kpi__label { font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate); }
.kpi__value {
  font-family: var(--font-display); font-weight: 600; font-size: 32px; line-height: 1.1; letter-spacing: -0.01em;
  font-variant-numeric: lining-nums tabular-nums; font-variation-settings: 'SOFT' 0, 'WONK' 0; color: var(--ink);
}
@media (min-width: 640px) { .kpi__value { font-size: 38px; } }
.kpi__value small { font-size: 0.58em; }
.kpi__suffix { margin-left: 6px; font-family: var(--font-sans); font-size: 16px; font-weight: 400; color: var(--slate); }
.kpi__rule { display: block; width: 72px; height: 7px; border-top: 2px solid var(--green); border-bottom: 2px solid var(--green); }
.kpi__note { font-size: 16px; line-height: 1.45; color: var(--slate); }
.kpi__note--green { color: var(--green-deep); font-weight: 500; }
.kpi__note--amber { color: var(--amber-deep); font-weight: 500; }
.kpi__note--red { color: var(--red); font-weight: 500; }
.kpi--md { padding: 16px; }
.kpi--md .kpi__value { font-size: 26px; }
@media (min-width: 640px) { .kpi--md .kpi__value { font-size: 30px; } }

/* NumberBlock: every public number carries its basis line underneath. */
.number-block__figure { font-family: var(--font-display); font-weight: 600; font-size: clamp(40px, 5vw, 64px); line-height: 1; font-variation-settings: 'opsz' 144; }
.number-block__label { margin-top: 8px; font-weight: 600; }
.number-block__basis { margin-top: 4px; font-size: 16px; color: var(--slate); }

/* ---------- tables (scroll inside their box, never the page) ---------- */
.table-scroll { position: relative; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll:focus-visible { outline-offset: -2px; }
.table {
  width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.45;
  font-variant-numeric: tabular-nums lining-nums;
}
@media (min-width: 768px) { .table { font-size: 15px; } }
.table caption { padding-bottom: 8px; text-align: left; font-size: 15px; font-weight: 500; color: var(--ink); }
.table th {
  padding: 10px 12px; border-bottom: 1px solid var(--ink); vertical-align: bottom; white-space: nowrap;
  font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate);
}
.table td { padding: 12px; border-bottom: 1px solid var(--hairline); }
.table th:first-child, .table td:first-child { padding-left: 0; }
.table th:last-child, .table td:last-child { padding-right: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table tfoot td, .table .total-row td { font-weight: 600; border-bottom: 5px double var(--green); }
.table tbody tr:last-child td { border-bottom-color: var(--hairline); }
.table--compact td { padding-block: 8px; }
.table-empty { padding: 20px 0; color: var(--slate); }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; border-radius: var(--radius-chip);
  padding: 3px 10px; font-size: 13px; font-weight: 500; line-height: 1.4;
  background: var(--white); color: var(--ink); border: 1px solid var(--hairline);
}
.badge--md { padding: 6px 12px; font-size: 14px; }
.badge--green { background: var(--green-tint); color: var(--green-deep); border-color: var(--green-tint); }
.badge--amber { background: var(--amber-tint); color: var(--amber-deep); border-color: var(--amber-tint); }
.badge--red { background: var(--red-tint); color: var(--red); border-color: var(--red-tint); }
.badge--mist { background: var(--mist); color: var(--ink); border-color: var(--mist); }
.badge--ink { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.badge--muted { background: var(--paper); color: var(--slate); }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; gap: 16px 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label { font-size: 16px; font-weight: 600; color: var(--ink); }
.field__label .optional, .field__unit { font-weight: 400; color: var(--slate); }
.field__hint { font-size: 15px; color: var(--slate); }
.field__error { display: flex; align-items: flex-start; gap: 8px; font-size: 15px; font-weight: 500; color: var(--red); }
.input, .select, .textarea {
  display: block; width: 100%; min-height: 48px; padding: 11px 14px;
  border: 1px solid var(--slate); border-radius: var(--radius-control); background: var(--white); color: var(--ink);
  font-size: 17px; line-height: 1.4;
}
.input::placeholder, .textarea::placeholder { color: var(--slate); opacity: 0.85; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--green); outline: 2px solid var(--green); outline-offset: 0; }
.input[aria-invalid='true'], .select[aria-invalid='true'], .textarea[aria-invalid='true'] { border-color: var(--red); }
.input--figures { font-variant-numeric: tabular-nums lining-nums; }
.textarea { min-height: 120px; resize: vertical; }
.select { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%234F5F6B' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.checkbox { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; font-size: 16px; line-height: 1.5; cursor: pointer; }
.checkbox input { width: 22px; height: 22px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--green); }
.honeypot { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-errors { padding: 12px 16px; border-radius: var(--radius-control); background: var(--red-tint); color: var(--red); font-weight: 500; }

/* ---------- notices ---------- */
.notice { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; padding: 12px 16px; border-radius: var(--radius-control); background: var(--mist); color: var(--ink); font-size: 15px; }
.notice__dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; background: var(--ink); }
.notice__body { flex: 1 1 240px; min-width: 0; }
.notice__action { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; border: 1px solid currentColor; border-radius: var(--radius-control); background: var(--white); font-weight: 500; text-decoration: none; color: var(--ink); }
.notice--amber { background: var(--amber-tint); }
.notice--amber .notice__dot { background: var(--amber); }
.notice--amber .notice__action { color: var(--amber-deep); }
.notice--red { background: var(--red-tint); }
.notice--red .notice__dot { background: var(--red); }
.notice--red .notice__action { color: var(--red); }
.notice--green { background: var(--green-tint); }
.notice--green .notice__dot { background: var(--green); }
.notice--green .notice__action { color: var(--green-deep); }
/* Plain links in a tinted notice: --green (4.46:1 on --amber-tint) is just under AA, --green-deep passes on every tint. */
.notice a:not(.notice__action):not(.btn) { color: var(--green-deep); }
.flash-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }

/* ---------- page header (portal and staff) ---------- */
.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }
.page-header__text { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; }
.page-title { margin-top: 6px; font-size: clamp(32px, 3.4vw, 46px); line-height: 1.1; }
.page-header__text > .page-title:first-child { margin-top: 0; }
.page-header__description { margin-top: 8px; max-width: 68ch; font-size: 17px; color: var(--slate); }
.page-header__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* ---------- app shell: the ink sidebar (OwnerOverview design) ---------- */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); }
@media (min-width: 900px) { .app-shell { flex-direction: row; align-items: stretch; } }
.app-sidebar { background: var(--ink); color: var(--paper); }
@media (min-width: 900px) {
  .app-sidebar { position: sticky; top: 0; height: 100vh; width: var(--sidebar-width); flex-shrink: 0; overflow-y: auto; }
}
.app-sidebar__inner { display: flex; flex-direction: column; gap: 20px; padding: 20px 16px; }
@media (min-width: 900px) { .app-sidebar__inner { min-height: 100%; gap: 28px; padding: 28px 24px; } }
/* Below 900 px the sidebar is a compact bar (wordmark, area, Menu): eds.js sets data-menu on .app-sidebar
   and folds the menu behind the button. Without JavaScript there is no data-menu and the menu stays open. */
.app-sidebar__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.app-sidebar__toggle {
  display: none; align-items: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--mist); border-radius: var(--radius-control); background: transparent;
  color: var(--paper); font-weight: 500; font-size: 15px; line-height: 1;
}
.app-sidebar__toggle:hover, .app-sidebar__toggle[aria-expanded='true'] { background: var(--ink-raised); color: var(--white); }
.app-sidebar__toggle[aria-expanded='true'] { border-color: var(--mint); }
.app-sidebar__menu { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 900px) { .app-sidebar__menu { flex: 1 1 auto; gap: 28px; } }
@media (max-width: 899.98px) {
  .app-sidebar[data-menu] .app-sidebar__toggle { display: inline-flex; }
  .app-sidebar[data-menu='closed'] .app-sidebar__menu { display: none; }
}
.app-sidebar__brand { align-self: flex-start; display: inline-flex; flex-direction: column; gap: 8px; color: var(--paper); text-decoration: none; }
.app-sidebar__brand:hover { color: var(--paper); }
.app-sidebar__name { display: inline-flex; flex-direction: column; align-items: flex-start; font-family: var(--font-display); font-weight: 600; font-size: 26px; line-height: 1; letter-spacing: -0.01em; }
.app-sidebar__name::after { content: ''; align-self: flex-end; display: block; width: 30px; height: 6px; margin-top: 5px; border-top: 2px solid var(--mint); border-bottom: 2px solid var(--mint); }
.app-sidebar__area { font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mist); }
.app-sidebar__list { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; }
.app-sidebar__list > li { flex: 1 1 160px; min-width: 0; }
@media (min-width: 900px) { .app-sidebar__list > li { flex-basis: 100%; } }
.app-sidebar__list--extra { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--ink-line); }
.app-sidebar__link {
  display: flex; align-items: center; gap: 12px; min-height: 44px; min-width: 0; padding: 6px 12px 6px 9px;
  border-left: 3px solid transparent; border-radius: var(--radius-control);
  color: var(--paper); font-weight: 500; font-size: 15px; line-height: 1.25; text-decoration: none;
}
.app-sidebar__link svg { flex-shrink: 0; }
.app-sidebar__link:hover { background: var(--ink-raised); color: var(--paper); }
.app-sidebar__link[aria-current='page'] { border-left-color: var(--mint); background: var(--ink-raised); color: var(--white); font-weight: 600; }
.app-sidebar__user { display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: var(--radius-card); background: var(--ink-raised); font-size: 15px; line-height: 1.45; }
@media (min-width: 900px) { .app-sidebar__user { margin-top: auto; } }
.app-sidebar__user-name { font-weight: 600; color: var(--paper); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-sidebar__user-role { color: var(--mist); }
.app-sidebar__user-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; margin-top: 6px; }
.app-sidebar__user-links a, .app-sidebar__signout {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none;
  color: var(--mint); font-weight: 500; font-size: 15px; text-decoration: underline; text-underline-offset: 3px;
}
.app-sidebar__user-links a:hover, .app-sidebar__signout:hover { color: var(--white); }
.app-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 28px; padding: clamp(24px, 3.4vw, 40px) clamp(16px, 3.4vw, 48px) 48px; }
.app-main > * { min-width: 0; }

/* ---------- tabs (a property's pages in the staff area) ---------- */
.tabs { display: flex; gap: 4px 24px; overflow-x: auto; border-bottom: 1px solid var(--hairline); scrollbar-width: thin; }
.tabs__link { display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; border-bottom: 2px solid transparent; color: var(--ink); font-weight: 500; font-size: 16px; text-decoration: none; }
.tabs__link:hover { color: var(--green-deep); }
.tabs__link[aria-current='page'] { border-bottom-color: var(--green); font-weight: 600; }

/* ---------- month switcher (OwnerOverview design) ---------- */
.month-switcher { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding: 16px 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.month-switcher__controls { display: flex; align-items: center; gap: 12px; }
.month-switcher__btn {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  border: 1px solid var(--slate); border-radius: var(--radius-control); background: var(--white); color: var(--ink); text-decoration: none;
}
.month-switcher__btn[aria-disabled='true'] { border-color: var(--hairline); color: var(--hairline); pointer-events: none; }
.month-switcher__label { min-width: 0; text-align: center; font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 2vw, 26px); line-height: 1.2; font-variant-numeric: lining-nums; }
@media (min-width: 480px) { .month-switcher__label { min-width: 196px; } }
.month-switcher__select { max-width: 220px; }

/* ---------- gallery (Stays design) ---------- */
.gallery { display: flex; flex-direction: column; gap: 12px; }
.gallery__main { position: relative; overflow: hidden; border-radius: var(--radius-card); background: var(--mist); aspect-ratio: 4 / 3; }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { list-style: none; display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.gallery__thumb { flex: 0 0 auto; width: 88px; height: 66px; padding: 0; border: 2px solid transparent; border-radius: var(--radius-control); overflow: hidden; background: var(--mist); }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb[aria-current='true'] { border-color: var(--green); }

/* ---------- confirm dialog (eds.js) and the no-JavaScript confirm page ---------- */
.confirm-dialog { width: min(560px, calc(100vw - 32px)); max-height: 90vh; padding: 0; border: 1px solid var(--hairline); border-radius: var(--radius-card); background: var(--white); color: var(--ink); }
.confirm-dialog::backdrop { background: rgba(15, 30, 46, 0.5); }
.confirm-dialog__panel { display: flex; flex-direction: column; gap: 16px; padding: clamp(20px, 3vw, 24px); }
.confirm-dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.confirm-dialog__title { font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.25; }
.confirm-dialog__close { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: var(--radius-control); background: none; color: var(--slate); }
.confirm-dialog__close:hover { background: var(--paper); }
.confirm-dialog__description { font-size: 15px; color: var(--slate); }
.confirm-table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums lining-nums; }
.confirm-table th { padding: 8px 12px 8px 0; border-bottom: 1px solid var(--ink); font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate); }
.confirm-table td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--hairline); }
.confirm-table td:first-child { font-weight: 500; }
.confirm-table td:nth-child(2) { color: var(--slate); }
.confirm-table td:last-child { font-weight: 600; }
.confirm-dialog__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.confirm-dialog__error { padding: 12px 14px; border-radius: var(--radius-control); background: var(--red-tint); color: var(--red); font-size: 15px; font-weight: 500; }

/* ---------- being built (placeholders) ---------- */
.being-built { display: flex; flex-direction: column; gap: 12px; padding: clamp(20px, 3vw, 32px); border: 1px dashed var(--slate); border-radius: var(--radius-card); background: var(--white); }
.being-built__label { display: inline-flex; align-self: flex-start; }

/* ---------- public pieces shared by several pages ---------- */
.hero { position: relative; background: var(--paper); }
.photo { overflow: hidden; border-radius: var(--radius-card); background: var(--mist); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.split { display: flex; flex-wrap: wrap; align-items: center; gap: 40px clamp(32px, 6vw, 72px); }
.split > * { flex: 1 1 340px; min-width: 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px 24px; }
.facts dt { font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate); }
.facts dd { font-weight: 500; }
.icon-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.icon-list li { display: flex; align-items: flex-start; gap: 12px; }
.icon-list svg { flex-shrink: 0; margin-top: 3px; color: var(--green); }

/* Auth pages (OwnerLogin design). */
.auth { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 56px 72px; padding-block: clamp(28px, 4vw, 48px) clamp(56px, 6vw, 88px); }
.auth__panel { flex: 1 1 340px; max-width: 460px; min-width: 0; display: flex; flex-direction: column; }
.auth__figure { flex: 1 1 480px; max-width: 640px; min-width: 0; }
.auth__figure .photo { aspect-ratio: 1 / 1; }
.auth__back { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 16px; font-weight: 500; color: var(--ink); text-decoration: none; }
.auth__forgot { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; font-weight: 500; color: var(--ink); text-decoration: underline; text-decoration-color: var(--slate); text-underline-offset: 3px; }
.auth__brand { display: flex; align-items: center; gap: 14px; margin-top: 28px; }
.auth__title { margin-top: 20px; font-size: clamp(38px, 5vw, 56px); }
.auth .input { min-height: 52px; }
.auth .btn--lg { min-height: 52px; }
.qr { width: 220px; max-width: 100%; padding: 12px; background: var(--white); border: 1px solid var(--hairline); border-radius: var(--radius-card); }
.qr svg { width: 100%; height: auto; display: block; }
/* The authenticator key written out under the QR code (accounts/staff_otp_setup.html). */
.otp-key__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.otp-key__value { flex: 0 1 auto; min-width: 0; padding: 8px 12px; background: var(--white); border: 1px solid var(--slate); border-radius: var(--radius-control); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 18px; line-height: 1.6; letter-spacing: 0.06em; word-spacing: 0.25em; color: var(--ink); overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }

/* Print: statements and lists print without the chrome. */
@media print {
  .site-header, .site-footer, .app-sidebar, .page-header__actions, .no-print { display: none !important; }
  body { background: var(--white); }
  .app-main { padding: 0; }
}

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

/* Portal screen overlay on portal-laptop-4k.jpg (eds/partials/portal_screen_overlay.html). */
.portal-photo { position: relative; overflow: hidden; border-radius: var(--radius-card); background: var(--mist); aspect-ratio: 16 / 9; }
.portal-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portal-photo--square { aspect-ratio: 1 / 1; }
.portal-photo--square img { object-position: 65% 50%; }
.portal-screen { position: absolute; top: 0; left: 0; width: 100%; height: 100%; max-width: none; }
.portal-screen--square { width: 177.78%; left: -50.56%; }
