/*
 * Prototype design layer (2026-10). Loaded last, after the hash-locked glass
 * assets, which stay byte-identical. Only refinements: typography with the
 * bundled Inter and Newsreader, even card rhythm, a high-contrast focus ring
 * and calmer reading. Wins on source order alone, never by importance flags.
 */

:root {
  --sp-ink: #1f232c;
  --sp-muted: #4f5868;   /* 7.0:1 on white, 6.4:1 on #f3f6fa */
  --sp-blue: #344bc8;    /* 7.0:1 on white */
  --sp-focus: #344bc8;
  --sp-serif: Newsreader, "Source Serif 4", Georgia, serif;
}

/* ---------------------------------------------------------------- type */

body { font-optical-sizing: auto; -webkit-font-smoothing: antialiased; }
:where(h1, h2, h3) { text-wrap: balance; }
:where(p, li) { text-wrap: pretty; }

/* Inter is wider than the system fallback the glass sheets were tuned on;
   ease the tightest display tracking a little so letters do not collide. */
.sg-home h1, .sg-home h2 { letter-spacing: -.035em; }
.sn-article h1, .sn-intro h1 { letter-spacing: -.04em; }
.sn-feature h2, .sn-archive-card h3 { letter-spacing: -.025em; }

/* Long-form reading in Newsreader. */
.sn-reading {
  font-family: var(--sp-serif);
  font-size: clamp(1.125rem, 1.05rem + .3vw, 1.25rem);
  line-height: 1.72;
  color: var(--sp-ink);
}
.sn-reading h2, .sn-reading h3 { font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.sn-ingress { color: var(--sp-muted); }
@media (max-width: 650px) {
  .sn-reading { padding: 22px 20px; border-radius: 16px; }
}

/* ------------------------------------------------------------- focus */

/* The base sheet's amber ring is 1.6:1 on white; blue with a white halo
   stays visible on both light glass and the dark feature images. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--sp-focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #fff;
  border-radius: 6px;
}
.skip-link.screen-reader-text:focus, .sn-skip:focus {
  z-index: 100000;
  padding: 12px 20px;
  border-radius: 999px;
  background: #fff;
  color: var(--sp-blue);
  font-weight: 650;
  box-shadow: 0 10px 30px rgba(31, 35, 44, .18);
}

/* -------------------------------------------------------- news cards */

/* Excerpts vary from one line to a full paragraph; clamp them so a row of
   cards keeps one rhythm. The full text is one click away. */
.sn-archive-card > p,
.sg-news-card .sg-plate > p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}
.sn-top-real .sn-feature-copy > p:not(.sn-eyebrow) {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
}
.sn-archive-card h3, .sg-news-card h3 {
  font-size: clamp(1.25rem, 1.05rem + .6vw, 1.55rem);
  line-height: 1.25;
}

/* Front-page "Senaste nytt": same 16:10 frame as the news archive. */
.sg-news-card__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  margin: 0 0 20px;
  border-radius: 14px;
  background: #e6ebf3;
}
.sg-news-card h3 { margin: 16px 0 10px; }
.sg-news-card h3 a { color: inherit; text-decoration: none; }
.sg-news-card h3 a:hover { text-decoration: underline; }
.sg-news-card .sg-plate > p { color: var(--sp-muted); margin: 0 0 22px; }
.sg-news-card .sg-card-link { margin-top: auto; }

/* Category illustrations: no photo filters, they are already toned. */
.sn-fallback-card { background: #eef1fb; }
.sn-feature .sn-fallback-card img { filter: none; }

/* Meta text on glass: the lightest greys drop below 4.5:1 on tinted cards. */
.sn-archive-card time, .sg-card-top > span:last-child { color: var(--sp-muted); }

/* AI notice under the article image: small, but kept at 6.4:1 on the page. */
.sn-original-hero .sn-ai-image-notice,
.wp-block-post-featured-image .sn-ai-image-notice {
  margin-top: 8px;
  color: var(--sp-muted);
  font-size: .8125rem;
  line-height: 1.45;
}

/* ------------------------------------------------------------ motion */

@media (prefers-reduced-motion: reduce) {
  .sg-service, .sn-archive-card { transition: none; transform: none; }
  html { scroll-behavior: auto; }
}
