/* Amvela — salon booking & back office
   Palette: warm near-black ink, a warm off-white ground, and one confident
   rose-crimson accent. Deliberately not the lilac-and-rounded-corners look every
   other salon product uses. Jade and amber carry state, and never double as the
   brand colour, so "confirmed" and "brand" can never be confused. */

:root {
  --paper:      #FBFAF9;
  --surface:    #FFFFFF;
  --surface-2:  #F3F1EF;
  --ink:        #141118;
  --ink-2:      #55505C;
  --ink-3:      #857F8C;
  --rule:       #E4E0DD;
  --rule-2:     #CFC9C5;

  --accent:     #D8395A;
  --accent-ink: #FFFFFF;
  --accent-soft:#FCEFF2;
  --accent-line:#F2C4CE;

  --jade:       #0E7A56;
  --jade-soft:  #E5F4EE;
  --amber:      #96590A;
  --amber-soft: #FDF2E0;
  --stop:       #B3261E;
  --stop-soft:  #FCEBEA;

  --radius: 8px;
  --shadow-1: 0 1px 2px rgba(20,17,24,.06), 0 1px 3px rgba(20,17,24,.05);
  --shadow-2: 0 4px 12px -2px rgba(20,17,24,.10), 0 12px 32px -12px rgba(20,17,24,.16);

  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", ui-monospace, "SF Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:     #121014;
    --surface:   #1A171D;
    --surface-2: #221E26;
    --ink:       #F0ECF2;
    --ink-2:     #ADA6B4;
    --ink-3:     #7C7484;
    --rule:      #2C2732;
    --rule-2:    #3D3644;

    --accent:     #FF6B87;
    --accent-ink: #2A0A12;
    --accent-soft:#2E1620;
    --accent-line:#5C2A38;

    --jade:      #4ECF9C;
    --jade-soft: #12281F;
    --amber:     #E8B058;
    --amber-soft:#2A2013;
    --stop:      #FF7A72;
    --stop-soft: #2E1614;

    --shadow-1: 0 1px 2px rgba(0,0,0,.4);
    --shadow-2: 0 4px 12px -2px rgba(0,0,0,.5), 0 12px 32px -12px rgba(0,0,0,.7);
  }
}
:root[data-theme="dark"] {
  --paper:#121014; --surface:#1A171D; --surface-2:#221E26;
  --ink:#F0ECF2; --ink-2:#ADA6B4; --ink-3:#7C7484;
  --rule:#2C2732; --rule-2:#3D3644;
  --accent:#FF6B87; --accent-ink:#2A0A12; --accent-soft:#2E1620; --accent-line:#5C2A38;
  --jade:#4ECF9C; --jade-soft:#12281F; --amber:#E8B058; --amber-soft:#2A2013;
  --stop:#FF7A72; --stop-soft:#2E1614;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4);
  --shadow-2: 0 4px 12px -2px rgba(0,0,0,.5), 0 12px 32px -12px rgba(0,0,0,.7);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------- wordmark ---------- */
/* The logotype is inline SVG: its letterforms take currentColor and its
   processing-gap band takes --accent, so one drawing serves both themes and
   the print stylesheet. Drawn originals are in public/brand/. */
.wordmark { display: inline-flex; color: var(--ink); text-decoration: none; }
.wordmark .brandmark { display: block; }

/* ---------- app shell ---------- */
.app { display: flex; min-height: 100vh; }

.side {
  width: 232px; flex: 0 0 232px;
  background: var(--surface); border-right: 1px solid var(--rule);
  padding: 22px 14px; display: flex; flex-direction: column; gap: 26px;
}
.side__brand { padding: 0 10px; }
.side__salon {
  font-size: 12px; color: var(--ink-3); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 6px;
  color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500;
}
.side nav a:hover { background: var(--surface-2); color: var(--ink); }
.side nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side nav a .ic { width: 18px; text-align: center; opacity: .85; }
.side__foot { margin-top: auto; padding: 0 10px; font-size: 12px; color: var(--ink-3); }
.side__foot a { color: var(--ink-2); }

.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 28px; border-bottom: 1px solid var(--rule); background: var(--surface);
}
.topbar h1 { margin: 0; font-size: 19px; font-weight: 650; letter-spacing: -.015em; }
.content { padding: 28px; max-width: 1240px; width: 100%; }

/* ---------- centred pages (setup, login) ---------- */
.centre {
  min-height: 100%; display: grid; place-items: center; padding: 32px 20px;
}
.card {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); box-shadow: var(--shadow-2);
  padding: 34px; width: 100%; max-width: 440px;
}
.card--wide { max-width: 620px; }
.card h2 { margin: 18px 0 6px; font-size: 22px; letter-spacing: -.02em; }
.card .lede { color: var(--ink-2); margin: 0 0 22px; font-size: 14px; }

/* ---------- forms ---------- */
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink);
}
.field .hint { font-weight: 400; color: var(--ink-3); }
.input {
  width: 100%; padding: 10px 12px; font: inherit; color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule-2); border-radius: 6px;
}
.input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid transparent; border-radius: 6px; text-decoration: none;
}
.btn:hover { filter: brightness(1.06); }
.btn--full { width: 100%; }
.btn--ghost { background: transparent; color: var(--ink-2); border-color: var(--rule-2); }
.btn--ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- notices ---------- */
.note { padding: 13px 16px; border-radius: 6px; font-size: 14px; margin-bottom: 18px; border-left: 3px solid; }
.note p { margin: 0 0 6px; } .note p:last-child { margin: 0; }
/* Undo sits beside the sentence that says what happened, so putting a booking
   back is one movement from reading that it moved. */
