/* Curio: a search page that looks like the web did in 2004. White page, blue
   underlined links, green addresses, grey bevelled buttons. Bigger type than
   back then, because the readers are 9 to 12. Light only, on purpose. */
:root {
  --page: #ffffff;
  --ink: #1d1d1f;
  --ink-soft: #5a5a66;
  --link: #1a0dab;
  --link-visited: #5b1a8b;
  --url: #0b7a1e;
  --bar: #e5ecf9;
  --bar-line: #3366cc;
  --rule: #c9d3e6;
  --fact-bg: #fff8d6;
  --fact-line: #e6c84a;
  --care-bg: #eaf6ee;
  --care-line: #6cbf84;
  --spell: #c5221f;
  --btn-top: #fbfbfb;
  --btn-bottom: #dcdcdc;
  --btn-line: #a9a9a9;
  --c1: #2a62c9;
  --c2: #e8590c;
  --c3: #2b9348;
  --c4: #c9184a;
  --c5: #7b2cbf;
  --face: Arial, 'Helvetica Neue', Helvetica, sans-serif;
  --logo-face: 'Trebuchet MS', 'Lucida Grande', Verdana, sans-serif;
  --read-face: Georgia, 'Times New Roman', serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); color: var(--ink); }
body {
  font: 17px/1.5 var(--face);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
[hidden] { display: none !important; }

a { color: var(--link); }
a:visited { color: var(--link-visited); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--c2); outline-offset: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.center-note { margin: auto; padding: 32px 16px; text-align: center; color: var(--ink-soft); }

/* --- logo --- */
.logo { font-family: var(--logo-face); font-weight: bold; letter-spacing: -0.02em; margin: 0; text-decoration: none; }
.logo span { text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.18), 2px 2px 2px rgba(0, 0, 0, 0.12); }
.l1 { color: var(--c1); } .l2 { color: var(--c2); } .l3 { color: var(--c3); } .l4 { color: var(--c4); } .l5 { color: var(--c5); }
.logo-big { font-size: clamp(64px, 18vw, 112px); line-height: 1; }
.logo-small { font-size: 34px; line-height: 1; flex: none; }

/* --- classic buttons and box --- */
input[type='search'] {
  font: inherit;
  font-size: 18px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #8f8f9d;
  border-top-color: #6f6f7d;
  padding: 7px 9px;
  border-radius: 0;
  width: 100%;
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
}
button.classic {
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: linear-gradient(var(--btn-top), var(--btn-bottom));
  border: 1px solid var(--btn-line);
  border-radius: 3px;
  padding: 6px 14px;
  cursor: pointer;
  white-space: nowrap;
}
button.classic:active { background: linear-gradient(var(--btn-bottom), var(--btn-top)); }
button.linkish { font: inherit; color: var(--link); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }

/* --- home --- */
.home {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding-block: 12vh 32px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  text-align: center;
}
.tagline { margin: -6px 0 6px; color: var(--ink-soft); font-size: 15px; }
.home-form { width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 14px; }
.buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.try { max-width: 560px; font-size: 15px; color: var(--ink-soft); }
.try ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.library-note { font-size: 13px; color: var(--ink-soft); margin: 18px 0 0; }

/* --- top bar --- */
.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding-block: 14px 8px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.top-form { flex: 1 1 320px; max-width: 600px; display: flex; gap: 8px; }

