/* Structure rules shared with the Allora tools and Research (allora-research-2/static/css/structure.css),
   fitted to the investor pages. Loaded last; applies while <html> has the class "structure" (in the page
   source; ?layout=classic removes it, static/js/layout.js). Sizes are in structure-type.css (generated by
   tools/type_scale.py); this file holds the tokens and everything else. The allora.capital header and
   footer (ac- classes, .hdr-login) and the PDFs (print.css) are not touched.

   Type scale: 11 labels · 12 small · 13 interface and tables · 15 card titles, buttons, body ·
               17 reading text · 20 sub-headings and secondary figures · 24–32 section headings and
               headline figures · 36–56 page titles and the largest figures. Hero titles keep their size.
   Weights stop at 600. Numbers: Senta Sans first (the brand's figure face; it takes effect once its
   files are added as @font-face), then Giga Sans. */

.structure {
  --t-label: 11px; --t-small: 12px; --t-ui: 13px; --t-card: 15px; --t-read: 17px; --t-sub: 20px;
  --t-head: clamp(24px, 2.6vw, 32px);
  --t-title: clamp(36px, 4.5vw, 56px);
  --font-num: 'Senta Sans', 'Giga Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --r-ctl: 8px;   /* buttons, switches, chips */
  --r-in: 6px;    /* a segment inside a switch, small tags */
  --line-dark: rgba(255, 255, 255, .16);
}

/* ================= Batch 1: type, faces, figures ================= */
.structure body { font-size: var(--t-card); }
/* headings with no size of their own took the browser's (1.17 × or 1.5 × the body size) */
.structure h2 { font-size: var(--t-head); }
.structure h3 { font-size: var(--t-card); }
/* reading text that inherited the browser's 16 px */
.structure .sec-head .sec-sub, .structure .loc-side p, .structure .scen-desc { font-size: var(--t-read); }

/* nothing heavier than 600 (headings, figures, bold text, step numbers) */
.structure b, .structure strong, .structure h1, .structure h2, .structure h3, .structure h4, .structure th,
.structure .step, .structure .m-date, .structure .res-points-list dt,
.structure .waterfall li:not(:last-child)::after { font-weight: 600; }

/* sentence case, also the eyebrows (Nikita, 2026-11-19); theme.css already does this for most labels */
.structure .eyebrow, .structure .facts h3, .structure .land-l, .structure .m-date, .structure th,
.structure .fin-table th, .structure .offer-area, .structure .res-points-list dt, .structure .case-client {
  text-transform: none; letter-spacing: 0; }

/* figures: the number face, tabular, on one line */
.structure .num, .structure .kpi-v, .structure td.num, .structure dd.num, .structure .raise-v, .structure .land-m b,
.structure .type-area, .structure .donut-center span, .structure .hub-stats b, .structure .stat-link b,
.structure .offer-metrics dd, .structure .mini-facts dd, .structure .scen-kpis dd, .structure .summary dd,
.structure .distances b, .structure .cf-v, .structure .case-result, .structure number-flow {
  font-family: var(--font-num); font-variant-numeric: tabular-nums lining-nums; }
.structure .kpi-v, .structure .raise-v, .structure .land-m b, .structure .type-area, .structure .hub-stats b,
.structure .stat-link b, .structure td.num, .structure .donut-center span { white-space: nowrap; }
/* values in label–value rows can be a phrase ("€1,931 / m² (villas €1,950, townhouses …)"): they may wrap
   at a space, right-aligned, and the label keeps its room */
.structure .mini-facts dd, .structure .scen-kpis dd, .structure .summary dd, .structure .offer-metrics dd {
  white-space: normal; text-wrap: balance; min-width: 0; text-align: right; }
.structure .mini-facts dt, .structure .scen-kpis dt, .structure .offer-metrics dt { flex: 0 1 auto; min-width: 7em; }
/* a unit beside a figure ("m² NSA") stays with it */
.structure .type-area small { white-space: nowrap; }

/* "How we source": the tools' web addresses were in a mono face */
.structure .src-bar span { font-family: var(--font-num); letter-spacing: 0; }

/* ================= Batch 2: no pill shapes ================= */
/* buttons, chips and links that look like buttons: soft rectangles */
.structure .btn, .structure .chip, .structure a.chip.pdf-link, .structure .play, .structure .team-btn,
.structure .kpi-more, .structure .facts-more, .structure .masterplan .zoom,
.structure .btn:focus-visible, .structure .pill:focus-visible, .structure .seg button:focus-visible { border-radius: var(--r-ctl); }
/* switches: the track and its segments */
.structure .seg, .structure .filters, .structure .map-toggle, .structure .pano-switch { border-radius: var(--r-ctl); }
.structure .seg button, .structure .filters .pill, .structure .map-toggle button, .structure .pill { border-radius: var(--r-in); }
/* round icon buttons become rounded squares */
.structure .lb-close, .structure .lb-prev, .structure .lb-next { border-radius: 10px; }
.structure .modal-close { border-radius: var(--r-ctl); }
/* labels: status badge, tags, captions on pictures */
.structure .offer-status, .structure .tech-img figcaption, .structure .footprint figcaption,
.structure .map-card.map-img figcaption { border-radius: var(--r-in); }
.structure .offer-tags li { border-radius: var(--r-in); }
/* numbered steps: rounded squares */
.structure .step { border-radius: var(--r-ctl); }
.structure .src-rail a { border-radius: var(--r-ctl); }
.structure .src-rail b, .structure .src-tag b { border-radius: var(--r-in); }
.structure .src-bar span { border-radius: var(--r-in); }
/* kept round, they are not controls: team initials, map pin, legend and status dots, people's photos */