.note__line { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.note__line p { margin: 0; }
.note--bad  { background: var(--stop-soft);  border-color: var(--stop);  color: var(--ink); }
.note--good { background: var(--jade-soft);  border-color: var(--jade);  color: var(--ink); }
.note--warn { background: var(--amber-soft); border-color: var(--amber); color: var(--ink); }
.note--info { background: var(--surface-2);  border-color: var(--rule-2); color: var(--ink-2); }

/* ---------- stat tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 26px; }
.tile { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-1); }
.tile__label { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.tile__value { font-size: 27px; font-weight: 680; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.tile__note { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

/* ---------- panels & tables ---------- */
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow-1); margin-bottom: 22px; }
.panel__head { padding: 15px 18px; border-bottom: 1px solid var(--rule); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel__head h3 { margin: 0; font-size: 15px; font-weight: 650; }
.panel__body { padding: 18px; }
.panel__body > :first-child { margin-top: 0; }
.panel__body > :last-child  { margin-bottom: 0; }

.tablewrap { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; min-width: 480px; font-size: 14px; }
table.data th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 11px 18px; border-bottom: 1px solid var(--rule-2); white-space: nowrap; }
table.data td { padding: 11px 18px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.data tr:last-child td { border-bottom: none; }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; }
.pill--good { background: var(--jade-soft);  color: var(--jade); }
.pill--warn { background: var(--amber-soft); color: var(--amber); }
.pill--bad  { background: var(--stop-soft);  color: var(--stop); }
.pill--flat { background: var(--surface-2);  color: var(--ink-2); }

.empty { text-align: center; padding: 34px 20px; color: var(--ink-3); }
.empty strong { display: block; color: var(--ink-2); font-size: 15px; margin-bottom: 4px; }

.muted { color: var(--ink-3); }
.mono  { font-family: var(--mono); font-size: .92em; }

@media (max-width: 860px) {
  .app { flex-direction: column; }
  .side { width: auto; flex: none; flex-direction: row; align-items: center; gap: 14px; padding: 12px 16px; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--rule); }
  .side nav { flex-direction: row; gap: 4px; }
  .side__foot { display: none; }
  .content, .topbar { padding: 18px 16px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ===========================================================================
   THE DIARY
   A column per person, time running down. Positions come from PHP as pixel
   offsets, so the grid is honest about duration - a 10-minute fringe trim is
   genuinely a sixth the height of an hour, and nobody has to squint to see that
   a stylist has a gap.
   =========================================================================== */

.diary-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 16px;
}
.diary-nav { display: flex; align-items: center; gap: 8px; }
.diary-nav .btn { padding: 8px 13px; }
.diary-date { margin: 0; }
.diary-date .input { padding: 8px 10px; width: auto; }
.diary-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; }

.diary {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); box-shadow: var(--shadow-1); overflow: hidden;
}
.diary-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.diary-head, .diary-body { display: flex; min-width: max-content; }

.diary-head {
  position: sticky; top: 0; z-index: 3;
  background: var(--surface); border-bottom: 1px solid var(--rule-2);
}
.diary-gutter-head { width: 64px; flex: 0 0 64px; }
.diary-col-head {
  flex: 1 1 380px; min-width: 200px; max-width: 380px; padding: 12px 13px;
  display: flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 600; white-space: nowrap;
  border-left: 1px solid var(--rule);
}
.diary-col-head .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.diary-col-head em { font-size: 11.5px; font-style: normal; font-weight: 500; }

