/* Schedule Wizard (11/11, plan docs/2026-11-11-schedule-wizard-plan.md, package E2).
   Design: design/schedule-wizard/wireframe.html. Apple HIG language: system
   font stack, 8pt spacing (8/16/24/32/48), soft depth instead of card
   borders, continuous radii 12/16/20, segmented controls, bottom sheets on
   phone, 44px targets, numbers that never wrap (tabular-nums + nowrap),
   light and dark ([data-theme-root].dark), reduced motion.

   Everything is scoped under .sw so nothing leaks into the rest of the app.
   Class vocabulary (also used by the landing, log and detail screens):
     .sw            root, carries the tokens
     .sw-focus      full-viewport focus mode (covers the app chrome)
     .btn .primary .tonal .text .quiet .danger .warn .hero .full   buttons
     .sw-card .sw-hero .sw-st(.posted|.waiting|.declined|.warned|.draft)
     .num           any number: tabular, never wraps
     .sw-only-wide / .sw-only-phone   layout switches at 600px */

.sw {
  --sw-bg: #f6f5f7; --sw-surface: #fff; --sw-surface-2: #faf9fb; --sw-surface-3: #f2f0f5;
  --sw-line: #e6e4ea; --sw-line-2: #efedf2;
  --sw-ink: #1d1b22; --sw-ink-2: #4a4652; --sw-muted: #6f6a78; --sw-soft: #8f8a98;
  --sw-accent: #7c3aed; --sw-accent-hover: #6d28d9; --sw-accent-ink: #5b21b6;
  --sw-accent-wash: #f3edfe; --sw-accent-wash-2: #e6dafb; --sw-on-accent: #fff; --sw-focus-ring: #9f6bff;
  --sw-bad: #c43f6f; --sw-bad-wash: #fcebf1; --sw-bad-line: #f1bfd1;
  --sw-warn: #a86a12; --sw-warn-wash: #fdf4e3; --sw-warn-line: #eccf98;
  --sw-ok: #1f8a68; --sw-ok-wash: #e4f4ee; --sw-ok-line: #b5e0cf;
  --sw-desk: #0f8b8d; --sw-gm: #b79af4; --sw-hk: #c77d3a; --sw-remote: #9a96a3;
  /* 11/15 desk coverage bar: one obvious color per meaning. */
  --sw-cov-staff: #2f9e5b; --sw-cov-gm: #2f6fd6; --sw-cov-two: #e0a020; --sw-cov-empty: #d93a3a;
  --sw-track: #efedf2;
  --sw-shadow: 0 1px 2px rgba(30, 20, 50, .04), 0 8px 24px rgba(30, 20, 50, .06);
  --sw-shadow-lift: 0 12px 32px rgba(30, 20, 50, .16);
  --sw-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, system-ui, sans-serif;
  --sw-r-lg: 20px; --sw-r: 16px; --sw-r-sm: 12px;
  --sw-s1: 8px; --sw-s2: 16px; --sw-s3: 24px; --sw-s4: 32px; --sw-s5: 48px;
  --sw-ease: cubic-bezier(.2, .8, .2, 1);
  font: 15px/1.5 var(--sw-font);
  color: var(--sw-ink);
  -webkit-font-smoothing: antialiased;
  letter-spacing: normal;
}
[data-theme-root].dark .sw {
  --sw-bg: #0A0F1E; --sw-surface: #0F172A; --sw-surface-2: #131c31; --sw-surface-3: #1b2436;
  --sw-line: #232E47; --sw-line-2: #1B2436;
  --sw-ink: #FAFAFA; --sw-ink-2: #d8deea; --sw-muted: #98a3ba; --sw-soft: #7e89a3;
  --sw-accent: #7c3aed; --sw-accent-hover: #8b5cf6; --sw-accent-ink: #c4b5fd;
  --sw-accent-wash: #1c1430; --sw-accent-wash-2: #281d45; --sw-focus-ring: #A78BFA;
  --sw-bad: #FF667F; --sw-bad-wash: #2b1219; --sw-bad-line: #5d2635;
  --sw-warn: #f2b252; --sw-warn-wash: #281e0a; --sw-warn-line: #594315;
  --sw-ok: #34D399; --sw-ok-wash: #0d2019; --sw-ok-line: #1e4e3b;
  --sw-desk: #2bb3b5; --sw-gm: #7c5cd6; --sw-hk: #d99558; --sw-remote: #6b7590;
  --sw-cov-staff: #3fc47a; --sw-cov-gm: #5b93f0; --sw-cov-two: #f2b84a; --sw-cov-empty: #f05a5a;
  --sw-track: #1b2436;
  --sw-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  --sw-shadow-lift: 0 12px 32px rgba(0, 0, 0, .55);
}
.sw *, .sw *::before, .sw *::after { box-sizing: border-box; }
.sw :focus-visible { outline: 2px solid var(--sw-focus-ring); outline-offset: 2px; border-radius: 8px; }
.sw a { color: var(--sw-accent-ink); text-underline-offset: 3px; }
.sw .num, .sw td, .sw th, .sw .stat-v, .sw .v, .sw dd { font-variant-numeric: tabular-nums; }
.sw .num, .sw .stat-v, .sw .v, .sw dd { white-space: nowrap; }
.sw .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sw .small { font-size: 13px; color: var(--sw-muted); }
.sw .sub { font-size: 14px; color: var(--sw-muted); margin: 8px 0 0; }

