/* =========================================================================
   Signum Average: shared stylesheet
   Sections: tokens | base | masthead | shared components | article | home | footer | responsive
   ========================================================================= */

/* ---------- tokens ---------- */
:root {
  /* Colours mirror brand/palette.json; change both together. */
  --accent: #0F766E;       /* brand teal: rules, buttons, labels */
  --accent-dark: #115E59;
  --spark: #F0532F;        /* coral: chart focus colour */
  --mark: #0D9488;         /* the signum house mark and its rule */
  --accent-2: #C2410C;     /* dark coral: text-safe secondary */
  --ink: #111111;
  --grey: #4B5563;
  --rule: #E2E8F0;
  --tint: #F1F5F9;
  --relief: #D5F5EF;
  --paper: #FFFFFF;
  --wine: #3B0B1F;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --logo: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;   /* the name in the logo only */
  --ui: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;   /* menu, section headers, category labels, buttons */
  --sans: "Fira Sans Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --measure: 40rem;   /* body text column */
  --wide: 48rem;      /* charts and tables */
  --page: 72rem;      /* front page grid */
  color-scheme: light;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--serif);
       font-size: 1.0625rem; line-height: 1.5; font-optical-sizing: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: var(--page); margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- masthead ---------- */
.top-rule { padding-top: 6px; background: linear-gradient(var(--mark), var(--mark)) 0 14px / 100% 1px no-repeat; }   /* the rule (y = 0) runs through the middle of the mark */
.top-rule .signum { display: block; width: 18px; height: 16px; fill: var(--mark); }   /* the signum mark sits on it */
.masthead { border-bottom: 1px solid var(--ink); }
.mast-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
            padding-top: 1.4rem; padding-bottom: 0.9rem; }
.wordmark { white-space: nowrap; font-family: var(--serif); font-weight: 700; font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 0.9;
            letter-spacing: -0.02em; text-decoration: none; }
.wordmark { display: inline-flex; align-items: center; gap: 0.32em; }
.logo-mark { width: 0.92em; height: 0.92em; flex: none; display: block; }   /* the logo: signum badge + name */
.wordmark-text { display: block; padding-bottom: 0.06em; font-family: var(--logo); font-weight: 600; letter-spacing: -0.025em; }
.tagline { font-family: var(--sans); font-size: 1rem; color: var(--grey); margin: 0.45rem 0 0; }
.mast-actions { display: flex; gap: 0.6rem; align-items: center; }
.navbar { border-bottom: 1px solid var(--rule); }
.nav { display: flex; gap: 1.5rem; font-family: var(--sans); font-size: 1rem; padding-top: 0.6rem; padding-bottom: 0.6rem;
       overflow-x: auto; white-space: nowrap; }
.nav a { text-decoration: none; }
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
.nav .date { margin-left: auto; color: var(--grey); }

/* compact masthead used on article pages */
.masthead.compact .mast-row { align-items: center; padding-top: 0.9rem; padding-bottom: 0.9rem; }
.masthead.compact .wordmark { font-size: 1.75rem; }
.masthead.compact { border-bottom-color: var(--rule); }