.diary-body { position: relative; }
.diary-gutter { width: 64px; flex: 0 0 64px; position: relative; }
.diary-tick { position: absolute; right: 8px; height: 0; }
.diary-tick span {
  position: absolute; right: 0; top: -8px;
  font-size: 12px; color: var(--ink-3);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

.diary-col {
  flex: 1 1 380px; min-width: 200px; max-width: 380px; position: relative;
  border-left: 1px solid var(--rule);
}
.diary-line { position: absolute; left: 0; right: 0; border-top: 1px dotted var(--rule); }
.diary-line--hour { border-top: 1px solid var(--rule); }

/* Where somebody is actually rostered. Everything outside is visibly not staffed. */
.diary-shift { position: absolute; left: 0; right: 0; background: var(--surface-2); }

.appt {
  position: absolute;
  border-radius: 5px; overflow: hidden;
  background: color-mix(in srgb, var(--who) 16%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--who) 45%, transparent);
  border-left: 3px solid var(--who);
  cursor: default;
}
.appt__in { position: relative; z-index: 2; padding: 5px 9px; }
.appt__top { display: flex; align-items: center; gap: 5px; }
.appt strong {
  font-size: 13.5px; font-weight: 650; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.appt__svc  { font-size: 12.5px; color: var(--ink-2); line-height: 1.35;
              overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appt__time { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; margin-top: 1px; }
.appt--tight .appt__in { padding: 1px 7px; }
.appt--tight strong { font-size: 11.5px; }

.appt__tag {
  font-size: 9.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 1px 4px; border-radius: 3px; flex: none;
  background: var(--surface); color: var(--ink-3); border: 1px solid var(--rule-2);
}
.appt__tag--bad { background: var(--stop-soft); color: var(--stop); border-color: transparent; }

/* Processing time. Hatched rather than a flat colour, because it is not a
   separate booking - the client is still in the chair - it is a hole in the
   stylist's time that the salon can sell to somebody else. */
.appt__gap {
  position: absolute; left: 0; right: 0; z-index: 1;
  background: repeating-linear-gradient(
    -45deg,
    transparent 0 5px,
    color-mix(in srgb, var(--who) 30%, transparent) 5px 10px
  );
  border-top: 1px dashed color-mix(in srgb, var(--who) 55%, transparent);
  border-bottom: 1px dashed color-mix(in srgb, var(--who) 55%, transparent);
}

.appt--arrived   { box-shadow: inset 0 0 0 1px var(--jade); }
.appt--completed,
.appt--paid      { opacity: .68; }
.appt--pending   { border-style: dashed; }
.appt--no_show   { opacity: .5; text-decoration: line-through; }

.diary-key {
  display: flex; gap: 20px; flex-wrap: wrap; margin: 0;
  padding: 11px 16px; border-top: 1px solid var(--rule);
  font-size: 12px; color: var(--ink-3); background: var(--surface);
}
.diary-key span { display: inline-flex; align-items: center; gap: 6px; }
.diary-key__hint { margin-left: auto; font-style: italic; }
.key { width: 22px; height: 11px; border-radius: 2px; display: inline-block; flex: none; }
.key--shift { background: var(--surface-2); border: 1px solid var(--rule-2); }
.key--gap {
  background: repeating-linear-gradient(-45deg, transparent 0 4px, var(--rule-2) 4px 8px);
  border: 1px dashed var(--rule-2);
}
.key--web { background: var(--surface); border: 1px solid var(--rule-2); }

@media (max-width: 860px) {
  .diary-col, .diary-col-head { flex: 1 1 280px; min-width: 158px; max-width: 280px; }
}

/* Side-by-side lanes need tighter text than a full-width block. */
.appt--narrow .appt__in { padding: 3px 5px; }
.appt--narrow strong    { font-size: 11.5px; }
.appt--narrow .appt__svc { font-size: 10.5px; }
.appt--narrow .appt__time { font-size: 10px; }

/* ---------- clickable free time ---------------------------------------------
   Only drawn where somebody is genuinely free, which includes the processing
   gap inside a colour - that hole is real bookable time and this is how a
   receptionist finds it. Invisible until hovered so the day stays calm. */
.slot {
  position: absolute; left: 4px; right: 4px; z-index: 1;
  border-radius: 4px; text-decoration: none;
  display: flex; align-items: center; justify-content: center;
}
.slot span {
  font-size: 11px; font-weight: 600; color: var(--accent);
  opacity: 0; font-variant-numeric: tabular-nums;
}
.slot:hover, .slot:focus-visible {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
  outline: none;
}
.slot:hover span, .slot:focus-visible span { opacity: 1; }
.slot:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }

.appt { text-decoration: none; color: inherit; z-index: 2; }
.appt:hover { filter: brightness(1.04); box-shadow: 0 2px 8px -2px rgba(0,0,0,.28); }
.appt--on   { box-shadow: 0 0 0 2px var(--accent); }
.appt__in, .appt__top, .appt__svc, .appt__time { display: block; }
.appt__top { display: flex; align-items: center; gap: 5px; }
.key--slot { background: var(--accent-soft); border: 1px solid var(--accent-line); }

/* ---------- the panel ------------------------------------------------------- */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(20,17,24,.42); backdrop-filter: blur(1px);
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 41;
  width: min(420px, 100vw);
  background: var(--surface); border-left: 1px solid var(--rule);
  box-shadow: var(--shadow-2);
  display: flex; flex-direction: column;
}
.drawer__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 20px 22px 16px; border-bottom: 1px solid var(--rule);
}
.drawer__head h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.drawer__sub { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); }
.drawer__x {
  font-size: 26px; line-height: 1; color: var(--ink-3);
  text-decoration: none; padding: 0 4px;
}
.drawer__x:hover { color: var(--ink); }
.drawer__body { padding: 20px 22px 30px; overflow-y: auto; flex: 1; }
.drawer__pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.drawer__h3 {
  font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-3); margin: 24px 0 10px;
}
.drawer__facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: 14px; }
.drawer__facts dt { color: var(--ink-3); }
.drawer__facts dd { margin: 0; }

.drawer__lines { list-style: none; margin: 0; padding: 0; }
.drawer__lines li {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 14px;
}
.drawer__lines .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex: none; }
.drawer__lines > li > div { flex: 1; min-width: 0; }
.drawer__lines .muted { font-size: 12.5px; }
.drawer__price { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.drawer__total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 12px 0 0; font-size: 15px;
}
.drawer__total strong { font-size: 19px; font-variant-numeric: tabular-nums; }
.drawer__note {
  background: var(--surface-2); border-radius: 6px; padding: 11px 13px;
  font-size: 14px; margin: 0;
}
.drawer__actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.drawer__actions .btn { flex: 1 1 auto; }
.drawer__actions--risky { margin-top: 14px; }
.btn--danger { color: var(--stop); border-color: color-mix(in srgb, var(--stop) 35%, transparent); }
.btn--danger:hover { background: var(--stop-soft); color: var(--stop); }
.drawer__fineprint { font-size: 12px; color: var(--ink-3); margin: 6px 0 0; line-height: 1.5; }
.drawer__events { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.drawer__events li { padding: 5px 0; border-bottom: 1px solid var(--rule); }
.drawer__events .mono { color: var(--ink-3); margin-right: 8px; }

@media (max-width: 640px) {
  .drawer { width: 100vw; border-left: none; }
}

/* ---------- settings ---------- */
.subnav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 18px;
}
.subnav > a { color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; }
.subnav > a:hover { color: var(--accent); }
.subnav__right { display: flex; gap: 8px; flex-wrap: wrap; }

