/*
  Atlantiz Uudised: the news pages' styles, on top of site.css (the tokens, the
  night band, the brand, the signup form, the seat rows). Copied to
  site/assets/news.css by npm run news:build.
  The content rows follow a news portal's front page (the owner's choice,
  2026-10-26): two lead stories side by side, then rows of four and three
  photo cards with bold headlines. The branding stays Atlantiz's: the navy
  masthead, cream paper, Geist. Readers 40–70 on phones: 20 px text, high
  contrast, one column on a phone.
*/

/* The masthead (the owner, 2026-10-31): on a phone one line, the brand, the
   letter and the menu button (the sections had wrapped to three lines, 187 px
   of a 647 px screen); wide screens show the sections in the line instead of
   the menu. The menu is a <details>; its panel opens over the page below the line. */
.news-nav { position: relative; background: var(--night); color: var(--paper); }
.news-nav .wrap { display: flex; align-items: center; gap: 0.75rem; padding-top: 0.55rem; padding-bottom: 0.55rem; }
.news-nav a { color: var(--paper); text-decoration: none; font-weight: 500; }
.news-nav a:visited { color: var(--paper); }
.news-nav .brand { flex: none; margin-right: auto; font-size: 1.6rem; padding: 0.3rem 0; }
.news-nav__sections { display: none; margin: 0; padding: 0; list-style: none; font-size: 1.05rem; }
.news-nav__sections a { display: block; padding: 0.35rem 0; }
.news-nav__sections a.is-current { color: var(--sky); border-bottom: 2px solid var(--sky); }
.news-nav__letter { flex: none; font-size: 0.98rem; line-height: 1; padding: 0.55rem 0.9rem; border: 1px solid rgba(244, 239, 230, 0.45); border-radius: 999px; }
.news-nav__letter:hover { border-color: var(--paper); }

.news-menu { flex: none; }
.news-menu__button { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; margin-right: -0.4rem; border-radius: 10px; cursor: pointer; list-style: none; color: var(--paper); }
.news-menu__button::-webkit-details-marker { display: none; }
.news-menu[open] .news-menu__button { background: rgba(244, 239, 230, 0.12); }
.news-menu__icon { width: 1.6rem; height: 1.6rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.news-menu__cross, .news-menu[open] .news-menu__bars { display: none; }
.news-menu[open] .news-menu__cross { display: inline; }
.news-menu__panel { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; max-height: calc(100vh - 3.5rem); max-height: calc(100dvh - 3.5rem); overflow-y: auto; padding: 0.2rem 1.25rem 1.25rem; background: var(--night); border-top: 1px solid rgba(244, 239, 230, 0.14); box-shadow: 0 18px 32px rgba(14, 27, 46, 0.35); }
.news-menu__links { max-width: 75rem; margin: 0 auto; padding: 0; list-style: none; }
.news-menu__links a { display: block; padding: 0.62rem 0; font-size: 1.15rem; border-bottom: 1px solid rgba(244, 239, 230, 0.12); }
.news-menu__links a.news-menu__latest { font-weight: 650; }
.news-menu__links a.is-current { color: var(--sky); }
.news-nav a.news-menu__letter, .news-nav a.news-menu__letter:visited { display: block; max-width: 75rem; margin: 1rem auto 0; padding: 0.8rem 1rem; text-align: center; font-size: 1.1rem; font-weight: 650; color: var(--night); background: var(--paper); border-radius: 10px; }

@media (min-width: 64em) {
  .news-nav .wrap { gap: 1.25rem; padding-top: 0.85rem; padding-bottom: 0.85rem; }
  .news-nav .brand { margin-right: 0.75rem; font-size: 1.85rem; }
  .news-nav__sections { display: flex; flex-wrap: wrap; gap: 0 1.1rem; }
  .news-nav__letter { margin-left: auto; }
  .news-menu { display: none; }
}

.news-main { padding: 1.25rem 0 3rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Day headings ---------- */

.day-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1rem; margin: 2.25rem 0 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--night); }
.day-head--first { margin-top: 0.25rem; }
.day-head h1, .day-head h2 { margin: 0; font-size: 1.25rem; letter-spacing: -0.02em; font-weight: 650; }
.day-head h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.1rem); }
.day-head a { color: var(--ink); text-decoration: none; }
.day-head a:hover { text-decoration: underline; }
.day-counts { margin: 0; font-size: 1rem; color: var(--ink-2); }

/* ---------- The grid: leads, then rows of four and three ---------- */

.grid { display: grid; gap: 1.5rem 1.5rem; grid-template-columns: 1fr; margin: 0 0 2rem; }
.grid:last-child { margin-bottom: 0; }
@media (min-width: 40em) { .grid--leads, .grid--3, .grid--4 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 64em) { .grid--3 { grid-template-columns: repeat(3, 1fr); } .grid--4 { grid-template-columns: repeat(4, 1fr); } }
.grid--leads.grid--one { grid-template-columns: 1fr; }
.grid--leads { gap: 2rem 1.75rem; }

