/* deals wing styles. Loaded after style.css and wings.css (shared tokens and components live there). */

/* ---------- quote lines: one typeset line per destination (serif city, dotted leader, serif price) ----------
   Used by the home strip, which the Worker renders (src/render-deals.ts dealsStrip). Tokens only, no boxes. */
.quotes-sub { margin-block: 0 8px; color: var(--muted); font-size: 0.875rem; }
.quotes { list-style: none; margin: 0; padding: 0; border-block-start: 1px solid var(--line); }
.quotes li { border-block-end: 1px solid var(--line); }
.quote { display: block; padding-block: 12px; color: var(--text); text-decoration: none; }
.quote-row { display: flex; align-items: baseline; gap: 8px; }
.quote-city { font-family: var(--serif); font-weight: 600; font-size: 1.375rem; line-height: 1.2; }
.quote-lead { flex: 1 1 16px; min-width: 16px; border-block-end: 2px dotted var(--axis); transform: translateY(-0.3em); }
.quote-price { font-family: var(--serif); font-weight: 600; font-size: 1.5rem; line-height: 1.2; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.quote-meta { display: block; margin-block-start: 2px; color: var(--text-2); font-size: 0.9375rem; }
.quote:hover { color: var(--text); }
.quote:hover .quote-city, .quote:hover .quote-price { color: var(--accent); }
.quote:hover .quote-city { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
/* shortcuts under the lines: each already says how many destinations it leads to */
.quote-cuts { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; column-gap: 24px; }
.quote-cuts a { display: inline-block; padding-block: 10px; line-height: 1.5; } /* 44 px tall; inline text, so the underline and the spacing stay whole */
@media (min-width: 700px) {
  /* six lines read down two columns: 1-3, then 4-6 */
  .quotes { display: grid; grid-template-rows: repeat(3, auto); grid-auto-flow: column; grid-auto-columns: 1fr; column-gap: 40px; }
}

/* ---------- the price board (/deals), public/w-deals.js ----------
   Paper and ink: a double rule above the counting headline and above the board, hairlines between the lines,
   no boxes. Engravings (month bars, price histogram) are SVG: solid = included, hatched outline = excluded,
   the digit 0 = nothing left. Tokens only, so light and dark follow by themselves. */
.d-head { padding-block-end: 0; }
.page-head p.d-dl { margin: 0; max-width: none; color: var(--muted); font-size: 0.875rem; line-height: 1.5; }
html:not(.js) .d-load, html.js .deals-app > .notice[data-i18n] { display: none; }
.deals-app .defs { position: absolute; }
.deals-app .hist { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0 16px; color: var(--muted); font-size: 0.875rem; line-height: 1.5; }
.deals-app .ruler { flex: none; margin-block-start: 3px; color: var(--text); }
.deals-app .t1 { fill: currentColor; stroke: currentColor; }
.deals-app .t0 { fill: none; stroke: var(--muted); }

/* the counting headline: the result itself, the largest thing on the page */
.deals-app .top { border-block-start: 3px double var(--rule); padding-block: 14px 4px; }
.deals-app .cnt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0; }
.deals-app .cnt-n { font-family: var(--serif); font-weight: 600; font-size: clamp(3.25rem, 2.4rem + 4vw, 4.75rem); line-height: 0.95; font-variant-numeric: tabular-nums lining-nums; }
.deals-app .cnt-l { font-size: 1rem; font-weight: 600; }
.deals-app .cnt-sub { margin: 4px 0 0; color: var(--text-2); font-size: 0.9375rem; }
.deals-app .ink .cnt-n { animation: d-ink 120ms ease-out; }
@keyframes d-ink { from { opacity: 0.55; } to { opacity: 1; } }
@keyframes d-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes d-press { from { transform: rotate(-3deg) scale(1.12); } to { transform: rotate(-3deg) scale(1); } }

/* text buttons and links that stand on their own line: a full 44 px target */
.deals-app .lk { font: inherit; font-size: 0.9375rem; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--text); cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--axis); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.deals-app .lk:hover { color: var(--accent); text-decoration-color: currentColor; }

