@import url('/tokens.css');
@import url('/fonts/library.css');
@import url('/brand-fonts/brand.css');
/* Builder's names for the Studio's roles (web/tokens.css), so every screen picks up the Studio look and its dark mode. */
:root {
  --bg: var(--color-page); --surface: var(--color-sand); --raised: var(--color-surface); --ink: var(--color-ink); --soft: var(--color-muted);
  --line: var(--color-line); --accent: var(--color-forest); --on-accent: var(--color-cream); --label: var(--color-teal-800);
  --chip: var(--color-teal-50); --on-chip: var(--color-teal-800); --focus: var(--color-focus);
  --mark: #FFE7A8; --good: #1D3712; --good-bg: #DCE8D2; --warn: #9A2E0B; --warn-bg: #FBE3D6;
  --body: var(--font-sans);
  color-scheme: light;
}
:root[data-theme="dark"] { --label: var(--color-teal-300); --mark: #F2A900; --good: #8FE3A0; --good-bg: #1E3A24; --warn: #FFB45C; --warn-bg: #3A2A17; color-scheme: dark; }

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.5 var(--body); }
a { color: var(--color-link); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; margin: 0; text-wrap: balance; }
p { margin: 0; }
code { font-size: 0.85em; color: var(--soft); }
.soft { color: var(--soft); font-weight: 400; }
.small { font-size: 0.875rem; }

.subtabs { display: flex; gap: 0.25rem; overflow-x: auto; scrollbar-width: none; margin: 0 0 1.5rem; padding: 0.375rem; border-radius: 1.5rem; background: var(--color-sand); width: fit-content; max-width: 100%; }
.subtabs a { white-space: nowrap; display: inline-flex; align-items: center; gap: 0.375rem; min-height: 2.75rem; padding: 0 1rem; border-radius: 1rem; color: var(--soft); text-decoration: none; font-weight: 500; }
.subtabs a[aria-current="page"] { background: var(--raised); color: var(--color-brand); font-weight: 600; box-shadow: 0 0 0 1px var(--line); }
.grow-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 1rem; }
.grow-card { display: grid; gap: 0.5rem; align-content: start; color: var(--ink); text-decoration: none; }
.grow-card h2 { display: flex; align-items: center; gap: 0.75rem; font-size: 1.25rem; }
.grow-card:hover, .grow-card:focus-visible { border-color: var(--accent); }

main { max-width: 60rem; margin: 0 auto; padding: 2rem 1.25rem 3rem; }
@media (min-width: 640px) { main { padding-inline: 2rem; } }
@media (min-width: 1024px) { main { padding: 3rem; } }
.lede { font-size: 1.05rem; color: var(--soft); margin-bottom: 16px; }
.jump { font-size: 0.95rem; margin: 16px 0 8px; }
.notice { display: block; padding: 14px 16px; border-radius: 12px; background: var(--mark); color: #230E0F; text-decoration: none; margin-bottom: 8px; }
.notice span { display: block; font-size: 0.92rem; }

.block { margin-top: 28px; scroll-margin-top: 64px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.block-head h2 { font-size: 1.3rem; }
.group { font-size: 1rem; margin: 20px 0 8px; color: var(--label); }

.card { background: var(--raised); border: 1px solid var(--line); border-radius: 1.5rem; padding: 1.25rem 1.5rem; margin-bottom: 0.75rem; display: grid; gap: 0.5rem; }
.card h3 { font-size: 0.95rem; margin-top: 6px; color: var(--label); }
.card.empty { color: var(--soft); }
.card.ask { border-left: 4px solid var(--accent); }
.card.dim { opacity: 0.75; }
.confirm { display: grid; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-weight: 600; }
.kind { font-family: var(--font-label); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--label); }
.k-never { color: var(--warn); }
.k-always, .k-decision { color: var(--good); }
.text { font-size: 1.02rem; }
.quote { font-weight: 600; }
.why { color: var(--soft); font-size: 0.95rem; }
.src, .meta { color: var(--soft); font-size: 0.85rem; overflow-wrap: anywhere; }
.flag { background: var(--warn-bg); color: var(--warn); padding: 6px 10px; border-radius: 8px; font-size: 0.9rem; }
.plain { margin: 0; padding-left: 1.2em; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 2px 10px; border-radius: 999px; background: var(--chip); color: var(--on-chip); font-size: 0.85rem; }
.swatches { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.swatches li { display: flex; align-items: center; gap: 8px; }
.swatch { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--line); flex: none; }
.context { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.85rem; margin: 0; max-height: 70vh; overflow: auto; }

.acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
button { font: inherit; font-size: 0.9375rem; font-weight: 600; border-radius: 9999px; padding: 0 1.125rem; cursor: pointer; border: 1px solid transparent; min-height: 2.75rem; }
button:disabled { opacity: 0.5; cursor: progress; }
.primary { background: var(--accent); color: var(--on-accent); }
.primary:hover { background: var(--color-forest-deep); }
.secondary { background: var(--raised); color: var(--color-brand); border-color: var(--line); }
.secondary:hover, .ghost:hover { background: var(--color-sand); }
.ghost { background: transparent; color: var(--ink); border-color: var(--line); }

.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter { background: var(--raised); color: var(--ink); border-color: var(--line); }
.filter span { color: var(--soft); font-weight: 400; }
.filter.on { background: var(--ink); color: var(--bg); }
.filter.on span { color: inherit; }

.field { display: grid; gap: 4px; }
.field span { font-weight: 600; }
.field small { color: var(--soft); }
input, textarea, select { font: inherit; font-size: max(16px, 1rem); color: var(--ink); background: var(--raised); border: 1px solid var(--line); border-radius: 1rem; padding: 0.75rem 1rem; width: 100%; }
:is(input, textarea, select):focus { border-color: var(--color-teal-500); }
input[type=checkbox], input[type=radio] { width: 1.25rem; height: 1.25rem; padding: 0; accent-color: var(--accent); }
textarea { resize: vertical; }

.past { margin-top: 28px; }
.past summary { cursor: pointer; font-weight: 600; padding: 8px 0; }

.foot { width: 100%; max-width: 60rem; margin: 0 auto; padding: 0 1.25rem 2rem; color: var(--soft); font-size: 0.875rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; padding-top: 0.75rem; }
.foot-links a { display: inline-flex; align-items: center; gap: 0.375rem; min-height: 2.75rem; }
.foot-links a[aria-current="page"] { color: var(--ink); font-weight: 600; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 16px); opacity: 0; visibility: hidden; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 10px; background: var(--ink); color: var(--bg); font-weight: 600; transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s; z-index: 5; }
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.toast.bad { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn); }