.shelves {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 14px;
  padding-block: 2px 6px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.shelves a, .shelves a:visited { color: var(--link); }
.shelves [aria-current='true'] { color: var(--ink); font-weight: bold; text-decoration: none; }

.statbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 16px;
  background: var(--bar);
  border-top: 1px solid var(--bar-line);
  font-size: 13px;
  padding-block: 4px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.statbar-left { font-weight: bold; }
.statbar-right { color: var(--ink); font-variant-numeric: tabular-nums; }

.col {
  max-width: 680px;
  padding-block: 12px 24px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.spell { margin: 0 0 14px; font-size: 16px; }
.spell .label { color: var(--spell); }
.spell a { font-weight: bold; font-style: italic; }

/* --- quick answer --- */
.fact {
  border: 1px solid var(--fact-line);
  background: var(--fact-bg);
  padding: 10px 14px 12px;
  margin: 0 0 20px;
}
.fact-q { font-size: 13px; color: var(--ink-soft); margin: 0 0 2px; }
.fact-a { font-size: 24px; font-weight: bold; margin: 0; line-height: 1.25; }
.fact-d { margin: 4px 0 0; font-size: 15px; }

/* --- results --- */
.result-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.result-title { font-size: 19px; }
.result-snippet { margin: 2px 0 0; font-size: 15px; line-height: 1.45; }
.result-url { margin: 2px 0 0; font-size: 14px; color: var(--url); overflow-wrap: anywhere; }
.result-shelf { color: var(--ink-soft); }

.notice { border: 1px solid var(--rule); padding: 14px 16px; font-size: 16px; }
.notice h2 { margin: 0 0 6px; font-size: 19px; }
.notice p { margin: 0 0 8px; }
.notice ul { margin: 6px 0 0; padding-left: 20px; }
.notice.care { background: var(--care-bg); border-color: var(--care-line); }
.notice .big-number { font-size: 22px; font-weight: bold; letter-spacing: 0.04em; }

/* --- pager: Curiooooo --- */
.pager { display: flex; justify-content: center; align-items: flex-end; margin-top: 28px; font-family: var(--logo-face); }
.pager .cell { display: flex; flex-direction: column; align-items: center; min-width: 22px; }
.pager .glyph { font-size: 30px; font-weight: bold; line-height: 1; }
.pager .num { font-family: var(--face); font-size: 14px; margin-top: 3px; min-height: 1.4em; }
.pager .num b { color: var(--ink); }

/* --- article --- */
.article h1 { font-family: var(--read-face); font-weight: normal; font-size: 32px; line-height: 1.2; margin: 4px 0 10px; border-bottom: 1px solid var(--rule); padding-bottom: 4px; text-wrap: balance; }
.crumbs { font-size: 14px; color: var(--url); margin: 0; }
.article-text { font-family: var(--read-face); font-size: 19px; line-height: 1.6; max-width: 62ch; margin: 0 0 18px; }
.dyk { border: 1px solid var(--fact-line); background: var(--fact-bg); padding: 10px 14px; margin: 0 0 18px; max-width: 62ch; }
.dyk b { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
.article-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 22px; }
.also h2 { font-size: 16px; margin: 0 0 6px; }
.also ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 3px; }

/* --- footer --- */
.foot {
  margin-top: auto;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--ink-soft);
  text-align: center;
  padding-block: 14px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.foot button.linkish { font-size: 13px; }
.grownups { max-width: 560px; margin: 10px auto 0; text-align: left; }
.grownups p { margin: 0 0 8px; }

@media (max-width: 480px) {
  .top-form button { padding-inline: 10px; }
  .pager .glyph { font-size: 24px; }
  .pager .cell { min-width: 17px; }
}

.source { font-size: 13px; color: var(--ink-soft); margin: -6px 0 18px; overflow-wrap: anywhere; }

/* --- review page for grown-ups --- */
.review { max-width: 900px; }
.review h1 { font-family: var(--logo-face); font-size: 26px; margin: 4px 0 6px; }
.review .lead { color: var(--ink-soft); margin: 0 0 18px; max-width: 70ch; }
.add-topic { border: 1px solid var(--rule); background: var(--bar); padding: 12px 14px; margin: 0 0 22px; display: flex; flex-direction: column; gap: 8px; }
.add-topic h2 { font-size: 17px; margin: 0; }
.add-row { display: flex; flex-wrap: wrap; gap: 8px; }
.add-row input { flex: 1 1 220px; }
.add-row select { font: inherit; font-size: 16px; padding: 6px; border: 1px solid #8f8f9d; background: #fff; color: var(--ink); }
.add-msg { margin: 0; font-size: 15px; }
.add-msg.error { color: var(--spell); }
.tabs { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 10px; font-size: 15px; }
.tabs [aria-current='true'] { font-weight: bold; color: var(--ink); text-decoration: none; }
.filter { margin: 0 0 14px; max-width: 360px; }
.review-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.review-list li { border-top: 1px solid var(--rule); padding: 12px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: start; }
.review-title { font-size: 17px; font-weight: bold; }
.review-meta { font-size: 13px; color: var(--ink-soft); }
.review-reason { font-size: 14px; color: var(--spell); }
.review-text { grid-column: 1 / -1; font-size: 15px; margin: 0; }
.review-text summary { cursor: pointer; color: var(--link); }
.pill { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--rule); margin-right: 6px; }
.pill.shown { background: var(--care-bg); border-color: var(--care-line); }
.pill.waiting { background: var(--fact-bg); border-color: var(--fact-line); }
.pill.hidden { background: #eee; }
.review-actions { display: flex; gap: 6px; }
.bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 14px; }

.requests { border: 1px solid var(--fact-line); background: var(--fact-bg); padding: 12px 14px; margin: 0 0 22px; }
.requests h2 { font-size: 17px; margin: 0 0 4px; }
.requests .lead { margin: 0 0 8px; font-size: 15px; }
.requests .review-list li { border-top-color: var(--fact-line); }
.requests .add-row { margin: 6px 0; }
.requests .add-row input { flex: 1 1 160px; }

/* --- Lilla Aktuellt --- */
.news-teaser { width: 100%; max-width: 560px; text-align: left; border: 1px solid var(--rule); background: var(--bar); padding: 10px 14px; font-size: 15px; }
.news-teaser h2 { font-size: 16px; margin: 0 0 4px; }
.news-teaser ul { margin: 0 0 6px; padding-left: 20px; }
.news-teaser p { margin: 0; }
.news h1 { font-family: var(--logo-face); font-size: 26px; margin: 4px 0 6px; }
.news-intro { color: var(--ink-soft); margin: 0 0 14px; max-width: 62ch; }
.news-day { border-top: 1px solid var(--rule); padding: 10px 0 6px; }
.news-day h2 { font-size: 17px; margin: 0 0 4px; }
.news-program { margin: 0 0 6px; font-size: 16px; }
.news-day ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 16px; }
.news-desc { color: var(--ink-soft); font-size: 15px; }

