/* Reseknappen – stilmall. Inga externa typsnitt (snabbare och inga tredjepartsanrop). */
:root {
  --bg: #0f1419;
  --bg-elevated: #161e27;
  --bg-card: #1c2632;
  --bg-card-hover: #223041;
  --border: #2b3847;
  --border-strong: #3d4f63;
  --text: #f0f4f8;
  --text-muted: #a7b6c6;
  --text-dim: #8b9cae;
  --accent: #3dd6c6;
  --accent-deep: #178a7f;
  --accent-dim: rgba(61, 214, 198, 0.16);
  --accent-hover: #63e6d8;
  --on-accent: #06201d;
  --flight: #7db6e6;
  --hotel: #f0b48a;
  --warn: #f5c542;
  --danger: #ff8f8f;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 34px rgba(0, 0, 0, 0.35);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(61, 214, 198, 0.13), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(91, 159, 212, 0.08), transparent);
  background-repeat: no-repeat;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-hover); }
img, svg { max-width: 100%; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2rem); margin-inline: auto; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: 0.6rem 1rem;
  border-radius: var(--radius-sm); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

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

/* Header */
.site-header {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 20, 25, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 50;
}
@media (max-width: 639px) { .site-header { position: static; } }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1.5rem; }

.logo {
  display: inline-flex; align-items: center; gap: 0.6rem;
  text-decoration: none; color: var(--text);
  font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; letter-spacing: -0.02em;
}
.logo:hover { color: var(--text); }
.logo svg { width: 2.1rem; height: 2.1rem; flex: none; transition: transform 0.12s; }
.logo:hover svg { transform: translateY(1px); }
.logo .accent { color: var(--accent); }

.site-nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--text-muted); text-decoration: none; font-weight: 500; font-size: 0.95rem; padding: 0.3rem 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }

/* Hero */
.hero { padding: 2.5rem 0 1rem; }
.hero h1, .page-head h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.9rem, 4.4vw, 3rem); line-height: 1.1; letter-spacing: -0.025em;
  margin: 0 0 0.6rem;
}
.hero h1 .accent { color: var(--accent); }
.hero-sub { margin: 0 0 1.6rem; color: var(--text-muted); font-size: 1.08rem; max-width: 46rem; }

/* Search form */
.search-form {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px); padding: 1.15rem; box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.search-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }
.field-from, .field-to { grid-column: span 2; }
@media (min-width: 640px) {
  .search-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .field-from, .field-to { grid-column: span 2; }
}
@media (min-width: 1000px) {
  .search-grid { grid-template-columns: 1.1fr 1.7fr 1fr 1fr 0.7fr 0.8fr auto; align-items: start; }
  .search-actions { padding-top: 1.45rem; }
  .field-from, .field-to { grid-column: auto; }
}
.field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.field-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); }
.combo-box input { width: 100%; }
.field input, .field select {
  width: 100%; min-height: 2.9rem; padding: 0.65rem 0.8rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--bg-card); color: var(--text); font: inherit; font-size: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%), linear-gradient(135deg, var(--text-dim) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 1.8rem; }
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field input::placeholder { color: var(--text-dim); opacity: 1; }
.field-hint { font-size: 0.78rem; color: var(--text-dim); }

.search-actions { grid-column: 1 / -1; display: flex; }
@media (min-width: 1000px) { .search-actions { grid-column: auto; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-height: 2.9rem; padding: 0.65rem 1.35rem; border-radius: var(--radius-sm);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background 0.15s, transform 0.08s, box-shadow 0.15s, color 0.15s;
}
.btn-primary {
  border: none; background: var(--accent); color: var(--on-accent);
  box-shadow: 0 4px 0 var(--accent-deep);
}
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--accent-deep); }
.btn-ghost { background: transparent; border: 1.5px solid var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.search-actions .btn { width: 100%; }

.mode-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-top: 0.9rem; }
.mode-row legend { float: left; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); margin-right: 0.75rem; padding: 0; line-height: 2.2rem; }
fieldset.mode { border: 0; margin: 0; padding: 0; min-width: 0; }
.segmented { display: inline-flex; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.2rem; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span { display: block; padding: 0.4rem 0.85rem; border-radius: 6px; font-size: 0.9rem; font-weight: 600; color: var(--text-muted); }
.segmented input:checked + span { background: var(--accent-dim); color: var(--accent); }
.segmented input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 1px; }

