/* Structure rules shared with the Allora tools (Parcels css/structure.css, Artemis web/src/structure.css),
   fitted to a reading site. Loaded after site.css; applies while <html> has the class "structure"
   (it is in the page source; ?layout=classic removes it). Colours, typefaces and layout are site.css's.
   The allora.capital header and footer (.hdr, .ftr) are not touched, apart from tap targets on phones.

   Type scale: 11 labels · 12 small · 13 interface and tables · 15 card titles and notes · 17 reading text ·
               20 sub-headings and figures · 28 section headings (flexes down to 22) · page title (32 to 48).
   The first five are the tools' scale; 17 and the two display steps are what a reading page needs on top.
   Weights stop at 600. */

.structure {
  --t-label: 11px; --t-small: 12px; --t-ui: 13px; --t-card: 15px; --t-read: 17px; --t-sub: 20px;
  --t-head: clamp(22px, 2.4vw, 28px);
  --t-title: clamp(32px, 4vw, 48px);
}

/* ---- batch 1: sizes ---- */
.structure body { font-size: var(--t-card); }

/* 11: labels */
.structure .badge, .structure .strip__l, .structure .chart__ends, .structure .chart--dark .chart__title,
.structure .cover__credit, .structure .prose > table th, .structure .callout__label, .structure .chart__hcell,
.structure .datatable thead th, .structure .glance__t thead th, .structure .datatable thead th.n, .structure .glance__t thead th.n,
.structure .method__grid dt { font-size: var(--t-label); }

/* 12: small */
.structure .eyebrow--sm, .structure .meta, .structure .mcard .meta, .structure .gcard .meta, .structure .nrow .meta,
.structure .kpi__l, .structure .chart__source, .structure .chart__legend, .structure .datatable .n, .structure .glance__t .n,
.structure .glance__note, .structure .takeaways__h, .structure .credit, .structure .toc summary, .structure .facts__h,
.structure .facts dt, .structure .about-pill, .structure .doc--big .doc__t { font-size: var(--t-small); }

/* 13: interface, tables, bylines */
.structure .eyebrow, .structure .empty, .structure .strip__v, .structure .nrow__s, .structure .lane__h a,
.structure .chart__caption, .structure .chart__hl, .structure .chart__hcell b, .structure .datatable table, .structure .glance__t,
.structure .byline, .structure .byline .meta, .structure .stale, .structure .prose .footnotes, .structure .media figcaption,
.structure .toc li a, .structure .facts dd, .structure .method__fine, .structure .hl__i, .structure .changelog ul,
.structure .disclaimer, .structure .feedlink, .structure .answer__q, .structure .about-allora__links .btn,
.structure .lbx__cap, .structure .chip { font-size: var(--t-ui); }
.structure .toc__l3 a { font-size: var(--t-small) !important; }

/* 15: card titles, buttons, notes */
.structure .sub-h--sm, .structure .btn, .structure .btn--lg, .structure .mcard__t, .structure .gcard__t, .structure .nrow__t,
.structure .acard__t, .structure .feat__s, .structure .chart__title, .structure .prose > table, .structure .prose > .chart,
.structure .appendix .chart, .structure .callout, .structure .method__grid dd, .structure .method__txt, .structure .glossary dd,
.structure .band p, .structure .about-allora__txt p, .structure .faq dd { font-size: var(--t-card); }
.structure .chart--dark .chart__title { font-size: var(--t-label); }

/* 17: reading text */
.structure .lead, .structure .prose, .structure .phead__s, .structure .answer__a, .structure .faq dt { font-size: var(--t-read); }

/* 20: sub-headings and figures */
.structure .sub-h, .structure .lane__h h2, .structure .kpi__v, .structure .kpis--feat .kpi__v, .structure .prose h3,
.structure .hl__p, .structure .about-allora__h { font-size: var(--t-sub); }

/* 28: section headings and the page's headline figures */
.structure .feat__t, .structure .prose h2, .structure .band__h, .structure .pullquote p, .structure .kpis--lg .kpi__v { font-size: var(--t-head); }

/* page title */
.structure .h-section, .structure .phead__t { font-size: var(--t-title); }

/* weights: nothing heavier than 600 (headings, figures, the footer's bold items) */
.structure .h-section, .structure .sub-h, .structure .feat__t, .structure .lane__h h2, .structure .phead__t, .structure .prose h2,
.structure .prose h3, .structure .glossary dt, .structure .band__h, .structure .about-allora__h, .structure .doc__t,
.structure b, .structure strong, .structure h1, .structure h2, .structure h3, .structure h4, .structure th { font-weight: 600; }

