:root {
  --ink: #1d2327;
  --muted: #69737a;
  --line: #e2e5e8;
  --soft: #f6f7f8;
  --accent: #1f5f8b;
  --warn: #9a5b00;
  --warn-bg: #fff4e0;
  --ok: #1e6b3a;
  --ok-bg: #e5f4ea;
  --bad: #9b1c1c;
  --bad-bg: #fde8e8;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.45 var(--font); color: var(--ink); background: #fff; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* Holding + login */
body.centre { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--soft); }
.holding { text-align: center; padding: 2rem; }
.holding h1 { font-size: 2rem; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 .4rem; }
.holding p { margin: 0; color: var(--muted); }
.foot { position: fixed; bottom: 1rem; font-size: 12px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 1.75rem; width: min(340px, 92vw); }
.card h1 { font-size: 1.25rem; margin: 0; }
.card p { margin: .25rem 0 1rem; }
.card label { display: block; font-size: 12px; font-weight: 600; margin: .75rem 0 .25rem; }
.card input { width: 100%; padding: .55rem .6rem; font: inherit; border: 1px solid #c8cdd1; border-radius: 5px; }
.card input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.card button { margin-top: 1.1rem; width: 100%; padding: .6rem; font: inherit; font-weight: 600; color: #fff; background: var(--accent); border: 0; border-radius: 5px; cursor: pointer; }
.card button:hover { filter: brightness(1.1); }
.error { background: var(--bad-bg); color: var(--bad); padding: .5rem .65rem; border-radius: 5px; font-size: 13px; }

/* Admin */
body.admin { font-size: 13px; background: #fff; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 1.5rem; padding: .5rem 1.25rem; background: #fff; border-bottom: 1px solid var(--line); }
.topbar .brand { font-weight: 700; }
.topbar nav { display: flex; gap: 1rem; flex: 1; }
.topbar nav a { text-decoration: none; color: var(--ink); }
.topbar nav a:hover { color: var(--accent); }
form.inline { display: flex; align-items: center; gap: .6rem; margin: 0; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; }
.wrap { max-width: 1480px; margin: 0 auto; padding: 1rem 1.25rem 3rem; }
h1 { font-size: 1.35rem; margin: .5rem 0 .25rem; letter-spacing: -0.01em; }
h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1.75rem 0 .6rem; padding-bottom: .3rem; border-bottom: 1px solid var(--line); }
.meta { margin: 0; color: var(--muted); }
section[id] { scroll-margin-top: 3rem; }

.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 3px; white-space: nowrap; }
.tag.sg { background: #e6eef6; color: #1f4f78; }
.tag.coach { background: #f0eafa; color: #59378f; }
.tag.draft { background: var(--warn-bg); color: var(--warn); }
.tag.rail { background: #e3f2f1; color: #1d625c; }
.tag.air { background: #fdeee4; color: #8a4513; }
.tag.cruise { background: #e4ecfb; color: #2a4a8f; }
.tag.multi { background: var(--ink); color: #fff; }
td.multi { font-weight: 700; }
.changes { margin: .75rem 0 0; padding: .5rem .8rem; background: var(--soft); border-left: 3px solid var(--accent); border-radius: 0 5px 5px 0; }
.changes ul { margin: .2rem 0 0; padding-left: 1.1rem; }
.changes li { margin: 0 0 .1rem; }
.summary tr.grp td { border-top: 2px solid #cfd5da; }
.tour .basis { font-size: 11px; font-weight: 400; color: var(--muted); text-align: right; }
table.itin tr.day td { padding-top: .55rem; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); border-bottom: 1px solid var(--line); }
table.itin tr.overnight td { color: var(--muted); font-style: italic; background: #fafbfc; }
.sup { display: inline-block; font-size: 11px; font-weight: 600; padding: 0 6px; border-radius: 3px; }
.sup.yes { background: var(--ok-bg); color: var(--ok); }
.sup.adjust { background: #eef4e2; color: #4b6a12; }
.sup.partial { background: var(--warn-bg); color: var(--warn); }
.sup.no { background: var(--bad-bg); color: var(--bad); }
.grade { display: inline-block; width: 1.35em; text-align: center; font-weight: 700; border-radius: 3px; font-size: 11px; }
.grade.g1 { background: var(--ok-bg); color: var(--ok); }
.grade.g2 { background: var(--warn-bg); color: var(--warn); }
.grade.g3 { background: var(--bad-bg); color: var(--bad); }

table { border-collapse: collapse; width: 100%; }
.scroll { overflow-x: auto; }
.summary { font-size: 12px; }
.summary th { text-align: left; font-weight: 600; color: var(--muted); background: var(--soft); padding: .35rem .45rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.summary td { padding: .35rem .45rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.summary tbody tr:hover { background: #fafbfc; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.t { font-variant-numeric: tabular-nums; white-space: nowrap; }
td.warn { color: var(--warn); font-weight: 700; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; white-space: nowrap; }
.legend { margin: .4rem 0 0; }

.tour { border: 1px solid var(--line); border-radius: 6px; margin: 0 0 1rem; break-inside: avoid; scroll-margin-top: 3rem; }
.tour > header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 1rem; padding: .6rem .85rem; background: var(--soft); border-bottom: 1px solid var(--line); border-radius: 6px 6px 0 0; }
.tour .title { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem; }
.tour h3 { margin: 0; font-size: 1rem; }
.tour .price { font-weight: 700; font-variant-numeric: tabular-nums; }
.tour .price .muted { font-weight: 400; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; margin: 0; border-bottom: 1px solid var(--line); }
.facts > div { padding: .4rem .85rem; border-right: 1px solid var(--line); }
.facts dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.facts dd { margin: 0; }
.cols { display: grid; grid-template-columns: 1.35fr 1fr 1fr; }
.col { padding: .55rem .85rem .75rem; border-right: 1px solid var(--line); min-width: 0; }
.col:last-child { border-right: 0; }
.col h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: .6rem 0 .25rem; }
.col h4:first-child { margin-top: .1rem; }
.col h4.flag { color: var(--warn); }
.col ul { margin: 0; padding-left: 1.05rem; }
.col li { margin: 0 0 .15rem; }
.col p { margin: 0 0 .35rem; }
ul.flags li::marker { color: var(--warn); }
table.itin td { padding: .22rem .4rem .22rem 0; border-bottom: 1px dotted var(--line); vertical-align: top; }
table.itin tr:last-child td { border-bottom: 0; }
table.itin td.t { width: 3.4rem; color: var(--muted); }
.dwell { font-size: 11px; font-weight: 600; color: var(--accent); background: #e6eef6; padding: 0 5px; border-radius: 3px; margin-left: .25rem; }
.note { color: #3e474d; }
table.extras td { padding: .15rem 0; border-bottom: 1px dotted var(--line); }
table.extras td.num { padding-left: .5rem; }

.assume { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: .5rem 1.5rem; margin: 0; }
.assume dt { font-weight: 700; font-size: 12px; }
.assume dd { margin: 0; color: #3e474d; }

@media (max-width: 1000px) {
  .cols { grid-template-columns: 1fr; }
  .col { border-right: 0; border-bottom: 1px solid var(--line); }
  .col:last-child { border-bottom: 0; }
  .topbar nav { display: none; }
}
@media print {
  .topbar { display: none; }
  body.admin { font-size: 10.5px; }
  .wrap { max-width: none; padding: 0; }
  .tour { page-break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