/* active filters, the limiting one named in words; the loosenings under them */
.deals-app .act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block-start: 10px; }
.deals-app .hint { margin: 0; color: var(--muted); font-size: 0.9375rem; }
.deals-app .ac, .deals-app .lz { font: inherit; font-size: 0.9375rem; line-height: 1.3; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid var(--axis); border-radius: 22px; background: transparent; color: var(--text); cursor: pointer; text-align: start; }
.deals-app .ac:hover, .deals-app .lz:hover { border-color: var(--text); background: var(--surface-2); }
.deals-app .ac .x { font-size: 1.25rem; line-height: 1; }
.deals-app .ac .tg { font-size: 0.75rem; font-weight: 600; padding-inline-start: 8px; border-inline-start: 1px solid var(--axis); }
.deals-app .lz { border-color: var(--text); font-weight: 600; }
.deals-app .top .notice { margin: 10px 0 0; }
.deals-app .dk, .deals-app .undo { margin: 10px 0 0; font-size: 0.9375rem; }
.deals-app .dk { font-weight: 600; }
.deals-app .dk2 { margin: 2px 0 0; font-size: 0.9375rem; color: var(--text-2); }
.deals-app .lzs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.deals-app .undo .lk { margin-inline-start: 8px; font-weight: 600; }

/* ---- filters: short questions, native inputs under engraved labels ---- */
.deals-app .rail { margin-block-start: 12px; border-block-start: 1px solid var(--line); }
.deals-app .fs { min-width: 0; margin: 16px 0 0; padding: 0; border: 0; }
.deals-app .ft { float: inline-start; padding: 0; color: var(--muted); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.04em; line-height: 1.6; }
.deals-app .cap { margin: 0; min-height: 1.6em; text-align: end; color: var(--text-2); font-size: 0.8125rem; line-height: 1.6; }
.deals-app .mos, .deals-app .lens, .deals-app .opts, .deals-app .hg, .deals-app .place input { clear: both; }
.deals-app .note { margin: 6px 0 0; color: var(--muted); font-size: 0.8125rem; line-height: 1.5; }
.deals-app .note:empty { margin: 0; } /* a status line that waits for its words: in the page, taking no room */
.deals-app .mo input, .deals-app .fc input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
/* six months to a row; fewer when the visitor's own text size leaves no room for six (a price never runs into its neighbour) */
.deals-app .mos { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(3.25rem, calc(100% / 6 - 0.1px)), 1fr)); row-gap: 6px; padding-block-start: 6px; }
.deals-app .mo { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 68px; padding: 4px 0; border-block-start: 2px solid transparent; color: var(--text-2); cursor: pointer; }
.deals-app .mo-n { font-size: 0.8125rem; line-height: 1.3; white-space: nowrap; }
.deals-app .mo-p { font-family: var(--serif); font-size: 0.9375rem; line-height: 1.2; font-variant-numeric: tabular-nums lining-nums; color: var(--text); }
.deals-app .mo.on { border-block-start-color: var(--text); color: var(--text); font-weight: 600; }
.deals-app .mo.zero .mo-p { color: var(--muted); }
.deals-app .eng { display: block; color: var(--text-2); }
.deals-app .mo.on .eng, .deals-app .hg.on { color: var(--text); }
.deals-app .bl { stroke: var(--axis); stroke-width: 1; }
.deals-app .eng rect.off { stroke: var(--muted); stroke-width: 1; }
.deals-app .hl { stroke: var(--muted); stroke-width: 1.5; }
.deals-app .mo:focus-within, .deals-app .fc:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
@supports selector(:has(a)) {
  .deals-app .mo:focus-within, .deals-app .fc:focus-within { outline: none; }
  .deals-app .mo:has(:focus-visible), .deals-app .fc:has(:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
}
.deals-app .lens { display: grid; grid-template-columns: repeat(auto-fit, minmax(max(4.2rem, calc(25% - 5px)), 1fr)); gap: 6px; padding-block-start: 6px; }
.deals-app .opts { display: flex; flex-wrap: wrap; gap: 6px; padding-block-start: 6px; }
.deals-app .fc { position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 6px 14px; border: 1px solid var(--axis); border-radius: 22px; font-size: 0.9375rem; line-height: 1.25; text-align: center; cursor: pointer; }
.deals-app .lens .fc { padding-inline: 2px; font-size: 0.875rem; }
.deals-app .fc:hover { border-color: var(--text); }
.deals-app .fc b { font-family: var(--serif); font-weight: 600; font-variant-numeric: tabular-nums lining-nums; }
.deals-app .fc small { color: var(--muted); font-size: 0.75rem; line-height: 1.3; }
.deals-app .fc.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.deals-app .fc.on small { color: inherit; }
.deals-app .hg { width: calc(100% - 16px); margin-inline: 8px; margin-block-start: 4px; }
.deals-app .price input { display: block; width: 100%; min-height: 44px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.deals-app .more { margin-block-start: 8px; border-block: 1px solid var(--line); padding-block-end: 12px; }
.deals-app .more:not([open]) { padding-block-end: 0; }
.deals-app .more > summary, .deals-app .how > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; cursor: pointer; list-style: none; }
.deals-app summary::-webkit-details-marker { display: none; }
.deals-app summary::before { content: "+"; flex: none; width: 1ch; font-family: var(--serif); font-size: 1.25rem; line-height: 1; text-align: center; }
.deals-app details[open] > summary::before { content: "\2212"; }
.deals-app .more .fs { margin-block-start: 18px; }
.deals-app .more .fs:first-of-type { margin-block-start: 4px; }
.deals-app .place input { display: block; width: 100%; min-height: 44px; margin-block-start: 6px; padding: 8px 10px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--muted); border-radius: var(--radius); }
.deals-app .place input::placeholder { color: var(--muted); opacity: 1; }
.deals-app .place input[aria-invalid="true"] { border-width: 2px; border-color: var(--text); }
.deals-app .place .lzs { margin-block-start: 6px; }
.deals-app .skip-res { position: absolute; inset-inline-start: -10000px; }
.deals-app .skip-res:focus { position: static; display: inline-flex; align-items: center; min-height: 44px; }

