/* travel-calculator.com — shared styles */
:root {
  --ink: #12263a;
  --ink-soft: #3d5266;
  --muted: #66788a;
  --paper: #f7f4ee;
  --card: #ffffff;
  --line: #e2ddd3;
  --brand: #0f6e7a;
  --brand-dark: #0a4f58;
  --brand-tint: #e3f1f2;
  --accent: #f2a541;
  --accent-tint: #fdf1de;
  --good: #1f7a4a;
  --good-tint: #e4f4ea;
  --warn: #a8640a;
  --warn-tint: #fff3dc;
  --bad: #b3261e;
  --bad-tint: #fbe7e5;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(18, 38, 58, .06), 0 6px 24px rgba(18, 38, 58, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8eef3;
    --ink-soft: #c2ced8;
    --muted: #93a4b3;
    --paper: #0f1a24;
    --card: #162433;
    --line: #26394b;
    --brand: #4fb3bf;
    --brand-dark: #7fd0d9;
    --brand-tint: #133540;
    --accent: #f2a541;
    --accent-tint: #3a2b14;
    --good: #6fd19b;
    --good-tint: #133626;
    --warn: #f2b75a;
    --warn-tint: #3a2a10;
    --bad: #ff8a80;
    --bad-tint: #3d1a18;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 24px rgba(0,0,0,.25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.7rem); margin: 0 0 .5rem; }
h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); margin: 2.2rem 0 .7rem; }
h3 { font-size: 1.15rem; margin: 1.6rem 0 .4rem; }
p { margin: 0 0 1rem; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

/* Header */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.logo svg { width: 32px; height: 32px; flex: none; }
.logo span em { font-style: normal; color: var(--brand); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--ink-soft); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: .95rem; font-weight: 600; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--brand-tint); color: var(--brand-dark); }

/* Hero */
.hero { padding: 40px 0 24px; }
.hero .eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); background: var(--brand-tint); padding: 4px 10px; border-radius: 999px; margin-bottom: 12px; }
.hero .lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 640px; }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.breadcrumb a { color: var(--muted); }

/* Tool cards on homepage */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin: 8px 0 24px; }
.tool-card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease; }
.tool-card:hover { transform: translateY(-2px); border-color: var(--brand); color: var(--ink); }
.tool-card .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-tint); margin-bottom: 12px; font-size: 1.4rem; }
.tool-card h3 { margin: 0 0 6px; }
.tool-card p { color: var(--ink-soft); margin: 0 0 12px; font-size: .97rem; }
.tool-card .go { font-weight: 700; color: var(--brand); font-size: .95rem; }
.tool-card.soon { opacity: .7; box-shadow: none; border-style: dashed; pointer-events: none; }
.tool-card.soon .go { color: var(--muted); }

/* Calculator panel */
.calc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin: 8px 0 20px; }
.calc h2 { margin-top: 0; font-size: 1.2rem; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field label, .field .label { font-weight: 650; font-size: .92rem; color: var(--ink-soft); }
.field .hint { font-size: .82rem; color: var(--muted); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.input-group { display: flex; gap: 8px; }
.input-group > input { flex: 1 1 0; min-width: 4.5rem; }
.input-group > select { flex: 0 0 auto; width: auto; max-width: 62%; padding-right: 8px; }
.input-group > select#currency { width: 4.4rem; flex: 0 0 4.4rem; }
input[type="number"], input[type="date"], input[type="text"], select {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 46px; width: 100%;
}
input:focus, select:focus, button:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); outline-offset: 1px; border-color: var(--brand); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink-soft); margin: 4px 0 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }

.btn { font: inherit; font-weight: 700; border: 0; border-radius: 10px; padding: 12px 18px; min-height: 46px; cursor: pointer; background: var(--brand); color: #fff; }
.btn:hover { background: var(--brand-dark); }
@media (prefers-color-scheme: dark) { .btn { color: #08222a; } }
.btn-pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent); } 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 0%, transparent); } }
@media (prefers-reduced-motion: reduce) { .btn-pulse { animation: none; outline: 3px solid var(--accent); } }
.btn-ghost { background: transparent; color: var(--brand); border: 1.5px solid var(--line); }
.btn-ghost:hover { background: var(--brand-tint); color: var(--brand-dark); }
.btn-small { padding: 6px 12px; min-height: 36px; font-size: .9rem; }

.seg { display: inline-flex; background: var(--paper); border: 1.5px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; }
.seg button { font: inherit; font-weight: 700; font-size: .95rem; border: 0; background: transparent; color: var(--ink-soft); padding: 8px 16px; border-radius: 9px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--brand-dark); box-shadow: var(--shadow); }

