/* Acta Diurna: phones first, then a newspaper grid on wide screens. Minimalist Roman. */
@font-face {font-family: 'Cinzel'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/cinzel.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: 'Cinzel'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/cinzel.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: 'EB Garamond'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/ebgaramond.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: 'EB Garamond'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/ebgaramond.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: 'Source Serif 4'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/sourceserif4.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: 'Source Serif 4'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/sourceserif4.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;}
:root {
  --ink: #1c1917;
  --muted: #5c5650;
  --paper: #fbf9f4;
  --line: #e2dbcf;
  --accent: #5b1f2e;   /* deep oxblood */
  --gold: #a88a4a;     /* decorative only, never text */
  --up: #2f6b4f;
  --down: #9b2f3f;
  --tap: rgba(91, 31, 46, .06);
  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --head: "EB Garamond", Garamond, Georgia, serif;
  --body: "Source Serif 4", Georgia, serif;
  --pad: max(1.1rem, env(safe-area-inset-left));
  --wide: 80rem;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #ece7de; --muted: #b0a89d; --paper: #151312; --line: #322d29; --accent: #e3a7b2; --gold: #8c7440;
    --up: #7fc39f; --down: #e48b98; --tap: rgba(227, 167, 178, .08); }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 3.5rem; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.55 var(--body);
  font-optical-sizing: auto; text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: env(safe-area-inset-bottom);
}
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:focus-visible, summary:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .6rem 1rem; z-index: 9; }
.skip:focus { left: 0; }

