/* The platform's public pages (/welcome, /tour/): the product's light theme from qm-theme.css — the wine accent and its
   neutrals, Montserrat titles over Poppins text — on plain HTML built by the server (PublicSite.cs). No framework, no inline
   script. Contrast: ink #1e293b and wine #7a2847 on white are both well over 4.5:1; muted text is #475569 (7:1). */
:root {
    --ps-wine: #7a2847;
    --ps-wine-dark: #611e38;
    --ps-wine-tint: rgba(122, 40, 71, .08);
    --ps-wine-line: rgba(122, 40, 71, .22);
    --ps-ink: #1e293b;
    --ps-ink-strong: #0f172a;
    --ps-muted: #475569;
    --ps-line: #e2e8f0;
    --ps-paper: #ffffff;
    --ps-band: #f8fafc;
    --ps-band-2: #eef2f7;
    --ps-radius: 6px;
    --ps-radius-lg: 8px;
    --ps-shadow: 0 3px 10px rgba(0, 0, 0, .08);
    --ps-display: Montserrat, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --ps-text: Poppins, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
html, body { margin: 0; }
body.ps { background: var(--ps-paper); color: var(--ps-ink); font: 400 15px/1.6 var(--ps-text); }
.ps img { max-width: 100%; height: auto; }
.ps a { color: var(--ps-wine); }
.ps a:hover { color: var(--ps-wine-dark); }
.ps h1, .ps h2, .ps h3 { font-family: var(--ps-display); color: var(--ps-ink-strong); line-height: 1.2; text-wrap: balance; }
.ps :focus-visible { outline: 3px solid var(--ps-wine); outline-offset: 2px; border-radius: 3px; }

.ps-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.ps-skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--ps-wine); color: #fff !important; padding: 8px 12px; }
.ps-skip:focus { left: 8px; top: 8px; }

