/* Flygmonster design system (plan KTD15). Hand-written, one light theme, no framework.
   Paper, ink, one green accent for actions, three tier colours, tabular numbers, Fraunces for display. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/static/fonts/fraunces-600-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #faf8f3;
  --paper-2: #f1ede3;
  --ink: #14140f;
  --ink-2: #4d4b43;
  --line: #dcd6c8;
  --accent: #0f6b3f;
  --accent-dark: #0a4d2d;
  --warn-bg: #fff1cc;
  --warn-line: #b07a00;
  --fynd-bg: #14140f;
  --fynd-ink: #faf8f3;
  --bra-bg: #f7e6bf;
  --bra-ink: #6b4400;
  --normalt-bg: #e8e3d7;
  --normalt-ink: #4d4b43;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 6px;
  --wrap: 66rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.5;
}
img, svg { max-width: 100%; }
/* Author rules like `.deal { display: grid }` beat the user-agent `[hidden] { display: none }`,
   so the feed and route filters could not hide anything. One line, every caller of el.hidden. */
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: .15em; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, .display { font-family: var(--display); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.9rem, 5.5vw, 2.9rem); }
h2 { font-size: clamp(1.35rem, 3.5vw, 1.75rem); margin-top: 2.5rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
.lede { font-size: 1.125rem; color: var(--ink-2); max-width: 44rem; }
.muted { color: var(--ink-2); }
.num, table, .price, .cal { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }

/* Header */
.skip { position: absolute; left: -999px; top: .5rem; }
.skip:focus { left: .5rem; z-index: 20; background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: var(--radius); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; max-width: var(--wrap); margin: 0 auto; padding: .75rem 1rem; }
.brand { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); text-decoration: none; font-family: var(--display); font-size: 1.35rem; min-height: 44px; }
.mark { color: var(--ink); flex: none; }
.mark.big { color: var(--ink-2); }
.topnav { display: flex; gap: .25rem; flex-wrap: wrap; }
.topnav a, .airports a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .75rem; color: var(--ink); text-decoration: none; border-radius: var(--radius); }
.topnav a:hover, .airports a:hover { background: var(--paper-2); }