dialog { width: min(560px, calc(100% - 32px)); border: 1px solid var(--line); border-radius: 14px; background: var(--raised); color: var(--ink); padding: 16px; }
dialog::backdrop { background: rgb(0 0 0 / 0.4); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.history { margin: 0; padding-left: 1.2em; display: grid; gap: 12px; max-height: 60vh; overflow: auto; }

/* The plain header on pages outside the shell: policies, sign-in and the editor. */
.top { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 1rem; border-bottom: 1px solid var(--line); background: var(--raised); }
/* The Brightly wordmark with BUILDER beside it, as the Studio draws STUDIO (inbound/brand/README.md). --s is the logo
   size in px, fixed so the logo holds while text size changes; the SVGs are masks so they take the theme's colour. */
.logo { --s: 36px; display: inline-flex; align-items: center; gap: 0.5rem; color: var(--color-brand); text-decoration: none; white-space: nowrap; }
.logo-word, .logo-b { flex: none; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.logo-word { --m: url(/brand/brightly-wordmark.svg); height: calc(var(--s) * 0.78); width: calc(var(--s) * 0.78 * 1168 / 373); }
.logo-b { --m: url(/brand/brightly-mark.svg); display: none; height: calc(var(--s) * 0.9); width: calc(var(--s) * 0.9 * 180 / 228); }
.logo-name { margin-top: 0.15em; font-family: var(--font-label); font-weight: 700; font-size: max(12px, calc(var(--s) * 0.36)); line-height: 1; text-transform: uppercase; letter-spacing: 0.16em; color: var(--color-forest); }
[data-theme="dark"] .logo-name { color: var(--color-teal-300); }
@media (max-width: 359px) { .logo:not(.mark-bar) :is(.logo-word, .logo-name) { display: none; } .logo:not(.mark-bar) .logo-b { display: block; } }
@media (max-width: 419px) { .logo.mark-bar :is(.logo-word, .logo-name) { display: none; } .logo.mark-bar .logo-b { display: block; } }
.ws { padding: 0.125rem 0.625rem; border-radius: 999px; background: var(--chip); color: var(--on-chip); font-size: 0.875rem; font-weight: 600; }
@media (max-width: 600px) { .block { scroll-margin-top: 12px; } }
@media (max-width: 480px) { .top .ws { display: none; } .block-head h2 { font-size: 1.15rem; } }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* Policy pages: terms, privacy, refunds, AI, support. */
.legal main { max-width: 720px; }
.legal h1 { margin-top: 8px; }
.legal h1 + p { margin-top: 8px; }
.legal h2 { margin-top: 28px; font-size: 1.15rem; }
.legal li { margin-bottom: 6px; }
.draft { padding: 10px 14px; border-left: 4px solid var(--accent); background: var(--chip); color: var(--on-chip); border-radius: 6px; font-size: 0.9rem; }
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 16px; max-width: 720px; margin: 0 auto; padding: 8px 16px 32px; font-size: 0.9rem; }
.foot .legal-links { padding: 8px 0 0; margin: 0; }

[hidden] { display: none !important; }
.legal form.card { display: grid; gap: 10px; max-width: 420px; }
.legal section.card, .legal p.card { max-width: 420px; }
.legal .card h2 { margin-top: 0; }
.legal #f-code { display: grid; gap: 10px; }
.legal button.linkish { background: none; border: 0; padding: 0; min-height: 2.75rem; color: inherit; font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.setup-qr { width: min(100%, 15rem); border-radius: 0.75rem; overflow: hidden; border: 1px solid var(--line); }
.setup-qr svg { display: block; width: 100%; height: auto; }
.setup-key { display: block; padding: 0.75rem 1rem; border: 1px solid var(--line); border-radius: 0.75rem; font-size: 1.05rem; letter-spacing: 0.04em; line-height: 1.7; overflow-wrap: anywhere; user-select: all; }
@media (pointer: fine) { .on-phone { display: none; } }

/* Booking pages */
.pick { display: grid; gap: 10px; margin: 16px 0; }
button.card.offer { text-align: left; color: var(--ink); font-weight: 400; }
.card.offer b { font-size: 1.05rem; }
button.card.offer[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.card.offer small { color: var(--soft); }
.slots { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
/* A day's heading stands clear of the times above it. */
h3:has(+ .slots) { margin-top: 26px; }
.slots button { min-width: 88px; }
/* A day's times in even columns, three across on a phone. */
#times .slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
#times .slots button { min-width: 0; padding-inline: 8px; }
.state { display: inline-block; font-size: 0.85rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--line); }
.days { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 8px; }
.days legend { font-size: 0.88rem; font-weight: 600; padding: 0 4px; }
.dayrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dayrow .check { min-width: 120px; display: flex; gap: 6px; align-items: center; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }

/* Home (Studio critique 4): one colourway block with what's true today, the numbers, then the plan as switches. */
.home-hero { border-radius: 1.5rem; padding: 1.75rem 1.5rem 2rem; margin-bottom: 1.5rem; }
.home-hero .hello { font-family: var(--font-label); font-weight: 700; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.16em; }
.home-hero h1 { margin: 0.5rem 0; max-width: 36rem; font-size: clamp(2rem, 6vw, 3.5rem); font-weight: 700; line-height: 1.02; letter-spacing: -0.015em; }
.home-hero p { max-width: 34rem; margin: 0 0 1.25rem; font-size: 1.125rem; }
.home-hero .big { width: 20rem; height: 20rem; right: -8rem; top: -8rem; }
.home-hero .small-c { width: 11rem; height: 11rem; right: -2rem; bottom: -5rem; }
/* Circles never sit behind words: on a phone the big one goes. */
@media (max-width: 640px) { .home-hero .big { display: none; } .home-hero { padding-bottom: 5rem; } }
@media (min-width: 640px) { .home-hero { padding: 2.5rem 2.25rem; } }
.stats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); margin-bottom: 2.5rem; }
a.stat-card { color: var(--ink); text-decoration: none; margin: 0; align-content: start; }
a.stat-card:hover, a.stat-card:focus-visible { border-color: var(--accent); }
a.room-row { color: var(--ink); text-decoration: none; }
a.room-row:hover, a.room-row:focus-visible { border-color: var(--accent); }
#rooms-inbox h2 { margin-bottom: 12px; }
.state.new { background: var(--warn-bg); color: var(--warn); }
.stat-card.card-peach { background: var(--color-teal-50); border-color: var(--color-teal-100); }
.stat-card .stat { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.stat-card .soft { font-size: 0.9375rem; }
.section-title { margin: 0 0 0.25rem; font-size: 1.5rem; font-weight: 700; }
.plan-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 1rem; }
.plan-rows { padding-block: 0.5rem; gap: 0; }
.prow { display: flex; align-items: center; gap: 1rem; min-height: 4rem; padding: 0.75rem 0; border-top: 1px solid var(--line); }
.prow:first-child { border-top: 0; }
.prow > div { flex: 1; min-width: 0; }
.prow .soft { font-size: 0.9375rem; }
.prow .acts { margin-top: 0.5rem; }
.prow form { display: grid; gap: 0.5rem; margin-top: 0.5rem; }
@media (max-width: 480px) { .prow > .ichip { display: none; } }
.prow-state { font-size: 0.875rem; font-weight: 600; color: var(--label); }
.empty-state { justify-items: center; text-align: center; padding-block: 3rem; }
.empty-state h2 { font-size: 1.5rem; }
.empty-state .soft { max-width: 28rem; font-size: 1.125rem; }
a.btn.primary { color: var(--on-accent); }
/* A link that is the main thing to do on a page for clients, which loads no shell.css: the same shape as a button. */
.legal a.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 2.75rem; padding: 0 1.125rem; border: 1px solid transparent; border-radius: 9999px; font-size: 0.9375rem; font-weight: 600; text-decoration: none; }
.legal a.btn.secondary { border-color: var(--line); }
.dayrow input[type=time] { width: auto; }
.grow-grid { margin: 0.75rem 0 2.5rem; }