/* ---- the board: one typeset line per destination ---- */
.deals-app .res { margin-block-start: 24px; }
.deals-app .bh { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 12px; border-block-start: 3px double var(--rule); padding-block-start: 8px; }
.deals-app .bh h2 { margin: 0; font-size: 1.375rem; white-space: nowrap; }
.deals-app .sort { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--muted); font-size: 0.875rem; }
.deals-app .sort select { min-width: 0; max-width: 100%; font: inherit; min-height: 44px; padding: 6px 8px; color: var(--text); background: var(--bg); border: 1px solid var(--axis); border-radius: var(--radius); }
.deals-app .board { list-style: none; margin: 0; padding: 0; animation: d-fade 150ms ease-out; }
.deals-app .ln { display: grid; grid-template-columns: minmax(0, auto) minmax(16px, 1fr) auto; align-items: baseline; column-gap: 8px; padding-block: 14px; border-block-end: 1px solid var(--line); }
.deals-app .g1a { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 1.375rem; line-height: 1.2; overflow-wrap: anywhere; }
.deals-app .ldr { border-block-end: 2px dotted var(--axis); transform: translateY(-0.3em); }
.deals-app .pr { font-family: var(--serif); font-weight: 600; font-size: 1.5rem; line-height: 1.2; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.deals-app .meta2, .deals-app .st2, .deals-app .tags, .deals-app .act2, .deals-app .more2 { grid-column: 1 / -1; margin: 0; }
.deals-app .meta2 { margin-block-start: 2px; color: var(--text-2); font-size: 0.9375rem; }
.deals-app .st2 { color: var(--text-2); font-size: 0.875rem; }
/* the safety link: a 44 px target without moving a line or widening its focus ring. The area that takes the tap
   reaches up over the meta line, which holds nothing to tap, and stops short of the buttons below. */
.deals-app .st2 a { position: relative; }
.deals-app .st2 a::before { content: ""; position: absolute; inset: -19px 0 -8px; }
.deals-app .air { white-space: nowrap; }
.deals-app .act2 { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; margin-block-start: 8px; }
.deals-app .xb::after { content: ""; width: 6px; height: 6px; margin-inline-start: 8px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }
.deals-app .xb[aria-expanded="true"]::after { transform: translateY(2px) rotate(225deg); }
.deals-app .stamp { display: inline-block; margin-inline-end: 6px; padding: 2px 8px; border: 3px double var(--accent); color: var(--accent); font-family: var(--serif); font-weight: 700; font-size: 0.8125rem; line-height: 1.3; transform: rotate(-3deg); }
.deals-app .stamp.new { animation: d-press 180ms ease-out; }
.deals-app .more2 { margin-block-start: 6px; border-block-start: 1px dotted var(--axis); }
.deals-app .xr { list-style: none; margin: 0; padding: 0; }
.deals-app .xr li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 4px 12px; padding-block: 6px; border-block-end: 1px dotted var(--line); font-size: 0.9375rem; color: var(--text-2); }
.deals-app .xp { font-family: var(--serif); font-weight: 600; font-size: 1.125rem; color: var(--text); font-variant-numeric: tabular-nums lining-nums; }
.deals-app .btn.sm { padding: 6px 12px; font-size: 0.9375rem; }
.deals-app .xl, .deals-app .side { display: flex; flex-wrap: wrap; gap: 0 20px; margin: 0; }
.deals-app .act2 > .side { flex-basis: 100%; }
.deals-app .xl > .side { display: contents; }
.deals-app .xd { display: block; color: var(--text); font-weight: 600; }
.deals-app .morep { margin: 16px 0 0; }
.deals-app .tags { margin-block-start: 6px; }
.deals-app .nt { display: inline-block; margin-block: 2px; padding: 0 8px; border: 1px solid var(--muted); border-radius: var(--radius); color: var(--text); font-size: 0.8125rem; line-height: 1.7; }
.deals-app .zh { margin: 14px 0 0; font-family: var(--serif); font-weight: 600; font-size: 1.375rem; line-height: 1.3; }
.deals-app .nearh { margin: 24px 0 0; padding-block-end: 6px; border-block-end: 1px solid var(--rule); color: var(--muted); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.04em; }
.deals-app .skel li { display: flex; align-items: center; height: 76px; border-block-end: 1px solid var(--line); }
.deals-app .skel span { flex: 1; border-block-end: 2px dotted var(--line); }
.deals-app .d-load { margin-block: 12px 0; }
.deals-app .d-post { margin-block-start: 16px; }
.deals-app .d-post textarea { width: 100%; font: inherit; font-size: 0.9375rem; color: var(--text); background: var(--bg); border: 1px solid var(--muted); }