.setting-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; }
.setting-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-1);
}
.setting-card:hover { border-color: var(--rule-2); box-shadow: var(--shadow-2); }
.setting-card--todo { border-left: 3px solid var(--amber); }
.setting-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.setting-card__top h3 { margin: 0; font-size: 16px; font-weight: 650; }
.setting-card__blurb { margin: 8px 0 0; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.setting-card__stat { margin: 12px 0 0; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.setting-card__why { margin: 8px 0 0; font-size: 12.5px; color: var(--amber); line-height: 1.5; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row--4 { grid-template-columns: repeat(4, 1fr); gap: 8px; }
.field-row--4 .field label { font-size: 11.5px; }
.field-row--4 .input { padding: 8px 8px; text-align: center; }

.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; cursor: pointer; font-size: 14px; }
.check input { margin-top: 3px; flex: none; }
.check em { display: block; font-style: normal; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; line-height: 1.45; }

.btn--small { padding: 5px 11px; font-size: 12.5px; }
table.data tr.data__group td {
  background: var(--surface-2); font-size: 11.5px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 7px 18px;
}
table.data .pill { margin-left: 6px; }

/* The service timeline - the whole point of the four boxes above it. */
.timeline { margin: 6px 0 4px; }
.timeline__bar { display: flex; height: 30px; border-radius: 5px; overflow: hidden; border: 1px solid var(--rule-2); }
.timeline__seg {
  display: flex; align-items: center; justify-content: center; min-width: 0;
  font-size: 10px; overflow: hidden;
}
.timeline__seg em { font-style: normal; opacity: .85; white-space: nowrap; padding: 0 4px; }
.timeline__seg--work   { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); color: var(--ink); }
.timeline__seg--gap {
  background: repeating-linear-gradient(-45deg, var(--surface) 0 5px, var(--accent-soft) 5px 10px);
  color: var(--ink-2); border-left: 1px dashed var(--accent-line); border-right: 1px dashed var(--accent-line);
}
.timeline__seg--buffer { background: var(--surface-2); color: var(--ink-3); }
.timeline__read { font-size: 13px; color: var(--ink-2); margin: 10px 0 0; line-height: 1.5; }
.timeline__read--plain { color: var(--ink-3); }
.timeline__win {
  font-size: 13px; margin: 8px 0 0; padding: 9px 12px; line-height: 1.5;
  background: var(--jade-soft); border-left: 3px solid var(--jade); border-radius: 5px; color: var(--ink);
}

@media (max-width: 520px) {
  .field-row, .field-row--4 { grid-template-columns: 1fr 1fr; }
}

/* Settings layout bits */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.drawer--wide { width: min(520px, 100vw); }
.shifts { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.shifts td { padding: 4px 6px 4px 0; vertical-align: middle; }
.shifts td:first-child { width: 40%; }
.shifts .input { padding: 6px 8px; }
.check--tight { margin-bottom: 5px; font-size: 13.5px; }
.skills__group {
  font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-3); margin: 14px 0 6px;
}
input[type="color"].input { padding: 3px; height: 40px; cursor: pointer; }
.dot { flex: none; }

@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- clients ---------- */
.search { display: flex; gap: 8px; align-items: center; margin: 0; flex: 1 1 320px; max-width: 460px; }
.search .input { flex: 1; }
.pager {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 18px; border-top: 1px solid var(--rule); font-size: 13px;
}

.formulas { list-style: none; margin: 0; padding: 0; }
.formulas li { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.formulas li:last-child { border-bottom: none; }
.formulas li:first-child { padding-top: 0; }
.formulas__when { font-size: 12.5px; color: var(--ink-3); margin-bottom: 4px; }
.formulas__mix {
  font-family: var(--mono); font-size: 13.5px; line-height: 1.5;
  background: var(--surface-2); border-radius: 5px; padding: 8px 11px; margin-bottom: 5px;
}
.formulas__note {
  font-size: 13px; color: var(--ink-2); margin-top: 5px;
  border-left: 2px solid var(--rule-2); padding-left: 9px;
}
.note--warn { background: var(--amber-soft); border-color: var(--amber); }

/* ---------- checkout ---------- */
.checkout { display: grid; grid-template-columns: 1fr 380px; gap: 20px; align-items: start; }
.panel--total { background: var(--surface-2); border-color: var(--rule-2); }

.totals { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; margin: 0 0 14px; font-size: 14px; }
.totals dt { color: var(--ink-2); }
.totals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.totals__off { color: var(--jade); }

.totals__due {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 0; padding-top: 13px; border-top: 1px solid var(--rule-2);
}
.totals__due span { font-size: 13px; font-weight: 600; letter-spacing: .05em;
                    text-transform: uppercase; color: var(--ink-3); }
.totals__due strong { font-size: 30px; font-weight: 700; letter-spacing: -.025em;
                      font-variant-numeric: tabular-nums; }
.totals__done { color: var(--jade); }

.addline { display: flex; gap: 8px; align-items: center; margin: 0; flex-wrap: wrap; }
.addline .input { flex: 1 1 140px; min-width: 0; }
.input--qty  { flex: 0 0 68px; text-align: center; }
.input--tiny { width: 58px; padding: 5px 7px; font-size: 12.5px; text-align: center; }
.paybox { margin: 0; }
.paybox .field-row { margin-bottom: 4px; }

@media (max-width: 1000px) { .checkout { grid-template-columns: 1fr; } }

/* A share-of-total bar, used wherever a breakdown needs weight as well as a number. */
.bar { height: 5px; background: var(--surface-2); border-radius: 3px; margin-top: 6px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.bar--jade span { background: var(--jade); }

/* ---------- stock movements ---------- */
.moves { list-style: none; margin: 0; padding: 0; }
.moves li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0;
            border-bottom: 1px solid var(--rule); font-size: 14px; }
.moves li:last-child { border-bottom: none; }
.moves__qty {
  flex: 0 0 46px; text-align: right; font-family: var(--mono); font-weight: 600;
  font-size: 13px; font-variant-numeric: tabular-nums; padding-top: 1px;
}
.moves__qty--in  { color: var(--jade); }
.moves__qty--out { color: var(--stop); }
.moves .muted { font-size: 12.5px; }
.btn--on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }

/* ---------- payslip ---------- */
.payslip__head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
                 padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--rule); }