/* ---- batch 2: figures without boxes ---- */
/* the review's headline figures: a strip between two hairlines, no card */
.structure .kpis--lg { background: none; border: 0; border-radius: 0; overflow: visible;
  border-top: 1px solid var(--border-strong); border-bottom: 1px solid var(--border); }
.structure .kpis--lg .kpi { padding: 20px 28px 20px 0; border-right: 0; }
.structure .kpis--lg .kpi + .kpi { padding-left: 28px; border-left: 1px solid var(--border); }
/* a market card's three figures: label over value under one hairline, no tinted cells */
.structure .strip { border: 0; border-radius: 0; overflow: visible; border-top: 1px solid var(--border); margin-top: 14px; }
.structure .strip__c { background: none; padding: 10px 14px 0 0; }
.structure .strip__c + .strip__c { border-left: 0; padding-left: 14px; }
.structure .strip__l { letter-spacing: 0.04em; }
@media (max-width: 560px) {
  /* phones: each headline figure is a row, label on the left and the figure on the right */
  .structure .kpis--lg { display: block; }
  .structure .kpis--lg .kpi, .structure .kpis--lg .kpi + .kpi { flex-direction: row-reverse; align-items: baseline; justify-content: space-between; gap: 16px;
    padding: 12px 0; border: 0; border-top: 1px solid var(--border); }
  .structure .kpis--lg .kpi:first-child { border-top: 0; }
  .structure .kpis--lg .kpi__v { font-size: var(--t-sub); white-space: nowrap; }
  .structure .kpis--lg .kpi__l { max-width: none; font-size: var(--t-ui); }
}

/* ---- batch 3: tiny text and phone tap targets ---- */
/* the small guide cover cannot hold a readable label (it was 6.5 px): the category moves beside it */
.gcard__cat { display: none; }
.structure .doc:not(.doc--big) .doc__t { display: none; }
.structure .doc:not(.doc--big) { justify-content: flex-start; }
.structure .gcard__cat { display: block; font-size: var(--t-label); font-weight: 600; letter-spacing: 0.04em; color: var(--cymaris-deep); }
@media (max-width: 640px) {
  .structure .phead--guide .doc--big .doc__t { font-size: var(--t-label); }
}
@media (max-width: 720px) {
  /* everything you tap is 36 px or more; the touch area grows, the drawing does not move */
  .structure .soc { width: 36px; height: 36px; }
  .structure .hdr__right .soc + .soc { margin-left: 2px; }
  .structure .chip { min-height: 36px; }
  .structure .about-pill { min-height: 36px; }
  .structure .lane__h a, .structure .prose a, .structure .ftr__bottom a, .structure .ftr__legal a, .structure .method__fine a,
  .structure .disclaimer a, .structure .changelog a, .structure .feedlink { position: relative; }
  .structure .lane__h a::after, .structure .ftr__bottom a::after, .structure .ftr__legal a::after, .structure .feedlink::after, .structure .method__fine a::after {
    content: ""; position: absolute; left: -6px; right: -6px; top: 50%; height: 36px; transform: translateY(-50%); }
}
@media (max-width: 720px) {
  /* footer link lists: each link is a 36 px row */
  .structure .ftr__links a, .structure .ftr__research a { display: inline-flex; align-items: center; min-height: 36px; }
}
/* a figure inside a sentence keeps the sentence's size (it was 0.95em: one more size per paragraph size) */
.structure .prose .fig { font-size: inherit; }

/* ---- brand typefaces only ----
   Brand Guidelines v1.0, p.16-20: Giga Sans is the primary face (headline and subheadline in Semi Bold),
   Senta Sans the secondary one for numeric values, captions and detailed text. The Senta Sans files are not
   in this repo, so numbers and captions fall back to Giga Sans with aligned figures, never to a third typeface.
   When the licensed files arrive: add @font-face rules for 'Senta Sans' in site.css and nothing else changes. */
.structure { --font-numeric: 'Senta Sans', 'Giga Sans', 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif; }
.structure .num, .structure .chart__yl, .structure .chart__xl, .structure .chart__bv, .structure .chart__hv,
.structure .kpi__v, .structure .strip__v, .structure .meta, .structure .tip { font-variant-numeric: tabular-nums lining-nums; }

/* ---- no pill shapes ----
   Buttons, filters and labels are soft rectangles (8 px, labels 6 px), like the tools. Round stays only where
   the thing is a circle (social icons, chart dots, the author photo). The allora.capital header and footer keep
   their own shapes. */
.structure .btn, .structure .chip, .structure .about-pill { border-radius: var(--radius-sm); }
.structure .badge { border-radius: 6px; }
.structure .chart__track, .structure .chart__hbar { border-radius: 3px; }
