/* ConnectMyInvestor — site stylesheet.
   Mobile first. Flat CSS (no nesting) so older Android browsers render it. */

/* ---------- 0. Fonts ----------
   Served from this site (no request to Google). Only two weights of the body
   font are shipped: 500 falls back to 400 and 700 to 600, which keeps the
   download small on slow connections. Text shows at once in the phone's own
   Bangla font and switches when these arrive. */
@font-face {
  font-family: "Hind Siliguri"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/hind-siliguri-bengali-400-normal.woff2) format("woff2");
  unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1;
}
@font-face {
  font-family: "Hind Siliguri"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/hind-siliguri-latin-400-normal.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: "Hind Siliguri"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(fonts/hind-siliguri-bengali-600-normal.woff2) format("woff2");
  unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1;
}
@font-face {
  font-family: "Hind Siliguri"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(fonts/hind-siliguri-latin-600-normal.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: "Anek Bangla"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(fonts/anek-bangla-bengali-700-normal.woff2) format("woff2");
  unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1;
}
@font-face {
  font-family: "Anek Bangla"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(fonts/anek-bangla-latin-700-normal.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;
}

/* ---------- 1. Design tokens ---------- */
:root {
  /* raw palette: light */
  --l-bg: #f7f5ef;
  --l-surface: #ffffff;
  --l-surface-2: #efece3;
  --l-ink: #14211b;
  --l-ink-2: #44534b;
  --l-ink-3: #5f6d66;
  --l-line: #e1ddd1;
  --l-brand: #0b6e4f;
  --l-brand-strong: #075239;
  --l-brand-ink: #ffffff;
  --l-brand-soft: #e2f1ea;
  --l-accent: #e9a419;
  --l-accent-ink: #3a2900;
  --l-accent-soft: #fcf1d6;
  --l-accent-text: #8a5a00;
  --l-danger: #b3261e;
  --l-danger-soft: #fbe9e7;
  --l-shadow: 0 1px 2px rgba(20, 33, 27, .06), 0 6px 20px rgba(20, 33, 27, .06);
  --l-overlay: rgba(13, 20, 17, .55);

  /* raw palette: dark */
  --d-bg: #0d1411;
  --d-surface: #151e1a;
  --d-surface-2: #1d2823;
  --d-ink: #e9efeb;
  --d-ink-2: #b7c3bc;
  --d-ink-3: #8f9d96;
  --d-line: #2a3630;
  --d-brand: #45c490;
  --d-brand-strong: #6bd9aa;
  --d-brand-ink: #052016;
  --d-brand-soft: #16302a;
  --d-accent: #f2b93b;
  --d-accent-ink: #2b1f00;
  --d-accent-soft: #33290f;
  --d-accent-text: #f2c463;
  --d-danger: #f2847b;
  --d-danger-soft: #3a1b18;
  --d-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .35);
  --d-overlay: rgba(0, 0, 0, .65);

  /* resolved tokens: light is the base */
  --bg: var(--l-bg);
  --surface: var(--l-surface);
  --surface-2: var(--l-surface-2);
  --ink: var(--l-ink);
  --ink-2: var(--l-ink-2);
  --ink-3: var(--l-ink-3);
  --line: var(--l-line);
  --brand: var(--l-brand);
  --brand-strong: var(--l-brand-strong);
  --brand-ink: var(--l-brand-ink);
  --brand-soft: var(--l-brand-soft);
  --accent: var(--l-accent);
  --accent-ink: var(--l-accent-ink);
  --accent-soft: var(--l-accent-soft);
  --accent-text: var(--l-accent-text);
  --danger: var(--l-danger);
  --danger-soft: var(--l-danger-soft);
  --shadow: var(--l-shadow);
  --overlay: var(--l-overlay);

  --font-body: "Hind Siliguri", "Noto Sans Bengali", "Nirmala UI", system-ui, sans-serif;
  --font-head: "Anek Bangla", "Hind Siliguri", "Noto Sans Bengali", "Nirmala UI", system-ui, sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --wrap: 1160px;
  --gutter: 16px;
  --nav-h: 62px;

  color-scheme: light dark;
  accent-color: var(--brand);
}

/* Fallback for browsers without light-dark(): follow the system setting */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--d-bg);
    --surface: var(--d-surface);
    --surface-2: var(--d-surface-2);
    --ink: var(--d-ink);
    --ink-2: var(--d-ink-2);
    --ink-3: var(--d-ink-3);
    --line: var(--d-line);
    --brand: var(--d-brand);
    --brand-strong: var(--d-brand-strong);
    --brand-ink: var(--d-brand-ink);
    --brand-soft: var(--d-brand-soft);
    --accent: var(--d-accent);
    --accent-ink: var(--d-accent-ink);
    --accent-soft: var(--d-accent-soft);
    --accent-text: var(--d-accent-text);
    --danger: var(--d-danger);
    --danger-soft: var(--d-danger-soft);
    --shadow: var(--d-shadow);
    --overlay: var(--d-overlay);
  }
}