/* Sticky airport switcher on feeds */
.airports { position: sticky; top: 0; z-index: 5; background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.airports ul { list-style: none; margin: 0 auto; padding: 0 .5rem; max-width: var(--wrap); display: flex; gap: .25rem; overflow-x: auto; }
.airports a[aria-current="page"] { font-weight: 700; box-shadow: inset 0 -3px 0 var(--ink); border-radius: 0; }
/* Phones: wrap to a second line instead of scrolling sideways. Four origins never fit one 320 px
   line and the scroller cut "Köpenhamn" off with nothing to say it could be scrolled. */
@media (max-width: 47.99rem) {
  .airports ul { flex-wrap: wrap; justify-content: center; }
  .airports a { padding: 0 .5rem; }
}

/* Notices */
.annons-bar { margin: 0; padding: .5rem 1rem; text-align: center; font-size: .8rem; color: var(--ink-2); background: var(--paper-2); }
.banner { margin: 0; padding: .75rem 1rem; background: var(--warn-bg); border-top: 3px solid var(--warn-line); text-align: center; }
.ranking-note { font-size: .875rem; color: var(--ink-2); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .55rem 1.1rem; background: var(--accent); color: #fff; border: 0; border-radius: var(--radius); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--accent-dark); color: #fff; }
.btn-secondary { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-secondary:hover { background: var(--paper-2); color: var(--ink); }
.chip { min-height: 44px; padding: 0 .9rem; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font: inherit; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: 1rem 0; }
.filters input[type="search"] { min-height: 44px; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; font: inherit; padding: 0 .75rem; min-width: 12rem; }
.sortbtn { font: inherit; font-weight: 600; color: var(--ink-2); background: none; border: 0; padding: 0; cursor: pointer; }
.sortbtn::after { content: " ↕"; font-size: .7em; }
th[aria-sort="ascending"] .sortbtn::after { content: " ↑"; }
th[aria-sort="descending"] .sortbtn::after { content: " ↓"; }
.filters select { min-height: 44px; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; font: inherit; padding: 0 .6rem; color: var(--ink); }

/* Deal card: stacked on mobile, a row on desktop */
.deals { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.deal { position: relative; display: grid; gap: .6rem 1rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.deal-title { font-family: var(--display); font-size: 1.35rem; margin: 0; }
.deal-title a { color: var(--ink); text-decoration: none; }
.deal-title a::after { content: ""; position: absolute; inset: 0; }
.deal-from { font-family: var(--body); font-size: .95rem; font-weight: 400; color: var(--ink-2); }
.deal-when, .deal-meta { margin: 0; font-size: .95rem; color: var(--ink-2); }
.deal-meta { font-size: .85rem; }
/* Mobile: badges on their own row, then price left and button right. A wrapping flex row put the
   button on line 2 only for long prices, so every card sat differently. */
.deal-side { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .5rem .75rem; }
.deal-side .badges { grid-column: 1 / -1; }
.badges { position: relative; z-index: 1; display: flex; gap: .4rem; align-items: center; margin: 0; flex-wrap: wrap; }
.tier { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.tier svg { color: currentColor; }
.tier.tier-monsterfynd { background: var(--fynd-bg); color: var(--fynd-ink); }
.tier.tier-bra_pris { background: var(--bra-bg); color: var(--bra-ink); }
.tier.tier-normalt { background: var(--normalt-bg); color: var(--normalt-ink); }
.airport { font-size: .8rem; color: var(--ink-2); padding: .15rem .55rem; border: 1px solid var(--line); border-radius: 999px; }
.price { margin: 0; font-family: var(--display); font-size: 1.85rem; line-height: 1; }
.price strong { white-space: nowrap; }  /* the amount stays on one line, "t/r per person" may drop below it */
.price-def { position: relative; z-index: 1; font-family: var(--body); font-size: .8rem; color: var(--ink-2); }
.btn-book { position: relative; z-index: 1; }
/* Hand-off to the metasearch with this route filled in. Needs .btn-book's z-index for the same reason:
   .deal-title a::after stretches over the whole card, and would otherwise swallow the click. */
.deal-alt { position: relative; z-index: 1; grid-column: 2; justify-self: end; display: inline-flex; align-items: center; min-height: 44px; font-size: .85rem; color: var(--ink-2); white-space: nowrap; }
/* The way home, folded out inside the card. Same z-index escape as .deal-alt. The summary is drawn as a chip with
   a caret: as plain text it read as a caption and nobody tried to click it (Ali, 2026-09-16: "i could not see it"). */
.deal-home { position: relative; z-index: 1; margin-top: .5rem; }
.deal-home > summary { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0 .9rem;
  border: 1.5px solid var(--accent); border-radius: 999px; color: var(--accent); font-size: .9rem; font-weight: 600;
  cursor: pointer; list-style: none; }
.deal-home > summary::-webkit-details-marker { display: none; }
.deal-home > summary::after { content: "▾"; font-size: .8em; }
.deal-home[open] > summary::after { content: "▴"; }
.deal-home > summary:hover { background: var(--accent); color: #fff; }
.deal-home .cal { margin: .2rem 0 .4rem; }   /* two up on a phone, one row of four beside the price on a laptop */
.deal-home .muted { font-size: .8rem; }
@media (min-width: 48rem) {
  .deal { grid-template-columns: 1fr auto; align-items: center; padding: .9rem 0; }
  .deal-home .cal { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .deal-side { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .75rem 1rem; }
  .deal-title { font-size: 1.25rem; }
}

/* Home picker */
/* minmax(0, 1fr): "Köpenhamn" is one long word, and a plain 1fr track grows to its min-content
   width, which pushed the whole home page 43 px wider than a 320 px screen. */
.picker { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.picker a { display: block; padding: 1rem; border: 1.5px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; background: #fff; }
.picker a:hover { border-color: var(--ink); }
.picker .name { display: block; font-family: var(--display); font-size: clamp(1.1rem, 4.5vw, 1.4rem); }
.picker .sub { color: var(--ink-2); font-size: .9rem; }
@media (min-width: 48rem) { .picker { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section-head h2 { margin-bottom: .25rem; }

/* Route page */
.fares table { width: 100%; border-collapse: collapse; }
.fares th, .fares td { text-align: left; padding: .6rem .4rem; border-top: 1px solid var(--line); vertical-align: middle; }
.fares th { font-size: .8rem; color: var(--ink-2); font-weight: 600; border-top: 0; }
.fares td.p { font-family: var(--display); font-size: 1.15rem; white-space: nowrap; }
.fares .days { color: var(--ink-2); font-weight: 400; }
.fares .btn { min-height: 40px; padding: .35rem .8rem; }
.table-scroll { overflow-x: auto; }
/* Phones: one card per date. Eight columns in a side-scroller left the booking button off-screen,
   so the whole point of the row was invisible. Cells in document order: ut, hem, bolag, stopp,
   från, hittat, pris, boka. */
@media (max-width: 47.99rem) {
  .fare-cards, .fare-cards thead, .fare-cards tbody, .fare-cards tr { display: block; }
  .fare-cards th { display: none; }
  .fare-cards th.sortable { display: block; padding: 0; }
  .fare-cards th.sortable .sortbtn { min-height: 44px; padding: 0 .2rem; }
  .fare-cards thead tr { display: flex; flex-wrap: wrap; gap: 0 1rem; }
  .fare-cards tbody tr { padding: .7rem 0; border-top: 1px solid var(--line); }
  .fare-cards tbody td { display: inline; border: 0; padding: 0; color: var(--ink-2); font-size: .95rem; }
  .fare-cards tbody td:nth-child(1), .fare-cards tbody td:nth-child(2) { color: var(--ink); font-weight: 600; }
  .fare-cards tbody td:nth-child(1)::after { content: "\00a0–\00a0"; font-weight: 400; }
  .fare-cards tbody td:nth-child(2)::after { content: ""; display: block; }  /* line break after the dates */
  /* Separator before every middle cell, so the route table (8 columns) and /sok (5) both read as a sentence. */
  .fare-cards tbody td:nth-child(n+4):not(.p):not(:last-child)::before { content: " · "; }
  .fare-cards tbody td:nth-child(6):not(.p):not(:last-child)::before { content: " · hittat "; }
  .fare-cards tbody td.p { display: block; margin-top: .35rem; color: var(--ink); font-size: 1.5rem; }
  .fare-cards tbody td:last-child { display: block; margin-top: .35rem; }
  .fare-cards .btn { min-height: 44px; }
}
.cal { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Stack the cell: month, price, dates, button. Inline flow let the button land on top of the price. */
.cal li { padding: .6rem .5rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; min-height: 44px; display: flex; flex-direction: column; align-items: flex-start; }
.cal .m { display: block; font-size: .75rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.cal .d { display: block; font-size: .8rem; color: var(--ink-2); }
.eu-form { max-width: 34rem; }
.eu-form .field input { display: block; width: 100%; min-height: 44px; margin-top: .25rem; padding: 0 .75rem; border: 1.5px solid var(--ink-2); border-radius: var(--radius); font: inherit; background: #fff; color: var(--ink); }
.eu-errors { color: var(--danger, #a12); font-weight: 600; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cal .btn-cal { display: inline-block; margin-top: .4rem; min-height: 36px; padding: .3rem .6rem; font-size: .85rem; }
.cal .p { font-family: var(--display); font-size: 1.1rem; }
.cal .none { background: var(--paper-2); color: var(--ink-2); }
.cal .none .p { font-family: var(--body); font-size: .8rem; font-style: italic; }
.cal .best { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal .best .p { color: var(--accent); }
@media (min-width: 48rem) { .cal { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
/* Route map: one cached basemap, per-page dots and arcs. Dot and stroke sizes come from the viewBox
   (build._map) so they stay the same on screen however far the map is zoomed. */
.routemap { margin: 1rem 0 1.5rem; }
.routemap svg { display: block; width: 100%; max-width: 520px; height: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #eee9dd; }
.routemap .dot { fill: var(--accent); stroke: var(--paper); }
.routemap .dot.hub { fill: var(--ink); }
.routemap a:hover .dot, .routemap a:focus-visible .dot { fill: var(--accent-dark); }
.routemap .arc { fill: none; stroke: var(--accent); stroke-linecap: round; opacity: .85; }
.routemap figcaption { margin-top: .4rem; font-size: .875rem; }

/* Price chart: a grid and a labelled price axis, so the size of a move is readable and not just its shape.
   Dot and text sizes are in viewBox units; the chart is 320 wide and caps at 520 px, so they land near 1:1.6. */
.spark { margin: 0; max-width: 520px; }
.spark svg { width: 100%; height: auto; display: block; overflow: visible; touch-action: pan-y; }
.spark svg:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.spark-grid { stroke: var(--line); stroke-width: 1; }
.spark-axis { fill: var(--ink-2); font-family: var(--body); font-size: 9px; font-variant-numeric: tabular-nums; }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark-pt { fill: var(--accent); }
.spark-cursor { fill: var(--accent); stroke: var(--paper); stroke-width: 1.5; }
.spark-guide { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 2 3; }
.spark-ref { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 4 3; }
.spark-ref-label { fill: var(--ink-2); }
.spark-readout { margin-top: .35rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.spark-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.facts { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); list-style: none; margin: 1rem 0; padding: 0; }
/* Visitors kept clicking the price and nothing happened (Ali's own testing, 2026-09-07), so the two facts
   with somewhere to go are links to that row. The whole box is the target, using the same stretched-link
   trick as the deal card, and the arrow is the affordance that was missing. */
.facts li { position: relative; padding: .75rem; background: var(--paper-2); border-radius: var(--radius); }
.facts a { color: inherit; text-decoration: none; }
.facts a::after { content: ""; position: absolute; inset: 0; }
.facts .k { display: block; font-size: .8rem; color: var(--ink-2); }
.facts .v { font-family: var(--display); font-size: 1.3rem; }
.facts .v.jump::after { content: " ↓"; font-size: .7em; color: var(--accent); }
.facts a:hover .v.jump, .facts a:focus-visible .v.jump { text-decoration: underline; }
.facts li:has(a):hover { background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); }

/* Landing on the row you asked for should be visible, and should not sit flush against the viewport edge. */
.fare-cards tbody tr:target, .cal li:target { box-shadow: inset 0 0 0 2px var(--accent); }
.fare-cards tbody tr:target, .cal li:target, #main [id] { scroll-margin-top: 1rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (min-width: 48rem) { .facts { grid-template-columns: repeat(4, 1fr); } }

/* Add-on blocks (R22) */
.addons { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.addons li { border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem; background: #fff; display: flex; flex-direction: column; gap: .4rem; }
.addons .k { font-size: .8rem; color: var(--ink-2); }
.addons a { align-self: flex-start; }
@media (min-width: 48rem) { .addons { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Signup */
.signup { margin: 2rem 0; padding: 1.25rem; border: 1.5px solid var(--ink); border-radius: var(--radius); background: #fff; max-width: 34rem; }
.signup h2 { margin-top: 0; }
.field { display: block; margin: 0 0 .75rem; font-weight: 600; }
.field input { display: block; width: 100%; min-height: 44px; margin-top: .25rem; padding: 0 .75rem; border: 1.5px solid var(--ink-2); border-radius: var(--radius); font: inherit; background: #fff; color: var(--ink); }
.airports.signup-airports, fieldset.airports { position: static; border: 0; padding: 0; margin: 0 0 .75rem; background: none; display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
fieldset.airports legend { font-weight: 600; padding: 0; margin-bottom: .25rem; }
.check { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; }
.check input { width: 1.25rem; height: 1.25rem; accent-color: var(--accent); }
.hp { position: absolute; left: -999px; }
.fine { font-size: .8rem; color: var(--ink-2); margin: .75rem 0 0; }

/* Country page: the month table is the original content, so it gets the price treatment the route table has.
   Five columns do not fit 320 px, so it scrolls inside .table-scroll like the fares table rather than
   pushing the page sideways. */
.months th, .months td { padding: .5rem .35rem; }
.months th[scope="row"] { white-space: nowrap; font-weight: 600; font-size: .85rem; color: var(--ink); }
.months td { white-space: nowrap; }
.months td.p { font-size: 1rem; }
.months td.p .muted { font-family: var(--body); font-size: .8rem; font-style: italic; }
.months .best { background: var(--paper-2); }
.months .best td.p { color: var(--accent); font-weight: 600; }
.cities .sub { white-space: nowrap; }
.alsosee { margin-top: -.5rem; }

/* Empty states and plain pages */
.empty { text-align: center; padding: 2rem 1rem; margin: 1rem 0; border: 1px dashed var(--line); border-radius: var(--radius); }
.empty p { font-size: 1.1rem; max-width: 30rem; margin: .5rem auto 1rem; }
.empty .signup { margin: 1rem auto 0; text-align: left; }
.prose { max-width: 44rem; }
.prose h2 { margin-top: 2rem; }
.plain { max-width: 40rem; margin: 3rem auto; text-align: center; }

/* Footer */
.foot { margin-top: 3rem; border-top: 1px solid var(--line); padding: 1.5rem 0 2rem; font-size: .875rem; color: var(--ink-2); }
.foot-line { display: flex; gap: .5rem; align-items: flex-start; }
.foot-nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-bottom: .75rem; }
.foot-nav a { color: var(--ink-2); min-height: 44px; display: inline-flex; align-items: center; }
.foot-small { margin: 0; }