.form-error { color: var(--danger); margin: 0.75rem 0 0; font-weight: 600; font-size: 0.95rem; }
.form-error:empty { display: none; }

/* Chips */
.presets h2 { margin: 0 0 0.35rem; font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; }
.presets-sub { margin: 0 0 0.9rem; color: var(--text-muted); font-size: 0.95rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.chip-row-label { margin: 1rem 0 0.5rem; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); }
.presets-sub + .chip-row-label { margin-top: 0; }

/* Resmålslista (kombinationsruta) */
.combo-box { position: relative; }
.combo-list {
  position: absolute; z-index: 40; top: calc(100% + 0.25rem); left: 0; width: max(100%, 19rem); max-width: calc(100vw - 2rem);
  max-height: min(22rem, 60vh); overflow-y: auto; margin: 0; padding: 0.35rem; list-style: none;
  background: #19232e; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.combo-list[hidden] { display: none; }
.combo-list ul { list-style: none; margin: 0; padding: 0; }
.combo-group { padding: 0.55rem 0.6rem 0.25rem; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); }
.combo-option { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.5rem 0.6rem; border-radius: 6px; cursor: pointer; }
.combo-option:hover, .combo-option.active { background: var(--accent-dim); }
.combo-option.active { outline: 2px solid var(--accent); outline-offset: -2px; }
.combo-main { font-weight: 600; }
.combo-sub { color: var(--text-muted); font-size: 0.85rem; white-space: nowrap; }
.combo-empty { padding: 0.6rem; color: var(--text-muted); font-size: 0.9rem; }
/* Flera resmål: taggar i fältet */
.token-box {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem;
  min-height: 2.9rem; padding: 0.3rem 0.4rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--bg-card); cursor: text;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.token-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.token-box:has(input[aria-invalid="true"]) { border-color: var(--danger); }