/* Modern browsers: tokens follow color-scheme, so the manual toggle works */
@supports (color: light-dark(white, black)) {
  :root {
    --bg: light-dark(var(--l-bg), var(--d-bg));
    --surface: light-dark(var(--l-surface), var(--d-surface));
    --surface-2: light-dark(var(--l-surface-2), var(--d-surface-2));
    --ink: light-dark(var(--l-ink), var(--d-ink));
    --ink-2: light-dark(var(--l-ink-2), var(--d-ink-2));
    --ink-3: light-dark(var(--l-ink-3), var(--d-ink-3));
    --line: light-dark(var(--l-line), var(--d-line));
    --brand: light-dark(var(--l-brand), var(--d-brand));
    --brand-strong: light-dark(var(--l-brand-strong), var(--d-brand-strong));
    --brand-ink: light-dark(var(--l-brand-ink), var(--d-brand-ink));
    --brand-soft: light-dark(var(--l-brand-soft), var(--d-brand-soft));
    --accent: light-dark(var(--l-accent), var(--d-accent));
    --accent-ink: light-dark(var(--l-accent-ink), var(--d-accent-ink));
    --accent-soft: light-dark(var(--l-accent-soft), var(--d-accent-soft));
    --accent-text: light-dark(var(--l-accent-text), var(--d-accent-text));
    --danger: light-dark(var(--l-danger), var(--d-danger));
    --danger-soft: light-dark(var(--l-danger-soft), var(--d-danger-soft));
    --overlay: light-dark(var(--l-overlay), var(--d-overlay));
  }
  :root:has(> head > meta[name="color-scheme"][content="dark"]) {
    color-scheme: dark;
    --shadow: var(--d-shadow);
  }
  :root:has(> head > meta[name="color-scheme"][content="light"]) {
    color-scheme: light;
    --shadow: var(--l-shadow);
  }
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
}
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.3; margin: 0; font-weight: 700; letter-spacing: 0; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: currentColor; }
.icon-lg { width: 1.6em; height: 1.6em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.stack > * + * { margin-top: 12px; }

/* ---------- 3. Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 10px; height: 58px; }
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-family: var(--font-head); font-weight: 700; font-size: 1.06rem; margin-right: auto; }
.logo:hover { text-decoration: none; }
.logo svg { width: 34px; height: 34px; }
.logo small { display: none; font-family: var(--font-body); font-weight: 500; font-size: .74rem; color: var(--ink-3); line-height: 1.2; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.main-nav { display: none; }
.main-nav a { color: var(--ink-2); font-weight: 500; padding: 8px 12px; border-radius: var(--radius-sm); }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); text-decoration: none; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 42px; height: 42px; padding: 0 10px;
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--ink-2); font-weight: 600; font-size: .88rem; cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); text-decoration: none; }
.site-header .header-login { display: none; }

/* theme toggle: show the action that is currently possible */
.theme-toggle .to-dark { display: inline-flex; }
.theme-toggle .to-light { display: none; }
@media (prefers-color-scheme: dark) {
  .theme-toggle .to-light { display: inline-flex; }
  .theme-toggle .to-dark { display: none; }
}
:root:has(> head > meta[name="color-scheme"][content="dark"]) .theme-toggle .to-light { display: inline-flex; }
:root:has(> head > meta[name="color-scheme"][content="dark"]) .theme-toggle .to-dark { display: none; }
:root:has(> head > meta[name="color-scheme"][content="light"]) .theme-toggle .to-light { display: none; }
:root:has(> head > meta[name="color-scheme"][content="light"]) .theme-toggle .to-dark { display: inline-flex; }

/* ---------- 4. Bottom navigation (mobile) ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  height: var(--nav-h); color: var(--ink-3); font-size: .74rem; font-weight: 500; line-height: 1.2;
}
.bottom-nav a:hover { text-decoration: none; }
.bottom-nav .icon { width: 24px; height: 24px; }
.bottom-nav a[aria-current="page"] { color: var(--brand); font-weight: 600; }
.bottom-nav .nav-post span.bubble {
  display: grid; place-items: center; width: 46px; height: 46px; margin-top: -20px;
  background: var(--brand); color: var(--brand-ink); border-radius: 50%;
  box-shadow: 0 4px 14px rgba(11, 110, 79, .35); border: 3px solid var(--surface);
}
.bottom-nav .nav-post { color: var(--brand); font-weight: 600; }

/* ---------- 5. Buttons, chips, badges ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 20px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 1rem; line-height: 1.3; cursor: pointer; text-align: center;
  transition: background-color .15s, border-color .15s, transform .05s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-strong); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 6px 14px; font-size: .92rem; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 38px; padding: 6px 14px;
  background: var(--surface); color: var(--ink-2);
  border: 1px solid var(--line); border-radius: var(--radius-pill);
  font-size: .92rem; font-weight: 500; white-space: nowrap; cursor: pointer;
}
.chip:hover { text-decoration: none; border-color: var(--brand); }
.chip[aria-pressed="true"], .chip.is-on, .chip-check input:checked + span {
  background: var(--brand-soft); color: var(--brand); border-color: var(--brand); font-weight: 600;
}
.chip-check { position: relative; display: inline-flex; }
.chip-check input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip-check span {
  display: inline-flex; align-items: center; min-height: 38px; padding: 6px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface);
  color: var(--ink-2); font-size: .92rem; font-weight: 500; white-space: nowrap;
}
.chip-check input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 2px var(--gutter); margin: 0 calc(var(--gutter) * -1); scrollbar-width: none; }
.chip-scroll::-webkit-scrollbar { display: none; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px;
  border-radius: var(--radius-pill); font-size: .8rem; font-weight: 600; line-height: 1.5;
  background: var(--surface-2); color: var(--ink-2);
}
.badge .icon { width: 1.05em; height: 1.05em; }
.badge-ok { background: var(--brand-soft); color: var(--brand); }
.badge-accent { background: var(--accent-soft); color: var(--accent-text); }

/* ---------- 6. Sections ---------- */
.section { padding: 34px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head h2 { font-size: 1.4rem; }
.section-head a { font-weight: 600; font-size: .95rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.eyebrow { color: var(--brand); font-weight: 600; font-size: .9rem; }

/* ---------- 7. Hero (home) ---------- */
.hero { padding: 26px 0 8px; }
.hero h1 { font-size: clamp(1.75rem, 6.4vw, 2.9rem); margin: 8px 0 12px; max-width: 16em; }
.hero p.lead { color: var(--ink-2); font-size: 1.06rem; max-width: 34em; }
.choice-grid { display: grid; gap: 12px; margin-top: 22px; }
.choice {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); box-shadow: var(--shadow);
}
.choice:hover { text-decoration: none; border-color: var(--brand); }
.choice .tile { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; flex: none; }
.choice .tile .icon { width: 32px; height: 32px; }
.choice-invest .tile { background: var(--brand-soft); color: var(--brand); }
.choice-seek .tile { background: var(--accent-soft); color: var(--accent-text); }
.choice strong { display: block; font-family: var(--font-head); font-size: 1.14rem; line-height: 1.35; }
.choice span.sub { display: block; color: var(--ink-3); font-size: .93rem; line-height: 1.45; }
.choice > .icon { margin-left: auto; color: var(--ink-3); }

.quick-search {
  display: grid; gap: 10px; margin-top: 16px; padding: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.trust-row { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; color: var(--ink-2); font-size: .93rem; font-weight: 500; }
.trust-row li { display: inline-flex; align-items: center; gap: 6px; }
.trust-row .icon { color: var(--brand); }

/* ---------- 8. Sector grid ---------- */
.sector-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sector {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); font-size: .84rem; font-weight: 500; line-height: 1.3; text-align: center;
}
.sector:hover { text-decoration: none; border-color: var(--brand); color: var(--brand); }
.sector .icon { width: 34px; height: 34px; color: var(--brand); }

/* ---------- 9. Listing cards ---------- */
.card-grid { display: grid; gap: 14px; }
/* phones: compact row (photo left) so several listings fit on one screen */
.card {
  display: flex; flex-direction: row; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink);
}
.card:hover { text-decoration: none; border-color: var(--brand); box-shadow: var(--shadow); }
.card-media { position: relative; flex: 0 0 32%; max-width: 128px; background: var(--surface-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; flex: 1; min-width: 0; }
.card-kicker { color: var(--brand); font-size: .8rem; font-weight: 600; line-height: 1.4; }
.card-kicker span { color: var(--ink-3); font-weight: 500; }
.card h3 { font-size: 1rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .amount { font-family: var(--font-head); font-weight: 700; font-size: 1.12rem; color: var(--brand); line-height: 1.3; }
.card .tag-stage { display: none; }
.card .amount small { font-family: var(--font-body); font-weight: 500; font-size: .84rem; color: var(--ink-3); }
.card .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--ink-3); font-size: .88rem; }
.card .meta span { display: inline-flex; align-items: center; gap: 4px; }
.card .meta .icon { width: 1.1em; height: 1.1em; }
.card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }

