/* /tiktok: Pandemien eg sende på TikTok. The FORM of the page; the palette is
 * /tiktok/palett.css, shared with /tiktok/treffa and linked before this file
 * (ADR 0069). It was paper-and-orange with Space Grotesk until the hits page
 * arrived in the colours it was designed in, and the two clashed; the parent
 * joined the subpage rather than the other way round, because cyan and red on
 * near-black is what the app itself looks like.
 *
 * The only tokens declared here are the ones a chart on THIS page needs and the
 * subpage has no use for: the heatmap's empty cell, and the seven view buckets,
 * which run from the quiet grey tail through cyan to red for the hits, the same
 * reading as the hits page gives its big dots. Red is always «the top»: the
 * busiest month, the busiest hour, the biggest bucket, the mean. */
:root {
  --rute: #1d1d27;
  --del-0: #2a2a36;
  --del-1: #3d3d4d;
  --del-2: #55556a;
  --del-3: #7a7a92;
  --del-4: #1fa9a5;
  --del-5: #25f4ee;
  --del-6: #fe2c55;
}

.tt-ramme { max-width: 1240px; margin: 0 auto; padding: 0 32px 72px; }

.tt-sti {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
  padding: 24px 0; border-bottom: 1px solid var(--line);
  font-size: 15px; color: var(--mute);
}
.tt-sti a { text-decoration: none; font-weight: 600; color: var(--ink); }
.tt-sti a:first-child { font-family: var(--f-disp); font-weight: 400; font-size: 18px; }
.tt-sti a:hover { color: var(--cy); }

