/* Attacan Meet admin. Hand-written to the website's tokens
   (src/styles/global.css and .claude/skills/attacan-brand-design):
   petrol, not navy; no red anywhere; nothing bold (400 is the heaviest
   weight); Roboto Light for text; hairlines, not borders.

   Phone first. The tab strip scrolls sideways instead of wrapping (it took
   half the first screen on a phone), tables become labelled rows below
   40rem (labels from /static/admin.js), and every control is a 44px target.
   Motion is short and quiet: pages and notices fade in, cards lift on hover.
   All of it stops under prefers-reduced-motion. */

@font-face { font-family: Roboto; font-weight: 100; font-display: swap; src: url(/static/fonts/roboto-latin-100-normal.woff2) format('woff2'); }
@font-face { font-family: Roboto; font-weight: 300; font-display: swap; src: url(/static/fonts/roboto-latin-300-normal.woff2) format('woff2'); }
@font-face { font-family: Roboto; font-weight: 400; font-display: swap; src: url(/static/fonts/roboto-latin-400-normal.woff2) format('woff2'); }

:root {
  --obsidian: #f7f9f9;  /* page */
  --graphite: #ecf0f1;  /* alt surface */
  --steel: #dfe6ea;     /* cards */
  --signal: #0d1a26;    /* ink */
  --deep: #1d465a;      /* anchor bands */
  --deep-2: #16394a;
  --accent: #307594;
  --accent-dim: #245b73;
  --accent-bright: #42a2ce;
  --accent-on-light: #2a6480;
  --accent-on-dark: #7cc7e8;
  --hair: rgba(13, 26, 38, 0.12);
  --hair-strong: rgba(13, 26, 38, 0.18);
  --muted: rgba(13, 26, 38, 0.68);
  --ring: 0 0 0 3px rgba(48, 117, 148, 0.22);
  --lift: 0 1px 2px rgba(13, 26, 38, 0.04), 0 12px 28px -16px rgba(13, 26, 38, 0.22);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }
/* Author display rules (.row > div is a grid) must not undo the hidden attribute. */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 7rem; }
body {
  margin: 0;
  background: var(--obsidian);
  color: var(--signal);
  font: 300 16px/1.55 Roboto, ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-on-light); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-dim); }
h1, h2, h3 { letter-spacing: 0.01em; margin: 0 0 0.5em; font-weight: 400; }
h1 { font-weight: 300; font-size: 2.25rem; line-height: 1.15; }
h2 { font-size: 1.3rem; line-height: 1.3; }
h3 { font-weight: 300; font-size: 1.1rem; }
strong, b { font-weight: 400; }
code, .mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 0.9em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --- Header: brand bar and tab strip ------------------------------------- */