/* placeholder art for listings without a photo (and for sample data) */
.ph { display: grid; place-items: center; width: 100%; height: 100%; }
.ph .icon { width: 30%; height: auto; aspect-ratio: 1; opacity: .9; }
.ph-1 { background: linear-gradient(135deg, #cfe9e0, #9fd0c0); color: #0b6e4f; }
.ph-2 { background: linear-gradient(135deg, #f6e3bf, #ecc98a); color: #8a5a00; }
.ph-3 { background: linear-gradient(135deg, #d9e8c4, #b5d190); color: #48691b; }
.ph-4 { background: linear-gradient(135deg, #f3d9cf, #e6b5a2); color: #94442a; }
.ph-5 { background: linear-gradient(135deg, #d6e0f0, #a9bfe0); color: #2d4f86; }

/* ---------- 10. Info blocks ---------- */
.steps { display: grid; gap: 12px; counter-reset: step; }
.step { display: flex; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.step .tile { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); flex: none; }
.step .tile .icon { width: 28px; height: 28px; }
.step h3 { font-size: 1.08rem; margin-bottom: 2px; }
.step p { color: var(--ink-2); font-size: .95rem; }

.notice {
  display: flex; gap: 12px; padding: 14px 16px;
  background: var(--accent-soft); color: var(--ink);
  border: 1px solid var(--accent); border-radius: var(--radius);
}
.notice > .icon { color: var(--accent-text); width: 26px; height: 26px; margin-top: 2px; }
.notice strong { font-family: var(--font-head); font-size: 1.05rem; }
.notice p { font-size: .95rem; color: var(--ink-2); }
.notice-danger { background: var(--danger-soft); border-color: var(--danger); }
.notice-danger > .icon { color: var(--danger); }

.post-list { display: grid; gap: 12px; }
.post-item { display: flex; gap: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); }
.post-item:hover { text-decoration: none; border-color: var(--brand); }
.post-item .thumb { width: 84px; height: 84px; border-radius: 10px; overflow: hidden; flex: none; }
.post-item h3 { font-size: 1rem; line-height: 1.45; }
.post-item .muted { font-size: .84rem; }

/* ---------- 11. Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .label { font-weight: 600; font-size: .95rem; }
.field .hint { color: var(--ink-3); font-size: .86rem; line-height: 1.5; }
.input, .select, .textarea {
  width: 100%; min-height: 50px; padding: 11px 14px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 1rem; line-height: 1.5;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-3); opacity: 1; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%;
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
}
.textarea { min-height: 150px; resize: vertical; }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .addon {
  display: inline-flex; align-items: center; padding: 0 14px; white-space: nowrap;
  background: var(--surface-2); color: var(--ink-2); font-weight: 600;
  border: 1px solid var(--line); border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.form-grid { display: grid; gap: 16px; }

.option-grid { display: grid; gap: 10px; }
.option { position: relative; display: block; }
.option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.option .box {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; min-height: 58px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.option .box strong { display: block; font-size: .98rem; line-height: 1.4; }
.option .box small { display: block; color: var(--ink-3); font-size: .85rem; line-height: 1.4; }
.option .box .icon { color: var(--ink-3); width: 26px; height: 26px; }
.option input:checked + .box { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.option input:checked + .box .icon { color: var(--brand); }
.option input:focus-visible + .box { outline: 3px solid var(--accent); outline-offset: 2px; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.check input { width: 22px; height: 22px; margin-top: 2px; flex: none; }

.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px; text-align: center;
  background: var(--surface); border: 2px dashed var(--line); border-radius: var(--radius); color: var(--ink-2); cursor: pointer;
}
.dropzone:hover { border-color: var(--brand); }
.dropzone .icon { width: 36px; height: 36px; color: var(--brand); }
.dropzone strong { font-size: 1rem; color: var(--ink); }
.thumb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.thumb-grid .slot { position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
.thumb-grid .slot.empty { display: grid; place-items: center; border-style: dashed; color: var(--ink-3); background: var(--surface); }
.thumb-grid .slot .tag { position: absolute; left: 6px; bottom: 6px; }

/* ---------- 12. Wizard ---------- */
.page-head { padding: 22px 0 6px; }
.page-head h1 { font-size: 1.55rem; }
.page-head p { color: var(--ink-2); margin-top: 4px; }
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 16px 0 20px; }
.stepper li { display: flex; flex-direction: column; gap: 6px; font-size: .8rem; font-weight: 500; color: var(--ink-3); line-height: 1.3; }
.stepper li::before { content: ""; height: 5px; border-radius: 3px; background: var(--line); }
.stepper li.is-done::before, .stepper li.is-current::before { background: var(--brand); }
.stepper li.is-current { color: var(--brand); font-weight: 700; }
.stepper li.is-done { color: var(--ink-2); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; }
.panel > h2 { font-size: 1.2rem; margin-bottom: 4px; }
.panel > p.muted { margin-bottom: 16px; font-size: .93rem; }
.wizard-actions { display: flex; gap: 10px; margin-top: 18px; }
.wizard-actions .btn { flex: 1; }
.wizard-actions .btn-ghost { flex: 0 0 auto; }

/* ---------- 13. Search page ---------- */
.search-bar { padding: 14px 0 6px; }
.search-bar h1 { font-size: 1.35rem; margin-bottom: 10px; }
.result-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0; }
.result-bar strong { font-family: var(--font-head); font-size: 1.02rem; }
.result-bar .select { min-height: 42px; width: auto; padding-top: 7px; padding-bottom: 7px; font-size: .92rem; }
.search-layout { display: block; }
.filters-aside { display: none; }
.filter-group { padding: 14px 0; border-top: 1px solid var(--line); }
.filter-group:first-child { border-top: 0; padding-top: 0; }
.filter-group > .label { display: block; font-weight: 700; font-family: var(--font-head); margin-bottom: 10px; }
.filter-group .form-grid { gap: 10px; }
.pager { display: flex; justify-content: center; margin-top: 20px; }

/* ---------- 14. Dialogs / bottom sheets ---------- */
dialog.sheet {
  width: 100%; max-width: 560px; max-height: 88vh; max-height: 88dvh;
  margin: auto auto 0; padding: 0; border: 0;
  background: var(--surface); color: var(--ink);
  border-radius: 20px 20px 0 0; box-shadow: var(--shadow);
}
dialog.sheet[open] { display: flex; flex-direction: column; }
dialog:modal { overscroll-behavior: contain; }
dialog::backdrop { background: var(--overlay); overflow: hidden; overscroll-behavior: contain; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-size: 1.15rem; }
.sheet-body { padding: 16px; overflow-y: auto; }
.sheet-foot { display: flex; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.sheet-foot .btn { flex: 1; }

/* ---------- 15. Listing page ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 6px; padding: 12px 0; color: var(--ink-3); font-size: .86rem; }
.crumbs a { color: var(--ink-2); }
.gallery { position: relative; margin: 0 calc(var(--gutter) * -1); }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track > * { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 4 / 3; }
.gallery-count { position: absolute; right: 12px; bottom: 12px; padding: 2px 10px; border-radius: var(--radius-pill); background: rgba(0, 0, 0, .6); color: #fff; font-size: .82rem; font-weight: 600; }
.listing-head { padding: 16px 0 4px; }
.listing-head h1 { font-size: 1.45rem; line-height: 1.4; margin: 8px 0; }
.listing-head .amount { font-family: var(--font-head); font-size: 1.7rem; font-weight: 700; color: var(--brand); line-height: 1.3; }
.listing-head .amount small { font-family: var(--font-body); font-size: .95rem; font-weight: 500; color: var(--ink-3); }
.listing-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-2); font-size: .93rem; margin-top: 8px; }
.listing-meta span { display: inline-flex; align-items: center; gap: 5px; }
.fact-grid { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
/* Each cell draws its own right and bottom line, pulled over the edge, so an
   uneven number of facts leaves a clean blank space instead of a grey block. */
.fact { padding: 12px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.fact dt { color: var(--ink-3); font-size: .84rem; }
.fact dd { margin: 0; font-weight: 600; line-height: 1.45; }
.prose { color: var(--ink-2); }
.prose p + p { margin-top: 12px; }
.prose h3 { font-size: 1.08rem; color: var(--ink); margin: 18px 0 6px; }
.block { margin-top: 22px; }
.block > h2 { font-size: 1.2rem; margin-bottom: 10px; }
.verify-list { display: grid; gap: 8px; }
.verify-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); font-weight: 500; }
.verify-list .icon { color: var(--brand); width: 24px; height: 24px; }
.verify-list li.is-off { color: var(--ink-3); }
.verify-list li.is-off .icon { color: var(--ink-3); }

.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.contact-card h2 { font-size: 1.12rem; }
.contact-person { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.avatar { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; flex: none; }
.hidden-number { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius-sm); font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; letter-spacing: .04em; }
.hidden-number .icon { color: var(--ink-3); }
.credit-note { color: var(--ink-3); font-size: .86rem; margin-top: 8px; text-align: center; }
.share-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.share-row .btn { flex-direction: column; gap: 2px; min-height: 58px; padding: 8px 4px; font-size: .78rem; font-weight: 500; }
.share-row .icon { width: 24px; height: 24px; }
.s-fb .icon { color: #1877f2; } .s-wa .icon { color: #1fa855; } .s-ms .icon { color: #a033ff; }
.report-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: .9rem; }

.sticky-cta {
  position: fixed; left: 0; right: 0; z-index: 45;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 12px; padding: 10px var(--gutter);
  background: var(--surface); border-top: 1px solid var(--line);
}
.sticky-cta .amount { font-family: var(--font-head); font-weight: 700; color: var(--brand); line-height: 1.25; }
.sticky-cta .amount small { display: block; font-family: var(--font-body); font-weight: 500; color: var(--ink-3); font-size: .78rem; }
.sticky-cta .btn { margin-left: auto; }
.has-sticky-cta { padding-bottom: calc(var(--nav-h) + 76px + env(safe-area-inset-bottom, 0px)); }

/* ---------- 16. Footer ---------- */
.site-footer { margin-top: 30px; padding: 28px 0 24px; background: var(--surface); border-top: 1px solid var(--line); color: var(--ink-2); font-size: .93rem; }
.footer-grid { display: grid; gap: 22px; }
.site-footer h3 { font-size: 1rem; color: var(--ink); margin-bottom: 8px; }
.site-footer li + li { margin-top: 6px; }
.site-footer a { color: var(--ink-2); }
.disclaimer { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: .86rem; }

/* mock-up only: page switcher */
.mock-bar { background: var(--ink); color: var(--bg); font-size: .82rem; }
.mock-bar .wrap { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.mock-bar a { color: inherit; opacity: .75; }
.mock-bar a[aria-current="page"] { opacity: 1; font-weight: 700; text-decoration: underline; }

/* ---------- 17. Larger screens ---------- */
@media (min-width: 600px) {
  .choice-grid { grid-template-columns: 1fr 1fr; }
  .quick-search { grid-template-columns: 1fr 1fr auto; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .card { flex-direction: column; }
  .card-media { flex: none; max-width: none; aspect-ratio: 16 / 10; }
  .card-body { gap: 7px; padding: 12px 14px 14px; }
  .card h3 { font-size: 1.06rem; }
  .card .amount { font-size: 1.22rem; }
  .card .tag-stage { display: inline-flex; }
  .sector-grid { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step { flex-direction: column; }
  .option-grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .option-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .form-grid .span-2 { grid-column: 1 / -1; }
  .post-list { grid-template-columns: repeat(3, 1fr); }
  .post-item { flex-direction: column; }
  .post-item .thumb { width: 100%; height: auto; aspect-ratio: 16 / 9; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  dialog.sheet { margin: auto; border-radius: 20px; }
  .thumb-grid { grid-template-columns: repeat(6, 1fr); }
}

@media (min-width: 900px) {
  :root { --gutter: 24px; }
  body { padding-bottom: 0; }
  .bottom-nav { display: none; }
  .site-header .wrap { height: 68px; }
  .logo { margin-right: 18px; font-size: 1.18rem; }
  .logo small { display: block; }
  .main-nav { display: flex; gap: 2px; margin-right: auto; }
  .site-header .header-login { display: inline-flex; }
  .section { padding: 48px 0; }
  .section-head h2 { font-size: 1.7rem; }
  .hero { padding: 54px 0 16px; }
  .hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; }
  .choice-grid { grid-template-columns: 1fr; margin-top: 0; }
  .choice { padding: 20px; }
  .sector-grid { grid-template-columns: repeat(8, 1fr); }
  .card-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .search-layout { display: grid; grid-template-columns: 290px 1fr; gap: 28px; align-items: start; }
  .filters-aside { display: block; position: sticky; top: 88px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
  .filter-open { display: none; }
  .search-layout .card-grid { grid-template-columns: repeat(2, 1fr); }
  .listing-layout { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; }
  .listing-side { position: sticky; top: 88px; }
  .gallery { margin: 0; border-radius: var(--radius); overflow: hidden; }
  .gallery-track > * { aspect-ratio: 16 / 9; }
  .sticky-cta { display: none; }
  .has-sticky-cta { padding-bottom: 0; }
  .fact-grid { grid-template-columns: repeat(3, 1fr); }
  .narrow { max-width: 760px; }
  .panel { padding: 26px; }
  .page-head h1 { font-size: 1.9rem; }
  .listing-head h1 { font-size: 1.8rem; }
}

@media (min-width: 1100px) {
  .search-layout .card-grid { grid-template-columns: repeat(3, 1fr); }
}

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

/* ---------- 18. Forms: messages and sign-in pages ---------- */
.form-msg { margin: 0; padding: 12px 14px; border-radius: var(--radius-sm); font-size: .95rem; background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger); }
.form-msg.is-ok { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
.field-error { color: var(--danger); font-size: .88rem; font-weight: 500; }
.input.is-invalid { border-color: var(--danger); }
.auth-wrap { width: 100%; max-width: 480px; margin: 0 auto; padding: 8px var(--gutter) 40px; }
.auth-wrap .page-head { margin-bottom: 14px; }
.auth-alt { text-align: center; margin-top: 16px; color: var(--ink-2); }
button.addon { cursor: pointer; font-size: .9rem; }
.btn[disabled] { opacity: .65; cursor: wait; }

/* ---------- 19. Lists, empty states, articles ---------- */
.list { display: grid; gap: 10px; }
.list-item { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.list-item .badge { white-space: nowrap; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 36px 20px; text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); color: var(--ink-2); }
.empty-state > .icon { width: 56px; height: 56px; color: var(--brand); }
.article { max-width: 760px; padding-bottom: 24px; }
.article > h1 { font-size: 1.7rem; line-height: 1.35; }
.article-cover { border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.article-cover img { width: 100%; height: auto; }
.prose h2 { font-size: 1.3rem; color: var(--ink); margin: 24px 0 8px; }
.prose ul, .prose ol { margin: 10px 0 10px 1.4em; padding: 0; list-style: revert; }
.prose li + li { margin-top: 4px; }
.prose img { border-radius: var(--radius-sm); height: auto; }
.prose a { text-decoration: underline; }
.gallery-track img { width: 100%; height: 100%; object-fit: cover; }
.post-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.pager { gap: 12px; align-items: center; }
.filter-actions { display: flex; gap: 10px; position: sticky; bottom: 0; padding: 14px 0 4px; background: var(--surface); border-top: 1px solid var(--line); }
.filter-actions .btn-primary { flex: 1; }
.share-row { grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); }
@media (min-width: 900px) {
  .filters-aside { max-height: calc(100vh - 108px); overflow-y: auto; }
}

/* ---------- 20. Posting form: photo slots and document boxes ---------- */
.thumb-grid:empty { display: none; }
.thumb-grid .slot img { width: 100%; height: 100%; object-fit: cover; }
.thumb-grid .slot.is-loading { display: grid; place-items: center; background: var(--surface-2); }
.thumb-grid .slot.is-loading::after {
  content: ""; width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--brand);
  animation: cmi-spin .8s linear infinite;
}
@keyframes cmi-spin { to { transform: rotate(360deg); } }
.slot-remove {
  position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff;
  font-size: 20px; line-height: 1; cursor: pointer;
}
.dropzone.is-done { border-style: solid; border-color: var(--brand); background: var(--brand-soft); }
.dropzone.is-done strong { color: var(--brand); }
@media (prefers-reduced-motion: reduce) {
  .thumb-grid .slot.is-loading::after { animation-duration: 2.4s; }
}

/* ---------- 21. Sign-in choices and footer contact ---------- */
.google-box { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.google-box [data-google-button] { display: flex; justify-content: center; width: 100%; min-height: 44px; }
.or-line { display: flex; align-items: center; gap: 12px; margin: 14px 0; color: var(--ink-3); font-size: .9rem; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.footer-contact { margin-top: 18px; color: var(--ink-2); line-height: 1.9; }

/* ---------- 22. Verification, stories, reviews, support ---------- */
.verify-steps { margin: 0 0 6px 1.3em; padding: 0; list-style: decimal; color: var(--ink-2); }
.verify-steps li + li { margin-top: 6px; }
.verify-code {
  margin: 8px 0 14px; padding: 14px; text-align: center;
  background: var(--surface-2); border-radius: var(--radius-sm);
  font-family: var(--font-head); font-size: 2.2rem; font-weight: 700; letter-spacing: .18em;
}
.story-grid { display: grid; gap: 12px; }
.story { display: flex; gap: 14px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); }
.story:hover { text-decoration: none; border-color: var(--brand); }
.story-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); flex: none; }
.story-icon .icon { width: 30px; height: 30px; }
.story-body { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.story-body strong { font-family: var(--font-head); line-height: 1.4; }
.story-body .muted { font-size: .9rem; }
.stars { color: var(--accent-text); letter-spacing: .05em; white-space: nowrap; }
.review { padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.review-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 4px; }
.review-head .muted { font-size: .84rem; }
.review p { color: var(--ink-2); }
.trust-list { display: grid; gap: 8px; color: var(--ink-2); font-size: .93rem; }
.trust-list li { display: flex; gap: 8px; align-items: flex-start; }
.trust-list .icon { color: var(--brand); margin-top: 3px; }
[data-save][aria-pressed="true"] { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.qr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.qr { margin: 0; padding: 14px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); color: #14211b; }
.qr img { width: 100%; height: auto; max-width: 260px; margin: 0 auto; }
.qr figcaption { margin-top: 8px; font-weight: 700; font-family: var(--font-head); }
.list-item.is-new { border-color: var(--brand); background: var(--brand-soft); }
.dot { display: inline-block; width: 9px; height: 9px; margin-left: 5px; border-radius: 50%; background: var(--accent); vertical-align: middle; }
.bottom-nav a { position: relative; }
.bottom-nav .dot { position: absolute; top: 10px; left: calc(50% + 8px); margin: 0; }
@media (min-width: 600px) {
  .story-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .story-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- 23. Grouped choices and the sort control ---------- */
fieldset.field { margin: 0; padding: 0; border: 0; min-width: 0; }
fieldset.field > legend { padding: 0; margin-bottom: 6px; font-weight: 600; font-size: .95rem; }
.sort-box { display: inline-flex; gap: 6px; align-items: center; }

/* ---------- 24. Member dashboard: tabs, figures, contact lists ---------- */
.chip-check span { gap: 6px; }
.chip-check .icon { width: 1.1em; height: 1.1em; }
.hidden-number.is-email { font-size: 1.02rem; letter-spacing: 0; overflow-wrap: anywhere; }
.input-row { display: flex; gap: 8px; }
.input-row .input { flex: 1; min-width: 0; }
.action-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.action-row:empty { display: none; }
.panel .action-row { margin-top: 14px; }

/* One row of tabs. It scrolls sideways when the labels do not fit; it never wraps. */
.tablist {
  display: flex; overflow-x: auto; scrollbar-width: none;
  margin: 6px calc(var(--gutter) * -1) 0; padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
  scroll-padding-inline: 2rem;
}
.tablist::-webkit-scrollbar { display: none; }
.tablist > button {
  position: relative; flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 48px; padding: 10px 14px;
  border: 0; background: none; color: var(--ink-2);
  font: inherit; font-weight: 600; font-size: .98rem; white-space: nowrap; cursor: pointer;
}
.tablist > button:hover { color: var(--ink); }
.tablist > button:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; border-radius: 6px; }
/* The selected tab is marked by an underline as well as colour, drawn with a border
   so that it survives forced-colours mode. It takes up no space. */
.tablist > [aria-selected="true"] { color: var(--brand); }
.tablist > [aria-selected="true"]::after {
  content: ""; position: absolute; inset: auto 0 0;
  border-block-end: 3px solid var(--brand);
}
/* Fade whichever edge has more tabs beyond it. */
@property --fade-start { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --fade-end { syntax: "<length>"; inherits: false; initial-value: 0px; }
@supports (animation-timeline: scroll()) {
  .tablist {
    --fade-size: 2rem;
    mask:
      linear-gradient(black, black) no-clip subtract,
      linear-gradient(to right, black, transparent) 0 0 / var(--fade-start) 100% no-repeat no-clip,
      linear-gradient(to right, transparent, black) 100% 0 / var(--fade-end) 100% no-repeat no-clip;
    animation: cmi-fade-start linear both, cmi-fade-end linear both;
    animation-timeline: scroll(self inline);
    animation-range: 0 var(--fade-size), calc(100% - var(--fade-size)) 100%;
  }
}
@keyframes cmi-fade-start { to { --fade-start: var(--fade-size); } }
@keyframes cmi-fade-end { from { --fade-end: var(--fade-size); } }

/* A row of headline figures. The number is read after its label but shown above it. */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 10px; margin: 0; }
.panel .stat-grid { margin-top: 12px; }
.stat {
  display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 2px;
  padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.panel .stat { background: var(--surface-2); border-color: transparent; }
.stat dt { color: var(--ink-2); font-size: .86rem; line-height: 1.4; }
.stat dd { margin: 0; font-family: var(--font-head); font-size: 1.55rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat dd small { font-size: .9rem; font-weight: 600; color: var(--ink-3); }

/* List rows that hold more than one line: a heading line, details, then actions. */
.list-item.is-stacked { flex-direction: column; align-items: stretch; gap: 10px; }
.list-top { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.list-top > div { min-width: 0; }
.list-sub { font-size: .88rem; }
.list-when { font-size: .84rem; white-space: nowrap; }
.contact-lines { display: grid; gap: 8px; }
.contact-line {
  display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 12px;
  background: var(--brand-soft); color: var(--brand); border-radius: var(--radius-sm);
  font-weight: 700; overflow-wrap: anywhere;
}
.contact-line:hover { text-decoration: none; }
.contact-line .num { font-family: var(--font-head); font-size: 1.1rem; letter-spacing: .03em; }
.contact-line .icon { flex: none; }

/* On a phone the four tabs share the row equally, with the icon above the word,
   so every tab is in view at once. A narrower screen still scrolls sideways. */
@media (max-width: 599px) {
  .tablist { padding: 0 calc(var(--gutter) - 8px); }
  .tablist > button {
    flex: 1 0 auto; flex-direction: column; justify-content: center; gap: 2px;
    min-height: 56px; padding: 8px 8px 10px; font-size: .86rem;
  }
}
