/* Dentalnews: base, masthead, navigation, shared teasers, footer. Page layouts live in pages.css. */
:root {
  --paper: oklch(96.8% 0.013 83);
  --paper-deep: oklch(93.4% 0.02 80);
  --paper-hi: oklch(98.7% 0.007 85);
  --ink: oklch(21% 0.012 60);
  --ink-soft: oklch(33% 0.013 60);
  --muted: oklch(48.5% 0.014 65);
  --rule: oklch(85.5% 0.015 78);
  --rule-soft: oklch(89.5% 0.013 80);
  --accent: oklch(46.5% 0.155 25);
  --accent-deep: oklch(40% 0.14 25);
  --accent-wash: oklch(92.5% 0.03 32);
  --on-ink: oklch(94% 0.012 83);
  --on-ink-muted: oklch(72% 0.014 75);
  --serif: 'Newsreader', 'Iowan Old Style', Charter, Georgia, serif;
  --sans: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 3.6vw, 40px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 64px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--serif); font-size: 18px; line-height: 1.5; font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
::selection { background: var(--accent-wash); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
main:focus { outline: none; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.wrap-pad { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--paper); padding: 10px 14px; font-family: var(--sans); }
.skip:focus { top: 12px; }

/* Masthead */
.topline { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 9px; font-family: var(--sans); font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--rule); }
.topline p { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#dateline { color: var(--ink-soft); font-weight: 600; }
#dateline::first-letter { text-transform: uppercase; }
.topline-sep { width: 1px; height: 12px; background: var(--rule); }
.topline-links { gap: 18px !important; }
.topline-links a:hover { color: var(--accent); }
.brandrow { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-block: clamp(14px, 2.4vw, 26px) clamp(10px, 1.6vw, 16px); }
.wordmark { font-family: var(--serif); font-weight: 780; font-size: clamp(40px, 7.2vw, 78px); line-height: 0.86; letter-spacing: -0.042em; font-variation-settings: 'opsz' 72; }
.brand-actions { display: flex; gap: 6px; padding-bottom: 4px; }
.iconbtn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--sans); font-weight: 600; font-size: 14px; padding: 9px 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper-hi); transition: border-color .2s, background-color .2s; }
.iconbtn:hover { border-color: var(--ink); }
.iconbtn:active { transform: translateY(1px); }
.iconbtn[aria-expanded="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.iconbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.searchbar { display: flex; gap: 8px; padding-bottom: 14px; }
.searchbar[hidden] { display: none; }
.searchbar input, .drawer-search input { flex: 1; min-width: 0; font: 500 17px/1.2 var(--sans); padding: 13px 16px; border: 1.5px solid var(--ink); border-radius: 2px; background: var(--paper-hi); color: var(--ink); }
.searchbar button, .drawer-search button { font: 700 15px var(--sans); padding: 0 20px; background: var(--ink); color: var(--paper); border-radius: 2px; }

/* Navigation */
.navbar { position: sticky; top: 0; z-index: 30; background: var(--paper); border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink); }
.navrow { display: flex; align-items: stretch; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.navrow::-webkit-scrollbar { display: none; }
.navlink { position: relative; display: inline-flex; align-items: center; gap: 5px; padding: 13px 11px; font-family: var(--sans); font-weight: 650; font-size: 15px; white-space: nowrap; color: var(--ink); transition: color .2s; }
.navlink:first-child { padding-left: 0; }
.navlink:hover { color: var(--accent); }
.navlink[aria-current="page"]::after, .navdrop[aria-expanded="true"]::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: -1px; height: 3px; background: var(--accent); }
.navlink:first-child[aria-current="page"]::after { left: 0; }
.navdrop svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform .25s var(--ease); }
.navdrop[aria-expanded="true"] svg { transform: rotate(180deg); }
.navdiv { width: 1px; margin: 12px 6px; background: var(--rule); flex: none; }
.mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper-hi); border-bottom: 1px solid var(--ink); box-shadow: 0 24px 40px -24px oklch(21% 0.012 60 / 0.35); animation: drop .28s var(--ease); }
.mega[hidden] { display: none; }
.mega .wrap { padding-block: 22px 28px; }
.mega-title { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.mega-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); column-gap: 28px; }
.mega-grid a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule-soft); font-family: var(--sans); font-weight: 600; font-size: 16px; }
.mega-grid a:hover { color: var(--accent); }
.mega-grid .n { font-weight: 500; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mega-problems { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.mega-problems a { display: block; }
.mega-problems small { display: block; font-weight: 450; font-size: 13.5px; color: var(--muted); margin-top: 2px; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* City ticker: the site's börslista */
.ticker { position: relative; background: var(--ink); color: var(--on-ink); font-family: var(--sans); font-size: 13.5px; }
.ticker-row { display: flex; align-items: stretch; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 64px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 64px), transparent); }
.ticker-row::-webkit-scrollbar { display: none; }
.ticker-label { flex: none; display: flex; align-items: center; padding-right: 14px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: oklch(78% 0.07 32); }
.ticker-items { display: flex; }
.ticker a { display: flex; align-items: baseline; gap: 7px; padding: 10px 14px; white-space: nowrap; border-left: 1px solid oklch(33% 0.012 60); transition: background-color .2s; }
.ticker a:hover, .ticker a[aria-current="page"] { background: oklch(28% 0.014 55); }
.ticker a b { font-weight: 600; }
.ticker a span { color: oklch(76% 0.08 32); font-variant-numeric: tabular-nums; font-size: 12.5px; }

/* Drawer (small screens) */
.drawer { position: fixed; inset: 0; top: var(--drawer-top, 0); z-index: 40; background: var(--paper); overflow-y: auto; animation: drop .3s var(--ease); }
.drawer[hidden] { display: none; }
.drawer-inner { padding-block: 18px 48px; }
.drawer-search { display: flex; gap: 8px; margin-bottom: 18px; }
.drawer-title { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 22px 0 6px; }
.drawer-list a { display: block; padding: 11px 0; border-bottom: 1px solid var(--rule-soft); font-family: var(--sans); font-weight: 600; font-size: 17px; }
.drawer-cities { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }

/* Shared teaser parts */
.kicker { display: inline-block; font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
.kicker .loc { color: var(--muted); }
.kicker .loc::before { content: "·"; margin: 0 6px; color: var(--rule); }
.hl { font-family: var(--serif); letter-spacing: -0.012em; text-wrap: balance; }
.hl-xl { font-weight: 700; font-size: clamp(31px, 3.7vw, 52px); line-height: 1.02; letter-spacing: -0.026em; font-variation-settings: 'opsz' 60; }
.hl-l { font-weight: 680; font-size: clamp(23px, 2.1vw, 29px); line-height: 1.08; letter-spacing: -0.018em; }
.hl-m { font-weight: 650; font-size: 20px; line-height: 1.15; }
.hl-s { font-weight: 600; font-size: 17.5px; line-height: 1.22; text-wrap: pretty; }
.teaser { display: block; }
.teaser:hover .hl { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; text-decoration-color: var(--accent); }
.dek { color: var(--ink-soft); font-size: 17px; line-height: 1.48; margin-top: 8px; }
.dek-l { font-size: clamp(17.5px, 1.35vw, 19.5px); }
.meta { font-family: var(--sans); font-size: 13px; color: var(--muted); margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px 12px; font-variant-numeric: tabular-nums; }
.teaser .kicker + .hl { margin-top: 7px; }
.media { position: relative; overflow: hidden; background: var(--paper-deep); }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.teaser:hover .media img { transform: scale(1.03); }
.media + .kicker, .media + .hl { margin-top: 14px; }
.r-3x2 { aspect-ratio: 3 / 2; } .r-16x9 { aspect-ratio: 16 / 9; } .r-4x5 { aspect-ratio: 4 / 5; }
.r-4x3 { aspect-ratio: 4 / 3; } .r-1x1 { aspect-ratio: 1; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--sans); font-size: 13.5px; font-weight: 600; padding: 7px 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper-hi); transition: border-color .2s, color .2s; }
.pill:hover { border-color: var(--ink); }
.pill[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.linkarrow { font-family: var(--sans); font-weight: 650; font-size: 14.5px; color: var(--accent); display: inline-flex; gap: 6px; align-items: center; }
.linkarrow::after { content: "→"; transition: transform .25s var(--ease); }
.linkarrow:hover::after { transform: translateX(3px); }
.fade-in { animation: fade .45s var(--ease) both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Footer */
.footer { background: var(--ink); color: var(--on-ink); margin-top: 72px; font-family: var(--sans); }
.footer-grid { display: grid; gap: 36px; padding-block: 52px 36px; grid-template-columns: 1fr; }
.wordmark-footer { font-size: 46px; color: var(--on-ink); }
.footer-brand p { color: var(--on-ink-muted); font-size: 15px; margin-top: 14px; max-width: 34ch; line-height: 1.5; }
.footer-brand .footer-note { font-size: 13px; }
.footer-title { font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: oklch(78% 0.07 32); margin-bottom: 10px; }
.footer ul a { display: inline-block; padding: 5px 0; font-size: 15px; color: var(--on-ink); }
.footer ul a:hover, .footer-base a:hover { color: oklch(82% 0.08 32); }
.footer-cities { columns: 2; column-gap: 20px; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 18px 28px; border-top: 1px solid oklch(33% 0.012 60); font-size: 13px; color: var(--on-ink-muted); }
.footer-base p:last-child { display: flex; gap: 18px; flex-wrap: wrap; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }

@media (max-width: 859px) {
  .topline-tag, .topline-sep, .topline-links a:not([data-scroll]) { display: none; }
  .brand-actions .iconbtn span { display: none; }
  .iconbtn { padding: 10px; }
}
@media (min-width: 860px) { .menu-btn { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