/* ---------- focus mode: the wizard owns the whole viewport ---------- */
.sw-focus {
  position: fixed; inset: 0; z-index: 60; overflow-y: auto; overflow-x: hidden;
  min-height: 100dvh; background: var(--sw-bg);
  overscroll-behavior: contain;
}
.sw-focus .sw-page { max-width: 1600px; margin: 0 auto; padding: 0 var(--sw-s4) 128px; }
.sw-topbar {
  position: sticky; top: 0; z-index: 5;
  margin: 0 calc(-1 * var(--sw-s4)); padding: var(--sw-s1) var(--sw-s4) 0;
  background: color-mix(in srgb, var(--sw-bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
}
.sw-top { display: flex; justify-content: space-between; align-items: center; gap: var(--sw-s2); min-height: 56px; }
.sw-week { font-size: 14px; color: var(--sw-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-week b { color: var(--sw-ink); font-weight: 600; }

/* ---------- buttons: 44px tall everywhere, one primary per screen ---------- */
.sw .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 0;
  background: var(--sw-surface-2); color: var(--sw-ink);
  font: 500 14.5px var(--sw-font); cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .18s var(--sw-ease), transform .12s var(--sw-ease), box-shadow .18s var(--sw-ease);
  -webkit-tap-highlight-color: transparent;
}
.sw .btn:hover { background: var(--sw-surface-3); }
.sw .btn:active { transform: scale(.97); }
.sw .btn.primary { background: var(--sw-accent); color: var(--sw-on-accent); font-weight: 600; box-shadow: 0 6px 18px rgba(124, 58, 237, .28); }
.sw .btn.primary:hover { background: var(--sw-accent-hover); }
.sw .btn.primary.warn { background: var(--sw-warn); box-shadow: 0 6px 18px rgba(168, 106, 18, .25); }
.sw .btn.primary.danger { background: var(--sw-bad); color: #fff; box-shadow: 0 6px 18px rgba(196, 63, 111, .25); }
[data-theme-root].dark .sw .btn.primary.warn { color: #0A0F1E; }
.sw .btn.tonal { background: var(--sw-accent-wash); color: var(--sw-accent-ink); font-weight: 600; }
.sw .btn.tonal:hover { background: var(--sw-accent-wash-2); }
.sw .btn.text { background: transparent; color: var(--sw-accent-ink); padding: 0 10px; }
.sw .btn.text:hover { background: var(--sw-accent-wash); }
.sw .btn.quiet { background: transparent; color: var(--sw-muted); padding: 0 10px; }
.sw .btn.quiet:hover { background: var(--sw-surface-3); color: var(--sw-ink); }
.sw .btn.danger:not(.primary) { background: transparent; color: var(--sw-bad); }
.sw .btn.hero { min-height: 56px; padding: 0 28px; font-size: 17px; border-radius: 16px; }
.sw .btn.full { width: 100%; }
.sw .btn[disabled], .sw .btn[aria-disabled="true"] {
  background: var(--sw-surface-3); color: var(--sw-soft); cursor: not-allowed; box-shadow: none; transform: none;
}

/* status words: a coloured word with a dot, never a loud pill */
.sw .sw-st { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.sw .sw-st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.sw .sw-st.posted { color: var(--sw-ok); } .sw .sw-st.waiting { color: var(--sw-accent-ink); }
.sw .sw-st.declined { color: var(--sw-bad); } .sw .sw-st.warned { color: var(--sw-warn); } .sw .sw-st.draft { color: var(--sw-muted); }

.sw .sw-card { background: var(--sw-surface); border-radius: var(--sw-r); box-shadow: var(--sw-shadow); padding: var(--sw-s3); }
.sw .sw-hero { background: var(--sw-surface); border-radius: var(--sw-r-lg); box-shadow: var(--sw-shadow); padding: var(--sw-s4); }

/* ---------- stepper (desktop) and progress (phone) ---------- */
.sw-stepper { display: flex; align-items: center; margin: var(--sw-s1) 0 var(--sw-s2); list-style: none; padding: 0; }
.sw-stepper li { display: flex; align-items: center; flex: 1; min-width: 0; }
.sw-stepper li:last-child { flex: 0 0 auto; }
.sw-stepper a, .sw-stepper .is-off {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding-right: 12px; border-radius: 10px;
  color: var(--sw-soft); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.sw-stepper .is-off { cursor: not-allowed; }
.sw-stepper .n {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; font-weight: 600; background: var(--sw-surface); box-shadow: inset 0 0 0 1.5px var(--sw-line);
}
.sw-stepper .done a { color: var(--sw-ink-2); }
.sw-stepper .done .n { background: var(--sw-accent-wash); box-shadow: none; color: var(--sw-accent-ink); }
.sw-stepper .cur a { color: var(--sw-ink); font-weight: 600; }
.sw-stepper .cur .n { background: var(--sw-accent); box-shadow: none; color: #fff; }
.sw-stepper .bar { flex: 1; height: 2px; background: var(--sw-line); margin-right: 12px; border-radius: 2px; min-width: 12px; }
.sw-stepper .done .bar { background: var(--sw-accent-wash-2); }
.sw-stepper .count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center;
  background: var(--sw-bad); color: #fff; font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.sw-progress { display: none; }
.sw-progress .eyebrow { font-size: 12.5px; color: var(--sw-muted); }
.sw-progress .segs { display: flex; gap: 4px; margin: 8px 0 12px; }
.sw-progress .segs i { flex: 1; height: 4px; border-radius: 2px; background: var(--sw-line); }
.sw-progress .segs i.on { background: var(--sw-accent); }

/* ---------- step intro, footer with the one primary ---------- */
.sw-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--sw-s2); margin: var(--sw-s1) 0 var(--sw-s3); }
.sw-h { font-size: 28px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; margin: 0; }
.sw-h2 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.sw-footer {
  position: fixed; right: var(--sw-s4); bottom: var(--sw-s3); z-index: 6;
  display: flex; align-items: center; gap: var(--sw-s1);
  padding: var(--sw-s1); border-radius: 18px;
  background: color-mix(in srgb, var(--sw-surface) 88%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
  box-shadow: var(--sw-shadow-lift);
  max-width: calc(100vw - 2 * var(--sw-s4));
}
.sw-footer.wide { left: var(--sw-s4); justify-content: space-between; max-width: none; }
.sw-footer.wide .sw-gate { flex: 1; margin: 0; padding: 12px 12px 12px 20px; }
.sw-footer.wide > form { flex: 1; display: flex; min-width: 0; }
.sw-focus[data-step="review"] .sw-page { padding-bottom: 240px; }
.sw-footer .meta { font-size: 13px; color: var(--sw-soft); padding: 0 var(--sw-s1); white-space: nowrap; }
.sw-footer .meta.bad { color: var(--sw-bad); }
/* The grid's undo toast and Saving pill are fixed at bottom 24px with a higher
   z-index; in the wizard they would cover the pinned primary. Lift the toast
   clear of the footer and drop the pill (the footer says every change saves). */
.sw-focus .yw-sch-toast, .yw-sch-toast[data-mode="step"] { bottom: 104px; }
.sw-focus .yw-sch-saving { display: none; }
.sw-saved::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--sw-ok); margin-right: 7px; vertical-align: 1px; }
.sw-backpill { display: inline-flex; margin-bottom: var(--sw-s2); }

/* ---------- toasts and notes ---------- */
.sw-toast {
  position: fixed; left: 50%; bottom: 104px; transform: translateX(-50%); z-index: 8;
  display: inline-flex; align-items: center; gap: 14px; min-height: 48px; padding: 0 8px 0 16px;
  border-radius: 14px; background: var(--sw-ink); color: var(--sw-bg); font-size: 14px; box-shadow: var(--sw-shadow-lift);
  animation: sw-rise .28s var(--sw-ease);
}
.sw-toast .btn { min-height: 44px; min-width: 44px; background: transparent; color: var(--sw-accent-wash-2); }
.sw-toast.bad { background: var(--sw-bad); color: #fff; }
.sw-note { display: flex; gap: 10px; font-size: 13.5px; color: var(--sw-muted); padding: 14px 16px; background: var(--sw-surface-2); border-radius: 12px; margin-top: var(--sw-s2); }
.sw-alert { background: var(--sw-surface); border-radius: var(--sw-r); box-shadow: var(--sw-shadow); padding: var(--sw-s2) var(--sw-s3); margin-bottom: var(--sw-s2); border-left: 3px solid var(--sw-warn); }
.sw-alert b { display: block; font-size: 15.5px; }
.sw-notice { border-left-color: var(--sw-ok, var(--sw-accent)); font-weight: 600; }
.sw-notice.bad { border-left-color: var(--sw-bad); }

/* ---------- coverage and fill bars ---------- */
.sw-cov { height: 8px; border-radius: 4px; background: var(--sw-track); display: flex; overflow: hidden; gap: 1px; }
.sw-cov span { display: block; height: 100%; }
.sw-cov .ok, .sw-key.ok { background: var(--sw-cov-staff); } .sw-cov .gm, .sw-key.gm { background: var(--sw-cov-gm); }
.sw-cov .double, .sw-key.double { background: var(--sw-cov-two); } .sw-cov .hole, .sw-key.hole { background: var(--sw-cov-empty); }
.sw-covticks { position: relative; height: 13px; margin-top: 2px; font-size: 10.5px; color: var(--sw-muted); font-variant-numeric: tabular-nums; }
.sw-covticks span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.sw-covticks span:first-child { transform: none; }
.sw-covticks span:last-child { transform: translateX(-100%); }
.sw-needt { font-size: 12.5px; font-weight: 600; margin-top: 6px; white-space: nowrap; }
/* The coverage/fill line under each day ("17 of 25.5 h, 8.5 short", "Nobody
   7 AM to 10:30 AM") never clips its numbers: no ellipsis, and in the wizard
   the day columns are wide enough to hold the longest line (the grid's own
   scroller takes the overflow). Beats the builder's inline minWidth 120. */
.sw-focus .yw-sch-grid thead th.yw-sch-day { min-width: 176px !important; }
.sw-needt.ok { color: var(--sw-ok); } .sw-needt.bad { color: var(--sw-bad); } .sw-needt.over { color: var(--sw-warn); } .sw-needt.off { color: var(--sw-muted); }
.sw-needt.gm { color: var(--sw-cov-gm); }
.sw-fill { height: 8px; border-radius: 4px; background: var(--sw-track); position: relative; }
.sw-fill span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--sw-ok); }
.sw-fill.over span { background: var(--sw-warn); } .sw-fill.short span { background: var(--sw-bad); }
.sw-fill i { position: absolute; top: -4px; bottom: -4px; width: 2px; border-radius: 1px; background: var(--sw-ink); opacity: .6; }
.sw-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--sw-muted); margin-top: 12px; }
.sw-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw-legend i { width: 18px; height: 8px; border-radius: 3px; display: inline-block; }

/* ---------- GM days off: segmented control ---------- */
.sw-daysoff { display: flex; align-items: center; gap: var(--sw-s2); flex-wrap: wrap; margin-bottom: var(--sw-s2); }
.sw-seg { display: inline-flex; padding: 2px; border-radius: 10px; background: var(--sw-surface-3); gap: 2px; }
.sw-seg button {
  min-height: 44px; min-width: 52px; padding: 0 12px; border: 0; border-radius: 8px;
  background: transparent; color: var(--sw-ink-2); font: 500 13.5px var(--sw-font); cursor: pointer;
  transition: background .18s var(--sw-ease), box-shadow .18s var(--sw-ease);
}
.sw-seg button[aria-pressed="true"] { background: var(--sw-surface); color: var(--sw-ink); box-shadow: var(--sw-shadow); font-weight: 600; }
.sw-seg button[disabled] { color: var(--sw-soft); cursor: not-allowed; }

/* ---------- row end totals (GM and owner only) ---------- */
.sw .rowend { font-size: 12px; color: var(--sw-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sw .rowend.near { color: var(--sw-warn); } .sw .rowend.over { color: var(--sw-bad); }

/* ---------- start ---------- */
.sw-start { max-width: 560px; margin: var(--sw-s5) auto; }
.sw-start .choices { display: flex; flex-direction: column; gap: var(--sw-s1); margin-top: var(--sw-s3); }

/* ---------- check ---------- */
.sw-summary { display: flex; align-items: center; gap: var(--sw-s3); padding: var(--sw-s3); border-radius: var(--sw-r-lg); background: var(--sw-surface); box-shadow: var(--sw-shadow); }
.sw-summary .big { font-size: 34px; font-weight: 650; letter-spacing: -.02em; line-height: 1; white-space: nowrap; }
.sw-group-h { display: flex; justify-content: space-between; align-items: baseline; margin: var(--sw-s4) 0 10px; }
.sw-group-h h3 { font-size: 15px; font-weight: 600; margin: 0; }
.sw-leak {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 20px; padding: 20px;
  background: var(--sw-surface); border-radius: var(--sw-r); box-shadow: var(--sw-shadow);
  margin-bottom: 12px; position: relative;
}
.sw-leak::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0; background: var(--sw-bad); }
.sw-leak.warn::before { background: var(--sw-warn); } .sw-leak.hold::before { background: var(--sw-accent); }
.sw-leak .kind { font-size: 12.5px; font-weight: 600; color: var(--sw-bad); }
.sw-leak.warn .kind { color: var(--sw-warn); } .sw-leak.hold .kind { color: var(--sw-accent-ink); }
.sw-leak h4 { margin: 2px 0 0; font-size: 16px; font-weight: 600; letter-spacing: -.005em; }
.sw-leak .why { grid-column: 1 / -1; color: var(--sw-ink-2); font-size: 14px; margin: 4px 0 0; max-width: 680px; }
.sw-leak .cost { text-align: right; font-size: 17px; font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sw-leak .cost small { display: block; font-size: 12px; font-weight: 400; color: var(--sw-muted); }
.sw-leak .acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 12px; }
/* the one-tap fix names exactly what it writes, so its label wraps (never clipped) */
.sw-leak .acts .btn.fix { white-space: normal; text-align: left; justify-content: flex-start; max-width: 100%; min-width: 0; padding-block: 10px; line-height: 1.3; overflow-wrap: anywhere; }
.sw-leak .effect { font-size: 13px; color: var(--sw-muted); margin-left: 6px; }
.sw-leak .kept { grid-column: 1 / -1; margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--sw-surface-2); font-size: 14px; color: var(--sw-ink-2); }
.sw-fixed { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; border-radius: 12px; background: var(--sw-surface); box-shadow: var(--sw-shadow); margin-bottom: 6px; font-size: 14px; color: var(--sw-ink-2); }
.sw-fixed .tick { color: var(--sw-ok); font-weight: 700; margin-right: 8px; }
.sw-done { text-align: center; padding: var(--sw-s5) var(--sw-s2) var(--sw-s3); }
.sw-done .ring { width: 64px; height: 64px; border-radius: 50%; background: var(--sw-ok-wash); color: var(--sw-ok); display: grid; place-items: center; font-size: 30px; margin: 0 auto 16px; }

/* reason: inline on desktop, a bottom sheet on phone */
.sw-reason { grid-column: 1 / -1; margin-top: 12px; }
.sw-reason label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.sw-reason textarea, .sw textarea.sw-input {
  width: 100%; min-height: 88px; border: 0; border-radius: 12px; padding: 12px;
  font: 15px/1.45 var(--sw-font); color: var(--sw-ink); background: var(--sw-surface-2); resize: vertical;
  box-shadow: inset 0 0 0 1px var(--sw-line);
}
.sw-reason .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; font-size: 12.5px; color: var(--sw-muted); }
.sw-reason .err { color: var(--sw-bad); }

/* ---------- bottom sheet (phone) ---------- */
.sw-scrim { position: fixed; inset: 0; z-index: 70; background: rgba(10, 8, 20, .36); animation: sw-fade .2s ease; }
.sw-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 71; max-height: 88dvh; overflow-y: auto;
  background: var(--sw-surface); border-radius: 20px 20px 0 0; box-shadow: var(--sw-shadow-lift);
  padding: var(--sw-s2) var(--sw-s2) calc(var(--sw-s3) + env(safe-area-inset-bottom));
  animation: sw-sheet-in .32s var(--sw-ease);
}
.sw-sheet .grab { width: 36px; height: 5px; border-radius: 3px; background: var(--sw-surface-3); margin: 0 auto 12px; }
.sw-sheet h3 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.sw-sheet .row-acts { display: flex; gap: var(--sw-s1); margin-top: var(--sw-s2); }
.sw-sheet .row-acts .btn { flex: 1; }
.sw .opt {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%;
  min-height: 52px; padding: 0 14px; margin-bottom: 8px; border: 0; border-radius: 12px;
  background: var(--sw-surface-2); color: var(--sw-ink); font: 14.5px var(--sw-font); text-align: left; cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--sw-line-2);
}
.sw .opt[aria-checked="true"] { background: var(--sw-accent-wash); box-shadow: inset 0 0 0 1.5px var(--sw-accent); }
.sw .opt[disabled] { opacity: .55; cursor: not-allowed; }
.sw .opt .s { font-size: 12.5px; color: var(--sw-muted); white-space: nowrap; }
.sw .sw-selects { display: flex; gap: 8px; margin: 4px 0 8px; }
.sw .sw-selects label { flex: 1; font-size: 12.5px; color: var(--sw-muted); }
.sw .sw-selects select { display: block; width: 100%; min-height: 44px; margin-top: 4px; border: 0; border-radius: 12px; padding: 0 10px; font: 15px var(--sw-font); background: var(--sw-surface-2); color: var(--sw-ink); box-shadow: inset 0 0 0 1px var(--sw-line); }