/* ---------- shared components ---------- */
.btn { font-family: var(--sans); font-weight: 600; font-size: 0.95rem; padding: 0.5rem 1rem; border-radius: 2px;
       display: inline-block; text-decoration: none; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-line { border: 1px solid var(--ink); }
.btn-line:hover { border-color: var(--accent); color: var(--accent); }
.label { font-family: var(--sans); font-weight: 600; font-size: 0.95rem; color: var(--accent); text-decoration: none; }
a.label:hover { text-decoration: underline; }
.sec-h { font-family: var(--sans); font-weight: 700; font-size: 1.2rem; border-top: 3px solid var(--accent); padding-top: 0.55rem;
         margin: 0 0 1.1rem; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.sec-h a { font-weight: 500; font-size: 0.95rem; color: var(--grey); text-decoration: none; }
.sec-h a:hover { color: var(--accent); }
.status { font-family: var(--sans); font-size: 0.88rem; color: var(--grey); }
.status::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #D97706;
                  margin-right: 0.4rem; }
.status.published { color: var(--accent-2); font-weight: 600; }
.status.published::before { background: var(--accent-2); }

.signup { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.signup input { flex: 1 1 14rem; font: inherit; font-family: var(--sans); padding: 0.55rem 0.7rem; border: 1px solid var(--ink);
                border-radius: 2px; background: #fff; }
.signup button { font-family: var(--sans); font-weight: 600; font-size: 1rem; border: 0; background: var(--accent); color: #fff;
                 padding: 0.55rem 1.1rem; border-radius: 2px; cursor: pointer; }
.signup button:hover { background: var(--accent-dark); }

.signup-soon { font-family: var(--sans); font-size: 0.95rem; color: var(--grey); margin: 0; }

/* ---------- article ---------- */
.article { padding-top: 2.5rem; font-size: 1.1875rem; line-height: 1.6; }
.article-head { max-width: var(--measure); margin: 0 auto; }
.article h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(2.2rem, 5vw, 3.1rem); line-height: 1.08;
              letter-spacing: -0.015em; margin: 0.5rem 0 0.9rem; }
.standfirst { font-size: 1.35rem; line-height: 1.45; margin: 0 0 1.4rem; color: var(--ink); }
.meta { font-family: var(--sans); font-size: 0.95rem; color: var(--grey); display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem;
        padding: 0.75rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.meta a { color: var(--grey); }

.hero { max-width: var(--measure); margin: 1.8rem auto 0; }
.hero img { width: 100%; }
.hero figcaption { font-family: var(--sans); font-size: 0.85rem; line-height: 1.4; color: var(--grey); padding-top: 0.45rem; }
.hero .credit a { color: var(--grey); }
.key-numbers { max-width: var(--measure); margin: 2rem auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem;
               border-top: 3px solid var(--accent); padding-top: 0.9rem; }
.key-numbers div { font-family: var(--sans); font-size: 0.92rem; line-height: 1.35; }
.key-numbers strong { display: block; font-weight: 700; font-size: 2rem; line-height: 1.1; margin-bottom: 0.35rem; }
.key-numbers small { font-weight: 400; font-size: 1.1rem; color: var(--grey); }

/* everything inside the article body, charts and tables included, sits in the reading column */
.prose > * { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.prose p { margin-top: 0; margin-bottom: 1.15rem; }
.prose h2 { font-family: var(--sans); font-weight: 700; font-size: 1.55rem; line-height: 1.2; margin-top: 2.6rem; margin-bottom: 0.8rem; }
.prose h3 { font-family: var(--sans); font-weight: 700; font-size: 1.2rem; line-height: 1.25; margin-top: 1.9rem; margin-bottom: 0.5rem; }
/* an epigraph: verse that opens an article */
.prose .epigraph { margin-top: 0.4rem; margin-bottom: 1.8rem; padding-left: 1.1rem; border-left: 2px solid var(--accent); }
.prose .epigraph p { font-style: italic; line-height: 1.55; margin-bottom: 0.5rem; }
.prose .epigraph cite { display: block; font-family: var(--sans); font-style: normal; font-size: 0.85rem; color: var(--grey); }
.prose a { text-decoration-color: var(--accent); text-underline-offset: 3px; }
.prose a:hover { color: var(--accent); }
.prose figure { margin-top: 2rem; margin-bottom: 2rem; }
.prose figure img { width: 100%; }
.opening { font-variant: small-caps; letter-spacing: 0.03em; }
.end::after { content: ""; display: inline-block; width: 0.6em; height: 0.53em; margin-left: 0.35em; vertical-align: -0.1em;   /* end mark: the signum */
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2018%2016%22%3E%3Cg%20fill%3D%22%230D9488%22%3E%3Crect%20x%3D%220%22%20y%3D%228%22%20width%3D%228%22%20height%3D%228%22/%3E%3Crect%20x%3D%2210%22%20y%3D%220%22%20width%3D%228%22%20height%3D%228%22/%3E%3C/g%3E%3C/svg%3E") no-repeat center / 100% 100%; }

.box { background: var(--tint); border-top: 3px solid var(--accent); padding: 1.1rem 1.3rem 0.4rem; font-size: 1.02rem;
       line-height: 1.55; margin-top: 2rem; margin-bottom: 2rem; }
.box h3 { font-family: var(--sans); font-weight: 700; font-size: 1.15rem; margin: 0 0 0.5rem; color: var(--accent); }

.table-wrap { overflow-x: auto; margin-top: 1.5rem; margin-bottom: 0.5rem; }
.table-wrap table { border-collapse: collapse; width: 100%; min-width: 32rem; font-family: var(--sans); font-size: 0.98rem; }
.table-wrap caption { text-align: left; font-weight: 700; font-size: 1.2rem; padding-bottom: 0.2rem; }
.table-wrap caption span { display: block; font-weight: 400; font-size: 1rem; padding-top: 0.15rem; }
.table-wrap thead th { text-align: left; font-weight: 600; padding: 0.55rem 0.6rem; border-bottom: 2px solid var(--ink); vertical-align: bottom; }
.table-wrap tbody th { text-align: left; font-weight: 600; }
.table-wrap tbody th, .table-wrap tbody td { padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.relief-col { background: var(--relief); }
.table-note { font-family: var(--sans); font-size: 0.85rem; color: var(--grey); margin-bottom: 2rem; }

.downloads { max-width: var(--measure); margin: 2rem auto 0; display: flex; flex-wrap: wrap; gap: 0.7rem; }

.methods { max-width: var(--measure); margin: 2.5rem auto 0; border-top: 1px solid var(--ink); }
.methods summary { font-family: var(--sans); font-weight: 700; font-size: 1.25rem; padding: 0.9rem 0; cursor: pointer; }
.methods h3 { font-family: var(--sans); font-weight: 600; font-size: 1.05rem; margin: 1.3rem 0 0.3rem; }
.methods p { font-size: 1rem; line-height: 1.55; }
.methods figure { margin: 1.2rem 0; }

/* "Cite this work" */
.cite { max-width: var(--measure); margin: 2.5rem auto 0; border-top: 1px solid var(--ink); padding-top: 0.9rem; font-size: 1rem; line-height: 1.55; }
.cite h2 { font-family: var(--sans); font-weight: 700; font-size: 1.25rem; margin: 0 0 0.5rem; }
.cite h3 { font-family: var(--sans); font-weight: 600; font-size: 1.05rem; margin: 1.4rem 0 0.3rem; }
.cite-block { background: var(--tint); margin: 0.9rem 0; padding: 0.6rem 0.9rem 0.8rem; }
.cite-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--sans); font-weight: 600; font-size: 0.9rem; margin-bottom: 0.35rem; }
.cite-block p { margin: 0; font-size: 0.95rem; overflow-wrap: anywhere; }
.cite pre { margin: 0; font-size: 0.82rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.cite .copy { font-family: var(--sans); font-size: 0.82rem; border: 1px solid var(--rule); background: #fff; padding: 0.2rem 0.6rem; cursor: pointer; }
.cite .copy:hover { border-color: var(--accent); color: var(--accent); }

/* simple content pages (about, support, corrections, privacy) */
.page { max-width: var(--measure); margin: 0 auto; padding-top: 2.5rem; font-size: 1.1rem; line-height: 1.6; }
.page h1 { font-family: var(--serif); font-weight: 700; font-size: 2.4rem; line-height: 1.1; margin: 0 0 1rem; }
.page h2 { font-family: var(--sans); font-weight: 700; font-size: 1.35rem; margin-top: 2rem; }
.todo { background: #FEF3C7; border-left: 3px solid #D97706; padding: 0.6rem 0.9rem; font-family: var(--sans); font-size: 0.95rem; }

/* ---------- home ---------- */
.home a { text-decoration: none; }
.home a:hover h2, .home a:hover h3, .home a:hover h4 { color: var(--accent); }

.front { display: grid; grid-template-columns: 1fr 2.2fr 1.15fr; grid-template-areas: "left main right"; gap: 0;
         padding: 2rem 0 2.6rem; border-bottom: 1px solid var(--rule); }
.front-left { grid-area: left; padding-right: 1.5rem; }
.front-main { grid-area: main; padding: 0 1.5rem; border-left: 1px solid var(--rule); border-right: 1px solid var(--rule); }
.front-right { grid-area: right; padding-left: 1.5rem; }
.lead h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.06;
           letter-spacing: -0.015em; margin: 0.35rem 0 0.7rem; }
.lead .stand { font-size: 1.22rem; line-height: 1.45; color: var(--ink); margin: 0 0 0.8rem; }
.lead .meta-line { font-family: var(--sans); font-size: 0.95rem; color: var(--grey); }
.lead .meta-line a { text-decoration: underline; }
.lead figure { margin: 0 0 1.1rem; }
.photo-credit { font-family: var(--sans); font-size: 0.78rem; color: var(--grey); margin: 0 0 0.3rem; }
.home .photo-credit a { text-decoration: underline; color: var(--grey); }
.inside ol { list-style: none; margin: 0; padding: 0; counter-reset: col; }
.inside li { counter-increment: col; border-bottom: 1px solid var(--rule); padding: 0.85rem 0; }
.inside li:first-child { padding-top: 0; }
.inside li a { display: grid; grid-template-columns: 1.6rem 1fr; gap: 0.3rem; }
.inside li a::before { content: counter(col); font-family: var(--sans); font-weight: 700; font-size: 1.3rem; color: var(--accent); line-height: 1.2; }
.inside h4 { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; line-height: 1.25; margin: 0 0 0.2rem; }
.inside p { margin: 0; font-size: 0.93rem; color: var(--ink); line-height: 1.4; }
.mini-numbers { display: grid; grid-template-columns: 1fr; gap: 1rem 1.2rem; margin-top: 1.4rem; }
.mini-numbers div { font-family: var(--sans); font-size: 0.88rem; line-height: 1.3; color: var(--ink); }
.mini-numbers strong { display: block; font-size: 1.7rem; line-height: 1.1; color: var(--ink); }

.cotw { display: grid; grid-template-columns: 2fr 1fr; gap: 2.2rem; padding: 2.4rem 0; border-bottom: 1px solid var(--rule); }
.cotw figure { margin: 0; }
.cotw h3 { font-family: var(--serif); font-weight: 700; font-size: 1.55rem; line-height: 1.15; margin: 0.3rem 0 0.6rem; }
.cotw p { margin: 0 0 0.9rem; }
.cotw .links { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.feature { display: grid; grid-template-columns: 1fr 1.35fr; margin: 2.4rem 0; background: var(--wine); color: #F6EDEF; }
.feature-visual { padding: 2.2rem 2rem; display: flex; flex-direction: column; justify-content: space-between; min-height: 22rem;
                  background: radial-gradient(circle at 26% 82%, #7A1733 0 20%, transparent 21%),
                              radial-gradient(circle at 46% 70%, #8E1E3E 0 15%, transparent 16%),
                              radial-gradient(circle at 36% 56%, #6A1230 0 12%, transparent 13%), var(--wine); }
.feature-visual .big { font-family: var(--serif); font-weight: 700; font-size: clamp(3.6rem, 8vw, 5.6rem); line-height: 0.95; letter-spacing: -0.03em; }
.feature-visual .big-label { font-family: var(--sans); font-size: 1.05rem; line-height: 1.35; max-width: 18rem; margin-top: 0.6rem; }
.feature-text { padding: 2.2rem 2.2rem 2rem; }
.feature-text .label { color: #FF8A8A; }
.feature-text h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(1.9rem, 3.6vw, 2.5rem); line-height: 1.08; margin: 0.35rem 0 0.7rem; }
.feature-text .stand { font-size: 1.15rem; line-height: 1.5; margin: 0 0 1.2rem; color: #F1DDE2; }
.feature-text h3 { font-family: var(--sans); font-weight: 600; font-size: 1rem; margin: 0 0 0.5rem; color: #fff; }
.feature-text ul { margin: 0 0 1.2rem; padding-left: 1.1rem; font-size: 1rem; line-height: 1.5; color: #F1DDE2; }
.feature-text .status { color: #E6B8C4; display: block; margin-bottom: 1rem; }
.feature-text .btn { border: 1px solid #F6EDEF; color: #F6EDEF; }
.feature-text .btn:hover { background: #F6EDEF; color: var(--wine); }

.desks { padding: 2.4rem 0; border-bottom: 1px solid var(--rule); }
.desk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.8rem; }
.desk-h { font-family: var(--sans); font-weight: 700; font-size: 1.05rem; margin: 0 0 0.6rem; padding-bottom: 0.4rem; border-bottom: 2px solid var(--ink); }
.desk-item { padding: 0.65rem 0; border-bottom: 1px solid var(--rule); }
.desk-item h4 { font-family: var(--serif); font-weight: 700; font-size: 1.08rem; line-height: 1.25; margin: 0 0 0.25rem; }
.desk-item p { margin: 0 0 0.35rem; font-size: 0.95rem; line-height: 1.4; color: var(--ink); }

.data-desk { padding: 2.4rem 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 1fr 1.75fr; gap: 2.2rem; }
.data-desk p { margin: 0 0 0.9rem; }
.data-desk .scroll { overflow-x: auto; }
.data-desk table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 0.98rem; }
.data-desk th { text-align: left; font-weight: 600; border-bottom: 2px solid var(--ink); padding: 0.45rem 0.5rem; }
.data-desk td { border-bottom: 1px solid var(--rule); padding: 0.55rem 0.5rem; vertical-align: top; }
.data-desk td a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 2px; }
.data-desk td a:hover { color: var(--accent); }

.bands { display: grid; grid-template-columns: 1fr; margin: 2.4rem 0 0; }
.band { padding: 1.6rem 1.8rem; }
.band h3 { font-family: var(--sans); font-weight: 700; font-size: 1.3rem; margin: 0 0 0.4rem; }
.band-news { background: var(--tint); border-top: 3px solid var(--accent); }
.band-news p { margin: 0 0 1rem; }

.standards { padding: 2.4rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; }
.standards h3 { font-family: var(--sans); font-weight: 700; font-size: 1.08rem; margin: 0 0 0.35rem; }
.standards p { margin: 0; font-size: 1rem; color: var(--ink); }


/* ---------- trackers ---------- */
.tk-short { margin: 0 0 0.7rem; font-size: 0.95rem; line-height: 1.4; color: var(--ink); }
.tk-pending { font-family: var(--sans); font-size: 0.85rem; color: var(--grey); margin: 0 0 0.6rem; }
.tk-questions { list-style: none; margin: 0; padding: 0; font-family: var(--sans); }
.tk-questions li { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--rule); padding: 0.45rem 0; }
.tk-q { font-size: 0.98rem; }
.tk-p { font-weight: 700; font-size: 1.35rem; line-height: 1; color: var(--ink); }
.tk-note { font-family: var(--sans); font-size: 0.78rem; color: var(--grey); margin: 0.35rem 0 0.9rem; }
.tk-ladder { font-family: var(--sans); margin: 0 0 0.7rem; }
.tk-actor { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.25rem; }
.tk-rungs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; margin-bottom: 0.25rem; }
.tk-rungs i { display: block; height: 0.6rem; border: 1px solid var(--rule); background: #fff; }
.tk-rungs i.on { background: var(--spark); border-color: var(--spark); }
.tk-level { font-size: 0.82rem; color: var(--grey); }
.tk-links { display: flex; gap: 1rem; font-family: var(--sans); font-size: 0.9rem; margin: 0.8rem 0 0; }
.home .tk-links a, .tracker-card h3 a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule); }


/* ---------- footer ---------- */
.site-footer { margin-top: 3.5rem; background: var(--ink); color: #E2E8F0; font-family: var(--sans); }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; padding-top: 2.2rem; padding-bottom: 2.2rem; font-size: 0.95rem; }
.site-footer .wordmark { color: #fff; font-size: 1.6rem; }
.site-footer p { margin: 0.7rem 0 0; color: #94A3B8; }
.site-footer h4 { margin: 0 0 0.6rem; font-size: 1rem; color: #fff; font-weight: 600; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.35rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .front { grid-template-columns: 1fr; grid-template-areas: "main" "right" "left"; }
  .front-main { padding: 0; border: 0; }
  .front-right, .front-left { padding: 1.8rem 0 0; }
  .mini-numbers { grid-template-columns: 1fr 1fr; }
  .cotw, .data-desk, .bands, .feature { grid-template-columns: 1fr; }
  .desk-grid { grid-template-columns: 1fr 1fr; }
  .standards, .footer-inner { grid-template-columns: 1fr; }
  .feature-visual { min-height: 15rem; }
  .mast-actions .btn-line, .nav .date { display: none; }
  .key-numbers { grid-template-columns: repeat(2, 1fr); }
  .article { font-size: 1.08rem; }
  .standfirst { font-size: 1.2rem; }
}
@media (max-width: 560px) {
  .mast-row { flex-wrap: wrap; align-items: flex-start; }
  .wordmark { font-size: min(2rem, 7.6vw); }
  .tagline { font-size: 0.95rem; }
  .desk-grid { grid-template-columns: 1fr; }
}
@media print {
  .masthead, .navbar, .mast-actions, .downloads, .site-footer, .cite .copy { display: none; }
}


/* =========================================================================
   Modern layer (design/modern branch). Overrides the rules above:
   slim header, cards instead of rules, small labels, stat tiles, more space.
   ========================================================================= */
:root {
  --surface: #F1F5F9;      /* card background */
  --line: #E2E8F0;         /* hairlines inside cards */
  --radius: 14px;
  --radius-sm: 8px;
  --page: 76rem;
  --gap: 1.5rem;
}
body { font-size: 1.0625rem; }

/* header: one slim row */
.top-rule { padding-top: 4px; background-position: 0 12px; }
.top-rule .signum { width: 14px; height: 12px; }   /* rule runs through the mark's middle */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,0.94); backdrop-filter: saturate(1.4) blur(8px);
               border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 1.6rem; min-height: 4rem; }
.site-header .wordmark { font-size: 1.45rem; letter-spacing: -0.015em; }
.site-header .nav { flex: 1; gap: 1.25rem; padding: 0; font-size: 0.98rem; color: var(--ink); }
.site-header .nav a { padding: 0.35rem 0; }
.site-header .nav a:hover { color: var(--accent); }
.site-header .nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
.mast-actions .btn { padding: 0.42rem 0.95rem; }

/* buttons and labels */
.btn { border-radius: 999px; font-weight: 600; }
.btn-line { border: 1px solid var(--line); background: #fff; }
.btn-line:hover { border-color: var(--accent); color: var(--accent); }
.label { font-size: 0.88rem; letter-spacing: 0.01em; }
.sec-h { border-top: 0; padding-top: 0; margin: 0 0 1rem; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.09em;
         text-transform: uppercase; color: var(--accent); justify-content: flex-start; align-items: center; gap: 0.5rem; }
.sec-h::before { content: ""; width: 0.95em; height: 0.85em; flex: none;
                 background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2018%2016%22%3E%3Cg%20fill%3D%22%230D9488%22%3E%3Crect%20x%3D%220%22%20y%3D%228%22%20width%3D%228%22%20height%3D%228%22/%3E%3Crect%20x%3D%2210%22%20y%3D%220%22%20width%3D%228%22%20height%3D%228%22/%3E%3C/g%3E%3C/svg%3E") no-repeat center / 100% 100%; }
.sec-h a { margin-left: auto; text-transform: none; letter-spacing: 0; font-size: 0.9rem; }
.status { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; padding: 0.14rem 0.6rem 0.14rem 0.5rem;
          border-radius: 999px; background: #FEF3C7; color: #92400E; }
.status::before { margin-right: 0; width: 0.42rem; height: 0.42rem; }
.status.published { background: #FFE8E1; color: var(--accent-2); }

/* home */
.intro { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 3rem; align-items: end; padding: 2.6rem 0 2rem; }
.intro-motto { margin: 0; font-family: var(--serif); font-weight: 700; font-size: clamp(1.9rem, 3.6vw, 2.8rem);
               line-height: 1.08; letter-spacing: -0.02em; }
.intro-desc { margin: 0; font-family: var(--sans); font-size: 1.1rem; line-height: 1.45; color: var(--grey); max-width: 30rem; }
.front { gap: var(--gap); padding: 0 0 2.4rem; border-bottom: 0; grid-template-columns: 1fr 2.1fr 1.15fr; }
.front-main { border: 0; padding: 0; }
.front-left, .front-right { padding: 1.3rem 1.3rem 1.4rem; background: var(--surface); border-radius: var(--radius); align-self: start; }
.lead figure img { border-radius: 0; }
.lead h2 { font-size: clamp(1.9rem, 3.2vw, 2.55rem); margin: 0.5rem 0 0.6rem; }
.inside li { border-bottom: 1px solid var(--line); }
.inside li:last-child { border-bottom: 0; }
.mini-numbers { grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-top: 1rem; }
.mini-numbers div { background: #fff; border-radius: var(--radius-sm); padding: 0.7rem 0.8rem; }
.mini-numbers strong { font-size: 1.45rem; }
.tk-questions li { border-bottom-color: var(--line); }
.tk-rungs i { border-radius: 3px; border-color: var(--line); }

.cotw { gap: var(--gap); padding: 1.5rem; border: 0; background: var(--surface); border-radius: var(--radius); margin: 0 0 2.4rem; }
.cotw figure { background: #fff; border-radius: var(--radius-sm); padding: 0.8rem; }
.feature { border-radius: var(--radius); overflow: hidden; margin: 0 0 2.4rem; }
.feature-text .status { display: inline-flex; background: rgba(255,255,255,0.12); color: #F1DDE2; margin-bottom: 1rem; }

.desks { padding: 0 0 2.4rem; border: 0; }
.desk-grid { gap: var(--gap); }
.desk-grid > div { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem 0.6rem; }
.desk-h { border-bottom: 0; padding-bottom: 0; margin-bottom: 0.3rem; font-size: 1rem; }
.desk-item { border-bottom: 1px solid var(--line); }
.desk-item:last-child { border-bottom: 0; }

.data-desk { gap: var(--gap); padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 2.4rem; }
.data-desk th { border-bottom: 1px solid var(--ink); }
.data-desk td { border-bottom-color: var(--line); }

.bands { margin: 0; }
.band-news { border-top: 0; border-radius: var(--radius); background: var(--surface); padding: 1.8rem 2rem; }
.signup input { border: 1px solid var(--line); border-radius: 999px; padding: 0.6rem 1rem; }
.signup button { border-radius: 999px; }

.standards { gap: var(--gap); padding-top: 2.4rem; }
.standards > div { border-top: 2px solid var(--accent); padding-top: 0.8rem; }

/* article */
.article { padding-top: 3rem; }
.article-head { text-align: left; }
.meta { border: 0; padding: 0; gap: 0.5rem; }
.meta > * { background: var(--surface); border-radius: 999px; padding: 0.22rem 0.75rem; font-size: 0.88rem; text-decoration: none; }
.meta a:hover { color: var(--accent); }
.hero { margin-top: 2rem; }   /* same margins as the text */
.hero img { border-radius: 0; }
.key-numbers { border-top: 0; padding-top: 0; gap: 0.75rem; margin: 2.2rem auto; }
.key-numbers div { background: var(--surface); border-radius: var(--radius-sm); padding: 0.9rem 1rem 1rem; }
.key-numbers strong { font-size: 1.75rem; }
.prose figure img { border-radius: 0; }
.box { border-top: 0; border-radius: var(--radius); background: var(--surface); padding: 1.2rem 1.4rem 0.5rem; }
.table-wrap thead th { border-bottom: 1px solid var(--ink); }
.table-wrap tbody th, .table-wrap tbody td { border-bottom-color: var(--line); }
.downloads .btn { padding: 0.5rem 1.1rem; }
.methods { border: 1px solid var(--line); border-radius: var(--radius); padding: 0 1.3rem; }
.methods[open] { padding-bottom: 1rem; }
.cite { border-top: 0; padding-top: 0; }
.cite-block { border-radius: var(--radius-sm); background: var(--surface); }
.cite .copy { border-radius: 999px; }
.todo { border-left: 0; border-radius: var(--radius-sm); }


/* footer */
.site-footer { margin-top: 4rem; }
.footer-inner { padding-top: 2.8rem; padding-bottom: 2.8rem; }

@media (max-width: 1020px) {
  .header-row { flex-wrap: wrap; gap: 0.4rem 1rem; padding-top: 0.6rem; }
  .site-header .nav { order: 3; flex-basis: 100%; overflow-x: auto; padding-bottom: 0.45rem; }
  .mast-actions { margin-left: auto; }
}
@media (max-width: 860px) {
  .front { grid-template-columns: 1fr; }
  .intro { grid-template-columns: 1fr; padding: 1.8rem 0 1.4rem; }
  .front-left, .front-right { padding: 1.2rem; }
  .site-header { position: static; }
}
@media (max-width: 560px) {
  .site-header .wordmark { font-size: 1.25rem; }
  .mast-actions .btn-line { display: none; }
  .cotw, .data-desk { padding: 1.1rem; }
}

/* market strip on the front page (data: src/_data/markets.json) */
.markets { padding: 1.6rem 0 1.8rem; }
.markets .sec-h { margin-bottom: 0.8rem; }
.markets-note { margin-left: auto; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--grey); font-size: 0.82rem; }
.markets-row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.75rem; }
.mk a { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name name" "value change" "spark spark" "unit unit";
        gap: 0.15rem 0.5rem; align-items: baseline; padding: 0.8rem 0.9rem 0.7rem; background: var(--surface);
        border-radius: var(--radius-sm); text-decoration: none; font-family: var(--sans); color: var(--ink); height: 100%; }
.mk a:hover { box-shadow: inset 0 0 0 1px var(--line); }
.mk-name { grid-area: name; font-size: 0.86rem; color: var(--grey); }
.mk-value { grid-area: value; font-weight: 700; font-size: 1.35rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mk-change { grid-area: change; display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.86rem; font-variant-numeric: tabular-nums; }
.mk-sign { width: 0.95em; height: 0.85em; fill: var(--grey); }
.mk.up .mk-sign .sq { fill: var(--mark); }
.mk.down .mk-sign .sq { fill: var(--spark); }
.mk-spark { grid-area: spark; width: 100%; height: 1.5rem; margin-top: 0.25rem; }
.mk-spark path { fill: none; stroke: var(--ink); stroke-width: 1.4; vector-effect: non-scaling-stroke; }   /* neutral: only the signum mark carries the day's direction */
.mk-unit { grid-area: unit; font-size: 0.74rem; color: var(--grey); }
@media (max-width: 1020px) { .markets-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .markets-row { grid-template-columns: repeat(2, 1fr); } .markets-note { display: none; } }
@media (max-width: 400px) { .mk a { grid-template-columns: 1fr; grid-template-areas: "name" "value" "change" "spark" "unit"; } }

/* open data: one entry per article, linking to its folder on GitHub */
.data-desk { grid-template-columns: 1fr; }   /* a short note and one button; the data itself is on GitHub */
.data-desk p { max-width: 46rem; }
.data-desk .btn { margin-top: 0.4rem; }
.data-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; align-content: start; }
.data-list a { display: grid; gap: 0.2rem; padding: 0.9rem 1rem; background: var(--surface); border-radius: var(--radius-sm);
               text-decoration: none; font-family: var(--sans); }
.data-list a:hover { box-shadow: inset 0 0 0 1px var(--line); }
.data-folder { font-weight: 600; color: var(--accent); overflow-wrap: anywhere; }
.data-sets { font-size: 0.95rem; color: var(--ink); line-height: 1.4; }
.data-count { font-size: 0.82rem; color: var(--grey); }

/* =========================================================================
   Front page: separators instead of boxes, and a compact market strip.
   Overrides the card styles above for the home page only.
   ========================================================================= */
.home .front { gap: 0; }
.home .front-left, .home .front-right { background: none; border-radius: 0; padding: 0; }
.home .front-left { padding-right: 1.5rem; }
.home .front-main { padding: 0 1.5rem; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.home .front-right { padding-left: 1.5rem; }
.home .mini-numbers div { background: none; border-radius: 0; padding: 0.6rem 0 0; border-top: 1px solid var(--line); }
.home .cotw { background: none; border-radius: 0; padding: 2rem 0; border-top: 1px solid var(--line); margin: 0; }
.home .cotw figure { background: none; padding: 0; }
.home .desks { padding: 2rem 0; border-top: 1px solid var(--line); }
.home .desk-grid { gap: 0; }
.home .desk-grid > div { border: 0; border-radius: 0; padding: 0 1.25rem; border-left: 1px solid var(--line); }
.home .desk-grid > div:first-child { border-left: 0; padding-left: 0; }
.home .desk-grid > div:last-child { padding-right: 0; }
.home .data-desk { border: 0; border-radius: 0; padding: 2rem 0; border-top: 1px solid var(--line); margin: 0; }
.home .band-news { background: none; border-radius: 0; padding: 2rem 0; border-top: 1px solid var(--line); }
.home .standards { border-top: 1px solid var(--line); padding-top: 2rem; margin-top: 0; }

/* compact market strip: one slim row, items divided by thin rules */
.markets { padding: 0.9rem 0 1.1rem; border-bottom: 1px solid var(--line); margin-bottom: 1.6rem; }
.markets .sec-h { margin-bottom: 0.5rem; font-size: 0.72rem; }
.markets-note { font-size: 0.74rem; }
.markets-row { gap: 0; }
.mk { border-left: 1px solid var(--line); }
.mk:first-child { border-left: 0; }
.mk a { background: none; border-radius: 0; padding: 0.1rem 0.8rem; gap: 0 0.4rem;
        grid-template-columns: auto auto 1fr; grid-template-areas: "name name name" "value change spark"; align-items: center; }
.mk:first-child a { padding-left: 0; }
.mk a:hover { box-shadow: none; background: var(--surface); }
.mk-name { font-size: 0.74rem; }
.mk-value { font-size: 0.98rem; }
.mk-change { font-size: 0.74rem; gap: 0.2rem; }
.mk-sign { width: 0.8em; height: 0.72em; }
.mk-spark { height: 1rem; margin: 0; min-width: 2rem; }
.mk-unit { display: none; }        /* the unit is in each item's tooltip */
@media (max-width: 1020px) {
  .markets-row { grid-template-columns: repeat(3, 1fr); row-gap: 0.6rem; }
  .mk:nth-child(3n+1) { border-left: 0; }
  .mk:nth-child(3n+1) a { padding-left: 0; }
}
@media (max-width: 860px) {
  .home .front-left, .home .front-right { padding: 1.6rem 0 0; }
  .home .front-main { padding: 0; border: 0; }
  .home .front-right { border-top: 1px solid var(--line); margin-top: 1.6rem; }
  .home .front-left { border-top: 1px solid var(--line); margin-top: 1.6rem; }
  .home .desk-grid > div { border-left: 0; padding: 0 0 1rem; border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .markets-row { grid-template-columns: repeat(2, 1fr); }
  .mk { border-left: 0; }
  .mk:nth-child(even) { border-left: 1px solid var(--line); }
  .mk a, .mk:nth-child(3n+1) a { padding: 0.1rem 0.6rem; }
  .mk:nth-child(odd) a { padding-left: 0; }
}
@media (max-width: 400px) {
  .mk a { grid-template-columns: auto 1fr; grid-template-areas: "name name" "value change"; }
  .mk-spark { display: none; }
}

/* ---------- Iran war tracker page (src/trackers/iran-escalation.njk) ---------- */
.tw-hero { background: linear-gradient(180deg, var(--tint), var(--paper)); padding: 2.2rem 0 1.6rem; }
.tw-hero h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.02; margin: 0.4rem 0 0.6rem; letter-spacing: -0.01em; }
.tw-stand { font-size: 1.15rem; line-height: 1.45; max-width: 44rem; margin: 0 0 1rem; color: var(--ink); }
.tw-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.6rem; padding: 0; font-family: var(--sans); font-size: 0.88rem; }
.tw-chips li { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 0.25rem 0.75rem; color: var(--grey); }
.tw-chips a { color: var(--accent); font-weight: 600; text-decoration: none; }
.tw-glance { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
.tw-tile { display: flex; flex-direction: column; gap: 0.2rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
           padding: 0.9rem 1rem; text-decoration: none; font-family: var(--sans); color: var(--ink); }
.tw-tile:hover { border-color: var(--accent); }
.tw-tile-k { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--grey); }
.tw-tile-v { font-size: 2.2rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.tw-tile-v small { font-size: 0.95rem; font-weight: 600; color: var(--grey); margin-left: 0.1rem; }
.tw-tile-n { font-size: 0.88rem; color: var(--ink); line-height: 1.3; }
.tw-seg { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; margin: 0.35rem 0 0.15rem; }
.tw-seg i { height: 0.45rem; border-radius: 2px; background: var(--line); }
.tw-seg i.on { background: var(--spark); }

.tw-nav { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,0.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.tw-nav .wrap { display: flex; gap: 1.4rem; overflow-x: auto; white-space: nowrap; font-family: var(--sans); font-size: 0.95rem; padding-top: 0.65rem; padding-bottom: 0.65rem; }
.tw-nav a { text-decoration: none; color: var(--grey); }
.tw-nav a:hover { color: var(--accent); }
.tw-bg { max-width: 44rem; font-size: 1.02rem; margin: 1.6rem 0 0; color: var(--ink); }
.tw-sec { margin: 3rem 0 0; scroll-margin-top: 3.5rem; }
.tw-lede { max-width: 44rem; color: var(--ink); margin: 0 0 1.2rem; }
.tw-group { font-family: var(--sans); font-weight: 700; font-size: 1.15rem; margin: 1.6rem 0 0.8rem; }

/* forecasts */
.tw-fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 1rem; }
.tw-f { background: var(--surface); border-radius: var(--radius); padding: 1.1rem 1.2rem 1rem; display: flex; flex-direction: column; }
.tw-f-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.tw-f h4 { font-family: var(--sans); font-weight: 700; font-size: 1.08rem; margin: 0; line-height: 1.2; }
.tw-f-p { font-family: var(--sans); font-weight: 700; font-size: 2.6rem; line-height: 1; margin: 0; font-variant-numeric: tabular-nums; }
.tw-f-p small { font-size: 1.1rem; color: var(--grey); }
.tw-bar { position: relative; height: 0.7rem; margin: 0.9rem 0 0.35rem; border-radius: 999px; background: var(--paper);
          box-shadow: inset 0 0 0 1px var(--line); }
.tw-bar-range { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: #FFD0C2; }
.tw-bar-est { position: absolute; top: -0.25rem; width: 0.3rem; height: 1.2rem; margin-left: -0.15rem; border-radius: 2px; background: var(--spark); }
.tw-bar-mkt { position: absolute; top: -0.35rem; width: 0.18rem; height: 1.4rem; margin-left: -0.09rem; background: var(--mark); }
.tw-f-range { font-family: var(--sans); font-size: 0.84rem; color: var(--grey); margin: 0 0 0.7rem; }
.tw-mkt { color: var(--accent); font-weight: 600; margin-left: 0.5rem; }
.tw-mkt::before { content: ""; display: inline-block; width: 0.15rem; height: 0.8rem; background: var(--mark); margin-right: 0.3rem; vertical-align: -0.1rem; }
.tw-f-ask { font-size: 1rem; line-height: 1.4; margin: 0 0 0.5rem; }
.tw-f-why { font-size: 0.9rem; line-height: 1.45; color: var(--ink); margin: 0 0 0.6rem; }
.tw-f details { margin-top: auto; font-size: 0.92rem; }
.tw-f summary, .tw-rules summary { font-family: var(--sans); font-size: 0.9rem; color: var(--accent); cursor: pointer; }

/* ladders */
.tw-lgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.tw-lad { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.tw-lad-head { display: flex; justify-content: space-between; align-items: baseline; }
.tw-lad h3 { font-family: var(--sans); font-weight: 700; font-size: 1.15rem; margin: 0; }
.tw-lad-lvl { font-family: var(--sans); font-weight: 700; color: var(--spark); }
.tw-who { font-family: var(--sans); font-size: 0.85rem; color: var(--grey); margin: 0.3rem 0 0.7rem; line-height: 1.35; }
.tw-lad ol { list-style: none; margin: 0; padding: 0; }
.tw-lad li { border-top: 1px solid var(--line); }
.tw-lad li.now { background: #FFF1EC; border-radius: var(--radius-sm); border-top-color: transparent; }
.tw-lad summary { display: flex; align-items: center; gap: 0.65rem; padding: 0.45rem 0.3rem; cursor: pointer; list-style: none; font-family: var(--sans); }
.tw-lad summary::-webkit-details-marker { display: none; }
.tw-lad details p { margin: 0 0 0.6rem 2.45rem; font-size: 0.9rem; line-height: 1.4; color: var(--ink); }
.tw-n { flex: none; width: 1.75rem; height: 1.75rem; display: grid; place-items: center; border-radius: 6px; border: 1px solid var(--line);
        font-family: var(--sans); font-weight: 700; font-size: 0.92rem; color: var(--grey); background: var(--paper); }
li.on > details .tw-n, li.on > .tw-n { background: var(--spark); border-color: var(--spark); color: #fff; }
.tw-rung { font-size: 0.97rem; }
li.now .tw-rung { font-weight: 700; }

/* gauges */
.tw-ggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 1rem; }
.tw-g { background: var(--surface); border-radius: var(--radius); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.3rem; font-family: var(--sans); }
.tw-g-k { font-size: 0.9rem; font-weight: 600; line-height: 1.3; }
.tw-g-v { font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
.tw-g p { margin: 0; font-size: 0.85rem; line-height: 1.4; color: var(--ink); }
.tw-g-src { margin-top: auto; padding-top: 0.4rem; font-size: 0.78rem; color: var(--grey); }

/* events */
.tw-tl { list-style: none; margin: 0; padding: 0; max-width: 52rem; }
.tw-tl li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; padding: 0.85rem 0; border-top: 1px solid var(--line); }
.tw-tl time, .tw-d time { font-family: var(--sans); font-size: 0.9rem; font-weight: 600; color: var(--grey); font-variant-numeric: tabular-nums; }
.tw-tl p { margin: 0 0 0.25rem; font-size: 0.98rem; line-height: 1.45; }
.tw-tl li.logged p { color: var(--grey); }
.tw-tl-tags { display: flex; gap: 0.4rem; }
.tw-actor, .tw-rungtag { font-family: var(--sans); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.03em; padding: 0.1rem 0.5rem; border-radius: 999px; }
.tw-actor { background: var(--ink); color: #fff; }
.tw-rungtag { background: #FFE3DA; color: #9A3412; }
.tw-rungtag.muted { background: var(--tint); color: var(--grey); }
.tw-src { font-family: var(--sans); font-size: 0.82rem !important; color: var(--grey); }
.tw-src a { color: var(--grey); }
.tw-dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1rem; }
.tw-d { border: 1px dashed #CBD5E1; border-radius: var(--radius); padding: 0.9rem 1rem; }
.tw-d p { margin: 0.3rem 0 0; font-size: 0.93rem; line-height: 1.4; }
.tw-d-why { color: var(--ink); }

/* track record and rules */
.tw-fig { margin: 0 0 1.2rem; max-width: 780px; }
.tw-fig img { width: 100%; height: auto; }
.tw-findings { max-width: 48rem; padding-left: 1.1rem; }
.tw-findings li { margin-bottom: 0.5rem; }
.tw-btn { display: inline-block; font-family: var(--sans); font-weight: 600; font-size: 0.95rem; text-decoration: none; color: #fff; background: var(--accent);
          padding: 0.55rem 1rem; border-radius: 999px; }
.tw-btn:hover { background: var(--accent-dark); }
.tw-rules { max-width: 48rem; }
.tw-rules details { border-top: 1px solid var(--line); padding: 0.75rem 0; }
.tw-rules summary { font-size: 1.02rem; font-weight: 600; color: var(--ink); }
.tw-cols { columns: 2; }

@media (max-width: 1020px) { .tw-glance { grid-template-columns: repeat(2, 1fr); } .tw-lgrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) {
  .tw-glance { grid-template-columns: 1fr 1fr; }
  .tw-lgrid { grid-template-columns: 1fr; }
  .tw-tl li { grid-template-columns: 1fr; gap: 0.2rem; }
  .tw-cols { columns: 1; }
}

/* "More from Signum Average": small picture cards, divided by space rather than boxes */
.home .more { padding: 2rem 0; border-top: 1px solid var(--line); }
.more-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem 1.25rem; }
.card a { display: block; text-decoration: none; color: var(--ink); }
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 0.55rem; }
.card .label { font-size: 0.8rem; }
.card h3 { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; line-height: 1.22; margin: 0.2rem 0 0.25rem; }
.card p { margin: 0; font-size: 0.86rem; line-height: 1.38; color: var(--ink); }
.card a:hover h3 { color: var(--accent); }
.signup-frame { width: 100%; max-width: 30rem; height: 9rem; border: 0; background: transparent; }
@media (max-width: 1020px) { .more-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .more-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 400px) { .more-grid { grid-template-columns: 1fr; } }

/* "In three charts": one chart per column, divided by thin rules */
.home .charts3 { padding: 2rem 0; border-top: 1px solid var(--line); }
.charts3-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.chart-card { padding: 0 1.25rem; border-left: 1px solid var(--line); }
.chart-card:first-child { padding-left: 0; border-left: 0; }
.chart-card:last-child { padding-right: 0; }
.chart-card figure { margin: 0 0 0.7rem; aspect-ratio: 16 / 11; display: flex; align-items: center; }   /* equal slots, so captions line up */
.chart-card figure img, .chart-card figure .chart-svg { width: 100%; max-height: 100%; object-fit: contain; }
.chart-card .label { font-size: 0.8rem; }
.chart-card h3 { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; line-height: 1.2; margin: 0.2rem 0 0.35rem; }
.chart-card p { margin: 0 0 0.5rem; font-size: 0.92rem; line-height: 1.42; }
.chart-links { display: flex; gap: 1rem; font-family: var(--sans); font-size: 0.86rem; }
.home .chart-links a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.home .chart-links a:hover { color: var(--accent); }
@media (max-width: 860px) {
  .charts3-grid { grid-template-columns: 1fr; }
  .chart-card, .chart-card:first-child, .chart-card:last-child { padding: 0 0 1.4rem; margin-bottom: 1.4rem; border-left: 0; border-bottom: 1px solid var(--line); }
  .chart-card:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
  .chart-card figure { aspect-ratio: auto; }
}

/* vector charts drawn inside the page (scripts/charts_svg.py): they scale with the column and use the site's font */
figure .chart-svg { display: block; width: 100%; height: auto; }
.chart-svg text { font-family: "Fira Sans Condensed", "Arial Narrow", Arial, sans-serif; }

/* Menu, section headers, category labels and buttons share the logo's typeface (--ui).
   Other options tried are in brand/logo/menu_label_options.png. */
.site-header .nav, .sec-h, .label, .btn { font-family: var(--ui); }
.site-header .nav { font-size: 0.92rem; font-weight: 500; gap: 1.15rem; }
.sec-h { font-weight: 700; letter-spacing: 0.1em; font-size: 0.74rem; }
.markets .sec-h { font-size: 0.68rem; }
.label { font-weight: 600; font-size: 0.84rem; letter-spacing: 0; }
.card .label, .chart-card .label { font-size: 0.76rem; }
.btn { font-weight: 600; font-size: 0.88rem; }

/* Share and Save at the top of an article, and the saved-articles page */
.meta-actions { margin-left: auto; display: inline-flex; gap: 0.4rem; background: none !important; padding: 0 !important; }
.act { font-family: var(--ui); font-weight: 600; font-size: 0.82rem; padding: 0.24rem 0.8rem; border-radius: 999px; border: 1px solid var(--line);
       background: #fff; color: var(--ink); cursor: pointer; }
.act:hover { border-color: var(--accent); color: var(--accent); }
.act[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.act-note { max-width: var(--measure); margin: 0.5rem auto 0; font-family: var(--sans); font-size: 0.85rem; color: var(--grey); min-height: 1.2em; }
.article-head .act-note { margin-left: 0; }
.saved-list { list-style: none; padding: 0; margin: 1.5rem 0; }
.saved-list li { display: grid; grid-template-columns: 1fr auto; gap: 0.15rem 1rem; align-items: center; padding: 0.8rem 0; border-top: 1px solid var(--line); }
.saved-list a { font-family: var(--display, var(--serif)); font-weight: 700; font-size: 1.15rem; text-decoration: none; }
.saved-list a:hover { color: var(--accent); }
.saved-list span { grid-column: 1; font-family: var(--sans); font-size: 0.85rem; color: var(--grey); }
.saved-list .act { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 560px) { .meta-actions { margin-left: 0; } }
@media print { .meta-actions, .act-note { display: none; } }

/* legal row at the foot of every page */
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem 2rem; padding-top: 1.1rem; padding-bottom: 1.6rem;
                border-top: 1px solid rgba(255,255,255,0.14); font-size: 0.84rem; }
.footer-legal p { margin: 0; }
.footer-legal p a { text-decoration: underline; }
.footer-legal ul { display: flex; flex-wrap: wrap; gap: 0.3rem 1.3rem; }
.footer-legal li { margin: 0; }

/* tracker icons (src/_includes/partials/icons.njk) */
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; color: var(--accent); }
.tw-tile-k { display: flex; align-items: center; gap: 0.4rem; }
.tw-tile-k .ic { width: 1.1rem; height: 1.1rem; }
.tw-f h4 { display: flex; align-items: center; gap: 0.55rem; }
.tw-ic { display: inline-grid; place-items: center; flex: none; width: 2.1rem; height: 2.1rem; border-radius: 10px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.tw-ic .ic { width: 1.25rem; height: 1.25rem; vertical-align: 0; }
.tw-ic-lg { width: 2.5rem; height: 2.5rem; margin-bottom: 0.3rem; }
.tw-ic-lg .ic { width: 1.5rem; height: 1.5rem; }
.tw-lad h3 { display: flex; align-items: center; gap: 0.45rem; }
.tw-g-v { overflow-wrap: anywhere; }
.tw-g-auto { color: var(--grey) !important; border-top: 1px solid var(--line); padding-top: 0.4rem; margin-top: 0.3rem !important; }
.tw-g-src a { color: var(--grey); }

/* pictures are square-cornered everywhere */
img, figure, .chart-svg { border-radius: 0; }

/* "Want to go deeper?" request box under each article, and the contact form */
.ask { max-width: var(--measure); margin: 2.2rem auto 0; padding: 1.1rem 1.2rem 1.2rem; border-top: 3px solid var(--mark); background: var(--surface); font-family: var(--sans); }
.ask h2 { font-family: var(--sans); font-weight: 700; font-size: 1.1rem; margin: 0 0 0.3rem; }
.ask > p { margin: 0 0 0.8rem; font-size: 0.95rem; line-height: 1.45; }
.cform { display: grid; gap: 0.7rem; max-width: 34rem; font-family: var(--sans); }
.cform-row { display: grid; gap: 0.25rem; }
.cform label { font-size: 0.88rem; font-weight: 600; }
.cform .opt { font-weight: 400; color: var(--grey); }
.cform input, .cform select, .cform textarea { font: inherit; font-family: var(--sans); font-size: 0.98rem; padding: 0.5rem 0.65rem; border: 1px solid #94A3B8; border-radius: 4px; background: #fff; color: var(--ink); width: 100%; }
.cform textarea { resize: vertical; }
.cform input:focus-visible, .cform select:focus-visible, .cform textarea:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 1px; }
.cform button { justify-self: start; border: 0; cursor: pointer; font-size: 0.98rem; }
.cform-note { margin: 0; font-size: 0.82rem; color: var(--grey); }
.cform-note a { color: var(--grey); }
.cform-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-alt { font-family: var(--sans); font-size: 0.95rem; color: var(--grey); margin-top: 1.2rem; }

/* corrections list, "opening soon" box, page-not-found */
.corr-list { list-style: none; padding: 0; margin: 1.4rem 0 0; }
.corr-list li { border-top: 1px solid var(--line); padding: 0.9rem 0; }
.corr-list a { font-weight: 700; }
.corr-list p { margin: 0.3rem 0 0; }
.corr-date { font-family: var(--sans); font-size: 0.88rem; color: var(--grey); margin-right: 0.6rem; font-variant-numeric: tabular-nums; }
.soon { border: 1px dashed #94A3B8; padding: 1rem 1.2rem; margin: 1.2rem 0; font-family: var(--sans); }
.soon p { margin: 0.3rem 0 0; }
.notfound ul { padding-left: 1.1rem; }
.notfound .nf-desk { font-family: var(--sans); font-size: 0.82rem; color: var(--grey); margin-left: 0.4rem; }

/* desk pages (src/desk.njk) */
.desk-head { padding: 2rem 0 1.2rem; max-width: var(--wide); }
.desk-head h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.05; margin: 0.3rem 0 0.6rem; }
.desk-page .more { margin-top: 1.6rem; }
.desk-trackers { margin-top: 1.2rem; }
.desk-tracker { display: block; max-width: var(--wide); padding: 1rem 1.2rem; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.desk-tracker:hover { border-color: var(--accent); }
.desk-tracker h3 { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; margin: 0.2rem 0 0.3rem; }
.desk-tracker p { margin: 0; font-size: 0.95rem; color: #334155; }
.desk-empty { font-family: var(--sans); color: var(--grey); margin: 0 0 1.6rem; }

/* Article furniture: a large first letter, and the logo badge as the end mark */
.prose p:has(> .opening:first-child)::first-letter {
  float: left; font-family: var(--serif); font-weight: 700; font-size: 3.55em; line-height: 0.8;
  padding: 0.07em 0.1em 0 0; color: var(--ink); font-variant: normal; letter-spacing: 0;
}
.end::after { content: ""; display: inline-block; width: 0.68em; height: 0.68em; margin-left: 0.4em; vertical-align: -0.04em;
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2064%2064%22%3E%3Crect%20width%3D%2264%22%20height%3D%2264%22%20fill%3D%22%230D9488%22/%3E%3Cg%20fill%3D%22%23fff%22%3E%3Crect%20x%3D%228%22%20y%3D%2231%22%20width%3D%2248%22%20height%3D%222%22/%3E%3Crect%20x%3D%2212%22%20y%3D%2233%22%20width%3D%2216%22%20height%3D%2216%22/%3E%3Crect%20x%3D%2236%22%20y%3D%2215%22%20width%3D%2216%22%20height%3D%2216%22/%3E%3C/g%3E%3C/svg%3E") no-repeat center / 100% 100%; }
@media print { .prose p:has(> .opening:first-child)::first-letter { float: none; font-size: inherit; padding: 0; } }

/* which way a forecast moved at its last revision (src/_data/forecastMoves.js) */
.tw-move { display: flex; align-items: center; gap: 0.3rem; margin: 0 0 0.15rem; font-family: var(--sans); font-size: 0.84rem; font-weight: 600; color: var(--ink); }
.tw-move .ic { width: 1.05rem; height: 1.05rem; color: var(--ink); stroke-width: 2.2; }
.tw-move-same { color: var(--grey); font-weight: 400; }
.tw-move-same .ic { color: var(--grey); }
.tk-move { display: inline-flex; margin-right: 0.3rem; vertical-align: 0.05em; }
.tk-move .ic { width: 0.95rem; height: 0.95rem; color: var(--grey); stroke-width: 2.2; }

/* Front page: two columns. What the lead story found sits under it, three across; the tracker has a picture */
.home .front.front-two { grid-template-columns: 2.2fr 1fr; grid-template-areas: "main right"; }
.home .front-two .front-main { padding: 0 1.75rem 0 0; border-left: 0; }
.home .front-two .front-right { padding-left: 1.75rem; }
.found { margin-top: 1.5rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.found ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); counter-reset: found; }
.found li { counter-increment: found; padding: 0 1.1rem; border-left: 1px solid var(--line); }
.found li:first-child { padding-left: 0; border-left: 0; }
.found li:last-child { padding-right: 0; }
.found li a { display: block; }
.found li a::before { content: counter(found); display: block; font-family: var(--ui); font-weight: 600; font-size: 0.85rem; color: var(--accent); margin-bottom: 0.25rem; }
.found h4 { font-family: var(--serif); font-weight: 700; font-size: 1.08rem; line-height: 1.25; margin: 0 0 0.25rem; }
.found p { margin: 0; font-size: 0.95rem; line-height: 1.4; color: var(--ink); }
.tk-photo { display: block; margin: 0 0 0.3rem; }
.tk-photo img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.tracker-card .photo-credit { margin-bottom: 0.7rem; }
@media (max-width: 860px) {
  .home .front.front-two { grid-template-columns: 1fr; grid-template-areas: "main" "right"; }
  .home .front-two .front-main { padding: 0; }
  .home .front-two .front-right { padding: 1.6rem 0 0; }
}
@media (max-width: 560px) {
  .found ol { grid-template-columns: 1fr; }
  .found li { padding: 0.75rem 0; border-left: 0; border-top: 1px solid var(--line); }
  .found li:first-child { padding-top: 0; border-top: 0; }
}

/* Cards: reading time under each entry */
.card-read { display: block; margin-top: 0.45rem; font-family: var(--sans); font-size: 0.8rem; color: var(--grey); }