.field .token-box input {
  flex: 1 1 7rem; min-width: 6rem; width: auto; min-height: 2.1rem; padding: 0.2rem 0.4rem;
  border: 0; background: transparent; box-shadow: none;
}
.field .token-box input:focus { box-shadow: none; }
.tokens { display: flex; flex-wrap: wrap; flex: 1 1 100%; gap: 0.35rem; list-style: none; margin: 0; padding: 0.1rem 0 0; min-width: 0; }
.tokens[hidden] { display: none; }
.token {
  display: inline-flex; align-items: center; gap: 0.15rem; max-width: 100%;
  padding: 0.1rem 0.15rem 0.1rem 0.6rem; border-radius: 999px;
  background: var(--accent-dim); border: 1px solid rgba(61, 214, 198, 0.45);
  color: var(--text); font-size: 0.9rem; font-weight: 600; line-height: 1.3;
}
.token-group { border-style: dashed; }
.token-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.token-x {
  display: inline-grid; place-items: center; flex: none; width: 1.6rem; height: 1.6rem;
  border: 0; border-radius: 999px; background: transparent; color: var(--text-muted);
  font: inherit; font-size: 1.1rem; line-height: 1; cursor: pointer;
}
.token-x:hover { background: rgba(255, 255, 255, 0.1); color: var(--text); }
.chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  min-height: 2.75rem; padding: 0.55rem 1.05rem 0.6rem;
  border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--bg-card); color: var(--text);
  font: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer;
  box-shadow: 0 3px 0 #0a0f14;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.08s, box-shadow 0.08s;
}
.chip:hover { border-color: var(--accent); background: var(--bg-card-hover); }
.chip:active { transform: translateY(2px); box-shadow: 0 1px 0 #0a0f14; }
.chip[aria-pressed="true"] {
  background: var(--accent); border-color: var(--accent); color: var(--on-accent);
  box-shadow: 0 3px 0 var(--accent-deep);
}
.chip-icon { font-size: 1.05em; line-height: 1; }

/* Result panel */
.result-section { padding: 1.75rem 0 1rem; }
.result {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px); padding: 1.35rem; scroll-margin-top: 6rem;
}
.result:focus { outline: none; }
.result:focus-visible { outline: 3px solid var(--accent); }
.result-empty { color: var(--text-muted); margin: 0; }
.result-kicker { margin: 0 0 0.2rem; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.result h2 { margin: 0 0 0.3rem; font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; letter-spacing: -0.015em; }
.result-summary { margin: 0 0 0.4rem; color: var(--text-muted); }
.result-note { margin: 0.25rem 0 0; color: var(--warn); font-size: 0.92rem; }
.partner-grid { display: grid; gap: 1rem; margin-top: 1.1rem; }
@media (min-width: 820px) { .partner-grid.two { grid-template-columns: 1fr 1fr; } }
.partner-card {
  display: flex; flex-direction: column; gap: 0.75rem;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.15rem;
}
.partner-card h4 { margin: 0; font-size: 1.08rem; }
.partner-section { display: flex; align-items: center; gap: 0.55rem; margin: 1.6rem 0 0; font-size: 1.1rem; }
.result .partner-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); margin-top: 0.8rem; }
.partner-unavailable { margin: 0; color: var(--text-muted); font-size: 0.94rem; }
.partner-hint { margin: 0.4rem 0 0; color: var(--text-dim); font-size: 0.9rem; }
.btn-partner { min-height: 2.6rem; padding: 0.5rem 1rem; font-size: 0.95rem; }
.suggest { margin-top: 1.1rem; padding: 0.9rem 1rem; border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.suggest-title { margin: 0 0 0.15rem; font-size: 1rem; }
.suggest-sub { margin: 0 0 0.7rem; color: var(--text-muted); font-size: 0.9rem; }
.suggest-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.suggest-row + .suggest-row { margin-top: 0.6rem; }
.suggest-label { min-width: 6.5rem; font-size: 0.85rem; font-weight: 700; color: var(--text-muted); }
.link-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.link-group { margin-top: auto; display: grid; gap: 0.4rem; }
.partner-card .link-row .btn { margin-top: 0; padding: 0.45rem 0.8rem; }
.chip-small { min-height: 2.4rem; padding: 0.35rem 0.85rem; font-size: 0.9rem; box-shadow: 0 2px 0 #0a0f14; }
.badge { display: inline-block; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.18rem 0.5rem; border-radius: 5px; }
.badge-flight { background: rgba(125, 182, 230, 0.18); color: var(--flight); }
.badge-hotel { background: rgba(240, 180, 138, 0.18); color: var(--hotel); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; font-size: 0.94rem; }
.checklist li { position: relative; padding-left: 1.6rem; }
.checklist li::before { position: absolute; left: 0; top: 0; width: 1.2rem; text-align: center; font-weight: 800; }
.checklist .done::before { content: "✓"; color: var(--accent); }
.checklist .todo { color: var(--text-muted); }
.checklist .todo::before { content: "→"; color: var(--warn); }
.checklist-title { margin: 0.2rem 0 -0.3rem; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); }
.partner-card .btn { align-self: flex-start; margin-top: auto; }
.partner-fine { margin: 0; font-size: 0.82rem; color: var(--text-dim); }
.partner-card.muted { opacity: 0.9; }
.partner-card.muted p { margin: 0; color: var(--text-muted); }
.disclosure-inline { margin: 1rem 0 0; font-size: 0.85rem; color: var(--text-dim); }

/* Sections */
.section { padding: 2.5rem 0; }
.section h2 { font-family: var(--font-display); font-size: clamp(1.4rem, 2.6vw, 1.85rem); font-weight: 800; letter-spacing: -0.015em; margin: 0 0 0.4rem; }
.section-sub { color: var(--text-muted); margin: 0 0 1.3rem; }

.steps { display: grid; gap: 1rem; list-style: none; margin: 0; padding: 0; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.15rem; }
.steps li::before {
  content: counter(step); display: inline-grid; place-items: center; width: 2rem; height: 2rem; margin-bottom: 0.5rem;
  border-radius: 9px; background: var(--accent); color: var(--on-accent); font-weight: 800; box-shadow: 0 3px 0 var(--accent-deep);
}
.steps h3 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.steps p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

.inspo-grid { display: grid; gap: 0.85rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); list-style: none; margin: 0; padding: 0; }
.inspo-card {
  display: flex; flex-direction: column; gap: 0.35rem; height: 100%;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem;
}
.inspo-card h3 { margin: 0; font-size: 1.1rem; }
.inspo-meta { margin: 0; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); }
.inspo-card p.desc { margin: 0 0 0.4rem; color: var(--text-muted); font-size: 0.93rem; }
.inspo-card .btn { margin-top: auto; align-self: flex-start; min-height: 2.5rem; padding: 0.45rem 0.95rem; font-size: 0.9rem; }