.payslip__head h2 { margin: 0 0 4px; font-size: 21px; letter-spacing: -.02em; }
.payslip__head p { margin: 0; font-size: 13px; }
.payslip__from { text-align: right; }
.input--disc { width: 150px; padding: 5px 7px; font-size: 12.5px; }

/* ===========================================================================
   PUBLIC PAGES
   What a client sees. Calmer and roomier than the app: one column, big touch
   targets, and nothing that looks like software. Most people arrive on a phone
   from an Instagram link, so the phone layout is the real one.
   =========================================================================== */
body.pub { background: var(--surface-2); }
.pub__wrap { max-width: 560px; margin: 0 auto; padding: 26px 18px 60px; }
.pub__head { text-align: center; margin-bottom: 22px; }
.pub__head h1 { margin: 0; font-size: 25px; letter-spacing: -.02em; }

.pub__card {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: 12px; padding: 26px 24px; box-shadow: var(--shadow-1);
}
.pub__card h2 { margin: 0 0 6px; font-size: 19px; letter-spacing: -.015em; }
.pub__card h2 + .lede, .pub__card .lede { color: var(--ink-2); font-size: 15px; margin: 0 0 20px; }
.pub__card h2:not(:first-child) { margin-top: 26px; }

.pub__steps {
  display: flex; gap: 8px; list-style: none; margin: 0 0 18px; padding: 0;
  font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-3); justify-content: center;
}
.pub__steps li { padding: 4px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--rule); }
.pub__steps .is-now  { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.pub__steps .is-done { background: var(--jade-soft); color: var(--jade); border-color: transparent; }

.pub__group {
  font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-3); margin: 22px 0 8px;
}
.pub__group:first-of-type { margin-top: 6px; }