/* ---------- phone day pager and cards ---------- */
.sw-pager { display: flex; gap: 4px; margin: 4px 0 14px; }
.sw-pager button {
  flex: 1; min-width: 0; min-height: 52px; border: 0; border-radius: 12px; background: var(--sw-surface-3);
  color: var(--sw-muted); font: 500 11.5px var(--sw-font); position: relative; cursor: pointer;
}
.sw-pager button b { display: block; font-size: 15px; color: var(--sw-ink); font-variant-numeric: tabular-nums; }
.sw-pager button[aria-selected="true"] { background: var(--sw-accent); color: #fff; }
.sw-pager button[aria-selected="true"] b { color: #fff; }
.sw-pager .dot-bad::after, .sw-pager .dot-warn::after { content: ""; position: absolute; top: 6px; right: 7px; width: 7px; height: 7px; border-radius: 50%; }
.sw-pager .dot-bad::after { background: var(--sw-bad); } .sw-pager .dot-warn::after { background: var(--sw-warn); }
.sw-pcard {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 60px;
  padding: 8px 8px 8px 14px; border-radius: 14px; background: var(--sw-surface); box-shadow: var(--sw-shadow);
  margin-bottom: 8px; position: relative;
}
.sw-pcard::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--sw-desk); }
.sw-pcard.gm::before { background: var(--sw-accent); } .sw-pcard.remote::before { background: var(--sw-remote); } .sw-pcard.hk::before { background: var(--sw-hk); }
.sw-pcard.off { opacity: .65; }
.sw-pcard .n { font-weight: 600; font-size: 14.5px; } .sw-pcard .t { font-size: 13px; color: var(--sw-muted); white-space: nowrap; }
.sw-padd {
  display: flex; align-items: center; width: 100%; min-height: 52px; padding: 0 14px; margin-bottom: 8px;
  border: 1.5px dashed var(--sw-accent-wash-2); border-radius: 14px; background: none;
  color: var(--sw-accent-ink); font: 600 14px var(--sw-font); cursor: pointer; text-align: left;
}
.sw-psect { font-size: 12.5px; font-weight: 600; color: var(--sw-soft); margin: 18px 0 8px; }

/* ---------- review ---------- */
.sw-rv-hero { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 12px; }
.sw .stat { background: var(--sw-surface); border-radius: var(--sw-r); box-shadow: var(--sw-shadow); padding: 20px; min-width: 0; }
.sw .stat .k { font-size: 13px; color: var(--sw-muted); }
.sw .stat .stat-v { font-size: clamp(22px, 2vw, 28px); font-weight: 650; letter-spacing: -.02em; margin: 4px 0 2px; line-height: 1.15; }
.sw .stat.main .stat-v { font-size: 44px; color: var(--sw-ok); }
.sw .stat.main.warn .stat-v { color: var(--sw-warn); } .sw .stat.main.bad .stat-v { color: var(--sw-bad); }
.sw .stat .s { font-size: 13px; color: var(--sw-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* A stat line that must be read whole (the with and without core %, the season): wraps, never cut. */
.sw .stat .sw-stat-line { font-size: 13px; color: var(--sw-muted); white-space: normal; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; margin-top: 2px; }
.sw-gauge { position: relative; height: 10px; border-radius: 5px; background: var(--sw-track); margin: 14px 0 8px; }
.sw-gauge span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--sw-ok); }
.sw-gauge.warn span { background: var(--sw-warn); } .sw-gauge.bad span { background: var(--sw-bad); }
.sw-gauge i { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--sw-ink); opacity: .7; }
.sw-gauge b { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--sw-bad); }
.sw-gauge-k { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--sw-muted); }
.sw-gauge-k span { white-space: nowrap; }
.sw-checks { margin-top: 12px; background: var(--sw-surface); border-radius: var(--sw-r); box-shadow: var(--sw-shadow); padding: 4px 20px; }
.sw-check { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 52px; border-bottom: 1px solid var(--sw-line-2); font-size: 14.5px; }
.sw-check:last-child { border-bottom: 0; }
.sw-check .ic { color: var(--sw-ok); font-weight: 700; } .sw-check .ic.bad { color: var(--sw-bad); } .sw-check .ic.warn { color: var(--sw-warn); }
.sw-check .v { font-weight: 600; }
.sw-check .s { color: var(--sw-muted); font-size: 13px; margin-left: 8px; font-weight: 400; }
.sw details.sw-panel { margin-top: 12px; background: var(--sw-surface); border-radius: var(--sw-r); box-shadow: var(--sw-shadow); }
.sw details.sw-panel > summary {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; padding: 0 20px;
  cursor: pointer; list-style: none; font-weight: 600; font-size: 15px; white-space: nowrap;
}
.sw details.sw-panel > summary::-webkit-details-marker { display: none; }
.sw details.sw-panel > summary::after { content: "Show"; font-size: 13.5px; font-weight: 500; color: var(--sw-accent-ink); }
.sw details.sw-panel[open] > summary::after { content: "Hide"; }
.sw details.sw-panel .body { padding: 0 20px 16px; }
/* content never folds (owner rule 9/21): open panels with a plain heading */
.sw section.sw-panel { margin-top: 12px; background: var(--sw-surface); border-radius: var(--sw-r); box-shadow: var(--sw-shadow); }
.sw section.sw-panel > .sw-panel-head { display: flex; align-items: center; min-height: 56px; margin: 0; padding: 0 20px; font-weight: 600; font-size: 15px; white-space: nowrap; }
.sw section.sw-panel .body { padding: 0 20px 16px; }
/* tables never squeeze: they scroll inside their card, first column sticky */
.sw .sw-tscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.sw table.sw-t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.sw table.sw-t th, .sw table.sw-t td { padding: 10px 12px; border-bottom: 1px solid var(--sw-line-2); text-align: right; white-space: nowrap; }
.sw table.sw-t th:first-child, .sw table.sw-t td:first-child { text-align: left; position: sticky; left: 0; z-index: 1; background: var(--sw-surface); }
.sw table.sw-t thead th { font-size: 12px; color: var(--sw-soft); font-weight: 500; }
.sw table.sw-t tfoot td { font-weight: 600; border-bottom: 0; }
.sw table.sw-t .sub2 { display: block; font-size: 12px; color: var(--sw-muted); font-weight: 400; }
.sw-daycard { background: var(--sw-surface); border-radius: 14px; box-shadow: var(--sw-shadow); padding: 16px; margin-bottom: 8px; }
.sw-daycard b { font-size: 15px; }
.sw-daycard dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; margin: 8px 0 0; font-size: 13.5px; }
.sw-daycard dt { color: var(--sw-muted); }
.sw-daycard dd { margin: 0; text-align: right; }
.sw-kept { margin-top: 12px; }
.sw-kept li { margin: 6px 0; font-size: 14px; color: var(--sw-ink-2); }

/* the gate: the review's one primary lives inside it */
.sw-gate { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: var(--sw-s3); padding: 20px 24px; border-radius: var(--sw-r-lg); }
.sw-gate.green { background: var(--sw-ok-wash); } .sw-gate.amber { background: var(--sw-warn-wash); }
.sw-gate.violet { background: var(--sw-accent-wash); } .sw-gate.pink { background: var(--sw-bad-wash); } .sw-gate.grey { background: var(--sw-surface-3); }
.sw-gate b { font-size: 16px; font-weight: 600; display: block; }
.sw-gate p { margin: 4px 0 0; font-size: 14px; color: var(--sw-ink-2); }
.sw-gate .gate-acts { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: 0 0 auto; }
.sw-gate form { display: contents; }
.sw-gate-extra { margin-top: 12px; }

/* ---------- layout switches ---------- */
.sw-only-phone { display: none; }

@media (max-width: 899px) {
  .sw-focus .sw-page { padding: 0 var(--sw-s2) 120px; }
  .sw-topbar { margin: 0 calc(-1 * var(--sw-s2)); padding: var(--sw-s1) var(--sw-s2) 0; }
  .sw-stepper .lbl { display: none; }
}
/* Review stats stay 2 across until 1100px: a 4-across row at 900 to 1050px
   leaves a "$12,345.67" no room inside its card. */