/* ================= Batch 3: figures without boxes ================= */
/* the hero: a little more shade at the bottom, so the figures read on the photo without their glass box */
.structure .hero-shade {
  background:
    linear-gradient(90deg, rgba(10,37,54,.55) 0%, rgba(10,37,54,.15) 55%, rgba(10,37,54,0) 100%),
    linear-gradient(180deg, rgba(10,37,54,.55) 0%, rgba(10,37,54,.1) 26%, rgba(10,37,54,.5) 52%, rgba(10,37,54,.9) 76%, rgba(10,37,54,.97) 100%); }

/* hero figures: one strip under a hairline, thin dividers, no glass, no cells */
.structure .kpis { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; border: 0; border-radius: 0;
  border-top: 1px solid rgba(255,255,255,.32); gap: 0; overflow: visible; }
.structure .kpi { background: none; padding: 16px 24px 4px; border-left: 1px solid var(--line-dark); gap: 2px; }
.structure .kpi:nth-child(6n+1) { padding-left: 0; border-left: 0; }
.structure .kpi-v { text-shadow: 0 1px 14px rgba(10,37,54,.5); }
.structure .kpi-l { color: rgba(255,255,255,.78); letter-spacing: 0; }

/* land and key-ratio figures under them: the same strip, smaller, no tinted cells */
.structure .land-strip { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 0; gap: 0;
  overflow: visible; margin-top: 0; border-top: 1px solid var(--line-dark); }
.structure .land-m, .structure .land-m.main { background: none; padding: 12px 24px 0; border-left: 1px solid var(--line-dark); }
.structure .land-m:first-child { padding-left: 0; border-left: 0; }
.structure .land-l { color: var(--claria); font-weight: 500; }
.structure .land-m small { color: rgba(255,255,255,.7); font-size: var(--t-small); }

@media (max-width: 1100px) and (min-width: 601px) {
  .structure .kpi:nth-child(6n+1) { padding-left: 24px; border-left: 1px solid var(--line-dark); }
  .structure .kpi:nth-child(3n+1) { padding-left: 0; border-left: 0; }
  .structure .kpi:nth-child(n+4) { border-top: 1px solid var(--line-dark); }
}
@media (max-width: 700px) and (min-width: 601px) {
  .structure .land-m:nth-child(odd) { padding-left: 0; border-left: 0; }
  .structure .land-m:nth-child(n+3) { border-top: 1px solid var(--line-dark); padding-top: 12px; }
}
/* phones: each figure is a row, label left and figure right, hairline between */
@media (max-width: 600px) {
  .structure .kpis { display: block; }
  .structure .kpi, .structure .kpi:nth-child(6n+1) { flex-direction: row-reverse; justify-content: space-between; align-items: baseline;
    gap: 16px; padding: 11px 0; border-left: 0; border-top: 1px solid var(--line-dark); }
  .structure .kpi:first-child { border-top: 0; }
  .structure .kpi-v { font-size: var(--t-sub); }
  .structure .kpi-l { font-size: var(--t-ui); }
  .structure .kpi-wrap.open .land-strip { display: block; } /* still folded behind "All figures" until opened */
  .structure .land-m, .structure .land-m.main, .structure .land-m:first-child {
    display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 16px;
    padding: 11px 0; border-left: 0; border-top: 1px solid var(--line-dark); }
  .structure .land-m .land-l { font-size: var(--t-ui); }
  .structure .land-m b { font-size: var(--t-sub); grid-row: 1; grid-column: 2; }
  .structure .land-m small { grid-column: 1 / -1; }
}

/* unit economics: the area and price figures as label–value rows, not a grid of tinted cells */
.structure .mini-facts { background: none; border-radius: 0; overflow: visible; gap: 0 32px; grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--hairline); margin-top: 18px; }
.structure .mini-facts div { background: none; display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--hairline); }
.structure .mini-facts dt { color: var(--muted); }
.structure .mini-facts dd { margin: 0; text-align: right; font-weight: 500; }
@container (max-width: 560px) { .structure .mini-facts { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .structure .mini-facts { grid-template-columns: 1fr; } .structure .mini-facts div { padding: 9px 0; } }

/* scenario figures: the same rows */
.structure .scen-kpis { background: none; border-radius: 0; overflow: visible; gap: 0; grid-template-columns: 1fr;
  border-top: 1px solid var(--hairline); } /* one column: two columns of rows get too narrow beside the chart */
.structure .scen-kpis div { background: none; display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--hairline); }
.structure .scen-kpis dt { color: var(--muted); }
.structure .scen-kpis dd { margin: 0; text-align: right; }

