/* Majd meglátjuk – "Modern újság" theme: a modern newspaper on white paper, always light (no night edition).
   Builds on the newspaper layout of themes/ujsag.css (must load after it: THEMES order in src/config.ts).
   Rules are nested under html[data-theme="ujsag-feher"]:root, so they outrank the html:is(...) rules of ujsag.css.
   System fonts only: a modern serif for headlines and text, a sans-serif for labels, navigation and dates. */

html[data-theme="ujsag-feher"]:root {
  --paper: #ffffff; --paper-2: #f3f3f1; --paper-3: #fafaf9;
  --ink: #121212; --ink-2: #5a5a5a; --hair: #dcdcda; --red: #c4161c; --red-strong: #9b1116;
  --stamp-ok: #1e6b3a; --stamp-wip: #8a5a00; --stamp-none: #5c5c5c; --stamp-contra: #c4161c;
  --grain: 0;
  --acc-ring: rgba(196,22,28,.35);
  --font: Charter, "Bitstream Charter", "Sitka Text", Cambria, "Source Serif Pro", "Noto Serif", "DejaVu Serif", Georgia, serif;
  --font-head: var(--font);
  --font-mast: var(--font);
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Liberation Sans", sans-serif;
  background-image: none;

  /* ---- base ---- */
  body { font: 18px/1.6 var(--font); hyphens: manual; -webkit-hyphens: manual; -webkit-font-smoothing: antialiased; }
  h1, h2, h3, h4 { letter-spacing: -.01em; }
  a { text-decoration-color: var(--hair); }
  a:hover { text-decoration-color: var(--red); }

  /* ---- labels: small uppercase sans-serif instead of small caps ---- */
  :is(.dateline, nav a, .theme-btn, main h1, .card .date, .cardlink a, .feedtitle, .crumbs, .pager, .day h2, .group h4,
      .highlights .more, .item .src, .badge, .filters summary, .glossary summary, .filters button, .expand-all, .cal-toggle,
      .arch th, .days-title, .cal-title, .cal-grid th, .daylist .mon, .pfilters label, .ptopic h2, .pstatus,
      .pev summary, .pmethod summary, .allitems > summary) {
    font-family: var(--font-ui); font-variant: normal; font-style: normal; text-transform: uppercase; letter-spacing: .06em; font-size: .76rem; font-weight: 700;
  }

  /* ---- masthead: compact, left-aligned title, sans navigation ---- */
  header.top { text-align: left; padding-top: .5rem; }
  .dateline { border-top: 0; border-bottom: 1px solid var(--hair); color: var(--ink-2); font-weight: 500; padding: .25rem 0; }
  .brand { font-weight: 800; font-variant-caps: normal; letter-spacing: -.03em; font-size: clamp(2.2rem, 6.5vw, 4.2rem); padding: .55rem 0 .5rem; border-bottom: 0; text-align: center; }
  .top-end { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--hair); padding: 0; }
  nav a { padding: .7rem .9rem; font-size: .8rem; border-left: 0; }
  nav a + a { border-left: 0; }
  nav a:hover { color: var(--red); text-decoration: none; }
  nav a[aria-current=page] { background: none; color: var(--ink); box-shadow: inset 0 -3px 0 var(--red); }
  .theme-btn { border: 1px solid var(--hair); border-radius: 3px; }
  .theme-menu { border: 1px solid var(--hair); border-radius: 4px; background: var(--paper); box-shadow: 0 6px 20px rgba(0,0,0,.12); }
  .theme-menu button { font-family: var(--font-ui); font-size: .95rem; }

  /* ---- section heads: thick rule above, label below ---- */
  :is(main h1, .day h2, .days-title, .ptopic h2) { text-align: left; justify-content: flex-start; border-top: 2px solid var(--ink); border-bottom: 0; padding: .45rem 0 0; color: var(--ink); }
  .day h2 small { font-family: var(--font-ui); font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: .6rem; }
  .group h4 { color: var(--red); }
  .group h4::before { display: none; }
  .group h4::after { border-top: 1px solid var(--hair); box-shadow: none; }

  /* ---- front-page story ---- */
  .card .date { color: var(--red); margin-bottom: .3rem; }
  .card h2 { font-weight: 800; letter-spacing: -.025em; line-height: 1.08; border-bottom: 1px solid var(--hair); padding-bottom: .8rem; }
  p.sum-text { font-size: 1.2rem; line-height: 1.55; text-align: left; color: var(--ink); }
  p.sum-text::first-letter { float: none; font: inherit; padding: 0; }
  .story { column-rule: 1px solid var(--hair); }
  .highlights strong { font-weight: 700; letter-spacing: -.01em; }
  .cardlink { border-top: 1px solid var(--hair); }
  .cardlink a, .cardlink a:hover { text-decoration: none; color: var(--red); }

  .pager { border-bottom: 1px solid var(--hair); }

  /* ---- items ---- */
  .summary { font-style: normal; border-left: 3px solid var(--red); }
  .chip { font-family: var(--font-ui); font-style: normal; font-size: .8rem; border-bottom: 0; }
  .item { border-bottom: 1px solid var(--hair); }
  .item:target { border-bottom: 1px solid var(--hair); }
  .item summary::after { font-family: var(--font-ui); font-weight: 300; }
  .item .t { font-weight: 700; letter-spacing: -.01em; }
  .item .by, .meta { font-family: var(--font-ui); font-style: normal; font-size: .85rem; }
  .item .body { border-left: 3px solid var(--red); }
  .badge { font-size: .66rem; border-color: var(--hair); min-width: 0; padding: .05rem .4rem; }
  .badge.g-torvenyek, .badge.g-alaptorveny { background: var(--red); border-color: var(--red); color: #fff; }

  /* ---- boxes: single thin frame, no double outlines ---- */
  :is(.filters, .glossary, .cal, .psummary) { outline: 0; border: 1px solid var(--hair); }
  .filters button, .expand-all, .cal-toggle { border: 1px solid var(--hair); border-radius: 3px; }
  .boxes label { font-family: var(--font-ui); font-size: .85rem; border-radius: 3px; }
  .boxes .n { font-style: normal; color: var(--ink-2); }
  .tablewrap { border-top: 2px solid var(--ink); border-bottom: 1px solid var(--hair); }
  .arch th, .arch td { border-bottom: 1px solid var(--hair); }

  /* ---- day column ---- */
  aside.days { border-right: 1px solid var(--hair); box-shadow: none; }
  .cal-head { border-bottom: 1px solid var(--hair); }
  .cal-nav { border-color: var(--hair); border-radius: 3px; font-family: var(--font-ui); }
  .cal-grid td { border-color: var(--paper-2); border-style: solid; }
  .cal-grid a, .cal-grid .none { font-family: var(--font-ui); font-weight: 500; font-size: .85rem; }
  .cal-legend, .daylist .dd small { font-family: var(--font-ui); font-style: normal; }
  .daylist li { border-bottom: 1px solid var(--hair); }
  .daylist .mon { border-bottom: 1px solid var(--hair); }
  .daylist .dd { font-family: var(--font-ui); font-size: .9rem; }

  /* ---- promise tracker ---- */
  .ptile-n { font-family: var(--font-ui); font-weight: 800; }
  .ptile-l { font-family: var(--font-ui); font-style: normal; font-size: .85rem; }
  .ptiles { border-top: 2px solid var(--ink); border-bottom: 1px solid var(--hair); }
  .ptile { border-left: 1px solid var(--hair); }
  .ptile[aria-pressed=true] { box-shadow: inset 0 -3px 0 var(--red); }
  .pfilters { border-top: 2px solid var(--ink); border-bottom: 1px solid var(--hair); }
  .pfilters select { font-family: var(--font-ui); border-color: var(--hair); border-radius: 3px; }
  .pstatus { transform: none; outline: 0; border-width: 1px; border-radius: 3px; padding: .1rem .45rem; margin: 0; }
  .pref { font-family: var(--font-ui); font-style: normal; font-size: .8rem; }
  .pref::before { border-bottom: 1px solid var(--hair); }
  .pcard h3 { font-weight: 700; letter-spacing: -.01em; }
  .pcard blockquote { border-left: 3px solid var(--hair); }

  /* ---- footer ---- */
  footer { font-family: var(--font-ui); font-style: normal; font-size: .82rem; border-top: 2px solid var(--ink); }
  footer::before { display: none; }

  @media (max-width: 860px) {
    .brand { font-size: clamp(1.9rem, 9vw, 3rem); }
    nav { border-bottom: 1px solid var(--hair); }
    nav a { padding: .55rem .5rem; font-size: .72rem; }
  }
}