.top { position: sticky; top: 0; z-index: 30; background: var(--deep); color: #fff; }
.top .bar { max-width: 72rem; margin: 0 auto; padding: 0.75rem 1rem; display: flex; align-items: center; gap: 0.9rem; }
.top .brand { display: block; line-height: 0; }
.top img { height: 26px; width: auto; display: block; }
.env { font-size: 0.75rem; text-transform: capitalize; letter-spacing: 0.01em; padding: 0.2rem 0.6rem; border-radius: 999px; background: rgba(247, 249, 249, 0.14); color: rgba(255, 255, 255, 0.9); }
.top .who { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem; color: rgba(255, 255, 255, 0.78); }
.top .who span { white-space: nowrap; }
.top .who form { margin: 0; }
.top .who button {
  min-height: 2.25rem; background: none; border: 1px solid rgba(247, 249, 249, 0.28); color: #fff;
  border-radius: 999px; padding: 0.3rem 0.95rem; font: inherit; cursor: pointer; white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s;
}
.top .who button:hover { background: rgba(247, 249, 249, 0.1); border-color: rgba(247, 249, 249, 0.5); }

/* App menu by the name: the other Attacan apps (src/admin/apps.ts). */
.top .apps { position: relative; }
.top .apps > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; border-radius: 999px; color: rgba(255, 255, 255, 0.85);
  transition: background-color 0.2s, color 0.2s;
}
.top .apps > summary::-webkit-details-marker { display: none; }
.top .apps > summary:hover, .top .apps[open] > summary { background: rgba(247, 249, 249, 0.1); color: #fff; }
.top .apps svg { width: 1.15rem; height: 1.15rem; display: block; }
.top .apps-menu {
  position: absolute; right: 0; top: calc(100% + 0.4rem); z-index: 40; padding: 0.35rem;
  min-width: 15rem; background: #fff; border: 1px solid var(--hair); border-radius: 12px; box-shadow: var(--lift);
}
.top .apps-head { margin: 0; padding: 0.35rem 0.75rem 0.3rem; font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.top .apps ul { margin: 0; padding: 0; list-style: none; }
.top .apps a {
  display: flex; flex-direction: column; justify-content: center; min-height: 2.9rem; padding: 0.35rem 2.2rem 0.35rem 0.75rem;
  border-radius: 8px; color: var(--signal); text-decoration: none; position: relative;
}
.top .apps .apps-name { white-space: nowrap; line-height: 1.3; }
.top .apps .apps-desc { font-size: 0.78rem; line-height: 1.3; color: var(--muted); white-space: nowrap; }
.top .apps a:hover, .top .apps a:focus-visible { background: var(--graphite); }
/* Where you are: petrol tint and a tick, as in WareSync's menu. */
.top .apps a[aria-current='page'] { background: #eaf3f6; color: var(--deep); }
.top .apps a[aria-current='page'] .apps-desc { color: var(--accent-on-light); }
.top .apps a[aria-current='page']::after {
  content: ''; position: absolute; right: 0.8rem; top: 50%; width: 0.38rem; height: 0.7rem; margin-top: -0.45rem;
  border: solid var(--accent); border-width: 0 1.6px 1.6px 0; transform: rotate(45deg);
}

.tabs { border-top: 1px solid rgba(247, 249, 249, 0.12); }
.tabs-inner {
  max-width: 72rem; margin: 0 auto; padding: 0 0.5rem;
  display: flex; gap: 0.25rem; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.tabs-inner::-webkit-scrollbar { display: none; }
.tabs a {
  position: relative; flex: none; display: flex; align-items: center; min-height: 2.9rem; padding: 0 0.7rem;
  color: rgba(255, 255, 255, 0.72); text-decoration: none; font-size: 0.93rem; white-space: nowrap;
  transition: color 0.2s;
}
.tabs a::after {
  content: ''; position: absolute; left: 0.7rem; right: 0.7rem; bottom: 0; height: 2px; border-radius: 2px;
  background: var(--accent-bright); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease);
}
.tabs a:hover { color: #fff; }
.tabs a[aria-current='page'] { color: #fff; }
.tabs a[aria-current='page']::after { transform: scaleX(1); }
.tabs a:focus-visible { outline-offset: -4px; border-radius: 6px; }

@media (max-width: 40rem) {
  .top .who > span { display: none; }
  /* The app menu spans the header on a phone: anchored to the icon it ran off
     the left edge, because Settings and Sign out sit to its right. */
  .top .bar { position: relative; }
  .top .apps { position: static; }
  .top .apps-menu { left: 0.75rem; right: 0.75rem; top: calc(100% - 0.25rem); min-width: 0; }
  .top img { height: 22px; }
}

/* --- Page ---------------------------------------------------------------- */

main { max-width: 72rem; margin: 0 auto; padding: 2.5rem 1rem 5rem; animation: adm-in 0.3s var(--ease) both; }
/* Capitals: only where a sentence or a name needs them. ALL CAPS only for the
   eyebrow above a page heading, as on attacan.com; every other label, tag and
   table heading is sentence case (Martin, 1 Nov 2026). */
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; color: var(--muted); margin: 0 0 0.6rem; }
.lead { color: var(--muted); font-size: 1.05rem; max-width: 42rem; }
.hint { color: var(--muted); font-size: 0.875rem; margin: 0.3rem 0 0; }
.muted { color: var(--muted); }
.stack > * + * { margin-top: 1rem; }
@keyframes adm-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* --- Surfaces ------------------------------------------------------------- */

.card { background: #fff; border: 1px solid var(--hair); border-radius: 16px; padding: 1.25rem 1.25rem; }
@media (min-width: 40rem) { .card { padding: 1.6rem 1.75rem; } }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.grid .card h2 { font-size: 1.1rem; margin-bottom: 0.35rem; }
.grid .card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
a.card { position: relative; color: inherit; text-decoration: none; display: block; transition: border-color 0.2s, box-shadow 0.25s var(--ease), transform 0.25s var(--ease); }
a.card:hover { border-color: rgba(48, 117, 148, 0.45); box-shadow: var(--lift); transform: translateY(-2px); color: inherit; }
a.card h2::after { content: '→'; display: inline-block; margin-left: 0.4rem; color: var(--accent); opacity: 0; transform: translateX(-4px); transition: opacity 0.2s, transform 0.25s var(--ease); }
a.card:hover h2::after { opacity: 1; transform: none; }
section.card > h2:first-child { margin-bottom: 0.25rem; }

/* Notices: petrol family only. Problems are deep on graphite, never red. */
.notice { border-left: 3px solid var(--accent); background: var(--graphite); padding: 0.85rem 1.1rem; border-radius: 12px; animation: adm-in 0.3s var(--ease) both; }
.notice.problem { border-left-color: var(--deep); color: var(--deep); }
.notice p { margin: 0.2rem 0; }

/* --- Forms ---------------------------------------------------------------- */

label { display: block; font-size: 0.875rem; color: var(--muted); margin-bottom: 0.4rem; }
.field, input[type='text'], input[type='password'], input[type='email'], input[type='number'], input[type='url'], input[type='date'], input[type='time'], select, textarea {
  width: 100%;
  min-height: 2.9rem;
  font: inherit;
  font-size: 16px; /* below 16px iOS zooms the page on focus */
  color: var(--signal);
  background: #fff;
  border: 1px solid var(--hair-strong);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea { min-height: 6rem; line-height: 1.5; }
select {
  appearance: none;
  padding-right: 2.25rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23307594' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 0.85rem center / 0.7rem;
}
input::placeholder, textarea::placeholder { color: rgba(13, 26, 38, 0.38); }
input:hover, select:hover, textarea:hover { border-color: rgba(13, 26, 38, 0.3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
input[type='checkbox'] { width: 1.15rem; height: 1.15rem; accent-color: var(--accent); margin: 0; }
/* Fields in a row share three tracks, label / control / hint, through
   subgrid: a label that wraps to two lines, or a hint under one field, no
   longer pushes that field's box out of line with its neighbours (Martin's
   screenshot, 30 Oct 2026). Labels sit on the bottom of their track. */
.row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); align-items: start; }
.row > div { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
.row > div > label { align-self: end; }
/* A short field beside a tall one (input next to a textarea) keeps its own height. */
.row > div > :not(label) { align-self: start; }
.check { display: flex; gap: 0.6rem; align-items: center; color: var(--signal); font-size: 0.95rem; min-height: 2.75rem; }

/* Hours as one line per day (src/hours.ts): day name left, line right. */
.hours-week { display: grid; grid-template-columns: 8rem 1fr; gap: 0.5rem 1rem; align-items: start; }
.hours-week > label { margin: 0.8rem 0 0; color: var(--signal); font-size: 0.95rem; }
/* Problems are petrol, never red (brand rule). */
.field-error { color: var(--deep); font-size: 0.875rem; margin: 0.35rem 0 0; }
input[aria-invalid='true'] { border-color: var(--deep); box-shadow: inset 0 0 0 1px var(--deep); }
details.more > summary { cursor: pointer; color: var(--accent-on-light); min-height: 2.5rem; display: flex; align-items: center; gap: 0.4rem; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: '›'; display: inline-block; transition: transform 0.2s var(--ease); }
details.more[open] > summary::before { transform: rotate(90deg); }
details.more[open] > summary { margin-bottom: 0.75rem; }
@media (max-width: 40rem) {
  /* Day and line side by side even on a phone: seven stacked pairs made
     Working hours almost two screens long (design check, 1 Nov 2026). */
  .hours-week { grid-template-columns: 5.6rem minmax(0, 1fr); gap: 0.4rem 0.6rem; }
  .hours-week > label { margin-top: 0.75rem; font-size: 0.9rem; }
}

/* Working hours drawn as a switch per day and time pickers (admin.js
   hoursEditors). One day per row, hairline between days; the day name is the
   switch. On a phone the name shortens to three letters so the two pickers
   still fit beside it. */
.hours-week.is-rich { grid-template-columns: 9rem minmax(0, 1fr); gap: 0; }
.hours-week.is-rich > label, .hours-week.is-rich > .hrs-cell { padding: 0.55rem 0; border-top: 1px solid var(--hair); }
.hours-week.is-rich > label:first-child, .hours-week.is-rich > label:first-child + .hrs-cell { border-top: 0; }
.hours-week[data-hours-editor='single'].is-rich > label { padding-top: 0.55rem; }
.hrs-day { display: flex; align-items: center; gap: 0.6rem; box-sizing: content-box; min-height: 2.975rem; margin: 0 !important; cursor: pointer; }
.hrs-day input { width: 1.1rem; height: 1.1rem; margin: 0; flex: none; accent-color: var(--accent); }
.hrs-day .short { display: none; }
.hrs { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.45rem 1.25rem; align-items: center; }
.hrs > .hrs-range, .hrs > .hrs-off { grid-column: 1; }
/* "+ Add hours" and "Copy to…" beside the first range, not on a line of their own. */
.hrs > .hrs-acts { grid-column: 2; grid-row: 1; }
.hrs > .hrs-copy { grid-column: 1 / -1; }
.hrs-range { display: flex; align-items: center; gap: 0.5rem; }
.hrs-range select { width: auto; min-width: 6.25rem; flex: 0 1 auto; }
.hrs-dash { color: var(--muted); }
.hrs-off { margin: 0; min-height: 2.975rem; display: flex; align-items: center; color: var(--muted); }
.hrs-acts { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
button.hrs-act { min-height: 2rem; font-size: 0.9rem; color: var(--accent-on-light); }
button.hrs-act:disabled { color: var(--muted); text-decoration: none; cursor: default; }
button.hrs-remove { min-width: 2.25rem; min-height: 2.25rem; font-size: 1.25rem; line-height: 1; text-decoration: none; color: var(--muted); border-radius: 50%; }
button.hrs-remove:hover { color: var(--accent); background: var(--graphite); }
.hrs-range select[aria-invalid='true'] { border-color: var(--deep); box-shadow: inset 0 0 0 1px var(--deep); }
fieldset.hrs-copy { margin: 0.25rem 0 0; padding: 0.75rem 1rem 0.9rem; border: 1px solid var(--hair); border-radius: 12px; display: grid; gap: 0.5rem; animation: adm-in 0.2s var(--ease) both; }
fieldset.hrs-copy legend { padding: 0 0.3rem; color: var(--muted); font-size: 0.875rem; }
.hrs-copy-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: 0 1rem; }
.hrs-remove-space { width: 2.25rem; flex: none; }
.hrs-copy-days .short { display: none; }
.hrs-copy-days .check { min-height: 2.25rem; }
.hrs-copy-acts { display: flex; align-items: center; gap: 1rem; }
@media (max-width: 40rem) {
  .hours-week.is-rich { grid-template-columns: 4.4rem minmax(0, 1fr); }
  .hrs-day .long { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; /* still read out */ }
  .hrs-day .short { display: inline; }
  .hrs { grid-template-columns: minmax(0, 1fr); gap: 0.35rem; }
  .hours-week.is-rich > label, .hours-week.is-rich > .hrs-cell { padding: 0.4rem 0; }
  button.hrs-act { min-height: 1.9rem; }
  .hrs-copy-days { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 0.5rem; }
  .hrs-copy-days .long { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; /* still read out */ }
  .hrs-copy-days .short { display: inline; }
  fieldset.hrs-copy { padding: 0.6rem 0.75rem 0.75rem; }
  .hrs > .hrs-acts { grid-column: 1; grid-row: auto; }
  .hrs-range { gap: 0.35rem; }
  .hrs-range select { min-width: 0; flex: 1 1 0; padding-right: 1.6rem; }
}

/* --- Buttons -------------------------------------------------------------- */

.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.9rem;
  border-radius: 999px; border: 1px solid transparent;
  background: var(--accent); color: #fff;
  font: 400 0.95rem/1 Roboto, system-ui, sans-serif;
  padding: 0 1.4rem; text-decoration: none; cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.btn:hover { background: var(--accent-dim); color: #fff; }
.btn:active { transform: scale(0.98); }
.btn.secondary { background: #fff; color: var(--accent-on-light); border-color: var(--hair-strong); }
.btn.secondary:hover { background: var(--graphite); color: var(--accent-dim); border-color: rgba(48, 117, 148, 0.4); }
.btn.small { min-height: 2.25rem; padding: 0 0.9rem; font-size: 0.85rem; }
button.linklike { background: none; border: 0; padding: 0.35rem 0; min-height: 2.25rem; font: inherit; color: var(--signal); cursor: pointer; text-align: left; transition: color 0.2s; }
button.linklike:hover { color: var(--accent-dim); }
/* A calendar that counts as busy: a pressed toggle, drawn rather than a ☑ glyph. */
button.toggle { display: inline-flex; align-items: center; gap: 0.65rem; min-height: 2.5rem; background: none; border: 0; padding: 0.2rem 0; font: inherit; color: var(--signal); cursor: pointer; text-align: left; }
button.toggle::before {
  content: ''; flex: none; width: 1.15rem; height: 1.15rem; border-radius: 5px; border: 1.5px solid var(--hair-strong); background: #fff center / 0.75rem no-repeat;
  transition: background-color 0.2s, border-color 0.2s;
}
button.toggle[aria-pressed='true']::before {
  background-color: var(--accent); border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1.5 5.2l3 3 6-6.5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
button.toggle:hover::before { border-color: var(--accent); }
.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; }

/* --- Tables --------------------------------------------------------------- */

table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th { text-align: left; font-weight: 400; color: var(--muted); font-size: 0.82rem; letter-spacing: 0.01em; }
th, td { padding: 0.75rem 0.6rem; border-bottom: 1px solid var(--hair); vertical-align: top; }
tbody tr { transition: background-color 0.15s; }
tbody tr:hover { background: rgba(236, 240, 241, 0.55); }
table .actions form { margin: 0; }

/* Below 40rem a table row becomes a stacked block; admin.js copies each
   column heading into data-label so every value keeps its name. */
@media (max-width: 40rem) {
  table, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tr { padding: 0.85rem 0; border-bottom: 1px solid var(--hair); }
  tbody tr:hover { background: none; }
  /* Block, not flex: a cell's own content (a name, a line break, an email)
     keeps flowing as text; as flex items they sat side by side and pushed
     the Team list 40px past the screen edge. */
  td { border: 0; padding: 0.25rem 0; display: block; overflow-wrap: anywhere; }
  td[data-label] { position: relative; padding-left: 7.25rem; min-height: 1.9rem; }
  td[data-label]::before {
    content: attr(data-label); position: absolute; left: 0; top: 0.5rem; width: 6.5rem;
    color: var(--muted); font-size: 0.82rem; line-height: 1.3; letter-spacing: 0.01em;
  }
  td:empty { display: none; }
}

/* --- Bits ----------------------------------------------------------------- */

.status { display: inline-block; font-size: 0.78rem; padding: 0.15rem 0.65rem; border-radius: 999px; background: var(--graphite); color: var(--deep); white-space: nowrap; }
.status.ok { background: rgba(48, 117, 148, 0.12); color: var(--accent-dim); }
.status.broken { background: var(--deep); color: #fff; }
ul.plain { list-style: none; padding: 0; margin: 0.5rem 0 0.75rem; }
ul.plain li { margin: 0.1rem 0; }
.copy { font-family: ui-monospace, Menlo, monospace; font-size: 0.85rem; background: var(--graphite); padding: 0.5rem 0.7rem; border-radius: 8px; word-break: break-all; }

/* --- Booking pages (src/admin/pages.tsx) -------------------------------------
   The home screen: one card per page with its link and the two things people
   come for, Copy link and Personal link. The editor: Basics open, every
   optional section folded with a one-line summary of what it holds. */

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-head h1 { margin-bottom: 0.3rem; }
.page-head { margin-bottom: 1.75rem; }
.page-head .lead { margin: 0.25rem 0 0; }
@media (max-width: 40rem) { .page-head > .btn { width: 100%; } }
h2.group { font-size: 0.9rem; letter-spacing: 0.01em; color: var(--muted); margin: 2rem 0 0.75rem; }
.stack > h2.group:first-child { margin-top: 0.5rem; }
.pages { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); margin-top: 0 !important; }
.page-card {
  position: relative; display: flex; flex-direction: column; gap: 0.55rem;
  background: #fff; border: 1px solid var(--hair); border-radius: 16px; padding: 1.15rem 1.25rem 1.2rem;
  transition: border-color 0.2s, box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.page-card::before { content: ''; position: absolute; left: 0; top: 1.1rem; bottom: 1.1rem; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.page-card:hover { border-color: rgba(48, 117, 148, 0.35); box-shadow: var(--lift); transform: translateY(-2px); }
.page-card.off::before { background: var(--hair-strong); }
.page-card.off h3, .page-card.off .pc-meta, .page-card.off .pc-link { opacity: 0.6; }
.pc-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 2.25rem; }
.pc-head form, .share-bar form { margin: 0; }
.pc-head h3 { font-size: 1.15rem; font-weight: 400; margin: 0; line-height: 1.35; }
.pc-head h3 a { color: var(--signal); text-decoration: none; }
.pc-head h3 a:hover { color: var(--accent-dim); }
.pc-meta { margin: 0; color: var(--muted); font-size: 0.9rem; }
.pc-link { margin: 0; font-size: 0.85rem; color: var(--accent-on-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: auto; padding-top: 0.4rem; }

/* On/off: a drawn switch, the label beside it for anyone not reading colour. */
button.switch {
  position: relative; display: inline-flex; flex-direction: row-reverse; align-items: center; gap: 0.5rem; flex: none;
  min-height: 2.25rem; padding: 0; background: none; border: 0; font: inherit; font-size: 0.85rem; color: var(--muted); cursor: pointer;
}
button.switch::before { content: ''; flex: none; width: 2.4rem; height: 1.4rem; border-radius: 999px; background: var(--steel); box-shadow: inset 0 0 0 1px var(--hair-strong); transition: background-color 0.25s var(--ease); }
button.switch::after {
  content: ''; position: absolute; top: 50%; right: 1.15rem; width: 1.1rem; height: 1.1rem; margin-top: -0.55rem; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(13, 26, 38, 0.25); transition: transform 0.25s var(--ease);
}
button.switch[aria-pressed='true'] { color: var(--accent-dim); }
button.switch[aria-pressed='true']::before { background: var(--accent); box-shadow: none; }
button.switch[aria-pressed='true']::after { transform: translateX(1rem); }
button.switch:focus-visible { outline-offset: 4px; border-radius: 8px; }

.checklist ol { list-style: none; padding: 0; margin: 0.75rem 0 0; }
.checklist li { display: grid; grid-template-columns: auto 1fr auto; gap: 0.25rem 0.9rem; align-items: center; padding: 0.8rem 0; border-top: 1px solid var(--hair); }
.checklist li .t { margin: 0; }
.checklist li .hint { margin: 0.1rem 0 0; }
.checklist .tick { width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 1.5px solid var(--hair-strong); }
.checklist li.done .tick { border-color: var(--accent); background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1.5 5.2l3 3 6-6.5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 0.7rem no-repeat; }
.checklist li.done .t { color: var(--muted); }
@media (max-width: 40rem) { .checklist li { grid-template-columns: auto 1fr; } .checklist li .btn { grid-column: 2; justify-self: start; } }
.card.empty { text-align: left; }

/* The editor's link strip: what you came to copy, above the form. */
.share-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  background: var(--deep); color: #fff; border-radius: 16px; padding: 1rem 1.25rem; margin: 0 0 1.25rem;
}
.share-bar .label { margin: 0; font-size: 0.82rem; letter-spacing: 0.01em; color: rgba(255, 255, 255, 0.7); }
.share-bar .url { margin: 0.2rem 0 0; color: var(--accent-on-dark); word-break: break-all; }
.share-bar .url.muted { color: rgba(255, 255, 255, 0.7); }
.share-bar .sub { margin: 0.35rem 0 0; font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); }
/* After saving, the list opens with the page's link on top (pages.tsx, Ready). */
.share-bar.ready { margin: 0; animation: adm-in 0.3s var(--ease) both; }
.share-bar.ready .url { font-size: 1.05rem; }
@media (max-width: 40rem) { .share-bar.ready .actions, .share-bar.ready .actions .btn { width: 100%; } }
.page-card.just { border-color: var(--accent); box-shadow: var(--ring); }
.share-bar .btn.secondary { background: transparent; color: #fff; border-color: rgba(247, 249, 249, 0.35); }
.share-bar .btn.secondary:hover { background: rgba(247, 249, 249, 0.1); color: #fff; }
.share-bar .btn:not(.secondary) { background: #fff; color: var(--deep); }
.share-bar .btn:not(.secondary):hover { background: var(--graphite); color: var(--deep); }
.share-bar button.switch { color: rgba(255, 255, 255, 0.8); }
.share-bar button.switch::before { background: rgba(247, 249, 249, 0.18); box-shadow: none; }
.share-bar button.switch[aria-pressed='true'] { color: #fff; }
.share-bar button.switch[aria-pressed='true']::before { background: var(--accent-bright); }
.min0 { min-width: 0; }

.prefixed { display: flex; align-items: stretch; border: 1px solid var(--hair-strong); border-radius: 10px; background: #fff; transition: border-color 0.2s, box-shadow 0.2s; overflow: hidden; }
.prefixed:focus-within { border-color: var(--accent); box-shadow: var(--ring); }
.prefixed span { display: flex; align-items: center; padding: 0 0.1rem 0 0.85rem; color: var(--muted); font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; flex: none; }
.prefixed input { border: 0; border-radius: 0; box-shadow: none !important; padding-left: 0.15rem; min-width: 0; }
p.static { margin: 0; min-height: 2.9rem; display: flex; align-items: center; color: var(--signal); }

details.fold { background: #fff; border: 1px solid var(--hair); border-radius: 16px; transition: border-color 0.2s, box-shadow 0.25s var(--ease); }
details.fold:hover { border-color: rgba(48, 117, 148, 0.3); }
details.fold[open] { box-shadow: var(--lift); }
details.fold > summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 0.15rem 1rem; align-items: center;
  padding: 1.05rem 1.25rem; border-radius: 16px; min-height: 3.5rem;
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary .t { font-size: 1.15rem; font-weight: 400; color: var(--signal); }
details.fold > summary .s { grid-column: 1; color: var(--muted); font-size: 0.9rem; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
details.fold > summary::after {
  content: ''; grid-column: 2; grid-row: 1 / span 2; width: 2rem; height: 2rem; border-radius: 50%; background: var(--graphite) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23307594' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") center / 0.65rem no-repeat;
  transition: transform 0.3s var(--ease), background-color 0.2s;
}
details.fold > summary:hover::after { background-color: var(--steel); }
details.fold[open] > summary::after { transform: rotate(180deg); }
details.fold[open] > summary .s { display: none; }

details.fold > .body { padding: 0 1.25rem 1.4rem; }
details.fold[open] > .body { animation: adm-in 0.25s var(--ease) both; }
@media (min-width: 40rem) { details.fold > summary { padding: 1.2rem 1.75rem; } details.fold > .body { padding: 0 1.75rem 1.6rem; } }
.preview-label { color: var(--muted); }
[data-title-preview] { color: var(--signal); }

ul.people { list-style: none; padding: 0; margin: 0; }
ul.people li { display: grid; grid-template-columns: minmax(8rem, 1fr) minmax(10rem, 13rem) minmax(10rem, 1fr); gap: 0.6rem 1rem; align-items: center; padding: 0.55rem 0; border-top: 1px solid var(--hair); }
ul.people li:first-child { border-top: 0; }
@media (max-width: 40rem) { ul.people li { grid-template-columns: 1fr; gap: 0.4rem; padding: 0.8rem 0; } }
table.questions input.choices { margin-top: 0.4rem; }
@media (min-width: 40.01rem) {
  table.questions td:last-child { width: 5.5rem; vertical-align: middle; }
  table.questions td:nth-child(3) { width: 10rem; }
}

.savebar {
  position: sticky; bottom: 0; z-index: 20; display: flex; justify-content: flex-end; gap: 0.6rem;
  margin: 1.25rem -1rem 0; padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom));
  background: rgba(247, 249, 249, 0.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--hair);
}
@media (max-width: 40rem) { .savebar .btn { flex: 1; } }

.copy-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.copy-row .copy { flex: 1 1 16rem; min-width: 0; }
.copy-row .lang { flex: 0 0 4.5rem; color: var(--muted); font-size: 0.85rem; }
@media (max-width: 40rem) { .copy-row .lang { flex-basis: 100%; } }
.btn.copied { background: var(--accent-dim); color: #fff; border-color: transparent; }
ul.slot-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
ul.slot-chips li { font-size: 0.85rem; padding: 0.35rem 0.75rem; border-radius: 999px; background: rgba(48, 117, 148, 0.1); color: var(--accent-dim); }

/* Links that open the booking page in a new tab carry a small arrow. */
svg.ext { width: 0.7em; height: 0.7em; margin-left: 0.3em; vertical-align: 0.05em; opacity: 0.75; }
.pc-link a, .share-bar .url a { text-decoration: none; }
.pc-link a:hover, .share-bar .url a:hover { text-decoration: underline; }
.share-bar .url a { color: var(--accent-on-dark); }
a.copy { display: block; color: var(--signal); text-decoration: none; }
a.copy:hover { color: var(--accent-dim); text-decoration: underline; }
.url-preview { color: var(--signal); overflow-wrap: anywhere; }

/* Calendar entry: what the meeting will be called, as it will look. */
.entry-preview { border-left: 3px solid var(--accent); background: var(--graphite); border-radius: 10px; padding: 0.85rem 1.1rem; }
.entry-preview .label { margin: 0; font-size: 0.82rem; letter-spacing: 0.01em; color: var(--muted); }
.entry-preview .title { margin: 0.3rem 0 0.2rem; font-size: 1.1rem; font-weight: 400; color: var(--signal); }

ul.pick-list { list-style: none; padding: 0; margin: 0; columns: 2 18rem; column-gap: 2rem; }
ul.pick-list li { break-inside: avoid; }
ul.pick-list .check { align-items: baseline; flex-wrap: wrap; column-gap: 0.6rem; row-gap: 0; }
ul.pick-list .muted { font-size: 0.85rem; }
ul.people .who { display: flex; flex-direction: column; min-width: 0; }
ul.people .who .sub { font-size: 0.8rem; color: var(--muted); }
ul.people .who .sub.warn { color: var(--deep); }

/* Photo (My availability) and the round avatar it makes. */
.photo-row { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.avatar { width: 5.5rem; height: 5.5rem; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--hair); }
.avatar.initials { display: inline-flex; align-items: center; justify-content: center; background: var(--deep); color: #fff; font-size: 1.4rem; letter-spacing: 0.04em; border: 0; }
label.file-pick { position: relative; margin: 0; overflow: hidden; }
label.file-pick input[type='file'] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; min-height: 0; padding: 0; border: 0; }
label.file-pick:focus-within { box-shadow: var(--ring); }

/* --- First-run setup (admin/welcome.tsx) ----------------------------------- */

.wizard { max-width: 46rem; }
.wizard-steps { list-style: none; display: flex; gap: 0.5rem 1.5rem; flex-wrap: wrap; padding: 0; margin: 0 0 2rem; font-size: 0.9rem; color: var(--muted); }
.wizard-steps li { display: flex; align-items: center; gap: 0.5rem; }
.wizard-steps .n { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 1px solid var(--hair-strong); font-size: 0.8rem; }
.wizard-steps li.now { color: var(--signal); }
.wizard-steps li.now .n { background: var(--accent); border-color: var(--accent); color: #fff; }
.wizard-steps li.done .n { background: rgba(48, 117, 148, 0.12); border-color: transparent; color: var(--accent-dim); }
.wizard-points { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); margin: 1.75rem 0; }
.wizard-points section { border-top: 2px solid var(--accent); padding-top: 0.85rem; }
.wizard-points h2 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.wizard-points p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.wizard-actions { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; margin-top: 1.5rem; }
.wizard-actions .skip { color: var(--muted); font-size: 0.95rem; }
.wizard .card { margin-top: 1.25rem; }
.privacy-note { border-left: 3px solid var(--deep); background: var(--graphite); border-radius: 12px; padding: 0.9rem 1.1rem; margin-top: 1.25rem; }
.privacy-note .t { margin: 0 0 0.2rem; font-size: 0.85rem; letter-spacing: 0.01em; color: var(--deep); }
.privacy-note p:last-child { margin: 0; }
ul.connected { list-style: none; padding: 0; margin: 0; }
ul.connected li { padding: 0.45rem 0; border-top: 1px solid var(--hair); }
ul.connected li:first-child { border-top: 0; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.checklist .opt { font-size: 0.8rem; letter-spacing: 0.01em; }
.outlook-hours { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; background: var(--graphite); border-radius: 10px; padding: 0.6rem 0.9rem; }
.outlook-hours p { margin: 0; }

/* --- Find a time (admin/find.tsx) ---------------------------------------- */

.label-like { font-size: 0.875rem; color: var(--muted); margin: 0 0 0.4rem; }
.people-filter { margin-bottom: 0.6rem; max-width: 20rem; }
.muted.warn { color: var(--deep); }
.find-days { display: grid; gap: 1.1rem; }
.find-days fieldset { border: 0; padding: 0; margin: 0; }
.find-days legend { font-size: 0.85rem; letter-spacing: 0.01em; color: var(--muted); margin-bottom: 0.5rem; }
.find-times { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
label.time-chip { position: relative; margin: 0; }
label.time-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
label.time-chip span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 4.6rem; min-height: 2.75rem; padding: 0 0.9rem;
  border: 1px solid var(--hair-strong); border-radius: 10px; background: #fff; color: var(--signal); font-size: 0.95rem;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
label.time-chip:hover span { border-color: var(--accent); }
label.time-chip input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
label.time-chip input:focus-visible + span { box-shadow: var(--ring); }
.more-times { font-size: 0.85rem; }
.send-panel { border-top: 1px solid var(--hair); padding-top: 1.1rem; }
ul.upcoming li { padding: 0.35rem 0; }
@media (max-width: 40rem) { label.time-chip span { min-width: 4.2rem; } }

/* Find a time, results: a month of days that have a common free time, and
   the chosen day's times beside it. Compact on desktop, finger-sized on a
   phone; days without a time are not buttons at all. */
details.find-search { background: #fff; border: 1px solid var(--hair); border-radius: 16px; }
details.find-search > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; }
details.find-search > summary::-webkit-details-marker { display: none; }
details.find-search[open] > summary { padding-bottom: 0.25rem; }
details.find-search .fs-what { color: var(--signal); }
details.find-search .fs-change { color: var(--accent-on-light); font-size: 0.9rem; white-space: nowrap; }
details.find-search[open] .fs-change { display: none; }
details.find-search > form { padding: 0.75rem 1.25rem 1.25rem; }
@media (min-width: 40rem) { details.find-search > summary { padding: 1.1rem 1.75rem; } details.find-search > form { padding: 0.75rem 1.75rem 1.5rem; } }

.find-picker { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 17.5rem) minmax(0, 12rem); align-items: start; }
@media (max-width: 40rem) { .find-picker { grid-template-columns: 1fr; gap: 1.1rem; } }
.fp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.4rem; }
.fp-month { margin: 0; font-size: 0.95rem; color: var(--signal); }
.fp-nav { width: 2.25rem; height: 2.25rem; border-radius: 50%; border: 1px solid var(--hair-strong); background: #fff; color: var(--accent-on-light); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.fp-nav:disabled { opacity: 0.35; cursor: default; }
.fp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.2rem; text-align: center; }
.fp-wd { font-size: 0.7rem; letter-spacing: 0.06em; color: var(--muted); padding: 0.2rem 0; }
.fp-d { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border-radius: 50%; font-size: 0.88rem; color: rgba(13, 26, 38, 0.32); }
button.fp-d { border: 0; background: rgba(48, 117, 148, 0.1); color: var(--accent-dim); cursor: pointer; font: inherit; font-size: 0.88rem; transition: background-color 0.15s, color 0.15s; }
button.fp-d:hover { background: rgba(48, 117, 148, 0.2); }
button.fp-d.on { background: var(--accent); color: #fff; }
.fp-d.today { box-shadow: inset 0 0 0 1px var(--hair-strong); }
.fp-first { margin-top: 0.7rem; background: none; border: 0; padding: 0.3rem 0; font: inherit; font-size: 0.9rem; color: var(--accent-on-light); cursor: pointer; text-align: left; }
.fp-first:hover { text-decoration: underline; }
.fp-day { margin: 0.3rem 0 0.6rem; font-size: 0.95rem; color: var(--signal); }
.fp-list { display: flex; flex-direction: column; gap: 0.4rem; max-height: 19rem; overflow-y: auto; padding-right: 0.25rem; overscroll-behavior: contain; }
.fp-t {
  min-height: 2.5rem; border: 1px solid rgba(48, 117, 148, 0.45); border-radius: 10px; background: #fff; color: var(--accent-dim);
  font: inherit; font-size: 0.95rem; cursor: pointer; transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.fp-t:hover { border-color: var(--accent); background: rgba(48, 117, 148, 0.06); }
.fp-t[aria-pressed='true'] { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (max-width: 40rem) {
  .fp-list { display: grid; grid-template-columns: repeat(3, 1fr); max-height: none; overflow: visible; }
  .fp-t { min-height: 2.75rem; }
  button.fp-d, .fp-d { font-size: 0.95rem; }
}
.fp-chosen { margin: 0 0 0.6rem; color: var(--muted); }
.fp-chosen.set { color: var(--signal); font-size: 1.05rem; }
.find-book .send-panel { margin-top: 1.25rem; }
/* Wide screens: confirm beside the times, not below them. */
@media (min-width: 64rem) {
  .find-book { display: grid; grid-template-columns: auto minmax(16rem, 1fr); column-gap: 2.5rem; align-items: start; }
  .find-book > .find-picker, .find-book > .find-fallback { grid-column: 1; }
  .find-book > .send-panel { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; border-top: 0; border-left: 1px solid var(--hair); padding: 0.2rem 0 0 2.5rem; }
  .find-book > .send-panel .row { grid-template-columns: 1fr; }
}
button.btn:disabled { opacity: 0.45; cursor: default; }

/* Get started card (home) and the setup's photo step. */
.gs-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.gs-count { margin: 0; color: var(--muted); font-size: 0.9rem; }
progress.gs-bar { appearance: none; -webkit-appearance: none; width: 100%; height: 6px; border: 0; border-radius: 999px; background: var(--graphite); overflow: hidden; margin: 0.4rem 0 0.25rem; }
progress.gs-bar::-webkit-progress-bar { background: var(--graphite); border-radius: 999px; }
progress.gs-bar::-webkit-progress-value { background: var(--accent); border-radius: 999px; transition: width 0.4s var(--ease); }
progress.gs-bar::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
.checklist .tag { display: inline-block; vertical-align: 0.1em; margin-left: 0.4rem; font-size: 0.75rem; letter-spacing: 0.01em; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--graphite); color: var(--muted); }
.checklist .tag.req { background: rgba(48, 117, 148, 0.12); color: var(--accent-dim); }
.checklist li .photo-actions { flex-wrap: nowrap; }
@media (max-width: 40rem) { .checklist li .photo-actions { grid-column: 2; flex-wrap: wrap; } }
.gs-hide { margin: 0.5rem 0 0; text-align: right; }
.gs-hide .linklike { color: var(--muted); font-size: 0.9rem; }
.photo-step { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
/* Setup "About you": photo, then title and a line, one card split by a hairline. */
.about-step #about-form { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--hair); }
.avatar.large { width: 7rem; height: 7rem; font-size: 1.8rem; }
label.file-pick.busy { opacity: 0.6; pointer-events: none; }


/* Setup complete (welcome.tsx, finish): a petrol band that says "done",
   unlike the pale, numbered setup steps before it, then one first action. */
.done-band { position: relative; overflow: hidden; background: var(--deep); color: #fff; border-radius: 20px; padding: 2rem 1.5rem 1.6rem; animation: adm-in 0.35s var(--ease) both; }
@media (min-width: 40rem) { .done-band { padding: 2.5rem 2.5rem 2rem; } }
.done-band .eyebrow { color: rgba(255, 255, 255, 0.7); }
.done-band h1 { color: #fff; margin-bottom: 0.4rem; }
.done-band .sub { margin: 0; color: rgba(255, 255, 255, 0.82); max-width: 36rem; }
.done-emblem { width: 4rem; height: auto; color: var(--accent-bright); margin-bottom: 1.1rem; }
.done-emblem path { stroke-dasharray: 100; stroke-dashoffset: 100; animation: draw 1.1s var(--ease) 0.2s forwards; }
.done-summary { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 0.5rem; }
.done-summary li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.85rem; padding: 0.7rem 0.9rem; border-radius: 12px; background: rgba(247, 249, 249, 0.08); }
.done-summary .mark { width: 1.35rem; height: 1.35rem; border-radius: 50%; border: 1.5px solid rgba(247, 249, 249, 0.45); }
.done-summary li.ok .mark { border-color: var(--accent-bright); background: var(--accent-bright) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1.5 5.2l3 3 6-6.5' fill='none' stroke='%231d465a' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 0.7rem no-repeat; }
.done-summary .what { display: flex; flex-direction: column; min-width: 0; }
.done-summary .label { font-size: 0.82rem; letter-spacing: 0.01em; color: rgba(255, 255, 255, 0.62); }
.done-summary .value { color: #fff; overflow-wrap: anywhere; }
.done-summary a { color: var(--accent-on-dark); font-size: 0.9rem; }
.start-here { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; flex-wrap: wrap; margin-top: 1.25rem; padding: 1.4rem 1.5rem; background: #fff; border: 1px solid var(--hair); border-left: 3px solid var(--accent); border-radius: 16px; }
@media (min-width: 40rem) { .start-here { padding: 1.6rem 2rem; } }
.start-here h2 { margin: 0 0 0.35rem; font-size: 1.2rem; }
.start-here p:not(.eyebrow) { margin: 0; color: var(--muted); max-width: 32rem; }
.start-here .eyebrow { margin-bottom: 0.35rem; color: var(--accent-on-light); }
ul.also { list-style: none; padding: 0; margin: 1.5rem 0 0; }
ul.also li { padding: 0.65rem 0; border-top: 1px solid var(--hair); color: var(--muted); }
ul.also li:first-child { border-top: 0; }
ul.also a { margin-right: 0.35rem; }

/* --- Navigation, 1 Nov 2026: four tabs, Settings as a gear by the name --- */

.top .who .gear { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.25rem; padding: 0 0.7rem; border-radius: 999px; color: #fff; text-decoration: none; font-size: 0.9rem; border: 1px solid rgba(247, 249, 249, 0.28); }
.top .who .gear svg { width: 1.15rem; height: 1.15rem; }
.top .who .gear:hover, .top .who .gear[aria-current='page'] { background: rgba(247, 249, 249, 0.12); border-color: rgba(247, 249, 249, 0.5); }
.tabs a .short { display: none; }
@media (max-width: 40rem) {
  .tabs-inner { padding: 0 0.25rem; gap: 0; justify-content: space-between; }
  .tabs a { padding: 0 0.45rem; font-size: 0.88rem; flex: 0 1 auto; }
  .tabs a::after { left: 0.45rem; right: 0.45rem; }
  .top .who .gear-label { display: none; }
  .top .who .gear { width: 2.5rem; height: 2.5rem; padding: 0; justify-content: center; }
}
@media (max-width: 24rem) { .tabs a .long { display: none; } .tabs a .short { display: inline; } }
/* Small phones (320 px): the header keeps logo, gear and Sign out on one line. */
@media (max-width: 22.5rem) {
  .top .bar { gap: 0.5rem; padding-left: 0.75rem; padding-right: 0.75rem; }
  .top .env { display: none; }
  .top .who { gap: 0.4rem; }
  .top .who button { padding: 0.3rem 0.7rem; font-size: 0.85rem; }
  .tabs a { padding: 0 0.3rem; font-size: 0.84rem; }
}
/* Settings sub-sections: one swipeable row on a phone instead of three rows of pills. */
@media (max-width: 40rem) {
  nav.subtabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -1rem; margin-right: -1rem; padding: 0 1rem 0.2rem; }
  nav.subtabs::-webkit-scrollbar { display: none; }
  nav.subtabs a { flex: none; min-height: 2.25rem; padding: 0 0.85rem; font-size: 0.88rem; }
}

.subtabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: -0.25rem 0 1.5rem; }
.subtabs a { display: inline-flex; align-items: center; min-height: 2.4rem; padding: 0 1rem; border-radius: 999px; border: 1px solid var(--hair-strong); background: #fff; color: var(--signal); text-decoration: none; font-size: 0.92rem; }
.subtabs a:hover { border-color: var(--accent); color: var(--accent-dim); }
.subtabs a[aria-current='page'], .subtabs a[aria-current='location'] { background: var(--deep); border-color: var(--deep); color: #fff; }
.crumb { margin: 0 0 0.5rem; font-size: 0.9rem; color: var(--muted); }
.crumb a { color: var(--accent-on-light); }
.privacy-line { margin: 0.75rem 0 0; color: var(--muted); font-size: 0.9rem; }
button.linklike.quiet { color: var(--muted); font-size: 0.9rem; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
button.linklike.quiet:hover { color: var(--deep); }

/* Meetings home */
.quick-actions { justify-content: flex-end; }
.agenda .group { margin-top: 0.5rem; }
.agenda ul { list-style: none; padding: 0; margin: 0; background: #fff; border: 1px solid var(--hair); border-radius: 16px; overflow: hidden; }
.agenda li.ag { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) auto auto; gap: 0.25rem 1rem; align-items: center; padding: 0.8rem 1.25rem; border-top: 1px solid var(--hair); }
.agenda li.ag:first-child { border-top: 0; }
.ag-time { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.ag-time .d { font-size: 0.8rem; color: var(--muted); }
.ag-time .t { color: var(--signal); }
.ag-main { display: flex; flex-direction: column; min-width: 0; }
.ag-main > a, .ag-main > span:first-child { color: var(--signal); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-main > a:hover { color: var(--accent-dim); text-decoration: underline; }
.ag-main .muted { font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-tags { display: flex; gap: 0.35rem; flex-wrap: wrap; justify-content: flex-end; }
.kind { font-size: 0.75rem; letter-spacing: 0.01em; padding: 0.15rem 0.55rem; border-radius: 999px; background: var(--graphite); color: var(--muted); }
.k-guest .kind, .k-off .kind { background: rgba(48, 117, 148, 0.12); color: var(--accent-dim); }
.ag-actions { display: flex; gap: 0.9rem; align-items: center; justify-content: flex-end; min-width: 3rem; }
@media (max-width: 40rem) {
  .agenda li.ag { grid-template-columns: 4.5rem minmax(0, 1fr); padding: 0.75rem 1rem; }
  .ag-tags, .ag-actions { grid-column: 2; justify-content: flex-start; }
}
.more-links { color: var(--muted); font-size: 0.92rem; }

/* Availability: add buttons that open a small form in place, then one list */
.add-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-start; }
details.add { flex: 0 0 auto; }
details.add > summary { list-style: none; cursor: pointer; }
details.add > summary::-webkit-details-marker { display: none; }
details.add[open] { flex: 1 1 100%; order: 2; }
details.add[open] > summary { margin-bottom: 0.6rem; }
details.add > .card { animation: adm-in 0.2s var(--ease) both; }
.week-line { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; align-items: baseline; background: #fff; border: 1px solid var(--hair); border-radius: 14px; padding: 0.8rem 1.25rem; }
.week-line .wk { color: var(--signal); }
.week-line a { margin-left: auto; }
ul.exceptions { list-style: none; padding: 0; margin: 0; }
ul.exceptions li { display: grid; grid-template-columns: 11rem auto minmax(0, 1fr) auto; gap: 0.3rem 1rem; align-items: center; padding: 0.7rem 0; border-top: 1px solid var(--hair); }
ul.exceptions li:first-child { border-top: 0; }
ul.exceptions .when { color: var(--signal); }
ul.exceptions .kind { justify-self: start; }
.k-day-off { background: rgba(48, 117, 148, 0.12); color: var(--accent-dim); }
@media (max-width: 40rem) { ul.exceptions li { grid-template-columns: 1fr auto; } ul.exceptions .what { grid-column: 1 / -1; } }

/* Settings › Calendars: one row per account, its calendars folded */
ul.accounts { list-style: none; padding: 0; margin: 0; }
ul.accounts > li { padding: 0.9rem 0; border-top: 1px solid var(--hair); }
ul.accounts > li:first-child { border-top: 0; padding-top: 0.2rem; }
.acc-head { display: flex; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; align-items: baseline; }
.acc-name { display: flex; flex-direction: column; }
.acc-name .muted { font-size: 0.88rem; overflow-wrap: anywhere; }
.acc-state { display: flex; gap: 0.35rem; }
.acc-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-top: 0.3rem; }
.acc-foot details.more > summary { min-height: 2.25rem; font-size: 0.9rem; }
details.connect { margin-top: 0.75rem; }
details.connect > summary { list-style: none; cursor: pointer; }
details.connect > summary::-webkit-details-marker { display: none; }
details.connect[open] > summary { margin-bottom: 0.6rem; }
.connect-choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }
dl.facts { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 0.55rem 1rem; margin: 0; }
@media (max-width: 40rem) { dl.facts { grid-template-columns: 5.5rem minmax(0, 1fr); } }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
table.team tr.inactive td { opacity: 0.55; }

/* Booking detail: history folded */
details.history > summary { color: var(--muted); }
.poll-entry { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.poll-entry h2 { font-size: 1.05rem; margin: 0 0 0.2rem; }
.poll-entry .hint { margin: 0; }

/* Confirm dialog for destructive actions (admin.js) */
dialog.confirm { border: 0; border-radius: 16px; padding: 1.4rem 1.5rem 1.2rem; max-width: 24rem; box-shadow: var(--lift); color: var(--signal); }
dialog.confirm::backdrop { background: rgba(13, 26, 38, 0.35); }
dialog.confirm p { margin: 0 0 1.1rem; }
dialog.confirm .actions { justify-content: flex-end; }

/* htmx: a request in flight dims its target. */
.htmx-request { opacity: 0.6; transition: opacity 0.2s; }
.htmx-added { animation: adm-in 0.25s var(--ease) both; }

@media (max-width: 40rem) {
  main { padding-top: 1.75rem; }
  h1 { font-size: 1.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  main, .notice, .htmx-added { animation: none; }
  a.card, a.card h2::after, .tabs a::after, .btn, details.more > summary::before { transition: none; }
  a.card:hover, .page-card:hover { transform: none; }
  .page-card, button.switch::before, button.switch::after, details.fold, details.fold > summary::after { transition: none; }
  details.fold[open] > .body { animation: none; }
  .done-emblem path { animation: none; stroke-dashoffset: 0; }
  .done-band { animation: none; }
  label.time-chip span, button.fp-d, .fp-t { transition: none; }
}
dd.pre { white-space: pre-line; }

/* --- Sign in (admin/auth.tsx) ---------------------------------------------
   Two halves on a wide screen: the petrol brand panel with the logo's pulse
   wave, and the card with the one thing to do. On a phone the panel is a band
   above the card. The wave draws itself once, then a spark runs along it
   every 5.5 s (brand motion: long rest, 0.88 s run). */
body.bare { min-height: 100vh; }
body.bare main { max-width: none; margin: 0; padding: 0; animation: none; }
.auth { display: grid; min-height: 100vh; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 56rem) { .auth { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } }
.auth-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 1.5rem; background: var(--deep); color: #fff; padding: 1.5rem 1.25rem 1.75rem; }
@media (min-width: 56rem) { .auth-brand { padding: 2.5rem 3.5rem; justify-content: space-between; } }
.auth-brand-top { display: flex; align-items: center; gap: 0.75rem; }
.auth-logo { height: 1.75rem; width: auto; }
@media (min-width: 56rem) { .auth-logo { height: 2rem; } }
.auth-brand .eyebrow { color: rgba(255, 255, 255, 0.7); }
.auth-brand-body { max-width: 30rem; animation: adm-in 0.5s var(--ease) 0.1s both; }
/* Large on petrol: Roboto Thin (brand weight rule). */
.auth-claim { margin: 0; font-weight: 100; font-size: 2.25rem; line-height: 1.1; letter-spacing: 0.005em; }
@media (min-width: 56rem) { .auth-claim { font-size: 3.4rem; } }
.auth-sub { margin: 0.9rem 0 0; color: rgba(255, 255, 255, 0.8); font-size: 1rem; line-height: 1.55; }
.auth-privacy { margin: 0; color: rgba(255, 255, 255, 0.62); font-size: 0.85rem; }
@media (max-width: 55.99rem) { .auth-privacy { display: none; } }
.auth-wave { display: block; width: calc(100% + 2.5rem); max-width: none; height: auto; margin: 0 -1.25rem; }
/* Edge to edge, like the site's signal trace. */
@media (min-width: 56rem) { .auth-wave { width: calc(100% + 7rem); margin: 0 -3.5rem; } }
@media (max-width: 55.99rem) { .auth-wave { margin-top: -0.25rem; } }
.auth-wave-line { stroke: rgba(247, 249, 249, 0.34); stroke-dasharray: 100 200; stroke-dashoffset: 100; animation: auth-draw 1.1s cubic-bezier(0.45, 0, 0.25, 1) 0.25s both; }
.auth-wave-spark { stroke: var(--accent-bright); stroke-dasharray: 7 200; stroke-dashoffset: 7; animation: auth-pulse 5.5s linear 1.4s infinite; }
@keyframes auth-draw { to { stroke-dashoffset: 0; } }
@keyframes auth-pulse { 0% { stroke-dashoffset: 7; } 16% { stroke-dashoffset: -100; } 100% { stroke-dashoffset: -100; } }

.auth-panel { display: flex; align-items: flex-start; justify-content: center; padding: 1.75rem 1.25rem 3rem; }
@media (min-width: 56rem) { .auth-panel { align-items: center; padding: 3rem; } }
.auth-card { width: 100%; max-width: 25rem; animation: adm-in 0.45s var(--ease) 0.2s both; }
.auth-card h1 { font-size: 2rem; margin-bottom: 0.4rem; }
.auth-lead { margin: 0 0 1.4rem; color: var(--muted); }
.btn.auth-ms { width: 100%; justify-content: center; gap: 0.7rem; min-height: 3.25rem; font-size: 1.02rem; position: relative; overflow: hidden; }
.btn.auth-ms svg { width: 1.05rem; height: 1.05rem; flex: none; }
/* Hover: the spark runs once along the bottom edge of the button. */
.btn.auth-ms::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent); transform: translateX(-100%); }
.btn.auth-ms:hover::after, .btn.auth-ms:focus-visible::after { animation: auth-spark 0.88s cubic-bezier(0.45, 0, 0.25, 1) both; }
@keyframes auth-spark { to { transform: translateX(100%); } }
.auth-other { margin: 1.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--hair); color: var(--muted); font-size: 0.9rem; }
.auth-card .notice { margin: 0 0 1.25rem; }

@media (prefers-reduced-motion: reduce) {
  .auth-brand-body, .auth-card { animation: none; }
  .auth-wave-line { animation: none; stroke-dashoffset: 0; }
  .auth-wave-spark { animation: none; opacity: 0; }
  .btn.auth-ms:hover::after, .btn.auth-ms:focus-visible::after { animation: none; }
}

/* --- Moving between pages -------------------------------------------------
   Browsers that know cross-document view transitions cross-fade from one
   admin page to the next, the header holding still, instead of a white flash.
   Others simply load the page. Off for anyone who asked for less motion. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .top { view-transition-name: app-top; }
  ::view-transition-old(root) { animation: vt-fade 0.14s ease-out both; }
  ::view-transition-new(root) { animation: vt-fade 0.22s var(--ease) reverse both; }
}
@keyframes vt-fade { to { opacity: 0; } }

/* Booking detail: link a booking to a CAC task by pasting its ClickUp link. */
form.link-task { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem; margin-top: 1rem; }
form.link-task > div { flex: 1 1 18rem; }
span.plain { color: var(--signal); }