.pub__pick {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 14px 16px; margin-bottom: 8px; border-radius: 9px;
  border: 1px solid var(--rule); text-decoration: none; color: inherit; background: var(--surface);
}
.pub__pick:hover { border-color: var(--accent); background: var(--accent-soft); }
.pub__pick strong { display: block; font-size: 15.5px; }
.pub__pick em { display: block; font-style: normal; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.pub__price { font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }

.pub__chosen {
  background: var(--surface-2); border-radius: 9px; padding: 13px 15px;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 14px;
}
.pub__chosen strong { font-size: 15px; }
.pub__chosen span { color: var(--ink-2); flex: 1 1 100%; font-size: 13px; }
.pub__chosen a { font-size: 12.5px; color: var(--accent); }

.pub__who { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.pub__whobtn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px; border-radius: 99px; border: 1px solid var(--rule-2);
  text-decoration: none; color: var(--ink-2); font-size: 14px; background: var(--surface);
}
.pub__whobtn .dot { width: 8px; height: 8px; border-radius: 50%; }
.pub__whobtn.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.pub__slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.pub__slot {
  display: block; text-align: center; padding: 11px 6px; border-radius: 8px;
  border: 1px solid var(--rule-2); text-decoration: none; color: var(--ink);
  font-weight: 600; font-variant-numeric: tabular-nums; background: var(--surface);
}
.pub__slot:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.pub__slot em { display: block; font-style: normal; font-size: 11px; font-weight: 400; color: var(--ink-3); }

/* Off-screen rather than display:none - a bot reading the markup still finds
   it, which is the point, while nobody using the page ever sees it. */
.pub__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.pub__cancel { margin-top: 18px; }
.pub__cancel summary { cursor: pointer; color: var(--ink-2); font-size: 14px; padding: 6px 0; }
.pub__cancel summary:hover { color: var(--stop); }
.pub__cancel form { margin-top: 12px; }

.pub__fine { font-size: 12.5px; color: var(--ink-3); line-height: 1.55; margin: 10px 0 0; }
.pub__foot { text-align: center; margin-top: 24px; font-size: 12px; color: var(--ink-3); }

/* ---------- dragging an appointment -----------------------------------------
   Up and down changes the time, sideways hands it to somebody else. The block
   being carried is a fixed-position clone, not the block itself: the columns
   sit inside a horizontally scrolling box, so the real one would be clipped at
   its own column's edge the moment it went sideways. */
/* An appointment is an <a>, and a browser drags links by itself: press, move,
   and Chrome starts its own drag of the href, which swallows the pointer events
   this script needs. That is why grabbing a booking felt like it worked only
   sometimes. -webkit-user-drag stops it in Chrome and Safari; Firefox needs the
   dragstart handler in drag.js. Selecting the client's name is no use to anyone
   either, and a press that becomes a text selection is a press that does not
   become a drag - so nothing inside a block is selectable. */
.appt--movable {
  cursor: grab; touch-action: none;
  -webkit-user-drag: none;
  user-select: none; -webkit-user-select: none;
}
.appt--movable:active { cursor: grabbing; }

/* Where it came from, left in place while it is in the air. */
.appt.is-ghosted { opacity: .3; filter: saturate(.4); }

.appt-ghost {
  position: fixed; z-index: 60; pointer-events: none;
  opacity: .95; transform: scale(1.02);
  box-shadow: 0 10px 24px -6px rgba(0,0,0,.4);
}
/* Where it would land, read off the block itself: the time, and the person
   when that is changing. */
.appt-ghost__at {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--accent); color: var(--accent-ink);
  font-size: 11px; font-weight: 700; line-height: 1.7;
  text-align: center; white-space: nowrap; overflow: hidden;
  font-variant-numeric: tabular-nums;
}
.appt-ghost.is-nodrop { opacity: .8; }
.appt-ghost.is-nodrop .appt-ghost__at { background: var(--stop); color: #fff; }

/* The column it is over, and the ones it cannot go to. Somebody who does not
   do that service, or any column at all when two stylists share the booking. */
.diary-col.is-drop { background: var(--accent-soft); }
.diary-col.is-nodrop, .diary-col-head.is-nodrop { opacity: .3; }
.diary-col-head.is-drop { background: var(--accent-soft); box-shadow: inset 0 -2px 0 var(--accent); }

/* ---------- lengthening a booking -------------------------------------------
   The bottom edge. Faint until the block is hovered, because reception reads
   this screen from across the room and forty visible grab handles is noise. */
/* The grip has to shrink with the block, or on a short booking it becomes most
   of it: at a fixed 14px the bottom THIRD of a 40px block resized instead of
   moving, so aiming at a small booking stretched it rather than picking it up.
   The block always keeps the clear majority of itself for being moved. */
.appt__grip {
  position: absolute; left: 0; right: 0; bottom: 0; height: 14px;
  cursor: ns-resize; z-index: 3;
}
.appt--short .appt__grip { height: 10px; }   /* under 30 minutes */
.appt--tight .appt__grip { height: 7px; }    /* under 17 - a trim, a fringe */
.appt__grip::after {
  content: ""; position: absolute; left: 50%; bottom: 3px;
  width: 26px; height: 3px; margin-left: -13px; border-radius: 2px;
  background: var(--who); opacity: 0; transition: opacity .12s, height .12s;
}
.appt:hover .appt__grip::after { opacity: .75; }
/* Wider and brighter the moment the pointer is actually on the edge, so you
   know you have it before pressing rather than after dragging the whole
   booking somewhere by mistake. */
.appt__grip:hover::after { opacity: 1; height: 4px; width: 34px; margin-left: -17px; }

.appt.is-stretching { z-index: 20; box-shadow: 0 6px 18px -4px rgba(0,0,0,.35); }
.appt.is-stretching .appt__grip::after { opacity: 1; }

/* The finish time it would land on, pinned to the bottom of the block as it
   grows, so the number is next to the edge being dragged. */
.appt__grew {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  background: var(--accent); color: var(--accent-ink);
  font-size: 11px; font-weight: 700; line-height: 1.7;
  text-align: center; white-space: nowrap; overflow: hidden;
  font-variant-numeric: tabular-nums;
}

body.is-dragging-appt { user-select: none; }
body.is-dragging-appt .slot { pointer-events: none; }
/* Deliberately NOT "body.is-dragging-appt .appt { pointer-events: none }". If
   that class ever survived a drag - a pointerup lost to a lost capture, say -
   every booking on the day would stop responding until the page was reloaded,
   which reads as "it will not pick anything up any more". Nothing needs it:
   the ghost ignores the pointer, and the target column is found by geometry
   rather than by hit-testing. */

/* ---------- where we are in the day ---------- */
.diary-now {
  position: absolute; left: 64px; right: 0; height: 0; z-index: 4;
  border-top: 1px solid var(--stop); pointer-events: none;
}
.diary-now span {
  position: absolute; left: -64px; top: -9px; width: 56px;
  text-align: right; font-size: 11px; font-weight: 700;
  color: var(--stop); font-variant-numeric: tabular-nums;
}

/* ---------- week view ---------- */
.weekwho { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.weekwho .pub__whobtn { padding: 7px 12px; font-size: 13px; }

.week .diary-head, .week .diary-body { min-width: 720px; }
.week-col-head, .week-col { flex: 1 1 0; min-width: 96px; border-left: 1px solid var(--rule); }
.week-col-head { padding: 9px 8px; text-align: center; }
.week-col-head a { text-decoration: none; color: inherit; display: block; }
.week-col-head strong { display: block; font-size: 13px; }
.week-col-head span { display: block; font-size: 11.5px; color: var(--ink-3); }
.week-col-head em { display: block; font-style: normal; font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.week-col-head.is-today { background: var(--accent-soft); }
.week-col-head.is-today strong { color: var(--accent); }
.week-col-head.is-shut em { color: var(--ink-3); opacity: .7; }
.week-col { position: relative; }
.week-col.is-today { background: color-mix(in srgb, var(--accent) 3%, transparent); }

.appt--week { border-left-width: 2px; border-radius: 3px; }
.appt--week .appt__in { padding: 2px 4px; }
.appt--week strong { font-size: 10.5px; font-weight: 600; }
.appt--week .appt__svc { font-size: 9.5px; }

@media (max-width: 860px) {
  .week-col-head, .week-col { min-width: 84px; }
}

/* ---------- multi-service basket ---------- */
.pub__pick.is-in { border-color: var(--accent); background: var(--accent-soft); }
.pub__pick.is-in .pub__price em { color: var(--accent); }
.pub__price em { display: block; font-style: normal; font-size: 11px; font-weight: 500;
                 color: var(--ink-3); margin-top: 2px; text-align: right; }

.pub__basket {
  position: sticky; bottom: 12px; margin-top: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--accent-line);
  border-radius: 11px; padding: 14px 16px; box-shadow: var(--shadow-2);
}
.pub__basket strong { display: block; font-size: 15px; }
.pub__basket span   { display: block; font-size: 13px; color: var(--ink-2); }
.pub__basket em {
  display: block; font-style: normal; font-size: 12.5px; margin-top: 5px;
  color: var(--jade); line-height: 1.45; max-width: 34ch;
}
.pub__basket .btn { white-space: nowrap; }

/* The running order, so a client can see what happens when. */
.pub__plan { list-style: none; margin: 16px 0 0; padding: 0; }
.pub__plan li { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--rule); font-size: 14px; }
.pub__plan li:last-child { border-bottom: none; }
.pub__plantime { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-2); flex: 0 0 44px; }
.pub__plan em { display: block; font-style: normal; font-size: 12px; color: var(--ink-3); margin-top: 1px; }