@media (max-width: 1099px) {
  .sw-rv-hero { grid-template-columns: 1fr 1fr; }
  .sw-rv-hero .stat.main { grid-column: 1 / -1; }
}
@media (max-width: 599px) {
  .sw-only-wide { display: none !important; }
  .sw-only-phone { display: block; }
  .sw-stepper { display: none; }
  .sw-progress { display: block; }
  .sw-h { font-size: 22px; }
  .sw-intro { flex-direction: column; align-items: stretch; margin-bottom: var(--sw-s2); }
  /* the one primary becomes a sticky translucent bottom bar */
  .sw-footer {
    left: 0; right: 0; bottom: 0; max-width: none; border-radius: 0; justify-content: flex-end; flex-wrap: wrap;
    padding: 12px var(--sw-s2) calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -1px 0 var(--sw-line);
  }
  /* 2 to 4 buttons share 358px: the secondaries split the first row and may
     wrap their words; the primary always gets its own full-width row (it is
     last in the DOM, so it lands at the bottom, under the thumb) and a long
     label ("Cut Janie's 9 AM to 3 PM shift, save 6 h, $96") wraps, never clips. */
  .sw-footer > .btn { flex: 1 1 0; min-width: 0; white-space: normal; line-height: 1.2; padding: 6px 10px; text-align: center; }
  .sw-footer > .btn.primary { flex: 1 1 100%; }
  /* Review: the gate (head, line, textareas, server error) sits inline at the
     end of the page, not in a fixed bar the iOS keyboard pushes over the
     field. Only the primary stays pinned, and it lets go while a textarea
     has focus. No backdrop-filter here: it would trap the pinned primary. */
  .sw-footer.wide {
    position: static; flex-direction: column-reverse; align-items: stretch; flex-wrap: nowrap;
    margin-top: var(--sw-s3); padding: 0; background: none; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .sw-footer.wide .sw-gate { padding: 16px; }
  .sw-footer.wide > .btn { flex: 0 0 auto; }
  .sw-footer.wide .gate-acts .btn.primary {
    position: fixed; left: var(--sw-s2); right: var(--sw-s2); bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 6;
    white-space: normal; box-shadow: var(--sw-shadow-lift);
  }
  .sw-footer.wide .sw-gate:has(textarea:focus) .btn.primary { position: static; box-shadow: none; }
  .sw-footer .meta { display: none; }
  .sw-focus .yw-sch-toast, .yw-sch-toast[data-mode="step"] { bottom: calc(96px + env(safe-area-inset-bottom)); }
  .sw-summary { flex-direction: column; align-items: stretch; gap: var(--sw-s2); }
  .sw-summary .big { font-size: 28px; }
  .sw-leak { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .sw-leak .cost { text-align: left; }
  .sw-leak .acts .btn.tonal { width: 100%; }
  .sw-reason.inline { display: none; }
  .sw-gate { flex-direction: column; align-items: stretch; }
  .sw-gate .gate-acts { align-items: stretch; }
  .sw-rv-hero { grid-template-columns: 1fr; }
  .sw-daysoff .sw-seg { display: flex; width: 100%; }
  .sw-daysoff .sw-seg button { flex: 1; min-width: 0; padding: 0 4px; }
  .sw-toast { bottom: 96px; max-width: calc(100vw - 32px); }
}
@media (min-width: 600px) {
  /* on desktop the reason sheet is a panel in place, not a sheet */
  .sw-sheet.inline-wide { position: static; border-radius: var(--sw-r); box-shadow: none; animation: none; padding: 0; max-height: none; background: transparent; }
  .sw-scrim.inline-wide { display: none; }
}

@keyframes sw-rise { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes sw-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sw-sheet-in { from { transform: translateY(100%); } to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .sw *, .sw *::before, .sw *::after { animation: none !important; transition: none !important; }
  .sw .btn:active { transform: none; }
}

/* ---------- pass 2, ask 19: the next-step line and Ask the Wizard ----------
   One quiet line under the top bar says what to do next. The copilot is a
   tonal button in the top bar (never a primary) and a sheet: a side sheet
   on a desktop, a bottom sheet on a phone. 44px targets, reduced motion
   handled by the global rule above. */
.sw .sw-next {
  margin: var(--sw-s2) 0 var(--sw-s1); padding: 10px 14px; border-radius: var(--sw-r-sm);
  background: var(--sw-accent-wash); color: var(--sw-accent-ink); font-size: 14.5px; font-weight: 500; line-height: 1.4;
}
.sw-top-acts { display: flex; align-items: center; gap: var(--sw-s1); flex-shrink: 0; }
.sw .btn.sw-ask-btn { min-height: 44px; padding: 0 14px; font-size: 14px; }
.sw .btn.sw-why { padding: 0 8px; }
.sw-ask-scrim { z-index: 80; }
.sw-sheet.sw-ask-sheet { z-index: 81; display: grid; gap: 12px; align-content: start; outline: none; }
.sw-ask-head { display: flex; justify-content: space-between; align-items: center; gap: var(--sw-s1); }
.sw-ask-head h3 { margin: 0; font-size: 17px; font-weight: 600; outline: none; }
.sw-ask-line { margin: 0; font-size: 14.5px; color: var(--sw-ink-2); }
.sw-ask-qs { display: grid; gap: 0; }
.sw-ask-qs .opt { margin-bottom: 6px; min-height: 44px; text-align: left; justify-content: flex-start; font: 500 14.5px var(--sw-font); color: var(--sw-ink); background: var(--sw-surface-2); cursor: pointer; }
.sw-ask-qs .opt.on { background: var(--sw-accent-wash); color: var(--sw-accent-ink); }
.sw-ask-answer { margin: 0; padding: 12px 14px; border-radius: var(--sw-r-sm); background: var(--sw-surface-2); font-size: 14.5px; }
.sw-ask-sec { margin: var(--sw-s1) 0 0; font-size: 13px; font-weight: 600; color: var(--sw-muted); }
.sw-ask-leak { display: grid; gap: 6px; padding: 14px; border-radius: var(--sw-r-sm); background: var(--sw-surface-2); }
.sw-ask-leak p { margin: 0; font-size: 14px; color: var(--sw-ink-2); }
.sw-ask-leak .k { color: var(--sw-muted); }
.sw-ask-leak .btn.fix { justify-self: start; white-space: normal; text-align: left; max-width: 100%; line-height: 1.3; }
.sw-ask-confirm { display: grid; gap: 8px; padding: 12px; border-radius: var(--sw-r-sm); background: var(--sw-surface); box-shadow: inset 0 0 0 1px var(--sw-accent-wash-2); }
.sw-ask-confirm p { margin: 0; font-weight: 500; color: var(--sw-ink); }
.sw-ask-confirm .row-acts { display: flex; gap: var(--sw-s1); justify-content: flex-end; }
.sw-ask-reply p { margin: 8px 0 0; font-size: 14.5px; }
.sw-ask-howto summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--sw-accent-ink); font-weight: 500; }
.sw-ask-toast { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--sw-ok); }
.sw-ask-toast.bad { color: var(--sw-bad); }
@media (min-width: 600px) {
  /* desktop: a side sheet on the right, full height */
  .sw-sheet.sw-ask-sheet {
    left: auto; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); max-height: none;
    border-radius: 20px 0 0 20px; padding: var(--sw-s3);
    animation: sw-side-in .28s var(--sw-ease);
  }
}
@media (max-width: 599px) {
  .sw .btn.sw-ask-btn { padding: 0 10px; font-size: 13.5px; }
  .sw-top-acts { gap: 4px; }
  .sw .sw-next { margin-top: var(--sw-s1); font-size: 14px; }
}
@keyframes sw-side-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) {
  .sw-sheet.sw-ask-sheet, .sw-ask-scrim { animation: none !important; }
}

/* ---------- landing, submission log and week detail (package F screens) ----------
   Roots carry .sw too (tokens), so these read the same light/dark palette. */