.note-box { background: var(--bg-elevated); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--radius-sm); padding: 1rem 1.15rem; color: var(--text-muted); }
.note-box p { margin: 0.3rem 0; }

/* Text pages */
.page-head { padding: 2.5rem 0 0.5rem; }
.page-head p { color: var(--text-muted); font-size: 1.08rem; margin: 0; }
.prose { padding: 1rem 0 3rem; }
.prose h2 { font-family: var(--font-display); font-size: 1.35rem; font-weight: 800; margin: 2rem 0 0.5rem; letter-spacing: -0.01em; }
.prose h3 { font-size: 1.05rem; margin: 1.4rem 0 0.4rem; }
.prose p, .prose li { color: #d3dde7; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: 0.3rem 0; }
.table-wrap { overflow-x: auto; margin: 1rem 0; border: 1px solid var(--border); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
th, td { text-align: left; vertical-align: top; padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--border); }
th { background: var(--bg-card); color: var(--text); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
td { color: #d3dde7; }
.updated { color: var(--text-dim); font-size: 0.9rem; }

/* Footer */
.site-footer { padding: 2rem 0 2.5rem; border-top: 1px solid var(--border); margin-top: 1rem; font-size: 0.9rem; color: var(--text-dim); }
.footer-grid { display: grid; gap: 1.25rem; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr; } }
.site-footer p { margin: 0.3rem 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; }
.footer-links a, .link-button { color: var(--text-muted); }
.link-button { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; text-underline-offset: 0.15em; cursor: pointer; }
.link-button:hover, .footer-links a:hover { color: var(--accent); }

/* Cookie notice */
.cookie-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 90;
  max-width: 44rem; margin-inline: auto;
  background: #19232e; border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.55); padding: 1rem 1.15rem;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner h2 { margin: 0 0 0.3rem; font-size: 1rem; }
.cookie-banner p { margin: 0 0 0.8rem; font-size: 0.9rem; color: var(--text-muted); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.cookie-actions .btn { min-height: 2.5rem; padding: 0.45rem 1.1rem; }
.cookie-banner p.cookie-status { margin: -0.4rem 0 0.8rem; color: var(--text-dim); font-size: 0.85rem; }
.cookie-banner p.cookie-status:empty { display: none; }
.prose .link-button { color: var(--accent); }

noscript .note-box { margin-bottom: 1rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media (max-width: 639px) { .suggest-label { flex-basis: 100%; } }