/* Horizontal strips (markets, stocks, sections): swipeable, with a fade hinting there is more */
.rail { position: relative; }
.strip { display: flex; list-style: none; margin: 0 auto; padding: 0 var(--pad); max-width: var(--wide);
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity; scroll-padding-inline: var(--pad);
  -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
          mask-image: linear-gradient(to right, #000 85%, transparent); }
.strip::-webkit-scrollbar { display: none; }
.strip > li { flex: none; scroll-snap-align: start; }
.strip.at-end { -webkit-mask-image: none; mask-image: none; }
.pager { display: none; }
@media (hover: hover) and (pointer: fine) {
  .rail.overflows .pager { display: flex; align-items: center; justify-content: center; position: absolute; top: 50%; z-index: 2;
    width: 2rem; height: 2rem; margin-top: -1rem; border: 1px solid var(--line); border-radius: 50%;
    background: var(--paper); color: var(--ink); font: 1.1rem/1 var(--head); cursor: pointer; opacity: .92; }
  .pager.prev { left: .5rem; } .pager.next { right: .5rem; }
  .rail.overflows .pager[disabled] { opacity: 0; pointer-events: none; }
}

/* Market strip */
.markets { border-bottom: 1px solid var(--line); }
.markets li + li { border-left: 1px solid var(--line); }
.markets li:last-child { padding-right: 3rem; }
.markets a { display: flex; flex-direction: column; gap: .15rem; width: 11rem; height: 100%; padding: .6rem .8rem .55rem 0; margin-left: .8rem; min-height: 44px; }
.markets li:first-child a { margin-left: 0; }
.markets a:active { background: var(--tap); }
.mk-src { display: flex; justify-content: space-between; font: 500 .56rem/1 var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.mk-src .d { letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.mk-q { font: 600 .9rem/1.2 var(--head); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mk-o { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-o b, .mk-props b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.mk-props { display: flex; flex-wrap: wrap; gap: 0 .5rem; font-size: .72rem; color: var(--muted); }
.markets li:has(.mk-props) a { width: 13.5rem; }
.spk { display: block; width: 100%; height: 1.4rem; margin-top: auto; overflow: visible; }
.spk polyline { fill: none; stroke: var(--muted); stroke-width: 1.4; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.spk line { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 2; vector-effect: non-scaling-stroke; }
.markets .spk polyline { stroke: var(--accent); }

/* Stock strip */
.stocks { border-bottom: 1px solid var(--line); }
.stocks li + li { border-left: 1px solid var(--line); }
.stocks li:last-child { padding-right: 3rem; }
.bands .label { display: flex; flex-direction: column; justify-content: center; padding: .45rem .9rem .45rem 0;
  font: 500 .56rem/1.5 var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.bands .label i { font-style: normal; letter-spacing: .08em; }
.stocks a { display: grid; grid-template-columns: auto 3.4rem; grid-template-rows: auto auto; column-gap: .55rem; align-items: center;
  padding: .45rem .75rem; min-height: 44px; }
.stocks a:active { background: var(--tap); }
.sk-sym { font: 600 .78rem/1.1 var(--body); letter-spacing: .02em; }
.sk-px { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sk-px b { font-weight: 600; }
.stocks .spk { grid-column: 2; grid-row: 1 / span 2; height: 1.6rem; margin: 0; }
.up { color: var(--up); } .down { color: var(--down); }
.stocks .spk.up polyline { stroke: var(--up); } .stocks .spk.down polyline { stroke: var(--down); }

/* Masthead */
.masthead { text-align: center; padding: 1.4rem 0 0; }
.dateline { margin: 0; font: 500 .66rem/1 var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.title { margin: .5rem 0 .15rem; font: 700 clamp(1.8rem, 9.2vw, 4.4rem)/1 var(--display); letter-spacing: .12em; white-space: nowrap; }
.title a { padding-left: .12em; }
.city { margin: .3rem 0 .9rem; font: 500 clamp(.74rem, 1.2vw, .95rem)/1 var(--display); letter-spacing: .42em; padding-left: .42em; text-transform: uppercase; color: var(--accent); }
.rule { border-top: 1px solid var(--gold); margin: 0 auto; max-width: calc(var(--wide) - 2 * var(--pad)); width: calc(100% - 2 * var(--pad)); }

/* Markets, stocks and sections stay pinned to the top. Scrolling down tucks the two
   market bands away and leaves the section bar; scrolling up brings them back. */
.top { position: sticky; top: 0; z-index: 5; background: var(--paper); padding-top: env(safe-area-inset-top);
  transition: transform .25s ease; }
.top.tuck { transform: translateY(var(--tuck, 0)); }
.markets .label { display: none; }
.markets .label + li { border-left: 0; } .markets .label + li a { margin-left: 0; }

/* Section nav: swipeable */
nav { background: var(--paper); border-bottom: 1px solid var(--line); }
nav a { display: flex; align-items: center; height: 46px; padding: 0 .7rem;
  font: 500 .7rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
nav li:first-child a { padding-left: 0; }
nav li:last-child { padding-right: 2.5rem; }
nav a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -2px var(--accent); }

/* Page column */
main { max-width: var(--wide); margin: 0 auto; padding: 0 var(--pad) 1.5rem; }

/* Stories: the whole card opens the article */
.story { position: relative; padding: 1.1rem 0 1rem; border-bottom: 1px solid var(--line); min-width: 0; }
.story:active { background: var(--tap); }
.kicker { margin: 0 0 .35rem; font: 500 .62rem/1.2 var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.kicker .when { color: var(--muted); letter-spacing: .1em; }
.kicker .dev { display: inline-block; margin-right: .45rem; padding: .12rem .35rem .08rem; border: 1px solid currentColor; border-radius: 2px; font-weight: 700; }
.story h3 { margin: 0; font: 600 1.3rem/1.2 var(--head); text-wrap: balance; }
.story h3 a::after { content: ""; position: absolute; inset: 0; }
.summary { margin: .4rem 0 0; font-size: 1rem; line-height: 1.5; text-wrap: pretty; }

/* Outlet list sits above the card link */
.outlets { position: relative; z-index: 1; margin: .55rem 0 0; font-size: .8rem; color: var(--muted); }
.outlets b { font-weight: 600; color: var(--ink); }
.outlets summary { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .3em; min-height: 36px; cursor: pointer; list-style: none; }
.outlets summary::-webkit-details-marker { display: none; }
.outlets .n { border: 1px solid var(--line); border-radius: 99px; padding: .1rem .5rem; font-size: .72rem; }
.outlets summary::after { content: ""; width: .4rem; height: .4rem; border: solid var(--muted); border-width: 0 1px 1px 0;
  transform: rotate(45deg) translateY(-2px); margin-left: .1rem; transition: transform .15s; }
.outlets[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.outlets ul { list-style: none; margin: .25rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.outlets li a { display: block; padding: .6rem 0; border-bottom: 1px solid var(--line); min-height: 44px; }
.outlets li a:active { background: var(--tap); }
.outlets li i { font-style: normal; font: 500 .55rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase;
  border: 1px solid var(--line); padding: .15rem .3rem; border-radius: 2px; vertical-align: 1px; }
.outlets li span { display: block; margin-top: .1rem; font: 500 .95rem/1.3 var(--head); color: var(--ink); }
.outlets.single { min-height: 36px; display: flex; align-items: center; gap: .3em; margin-top: .35rem; }

/* Photos: the lead runs edge to edge on phones; other stories get a square beside the headline */
.story img { display: block; background: var(--line); color: transparent; }
.story.pic:not(.lead) { display: grid; grid-template-columns: minmax(0, 1fr) 5.75rem; column-gap: .9rem; }
.story.pic:not(.lead) > * { grid-column: 1 / -1; }
.story.pic:not(.lead) > .kicker { grid-column: 1; grid-row: 1; }
.story.pic:not(.lead) > h3 { grid-column: 1; grid-row: 2; }
.story.pic:not(.lead) > .thumb { grid-column: 2; grid-row: 1 / span 2; align-self: start; width: 5.75rem; height: auto; aspect-ratio: 1; object-fit: cover; margin-top: .1rem; }
.lead { padding-top: 1.35rem; }
.lead .ph { width: calc(100% + 2 * var(--pad)); max-width: none; height: auto; margin: 0 calc(-1 * var(--pad)); aspect-ratio: 3 / 2; object-fit: cover; }
.lead h3 { font-size: clamp(1.6rem, 7.4vw, 2.2rem); line-height: 1.12; }
.lead .summary { font-size: 1.05rem; }
.credit { margin: .35rem 0 .9rem; font: 500 .56rem/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); text-align: right; }

/* Section headers: small caps between gold rules */
.section h2, .aside h2, .prose h2 {
  display: flex; align-items: center; gap: .8rem; margin: 2rem 0 0;
  font: 700 .78rem/1 var(--display); letter-spacing: .24em; text-transform: uppercase; color: var(--ink);
}
.section h2::before, .section h2::after, .aside h2::before, .aside h2::after, .prose h2::before, .prose h2::after {
  content: ""; flex: 1; border-top: 1px solid var(--gold);
}
.section h2 a { display: inline-flex; align-items: center; min-height: 44px; }

/* Asides */
.aside ul { list-style: none; margin: 0; padding: 0; }
.aside li a { display: block; padding: .75rem 0; border-bottom: 1px solid var(--line); font: 500 1.05rem/1.3 var(--head); min-height: 44px; }
.aside li a:active { background: var(--tap); }
.aside li .meta { display: block; margin-top: .2rem; font: .78rem/1.3 var(--body); color: var(--muted); }
.note { margin: .25rem 0 .25rem; font-size: .82rem; color: var(--muted); text-align: center; font-style: italic; }
.center { text-align: center; }

/* Prose pages */
.prose { max-width: 42rem; margin: 0 auto; }
.prose h3 { margin: 1.5rem 0 .3rem; font: 600 1.2rem/1.3 var(--head); }
.prose p, .prose li { margin: .5rem 0; }
.prose code { font-size: .88em; background: var(--tap); padding: .05rem .3rem; border-radius: 2px; overflow-wrap: anywhere; }
table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: .88rem; }
th, td { text-align: left; padding: .6rem .25rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 500 .64rem/1.2 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

footer { text-align: center; padding: 0 var(--pad) 2rem; font-size: .8rem; color: var(--muted); }
footer .rule { margin: 0 auto 1.25rem; width: 100%; }
footer p { margin: .35rem auto; max-width: 42rem; }
footer a { display: inline-block; padding: .5rem .25rem; text-decoration: underline; text-underline-offset: 3px; }
.motto { margin: 0 0 .5rem; font: 500 .64rem/1.4 var(--display); letter-spacing: .32em; text-transform: uppercase; color: var(--accent); }

/* ---- Half screen and tablets: two columns, photos above the headline ---- */
@media (min-width: 40rem) {
  .grid, .front .side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; align-items: start; }
  .grid .story.pic:not(.lead), .front .side .story.pic { display: block; }
  .grid .story.pic:not(.lead) > .thumb, .front .side .story.pic:not(.lead) > .thumb { width: 100%; aspect-ratio: 3 / 2; margin: 0 0 .75rem; }
  .lead .ph { width: 100%; margin: 0; }
  .front .lead { display: flex; flex-direction: column; }
  .front .lead > .kicker { order: 1; } .front .lead > h3 { order: 2; margin-bottom: .9rem; }
  .front .lead > .ph { order: 3; aspect-ratio: 2 / 1; } .front .lead > .credit { order: 4; }
  .front .lead > .summary { order: 5; margin-top: 0; } .front .lead > .outlets { order: 6; }
  .lead h3 { font-size: clamp(2rem, 4.2vw, 2.9rem); }
  .lead .summary { font-size: 1.12rem; max-width: 46rem; }
  .asides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; align-items: start; }
  .masthead { padding-top: 1.75rem; }
}

/* ---- Full screen: lead plus a side column, then three-column sections ---- */
@media (min-width: 64rem) {
  body { font-size: 1.125rem; }
  .masthead { padding-top: 2.25rem; }
  .city { margin-bottom: 1.2rem; }
  .strip { scroll-padding-inline: 0; }
  nav .strip { justify-content: safe center; -webkit-mask-image: none; mask-image: none; }
  nav li:last-child { padding-right: 0; }
  nav li:first-child a { padding-left: .7rem; }
  .front { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); column-gap: 2.5rem; align-items: start; }
  .front .side { display: block; border-left: 1px solid var(--line); padding-left: 2.5rem; margin-top: 1.35rem; }
  .front .side .story.pic { display: grid; }
  .front .side .story.pic:not(.lead) > .thumb { width: 5.75rem; aspect-ratio: 1; margin: .1rem 0 0; }
  .front .side .story:first-child { padding-top: 0; }
  .front .side .story:not(.lead) h3 { font-size: 1.2rem; }
  .front .side .summary { font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .front .lead { border-bottom: 0; }
  .front .lead > .ph { aspect-ratio: 16 / 9; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 2.5rem; }
  .grid.more { border-top: 1px solid var(--line); }
  .story:not(.lead) h3 { font-size: 1.4rem; }
  .story:active { background: none; }
  .story h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
  .section h2, .aside h2 { margin-top: 2.75rem; }
}
@media (min-width: 64rem) and (max-width: 79.99rem) {
  .front .side .story.pic:not(.lead) { grid-template-columns: minmax(0, 1fr) 4.75rem; }
  .front .side .story.pic:not(.lead) > .thumb { width: 4.75rem; }
}
@media (min-width: 96rem) {
  :root { --wide: 88rem; }
  .lead h3 { font-size: 3.2rem; }
}
/* ---- Wide desktop: markets feed on the left, stocks on the right, news in the middle ---- */
@media (min-width: 88rem) {
  body { padding-left: 17rem; padding-right: 14.5rem; }
  .top { padding-top: 0; }
  .bands .rail { position: fixed; top: 0; bottom: 0; z-index: 6; overflow-y: auto; background: var(--paper);
    overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; border-bottom: 0; }
  .markets { left: 0; width: 17rem; border-right: 1px solid var(--line); }
  .stocks { right: 0; width: 14.5rem; border-left: 1px solid var(--line); }
  .bands .strip { flex-direction: column; overflow: visible; max-width: none; padding: 0 1.25rem 1.5rem;
    -webkit-mask-image: none; mask-image: none; }
  .bands .rail .pager { display: none; }
  .bands li + li { border-left: 0; border-top: 1px solid var(--line); }
  .bands li:last-child { padding-right: 0; }
  .bands .label { display: flex; position: sticky; top: 0; z-index: 1; height: 46px; margin: 0 -1.25rem; padding: 0 1.25rem;
    background: var(--paper); border-bottom: 1px solid var(--line); }
  .bands .label + li { border-top: 0; }
  .markets a, .markets li:has(.mk-props) a { width: auto; margin: 0; padding: .9rem 0 .8rem; gap: .25rem; }
  .mk-q { font-size: 1rem; -webkit-line-clamp: 3; }
  .mk-o { font-size: .85rem; } .mk-props { font-size: .8rem; }
  .markets .spk { height: 2rem; margin-top: .35rem; }
  .stocks a { grid-template-columns: minmax(0, 1fr) 4.5rem; padding: .6rem 0; }
  .sk-sym { font-size: .85rem; } .sk-px { font-size: .8rem; }
  .stocks .spk { height: 1.8rem; }
}
@media (hover: hover) {
  .markets a:hover .mk-q, .stocks a:hover .sk-sym, .aside li a:hover, .outlets li a:hover span { color: var(--accent); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