.sw.yw-sw-home, .sw.yw-sw-detail { display: grid; gap: var(--sw-s2); max-width: 960px; margin: var(--sw-s2) auto 0; padding: 0 0 var(--sw-s5); }
.yw-sw-hero { background: var(--sw-surface); border-radius: var(--sw-r-lg); box-shadow: var(--sw-shadow); padding: var(--sw-s3); display: grid; gap: 12px; }
.yw-sw-eyebrow { font-size: 13px; color: var(--sw-muted); }
.yw-sw-wkname { margin: 0; font-size: 24px; font-weight: 650; letter-spacing: -.01em; }
.yw-sw-hero-status, .yw-sw-secondary { margin: 0; }
.yw-sw-st { display: inline-flex; align-items: center; min-height: 26px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; background: var(--sw-surface-3); color: var(--sw-ink-2); }
.yw-sw-st-posted { background: var(--sw-ok-wash); color: var(--sw-ok); }
.yw-sw-st-waiting { background: var(--sw-accent-wash); color: var(--sw-accent-ink); }
.yw-sw-st-warned { background: var(--sw-warn-wash); color: var(--sw-warn); }
.yw-sw-st-declined, .yw-sw-st-refused, .yw-sw-st-overdue { background: var(--sw-bad-wash); color: var(--sw-bad); }
.yw-sw-decline-note { margin: 0; padding: 12px 16px; border-radius: var(--sw-r-sm); background: var(--sw-bad-wash); color: var(--sw-ink); }
.yw-sw-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 12px; font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; background: var(--sw-surface-3); color: var(--sw-ink); }
.yw-sw-btn.primary { background: var(--sw-accent); color: var(--sw-on-accent); font-weight: 600; box-shadow: 0 6px 18px rgba(124, 58, 237, .28); }
.yw-sw-btn.primary:hover { background: var(--sw-accent-hover); }
.yw-sw-btn.primary[disabled] { opacity: .55; cursor: not-allowed; box-shadow: none; }
.yw-sw-btn.tonal { background: var(--sw-accent-wash); color: var(--sw-accent-ink); font-weight: 600; }
.yw-sw-btn.quiet { background: transparent; color: var(--sw-accent-ink); }
.yw-sw-btn-hero { min-height: 52px; font-size: 16px; justify-self: start; flex-direction: column; gap: 2px; padding: 8px 24px; }
.yw-sw-btn-sub { font-size: 12.5px; font-weight: 500; opacity: .9; }
.yw-sw-hero-quiet, .yw-sw-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.yw-sw-help, .yw-sw-small { margin: 0; font-size: 13px; color: var(--sw-muted); }
.yw-sw-link { color: var(--sw-accent-ink); min-height: 44px; display: inline-flex; align-items: center; }
.yw-sw-h-sec, .yw-sw-h-page { margin: 0; font-size: 15px; font-weight: 600; }
.yw-sw-h-page { font-size: 22px; }
.yw-sw-alerts, .yw-sw-log, .yw-sw-panel, .yw-sw-stats, .yw-sw-timeline { background: var(--sw-surface); border-radius: var(--sw-r); box-shadow: var(--sw-shadow); padding: var(--sw-s2) 20px; }
.yw-sw-alert-list, .yw-sw-plist, .yw-sw-timeline { list-style: none; margin: 8px 0 0; padding: 0; }
.yw-sw-alert, .yw-sw-plist li, .yw-sw-tl-it { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; border-bottom: 1px solid var(--sw-line-2); }
.yw-sw-alert:last-child, .yw-sw-plist li:last-child, .yw-sw-tl-it:last-child { border-bottom: 0; }
/* 11/15: the GM's "I know, leaving it" under an open gap, full width. */
.yw-sw-alert { flex-wrap: wrap; }
.yw-sw-alert > .yw-sw-small, .yw-sw-ack { flex-basis: 100%; }
.yw-sw-ack { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; }
.yw-sw-input { flex: 1 1 auto; min-width: 0; min-height: 40px; padding: 0 12px; border: 1px solid var(--sw-line); border-radius: var(--sw-r-sm); background: var(--sw-surface); color: var(--sw-ink); font: inherit; font-size: 14px; }
.yw-sw-input:focus-visible { outline: 2px solid var(--sw-focus-ring); outline-offset: 1px; }
.yw-sw-log-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.yw-sw-log-table { margin-top: 8px; }
.yw-sw-logrow { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.4fr) 80px 90px minmax(0, 1.2fr) 16px; align-items: center; gap: 12px; min-height: 52px; border-bottom: 1px solid var(--sw-line-2); color: inherit; text-decoration: none; }
.yw-sw-logrow:last-child { border-bottom: 0; }
.yw-sw-logrow-th { min-height: 36px; font-size: 12.5px; color: var(--sw-muted); }
.yw-sw-log-who { color: var(--sw-muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yw-sw-r { text-align: right; }
.yw-sw-num, .yw-sw-stat-v { font-variant-numeric: tabular-nums; white-space: nowrap; }
.yw-sw-chev { color: var(--sw-soft); }
.yw-sw-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--sw-s2); }
.yw-sw-stat-v { font-size: 22px; font-weight: 650; }
.yw-sw-k { font-size: 12.5px; color: var(--sw-muted); }
.yw-sw-panel-head { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.yw-sw-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.yw-sw-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.yw-sw-table th, .yw-sw-table td { padding: 8px 10px; white-space: nowrap; border-bottom: 1px solid var(--sw-line-2); text-align: left; }
/* week detail: crumb, title row (title left, "Edit this week" right), muted stat sub-lines */
.yw-sw-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--sw-muted); }
.yw-sw-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.yw-sw-sub, .yw-sw-s { font-size: 13px; color: var(--sw-muted); margin: 4px 0 0; }
.yw-sw-stat { min-width: 0; display: grid; gap: 2px; }
.yw-sw-panel-body { display: grid; gap: 8px; }
/* How to edit sheet: mouse and keyboard maps (the sheet may render outside .sw, so tokens carry fallbacks) */
.yw-wz-howto { display: grid; gap: 8px; }
.yw-wz-howto-h { margin: 8px 0 0; font-size: 13px; font-weight: 600; }
.yw-wz-howto-keys { border-collapse: separate; border-spacing: 0 8px; font-size: 14px; }
.yw-wz-howto-keys th { font-weight: 500; text-align: left; }
.yw-wz-howto-keys kbd { display: inline-block; min-width: 24px; margin-right: 4px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--sw-line-2, rgba(127, 127, 127, .35)); background: var(--sw-surface-2, transparent); font: 600 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; text-align: center; }
.yw-wz-howto-foot { margin: 4px 0 0; font-size: 13px; color: var(--sw-muted, inherit); }
@media (max-width: 600px) {
  .sw.yw-sw-home, .sw.yw-sw-detail { padding: 0 16px var(--sw-s5); }
  .yw-sw-hero { padding: var(--sw-s2); }
  .yw-sw-btn-hero { justify-self: stretch; }
  /* log rows fold to two lines on a phone: week + status, then who + labor.
     DOM order is week, who, labor, leaks, status, chevron, so place by area. */
  .yw-sw-logrow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "week status" "who labor"; grid-auto-rows: auto; row-gap: 2px; padding: 8px 0; }
  .yw-sw-logrow-th { display: none; }
  .yw-sw-logrow > :nth-child(4), .yw-sw-logrow > .yw-sw-chev { display: none; }
  .yw-sw-logrow > .yw-sw-log-week { grid-area: week; }
  .yw-sw-logrow > .yw-sw-log-who { grid-area: who; }
  .yw-sw-logrow > :nth-child(3) { grid-area: labor; }
  .yw-sw-logrow > .yw-sw-st { grid-area: status; justify-self: end; }
}

