/* AertaBook. One stylesheet, no build step, no web fonts. */

:root {
  color-scheme: light;

  --paper: #F4F7FB;
  --card: #FFFFFF;
  --header: #FFFFFF;
  --sunk: #FAFCFE;
  --raised: #F1F5F9;
  --line: #D9E1EC;
  --line-soft: #E2E8F0;
  --input-line: #D5DFEA;
  --ink: #0B1220;
  --input-ink: #111827;
  --muted: #5C667A;
  --faint: #64748B;
  --nav: #334155;
  --brand: #64748B;
  --accent: #0079BF;
  --accent-hover: #0068A6;
  --accent-ink: #FFFFFF;
  --accent-soft: #EAF5FF;
  --accent-soft-line: #C9E7FA;
  --nav-active: #0079BF;
  --invite: #0079BF;
  --cyan: #00CFE8;
  --focus: #00AEEF;
  --focus-ring: rgba(0, 174, 239, 0.15);
  --bright: #176BFF;
  --mint: #28DFA2;
  --warn: #F59E0B;
  --danger: #E50914;

  --unconfirmed: #C47A12;
  --unconfirmed-bg: #FFF4E5;
  --unconfirmed-ink: #8A5410;
  --confirmed: #28DFA2;
  --confirmed-bg: #E7FBF4;
  --confirmed-ink: #0F6B4F;
  --cancelled: #E50914;
  --cancelled-bg: #FDECEC;
  --cancelled-ink: #9F0B12;
  --now: #E50914;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(11, 18, 32, 0.04), 0 8px 24px rgba(11, 18, 32, 0.06);
  --lane-head: 156px;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    /* Neutrals: deep navy, not pure black */
    --paper: #0B1220;
    --card: #162033;
    --header: #0F172A;
    --sunk: #0F1A2B;
    --raised: #111827;
    --line: #253247;
    --line-soft: #253247;
    --input-line: #2B3A52;
    --ink: #F8FAFC;
    --input-ink: #F8FAFC;
    --muted: #A7B3C7;
    --faint: #7C8AA0;
    --nav: #D7E0EA;
    --brand: #A7B3C7;

    /* Brand / actions: calm UI, cyan for focus and active nav */
    --accent: #0079BF;
    --accent-hover: #0094E8;
    --accent-ink: #FFFFFF;
    --accent-soft: #10243A;
    --accent-soft-line: #1E3A5F;
    --nav-active: #22D3EE;
    --invite: #22D3EE;
    --cyan: #22D3EE;
    --focus: #22D3EE;
    --focus-ring: rgba(34, 211, 238, 0.18);
    --bright: #176BFF;
    --mint: #28DFA2;
    --warn: #F59E0B;
    --danger: #E50914;

    /* Status */
    --unconfirmed: #F59E0B;
    --unconfirmed-bg: #2A2110;
    --unconfirmed-ink: #FBBF24;
    --confirmed: #28DFA2;
    --confirmed-bg: #102820;
    --confirmed-ink: #6EE7B7;
    --cancelled: #E50914;
    --cancelled-bg: #2A1216;
    --cancelled-ink: #FCA5A5;
    --now: #E50914;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 10px 28px rgba(0, 0, 0, 0.5);
  }
}

html { font-size: 90%; }
* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 14px/1.45 "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 0.7rem 1.25rem 0.35rem;
  background: var(--header);
}
.topbar-home {
  padding: 1.1rem 1.25rem 0.25rem;
  background: transparent;
}
.topbar-portal {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  background: transparent;
  justify-content: space-between;
  gap: 1rem;
}
.portal-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem 1rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
.portal-nav a {
  color: var(--nav);
  text-decoration: none;
  font-size: 0.92rem;
  border: 0;
  padding: 0;
}
.portal-nav a:hover { color: var(--nav-active); }
.product-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}
.product-logo img {
  display: block;
  width: auto;
  height: 36px;
  max-width: min(160px, 46vw);
}
.product-logo-home img {
  height: 56px;
  max-width: min(240px, 72vw);
}
.product-logo-footer img {
  height: 48px;
  max-width: min(220px, 70vw);
}
.site-logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}
.site-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.site-logo {
  display: block;
  width: auto;
  height: 52px;
  max-width: 64px;
  object-fit: contain;
  flex: 0 0 auto;
}
.site-logo-card {
  height: 64px;
  max-width: 72px;
}