/* Trips list */
.trip-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
@media (max-width: 560px) { .trip-form { grid-template-columns: 1fr 1fr; } .trip-form .btn { grid-column: 1 / -1; } }
.trips { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 8px; }
.trips li { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; flex-wrap: wrap; }
.trips .dates { font-weight: 650; }
.trips .days { color: var(--muted); font-size: .9rem; margin-left: 6px; font-weight: 500; }
.trips .remove { font: inherit; font-size: .88rem; background: none; border: 0; color: var(--bad); cursor: pointer; padding: 4px 6px; font-weight: 600; }
.empty { color: var(--muted); font-size: .95rem; margin: 12px 0 0; }
.error { color: var(--bad); font-size: .9rem; font-weight: 600; margin: 8px 0 0; min-height: 1em; }

/* Result "boarding pass" */
.result { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin: 0 0 20px; overflow: hidden; }
.result-head { background: var(--ink); color: var(--paper); padding: 14px 22px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (prefers-color-scheme: dark) { .result-head { background: #0a131c; color: var(--ink); } }
.result-head strong { letter-spacing: .08em; text-transform: uppercase; font-size: .82rem; }
.result-head span { font-family: var(--mono); font-size: .85rem; opacity: .85; }
.result-body { padding: 22px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.stat .k { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.stat .v { font-family: var(--mono); font-size: clamp(1.6rem, 5vw, 2.2rem); font-weight: 700; line-height: 1.15; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat .v small { font-size: .5em; color: var(--muted); font-weight: 600; margin-left: 2px; }
.stat.big .v { color: var(--brand); }
.perf { border: 0; border-top: 2px dashed var(--line); margin: 20px -22px; position: relative; }
.perf::before, .perf::after { content: ""; position: absolute; top: -12px; width: 22px; height: 22px; background: var(--paper); border-radius: 50%; border: 1px solid var(--line); }
.perf::before { left: -12px; } .perf::after { right: -12px; }
.notice { border-radius: 10px; padding: 12px 14px; font-weight: 600; margin: 0 0 14px; }
.notice.good { background: var(--good-tint); color: var(--good); }
.notice.warn { background: var(--warn-tint); color: var(--warn); }
.notice.bad { background: var(--bad-tint); color: var(--bad); }
.result p:last-child { margin-bottom: 0; }

/* 180-day strip */
.strip-wrap { margin-top: 6px; }
.strip { display: grid; grid-template-columns: repeat(180, 1fr); gap: 0; height: 34px; border-radius: 6px; overflow: hidden; background: var(--brand-tint); border: 1px solid var(--line); }
.strip i { background: var(--brand-tint); }
.strip i.on { background: var(--brand); }
.strip i.over { background: var(--bad); }
.strip-legend { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-top: 6px; font-family: var(--mono); }

/* Ad slots — reserve space to avoid layout shift */
.ad-slot { display: flex; align-items: center; justify-content: center; margin: 24px auto; min-height: 100px; width: 100%; background: repeating-linear-gradient(45deg, transparent 0 10px, color-mix(in srgb, var(--line) 45%, transparent) 10px 20px); border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.ad-slot--leaderboard { min-height: 100px; }
.ad-slot--rect { min-height: 280px; max-width: 336px; }
.ad-slot--incontent { min-height: 250px; }
/* Remove the dashed placeholder look once a real ad is inside */
.ad-slot:has(ins.adsbygoogle) { background: none; border: 0; }

/* Article content */
.content { padding-bottom: 20px; }
.content ul, .content ol { padding-left: 1.3rem; margin: 0 0 1rem; }
.content li { margin-bottom: .4rem; }
.callout { background: var(--accent-tint); border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; padding: 14px 18px; margin: 18px 0; }
.callout p:last-child { margin: 0; }
.example { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin: 16px 0; }
table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; font-size: .95rem; background: var(--card); border-radius: 10px; overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--brand-tint); color: var(--brand-dark); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.table-scroll { overflow-x: auto; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 12px 0; list-style-position: outside; }
.faq details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.updated { font-size: .85rem; color: var(--muted); }

/* Layout with sidebar on wide screens */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
@media (min-width: 980px) {
  .layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .sidebar { position: sticky; top: 20px; align-self: start; }
}
.sidebar .box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.sidebar h3 { margin-top: 0; font-size: 1rem; }
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.sidebar li:last-child { border-bottom: 0; }

/* Footer */
.site-footer { margin-top: 40px; background: var(--card); border-top: 1px solid var(--line); padding: 28px 0; font-size: .9rem; color: var(--muted); }
.site-footer .cols { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--ink-soft); }
.disclaimer { margin-top: 14px; font-size: .82rem; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .calc, .result-body { padding: 18px; }
  .perf { margin: 18px -18px; }
  .hero { padding: 28px 0 16px; }
}