/* ---------------------------------------------------------------------------
   THE CONSOLE
   The superintendent side. Deliberately a dark bar rather than the salon's
   sidebar: at a glance you must always know whether you are looking at the
   platform or at somebody's salon. Confusing the two is the one mistake here
   with real consequences.
   --------------------------------------------------------------------------- */
.cbar {
  display: flex; align-items: center; gap: 26px;
  padding: 12px 24px; background: #141118; color: #F0ECF2;
  position: sticky; top: 0; z-index: 20;
}
.cbar__brand { display: inline-flex; align-items: center; gap: 10px; color: #F0ECF2; text-decoration: none; }
.cbar__tag {
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700;
  color: #141118; background: var(--accent); padding: 3px 7px; border-radius: 4px;
}
.cbar__nav { display: flex; gap: 4px; margin-right: auto; }
.cbar__nav a {
  color: #ADA6B4; text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 7px 11px; border-radius: 6px;
}
.cbar__nav a:hover { color: #F0ECF2; background: rgba(255,255,255,.07); }
.cbar__nav a[aria-current="page"] { color: #F0ECF2; background: rgba(255,255,255,.12); font-weight: 600; }
.cbar__who { display: flex; align-items: center; gap: 14px; font-size: 13px; color: #ADA6B4; }
.cbar__who a { color: #F0ECF2; }

.content--console { max-width: 1100px; margin: 0 auto; padding: 26px 24px 60px; }
.chead { margin: 0 0 20px; font-size: 24px; font-weight: 650; letter-spacing: -.02em; }
.crumb { margin: -6px 0 16px; font-size: 13px; }
.crumb a { color: var(--ink-2); text-decoration: none; }
.crumb a:hover { color: var(--accent); }

.console .panel { margin-bottom: 18px; }
.console .panel__body { padding: 16px 18px; }
.console .panel__body > :first-child { margin-top: 0; }
.console .panel__body > :last-child { margin-bottom: 0; }

.tile--warn { border-color: var(--accent-line); background: var(--accent-soft); }
.row--muted { opacity: .55; }
.is-warn { color: var(--amber); font-weight: 600; }

@media (max-width: 720px) {
  .cbar { flex-wrap: wrap; gap: 12px; }
  .cbar__nav { order: 3; width: 100%; overflow-x: auto; }
  .cbar__who { margin-left: auto; }
}

/* A lapsed subscription. Loud enough to act on, quiet enough to work under -
   the salon is still open and still serving people. */
.lapsed {
  padding: 11px 28px; font-size: 13.5px; line-height: 1.5;
  background: var(--amber-soft); color: var(--amber);
  border-bottom: 1px solid color-mix(in srgb, var(--amber) 30%, transparent);
}
.lapsed strong { color: var(--amber); }

/* The diary is the screen a salon spends all day in, so it gets the whole
   window rather than the reading-width column the rest of the app uses. With
   six stylists at the old 190px it overflowed and scrolled sideways on a 1080p
   monitor while leaving 500px of empty page beside it. */
.content--diary, .content--week { max-width: none; }

/* Columns grow to fill the window and stop at a readable width, then shrink to
   a floor and scroll rather than getting too narrow to read. --cols is the
   number of stylists on the grid, which CSS cannot know and the page does: it
   stops the card sitting there full-width with three columns rattling around
   inside it. Above about five stylists the value exceeds the window and this
   does nothing. */
.diary { max-width: calc(64px + var(--cols, 99) * 381px + 2px); }

/* ===========================================================================
   TYPOGRAPHY AND LINKS
   ===========================================================================

   Links had no rule at all, so every one of the forty-odd plain links in the
   app was rendering in the browser's default #0000EE, with visited ones going
   purple. Against a warm near-black and a rose accent that reads as a page that
   was never finished, and it was the single loudest thing on screen.

   They take the accent now. In this app the accent already means "interactive"
   - it is the button fill and the current nav item - so a link being rose is
   the palette being consistent rather than a new colour being introduced.
   Visited is deliberately identical: a purple history trail is noise in a tool
   somebody uses all day, not information.

   Headings, likewise, only had rules where something happened to scope them
   (.card h2, .topbar h1). A bare <h2> fell through to the browser's 2em, which
   is why the console's panel headings were twice the size they should be. The
   scale below is explicit so it holds anywhere, and the scoped rules still win
   where they exist because a class always beats an element. */

:root {
  /* Links get their own rose rather than reusing --accent directly. The brand
     accent is #D8395A, which lands at 4.33:1 on the paper ground - under the
     4.5 minimum for body text, and links ARE body text. These are measured:
     5.29:1 on paper, 5.51:1 on white, and deeper still on hover. --accent
     itself is untouched, so buttons and the logo do not shift. */
  --link:       #C42C4B;
  --link-hover: #A82440;

  /* Windows ships an optical-size family: Text is drawn for reading at small
     sizes, Display for headings. Using both is free craft on this machine and
     falls back cleanly everywhere else. */
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system,
          "Helvetica Neue", Arial, sans-serif;
  --sans-display: "Segoe UI Variable Display", "Segoe UI Semibold", "Segoe UI",
                  system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --link: #FF6B87; --link-hover: #FFA3B6; }
}
:root[data-theme="dark"] { --link: #FF6B87; --link-hover: #FFA3B6; }

a {
  color: var(--link);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  text-decoration-color: color-mix(in srgb, var(--link) 42%, transparent);
  transition: color .12s ease, text-decoration-color .12s ease;
}
a:visited { color: var(--link); }
a:hover {
  color: var(--link-hover);
  text-decoration-color: currentColor;
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Links that are already something else - buttons, nav, the logo - keep their
   own treatment and lose the underline. */
.btn, .wordmark, .side nav a, .cbar__nav a, .cbar__brand, .crumb a,
.subnav > a, .week-col-head a, .appt, .slot, .drawer__x, .diary-col-head a {
  text-decoration: none;
}
.crumb a:hover, .subnav > a:hover { text-decoration: underline; }

/* ---------- headings ---------- */
h1, h2, h3, h4 {
  font-family: var(--sans-display);
  color: var(--ink);
  text-wrap: balance;
  margin: 0 0 10px;
}
h1 { font-size: 25px; font-weight: 660; letter-spacing: -.021em; line-height: 1.2; }
h2 { font-size: 19px; font-weight: 650; letter-spacing: -.015em; line-height: 1.28; }
h3 { font-size: 15.5px; font-weight: 650; letter-spacing: -.008em; line-height: 1.35; }
h4 { font-size: 13.5px; font-weight: 650; letter-spacing: .01em; }

p { text-wrap: pretty; }

/* Panel headings were only styled as h3, and every console panel uses h2. */
.panel__head h2 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -.005em; }
.panel__head h2 .muted { font-weight: 500; }
.chead, .topbar h1, .card h2, .tile__value { font-family: var(--sans-display); }

/* Digits that sit in columns should line up, wherever they are. */
.num, .mono, time, .tile__value, .drawer__price, .drawer__total {
  font-variant-numeric: tabular-nums;
}

/* ---------- small pleasures ---------- */
::selection { background: color-mix(in srgb, var(--accent) 24%, transparent); }

table.data tbody tr { transition: background .12s ease; }
table.data tbody tr:hover { background: color-mix(in srgb, var(--ink) 3%, transparent); }

hr { border: none; border-top: 1px solid var(--rule); margin: 22px 0; }

/* The booking link and its QR, side by side in settings. Wraps on a narrow
   screen rather than shrinking the QR - a QR too small to scan is decoration. */
.sharebox { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
.sharebox__qr {
  flex: 0 0 auto; padding: 10px; background: #fff;
  border: 1px solid var(--rule); border-radius: 8px; line-height: 0;
}
.sharebox__side { flex: 1 1 260px; min-width: 0; }
.sharebox__url {
  background: var(--surface-2); padding: 10px 12px; border-radius: 6px;
  font-size: 12.5px; word-break: break-all; margin: 0 0 10px;
}

/* ---------- the agreement at setup -----------------------------------------
   Shown in full on the page rather than behind a link. A term nobody could
   reasonably have seen is a term that gets argued about later, and a salon
   scrolling past it is at least a choice they made. */
.legal-scroll {
  max-height: 260px; overflow-y: auto;
  border: 1px solid var(--rule-2); border-radius: 6px;
  padding: 14px 16px; background: var(--surface-2);
  margin-bottom: 14px;
}
.legal-scroll:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent); }
.legal-scroll h4 {
  margin: 14px 0 6px; font-size: 13px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-3);
}
.legal-scroll h4:first-child { margin-top: 0; }
.legal-scroll pre {
  margin: 0; white-space: pre-wrap; word-wrap: break-word;
  font: inherit; font-size: 12.5px; line-height: 1.55; color: var(--ink-2);
}

/* Deliberately never pre-ticked. A box that arrives already agreed is not an
   affirmative act, and an affirmative act is the whole point of the box. */
.agree {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 13.5px; line-height: 1.5; margin-bottom: 16px; cursor: pointer;
}
.agree input { margin-top: 2px; flex: none; width: 17px; height: 17px; cursor: pointer; }

/* A form sitting on one line inside a table cell - the resend-a-copy control. */
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* The cancellation policy on the booking page. Shown in full above the button,
   not linked from under it: a client who could not reasonably have read it has
   not agreed to it, and being able to say they did is the entire point. */
.pub__policy {
  border: 1px solid var(--rule-2); border-radius: 6px;
  background: var(--surface-2); padding: 14px 16px; margin-bottom: 14px;
}
.pub__policy h3 { margin: 0 0 8px; font-size: 14px; }
.pub__policy pre {
  margin: 0; white-space: pre-wrap; word-wrap: break-word;
  font: inherit; font-size: 13px; line-height: 1.55; color: var(--ink-2);
  max-height: 220px; overflow-y: auto;
}
.pub__policy .pub__fine { margin-top: 10px; }