/* Wordmark beside each trade mark; colour keyed to the logo palette */
.topbar[data-site],
.card-link[data-site],
.demo-card[data-site] {
  --site-ink: var(--brand);
}
.topbar[data-site="rivercut"],
.card-link[data-site="rivercut"],
.demo-card[data-site="rivercut"] { --site-ink: #9A5B3C; }
.topbar[data-site="halltown"],
.card-link[data-site="halltown"],
.demo-card[data-site="halltown"] { --site-ink: #0B6FA8; }
.topbar[data-site="millstreet"],
.card-link[data-site="millstreet"],
.demo-card[data-site="millstreet"] { --site-ink: #155EAE; }
.topbar[data-site="smiths"],
.card-link[data-site="smiths"],
.demo-card[data-site="smiths"] { --site-ink: #B91C1C; }
.topbar[data-site="ledger"],
.card-link[data-site="ledger"],
.demo-card[data-site="ledger"] { --site-ink: #1E3A5F; }
@media (prefers-color-scheme: dark) {
  .topbar[data-site="rivercut"],
  .card-link[data-site="rivercut"],
  .demo-card[data-site="rivercut"] { --site-ink: #E0A07A; }
  .topbar[data-site="halltown"],
  .card-link[data-site="halltown"],
  .demo-card[data-site="halltown"] { --site-ink: #7DD3FC; }
  .topbar[data-site="millstreet"],
  .card-link[data-site="millstreet"],
  .demo-card[data-site="millstreet"] { --site-ink: #7CB8FF; }
  .topbar[data-site="smiths"],
  .card-link[data-site="smiths"],
  .demo-card[data-site="smiths"] { --site-ink: #FCA5A5; }
  .topbar[data-site="ledger"],
  .card-link[data-site="ledger"],
  .demo-card[data-site="ledger"] { --site-ink: #9EC5E8; }
}

main { flex: 1 0 auto; }

.site-footer {
  flex: 0 0 auto;
  margin-top: 2rem;
  padding: 1.75rem 1.25rem 2rem;
  text-align: center;
}
.site-footer-powered {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.55rem 0.7rem;
  margin: 0 0 0.65rem;
}
.site-footer-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid currentColor;
  line-height: 1.2;
  padding-bottom: 1px;
}
.site-footer-legal {
  margin: 0;
  font-size: 0.82rem;
  color: var(--faint);
}
.site-footer-legal a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.site-footer-legal a:hover { color: var(--ink); }
.site-footer-dot {
  margin: 0 0.35rem;
}

.legal {
  max-width: 44rem;
  margin: 0 auto;
}
.legal h1 {
  margin: 0 0 0.85rem;
  font-size: 1.55rem;
}
.legal h2 {
  margin: 1.5rem 0 0.55rem;
  font-size: 1.05rem;
}
.legal p, .legal li {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.55;
}
.legal p { margin: 0 0 0.75rem; }
.legal-lede { color: var(--muted); }
.legal ul {
  margin: 0 0 0.85rem;
  padding-left: 1.2rem;
}
.legal li { margin: 0 0 0.35rem; }
.legal a { color: var(--accent); }
.legal code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--sunk);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
}
.legal-nav {
  margin-top: 1.5rem !important;
  padding-top: 1rem;
  border-top: 1px solid var(--line-soft);
}
.brand, .kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.brand {
  padding: 0;
  color: var(--brand);
}
.site-lockup .brand,
.card-link .brand {
  font-size: clamp(0.95rem, 2.4vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.15;
  color: var(--site-ink, var(--brand));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kicker {
  padding: 0;
  color: var(--faint);
}

nav {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  padding: 0.45rem 1.25rem 0.8rem;
  background: var(--header);
  border-bottom: 1px solid var(--line-soft);
}
nav a {
  color: var(--nav);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  font-size: 0.9rem;
}
nav a:hover,
nav a[aria-current="page"] { color: var(--nav-active); border-bottom-color: var(--nav-active); }
nav form { margin-left: auto; }
nav button {
  background: none;
  border: 0;
  color: var(--nav);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
nav button:hover { color: var(--nav-active); }

main { max-width: 62rem; width: 100%; margin: 0 auto; padding: 1.25rem; box-sizing: border-box; }
main.layout-wide { max-width: 84rem; }

.card, .card-link {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin: 0.75rem 0;
  color: inherit;
  text-decoration: none;
}
.cards { display: grid; gap: 0.6rem; }
.card-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.card-link .site-logo-card { margin: 0; flex: 0 0 auto; }
.card-link-text { min-width: 0; }
.card-link-text strong { display: block; }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin: 0 0 1rem;
}
.card-title { margin: 0; font-weight: 700; }
.card-head .choice-set { margin: 0 0 0 auto; padding: 0; border: 0; min-width: 0; }

.type-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--raised);
  border-radius: 999px;
}
.type-switch-opt { position: relative; display: block; margin: 0; font-weight: 600; cursor: pointer; }
.type-switch-opt input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  min-height: 0;
  opacity: 0;
  cursor: pointer;
}
.type-switch-opt span {
  display: block;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.2;
  white-space: nowrap;
}
.type-switch-opt input:checked + span,
a.type-switch-opt.is-active span { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.type-switch-opt input:focus-visible + span {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px var(--focus-ring);
}
a.type-switch-opt { text-decoration: none; }

.field { margin: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; margin-top: 0.7rem; }
.field-row .field label { margin-top: 0; }
.location-fields { display: none; }
form:has(input[name="visit_mode"][data-needs-location="1"]:checked) .location-fields,
form.is-mobile .location-fields { display: block; }

.meeting-link-fields { display: none; }
form:has(input[name="visit_mode"][data-needs-meeting-link="1"]:checked) .meeting-link-fields,
form.is-consult .meeting-link-fields { display: block; }
.meeting-link-fields .help { margin-top: 0.25rem; }

.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;
}

label, .label { display: block; margin: 0.7rem 0 0.25rem; font-weight: 600; font-size: 0.85rem; }
input, select, textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--input-line);
  border-radius: var(--radius-sm);
  background: var(--sunk);
  color: var(--input-ink);
  font: inherit;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
textarea { min-height: 5rem; resize: vertical; }

.primary, .secondary, .danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  margin-top: 1rem;
  padding: 0.6rem 1rem;
  border: 0;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.primary { background: var(--accent); color: var(--accent-ink) !important; }
.primary:hover { background: var(--accent-hover); }
.secondary { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.danger { background: var(--danger); color: #fff !important; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-top: 0.85rem; }
.actions .primary, .actions .danger, .actions .secondary { margin-top: 0; }
.actions form { margin: 0; }

.summary { display: grid; grid-template-columns: 7rem 1fr; gap: 0.3rem 0.75rem; margin: 0 0 1rem; }
.summary dt { color: var(--faint); font-weight: 600; font-size: 0.82rem; }
.summary dd { margin: 0; }

.help, .muted { color: var(--faint); font-size: 0.85rem; }
.banner {
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-line);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  color: var(--ink);
}
.banner.error, .field-error { color: var(--danger); }
.field-error { font-size: 0.82rem; }

main.layout-portal {
  max-width: 1120px;
  width: 100%;
  padding: 0.5rem 1.25rem 2.5rem;
}
.portal { margin: 0; }
.portal-eyebrow {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.portal-hero {
  padding: 1.25rem 0 1.75rem;
  max-width: 40rem;
}
.portal-hero h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.7rem, 3.8vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}
.portal-lede {
  margin: 0 0 0.7rem;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.45;
}
.portal-what {
  margin: 0 0 1.15rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}
.portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0 0 1.35rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary {
  background: var(--card);
  color: var(--accent);
  border-color: var(--accent);
}
.btn-secondary:hover { background: var(--accent-soft); }
.btn-on-accent {
  background: #fff;
  color: #0B4F7A;
}
.btn-on-accent:hover { background: #F0F7FC; color: #0B4F7A; }
.btn-compact {
  min-height: 36px;
  padding: 0.4rem 0.85rem;
  font-size: 0.9rem;
}
.portal-points {
  display: grid;
  gap: 0.65rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 720px) {
  .portal-points { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.portal-points li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--card);
}
.portal-points strong { font-size: 0.9rem; }
.portal-points span { color: var(--muted); font-size: 0.85rem; }

.portal-demos { padding: 0.5rem 0 1.5rem; }
.portal-demos h2,
.portal-how h2 {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
}
.portal-section-lede {
  margin: 0 0 1.1rem;
  max-width: 40rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.45;
}
.demo-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .demo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 980px) {
  .demo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.demo-card {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 1.1rem 1.15rem 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.demo-card:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(11, 18, 32, 0.08);
}
.demo-card-mark { margin: 0 0 0.65rem; }
.demo-card .site-logo-card {
  height: 72px;
  max-width: 88px;
  margin: 0;
}
.demo-card h3 {
  margin: 0 0 0.2rem;
  font-size: 1.12rem;
  color: var(--site-ink, var(--ink));
}
.demo-card-trade {
  margin: 0 0 0.55rem;
  color: var(--faint);
  font-size: 0.88rem;
  font-weight: 600;
}
.demo-card-blurb {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
  flex: 1 1 auto;
}
.demo-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.9rem;
}
.demo-tag {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
}
.demo-card[data-site="rivercut"] .demo-tag { background: #F8EDE6; color: #9A5B3C; }
.demo-card[data-site="halltown"] .demo-tag { background: #E5F4FC; color: #0B6FA8; }
.demo-card[data-site="millstreet"] .demo-tag { background: #E8F0FB; color: #155EAE; }
.demo-card[data-site="smiths"] .demo-tag { background: #FCE8E8; color: #B91C1C; }
.demo-card[data-site="ledger"] .demo-tag { background: #E8EEF5; color: #1E3A5F; }
.demo-card-open {
  display: block;
  width: 100%;
  margin-top: auto;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 650;
  font-size: 0.92rem;
  text-align: center;
  text-decoration: none;
}
.demo-card-open:hover {
  background: var(--accent);
  color: #fff;
}

.portal-how {
  margin: 0.5rem 0 1.5rem;
  padding: 1.25rem 1.15rem;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-line);
}
.how-steps {
  display: grid;
  gap: 0.85rem;
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: how;
}
@media (min-width: 720px) {
  .how-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
}
.how-steps li {
  position: relative;
  padding: 0.15rem 0 0 2rem;
  counter-increment: how;
}
.how-steps li::before {
  content: counter(how);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.how-steps strong { display: block; margin-bottom: 0.2rem; font-size: 0.95rem; }
.how-steps span { color: var(--muted); font-size: 0.88rem; line-height: 1.4; }

.portal-trial {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin: 0 0 1.25rem;
  padding: 1.35rem 1.35rem;
  border-radius: var(--radius);
  background: linear-gradient(115deg, #0079BF 0%, #176BFF 55%, #0094E8 100%);
  color: #fff;
}
.portal-trial-copy { max-width: 34rem; }
.portal-trial h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
  color: #fff;
}
.portal-trial p { margin: 0; color: rgba(255, 255, 255, 0.92); line-height: 1.45; }
.portal-trial-actions { text-align: center; }
.portal-trial-note {
  margin: 0.45rem 0 0 !important;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85) !important;
}
.portal-support {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.portal-support a { color: var(--accent); }

.banner.demo-trial {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin: 0.75rem 1.25rem 0;
  background: var(--accent-soft);
  border-color: var(--accent-soft-line);
  color: var(--ink);
}
.banner.demo-trial-portal {
  margin: 0 0 0.25rem;
}
.banner.demo-trial-portal .demo-trial-cta {
  margin-left: 0;
  width: 100%;
  justify-content: space-between;
  text-align: left;
}
.banner.demo-trial .demo-trial-copy {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--ink);
}
.banner.demo-trial .demo-trial-cta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem 0.65rem;
  margin-left: auto;
  text-align: right;
}
.banner.demo-trial .demo-trial-invite {
  font-size: 0.92rem;
  line-height: 1.35;
  font-weight: 500;
  color: var(--invite);
}
@media (prefers-color-scheme: dark) {
  .banner.demo-trial .demo-trial-copy { color: #DCE8F5; }
}
.banner.demo-trial .demo-trial-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.banner.demo-trial .demo-trial-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 1.75rem;
  width: 1.75rem;
  height: 1.75rem;
  max-width: 1.75rem;
  max-height: 1.75rem;
  overflow: hidden;
  border-radius: 999px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  text-decoration: none;
}
.banner.demo-trial .demo-trial-link:hover { border-color: var(--muted); }
.banner.demo-trial svg.demo-trial-icon {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px;
  max-height: 16px;
  display: block;
  flex: 0 0 16px;
}

/* ------------------------------------------------------------------ diary */

.toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}
.diary-nav {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 30px;
  padding: 0.15rem 0.6rem;
  border-radius: 4px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
}
.nav-btn:hover { background: var(--raised); color: var(--ink); }
.today-btn { min-width: 3.9rem; font-size: 0.85rem; }

.diary-title { font-size: 1.02rem; line-height: 1.2; }
.diary-title span { display: block; font-weight: 400; font-size: 0.76rem; color: var(--faint); }
.diary-switch { margin: 0 0 0 auto; }
.diary-note { margin: 0.7rem 0 0; }

.capstrip {
  display: flex;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
}
.cap {
  flex: 1 1 8rem;
  padding: 0.6rem 0.95rem;
  border-right: 1px solid var(--line-soft);
}
.cap:last-child { border-right: 0; }
.cap-key {
  display: block;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--faint);
}
.cap-value { display: block; font-size: 1.22rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.cap-value small { font-size: 0.68rem; font-weight: 400; color: var(--faint); margin-left: 1px; }
.cap.is-warn .cap-value { color: var(--unconfirmed); }
.cap-bar { display: block; width: 5.2rem; height: 3px; margin-top: 5px; border-radius: 2px; background: var(--raised); overflow: hidden; }
.cap-bar i { display: block; height: 100%; background: var(--accent); }

.board {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}
.capstrip + .board { border-top: 1px solid var(--line); }
.board-scroll { overflow-x: auto; }
.board-inner { min-width: 58rem; }

.lane-row { display: flex; border-bottom: 1px solid var(--line-soft); }
.lane-row:last-child { border-bottom: 0; }
.lane-row.is-ruler { background: var(--sunk); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 3; }

.lane-head {
  flex: 0 0 var(--lane-head);
  position: sticky;
  left: 0;
  z-index: 2;
  padding: 0.5rem 0.75rem;
  background: var(--card);
  border-right: 1px solid var(--line);
}
.lane-row.is-ruler .lane-head { background: var(--sunk); display: flex; align-items: center; }
.lane-row.is-ruler .lane-name {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--faint);
}
.lane-name { display: block; font-weight: 600; font-size: 0.88rem; }
.lane-meta { display: block; font-size: 0.72rem; color: var(--faint); margin-top: 1px; }
.lane-bar { display: block; height: 3px; margin-top: 6px; border-radius: 2px; background: var(--raised); overflow: hidden; }
.lane-bar i { display: block; height: 100%; background: var(--accent); opacity: 0.85; }
.lane-head.is-full .lane-bar i { background: var(--unconfirmed); }

.ruler { position: relative; flex: 1 1 auto; height: 30px; }
.tick { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line); }
.tick b { position: absolute; top: 8px; left: 5px; font-size: 0.7rem; font-weight: 500; color: var(--faint); white-space: nowrap; }

.lane {
  position: relative;
  flex: 1 1 auto;
  height: 76px;
  touch-action: pan-y;
  background-image:
    linear-gradient(to right, var(--line) 0 1px, transparent 1px),
    linear-gradient(to right, var(--line-soft) 0 1px, transparent 1px);
  background-size:
    calc(100% / var(--hours, 10)) 100%,
    calc(100% / (var(--hours, 10) * 2)) 100%;
  background-repeat: repeat-x;
}
.lane[data-lane]:hover { background-color: color-mix(in srgb, var(--accent) 4%, transparent); }

.now-line { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--now); z-index: 1; pointer-events: none; }
.now-flag {
  position: absolute;
  top: 5px;
  transform: translateX(-50%);
  padding: 1px 6px;
  border-radius: 9px;
  background: var(--now);
  color: #fff;
  font-size: 0.66rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.event-wrap { margin: 0.2rem 0; }
.event-wrap.job { position: absolute; top: 6px; bottom: 6px; margin: 0; z-index: 2; touch-action: none; }

.event-line {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  margin: 0;
  padding: 0.25rem 0.45rem;
  border: 1px solid transparent;
  border-left-width: 3px;
  border-radius: 4px;
  background: var(--unconfirmed-bg);
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-size: 0.78rem;
  color: var(--ink);
}
.job .event-line {
  height: 100%;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 1px;
  overflow: hidden;
  cursor: grab;
}
.job .event-line:active { cursor: grabbing; }
.event-who { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.event-sub { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0.82; font-size: 0.72rem; }
.event-time { flex: 0 0 auto; font-family: var(--mono); font-size: 0.7rem; opacity: 0.75; white-space: nowrap; }

.job.is-mid .event-time { display: none; }
.job.is-tight .event-sub, .job.is-tight .event-time { display: none; }
.job.is-tight .event-line { padding-inline: 0.3rem; }

.tone-unconfirmed { background: var(--unconfirmed-bg); border-color: var(--unconfirmed); color: var(--unconfirmed-ink); }
.tone-confirmed { background: var(--confirmed-bg); border-color: var(--confirmed); color: var(--confirmed-ink); }
.tone-cancelled { background: var(--cancelled-bg); border-color: var(--cancelled); color: var(--cancelled-ink); }

.job-grab { position: absolute; top: 0; right: 0; bottom: 0; width: 9px; cursor: ew-resize; touch-action: none; }
.job.is-dragging { z-index: 20; box-shadow: var(--shadow); }
.job.is-invalid .event-line { outline: 2px solid var(--now); outline-offset: 1px; }
.job.is-saving { opacity: 0.6; }

.legend {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  align-items: center;
  padding: 0.6rem 0.95rem;
  border-top: 1px solid var(--line-soft);
  background: var(--sunk);
  font-size: 0.75rem;
  color: var(--muted);
}
.lg { display: inline-flex; align-items: center; gap: 0.35rem; }
.lg i { width: 11px; height: 11px; border-radius: 2px; border-left: 3px solid; }
.legend-hint { margin-left: auto; color: var(--faint); }

/* week matrix */
.wk .wk-row { display: flex; border-bottom: 1px solid var(--line-soft); }
.wk .wk-row:last-child { border-bottom: 0; }
.wk .is-head { background: var(--sunk); border-bottom: 1px solid var(--line); }
.wk .is-foot { background: var(--sunk); border-top: 1px solid var(--line); }
.wk-label {
  flex: 0 0 var(--lane-head);
  position: sticky;
  left: 0;
  z-index: 2;
  padding: 0.55rem 0.75rem;
  background: var(--card);
  border-right: 1px solid var(--line);
  font-weight: 600;
  font-size: 0.88rem;
}
.wk .is-head .wk-label, .wk .is-foot .wk-label {
  background: var(--sunk);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--faint);
}
.wk-cell {
  flex: 1 1 0;
  min-width: 0;
  padding: 0.5rem 0.6rem;
  border-right: 1px solid var(--line-soft);
  font-size: 0.8rem;
  color: var(--muted);
}
.wk-cell:last-child { border-right: 0; }
.wk .is-head .wk-cell { font-weight: 600; color: var(--ink); }
.wk .is-head .wk-cell b { font-weight: 400; color: var(--faint); }
.wk .is-head .wk-cell.is-today, .wk .is-head .wk-cell.is-today b { color: var(--accent); }
a.wk-day { display: block; text-decoration: none; color: inherit; }
a.wk-day:hover { background: var(--sunk); }
.wk-bar { position: relative; display: block; height: 22px; border-radius: 3px; background: var(--raised); overflow: hidden; }
.wk-bar i { position: absolute; top: 0; bottom: 0; background: var(--unconfirmed); }
.wk-bar i.tone-confirmed { background: var(--confirmed); }
.wk-bar i.tone-cancelled { background: var(--cancelled); }
.wk-count { display: flex; justify-content: space-between; gap: 0.4rem; margin-top: 4px; font-size: 0.7rem; color: var(--faint); }
.wk-count b { color: var(--muted); }
.wk-count em { font-style: normal; }

/* list */
.diary-list { display: grid; }
.list-row {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.45rem 0.95rem;
  border-bottom: 1px solid var(--line-soft);
}
.list-row:last-child { border-bottom: 0; }
.list-day { margin: 0; font-weight: 600; color: var(--faint); font-size: 0.8rem; }
.diary-list .event-line { font-size: 0.85rem; background: none; border-color: transparent; color: var(--ink); }
.diary-list .event-line.tone-unconfirmed { border-left-color: var(--unconfirmed); }
.diary-list .event-line.tone-confirmed { border-left-color: var(--confirmed); }
.diary-list .event-line.tone-cancelled { border-left-color: var(--cancelled); }
.diary-list .event-line:hover { background: var(--sunk); }
.diary-list .event-time { order: -1; margin-right: 0.2rem; }
.diary-list .event-sub { margin-left: auto; flex: 0 1 auto; }
.empty { padding: 2rem 1rem; text-align: center; }

.event-pop {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem 1rem;
  width: min(26rem, calc(100vw - 1.5rem));
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.event-pop::backdrop { background: rgba(10, 14, 20, 0.45); }
.event-pop .card-title { margin-bottom: 0.75rem; }
.event-pop .secondary { width: 100%; margin-top: 0.75rem; }

.diary-toast {
  position: fixed;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  z-index: 60;
  max-width: calc(100vw - 2rem);
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.82rem;
  box-shadow: var(--shadow);
}

/* setup */
.setup-form h1 { margin: 0 0 0.35rem; font-size: 1.4rem; }
.setup-row { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; align-items: center; margin-top: 0.55rem; }
.setup-row.is-service { grid-template-columns: 1fr 6.2rem auto; }
.setup-row .secondary { width: auto; min-width: 5.4rem; margin-top: 0; min-height: 38px; }
.setup-mins { width: 6.2rem; }

@media (max-width: 900px) {
  .diary-switch { margin-left: 0; }
  .list-row { grid-template-columns: 1fr; gap: 0.2rem; }
}
@media (max-width: 640px) {
  :root { --lane-head: 116px; }
  main { padding: 0.9rem; }
  .card-head { flex-wrap: wrap; }
  .field-row { grid-template-columns: 1fr; }
  .actions { grid-template-columns: 1fr; }
  .setup-row, .setup-row.is-service { grid-template-columns: 1fr; }
  .setup-mins { width: 100%; }
  .legend-hint { display: none; }
  .cap { flex: 1 1 45%; }
  .banner.demo-trial { margin: 0.65rem 0.9rem 0; }
  .banner.demo-trial .demo-trial-cta { width: 100%; justify-content: flex-end; }
  main.layout-portal { padding: 0.25rem 0.9rem 2rem; }
  .topbar-portal { padding: 0.7rem 0.9rem; }
  .portal-hero { padding-top: 0.6rem; }
  .portal-hero h1 { font-size: 1.55rem; }
  .portal-lede, .portal-what { font-size: 0.94rem; }
  .portal-actions .btn { width: 100%; }
  .portal-trial { padding: 1.15rem 1rem; }
  .portal-trial-actions { width: 100%; }
  .portal-trial-actions .btn { width: 100%; }
  .site-lockup .brand { font-size: 0.92rem; letter-spacing: 0.08em; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------------------
   Reports, and the list of things waiting on somebody.

   Deliberately plain. These screens get read standing up, and printed: the print
   rules below drop the navigation and the buttons so a day sheet comes out as a
   day sheet and not a screenshot of a website.
   --------------------------------------------------------------------------- */

.nav-count {
  display: inline-block;
  min-width: 1.15rem;
  margin-left: 0.35rem;
  padding: 0 0.32rem;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.15rem;
  text-align: center;
  vertical-align: 1px;
}

main.report { max-width: 72rem; }

.report-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.report-head h1 { margin: 0 0 0.2rem; font-size: 1.4rem; }
.report-moves { display: flex; gap: 0.4rem; }
.report-moves .secondary { width: auto; min-width: 4.5rem; margin-top: 0; }

.report-tabs {
  display: flex;
  gap: 0.15rem;
  margin: 0.6rem 0 1rem;
  border-bottom: 1px solid var(--line);
}
.report-tab {
  padding: 0.45rem 0.8rem;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}
.report-tab:hover { color: var(--ink); background: var(--sunk); }
.report-tab.is-active {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink);
  font-weight: 600;
  margin-bottom: -1px;
}

.report-table-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.report-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.report-table th,
.report-table td {
  padding: 0.55rem 0.7rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
}
.report-table th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
.report-table tbody tr:last-child td { border-bottom: 0; }
.report-table td:first-child { white-space: nowrap; }

/* Light status washes: same palette the diary blocks already use. */
.report-table tr.is-confirmed { background: var(--confirmed-bg); }
.report-table tr.is-awaiting { background: var(--unconfirmed-bg); }
.report-table tr.is-cancelled { background: var(--cancelled-bg); }
.report-table tr.is-cancelled td { color: var(--cancelled-ink); text-decoration: line-through; }
.report-table tr.is-attention { background: var(--unconfirmed-bg); }
.report-table tr.is-alert { background: #ede7f6; }

.card.match.tone-confirmed,
.card.match.tone-unconfirmed,
.card.match.tone-cancelled {
  border-color: transparent;
}

/* The same mark the waiting list uses, so a day sheet and the count are visibly
   about the same work. Red, because it is the one thing on the row that is not
   just information. */
.sheet-alert {
  display: inline-block;
  width: 1.05rem;
  height: 1.05rem;
  margin-right: 0.35rem;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.05rem;
  text-align: center;
}

.fix-cell { min-width: 13rem; }
.fix-cell form { margin: 0 0 0.3rem; }
.fix-cell button,
.fix-cell .secondary {
  width: 100%;
  margin-top: 0;
  min-height: 34px;
  font-size: 0.86rem;
}

.fix-handled { margin-top: 0.3rem; }
.fix-handled > summary {
  cursor: pointer;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--unconfirmed);
  border-radius: 8px;
  background: var(--unconfirmed-bg);
  color: var(--unconfirmed-ink);
  font-size: 0.86rem;
  font-weight: 600;
  list-style: none;
  text-align: center;
}
.fix-handled > summary::-webkit-details-marker { display: none; }
.fix-handled[open] > summary { border-radius: 8px 8px 0 0; }
.fix-handled form {
  padding: 0.6rem;
  border: 1px solid var(--unconfirmed);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: var(--card);
}
.fix-handled label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.15rem;
}
.fix-handled input { width: 100%; margin-bottom: 0.45rem; }
.fix-handled .muted { font-size: 0.76rem; margin: 0.4rem 0 0; }

@media print {
  nav, .report-tabs, .report-moves, .no-print, .form-cell, .site-footer { display: none !important; }
  body { background: #fff; }
  main.report { max-width: none; padding: 0; }
  .report-table-wrap { border: 0; border-radius: 0; overflow: visible; }
  .report-table { font-size: 10pt; }
  .report-table tr.is-confirmed,
  .report-table tr.is-awaiting,
  .report-table tr.is-cancelled,
  .report-table tr.is-attention,
  .report-table tr.is-alert { background: transparent; }
  .report-table tr { break-inside: avoid; }
  .sheet-alert { background: #fff; color: #000; border: 1px solid #000; }
}

/* ------------------------------------------------------------------ AB-001 ---
   Today summary, state badges, and the booking timeline. Tokens only, so dark mode
   comes for free. */

.day-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 0.5rem;
  margin: 0 0 1rem;
}
.sum-tile {
  display: block;
  min-height: 3.5rem;
  color: inherit;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
}
.sum-tile strong { display: block; font-size: 1.5rem; line-height: 1.1; }
.sum-tile span { display: block; font-size: 0.8rem; color: var(--muted); }
.sum-tile.is-warn { background: var(--unconfirmed-bg); border-color: var(--unconfirmed); }
.sum-tile.is-warn strong, .sum-tile.is-warn span { color: var(--unconfirmed-ink); }
.sum-link { grid-column: 1 / -1; font-size: 0.9rem; }
a.sum-tile { cursor: pointer; }
a.sum-tile:hover { border-color: var(--accent); box-shadow: 0 1px 0 var(--accent); }
a.sum-tile:active { transform: translateY(1px); }
a.sum-tile:focus-visible, .sum-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sum-tile.is-active { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.sum-tile .sum-now { display: block; margin-top: 0.15rem; font-size: 0.72rem; font-style: normal; font-weight: 700; color: var(--accent); }
.sum-tile.is-warn.is-active .sum-now { color: var(--unconfirmed-ink); }

.state {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--sunk);
  color: var(--muted);
  border: 1px solid var(--line);
}
.state-confirmed { background: var(--confirmed-bg); color: var(--confirmed-ink); border-color: var(--confirmed); }
.state-awaiting { background: var(--sunk); color: var(--muted); }
.state-stale, .state-urgent { background: var(--unconfirmed-bg); color: var(--unconfirmed-ink); border-color: var(--unconfirmed); }
.state-needs-attention, .state-declined { background: var(--cancelled-bg); color: var(--cancelled-ink); border-color: var(--cancelled); }
.state-cancelled { background: var(--sunk); color: var(--faint); text-decoration: line-through; }
.state-line { margin: 0.6rem 0; }

.timeline { list-style: none; margin: 0.5rem 0 0.75rem; padding: 0; border-left: 2px solid var(--line); }
.tl-item { position: relative; padding: 0.3rem 0 0.3rem 0.9rem; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0.75rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--faint);
}
.tl-item.is-good::before { background: var(--confirmed); }
.tl-item.is-bad::before { background: var(--danger); }
.tl-item.is-quiet::before { background: var(--line); border: 1px solid var(--faint); }
.tl-item time { display: block; font-size: 0.78rem; color: var(--muted); }
.history { margin: 0.4rem 0 0; padding-left: 1.1rem; }

@media (max-width: 520px) {
  .day-summary { grid-template-columns: repeat(2, 1fr); }
}


/* opening hours (setup) and closed days (diary) */
.hours-sub { margin-top: 1.1rem; }
.hours-week { display: grid; gap: 0.35rem; margin-top: 0.6rem; max-width: 36rem; }
.hours-row { display: grid; grid-template-columns: 6.5rem 5.8rem 8.4rem auto 8.4rem; gap: 0.4rem 0.6rem; align-items: center; }
.hours-row.is-closed input[type="time"] { opacity: 0.45; }
.hours-day { font-weight: 600; }
.hours-closed, .hours-rule { display: inline-flex; align-items: center; gap: 0.4rem; width: auto; margin: 0; font-size: var(--fs-muted); font-weight: 500; white-space: nowrap; }
.hours-rule { font-size: inherit; }
.hours-closed input, .hours-rule input { width: auto; min-height: 0; height: auto; margin: 0; flex: none; }
.hours-to { color: var(--faint); text-align: center; }
.hours-row input[type="time"], .hours-ex input[type="time"], .hours-ex input[type="date"], .hours-ex input[type="text"] { min-height: 38px; }
.hours-rules { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; align-items: center; margin-top: 0.5rem; }
.hours-special { display: inline-flex; align-items: center; gap: 0.4rem; }
.hours-exceptions { display: grid; gap: 0.4rem; margin-top: 0.5rem; }
.hours-ex { display: grid; grid-template-columns: 9.5rem minmax(8rem, 1fr) 5.8rem 8.4rem 8.4rem 6.2rem; gap: 0.4rem 0.5rem; align-items: center; }
.day-closed { margin: 0 0 0.5rem; padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); }
.wk-cell.is-closed { background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(120, 130, 150, 0.1) 6px 12px); }
.wk-note { display: block; font-size: 0.68rem; font-weight: 500; color: var(--faint); line-height: 1.2; }
@media (max-width: 640px) {
  .hours-row { grid-template-columns: 1fr 1fr; }
  .hours-row .hours-day { grid-column: 1; }
  .hours-row .hours-closed { grid-column: 2; justify-self: end; }
  .hours-to { display: none; }
  .hours-ex { grid-template-columns: 1fr 1fr; }
  .hours-ex > :nth-child(1), .hours-ex > :nth-child(2) { grid-column: 1 / -1; }
  .hours-ex > :nth-child(3) { order: 1; }
  .hours-ex > :nth-child(6) { order: 2; justify-self: end; }
  .hours-ex > :nth-child(4), .hours-ex > :nth-child(5) { order: 3; }
}

/* staff avatars and setup staff cards */
.setup-staff-list { display: flex; flex-direction: column; gap: 0.65rem; margin-top: 0.75rem; }
.setup-staff-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--raised);
  padding: 0.65rem 0.75rem;
}
.setup-staff-summary {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.setup-staff-meta { min-width: 0; flex: 1; }
.setup-staff-name { margin: 0; font-weight: 650; }
.setup-staff-role,
.setup-staff-state { margin: 0.1rem 0 0; font-size: 0.82rem; color: var(--muted); }
.setup-staff-edit { margin-top: 0.45rem; }
.setup-staff-edit > summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  list-style: none;
}
.setup-staff-edit > summary::-webkit-details-marker { display: none; }
.setup-staff-fields { margin-top: 0.65rem; display: grid; gap: 0.35rem; }
.setup-check { display: flex; align-items: center; gap: 0.4rem; font-weight: 500; margin: 0.35rem 0; }
.setup-avatar-fields {
  margin: 0.55rem 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}
.setup-avatar-fields legend { padding: 0 0.25rem; font-weight: 650; font-size: 0.85rem; }
.setup-avatar-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.45rem; }
.setup-add-resource { margin-top: 0.85rem; padding-top: 0.75rem; border-top: 1px solid var(--line-soft); }
.setup-add-title { margin: 0 0 0.4rem; font-weight: 650; font-size: 0.9rem; }
.res-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 999px;
  overflow: hidden;
  background: var(--raised);
  border: 1px solid var(--line-soft);
  color: var(--muted);
  font-weight: 700;
  line-height: 1;
}
.res-avatar.is-sm { width: 34px; height: 34px; font-size: 0.75rem; }
.res-avatar.is-md { width: 32px; height: 32px; font-size: 0.72rem; }
.res-avatar.is-lg { width: 42px; height: 42px; font-size: 0.9rem; }
.res-avatar.is-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.res-avatar.is-resource { color: var(--faint); }
.res-avatar.is-initials { background: var(--accent-soft); color: var(--ink); border-color: var(--accent-soft-line); }
.day-col-head .res-avatar.is-sm {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
}

/* demo warning (shared demo only) */
.banner.demo-trial .demo-trial-lead { font-weight: 700; color: var(--ink); }
.banner.demo-trial .demo-trial-emphasis { font-weight: 700; color: var(--ink); }

/* lane and week labels with avatars */
.lane-who { display: inline-flex; align-items: center; gap: 0.45rem; min-width: 0; }
.wk-label { display: flex; align-items: center; gap: 0.45rem; }

/* footer: one quiet line, logo smaller, no underlined label */
.site-footer { margin-top: 1.5rem; padding: 1rem 1rem 1.25rem; border-top: 1px solid var(--line-soft); }
.site-footer-powered { gap: 0.4rem 0.55rem; margin: 0 0 0.3rem; }
.site-footer-label { border-bottom: 0; font-size: 0.64rem; letter-spacing: 0.1em; color: var(--faint); padding-bottom: 0; }
.product-logo-footer img { width: 118px; height: auto; max-width: 60vw; display: block; }
.site-footer-legal { font-size: 0.72rem; }

/* the closing time is labelled at the right edge so the ruler visibly ends when the day does */
.tick b.tick-end { left: auto; right: 5px; }

/* ------------------------------------------------------------ buttons ---
   One button system for the whole site. .primary / .secondary / .danger (forms and
   actions) and .btn-* (calls to action) share size, radius, weight and states. */
.primary, .secondary, .danger,
.btn,
.fix-cell button, .fix-cell .secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 40px;
  padding: 0.5rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 0.93rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}