/* ---- the alert card ---- */
.deals-app .al { margin-block-start: 28px; padding-block-start: 12px; border-block-start: 3px double var(--rule); }
.deals-app .al h2 { margin: 0 0 8px; font-size: 1.375rem; }
.deals-app .al-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.deals-app .al p { margin: 6px 0; }
.deals-app .al-row p { margin: 0; }
.deals-app .stp { display: inline-flex; align-items: stretch; direction: ltr; }
.deals-app .stp button { width: 44px; min-height: 44px; padding: 0; font: inherit; font-size: 1.25rem; line-height: 1; color: var(--text); background: transparent; border: 1px solid var(--text); border-radius: 0; cursor: pointer; }
.deals-app .stp button:hover { background: var(--surface-2); }
.deals-app .tw { display: inline-flex; align-items: center; gap: 2px; padding-inline: 10px 4px; border-block: 1px solid var(--text); font-family: var(--serif); font-weight: 600; font-size: 1.25rem; }
.deals-app .tw input { width: 5ch; min-height: 44px; padding: 0; font: inherit; color: var(--text); background: transparent; border: 0; -moz-appearance: textfield; appearance: textfield; font-variant-numeric: tabular-nums lining-nums; }
.deals-app .tw input::-webkit-outer-spin-button, .deals-app .tw input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.deals-app .al-for { color: var(--text-2); font-size: 0.9375rem; }
.deals-app .al .status { min-height: 0; }
.deals-app .al .status .lk { margin-inline-start: 4px; }
.deals-app .al .btn[aria-disabled="true"] { background: transparent; color: var(--muted); border-color: var(--muted); border-style: dashed; cursor: default; }
.deals-app .al .status:empty { display: none; }
.deals-app .foot { margin: 28px 0 0; padding-block-start: 10px; border-block-start: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; line-height: 1.6; max-width: 44rem; }
.deals-app .how { max-width: 44rem; }
.deals-app .how p { font-size: 0.9375rem; color: var(--text-2); }
.deals-app .grp { margin-block-start: 8px; }