/* ── the title and the four figures ────────────────────────────────────────── */
.tt-topp {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; align-items: end;
  padding: clamp(28px, 4vw, 56px) 0 0;
}
.tt-helt { display: flex; flex-direction: column; gap: 12px; }
.tt-auge { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.tt-helt h1 {
  font-size: clamp(32px, 5.4vw, 56px); line-height: 1.05; letter-spacing: -0.02em;
  text-wrap: balance;
  text-shadow: -3px -2px 0 var(--cy), 3px 2px 0 var(--rd);
}
.tt-ingress { color: var(--mute); max-width: 66ch; }
.tt-vidare { font-size: 15px; color: var(--mute); }

.tt-tala { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tt-tal { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.tt-tal-verdi { font: clamp(20px, 2.1vw, 26px)/1.1 var(--f-disp); overflow-wrap: anywhere; }
.tt-tal-namn { font-size: 13px; color: var(--mute); }

/* ── a section ─────────────────────────────────────────────────────────────── */
.tt-seksjon { padding-top: 72px; display: flex; flex-direction: column; gap: 22px; }
.tt-seksjon-hovud { display: flex; flex-direction: column; gap: 8px; max-width: 720px; }
.tt-seksjon-hovud h2 { font-size: clamp(24px, 3.2vw, 32px); line-height: 1.1; letter-spacing: -0.01em; }
.tt-seksjon-hovud p { color: var(--mute); }
.tt-seksjon-hovud-delt { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; max-width: none; }
.tt-seksjon-hovud-delt > div { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.tt-seksjon h3 { font-size: 20px; margin-top: 16px; }
.tt-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; }
.tt-liten { font-size: 13px; color: var(--mute); }

.tt-teikn { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; color: var(--mute); }
.tt-teikn li { display: flex; align-items: center; gap: 8px; }
.tt-teikn-rute { flex: 0 0 14px; width: 14px; height: 14px; border-radius: 3px; }
.tt-teikn-tiltak { background: rgba(255, 255, 255, 0.09); border: 1px solid var(--line); }
.tt-teikn-soyle { background: var(--cy); opacity: 0.75; }
.tt-teikn-topp { background: var(--rd); }
.tt-teikn-ramp { background: linear-gradient(90deg, var(--rute), var(--cy)); border: 1px solid var(--line); width: 28px; flex-basis: 28px; }

/* ── videos per month ──────────────────────────────────────────────────────── */
.tt-manad { padding: 24px 24px 14px; }
.tt-manad-ramme { position: relative; }
.tt-tiltak { position: absolute; left: 0; top: 0; bottom: 28px; background: rgba(255, 255, 255, 0.045); border-radius: 10px; }
.tt-notat { position: absolute; top: 8px; margin: 0; font-size: 12px; font-weight: 600; line-height: 1.25; max-width: 180px; }
.tt-notat-tiltak { left: 12px; color: var(--mute); }
.tt-notat-comeback { color: var(--ink); }
.tt-soyler {
  position: relative; display: flex; align-items: flex-end; gap: 3px;
  height: 280px; padding-top: 40px;
}
.tt-soyle { flex: 1 1 0; min-width: 0; background: var(--cy); opacity: 0.75; border-radius: 2px 2px 0 0; }
.tt-soyle-topp { background: var(--rd); opacity: 1; }
.tt-soyle-tom { background: var(--line); opacity: 1; }
.tt-akse {
  position: relative; height: 28px; margin-top: 2px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--mute);
}
.tt-akse-merke { position: absolute; top: 10px; transform: translateX(-50%); white-space: nowrap; }
.tt-akse-start { transform: none; left: 0 !important; }
.tt-akse-slutt { transform: translateX(-100%); left: 100% !important; }

/* ── the posting heatmap ───────────────────────────────────────────────────── */
.tt-klokka { padding: 20px 24px; }
.tt-klokka-grid { display: flex; flex-direction: column; gap: 4px; }
.tt-klokka-rad { display: grid; grid-template-columns: 64px repeat(24, minmax(0, 1fr)); gap: 4px; align-items: center; }
.tt-dag { font-size: 13px; color: var(--mute); }
.tt-dag-kort { display: none; }
.tt-rute { display: block; aspect-ratio: 1; border-radius: 4px; }
.tt-klokka-akse { display: grid; grid-template-columns: 64px repeat(4, minmax(0, 1fr)); gap: 4px; padding-top: 6px; font-size: 12px; color: var(--mute); }

/* ── the cards ─────────────────────────────────────────────────────────────── */
.tt-kort { text-decoration: none; color: inherit; }
.tt-kort:hover .tt-kort-tittel, .tt-kort:focus-visible .tt-kort-tittel { color: var(--cy); }
.tt-kort img { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--line); }
.tt-plakat { position: relative; display: block; overflow: hidden; border-radius: 10px; background: var(--line); }
.tt-kort-tittel { font-weight: 600; line-height: 1.35; }
.tt-kort-meta { font-size: 12px; color: var(--mute); }

.tt-hof-topp { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.tt-kort-stor {
  display: flex; gap: 18px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 14px;
}
.tt-kort-stor .tt-plakat { flex: 0 0 150px; aspect-ratio: 9 / 16; border-radius: 8px; }
.tt-kort-stor .tt-kort-tekst { display: flex; flex-direction: column; gap: 10px; padding: 6px 4px; min-width: 0; }
.tt-rang { font: 44px/1 var(--f-disp); color: var(--cy); }
.tt-kort-stor .tt-kort-tittel { font-size: 18px; }
.tt-kort-stor .tt-kort-meta { margin-top: auto; font-size: 13px; }
.tt-spel {
  position: absolute; left: 10px; bottom: 10px; width: 36px; height: 36px; border-radius: 50%;
  background: var(--cy); display: flex; align-items: center; justify-content: center;
}
.tt-spel svg { fill: var(--bg); }

.tt-hof-rest { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }
.tt-kort-liten { display: flex; flex-direction: column; gap: 8px; }
.tt-kort-liten .tt-plakat { aspect-ratio: 3 / 4; }
.tt-kort-liten .tt-kort-tittel { font-size: 14px; }
.tt-merke {
  position: absolute; left: 8px; top: 8px; background: var(--cy); color: var(--bg);
  font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
}

.tt-diskutert { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.tt-kort-rad {
  display: flex; gap: 14px; align-items: center; background: var(--panel);
  border: 1px solid var(--line); border-radius: 14px; padding: 12px;
}
.tt-kort-rad img { flex: 0 0 72px; width: 72px; height: 128px; border-radius: 8px; }
.tt-kort-rad .tt-kort-tekst { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tt-kommentarar { font: 30px/1 var(--f-disp); color: var(--rd); }
.tt-kort-rad .tt-kort-tittel { font-size: 15px; line-height: 1.3; margin-top: 4px; }

/* ── the outlets ───────────────────────────────────────────────────────────── */
.tt-redaksjonar { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tt-redaksjon { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.tt-redaksjon-namn { flex: 0 0 190px; font-weight: 600; }
.tt-redaksjon-soyle { flex: 1 1 200px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.tt-soyle-vass { display: block; height: 18px; border-radius: 6px; flex: 0 0 auto; background: linear-gradient(90deg, var(--cy), var(--rd)); }
.tt-redaksjon-tal { font: 18px/1.2 var(--f-disp); font-variant-numeric: tabular-nums; }
.tt-redaksjon-beste { flex: 0 0 340px; font-size: 14px; color: var(--mute); }

/* ── the view distribution ─────────────────────────────────────────────────── */
.tt-stolpe { display: flex; gap: 2px; height: 56px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.tt-stolpe .tt-del { display: block; min-width: 3px; }
.tt-del-0 { background: var(--del-0); }
.tt-del-1 { background: var(--del-1); }
.tt-del-2 { background: var(--del-2); }
.tt-del-3 { background: var(--del-3); }
.tt-del-4 { background: var(--del-4); }
.tt-del-5 { background: var(--del-5); }
.tt-del-6 { background: var(--del-6); }
.tt-teikn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; font-size: 16px; color: var(--ink); }
.tt-teikn-grid li { align-items: flex-start; gap: 10px; }
.tt-teikn-grid .tt-teikn-rute { margin-top: 4px; border: 1px solid var(--line); }
.tt-teikn-grid li > span:last-child { display: flex; flex-direction: column; }
.tt-teikn-namn { font-size: 13px; color: var(--mute); }

/* ── the likes: distribution, waffle, scatter ──────────────────────────────── */
.tt-lpanel { padding: 20px 24px 16px; display: flex; flex-direction: column; gap: 14px; }
.tt-lpanel h3 { font-size: 20px; margin: 0; }
.tt-panel-hovud { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; }
.tt-liker-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.tt-lhist { position: relative; padding-top: 34px; --lgap: 6px; }
.tt-lsoyler { display: flex; align-items: flex-end; gap: var(--lgap); height: 240px; }
.tt-lsoyle { flex: 1 1 0; min-width: 0; border-radius: 3px 3px 0 0; }
.tt-lsoyle-under { background: var(--del-3); }
.tt-lsoyle-midt { background: var(--del-4); }
.tt-lsoyle-over { background: var(--cy); }
.tt-lmerke { position: absolute; top: 34px; bottom: 44px; width: 0; border-left: 2px dashed var(--ink); }
.tt-lmerke-snitt { border-left-style: solid; border-left-color: var(--rd); }
.tt-lmerke > span {
  position: absolute; left: 50%; top: -30px; transform: translateX(-50%); white-space: nowrap;
  font-size: 12px; font-weight: 600; color: var(--ink); background: var(--panel); padding: 0 6px;
}
.tt-lmerke-snitt > span { color: var(--rd); }
.tt-lakse { display: flex; gap: var(--lgap); padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; color: var(--mute); }
.tt-lakse > span { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tt-lakse b { color: var(--ink); }
.tt-lakse-kort { display: none; }
.tt-vaffel { display: grid; grid-template-columns: repeat(40, minmax(0, 1fr)); gap: 2px; }
.tt-vaffel span { display: block; aspect-ratio: 1; border-radius: 2px; }
.tt-r0 { background: var(--rd); }
.tt-r1 { background: var(--cy); }
.tt-r2 { background: var(--del-4); }
.tt-r3 { background: var(--del-3); }
.tt-r4 { background: var(--del-2); }
.tt-teikn-liste { flex-direction: column; gap: 6px; }
.tt-teikn-liste b { color: var(--ink); }
.tt-spreiing { position: relative; margin: 10px 8px 44px 44px; }
.tt-spreiing-flate { position: relative; aspect-ratio: 600 / 520; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tt-spreiing-flate svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; display: block; }
.tt-prikk { fill: var(--cy); opacity: 0.3; }
.tt-prikk-vald { fill: var(--rd); opacity: 0.95; }
.tt-rate-line { stroke: var(--mute); stroke-width: 1.5; stroke-dasharray: 5 5; }
.tt-spreiing-merke {
  position: absolute; white-space: nowrap; font-size: 12px; font-weight: 600; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px;
}
.tt-spreiing-merke-over { transform: translate(-100%, -150%); }
.tt-spreiing-merke-under { transform: translate(-100%, 60%); }
.tt-teikn-prikk { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--cy); opacity: 0.5; }
.tt-teikn-prikk-vald { background: var(--rd); opacity: 1; }
.tt-teikn-line { flex: 0 0 22px; width: 22px; height: 0; border-top: 2px dashed var(--mute); }
.tt-x-tick { position: absolute; bottom: -8px; transform: translate(-50%, 100%); font-size: 11px; color: var(--mute); }
.tt-y-tick { position: absolute; left: -8px; transform: translate(-100%, -50%); font-size: 11px; color: var(--mute); }
.tt-akse-namn-x { position: absolute; left: 50%; bottom: -42px; transform: translateX(-50%); font-size: 11px; color: var(--mute); }
.tt-akse-namn-y { position: absolute; left: -44px; top: 50%; transform: rotate(-90deg) translateX(50%); transform-origin: left; font-size: 11px; color: var(--mute); }

/* ── the word clouds ───────────────────────────────────────────────────────── */
.tt-sky {
  --min: 16px; --max: 60px;
  padding: 40px 32px; display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline;
  gap: 6px 22px; line-height: 1.1;
}
.tt-sky-knaggar { --min: 14px; --max: 44px; gap: 6px 18px; line-height: 1.15; padding: 8px 0; }
.tt-ord { font-weight: 500; color: var(--mute); font-size: calc(var(--min) + var(--t) * (var(--max) - var(--min))); }
.tt-ord-mellom { color: var(--ink); }
.tt-ord-stor { font-family: var(--f-disp); font-weight: 400; color: var(--ink); }
.tt-dialekt { color: var(--cy); }

/* ── the foot ──────────────────────────────────────────────────────────────── */
.tt-fot {
  margin-top: 72px; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-size: 13px; color: var(--mute);
}
.tt-fot a { color: var(--ink); }

/* ── the player ────────────────────────────────────────────────────────────── */
.tt-dialog {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  padding: 20px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--panel); color: var(--ink);
  font-family: var(--f-tekst);
}
.tt-dialog::backdrop { background: rgba(11, 11, 16, 0.8); }
.tt-dialog-hovud { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.tt-dialog-tittel { font-size: 20px; line-height: 1.3; }
.tt-lukk {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--line); color: var(--ink); font-size: 24px; line-height: 1;
}
.tt-lukk:hover { background: var(--cy); color: var(--bg); }
.tt-dialog-video { background: var(--bg); border-radius: 10px; overflow: hidden; }
.tt-dialog video { display: block; width: 100%; max-height: min(70vh, 720px); aspect-ratio: 9 / 16; background: #000; }
.tt-dialog-feil { padding: 48px 20px; text-align: center; color: var(--mute); }
.tt-dialog-meta { margin-top: 14px; font-size: 13px; color: var(--mute); }
.tt-dialog-skildring { margin-top: 8px; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.tt-dialog-lenkje { margin-top: 12px; font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.tt-dialog-lenkje a { color: var(--mute); }
.tt-dialog-lenkje a:hover { color: var(--cy); }
.tt-dialog-skilje { color: var(--mute); }
.tt-kopier {
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 3px 10px; border: 0; border-radius: 999px;
  background: var(--line); color: var(--ink);
}
.tt-kopier:hover { background: var(--cy); color: var(--bg); }
.tt-kopiert { color: var(--cy); }
.tt-kopiert:empty { display: none; }

/* ── the middle band: the title and the figures stack ──────────────────────── */
@media (max-width: 900px) {
  .tt-topp { grid-template-columns: minmax(0, 1fr); }
}

/* ── narrow screens, after the 390 px design ───────────────────────────────── */
@media (max-width: 640px) {
  .tt-ramme { padding: 0 16px 56px; }
  .tt-sti { padding: 18px 0; }
  .tt-topp { padding-top: 24px; gap: 18px; }
  .tt-helt { gap: 10px; }
  .tt-tala { gap: 6px; }
  .tt-tal { padding: 10px 10px; border-radius: 10px; }
  .tt-tal-verdi { font-size: 17px; }
  .tt-tal-namn { font-size: 12px; }
  .tt-seksjon { padding-top: 52px; gap: 16px; }
  .tt-seksjon-hovud h2 { line-height: 1.15; }
  .tt-teikn { gap: 6px 16px; }

  .tt-manad { padding: 16px 12px 12px; border-radius: 14px; }
  .tt-soyler { gap: 1px; height: 220px; padding-top: 52px; }
  .tt-notat { top: 6px; font-size: 11px; max-width: 130px; }
  .tt-notat-tiltak { left: 6px; }
  .tt-akse { font-size: 11px; }
  .tt-akse-odd, .tt-akse-naer { display: none; }

  .tt-klokka { padding: 14px 12px; border-radius: 14px; }
  .tt-klokka-grid { gap: 2px; }
  .tt-klokka-rad { grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 2px; }
  .tt-dag { font-size: 11px; }
  .tt-dag-lang { display: none; }
  .tt-dag-kort { display: inline; }
  .tt-rute { border-radius: 2px; }
  .tt-klokka-akse { grid-template-columns: 34px repeat(4, minmax(0, 1fr)); gap: 2px; font-size: 11px; }

  .tt-hof-topp { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .tt-kort-stor { gap: 14px; padding: 12px; border-radius: 14px; }
  .tt-kort-stor .tt-plakat { flex-basis: 108px; }
  .tt-rang { font-size: 30px; }
  .tt-kort-stor .tt-kort-tittel { font-size: 16px; line-height: 1.3; }
  .tt-hof-rest { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
  .tt-diskutert { grid-template-columns: minmax(0, 1fr); gap: 12px; }

  .tt-redaksjonar { gap: 14px; }
  .tt-redaksjon { gap: 4px 12px; padding-bottom: 12px; }
  .tt-redaksjon-namn, .tt-redaksjon-beste { flex: 1 0 100%; }

  .tt-teikn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

  .tt-lpanel { padding: 16px 12px 12px; gap: 12px; border-radius: 14px; }
  .tt-lpanel h3 { font-size: 18px; }
  .tt-liker-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .tt-lhist { --lgap: 3px; }
  .tt-lsoyler { height: 180px; }
  .tt-lmerke { bottom: 40px; }
  .tt-lmerke > span { font-size: 11px; padding: 0 4px; }
  .tt-lakse { font-size: 10px; line-height: 1.25; padding-top: 6px; }
  .tt-lakse > span { overflow-wrap: anywhere; }
  .tt-lakse-lang { display: none; }
  .tt-lakse-kort { display: inline; }
  .tt-vaffel { gap: 1px; }
  .tt-vaffel span { border-radius: 1px; }
  .tt-teikn-liste { font-size: 12px; gap: 5px; }
  .tt-spreiing { margin: 8px 4px 40px 34px; }
  .tt-spreiing-merke { font-size: 10px; padding: 1px 5px; }
  .tt-x-tick, .tt-y-tick, .tt-akse-namn-x, .tt-akse-namn-y { font-size: 10px; }
  .tt-x-tick { bottom: -6px; }
  .tt-y-tick { left: -6px; }
  .tt-akse-namn-x { bottom: -38px; }
  .tt-akse-namn-y { left: -34px; }

  .tt-sky { --min: 14px; --max: 38px; padding: 24px 14px; gap: 4px 14px; border-radius: 14px; }
  .tt-sky-knaggar { --min: 13px; --max: 28px; gap: 4px 12px; padding: 8px 0; }

  .tt-fot { margin-top: 56px; padding-top: 20px; }
  .tt-dialog { padding: 14px; }
}