.news-admin { border: 1px solid var(--rule); padding: 12px 14px; margin: 0 0 22px; }
.news-admin h2 { font-size: 17px; margin: 0 0 4px; }
.news-admin .lead { margin: 0 0 8px; font-size: 15px; }
.news-admin .add-row { align-items: center; margin: 0 0 6px; }
.news-admin summary { cursor: pointer; color: var(--link); font-size: 15px; }
.news-admin .review-list { margin-top: 8px; }

/* --- podcast episodes on an article --- */
.listen { border: 1px solid var(--rule); background: var(--bar); padding: 10px 14px; margin: 0 0 18px; max-width: 62ch; }
.listen h2 { font-size: 16px; margin: 0 0 6px; }
.listen ul { margin: 0 0 6px; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.listen .source { margin: 0; }

/* --- Football --- a cleaner, card-based look than the rest of Curio, with an
   accent colour per competition (never a club or league logo). */
.col.fb { max-width: 1060px; }
.fb-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; margin: 4px 0 10px; }
.fb-head h1 { font-family: var(--logo-face); font-size: 28px; margin: 0; }
.fb-sub { margin: 0; color: var(--ink-soft); font-size: 14px; }

.fb-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: thin; }
.fb-tab, .fb-tab:visited { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 7px 15px; border: 1px solid var(--rule); border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-size: 15px; }
.fb-tab:hover { border-color: var(--lc); }
.fb-tab.is-on, .fb-tab.is-on:visited { background: var(--lc); border-color: var(--lc); color: #fff; font-weight: 600; }

.fb-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0 18px; align-items: start; }
.fb-side { min-width: 0; }
.fb-card { background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 12px 14px 14px; margin: 0 0 16px; box-shadow: 0 1px 2px rgba(20, 30, 60, 0.05); }
.fb-card h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding-bottom: 7px; border-bottom: 2px solid var(--lc); font: 600 13px/1.2 var(--face); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.fb-card h4 { margin: 14px 0 2px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.fb-livecard { border-color: #f1b3be; background: #fffafb; }
.fb-empty { color: var(--ink-soft); margin: 6px 0; font-size: 15px; }

.fb-scroll { overflow-x: auto; }
.fb-table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.fb-table th { padding: 6px 6px; text-align: left; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: var(--ink-soft); border-bottom: 1px solid var(--rule); white-space: nowrap; }
.fb-table td { padding: 7px 6px; border-bottom: 1px solid #edf0f6; }
.fb-table tbody tr:nth-child(even) { background: #fafbfe; }
.fb-table tbody tr:hover { background: #f2f6ff; }
.fb-table .fb-n { text-align: right; width: 2.6em; }
.fb-table th.fb-n { text-align: right; }
.fb-table .fb-rank { width: 2.4em; text-align: center; font-weight: 600; }
.fb-table .fb-pts { font-weight: 700; }
.fb-teamcol { min-width: 9em; }
.fb-table a, .fb-table a:visited, .fb-match a, .fb-match a:visited { color: inherit; text-decoration: underline; text-decoration-color: #b9c3d8; text-underline-offset: 3px; }
.fb-table a:hover, .fb-match a:hover { text-decoration-color: var(--lc); }
.fb-formcol { white-space: nowrap; }
.fb-form { display: inline-flex; gap: 3px; }
.fb-chip { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 4px; color: #fff; font: 700 11px/1 var(--face); }
.fb-chip.is-W { background: #2e9b57; }
.fb-chip.is-D { background: #8d96a8; }
.fb-chip.is-L { background: #d4474f; }
.fb-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--ink-soft); }
.fb-swatch { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 2px; vertical-align: -1px; }

.fb-matches { margin: 0; padding: 0; list-style: none; }
.fb-match { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 4px 10px; padding: 8px 0; border-bottom: 1px solid #edf0f6; font-size: 15px; }
.fb-matches .fb-match:last-child { border-bottom: 0; }
.fb-home { text-align: right; }
.fb-score { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 66px; padding: 3px 10px; border-radius: 6px; background: #eff3fa; font: 700 16px/1.3 var(--face); font-variant-numeric: tabular-nums; }
.fb-score i { font-style: normal; font-weight: 400; color: var(--ink-soft); }
.fb-kickoff { min-width: 66px; padding: 2px 10px; border: 1px solid var(--rule); border-radius: 6px; color: var(--ink-soft); font: 600 14px/1.5 var(--face); text-align: center; font-variant-numeric: tabular-nums; }
.fb-match.is-live .fb-score { background: #fde6eb; color: #b0112b; }
.fb-final { grid-column: 1 / -1; margin-top: -3px; text-align: center; color: var(--ink-soft); font-size: 12px; }
.fb-match > .fb-live { grid-column: 1 / -1; justify-self: center; }
.fb-live { display: inline-block; padding: 1px 7px; border-radius: 4px; background: #e11d48; color: #fff; font: 700 11px/1.5 var(--face); letter-spacing: 0.05em; }
.fb-dot { width: 8px; height: 8px; border-radius: 50%; background: #e11d48; animation: fb-pulse 1.4s ease-in-out infinite; }
.fb-tab.is-on .fb-dot { background: #fff; }
@keyframes fb-pulse { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .fb-dot { animation: none; } }
.fb-short { display: none; }

/* the front-page summary */
.fb-teaser { width: 100%; max-width: 560px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 10px; background: #fff; box-shadow: 0 1px 2px rgba(20, 30, 60, 0.05); text-align: left; font-size: 15px; }
.fb-teaser h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 16px; }
.fb-teaser ul { margin: 0 0 8px; padding: 0; list-style: none; }
.fb-teaser li { display: flex; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px solid #edf0f6; }
.fb-teaser li:last-child { border-bottom: 0; }
.fb-teaser p { margin: 0; }
.fb-chipl { flex: none; min-width: 34px; padding: 1px 6px; border-radius: 4px; color: #fff; font: 700 11px/1.6 var(--face); text-align: center; letter-spacing: 0.03em; }
.fb-line { flex: 1; min-width: 0; font-variant-numeric: tabular-nums; }
.fb-teaser li.is-live b { color: #b0112b; }

@media (max-width: 880px) {
  .fb-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .fb-long { display: none; }
  .fb-short { display: inline; }
  .fb-opt { display: none; }
  .fb-card { padding: 10px 10px 12px; }
  .fb-table td, .fb-table th { padding-left: 4px; padding-right: 4px; }
  .fb-match { font-size: 14px; gap: 4px 6px; }
}

/* keep numbers on one line; only the club name may wrap */
.fb-table td, .fb-table th { white-space: nowrap; }
.fb-table td.fb-teamcol, .fb-table th.fb-teamcol { white-space: normal; }
@media (max-width: 640px) { .fb-table th.fb-opt2, .fb-table td.fb-opt2 { display: none; } }

/* --- a club's squads --- */
.squad { border: 1px solid var(--rule); border-radius: 10px; background: #fff; padding: 12px 14px 12px; margin: 0 0 18px; max-width: 62ch; box-shadow: 0 1px 2px rgba(20, 30, 60, 0.05); }
.squad h2 { font-size: 16px; margin: 0 0 8px; }
.squad-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.squad-tab { font: inherit; font-size: 14px; padding: 4px 12px; border: 1px solid var(--rule); border-radius: 999px; background: #fff; color: var(--ink); cursor: pointer; }
.squad-tab[aria-selected='true'] { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.squad-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 4px 20px; }
.squad-group h3 { margin: 6px 0 2px; font: 600 12px/1.4 var(--face); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.squad-group h3 span { font-weight: 400; }
.squad-group ul { margin: 0; padding: 0; list-style: none; font-size: 15px; }
.squad-group li { padding: 2px 0; }
.squad-group li a { color: inherit; text-decoration-color: #b9c3d8; text-underline-offset: 3px; }
.squad-country { color: var(--ink-soft); font-size: 13px; }
.squad .source, .squad-link { margin: 8px 0 0; }
.squad-body .source { grid-column: 1 / -1; }

.squad-coach { margin: 0 0 10px; font-size: 15px; }

.offline-note { margin: 0; padding: 6px 12px; background: var(--fact-bg); color: var(--ink); font-size: 13px; text-align: center; }

.invite-form { margin-top: 24px; }
.invite-form input { width: min(320px, 70vw); font-size: 16px; }
.guest .admin-only { display: none; }
.guest-only { display: none; }
.guest .guest-only { display: inline; }

.guest-devices { list-style: none; margin: 6px 0; padding: 0 0 0 12px; font-size: 14px; }
.guest-devices li { margin: 2px 0; }
.guest-controls { margin-top: 8px; }
.guest-here { color: var(--url); font-weight: bold; }
.chip { font-size: 12px; padding: 1px 6px; border-radius: 8px; background: var(--bar); border: 1px solid var(--rule); font-weight: normal; }
.chip-paused, .chip-expired { background: var(--fact-bg); border-color: var(--fact-line); }
.chip-revoked { color: var(--ink-soft); }
#guests-link { width: min(460px, 80vw); }

.result-url a, .crumbs a { color: inherit; text-decoration: none; }
.result-url a:hover, .crumbs a:hover { text-decoration: underline; }