/* hub cards: the four figures as rows inside the card (no box in a box) */
.structure .offer-metrics { background: none; border-radius: 0; overflow: visible; gap: 0; grid-template-columns: 1fr;
  border-top: 1px solid var(--hairline); margin-top: 0; }
.structure .offer-metrics div { background: none; display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--hairline); }
.structure .offer-metrics dt { color: var(--muted); font-size: var(--t-ui); }
.structure .offer-metrics dd { margin: 0; text-align: right; font-size: var(--t-card); }

/* distribution waterfall: the steps inside the card are not boxes of their own */
.structure .waterfall li { background: none; border-radius: 0; padding: 14px 0 0; border-top: 1px solid var(--line-dark); }
.structure .waterfall li:not(:last-child)::after { top: 14px; }
@media (max-width: 900px) { .structure .waterfall li { padding: 12px 0; } }

/* the "i" beside a figure's label opens its explanation (static/js/structure.js) */
.st-i { display: none; }
.structure .st-i { all: unset; box-sizing: border-box; display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 6px;
  border-radius: 50%; border: 1px solid currentColor; opacity: .7; font: 600 11px/1 var(--font, 'Giga Sans'), sans-serif;
  cursor: pointer; vertical-align: 1px; position: relative; text-transform: none; letter-spacing: 0; }
.structure .st-i::after { content: ''; position: absolute; inset: -10px; } /* a bigger target than it looks */
.structure .st-i:hover, .structure .st-i[aria-expanded="true"] { opacity: 1; }
.structure .st-i:focus-visible { outline: 2px solid var(--claria); outline-offset: 2px; }
.structure .st-note { display: block; margin-top: 4px; padding-left: 8px; border-left: 2px solid currentColor; line-height: 1.45; }
.structure .st-note[hidden] { display: none; }

/* ================= Batch 4: phone ================= */
@media (max-width: 600px) {
  /* wide tables become two-line lists: the row's name, then each value with its column's name (data-l).
     Was: a 620 px table scrolling sideways inside a 343 px box. */
  .structure .st-list { overflow: visible; }
  .structure .st-list table { min-width: 0; display: block; }
  .structure .st-list thead { display: none; }
  .structure .st-list tbody, .structure .st-list tfoot { display: block; }
  .structure .st-list tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; padding: 10px 0;
    border-bottom: 1px solid var(--hairline); background: none; }
  .structure .st-list td { display: block; padding: 0 !important; border: 0 !important; background: none !important;
    text-align: left !important; position: static !important; min-width: 0 !important; white-space: nowrap; font-size: var(--t-ui); }
  .structure .st-list td:first-child { flex: 1 0 100%; white-space: normal; font-size: var(--t-card); font-weight: 500; }
  .structure .st-list td[data-l]:not(:first-child)::before { content: attr(data-l) "\00a0\00a0"; color: var(--muted); font-weight: 400; }
  .structure .st-list tr.strong td:first-child, .structure .st-list tfoot td:first-child { font-weight: 600; }
  .structure .st-list td:empty { display: none; } /* no value, no label (rows without a total) */
  /* a label and one value: on one line */
  .structure .st-list tr:has(> td:nth-child(2):last-child) td:first-child { flex: 1 1 auto; }
  .structure .st-list tr:has(> td:nth-child(2):last-child) td:last-child { margin-left: auto; text-align: right !important; }
  /* tables inside a white panel on a dark section keep a margin inside the panel */
  .structure .scenarios .st-list table, .structure .cash-table .st-list table { padding: 0 14px; }
  .structure .scenarios .st-list tr:last-child, .structure .cash-table .st-list tr:last-child { border-bottom: 0; }

  /* tap targets: at least 36 px (switch segments 34 → 38, the PDF link 35 → 40, filters 32 → 40) */
  .structure .seg button, .structure .filters .pill, .structure .map-toggle button, .structure .pano-switch .pill { min-height: 38px; }
  .structure a.chip.pdf-link { display: inline-flex; align-items: center; min-height: 40px; }
  .structure .filters-toggle { min-height: 40px; }
  .structure .src-rail a { min-height: 40px; min-width: 40px; }
  /* fields: 16 px, or phones zoom into them */
  .structure .filters-bar select, .structure .filters-bar input, .structure .fields input, .structure .fields select,
  .structure .fields textarea { font-size: 16px; }
}

/* ================= Batch 5: one control per job ================= */
/* The photo filter and the scenario tabs are a segmented switch on wider screens; on phones they do not
   fit (Coastal Office 533 px of filters in 343 px, scenarios 385 in 343), so a small drop-down takes their
   place (static/js/structure.js builds it from the switch and keeps the two in step). */
.st-select { display: none; }
@media (max-width: 600px) {
  .structure .st-has-select { display: none !important; }
  .structure .st-select { display: block; width: 100%; height: 42px; margin: 0 0 18px; padding: 0 36px 0 12px;
    font: 500 16px/1 var(--font); color: var(--noxen); background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-ctl);
    -webkit-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%235A7486' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; }
  .structure .st-select:focus-visible { outline: 2px solid var(--cymaris); outline-offset: 2px; }
}