/* 11/15: the start screen's events question and short form. */
.sw-start-events { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.sw-start-events li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: var(--sw-r-sm); background: var(--sw-surface-3); font-size: 14px; }
.sw-start-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 14px; }
.sw-start-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--sw-muted); }
.sw-start-form input, .sw-start-form select { min-height: 40px; border-radius: var(--sw-r-sm); border: 1px solid var(--sw-line, #ddd); background: var(--sw-surface); color: var(--sw-ink); padding: 0 10px; font-size: 15px; }
.sw-start-form .sw-start-check { display: flex; align-items: center; gap: 8px; align-self: end; min-height: 40px; }
.sw-start-form .sw-start-check input { min-height: 0; }
.sw-start-form .choices { grid-column: 1 / -1; }

/* 11/15: the step guardrail list (fix or acknowledge before Next). */
.sw-guard { margin: var(--sw-s3, 24px) 0; padding: var(--sw-s2, 16px); border-radius: var(--sw-r); background: var(--sw-bad-wash); border: 1px solid var(--sw-bad-line); }
.sw-guard > h3 { margin: 0 0 12px; font-size: 15px; color: var(--sw-bad); }

/* This week late with nothing posted (floor live check 11/15). */
.yw-sw-current-late { box-shadow: inset 4px 0 0 var(--sw-bad), var(--sw-shadow); }

/* Schedule Wizard pass 2: Labor's two tabs (ask 18, "cut the tab clutter").
   The Schedule tab's posted week, the labor % line, planned vs actual in a
   week's detail, the Team tab, and the Schedule | Team row as a segmented
   control on a phone. Tokens come from skin/schedule-wizard.css (.sw), which
   defines light and dark; nothing here hard-codes a mode except the floor
   row, which lives outside .sw. No horizontal page scroll at 390 px: wide
   tables scroll inside their own box (.yw-sw-scroll). */

/* ---- the Schedule tab: this week, posted ---- */
.yw-sw-thisweek { margin-top: var(--sw-s3); }
.yw-sw-tw-list { list-style: none; margin: var(--sw-s1) 0 0; padding: 0; border: 1px solid var(--sw-line); border-radius: var(--sw-r); background: var(--sw-surface); }
.yw-sw-tw-row { display: grid; grid-template-columns: minmax(84px, 140px) 1fr auto; gap: var(--sw-s1) var(--sw-s2); align-items: baseline; padding: 10px var(--sw-s2); border-top: 1px solid var(--sw-line-2); }
.yw-sw-tw-row:first-child { border-top: 0; }
.yw-sw-tw-name { color: var(--sw-ink); font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.yw-sw-tw-shifts { display: flex; flex-wrap: wrap; gap: 4px 6px; min-width: 0; }
.yw-sw-tw-shift { padding: 1px 8px; border-radius: 999px; background: var(--sw-accent-wash); color: var(--sw-accent-ink); font-size: 13px; }

/* A demand alert's text column (labor-home.tsx) had no rule: let it take
   the row and wrap beside its Fix it button. */
.yw-sw-alert-body { flex: 1 1 auto; min-width: 0; }

/* ---- the labor % line ---- */
.yw-sw-trend { margin-top: var(--sw-s3); scroll-margin-top: 96px; }
.yw-sw-trend-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px var(--sw-s2); }
.yw-sw-trend-now { color: var(--sw-ink-2); font-size: 13px; }
.yw-sw-trend-svg { display: block; width: 100%; height: 120px; margin-top: var(--sw-s1); border-bottom: 1px solid var(--sw-line); overflow: visible; }
.yw-sw-trend-line { stroke: var(--sw-accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.yw-sw-trend-target { stroke: var(--sw-soft); stroke-width: 1.5; stroke-dasharray: 4 4; }
/* A zero-length line with a round cap is a round dot that does not stretch
   with the plot (preserveAspectRatio="none"). 8 px, ringed in the surface. */
.yw-sw-trend-dot { stroke: var(--sw-accent); stroke-width: 8; stroke-linecap: round; }
.yw-sw-trend-pt[data-over] .yw-sw-trend-dot { stroke: var(--sw-warn); }
.yw-sw-trend-pt:hover .yw-sw-trend-dot { stroke-width: 11; }
.yw-sw-trend-axis { display: flex; justify-content: space-between; gap: var(--sw-s1); margin-top: 4px; color: var(--sw-muted); font-size: 12px; }
.yw-sw-trend-key { display: inline-flex; align-items: center; gap: 6px; }
.yw-sw-trend-key-target { display: inline-block; width: 16px; border-top: 1.5px dashed var(--sw-soft); }

/* ---- a week's detail: planned vs actual ---- */
.yw-sw-pva .yw-sw-table th[scope="row"] { white-space: nowrap; }
/* Open sections (content never folds, 9/21): By person, By day, the Wizard's notes. */
.yw-sw-tabs-section { margin-top: var(--sw-s2); }
.yw-sw-h-sub { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--sw-muted, #6f6a78); }

/* ---- the Team tab ---- */
.yw-sw-team { display: flex; flex-direction: column; gap: var(--sw-s2); }
.yw-sw-team-timeoff { scroll-margin-top: 96px; }
.yw-sw-team-acts { display: flex; justify-content: flex-end; }
.yw-sw-team .yw-sch-rules { scroll-margin-top: 96px; }
.yw-sch-team-grp[data-group="sales"] td { color: var(--sw-ink-2); }

/* ---- the classic grid with the wizard on: no KPI table above it ---- */
.yw-schedule[data-wizard-on] .yw-sch-facts { display: none; }

/* ---- phone ---- */
@media (max-width: 640px) {
  /* Schedule | Team as a segmented control. 44px tall: the phone tap-target rule (follow-up 11/15, today-17). */
  body:has(.yw-sw-home, .yw-sw-team, .yw-sw-detail) .yw-floor-subtabs {
    gap: 0; margin: 4px 0 0; padding: 2px; border-radius: 10px; background: #efedf2;
  }
  body:has(.yw-sw-home, .yw-sw-team, .yw-sw-detail) .yw-floor-subtab {
    flex: 1 1 0; min-height: 44px; display: flex; align-items: center; justify-content: center;
    border: 0; border-radius: 8px; color: #4a4652; font-weight: 500;
  }
  body:has(.yw-sw-home, .yw-sw-team, .yw-sw-detail) .yw-floor-subtab[aria-current="page"] {
    background: #fff; color: #1d1b22; box-shadow: 0 1px 2px rgba(30, 20, 50, .12);
  }
  [data-theme-root].dark:has(.yw-sw-home, .yw-sw-team, .yw-sw-detail) .yw-floor-subtabs { background: #1b2436; }
  [data-theme-root].dark:has(.yw-sw-home, .yw-sw-team, .yw-sw-detail) .yw-floor-subtab { color: #d8deea; }
  [data-theme-root].dark:has(.yw-sw-home, .yw-sw-team, .yw-sw-detail) .yw-floor-subtab[aria-current="page"] { background: #0F172A; color: #FAFAFA; }

  /* This week's rows as cards: name and hours on one line, shifts under. */
  .yw-sw-tw-row { grid-template-columns: 1fr auto; }
  .yw-sw-tw-shifts { grid-column: 1 / -1; order: 3; }
  .yw-sw-trend-svg { height: 96px; }
  .yw-sw-team .yw-sch-scroll { max-width: 100%; overflow-x: auto; }
}

/* Settings on the Dashboard's design (10/15, owner: "re design the settings
   tab with the new design style ... the header with the tab selector, and
   fonts and font sizes, buttons, containers ... no ai slop explainative
   text").

   The page root is .yw-settings-page (settings/page.tsx). This file holds the
   shared base every section wears; each section's own look lives beside it
   (settings-general.css, settings-targets.css, settings-connections.css,
   settings-people.css).

   The vocabulary, the same one the Floor's settings use:
     .yw-card + CardHead (kit)        one card per subject, title 19px/500
     .yw-set-rows / .yw-set-row       label left, value or control right,
                                      hairlines between (the Dashboard's rows)
     .yw-field / .yw-field-label      a labelled input (floor-settings.css)
     .yw-set-btn                      the one primary action of a card
     .yw-set-btn[data-variant=quiet]  an outlined secondary action
     .yw-set-link                     a text action ("Edit", "Invite")
     .yw-set-danger                   a destructive text action
     InfoDot                          any explanation, never a paragraph */

.yw-settings-page { display: flex; flex-direction: column; gap: 16px; margin-top: 18px; color: #202024; font-family: var(--font-geist-sans), Geist, system-ui, sans-serif; font-size: 14px; letter-spacing: -.25px; }
.yw-settings-page :is(.font-bold, .font-extrabold, .font-black) { font-weight: 500; }
.yw-settings-page .font-semibold { font-weight: 500; }
.yw-settings-page .uppercase { color: #929097; font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; }

/* Rows: the Dashboard's label and value with a hairline between. */
.yw-set-rows { display: flex; flex-direction: column; margin: 4px 0 0; padding: 0; list-style: none; }
.yw-set-row { display: flex; min-height: 46px; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid #eae8ec; }
.yw-set-row:first-child { border-top: 0; }
.yw-set-row-label { display: inline-flex; min-width: 0; align-items: center; gap: 6px; color: #59535f; font-size: 14px; }
.yw-set-row-sub { display: block; margin-top: 2px; color: #929097; font-size: 12px; }
.yw-set-row-value { min-width: 0; color: #202024; font-size: 14px; font-variant-numeric: tabular-nums; text-align: right; }
.yw-set-row-value[data-quiet] { color: #929097; }
.yw-set-row-value[data-tone="ok"] { color: #279876; }
.yw-set-row-value[data-tone="warn"] { color: #b7791f; }
.yw-set-row-value[data-tone="bad"] { color: #c85f84; }

/* Actions. */
.yw-set-btn { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; gap: 6px; padding: 0 14px; border: 0; border-radius: 10px; background: #7c3aed; color: #fff; font: inherit; font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .16s, border-color .16s; }
.yw-set-btn:hover { background: #6d28d9; }
.yw-set-btn:disabled { opacity: .5; cursor: default; }
.yw-set-btn:is([data-variant="quiet"], .yw-set-btn-quiet) { border: 1px solid #e2e1e4; background: #fff; color: #202024; }
.yw-set-btn:is([data-variant="quiet"], .yw-set-btn-quiet):hover { border-color: #d5c4e6; background: #f8f5fb; }
.yw-set-btn:focus-visible, .yw-set-link:focus-visible, .yw-set-danger:focus-visible { outline: 2px solid #b993ff; outline-offset: 2px; }
.yw-set-link { padding: 0; border: 0; background: none; color: #8553c2; font: inherit; font-size: 13px; text-decoration: none; cursor: pointer; }
.yw-set-link:hover { text-decoration: underline; }
.yw-set-danger { padding: 0; border: 0; background: none; color: #c85f84; font: inherit; font-size: 13px; cursor: pointer; }
.yw-set-danger:hover { text-decoration: underline; }
.yw-set-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 14px; }

/* Cards in two columns on a wide screen, one on a narrow one. Each column
   is a stack (10/15, owner: "check every container is organized and in
   correct layout without those empty spaces"): a short card sits right under
   the one above it instead of waiting for the tall card beside it to end, so
   no row leaves a hole. A card never splits across the columns; [data-wide]
   spans both. */
.yw-set-grid { columns: 2; column-gap: 16px; }
.yw-set-grid > * { break-inside: avoid; }
.yw-set-grid > * + * { margin-top: 16px; }
.yw-set-grid > [data-wide] { column-span: all; margin-bottom: 16px; }
.yw-set-grid > [data-wide] + * { margin-top: 0; }
.yw-set-grid > [data-wide]:last-child, .yw-set-grid:has(> [data-fill]) > [data-wide] { margin-bottom: 0; }
@media (max-width: 900px) { .yw-set-grid { columns: 1; } }

/* A long list beside a shorter card ([data-fill]: Targets beside Expense
   flags, Channels beside Identity): the two end on one line and the list
   scrolls inside the height its neighbour sets (never shorter than a few
   rows), so neither card leaves a gap under it. */
.yw-set-grid:has(> [data-fill]) { display: grid; gap: 16px; columns: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.yw-set-grid:has(> [data-fill]) > * + * { margin-top: 0; }
.yw-set-grid:has(> [data-fill]) > [data-wide] { grid-column: 1 / -1; }
.yw-set-grid > [data-fill] { display: flex; flex-direction: column; }
.yw-settings-page .yw-set-grid > [data-fill] > :is(.yw-set-groups, .yw-tasks-scroll) { flex: 1 1 0; min-height: 300px; max-height: none; }
@media (max-width: 900px) {
  .yw-set-grid:has(> [data-fill]) { grid-template-columns: minmax(0, 1fr); }
  .yw-settings-page .yw-set-grid > [data-fill] > :is(.yw-set-groups, .yw-tasks-scroll) { flex: none; max-height: min(62vh, 560px); }
}

/* A card that is only a question and its answers (the plan basis): the
   answers sit on the title line, not alone on a row of their own. */
.yw-settings-page .yw-card:has(> .yw-card-head + .yw-set-actions:last-child) { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.yw-settings-page .yw-card:has(> .yw-card-head + .yw-set-actions:last-child) > .yw-set-actions { margin-top: 0; }

/* Dark theme. */
[data-theme-root].dark .yw-settings-page { color: #f3eef8; }
[data-theme-root].dark .yw-set-row { border-color: #34303c; }
[data-theme-root].dark .yw-set-row-label { color: #c3b9cc; }
[data-theme-root].dark :is(.yw-set-row-value, .yw-set-btn[data-variant="quiet"]) { color: #f3eef8; }
[data-theme-root].dark .yw-set-btn:is([data-variant="quiet"], .yw-set-btn-quiet) { border-color: #3c3746; background: #26232c; color: #f3eef8; }
[data-theme-root].dark .yw-set-link { color: #c9b1ff; }

/* Long lists scroll inside their card (10/15, owner: "you are forgetting the
   integrated scroller on containers that get too long"): the Targets groups,
   the expense flags, booking and revenue sources, any list of rows. A short
   list never reaches the cap, so it looks the same. */
.yw-settings-page :is(.yw-set-groups, .yw-set-vars, .yw-card > .yw-set-rows, .yw-card > form > .yw-set-rows) { max-height: min(62vh, 560px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #dcd7e0 transparent; }
[data-theme-root].dark .yw-settings-page :is(.yw-set-groups, .yw-set-vars, .yw-card > .yw-set-rows, .yw-card > form > .yw-set-rows) { scrollbar-color: #4d4855 transparent; }

/* Settings, general and property (10/15): this section's own look on the
   shared base (settings.css). General is the account-panel.tsx cards; Property
   is PropertyControls.tsx, the cards settings/page.tsx renders under
   tab === "properties", sellable-rooms-card.tsx and rooms-card.tsx.

   What this file adds to the base:
     .yw-set-cols / .yw-set-col     two stacked columns of cards (General)
     .yw-set-fields                 the labelled inputs of a form (Field)
     .yw-set-input / .yw-set-select one box for a typed value or a pick
     .yw-set-inline                 a short form on one line inside a row
     .yw-set-line                   a card's one form line: the pick, then Save
     .yw-set-note                   one line after a save, or what is missing
     .yw-set-seg                    the light/dark switch
     .yw-set-scope                  the property switcher above the cards
     .yw-set-reveal                 a row that opens a short form under it
     .yw-set-disconnect             the quiet Disconnect at the foot of Property */

/* Two columns, each a stack of cards, so a tall card never leaves a hole. */
.yw-set-cols { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.yw-set-col { display: flex; min-width: 0; flex-direction: column; gap: 16px; }
@media (max-width: 900px) { .yw-set-cols { grid-template-columns: minmax(0, 1fr); } }

/* A form's labelled inputs. Field (ui-client) prints a label, a span and an
   input; these rules give them the Floor's field look. */
.yw-set-fields { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 14px; }
.yw-set-fields[data-cols="1"] { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 560px) { .yw-set-fields { grid-template-columns: minmax(0, 1fr); } }
.yw-set-fields label > span:first-child { display: block; color: #87818c; font-size: 12px; font-weight: 400; }
.yw-set-fields label input:not([type="hidden"]) { width: 100%; min-height: 34px; margin-top: 5px; padding: 0 10px; border: 1px solid #e2e1e4; border-radius: 10px; background: #fff; color: #202024; font: inherit; font-size: 13px; }
.yw-set-fields label input:not([type="hidden"]):focus { border-color: #b993ff; outline: none; box-shadow: 0 0 0 3px rgba(185, 147, 255, .22); }
.yw-set-form > [role="alert"], .yw-set-form > [role="status"] { margin-top: 10px; font-size: 13px; font-weight: 400; }
.yw-set-form + .yw-set-rows { margin-top: 10px; }
.yw-set-rows[data-foot] { margin-top: 14px; border-top: 1px solid #eae8ec; }

/* One box for a typed value or a pick. */
.yw-set-input { min-height: 34px; min-width: 0; padding: 0 10px; border: 1px solid #e2e1e4; border-radius: 10px; background: #fff; color: #202024; font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; }
.yw-set-input[data-size="s"] { width: 84px; }
.yw-set-input[data-size="m"] { width: 150px; }
.yw-set-input[data-size="l"] { width: 100%; }
/* A quiet button for a component that takes only a className
   (DirtyPendingButton): the same look as .yw-set-btn[data-variant=quiet]. */
.yw-set-btn.yw-set-btn-quiet { border: 1px solid #e2e1e4; background: #fff; color: #202024; }
.yw-set-btn.yw-set-btn-quiet:hover { border-color: #d5c4e6; background: #f8f5fb; }
.yw-set-btn.yw-set-btn-quiet > span { border-color: #d5c4e6; border-top-color: #7c3aed; }
.yw-set-select { min-height: 34px; max-width: 100%; padding: 0 30px 0 10px; border: 1px solid #e2e1e4; border-radius: 10px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238d8595' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 12px; color: #202024; font: inherit; font-size: 13px; appearance: none; cursor: pointer; }
:is(.yw-set-input, .yw-set-select):focus { border-color: #b993ff; outline: none; box-shadow: 0 0 0 3px rgba(185, 147, 255, .22); }
.yw-set-unit { position: relative; display: inline-flex; align-items: center; }
.yw-set-unit > .yw-set-input { padding-right: 24px; }
.yw-set-unit > span { position: absolute; right: 10px; color: #929097; font-size: 13px; pointer-events: none; }

/* A short form on one line inside a row (the box, then its Save). */
.yw-set-inline { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin: 0; }
.yw-set-row-acts { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 12px; }
.yw-set-row-acts > form { margin: 0; }
.yw-set-row[data-wrap] { flex-wrap: wrap; }
.yw-set-row-main { display: flex; min-width: 0; flex-direction: column; }

/* A card's one form line: the pick fills the width, Save sits after it. */
.yw-set-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 0; }
.yw-set-line > .yw-set-select, .yw-set-line > .yw-set-input { flex: 1 1 220px; }

/* One line after a save, or a missing answer. Ink by default; the tone is the
   status it reports. */
.yw-set-note { margin: 10px 0 0; color: #59535f; font-size: 13px; line-height: 1.45; }
.yw-set-note[data-tone="ok"] { color: #279876; }
.yw-set-note[data-tone="warn"] { color: #b7791f; }
.yw-set-note[data-tone="bad"] { color: #c85f84; }

/* Light or dark. The pressed side is ink on a soft grey, never violet. */
.yw-set-seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid #e2e1e4; border-radius: 10px; background: #fff; }
.yw-set-seg > button { display: inline-flex; min-height: 28px; align-items: center; gap: 6px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: #87818c; font: inherit; font-size: 13px; cursor: pointer; transition: background .16s, color .16s; }
.yw-set-seg > button:hover { color: #202024; }
.yw-set-seg > button[aria-pressed="true"] { background: #f1eff3; color: #202024; }
.yw-set-seg > button:focus-visible { outline: 2px solid #b993ff; outline-offset: 1px; }
.yw-set-seg svg { width: 14px; height: 14px; }

/* The property switcher: the property's name (or a pick of them) and Add. */
.yw-set-scope { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.yw-set-scope-name { display: inline-flex; min-width: 0; align-items: center; gap: 10px; color: #202024; font-size: 14px; font-weight: 500; }
.yw-set-scope-wait { color: #929097; font-size: 12px; font-weight: 400; }

/* A row that opens a short form under it (Replace key). */
.yw-set-reveal { border-top: 1px solid #eae8ec; }
.yw-set-reveal > summary { list-style: none; cursor: pointer; border-top: 0; }
.yw-set-reveal > summary::-webkit-details-marker { display: none; }
.yw-set-reveal[open] > summary .yw-set-btn { border-color: #d5c4e6; background: #f8f5fb; }
.yw-set-reveal-body { padding: 4px 0 14px; }

/* Your rooms: the roster scrolls inside its card. */
.yw-set-rooms-list { max-height: 420px; margin: 8px 0 0; padding: 0; overflow-y: auto; list-style: none; }
.yw-set-room { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 9px 0; border-top: 1px solid #eae8ec; }
.yw-set-room:first-child { border-top: 0; }
.yw-set-room-no { min-width: 3.5rem; color: #202024; font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.yw-set-room-type { min-width: 8rem; flex: 1 1 8rem; overflow: hidden; color: #59535f; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.yw-set-room-fact { min-width: 6.5rem; color: #929097; font-size: 12px; font-variant-numeric: tabular-nums; }
.yw-set-room-why { min-width: 6rem; flex: 1 1 7rem; overflow: hidden; color: #929097; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.yw-set-room-tags { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.yw-set-tag { display: inline-flex; min-height: 28px; align-items: center; padding: 0 10px; border: 1px solid #e2e1e4; border-radius: 9px; background: #fff; color: #59535f; font: inherit; font-size: 12px; cursor: pointer; transition: background .16s, border-color .16s; }
.yw-set-tag:hover { border-color: #d5c4e6; background: #f8f5fb; }
.yw-set-tag[aria-pressed="true"] { border-color: #cfc9d6; background: #f1eff3; color: #202024; }

/* Rooms over time: a step per line. */
.yw-set-steps { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 0; }
.yw-set-step { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: #929097; font-size: 12px; }

/* Management fees: one line per managed property. */
.yw-set-fee { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin: 0; padding: 12px 0; border-top: 1px solid #eae8ec; }
.yw-set-fee:first-child { border-top: 0; }
.yw-set-fee-name { display: flex; min-width: 10rem; flex: 1 1 10rem; flex-direction: column; align-self: center; }
.yw-set-fee-title { color: #202024; font-size: 14px; font-weight: 500; }
.yw-set-input[data-upper] { text-transform: uppercase; }
.yw-set-fee .yw-field > input { width: 104px; }

/* Disconnect: quiet red words at the foot; it opens into a card. */
.yw-set-disconnect { align-self: flex-start; }
.yw-set-disconnect > summary { list-style: none; }
.yw-set-disconnect > summary::-webkit-details-marker { display: none; }
.yw-set-disconnect[open] { align-self: stretch; padding: 23px; border: 1px solid #e2e1e4; border-radius: 24px; background: #fbfbfb; }
.yw-set-disconnect-body { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.yw-set-disconnect-body label { display: flex; align-items: flex-start; gap: 8px; color: #59535f; font-size: 13px; }
.yw-set-disconnect-body input[type="checkbox"] { margin-top: 3px; accent-color: #c85f84; }
.yw-set-disconnect-go { border: 1px solid #ecc6d5; background: #fff; color: #c85f84; }
.yw-set-disconnect-go:hover { border-color: #c85f84; background: #fdf3f7; }

/* Dark theme. */
[data-theme-root].dark .yw-set-fields label > span:first-child { color: #a297ab; }
[data-theme-root].dark :is(.yw-set-fields label input:not([type="hidden"]), .yw-set-input, .yw-set-select, .yw-set-seg, .yw-set-tag) { border-color: #1c2843; background-color: #0b1122; color: #f3eef8; }
[data-theme-root].dark .yw-set-seg > button { color: #a297ab; }
[data-theme-root].dark .yw-set-seg > button[aria-pressed="true"], [data-theme-root].dark .yw-set-tag[aria-pressed="true"] { background: #1c2843; color: #f3eef8; }
[data-theme-root].dark :is(.yw-set-note, .yw-set-room-type, .yw-set-disconnect-body label) { color: #c3b9cc; }
[data-theme-root].dark :is(.yw-set-room-no, .yw-set-scope-name, .yw-set-fee-title) { color: #f3eef8; }
[data-theme-root].dark :is(.yw-set-reveal, .yw-set-room, .yw-set-fee, .yw-set-rows[data-foot]) { border-color: #1c2843; }
[data-theme-root].dark .yw-set-disconnect[open] { border-color: #1c2843; background: #0d1527; }
[data-theme-root].dark .yw-set-disconnect-go { border-color: #4a3040; background: #0b1122; }
[data-theme-root].dark .yw-set-btn.yw-set-btn-quiet { border-color: #3c3746; background: #26232c; color: #f3eef8; }

/* Settings, targets (10/15): this section's own look on the shared base (settings.css).

   Covers the Targets tab (targets-panel.tsx, targets-readonly.tsx,
   revenue-sources-card.tsx, booking-sources-card.tsx, the plan grid's
   chrome in plan-grid.tsx), the Finish setup tab (setup-leftover.tsx) and
   the Finish next bar every Settings tab wears (setup-bar.tsx).

     .yw-set-groups / .yw-set-group   the Targets card's groups, each a grey
                                      name (a link to its part of the editor)
                                      over label / value rows
     .yw-set-vars / .yw-set-var       a setting: label left, control right,
                                      hairline above; caption lines under it
     .yw-set-num                      a number field with its unit
     .yw-set-tag                      the quiet "Yours"
     .yw-set-saved / .yw-set-note     the one-line flash and a plain sentence
   Light rules first, the dark twins at the foot. */

/* ---------------------------------------------------- Finish next bar -- */
/* Sits above the section body (outside .yw-settings-page), so it sets its
   own type. */
.yw-set-setupbar { position: sticky; top: 64px; z-index: 20; margin-top: 18px; padding: 9px 14px; border: 1px solid #e2e1e4; border-radius: 14px; background: #fff; color: #202024; font-family: var(--font-geist-sans), Geist, system-ui, sans-serif; font-size: 13px; letter-spacing: -.25px; }
@media (min-width: 1024px) { .yw-set-setupbar { top: 0; } }
.yw-set-setupbar-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.yw-set-setupbar-count { color: #929097; font-size: 12px; }
.yw-set-setupbar-next { color: #59535f; }
.yw-set-setupbar .yw-set-link { font-size: 13px; }
.yw-set-setupbar-arrow { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 1px solid #e4e2e6; border-radius: 50%; color: #59535f; font-size: 14px; line-height: 1; text-decoration: none; transition: background .16s; }
.yw-set-setupbar-arrow:hover { background: #f4f2f6; color: #202024; }
.yw-set-setupbar-arrow:focus-visible { outline: 2px solid #b993ff; outline-offset: 2px; }
.yw-set-setupbar-missing { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 0; padding: 0; list-style: none; }
.yw-set-setupbar-missing .yw-set-link { font-size: 12px; }

/* ----------------------------------------------------- Targets card -- */
.yw-set-groups { display: flex; flex-direction: column; gap: 14px; margin-top: 10px; }
.yw-set-group-head { display: inline-block; margin-bottom: 2px; color: #929097; font-size: 12px; text-decoration: none; }
.yw-set-group-head:hover { color: #8553c2; }
.yw-set-group-head:focus-visible { outline: 2px solid #b993ff; outline-offset: 2px; }
.yw-set-group .yw-set-rows { margin: 0; }
.yw-set-group .yw-set-row { min-height: 40px; padding: 7px 0; }
.yw-set-group .yw-set-row:first-child { border-top: 1px solid #eae8ec; }

/* --------------------------------------------- settings rows (forms) -- */
.yw-settings-page .yw-card-title .hw-info-label { color: inherit; font-size: inherit; font-weight: inherit; letter-spacing: inherit; }
.yw-set-row-label .hw-info-label { color: inherit; font-size: inherit; }
.yw-set-vars { display: flex; flex-direction: column; margin-top: 8px; }
.yw-set-var { margin: 0; padding: 9px 0; border-top: 1px solid #eae8ec; }
.yw-set-vars > .yw-set-var:first-child, .yw-set-vars > .yw-set-subhead:first-child + .yw-set-var { border-top: 0; }
.yw-set-var-main { display: flex; min-height: 30px; align-items: center; justify-content: space-between; gap: 12px; }
.yw-set-var-ctl { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: flex-end; gap: 10px; margin: 0; padding: 0; border: 0; min-width: 0; }
.yw-set-var-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 4px; color: #929097; font-size: 12px; }
.yw-set-subhead { margin: 0; padding: 14px 0 4px; border-top: 1px solid #eae8ec; color: #929097; font-size: 12px; }
.yw-set-vars > .yw-set-subhead:first-child { padding-top: 4px; border-top: 0; }
.yw-set-subhead + .yw-set-var { border-top: 0; }
.yw-set-tag { color: #929097; font-size: 12px; }
.yw-set-row-sub[data-tone="bad"] { color: #c85f84; }
.yw-set-followup { margin: 0; padding-top: 12px; margin-top: 14px; border-top: 1px solid #eae8ec; }
.yw-set-followup .yw-set-actions { margin-top: 0; }

/* A number with its unit. Default lives in the placeholder (grey); the
   owner's own value reads in ink (data-mine). */
.yw-set-num { display: inline-flex; align-items: center; gap: 6px; color: #929097; font-size: 12px; }
.yw-set-num input { width: 96px; min-height: 32px; padding: 0 10px; border: 1px solid #e2e1e4; border-radius: 10px; background: #fff; color: #87818c; font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; }
.yw-set-num input[data-mine] { color: #202024; }
.yw-set-num input::placeholder { color: #b5b0ba; }
:is(.yw-set-num input, .yw-set-mini):focus { border-color: #b993ff; outline: none; box-shadow: 0 0 0 3px rgba(185, 147, 255, .22); }

/* A small field inside a caption line (a date, a month, a percent). */
.yw-set-mini { min-height: 28px; padding: 0 8px; border: 1px solid #e2e1e4; border-radius: 8px; background: #fff; color: #202024; font: inherit; font-size: 12px; font-variant-numeric: tabular-nums; }
.yw-set-mini[data-size="pct"] { width: 56px; text-align: right; }
.yw-set-mini[data-size="month"] { width: 150px; }

/* A checkbox or radio and its words on one line. */
.yw-set-check { width: 16px; height: 16px; flex-shrink: 0; margin: 0; accent-color: #7c3aed; cursor: pointer; }
.yw-set-inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: #59535f; font-size: 12px; cursor: pointer; }
.yw-set-inline[data-size="row"] { color: inherit; font-size: 14px; }
.yw-set-inline input[type="radio"] { margin: 0; accent-color: #7c3aed; }

/* The submit wrapper (SubmitButton draws its own button). */
.yw-set-submit { display: inline-flex; }
.yw-set-submit[data-variant="quiet"] .yw-set-btn { border: 1px solid #e2e1e4; background: #fff; color: #202024; }
.yw-set-submit[data-variant="quiet"] .yw-set-btn:hover { border-color: #d5c4e6; background: #f8f5fb; }

.yw-set-saved { margin: 8px 0 0; color: #279876; font-size: 12px; }
.yw-set-note { margin: 12px 0 0; color: #59535f; font-size: 13px; line-height: 1.5; }

/* ------------------------------------------------------ investor plan -- */
.yw-set-ip-name { max-width: 360px; }
.yw-set-ip-months { display: grid; gap: 10px; margin-top: 14px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1100px) { .yw-set-ip-months { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px) { .yw-set-ip-months { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ------------------------------------------------ the plan grid chrome -- */
.yw-set-plan form { margin-top: 14px; }
/* The room and total plans side by side (10/20). */
.yw-set-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; }
.yw-set-plans > .yw-set-plan { min-width: 0; margin: 0; }
@media (max-width: 1100px) { .yw-set-plans { grid-template-columns: minmax(0, 1fr); } }
.yw-set-years { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.yw-set-years-seg { display: inline-flex; padding: 3px; border: 1px solid #e2e1e4; border-radius: 10px; background: #fff; }
.yw-set-years-seg > button { min-height: 28px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: #87818c; font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; cursor: pointer; }
.yw-set-years-seg > button:hover { color: #202024; }
.yw-set-years-seg > button[data-active] { background: #f1ecf7; color: #202024; font-weight: 500; }
.yw-set-years-seg > button:focus-visible { outline: 2px solid #b993ff; outline-offset: 1px; }
.yw-set-years-total { color: #202024; font-size: 13px; }
.yw-set-fold { margin-top: 12px; border-top: 1px solid #eae8ec; }
.yw-set-fold + .yw-set-fold, .yw-set-fold:last-child { border-bottom: 1px solid #eae8ec; }
.yw-set-fold-head { display: flex; min-height: 42px; align-items: center; gap: 8px; list-style: none; cursor: pointer; }
.yw-set-fold-head .yw-set-row-sub { margin-top: 0; }
.yw-set-fold-head [aria-hidden] { margin-left: auto; color: #929097; transition: transform .16s; }
.yw-set-fold[open] .yw-set-fold-head [aria-hidden] { transform: rotate(180deg); }
.yw-set-choices { display: flex; flex-direction: column; margin-top: 12px; }
.yw-set-choices > .yw-set-row-sub { margin: 0 0 4px; }
.yw-set-choice { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 0; border: 0; border-top: 1px solid #eae8ec; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.yw-set-choice:hover .yw-set-row-label { color: #8553c2; }
.yw-set-choice:focus-visible { outline: 2px solid #b993ff; outline-offset: 2px; }

/* The plan cards' type (10/20, owner: "these 2 use a dfifferent fornt form
   the one used in the new design"). plan-grid.tsx still carries the old
   Tailwind sizes (10 and 11px caps, zinc greys, semibold); inside the plan
   cards they take the new design's: 12px captions in #929097, 13.5px rows
   in ink, weight 500 at most, no caps, the Settings inputs. */
.yw-set-plan :is(.text-xs) { font-size: 13px; }
.yw-set-plan :is(.text-\[11px\], .text-\[10px\]) { font-size: 12px; }
.yw-set-plan :is(.uppercase) { letter-spacing: 0; text-transform: none; }
.yw-set-plan :is(.font-semibold) { font-weight: 500; }
.yw-set-plan .text-zinc-300 { color: #b9b3c0; }
.yw-set-plan .text-zinc-400 { color: #929097; }
.yw-set-plan .text-zinc-500 { color: #77717d; }
.yw-set-plan .text-zinc-600 { color: #59535f; }
.yw-set-plan :is(.text-zinc-700, .text-zinc-800) { color: #202024; }
.yw-set-plan .yw-plan-head { color: #929097; font-size: 12px; font-weight: 400; }
.yw-set-plan .yw-plan-row { font-size: 13.5px; letter-spacing: -.2px; }
.yw-set-plan .yw-plan-row > span:first-child { color: #59535f; }
.yw-set-plan .yw-plan-row > span:first-child[data-pre] { color: #b9b3c0; }
.yw-set-plan .yw-plan-row input { box-sizing: border-box; height: 36px; border-color: #e2e1e4; border-radius: 9px; background: #fff; color: #202024; font: inherit; font-size: 13.5px; }
.yw-set-plan .yw-plan-row input:focus { border-color: #b993ff; box-shadow: 0 0 0 3px rgba(185, 147, 255, .22); }
.yw-set-plan .yw-plan-row input[data-plan-locked] { background: #f7f6f9; color: #59535f; }
.yw-set-plan .yw-plan-row input::placeholder { color: #b9b3c0; }

/* ----------------------------------------------------------- dark twins -- */
[data-theme-root].dark .yw-set-plan .text-zinc-300 { color: #6f6a7c; }
[data-theme-root].dark .yw-set-plan :is(.text-zinc-400, .yw-plan-head) { color: #a297ab; }
[data-theme-root].dark .yw-set-plan :is(.text-zinc-500, .text-zinc-600, .yw-plan-row > span:first-child) { color: #c3b9cc; }
[data-theme-root].dark .yw-set-plan :is(.text-zinc-700, .text-zinc-800) { color: #f3eef8; }
[data-theme-root].dark .yw-set-plan .yw-plan-row input { border-color: #3c3746; background: #26232c; color: #f3eef8; }
[data-theme-root].dark .yw-set-plan .yw-plan-row input[data-plan-locked] { background: #1f1c24; color: #c3b9cc; }
[data-theme-root].dark .yw-set-setupbar { border-color: #3c3746; background: #1f1c24; color: #f3eef8; }
[data-theme-root].dark .yw-set-setupbar-next { color: #c3b9cc; }
[data-theme-root].dark .yw-set-setupbar-arrow { border-color: #3c3746; color: #c3b9cc; }
[data-theme-root].dark .yw-set-setupbar-arrow:hover { background: #2a2631; color: #f3eef8; }
[data-theme-root].dark :is(.yw-set-var, .yw-set-subhead, .yw-set-followup, .yw-set-fold, .yw-set-choice, .yw-set-group .yw-set-row:first-child) { border-color: #34303c; }
[data-theme-root].dark .yw-set-fold:last-child { border-bottom-color: #34303c; }
[data-theme-root].dark :is(.yw-set-num input, .yw-set-mini, .yw-set-years-seg) { border-color: #3c3746; background: #26232c; color: #c3b9cc; }
[data-theme-root].dark .yw-set-num input[data-mine], [data-theme-root].dark .yw-set-mini { color: #f3eef8; }
[data-theme-root].dark .yw-set-years-seg > button[data-active] { background: #3a2f4d; color: #f3eef8; }
[data-theme-root].dark :is(.yw-set-years-total) { color: #f3eef8; }
[data-theme-root].dark :is(.yw-set-inline, .yw-set-note) { color: #c3b9cc; }
[data-theme-root].dark .yw-set-submit[data-variant="quiet"] .yw-set-btn { border-color: #3c3746; background: #26232c; color: #f3eef8; }
[data-theme-root].dark .yw-set-group-head:hover, [data-theme-root].dark .yw-set-choice:hover .yw-set-row-label { color: #c9b1ff; }