/* ---- bottom bar (phones): the count stays in sight while the headline is off screen ---- */
.deals-app .bar { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 50; display: flex; align-items: center; gap: 8px; padding: 8px var(--gutter) calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--bg); border-block-start: 2px solid var(--rule); }
.deals-app .bar-t { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 0.9375rem; font-weight: 600; line-height: 1.3; }
.deals-app .bar-b { flex: none; min-width: 44px; min-height: 44px; padding: 6px 12px; font: inherit; font-size: 0.9375rem; color: var(--text); background: transparent; border: 1px solid var(--text); border-radius: var(--radius); cursor: pointer; }
.deals-app .bar-b:last-child { background: var(--text); color: var(--bg); font-weight: 600; }
.deals-app .bar-t .lk { justify-content: flex-start; font-weight: 600; text-align: start; line-height: 1.3; }
/* a very short window (a phone on its side, a 400% zoom): the bar would take a third of it */
@media (max-height: 420px) { .deals-app .bar { display: none; } }

/* ---- desktop: a sticky filter rail beside the board; each line is a table row (city, dates, stops, price, booking)
   with its status sentence on a second row, because the board column is 620 px and a status can be a full sentence ---- */
@media (min-width: 960px) {
  .deals-app .bar { display: none; }
  .deals-app .cols { display: grid; grid-template-columns: 320px minmax(0, 1fr); column-gap: 40px; align-items: start; margin-block-start: 14px; border-block-start: 3px double var(--rule); }
  /* the rail scrolls by itself, so it clips: 6 px of room on each side keep the focus rings of its outer cells whole */
  .deals-app .rail { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; margin: 0 -6px; padding: 4px 6px 16px; border: 0; }
  .deals-app .more { border-block-end: 0; }
  .deals-app .more > summary { cursor: default; }
  .deals-app .more > summary::before, .deals-app .more[open] > summary::before { content: none; }
  .deals-app .res { margin: 0; }
  .deals-app .bh { border: 0; padding-block-start: 12px; }
  .deals-app .ln { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, 1.2fr) auto auto; align-items: center; column-gap: 12px; padding-block: 10px 6px; }
  .deals-app .ldr, .deals-app .meta2 > .sep { display: none; }
  .deals-app .meta2, .deals-app .act2 { display: contents; }
  .deals-app .meta2 > span { font-size: 0.875rem; line-height: 1.45; color: var(--text-2); }
  .deals-app .g1a { grid-area: 1 / 1; align-self: end; font-size: 1.25rem; }
  .deals-app .g1b { grid-area: 2 / 1; align-self: start; }
  .deals-app .g2a { grid-area: 1 / 2; align-self: end; }
  .deals-app .g2b { grid-area: 2 / 2; align-self: start; }
  .deals-app .g3a { grid-area: 1 / 3; align-self: end; }
  .deals-app .g3b { grid-area: 2 / 3; align-self: start; justify-self: start; }
  .deals-app .pr { grid-area: 1 / 4 / 3 / 5; justify-self: end; }
  .deals-app .act2 > .btn { grid-area: 1 / 5 / 3 / 6; }
  .deals-app .st2 { grid-area: 3 / 1 / 4 / 4; align-self: center; margin-block-start: 2px; }
  .deals-app .xb { grid-area: 3 / 4 / 4 / 6; justify-self: end; }
  .deals-app .tags { grid-row: 4; }
  .deals-app .act2 > .side { grid-area: 5 / 1 / 6 / 6; }
  .deals-app .act2 > .side .lk { font-size: 0.875rem; }
  .deals-app .ln.flat { padding-block-end: 8px; }
  .deals-app .ln.flat .st2 { grid-column: 1 / 6; margin-block-start: 6px; }
  .deals-app .more2 { grid-row: 5; }
  .deals-app .al, .deals-app .foot { margin-block-start: 32px; }
}

/* Windows contrast themes: a selected chip is a filled chip (the fill is its only mark, and system colours replace
   ours), a selected month keeps its top rule and the others lose theirs */
@media (forced-colors: active) {
  .deals-app .fc.on { forced-color-adjust: none; background: Highlight; border-color: Highlight; color: HighlightText; }
  .deals-app .fc.on small, .deals-app .fc.on b { color: HighlightText; }
  .deals-app .mo { border-block-start-color: Canvas; }
  .deals-app .mo.on { border-block-start-color: Highlight; }
  .deals-app .bar-b:last-child { border-width: 3px; }
}
/* on paper: no fixed bar over the lines, and the chosen filters stay filled */
@media print {
  .deals-app .bar { display: none; }
  .deals-app .fc.on { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
