/* Ball Knowledge News. Ilme: urheilulehden takasivu (paperi, musta, punainen). */

@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 800; font-display: swap; src: url("/assets/fonts/barlow-condensed-latin-800-italic.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/barlow-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/barlow-latin-600-normal.woff2") format("woff2"); }

:root {
  --paper: #f2eee6;
  --card: #fbf9f4;
  --ink: #111111;
  --red: #c8102e;
  --red-dark: #a00d25;
  --muted: #5a554d;
  --rule: #d6d0c4;
  --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --text: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
  --pad: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: 12px 16px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- Masthead ---------- */
.topbar { height: 8px; background: var(--red); }
.masthead { padding: clamp(14px, 3vw, 26px) 0 clamp(10px, 2vw, 16px); }
.masthead .wrap { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.wordmark {
  font-family: var(--display); font-style: italic; font-weight: 800;
  font-size: clamp(34px, 8.4vw, 72px); line-height: 0.9; letter-spacing: -0.01em;
  text-transform: uppercase; text-decoration: none; display: inline-block;
}
.wordmark span { color: var(--red); }
.mast-side { text-align: right; font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: 15px; color: var(--muted); line-height: 1.3; padding-bottom: 4px; }
.mast-side strong { display: block; color: var(--ink); font-weight: 700; }
@media (max-width: 720px) { .mast-side { display: none; } }

/* ---------- Tabs ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: var(--paper); border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink); }
.nav .wrap { padding: 0; }
.tabs { display: flex; gap: 0; margin: 0; padding: 0 var(--pad); list-style: none; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  display: flex; align-items: center; min-height: 48px; padding: 0 16px;
  font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: 0.04em;
  text-transform: uppercase; text-decoration: none; white-space: nowrap;
  border-right: 1px solid var(--rule);
}
.tabs li:first-child a { border-left: 1px solid var(--rule); }
.tabs a:hover { background: var(--ink); color: var(--paper); }
.tabs a[aria-current="page"] { background: var(--red); color: #fff; border-color: var(--red); }

/* ---------- Badges ja meta ---------- */
.badge {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px;
  font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase;
  border: 2px solid var(--ink); background: transparent; color: var(--ink);
}
.badge.done { background: var(--red); border-color: var(--red); color: #fff; }
.kicker { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red-dark); }
.meta { font-size: 14px; color: var(--muted); font-weight: 500; line-height: 1.5; }
.meta .dot::before { content: "\00b7"; margin: 0 9px; }

/* ---------- Kuva tai typografinen kortti ---------- */
.visual { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink); color: var(--paper); }
.visual img { width: 100%; height: 100%; object-fit: cover; }
/* Henkilökuvissa kasvot ovat yleensä kuvan yläosassa: rajaus painottuu ylös, ettei kasvot leikkaudu. */
.visual.person img { object-position: 50% 18%; }
.visual.type { display: flex; align-items: flex-end; padding: clamp(12px, 2.4vw, 22px); }
.visual.type.v-red { background: var(--red); color: #fff; }
.visual.type.v-ink { background: var(--ink); color: var(--paper); }
.visual.type.v-paper { background: #e4ded2; color: var(--ink); }
.visual.type .name {
  font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase;
  font-size: clamp(30px, 6vw, 58px); line-height: 0.92; letter-spacing: -0.01em;
  max-width: 100%; overflow-wrap: anywhere;
}
.visual.type .tag {
  position: absolute; top: clamp(10px, 2vw, 18px); left: clamp(12px, 2.4vw, 22px);
  font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.85;
}
.visual.type .mark {
  position: absolute; top: clamp(8px, 1.6vw, 14px); right: clamp(12px, 2.4vw, 22px);
  font-family: var(--display); font-style: italic; font-weight: 800; font-size: 26px; opacity: 0.9;
}
.lead-story .visual.type .name { font-size: clamp(44px, 9vw, 104px); }

.visual.with-name .photo-name {
  position: absolute; left: 0; bottom: 0; max-width: 92%;
  background: var(--ink); color: #fff; border-left: 8px solid var(--red);
  padding: 6px 14px 7px;
  font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase;
  font-size: clamp(22px, 4vw, 40px); line-height: 0.95; letter-spacing: -0.01em; overflow-wrap: anywhere;
}
.card .visual.with-name .photo-name { font-size: 18px; padding: 4px 9px 5px; border-left-width: 5px; }
@media (min-width: 720px) { .card .visual.with-name .photo-name { font-size: 24px; padding: 5px 12px 6px; } }
.lead-story .visual.with-name .photo-name { font-size: clamp(30px, 5vw, 56px); }

/* ---------- Etusivu ---------- */
main { padding: clamp(18px, 3vw, 32px) 0 56px; }
.section-title { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 14px; display: flex; align-items: center; gap: 14px; }
.section-title::after { content: ""; flex: 1; height: 3px; background: var(--ink); }

.lead-story { display: grid; grid-template-columns: 1fr; gap: 16px; padding-bottom: clamp(20px, 3vw, 32px); margin-bottom: clamp(20px, 3vw, 32px); border-bottom: 3px solid var(--ink); }
.lead-story a.hit { text-decoration: none; display: contents; }
.lead-story h2 { font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: clamp(38px, 7.6vw, 78px); line-height: 0.94; letter-spacing: -0.01em; margin: 10px 0 14px; text-wrap: balance; }
.lead-story .hit:hover h2 { color: var(--red-dark); }
.lead-text { display: flex; flex-direction: column; justify-content: center; }
.readmore { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: 0.06em; text-transform: uppercase; }
.readmore::after { content: "\2192"; font-family: var(--text); }
@media (min-width: 900px) {
  .lead-story { grid-template-columns: 1.25fr 1fr; gap: 32px; align-items: stretch; }
  .lead-story .visual { aspect-ratio: auto; min-height: 380px; height: 100%; }
}

.grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.card { border-bottom: 1px solid var(--rule); }
.card a { display: grid; grid-template-columns: 132px 1fr; gap: 14px; padding: 16px 0; text-decoration: none; align-items: start; }
.card .visual { aspect-ratio: 4 / 3; }
.card .visual.type { padding: 8px; }
.card .visual.type .name { font-size: 20px; }
.card .visual.type .tag, .card .visual.type .mark { display: none; }
.card h3 { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 23px; line-height: 1.04; letter-spacing: 0.005em; margin: 7px 0 8px; text-wrap: balance; }
.card a:hover h3 { color: var(--red-dark); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
@media (min-width: 720px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 28px 28px; }
  .card { border-bottom: 0; }
  .card a { display: block; padding: 0; }
  .card .visual { aspect-ratio: 16 / 9; }
  .card .visual.type { padding: 16px; }
  .card .visual.type .name { font-size: clamp(26px, 3.2vw, 38px); }
  .card .visual.type .tag, .card .visual.type .mark { display: block; }
  .card .body { padding-top: 12px; border-top: 3px solid var(--ink); margin-top: 0; }
  .card h3 { font-size: 28px; }
}
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 36px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px;
  font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; background: var(--ink); color: var(--paper); border: 2px solid var(--ink); cursor: pointer;
}
.btn:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.empty { border: 3px solid var(--ink); padding: clamp(24px, 6vw, 56px); text-align: center; background: var(--card); }
.empty h2 { font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: clamp(34px, 7vw, 60px); line-height: 0.95; margin: 0 0 12px; }
.empty p { margin: 0 auto; max-width: 46ch; color: var(--muted); }

.demo-note { background: var(--ink); color: var(--paper); text-align: center; font-family: var(--display); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 15px; padding: 7px var(--pad); }

/* ---------- Artikkeli ---------- */
.article { max-width: 760px; margin: 0 auto; }
.crumbs { font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 14px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.article h1 { font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: clamp(38px, 8vw, 70px); line-height: 0.94; letter-spacing: -0.01em; margin: 12px 0 16px; text-wrap: balance; }
.article .meta { margin-bottom: 20px; }
.article figure { margin: 0 0 22px; }
.article figure .visual.type { aspect-ratio: 21 / 9; }
.article figcaption { font-size: 13px; color: var(--muted); padding-top: 6px; }
.answer { border-left: 8px solid var(--red); padding: 4px 0 4px 18px; margin: 0 0 24px; }
.answer .kicker { display: block; margin-bottom: 4px; }
.answer p { margin: 0; font-size: clamp(20px, 3.4vw, 24px); line-height: 1.35; font-weight: 600; }
.prose p { margin: 0 0 18px; font-size: 18px; line-height: 1.65; }

.block { margin-top: 34px; padding-top: 16px; border-top: 3px solid var(--ink); }
.block h2 { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 12px; }
.source-line { margin: 0 0 14px; font-weight: 500; }
.source-line a { text-decoration-thickness: 2px; text-underline-offset: 3px; }
.x-embed { background: var(--card); border: 1px solid var(--rule); padding: 18px; }
.x-embed p { margin: 0 0 14px; font-size: 15px; color: var(--muted); max-width: 60ch; }
.x-embed .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.x-embed.loaded { background: transparent; border: 0; padding: 0; }
.x-embed .twitter-tweet { margin: 0 !important; }

/* ---------- Faktaosio ---------- */
.glance { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0 0 18px; border-top: 1px solid var(--rule); }
.glance div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.glance dt { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.glance dd { margin: 0; font-weight: 600; font-size: 17px; }
.facts-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.facts h3 { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 8px; }
.facts ul { margin: 0; padding: 0; list-style: none; }
.facts li { position: relative; padding: 0 0 8px 22px; font-size: 17px; line-height: 1.45; }
.facts li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 10px; height: 10px; background: var(--ink); }
.facts.unclear li::before { background: transparent; border: 2px solid var(--ink); }
@media (min-width: 640px) {
  .glance { grid-template-columns: 1fr 1fr; column-gap: 28px; }
  .facts-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

/* ---------- Kysely ---------- */
.poll { background: var(--card); border: 3px solid var(--ink); padding: clamp(16px, 3vw, 24px); margin-top: 34px; }
.poll .kicker { display: block; margin-bottom: 4px; }
.poll h2 { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: clamp(26px, 4.6vw, 34px); line-height: 1.02; margin: 0 0 16px; text-wrap: balance; }
.poll-options { display: grid; gap: 10px; }
.poll-option {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 52px; padding: 10px 16px; text-align: left;
  font-family: var(--text); font-size: 17px; font-weight: 600; color: var(--ink);
  background: var(--paper); border: 2px solid var(--ink); cursor: pointer; overflow: hidden;
}
.poll-option:hover:not([disabled]) { background: var(--ink); color: var(--paper); }
.poll-option[disabled] { cursor: default; }
.poll-option .bar { position: absolute; inset: 0 auto 0 0; width: 0; background: #ded7c9; transition: width 0.5s ease; z-index: 0; }
.poll-option.mine .bar { background: #f0b9c2; }
.poll-option .label, .poll-option .pct { position: relative; z-index: 1; }
.poll-option .pct { font-family: var(--display); font-weight: 700; font-size: 22px; min-width: 3ch; text-align: right; }
.poll-option.mine { border-color: var(--red); }
.poll-option.mine .label::after { content: " (your vote)"; font-weight: 500; color: var(--red-dark); }
.poll-foot { margin: 12px 0 0; font-size: 14px; color: var(--muted); min-height: 1.4em; }
@media (prefers-reduced-motion: reduce) { .poll-option .bar { transition: none; } }

.share { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ai-note { margin-top: 28px; font-size: 14px; color: var(--muted); border: 1px dashed var(--muted); padding: 12px 14px; }
.ai-note a { color: inherit; }

.more { margin-top: 48px; }

/* ---------- Tekstisivut ---------- */
.page { max-width: 760px; margin: 0 auto; }
.page h1 { font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: clamp(38px, 7vw, 60px); line-height: 0.95; margin: 0 0 18px; }
.page h2 { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; font-size: 24px; margin: 30px 0 8px; }
.page p, .page li { font-size: 17px; line-height: 1.65; }
.page a { text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--paper); padding: 36px 0 44px; border-top: 8px solid var(--red); }
.footer .wrap { display: grid; gap: 20px; }
.footer .wordmark { font-size: 34px; color: var(--paper); }
.footer .wordmark span { color: #ff5a73; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer nav a, .footer nav button { font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--paper); text-decoration: none; background: none; border: 0; padding: 10px 0; cursor: pointer; }
.footer nav a:hover, .footer nav button:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer p { margin: 0; font-size: 14px; color: #c9c3b8; max-width: 70ch; }
.footer :focus-visible { outline-color: #ff5a73; }
@media (min-width: 800px) { .footer .wrap { grid-template-columns: 1fr auto; align-items: center; } .footer p { grid-column: 1 / -1; } }