.story { display: flex; flex-direction: column; gap: 0.6rem; min-width: 0; }
.story__picture { display: block; }
/* height: auto beats the img height attribute, so the box follows the 16:9 ratio instead of a fixed 675 px */
.story__picture img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: var(--night); }
.story__headline { margin: 0; font-size: 1.3rem; line-height: 1.2; letter-spacing: -0.02em; font-weight: 650; text-wrap: balance; }
.story__headline a { color: var(--ink); text-decoration: none; }
.story__headline a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.story--lead .story__headline { font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2rem); line-height: 1.12; }
.story__sub { margin: 0; color: var(--ink-2); font-size: 1.1rem; line-height: 1.45; }
.story__meta { margin: 0; display: flex; gap: 0.6rem; align-items: baseline; font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--navy-2); }
.story__meta a { text-decoration: none; }
.story__meta time { color: var(--ink-2); letter-spacing: 0.04em; }

.days { list-style: none; margin: 0; padding: 0; }
.days li { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--hair); font-size: 1.1rem; }
.days li span { color: var(--ink-2); font-size: 1rem; }

/* ---------- Article ---------- */

/* The article, its previous/next links and the signup box in one centred reading column */
.article-column { max-width: 46rem; margin: 0 auto; }
.article__meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; margin: 0.25rem 0 0.75rem; font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--navy-2); }
.article__meta a { text-decoration: none; }
.article__meta time { color: var(--ink-2); letter-spacing: 0.04em; text-transform: none; font-family: var(--sans); font-size: 1rem; }
.article h1 { margin: 0 0 1rem; font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.8rem); line-height: 1.08; letter-spacing: -0.035em; font-weight: 650; }
.article__lead { font-size: 1.3rem; line-height: 1.45; margin: 0 0 1.25rem; font-weight: 500; }
.article__figure { margin: 0 0 1.25rem; }
.article__figure img { width: 100%; height: auto; border-radius: 10px; aspect-ratio: 16 / 9; object-fit: cover; background: var(--night); }
.article__figure figcaption { margin-top: 0.4rem; font-size: 0.95rem; color: var(--ink-2); }
.article__body p { margin: 0 0 1rem; }

.box { background: var(--card); border: 1px solid var(--hair); border-left: 5px solid var(--sky); border-radius: 10px; padding: 1rem 1.1rem; margin: 1.25rem 0; }
.box h2 { margin: 0 0 0.5rem; font-size: 1.1rem; letter-spacing: 0.02em; }
.box ul { margin: 0; padding-left: 1.2rem; }
.box li { margin: 0.25rem 0; }
.box--next { border-left-color: var(--navy-2); }
.box--sources { border-left-color: var(--mist); font-size: 1rem; }
.box--sources a { word-break: break-word; }

.facts { margin: 1.5rem 0; }
.facts h2 { font-size: 1.25rem; margin: 0 0 0.5rem; }
.vote { background: var(--card); border: 1px solid var(--hair); border-radius: 10px; padding: 1rem 1.1rem; margin: 0 0 1rem; }
.vote__title { margin: 0 0 0.3rem; font-weight: 650; }
.vote__result { margin: 0 0 0.6rem; }
.vote__result b.is-for { color: var(--for); }
.vote__result b.is-against { color: var(--against-text); }
.vote .seats { margin: 0.4rem 0 0.8rem; }
.vote .faction { margin: 0.6rem 0 0; }
.vote__link { font-size: 0.95rem; }

.people { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; padding: 0; list-style: none; }
.people li { background: var(--mist); color: var(--night); border-radius: 999px; padding: 0.25rem 0.8rem; font-size: 0.95rem; }

.clips { margin: 1.5rem 0; }
.clips h2 { font-size: 1.25rem; margin: 0 0 0.5rem; }
.clip { display: block; background: var(--night); color: var(--paper); border-radius: 10px; padding: 1rem 1.1rem; margin: 0 0 0.75rem; text-decoration: none; }
.clip:visited { color: var(--paper); }
.clip:hover { background: var(--navy); }
.clip__label { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sky); display: block; margin-bottom: 0.3rem; }
.clip p { margin: 0; font-size: 1rem; line-height: 1.4; }

.signup-box { background: var(--night); color: var(--paper); border-radius: 14px; padding: 1.25rem 1.25rem 1rem; margin: 2.5rem 0 0; }
.signup-box h2 { margin: 0 0 0.3rem; font-size: 1.4rem; letter-spacing: -0.02em; }
.signup-box p { margin: 0 0 0.9rem; color: var(--light); font-size: 1.05rem; }
.signup-box .signup { max-width: 30rem; }

/* ---------- Varasemad uudised: the next week below, on the reader's click ---------- */

.more { margin: 2.5rem 0 0; }
.more__button, a.more__button, a.more__button:visited { max-width: 22rem; margin: 0 auto; color: var(--navy); background: var(--card); border: 2px solid var(--navy); }
.more__button:hover { background: var(--paper); }
.more__button[aria-busy="true"] { opacity: 0.75; cursor: progress; }
.more__arrow { margin-left: 0.5rem; }

.paging { display: flex; justify-content: space-between; gap: 1rem; margin: 2rem 0 0; font-size: 1.05rem; }

.news-footer .wrap { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.news-footer p { margin: 0.25rem 0; font-size: 0.95rem; color: var(--light); }