/* Header */
.ps-head { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--ps-line); backdrop-filter: blur(6px); }
.ps-head__row { display: flex; align-items: center; gap: 12px 20px; min-height: 60px; }
.ps-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ps-ink-strong) !important; font: 700 17px var(--ps-display); white-space: nowrap; }
.ps-brand img { width: 40px; height: 40px; display: block; }
.ps-nav { display: flex; align-items: center; gap: 4px 18px; flex: 1; min-width: 0; font-size: 14px; }
.ps-nav a { color: var(--ps-ink); text-decoration: none; white-space: nowrap; padding: 6px 0; }
.ps-nav a:hover { color: var(--ps-wine); }
.ps-signin { margin-left: auto; white-space: nowrap; font-weight: 600; font-size: 14px; color: #fff !important; background: var(--ps-wine); border-radius: var(--ps-radius); padding: 8px 16px; text-decoration: none; }
.ps-signin:hover { background: var(--ps-wine-dark); }
@media (max-width: 900px) {
    .ps-head { position: static; }
    .ps-head__row { flex-wrap: wrap; padding-top: 8px; }
    .ps-nav { order: 3; flex: 1 0 100%; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; gap: 0 16px; }
    .ps-nav::-webkit-scrollbar { display: none; }
    .ps-nav { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 24px; }
}

/* Buttons and the calls to action */
.ps-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: var(--ps-radius); font: 600 15px var(--ps-text); text-decoration: none; cursor: pointer; border: 1px solid transparent; text-align: center; }
.ps-btn--primary { background: var(--ps-wine); color: #fff !important; }
.ps-btn--primary:hover { background: var(--ps-wine-dark); }
.ps-btn--ghost { background: #fff; color: var(--ps-wine) !important; border-color: var(--ps-wine-line); }
.ps-btn--ghost:hover { background: var(--ps-wine-tint); }
.ps-btn:disabled { opacity: .45; cursor: default; }
.ps-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 8px; }
.ps-call { margin: 0; color: var(--ps-muted); font-size: 14px; }

.ps-intro { padding: 32px 0 12px; }
.ps-intro h1 { font-size: clamp(26px, 4vw, 36px); margin: 0 0 8px; }
.ps-intro p { margin: 0; color: var(--ps-muted); max-width: 80ch; }
.ps-empty { padding: 24px; background: var(--ps-band); border: 1px dashed var(--ps-line); border-radius: var(--ps-radius-lg); color: var(--ps-muted); }
.ps-band { margin: 40px auto; padding: 28px 24px; background: var(--ps-wine-tint); border: 1px solid var(--ps-wine-line); border-radius: var(--ps-radius-lg); }
.ps-band h2 { margin: 0 0 4px; font-size: 22px; }
.ps-band h3 { margin: 22px 0 6px; font-size: 15px; }

/* Footer */
.ps-foot { border-top: 1px solid var(--ps-line); background: var(--ps-band); margin-top: 40px; }
.ps-foot__row { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; padding-top: 20px; padding-bottom: 24px; font-size: 13px; }
.ps-foot__links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.ps-foot__links a { color: var(--ps-muted); text-decoration: none; }
.ps-foot__links a:hover { color: var(--ps-wine); text-decoration: underline; }
.ps-foot__copy { margin: 0; color: var(--ps-muted); }

/* ---------------------------------------------------------------- the tours index */
.tour-cards { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.tour-card a { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; background: #fff; border: 1px solid var(--ps-line); border-radius: var(--ps-radius-lg); overflow: hidden; box-shadow: var(--ps-shadow); }
.tour-card a:hover { border-color: var(--ps-wine-line); }
.tour-card__shot { display: block; aspect-ratio: 16 / 10; background: var(--ps-band-2); overflow: hidden; }
.tour-card__shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.tour-card__shot--phone { display: flex; justify-content: center; padding-top: 14px; }
.tour-card__shot--phone img { width: auto; height: 240%; border-radius: 14px 14px 0 0; border: 6px solid #1f2937; border-bottom: 0; object-fit: cover; }
.tour-card__text { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; flex: 1; }
.tour-card__title { font: 700 17px var(--ps-display); color: var(--ps-ink-strong); }
.tour-card__who { color: var(--ps-muted); font-size: 14px; }
.tour-card__meta { color: var(--ps-muted); font-size: 13px; }
.tour-card__go { margin-top: auto; padding-top: 8px; color: var(--ps-wine); font-weight: 600; }

/* ---------------------------------------------------------------- the landing page */
.wel-hero { background: linear-gradient(180deg, var(--ps-band) 0%, #fff 100%); border-bottom: 1px solid var(--ps-line); }
.wel-hero__row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-top: 48px; padding-bottom: 48px; }
.wel-kicker { margin: 0 0 8px; color: var(--ps-wine); font-weight: 600; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.wel-hero h1 { font-size: clamp(28px, 4.4vw, 44px); margin: 0 0 14px; }
.wel-lead { font-size: 17px; color: var(--ps-muted); margin: 0; max-width: 58ch; }
.wel-small { font-size: 14px; color: var(--ps-muted); margin: 6px 0 0; }
.wel-hero__shot { margin: 0; border: 1px solid var(--ps-line); border-radius: var(--ps-radius-lg); overflow: hidden; box-shadow: 0 18px 44px -26px rgba(15, 23, 42, .45); background: #fff; }
.wel-hero__shot img { display: block; width: 100%; }
.wel-hero__shot--phone { justify-self: center; max-width: 300px; border: 10px solid #1f2937; border-radius: 28px; }
@media (max-width: 860px) { .wel-hero__row { grid-template-columns: minmax(0, 1fr); padding-top: 28px; padding-bottom: 28px; } }

.wel-sec { padding: 48px 0; }
.wel-sec--tint { background: var(--ps-band); border-top: 1px solid var(--ps-line); border-bottom: 1px solid var(--ps-line); }
.wel-sec h2 { font-size: clamp(22px, 3vw, 30px); margin: 0 0 6px; }
.wel-sub { margin: 0 0 20px; color: var(--ps-muted); }

.wel-who { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.wel-card { background: #fff; border: 1px solid var(--ps-line); border-radius: var(--ps-radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.wel-card h3 { margin: 0; font-size: 17px; }
.wel-card ul { margin: 0; padding-left: 18px; color: var(--ps-muted); font-size: 14px; display: grid; gap: 6px; }
.wel-card__go { margin-top: auto; padding-top: 6px; font-weight: 600; }

.wel-steps, .wel-start { list-style: none; counter-reset: s; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.wel-steps li, .wel-start li { counter-increment: s; background: #fff; border: 1px solid var(--ps-line); border-radius: var(--ps-radius-lg); padding: 16px; }
.wel-steps li::before, .wel-start li::before { content: counter(s); display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ps-wine); color: #fff; font: 700 14px var(--ps-display); margin-bottom: 8px; }
.wel-steps h3, .wel-start h3 { margin: 0 0 4px; font-size: 16px; }
.wel-steps p, .wel-start p { margin: 0; color: var(--ps-muted); font-size: 14px; }


.wel-rely { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.wel-rely li { background: #fff; border: 1px solid var(--ps-line); border-left: 4px solid var(--ps-wine); border-radius: var(--ps-radius-lg); padding: 14px 16px; }
.wel-rely h3 { margin: 0 0 4px; font-size: 16px; }
.wel-rely p { margin: 0; color: var(--ps-muted); font-size: 14px; }

.wel-prices { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.wel-price { background: #fff; border: 1px solid var(--ps-line); border-radius: var(--ps-radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.wel-price h3 { margin: 0; font-size: 17px; }
.wel-price p { margin: 0; }
.wel-price__about { color: var(--ps-muted); font-size: 14px; flex: 1; }
.wel-price__fig { font-size: 14px; color: var(--ps-muted); padding-top: 6px; }
.wel-price__month { font: 700 20px var(--ps-display); color: var(--ps-ink-strong); font-variant-numeric: tabular-nums; }
.wel-price__year { font-size: 14px; color: var(--ps-muted); font-variant-numeric: tabular-nums; }
.wel-price__trial { font-size: 13px; color: var(--ps-wine); font-weight: 600; }

.wel-faq { display: grid; gap: 10px; max-width: 860px; }
.wel-q { background: #fff; border: 1px solid var(--ps-line); border-radius: var(--ps-radius-lg); padding: 0 16px; }
.wel-q summary { cursor: pointer; padding: 14px 0; font: 600 16px var(--ps-display); color: var(--ps-ink-strong); list-style-position: outside; }
.wel-q p { margin: 0 0 16px; color: var(--ps-muted); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; animation: none !important; }
}

/* ---------------------------------------------------------------- "A school day": the timeline (TOURS-timeline-contract.md)
   Without script (.wel-tl without .is-live) the steps are a plain list, each with its screen. welcome.js adds .is-live, shows
   the rail and stacks the steps in one grid cell so one shows at a time (a crossfade). --tl (0..1) is how far the fill has run. */
.wel-tl { --tl: 0; margin-top: 18px; }
.wel-tl__bar { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.wel-tl__bar[hidden] { display: none; }
.wel-tl__rail { position: relative; flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.wel-tl__track { position: absolute; left: calc(100% / 12); right: calc(100% / 12); top: 15px; height: 3px; border-radius: 3px; background: var(--ps-line); }
.wel-tl__fill { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--tl) * 100%); border-radius: 3px; background: var(--ps-wine); }
.wel-tl__tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px 8px; background: none; border: 0; cursor: pointer; font: inherit; color: var(--ps-muted); text-align: center; border-radius: var(--ps-radius); }
.wel-tl__dot { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--ps-line); background: #fff; margin-bottom: 4px; transition: border-color .3s, background .3s, transform .3s; }
.wel-tl__time { font: 700 14px var(--ps-display); color: var(--ps-ink-strong); font-variant-numeric: tabular-nums; }
.wel-tl__name { font-size: 13px; line-height: 1.3; }
.wel-tl__tab.is-past .wel-tl__dot { border-color: var(--ps-wine); background: var(--ps-wine); }
.wel-tl__tab[aria-selected="true"] { color: var(--ps-wine); }
.wel-tl__tab[aria-selected="true"] .wel-tl__dot { border-color: var(--ps-wine); background: #fff; transform: scale(1.25); box-shadow: 0 0 0 4px var(--ps-wine-tint); }
.wel-tl__tab[aria-selected="true"] .wel-tl__name { font-weight: 600; }
.wel-tl__tab:hover .wel-tl__dot { border-color: var(--ps-wine); }
.wel-tl__play { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--ps-wine-line); border-radius: var(--ps-radius); background: #fff; color: var(--ps-wine); font: 600 14px var(--ps-text); cursor: pointer; }
.wel-tl__play:hover { background: var(--ps-wine-tint); }
.wel-tl__play[hidden] { display: none; }
/* Pause: two bars; Play: a triangle. */
.wel-tl__icon { width: 12px; height: 12px; border-left: 4px solid currentColor; border-right: 4px solid currentColor; box-sizing: border-box; }
.wel-tl__play[data-state="paused"] .wel-tl__icon { border-right: 0; border-left: 0; width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 10px solid currentColor; }

.wel-tl__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; }
.wel-tl__step { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.wel-tl__shot { margin: 0; height: 440px; display: flex; align-items: center; justify-content: center; }
.wel-tl__shot img { max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; border: 1px solid var(--ps-line); border-radius: var(--ps-radius-lg); box-shadow: 0 18px 44px -26px rgba(15, 23, 42, .45); background: #fff; }
.wel-tl__shot--phone img { border: 8px solid #1f2937; border-radius: 24px; }
.wel-tl__when { margin: 0 0 4px; color: var(--ps-wine); font: 700 15px var(--ps-display); font-variant-numeric: tabular-nums; }
.wel-tl__text h3 { margin: 0 0 6px; font-size: 22px; }
.wel-tl__line { margin: 0 0 16px; color: var(--ps-muted); font-size: 16px; }

.wel-tl.is-live .wel-tl__steps { gap: 0; }
.wel-tl.is-live .wel-tl__step { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility 0s linear .45s; }
.wel-tl.is-live .wel-tl__step.is-on { opacity: 1; visibility: visible; transition: opacity .45s ease; }

@media (max-width: 760px) {
    /* A phone: the rail runs down the side, then the step under it (its words above its screen). */
    .wel-tl__bar { flex-direction: column; align-items: stretch; gap: 10px; }
    .wel-tl__rail { grid-template-columns: minmax(0, 1fr); }
    .wel-tl__track { left: 19px; right: auto; top: 22px; bottom: 22px; width: 3px; height: auto; }
    .wel-tl__fill { width: auto; right: 0; bottom: auto; height: calc(var(--tl) * 100%); }
    .wel-tl__tab { flex-direction: row; justify-content: flex-start; gap: 10px; min-height: 44px; padding: 4px 4px 4px 10px; text-align: left; }
    .wel-tl__dot { margin: 0; flex: none; }
    .wel-tl__time { width: 46px; flex: none; }
    .wel-tl__name { font-size: 14px; }
    .wel-tl__play { align-self: flex-start; }
    .wel-tl__step { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .wel-tl__text { order: -1; }
    .wel-tl__shot { height: 380px; }
    .wel-tl__text h3 { font-size: 19px; }
    .wel-tl__line { margin-bottom: 10px; font-size: 15px; }
}
/* A phone screen sits next to its words rather than in the middle of a wide column. */
@media (min-width: 761px) { .wel-tl__shot--phone { justify-content: flex-end; padding-right: 32px; } }