.primary, .btn-primary { background: var(--accent); color: var(--accent-ink, #fff) !important; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18); }
.primary:hover, .btn-primary:hover { background: var(--accent-hover); box-shadow: 0 2px 6px rgba(15, 23, 42, 0.22); }
.secondary, .btn-secondary, .fix-cell button, .fix-cell .secondary {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.06);
}
.secondary:hover, .btn-secondary:hover, .fix-cell button:hover, .fix-cell .secondary:hover {
  background: var(--raised);
  border-color: var(--faint);
}
.btn-secondary { color: var(--accent); border-color: var(--accent); }
.btn-secondary:hover { background: var(--accent-soft); border-color: var(--accent); }
.danger { background: var(--card); color: var(--danger) !important; border-color: var(--danger); box-shadow: none; }
.danger:hover { background: var(--danger); color: #fff !important; }
.btn-ghost { background: transparent; color: var(--accent); border-color: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-sm, .btn-compact { min-height: 34px; padding: 0.35rem 0.8rem; font-size: 0.85rem; border-radius: 9px; }
.primary:active, .secondary:active, .danger:active, .btn:active { transform: translateY(1px); }
.primary:focus-visible, .secondary:focus-visible, .danger:focus-visible, .btn:focus-visible,
.fix-cell button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.primary:disabled, .secondary:disabled, .danger:disabled, .btn:disabled,
button[disabled].primary { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.setup-row .secondary { min-height: 40px; }

/* summary tiles: equal size, aligned, same height whatever the label length */
.day-summary {
  grid-template-columns: repeat(auto-fit, minmax(9.25rem, 1fr));
  grid-auto-rows: auto;
  align-items: stretch;
  gap: 0.6rem;
}
.sum-tile {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  height: 100%;
  min-height: 4.6rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
}
.sum-tile strong { font-size: 1.4rem; }
.sum-tile span { font-size: 0.78rem; line-height: 1.25; }
.sum-tile .sum-now { margin-top: 0.1rem; }
@media (max-width: 520px) {
  .day-summary { grid-template-columns: repeat(2, 1fr); }
}

/* wallpaper: the same soft sky as the AertaBook site, behind every screen (light mode only) */
body {
  background-color: var(--paper);
  background-image:
    url("/assets/demo-site/backgrounds/hero-wallpaper.svg"),
    linear-gradient(180deg, #f8fcff 0%, #eef7ff 100%);
  background-size: cover, auto;
  background-position: center top, center;
  background-repeat: no-repeat;
  background-attachment: fixed, fixed;
}
@media (prefers-color-scheme: dark) {
  body { background-image: none; }
}

.sum-link { margin: 0.1rem 0 0; align-self: start; }
