/* ==================================================================
   Kathará — Swiss grid, Athens edition
   Ink on whitewash. One signal colour (Aegean blue). Rules, not cards.
   Commissioner (a Greek-designed grotesque) for text, IBM Plex Mono
   for every number. Square corners. Motion: one page entrance.
   ================================================================== */

:root {
  --paper: #f7f6f3;
  --paper-2: #efeeea;
  --ink: #111111;
  --ink-2: #2f3437;
  --muted: #787774;
  --faint: #a5a4a0;
  --rule: #eaeaea;
  --hair: #eaeaea;
  --hair-2: #f0efec;
  --blue: #1f6c9f;
  --blue-ink: #185a85;
  --blue-wash: #e1f3fe;
  --sand: #956400;
  --sand-wash: #fbf3db;
  --red: #9f2f2d;
  --red-wash: #fdebec;
  --green: #346538;
  --on-ink: #ffffff;
  /* wayfinding marks in the nav; the only place these colours appear */
  --c-overview: #141414;
  --c-calendar: #1e6fa8;
  --c-turnovers: #a8782f;
  --c-properties: #2d7a5a;
  --c-cleaners: #6a4bbf;
  --c-money: #1a7f7a;
  --font: "Commissioner", "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", Menlo, Consolas, monospace;
  --r: 6px;
  --r-card: 10px;
  --surface: #ffffff;
  --t: 120ms;
  --ease: cubic-bezier(.3, .7, .3, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #191918; --paper-2: #222221; --ink: #ededec; --ink-2: #c9c8c4; --muted: #9b9a97; --faint: #5f5e5b;
  --rule: #2f2f2d; --hair: #2f2f2d; --hair-2: #262625;
  --blue: #6fb3e0; --blue-ink: #93c7ea; --blue-wash: #1b2e3b; --sand: #d9b25e; --sand-wash: #332a16; --red: #ea8b86; --red-wash: #3a2324; --green: #8fc494;
  --on-ink: #191918;
  --c-overview: #ecebe6; --c-calendar: #5fa5dd; --c-turnovers: #d0a04a; --c-properties: #5cbf95; --c-cleaners: #a892ff; --c-money: #4fc3bd;
  --surface: #202020;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #191918; --paper-2: #222221; --ink: #ededec; --ink-2: #c9c8c4; --muted: #9b9a97; --faint: #5f5e5b;
    --rule: #2f2f2d; --hair: #2f2f2d; --hair-2: #262625;
    --blue: #6fb3e0; --blue-ink: #93c7ea; --blue-wash: #1b2e3b; --sand: #d9b25e; --sand-wash: #332a16; --red: #ea8b86; --red-wash: #3a2324; --green: #8fc494;
    --on-ink: #191918;
    --c-overview: #ecebe6; --c-calendar: #5fa5dd; --c-turnovers: #d0a04a; --c-properties: #5cbf95; --c-cleaners: #a892ff; --c-money: #4fc3bd;
    --surface: #202020;
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; font-weight: 400;
  color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum";
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
::selection { background: var(--blue-wash); }
.num, .t, .dd, .amount, .qty, .count, .stat .n, .mono, .time-block, .date-block, .cal-day .num, .chip .t, .job-when, .strip .v, .day-label, .eyebrow, .tag, .form-section h3, .note .label, .instruction .cat, .cal-head div, .legend, .section-head .small, .small.muted { font-family: var(--mono); }
.eyebrow, .form-section h3, .note .label, .instruction .cat, .cal-head div, .day-label { text-transform: none; letter-spacing: 0; }

/* ---------- Motion: one entrance ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .25s var(--ease) both; }
.stagger > * { animation: none; }
@media (prefers-reduced-motion: reduce) { *, ::before, ::after { animation: none !important; transition: none !important; } }

/* ---------- Accessibility ---------- */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 8px 12px; background: var(--ink); color: var(--on-ink); font-family: var(--mono); font-size: 13px; transition: top .15s; }
.skip:focus { top: 12px; }
@media (prefers-contrast: more) { :root { --muted: #3d3d3a; --hair: #9a9a93; } }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--rule); box-shadow: 0 2px 0 var(--blue); }
.topbar-in { max-width: 1120px; margin: 0 auto; padding: 0 28px; height: 52px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -0.01em; white-space: nowrap; }
.brand-mark { width: 12px; height: 12px; background: var(--blue); flex: none; }
.brand-mark::after { display: none; }
.nav { display: flex; gap: 2px; }
.nav a { position: relative; padding: 15px 10px 14px; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color var(--t); }
.nav a::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--c, var(--ink)); margin-right: 8px; vertical-align: 1px; }
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--ink); border-bottom-color: var(--ink); }
.nav a.active::after { display: none; }
.nav a[data-c="overview"] { --c: var(--c-overview); }
.nav a[data-c="calendar"] { --c: var(--c-calendar); }
.nav a[data-c="turnovers"] { --c: var(--c-turnovers); }
.nav a[data-c="properties"] { --c: var(--c-properties); }
.nav a[data-c="cleaners"] { --c: var(--c-cleaners); }
.nav a[data-c="money"] { --c: var(--c-money); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.agency-name { font-family: var(--mono); font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.topbar form:not(.lang) { display: contents; }
.topbar .btn-ghost { height: 30px; padding: 0 8px; font-size: 13px; }

.lang { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--rule); }
.lang button { position: relative; z-index: 1; border: 0; background: transparent; cursor: pointer; width: 36px; height: 26px; font-family: var(--mono); font-size: 12px; color: var(--muted); transition: color .2s; }
.lang button.active { color: var(--on-ink); }
.lang-knob { position: absolute; top: 0; left: 0; width: 36px; height: 26px; background: var(--ink); transition: transform .28s var(--ease); }
.lang.is-el .lang-knob { transform: translateX(100%); }
.lang.is-switching .lang-knob { transform: translateX(100%); }
.lang.is-el.is-switching .lang-knob { transform: translateX(0); }

.theme-toggle { width: 28px; height: 26px; border: 1px solid var(--rule); background: transparent; display: inline-grid; place-items: center; cursor: pointer; color: var(--ink); }
.theme-toggle svg { grid-area: 1 / 1; width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: opacity .2s; }
.theme-toggle .moon { opacity: 0; }
:root[data-theme="dark"] .theme-toggle .moon { opacity: 1; }
:root[data-theme="dark"] .theme-toggle .sun { opacity: 0; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .moon { opacity: 1; }
  :root:not([data-theme="light"]) .theme-toggle .sun { opacity: 0; }
}
.theme-toggle.is-spinning { transform: none; }
.auth-tools { position: fixed; top: 16px; right: 20px; display: flex; gap: 10px; align-items: center; }

/* ---------- Page ---------- */
.page { max-width: 1120px; margin: 0 auto; padding: 36px 28px 96px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.page-title { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; }
.page-title a:hover { color: var(--blue); }
.page-sub { color: var(--muted); margin-top: 8px; font-size: 15px; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.eyebrow { font-size: 12.5px; color: var(--muted); }
.eyebrow + .page-title { margin-top: 8px; }
.eyebrow-overview { color: var(--c-overview); } .eyebrow-calendar { color: var(--c-calendar); } .eyebrow-turnovers { color: var(--c-turnovers); }
.eyebrow-properties { color: var(--c-properties); } .eyebrow-cleaners { color: var(--c-cleaners); } .eyebrow-money { color: var(--c-money); }

/* ---------- Sections ---------- */
.section { margin-bottom: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 0 0 8px; border-bottom: 1px solid var(--rule); margin-bottom: 0; }
.section-head h2 { font-size: 15px; font-weight: 600; flex: 1; min-width: 0; }
.section-head > :last-child:not(h2) { white-space: nowrap; flex: none; }
.section-head .small, .section-head .link-quiet { font-family: var(--mono); font-size: 12.5px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 36px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.divider { height: 1px; background: var(--hair); margin: 20px 0; }
.link-quiet { color: var(--muted); font-size: 13px; transition: color var(--t); }
.link-quiet:hover { color: var(--blue); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--rule);
  background: transparent; color: var(--ink); font-weight: 500; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.btn:hover { background: var(--paper-2); }
.btn:active { background: var(--hair-2); }
.btn-primary { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.btn-primary:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-accent { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-accent:hover { background: var(--blue-ink); border-color: var(--blue-ink); }
.btn-secondary { background: transparent; }
.btn-ghost { border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--ink); background: var(--paper-2); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-wash); border-color: var(--red); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-lg { height: 48px; font-size: 16px; }
.btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ---------- Stats ---------- */
.stats { display: flex; gap: 0; flex-wrap: wrap; margin: 0 0 36px; border-bottom: 1px solid var(--rule); }
.stat { padding: 8px 32px 16px 0; margin-right: 32px; border-right: 1px solid var(--hair); }
.stat:last-child { border-right: 0; }
.stat .n { font-family: var(--mono); font-size: 40px; font-weight: 500; line-height: 1; letter-spacing: -0.02em; }
.stat .n.money { font-size: 32px; }
.stat .l { font-size: 13px; color: var(--muted); margin-top: 8px; }
.stat.is-deep .n { color: var(--sand); }
.stat.is-muted .n { color: var(--muted); }
.stat.is-accent .n { color: var(--blue); }
.stat.is-danger .n { color: var(--red); }

/* ---------- Month switcher ---------- */
.month-nav { display: flex; align-items: center; gap: 0; border: 1px solid var(--rule); }
.month-nav a { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); font-family: var(--mono); font-size: 15px; border-right: 1px solid var(--hair); transition: background var(--t); }
.month-nav a:last-child { border-right: 0; }
.month-nav a:hover { background: var(--paper-2); }
.month-nav .today { width: auto; padding: 0 10px; font-size: 12.5px; }

/* ---------- Lists (rules, not cards) ---------- */
.list, .bars, .instructions, .supplies, .feeds, .stays, .steps { display: flex; flex-direction: column; background: transparent; border: 0; border-radius: 0; padding: 0; }
.list-item { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--hair); transition: background var(--t); }
.list-item.link:hover { background: var(--paper-2); margin: 0 -8px; padding-left: 8px; padding-right: 8px; }
.list-item .grow { flex: 1 1 180px; min-width: 0; }
.list-item .title { font-weight: 600; }
.list-item .meta { color: var(--muted); font-size: 13px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .tail { display: flex; align-items: center; gap: 12px; margin-left: auto; font-size: 13px; color: var(--muted); }
.time-block { width: 58px; flex: none; }
.time-block .t { font-weight: 500; font-size: 15px; }
.time-block .d { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.date-block { width: 46px; flex: none; }
.date-block .dd { font-size: 22px; font-weight: 500; line-height: 1; }
.date-block .mm { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 3px; text-transform: uppercase; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.tag::before { content: ""; width: 6px; height: 6px; background: var(--faint); }
.tag-deep { color: var(--sand); } .tag-deep::before { background: var(--sand); }
.tag-done { color: var(--green); } .tag-done::before { background: var(--green); }
.tag-danger { color: var(--red); } .tag-danger::before { background: var(--red); }
.tag-open::before { background: transparent; border: 1px solid var(--faint); width: 5px; height: 5px; }
.avatars { display: inline-flex; align-items: center; }
.avatar { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 10px; font-weight: 600; color: #fff; border: 2px solid var(--paper); margin-left: -7px; }
.avatar:first-child { margin-left: 0; }
.avatar-lg { width: 40px; height: 40px; font-size: 13px; margin: 0; border: 0; }
.avatar-xl { width: 56px; height: 56px; font-size: 18px; margin: 0; border: 0; }
.day-label { font-size: 12px; color: var(--muted); padding: 20px 0 6px; }
.day-label::first-letter { text-transform: uppercase; }
.list > .day-label + .list-item { border-top: 1px solid var(--rule); }
.empty { padding: 20px 0; color: var(--muted); font-size: 14px; }
.empty .big { font-size: 17px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }

/* ---------- Bars ---------- */
.bar-row { display: grid; grid-template-columns: minmax(140px, 220px) 1fr auto; gap: 18px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--hair); transition: background var(--t); }
.bar-row:hover { background: var(--paper-2); margin: 0 -8px; padding-left: 8px; padding-right: 8px; }
.bar-row .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .area { font-size: 12px; color: var(--muted); }
.bar { height: 6px; background: var(--hair-2); overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; }
.bar .done { background: var(--blue); }
.bar .planned { background: var(--hair); }
.bar-row .count { font-size: 13px; white-space: nowrap; text-align: right; }
.bar-row .count b { font-weight: 600; font-size: 15px; }
.bar-row .count span { color: var(--muted); }
.legend { display: flex; gap: 18px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 12px; height: 6px; margin-right: 6px; vertical-align: middle; }
.strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; align-items: end; height: 96px; }
.strip .col { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.strip .v { font-size: 12px; }
.strip .b { width: 100%; max-width: 36px; background: var(--blue); min-height: 2px; }
.strip .b.zero { background: var(--hair); }
.strip .m { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; }

/* ---------- Forms ---------- */
.form { max-width: 680px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.field .error { font-size: 12px; color: var(--red); font-family: var(--mono); }
.input, select.input, textarea.input { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--hair); border-radius: var(--r); background: transparent; color: var(--ink); font: inherit; font-size: 15px; transition: border-color var(--t); }
textarea.input { height: auto; padding: 8px 10px; resize: vertical; line-height: 1.5; }
input[type=number].input, input[type=date].input, input[type=time].input, input[type=datetime-local].input { font-family: var(--mono); font-size: 14px; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' fill='none' stroke='%236b6b66' stroke-width='1.5'/></svg>"); background-repeat: no-repeat; background-position: right 10px center; }
.input:hover { border-color: var(--muted); }
.input:focus { outline: none; border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.input:focus-visible { outline: none; }
.input::placeholder { color: var(--faint); }
.field.has-error .input { border-color: var(--red); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.form-grid > * { min-width: 0; }
.form-grid .span-2 { grid-column: span 2; }
.form-section { padding: 24px 0; border-bottom: 1px solid var(--hair); }
.form-section:first-child { padding-top: 0; }
.form-section h3 { font-size: 12.5px; font-weight: 500; color: var(--muted); margin-bottom: 4px; }
.form-section .lead { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; padding-top: 22px; }
.errorlist { margin: 0 0 18px; padding: 10px 12px; border: 1px solid var(--red); color: var(--red); font-size: 13px; list-style: none; }

.segmented { display: inline-flex; border: 1px solid var(--rule); }
.segmented div { display: contents; }
.segmented label { padding: 6px 12px; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--muted); border-right: 1px solid var(--hair); font-family: var(--mono); transition: background var(--t), color var(--t); }
.segmented label:last-child { border-right: 0; }
.segmented input { position: absolute; opacity: 0; width: 0; height: 0; }
.segmented label:has(input:checked) { background: var(--ink); color: var(--on-ink); }
.segmented label:hover:not(:has(input:checked)) { background: var(--paper-2); color: var(--ink); }

.chip-select { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-select div, .chip-select form { display: contents; }
.chip-select label, .chip-btn { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border: 1px solid var(--hair); background: transparent; font: inherit; font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; transition: border-color var(--t), background var(--t), color var(--t); }
.chip-select label:hover, .chip-btn:hover { border-color: var(--ink); }
.chip-select input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip-select label:has(input:checked), .chip-btn.is-on { border-color: var(--ink); background: var(--ink); color: var(--on-ink); }
.chip-select .avatar, .chip-btn .avatar { width: 20px; height: 20px; font-size: 9px; margin: 0; border: 0; }
.chip-btn .tick { font-family: var(--mono); font-size: 12px; }

.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches div { display: contents; }
.swatches label { width: 26px; height: 26px; cursor: pointer; position: relative; border: 2px solid transparent; }
.swatches input { position: absolute; opacity: 0; width: 0; height: 0; }
.swatches label:has(input:checked) { border-color: var(--ink); }
.swatches label span { position: absolute; inset: 2px; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch-input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border: 1px solid var(--rule); background: transparent; position: relative; cursor: pointer; margin: 0; flex: none; }
.switch-input::after { content: ""; position: absolute; inset: 3px; background: var(--blue); opacity: 0; transition: opacity var(--t); }
.switch-input:checked::after { opacity: 1; }

.search { position: relative; }
.search .input { padding-left: 30px; height: 34px; }
.search svg { position: absolute; left: 9px; top: 9px; width: 15px; height: 15px; stroke: var(--muted); fill: none; stroke-width: 1.8; }

.tabs { display: inline-flex; border: 1px solid var(--rule); }
.tabs a { padding: 5px 11px; font-size: 13px; font-weight: 500; color: var(--muted); border-right: 1px solid var(--hair); font-family: var(--mono); transition: background var(--t), color var(--t); }
.tabs a:last-child { border-right: 0; }
.tabs a:hover { color: var(--ink); background: var(--paper-2); }
.tabs a.active { background: var(--ink); color: var(--on-ink); }

/* ---------- Property list ---------- */
.prop-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--hair); transition: background var(--t); }
.prop-row:hover { background: var(--paper-2); margin: 0 -8px; padding-left: 8px; padding-right: 8px; }
.prop-row .name { font-weight: 600; font-size: 16px; }
.prop-row .addr { color: var(--muted); font-size: 13px; }
.prop-row .kind { font-size: 13px; color: var(--muted); }
.prop-row .next { font-size: 13px; color: var(--muted); text-align: right; white-space: nowrap; font-family: var(--mono); }
.prop-row .next b { color: var(--ink); font-weight: 500; }
.prop-row.inactive { opacity: .5; }
.prop-row .code { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.prop-row .next.is-open { color: var(--red); }

/* ---------- Notes & instructions ---------- */
.notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.note { padding: 12px 14px; border: 1px solid var(--rule); white-space: pre-line; }
.note .label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.note .label span { display: none; }
.note.is-empty { color: var(--faint); font-style: italic; }
.note.wide { grid-column: span 2; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px 20px; }
.info-grid dt { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.info-grid dd { margin: 2px 0 0; font-weight: 500; }
.instruction { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hair); }
.instruction .ico { min-width: 34px; height: 22px; padding: 0 6px; border: 1px solid var(--hair); display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 11px; color: var(--muted); flex: none; }
.instruction.important .ico { border-color: var(--sand); color: var(--sand); }
.instruction .txt { flex: 1; }
.instruction .cat { font-size: 11px; color: var(--muted); margin-top: 1px; }
.instruction form { display: inline; }
.instruction.is-checked .ico { background: var(--green); border-color: var(--green); color: #fff; }
.instruction.is-checked .txt > div:first-child { color: var(--muted); }
.icon-btn { width: 30px; height: 30px; border: 0; background: transparent; color: var(--faint); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); transition: color var(--t), background var(--t); }
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.icon-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.icon-btn.on { color: var(--sand); }
.icon-btn.on svg { fill: currentColor; }
.inline-form { display: grid; grid-template-columns: 150px 1fr auto; gap: 8px; align-items: center; margin-top: 12px; }

/* ---------- Supplies, feeds ---------- */
.supply { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--hair); }
.supply .grow { flex: 1; min-width: 0; }
.supply .name { font-weight: 500; }
.supply .qty { min-width: 28px; text-align: center; font-weight: 500; font-size: 15px; }
.supply.is-low .qty { color: var(--red); }
.low-mark { font-family: var(--mono); font-size: 10px; color: var(--red); margin-left: 6px; vertical-align: middle; }
.supply form { display: inline; }
.step { width: 28px; height: 28px; border: 1px solid var(--hair); background: transparent; cursor: pointer; font-family: var(--mono); font-size: 14px; line-height: 1; color: var(--ink-2); transition: border-color var(--t), background var(--t); }
.step:hover { border-color: var(--ink); background: var(--paper-2); }
.supply-form { display: grid; grid-template-columns: 64px 64px minmax(0, 1fr) auto; gap: 8px; margin-top: 12px; }
.supply-form input[name=name] { grid-column: 1 / -1; }
.bring { display: flex; flex-direction: column; }
.bring li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--hair); font-size: 14px; }
.bring li a { flex: 1; min-width: 0; }
.bring li .muted { font-family: var(--mono); font-size: 12px; }
.feed, .stay { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--hair); }
.feed .grow, .stay .dates { flex: 1; min-width: 0; }
.feed .name { font-weight: 500; }
.feed form, .stay form { display: inline; }
.err { color: var(--red); font-family: var(--mono); font-size: 12px; }
.feed-form { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 8px; margin-top: 12px; }
.stay .dates { font-family: var(--mono); font-size: 13px; }

/* ---------- Turnover timeline ---------- */
.timeline { display: flex; flex-direction: column; margin-top: 10px; }
.tl { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 7px 0 7px 16px; position: relative; color: var(--muted); font-size: 14px; }
.tl::before { content: ""; position: absolute; left: 0; top: 13px; width: 6px; height: 6px; background: var(--faint); }
.tl::after { content: ""; position: absolute; left: 2.5px; top: 21px; bottom: -7px; width: 1px; background: var(--hair); }
.tl:last-child::after { display: none; }
.tl .t { color: var(--ink); font-weight: 500; }
.tl.is-us { color: var(--ink); }
.tl.is-us::before { background: var(--blue); }
.turnover.is-tight .tl.is-us::before { background: var(--red); }
.turnover .warn { margin-top: 10px; color: var(--red); font-size: 13px; font-family: var(--mono); }
.day-label + .turnover-row { border-top: 1px solid var(--rule); }
.turnover-row.is-open .title::before { content: ""; display: inline-block; width: 6px; height: 6px; border: 1px solid var(--red); margin-right: 8px; vertical-align: middle; }

/* ---------- Calendar ---------- */
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.cal-toolbar .title { font-size: 20px; font-weight: 600; margin: 0 8px; min-width: 210px; }
.cal-toolbar .title::first-letter { text-transform: uppercase; }
.cal { border-top: 1px solid var(--rule); border-left: 1px solid var(--hair); }
.cal-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head div { padding: 8px; font-size: 11px; color: var(--muted); border-right: 1px solid var(--hair); border-bottom: 1px solid var(--rule); text-transform: uppercase; }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-day { min-width: 0; min-height: 112px; padding: 6px 8px; display: flex; flex-direction: column; gap: 2px; position: relative; border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); transition: background var(--t); }
.cal-day:hover { background: var(--paper-2); }
.cal-day.out .num, .cal-day.out .chip { opacity: .35; }
.cal-day .num { font-size: 12px; color: var(--muted); display: flex; align-items: center; justify-content: space-between; height: 22px; margin-bottom: 2px; }
.cal-day .num span { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 4px; }
.cal-day.today .num span { background: var(--blue); color: #fff; }
.cal-day .add { opacity: 0; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); font-family: var(--mono); transition: opacity var(--t), background var(--t), color var(--t); }
.cal-day:hover .add { opacity: 1; }
.cal-day .add:hover { background: var(--ink); color: var(--on-ink); }
.chip { min-width: 0; display: flex; align-items: center; gap: 6px; padding: 2px 0; font-size: 12.5px; line-height: 1.35; color: var(--ink); transition: color var(--t); }
.chip:hover { color: var(--blue); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--chip, var(--faint)); flex: none; }
.chip.is-unassigned .dot { background: transparent; border: 1px dashed var(--faint); }
.chip .t { color: var(--muted); flex: none; font-size: 11.5px; }
.chip .p { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.chip .k { flex: none; font-family: var(--mono); font-size: 10px; color: var(--sand); }
.chip .w { flex: none; font-family: var(--mono); font-size: 10px; color: var(--red); }
.chip.is-done { opacity: .45; }
.chip.is-done .p { text-decoration: line-through; }
.chip.is-overdue .t { color: var(--red); }
.chip-out { color: var(--muted); }
.chip-out .out { flex: none; font-family: var(--mono); font-size: 10px; color: var(--sand); }
.chip-out .p { font-weight: 400; }
.cal-week-view .cal-day { min-height: 280px; }
.cal-week-view .chip { flex-wrap: wrap; padding: 6px 0; gap: 3px 6px; border-bottom: 1px solid var(--hair-2); }
.cal-week-view .chip .p { white-space: normal; font-size: 13px; flex-basis: 100%; }
.cal-week-view .chip .cleaners { font-size: 11px; color: var(--muted); flex-basis: 100%; font-family: var(--mono); }

/* ---------- Messages ---------- */
.messages { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 6px; }
.message { background: var(--ink); color: var(--on-ink); padding: 9px 12px 9px 14px; font-size: 13px; display: flex; align-items: center; gap: 12px; white-space: nowrap; border-left: 3px solid var(--blue); animation: rise .2s var(--ease) both; }
.message.error { border-left-color: var(--red); }
.message button { background: transparent; border: 0; color: var(--on-ink); opacity: .6; cursor: pointer; font-size: 15px; line-height: 1; padding: 0; font-family: var(--mono); }
.message form { display: inline; }
.message .undo { background: transparent; border: 0; padding: 0; color: var(--on-ink); font: inherit; font-family: var(--mono); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; opacity: 1; }
.message.leaving { opacity: 0; transition: opacity .2s; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 360px; animation: rise .25s var(--ease) both; }
.auth-card .brand { margin-bottom: 36px; }
.auth-card h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.auth-card .lead { color: var(--muted); margin: 8px 0 28px; }
.auth-foot { margin-top: 20px; font-size: 13px; color: var(--muted); }
.auth-foot a { color: var(--ink); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Detail ---------- */
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--muted); font-family: var(--mono); font-size: 12.5px; }
.kv dd { font-weight: 500; }
.hero-tags { display: flex; gap: 16px; margin-bottom: 6px; }
.share-row { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.share-row .input { flex: 1 1 260px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.share-row form { display: contents; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.photo-grid a { display: block; aspect-ratio: 1; overflow: hidden; background: var(--paper-2); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-grid .photo { position: relative; }
.photo-grid .photo form { position: absolute; top: 4px; right: 4px; }
.photo-grid .photo .icon-btn { background: rgba(0,0,0,.6); color: #fff; }

/* ---------- Money ---------- */
.amount { font-weight: 500; color: var(--ink); font-size: 14px; }
.money-row .tail { gap: 10px; }
.expense-form { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.expense-form .row > * { flex: 1; min-width: 0; }
.expense-form .row .btn { flex: none; }

/* ---------- Onboarding ---------- */
.onboarding { padding: 0 0 8px; }
.steps li { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.steps li > div { flex: 1; min-width: 0; }
.steps .num { width: 30px; height: 30px; border: 1px solid var(--step, var(--hair)); color: var(--step, var(--ink)); display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 12px; flex: none; }
.steps li.is-done .num { background: var(--step, var(--blue)); border-color: var(--step, var(--blue)); color: #fff; }
.steps li.is-done .title { color: var(--muted); text-decoration: line-through; }

/* ---------- Disclosure ---------- */
details.more { border-top: 1px solid var(--hair); }
details.more > summary { list-style: none; cursor: pointer; padding: 20px 0; font-size: 13px; font-family: var(--mono); color: var(--muted); display: flex; align-items: center; gap: 8px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+"; display: inline-block; width: 14px; }
details.more[open] > summary::before { content: "–"; }
details.more > summary:hover { color: var(--ink); }
details.codes { margin-top: 6px; }
details.codes > summary { cursor: pointer; color: var(--blue); font-weight: 500; list-style: none; font-size: 14px; }
details.codes > summary::-webkit-details-marker { display: none; }

/* ---------- Cleaner app ---------- */
.capp { background: var(--paper); }
.capp-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; max-width: 600px; margin: 0 auto; border-bottom: 1px solid var(--rule); box-shadow: 0 2px 0 var(--blue); }
.capp-main { max-width: 600px; margin: 0 auto; padding: 8px 18px 90px; }
.capp-head { margin: 12px 0 24px; padding-bottom: 16px; border-bottom: 1px solid var(--rule); }
.capp .page-title { font-size: 28px; margin-top: 4px; }
.capp .page-sub { margin-bottom: 14px; font-family: var(--mono); font-size: 14px; }
.capp .section { margin-bottom: 32px; }
.capp .notes { grid-template-columns: 1fr; }
.capp .note.wide { grid-column: auto; }
.capp .note.is-warn { border-color: var(--red); }
.capp .note .warn { margin-top: 8px; color: var(--red); font-weight: 500; font-family: var(--mono); font-size: 13px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.back::before { content: ""; width: 7px; height: 7px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.jobs { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.job { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--hair); min-height: 64px; transition: background var(--t); }
.job:active { background: var(--paper-2); }
.job.is-done { opacity: .55; }
.job-when { width: 70px; flex: none; font-family: var(--mono); }
.job-when .d { font-size: 11px; color: var(--muted); }
.job-when .t { font-size: 20px; font-weight: 500; line-height: 1.2; }
.job-when .dur { font-size: 11px; color: var(--muted); }
.job-what { flex: 1; min-width: 0; }
.job-what .title { font-weight: 600; font-size: 17px; }
.job-what .meta { color: var(--muted); font-size: 14px; }
.job .chev { color: var(--faint); font-family: var(--mono); }
.checks { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.checks form { display: block; }
.check { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; padding: 13px 0; border: 0; border-bottom: 1px solid var(--hair); background: transparent; cursor: pointer; font-size: 16px; }
.check .box { width: 24px; height: 24px; border: 1.5px solid var(--rule); display: inline-flex; align-items: center; justify-content: center; flex: none; font-family: var(--mono); font-weight: 600; color: #fff; transition: background var(--t); }
.check.is-on .box { background: var(--blue); border-color: var(--blue); }
.check.is-on .txt { color: var(--muted); text-decoration: line-through; }
.check.important:not(.is-on) .box { border-color: var(--sand); }
.check .k { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-right: 6px; }
.finish { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; }
.photo-pick { display: flex; align-items: center; gap: 10px; padding: 14px; border: 1px dashed var(--rule); cursor: pointer; font-size: 15px; transition: background var(--t); }
.photo-pick:hover { background: var(--paper-2); }
.photo-pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.photo-pick .ico { font-family: var(--mono); font-size: 16px; }
.photo-pick.small { padding: 10px 14px; font-size: 14px; }
.tip, .notify { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-bottom: 22px; }
.tip .grow, .notify .grow { flex: 1; min-width: 0; }
.tip .title, .notify .title { font-weight: 600; }
.notify form { display: contents; }
.on-mark { font-family: var(--mono); font-size: 10px; color: var(--blue); margin-left: 6px; }

.capp .brand span.txt { display: inline !important; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .topbar-in { padding: 0 16px; gap: 14px; height: 48px; overflow-x: auto; }
  .nav a { padding: 13px 8px 12px; font-size: 13px; }
  .nav a::before { margin-right: 6px; }
  .topbar .link-quiet, .agency-name { display: none; }
  .page { padding: 24px 16px 72px; }
  .page-title { font-size: 28px; }
  .page-head { margin-bottom: 24px; }
  .two-col { grid-template-columns: 1fr; gap: 36px; }
  .stats { gap: 0; }
  .stat { padding-right: 20px; margin-right: 20px; }
  .stat .n { font-size: 32px; }
  .bar-row { grid-template-columns: minmax(0, 1fr) auto; }
  .bar-row .bar { grid-column: 1 / -1; order: 3; }
  .cal-day { min-height: 76px; padding: 4px 5px; }
  .chip .t { display: none; }
  .inline-form { grid-template-columns: 1fr; }
  .supply-form { grid-template-columns: 64px 64px minmax(0, 1fr) auto; }
  .feed-form { grid-template-columns: 1fr auto; }
  .feed-form input { grid-column: 1 / -1; }
  .notes { grid-template-columns: 1fr; }
  .note.wide { grid-column: auto; }
  .prop-row { grid-template-columns: 36px minmax(0, 1fr); }
  .prop-row .next { grid-column: 2; text-align: left; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dt { margin-top: 8px; }
}
@media (max-width: 520px) {
  .brand span.txt { display: none; }
  .cal-week-view .cal-week { grid-template-columns: 1fr; }
  .cal-week-view .cal-head { display: none; }
  .cal-week-view .cal-day { min-height: 0; }
  .messages { left: 16px; right: 16px; transform: none; }
  .message { white-space: normal; }
}

/* Needs attention: counts per kind, bulk action on the right */
.attention-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 10px 0; border-bottom: 1px solid var(--hair); }
.attention-sum a.tag:hover { color: var(--ink); }
.attention-sum .push { margin-left: auto; }
.attention-sum button.link-quiet { background: none; border: 0; padding: 0; font-family: var(--mono); font-size: 12.5px; cursor: pointer; }
.list-item a.title { display: block; color: inherit; }
.list-item a.title:hover { color: var(--blue); }

/* Month calendar: property codes in the grid, the key underneath */
.chip .p.code { font-family: var(--mono); font-size: 11.5px; letter-spacing: .02em; }
.cal-key { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 10px 0; border-bottom: 1px solid var(--hair); font-size: 12.5px; color: var(--muted); }
.cal-key b { font-family: var(--mono); font-weight: 500; color: var(--ink); margin-right: 4px; }
.cal-key a:hover, .cal-key a:hover b { color: var(--blue); }

/* Turnovers: a tick box per open checkout, booked together */
.turnover-row .pick { width: 18px; flex: none; display: flex; align-items: center; }
.turnover-row .pick input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); cursor: pointer; }
.btn:disabled { opacity: .4; cursor: default; }

/* Cleaners: who, next job, this week's load, reminders, their link */
.cleaner-row { display: grid; grid-template-columns: 40px minmax(140px, 1.2fr) minmax(0, 1.2fr) minmax(110px, 1fr) 140px auto; gap: 18px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.cleaner-row.inactive { opacity: .5; }
.cleaner-row .who { min-width: 0; }
.cleaner-row .title { font-weight: 600; color: inherit; }
.cleaner-row .title:hover, .cleaner-row .next a:hover { color: var(--blue); }
.cleaner-row .meta { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cleaner-row .label { display: block; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.cleaner-row .label b { color: var(--ink); font-weight: 500; }
.cleaner-row .next { font-size: 13px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cleaner-row .next a { color: var(--ink-2); }
.cleaner-row .next b { font-family: var(--mono); font-weight: 500; color: var(--ink); }
.cleaner-row .load .bar { margin-top: 5px; }
@media (max-width: 900px) {
  .cleaner-row { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 6px 14px; }
  .cleaner-row .avatar { grid-row: span 3; align-self: start; }
  .cleaner-row .next, .cleaner-row .load, .cleaner-row .push { grid-column: 2 / -1; }
  .cleaner-row > .btn { grid-column: 3; grid-row: 1; }
}
.attention-more { display: inline-block; margin-top: 10px; font-family: var(--mono); font-size: 12.5px; }

/* Turnovers: recent past checkouts nobody booked; calendar links land on a row */
.missed { margin-bottom: 40px; }
.missed-note { margin: 10px 0 2px; }
.turnover-row:target { background: var(--blue-wash); margin: 0 -8px; padding-left: 8px; padding-right: 8px; transition: background 1.2s var(--ease); }
.turnover-row { scroll-margin-top: 96px; }

/* ==================================================================
   Simplified app (Sep 2026): Week · Properties · Team.
   Phone first: the three sections sit in a tab bar at the bottom.
   ================================================================== */
.nav a svg { display: none; }
.agency-name { display: inline-flex; align-items: center; gap: 8px; }
.agency-name svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; flex: none; }
.agency-name:hover { color: var(--ink); }
.desk-only { display: flex; align-items: center; gap: 10px; }

@media (max-width: 900px) {
  .topbar-in { overflow: visible; }
  .desk-only { display: none; }
  .agency-name { display: inline-flex; max-width: 60vw; }
  .agency-name span { overflow: hidden; text-overflow: ellipsis; }
  .nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(3, 1fr);
    background: var(--paper); border-top: 1px solid var(--rule); padding-bottom: env(safe-area-inset-bottom);
  }
  .nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 8px; margin: 0; border: 0; font-size: 11.5px; }
  .nav a::before { display: none; }
  .nav a svg { display: block; width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; }
  .nav a.active { color: var(--blue); border: 0; }
  .page { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .messages { bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* Week */
.wk-head .page-actions { flex-wrap: nowrap; }
.section-note { font-size: 13.5px; color: var(--muted); margin: 10px 0 2px; }
.confirm { margin-bottom: 36px; }
.confirm-row .tail { gap: 8px; }
.confirm-all { margin-top: 12px; }
.confirm-all button { background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--mono); font-size: 12.5px; }

.week { border-top: 1px solid var(--rule); }
.wk-day { padding: 14px 0 6px; border-bottom: 1px solid var(--hair); }
.wk-date { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 4px; }
.wk-date b { font-family: var(--mono); font-weight: 500; }
.wk-day.is-past .wk-date b { color: var(--muted); }
.today-tag { font-family: var(--mono); font-size: 11px; color: #fff; background: var(--blue); padding: 1px 6px; }
.wk-add { margin-left: auto; width: 30px; height: 30px; display: inline-grid; place-items: center; font-family: var(--mono); font-size: 18px; color: var(--muted); border: 1px solid transparent; }
.wk-add:hover { color: var(--ink); border-color: var(--hair); }
.wk-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--hair-2); }
.wk-date + .wk-row { border-top: 0; }
.wk-time { font-family: var(--mono); font-size: 14px; }
.wk-name { display: block; font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.wk-name:hover { color: var(--blue); }
.wk-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.warn-text { color: var(--red); }
.wk-row.is-done .wk-time, .wk-row.is-done .wk-name { color: var(--muted); }
.wk-who { font-size: 13px; color: var(--muted); }
.wk-none { font-size: 13px; color: var(--faint); padding: 4px 0 8px; }

/* Cleaner picker: tap the name, pick from the list */
.pick { position: relative; }
.pick > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 10px 4px 5px; border: 1px solid var(--hair); font-size: 13.5px; font-weight: 500; white-space: nowrap; max-width: 44vw; }
.pick > summary::-webkit-details-marker { display: none; }
.pick > summary .avatar { width: 24px; height: 24px; margin: 0 0 0 -3px; font-size: 9.5px; border: 2px solid var(--paper); }
.pick > summary .avatar:first-child { margin-left: 0; }
.pick > summary .pick-label { overflow: hidden; text-overflow: ellipsis; }
.pick > summary.is-empty { color: var(--red); border-color: var(--red); padding-left: 10px; }
.pick[open] > summary { border-color: var(--ink); }
.pick-panel { position: absolute; right: 0; top: calc(100% + 4px); z-index: 15; min-width: 220px; background: var(--paper); border: 1px solid var(--rule); padding: 4px; }
.pick-panel form { display: block; }
.pick-opt { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; background: transparent; border: 0; font: inherit; font-size: 14.5px; text-align: left; cursor: pointer; color: var(--ink); }
.pick-opt:hover { background: var(--paper-2); }
.pick-opt .avatar { width: 26px; height: 26px; margin: 0; border: 0; font-size: 10px; }
.pick-opt.is-on { background: var(--blue-wash); font-weight: 600; }
.pick-opt.is-on::after { content: ""; margin-left: auto; width: 5px; height: 10px; border: solid var(--blue); border-width: 0 2px 2px 0; transform: rotate(45deg); margin-right: 4px; }

.month-card { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 22px; margin-top: 28px; padding: 16px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-size: 14px; color: var(--muted); }
.month-card b { font-family: var(--mono); font-weight: 500; font-size: 17px; color: var(--ink); }
.month-card .go { margin-left: auto; font-family: var(--mono); font-size: 18px; color: var(--ink); }
.month-card:hover .go { color: var(--blue); }

/* Getting started */
.setup { margin-bottom: 32px; }
.setup-steps li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--hair); }
.setup-steps .num { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border: 1px solid var(--rule); font-family: var(--mono); font-size: 12px; }
.setup-steps li.is-done .num { background: var(--ink); color: var(--on-ink); }
.setup-steps li.is-done b { color: var(--muted); text-decoration: line-through; }
.setup-steps div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.setup-steps span { font-size: 13px; color: var(--muted); }

/* Settings */
.settings-more { margin-top: 40px; border-top: 1px solid var(--rule); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--hair); font-size: 14.5px; }

@media (max-width: 520px) {
  .wk-head { flex-direction: row; align-items: flex-end; }
  .wk-head .page-title { font-size: 24px; }
  .wk-head .btn-primary { padding: 0 12px; }
  .wk-row { grid-template-columns: 44px minmax(0, 1fr); row-gap: 8px; }
  .wk-row > .pick, .wk-row > .wk-who { grid-column: 2; justify-self: start; }
  .pick > summary { max-width: 100%; }
  .pick-panel { left: 0; right: auto; }
  .confirm-row { flex-wrap: wrap; row-gap: 6px; padding: 12px 0; }
  .confirm-row .tail { width: 100%; justify-content: flex-end; gap: 6px; }
  .confirm-row .tail .btn { height: 38px; padding: 0 14px; }
}

/* Cleaning page */
.back { display: inline-block; font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.back:hover { color: var(--blue); }
.callout { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 14px 16px; margin-bottom: 28px; border: 1px solid var(--rule); }
.callout .row { gap: 8px; }
.callout.is-ask { border-color: var(--blue); background: var(--blue-wash); }
.callout.is-done { border-color: var(--hair); color: var(--green); }
.callout button.link-quiet { background: none; border: 0; padding: 0; cursor: pointer; }
.checklist-mini { margin-top: 14px; border-top: 1px solid var(--hair-2); }
.checklist-mini li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--hair-2); font-size: 14px; }
.checklist-mini .box { width: 14px; height: 14px; border: 1.5px solid var(--ink); flex: none; }
.checklist-mini li.is-on { color: var(--muted); }
.checklist-mini li.is-on .box { background: var(--blue); border-color: var(--blue); }
.quiet-actions { gap: 20px; margin-top: 8px; }
.quiet-actions button.link-quiet { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-size: 13px; }
.sub-h { font-size: 13px; font-weight: 600; margin: 22px 0 4px; }
.checklist-edit li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--hair-2); font-size: 14px; }
.checklist-edit .box { width: 14px; height: 14px; border: 1.5px solid var(--ink); flex: none; }
.checklist-edit .grow { flex: 1; }
.add-line { display: flex; gap: 8px; margin-top: 10px; }
.add-line .input { flex: 1; min-width: 0; }
.next-line { font-size: 13px; color: var(--muted); white-space: nowrap; }
.list-item.inactive { opacity: .5; }
.team-row { flex-wrap: nowrap; }
.team-row .title { color: inherit; font-weight: 600; }
.team-row .meta { white-space: normal; }
.confirm-choices { display: grid; gap: 8px; margin-top: 18px; }
.confirm-choices .btn { height: 48px; font-size: 15px; }

/* ==================================================================
   Minimal pass (Sep 2026): warm monochrome, one 1px #EAEAEA line
   everywhere, white cards on a warm canvas, black buttons, pale
   pill tags, one entry motion. Blue stays only as the brand mark,
   "today" and link hover.
   ================================================================== */
body { line-height: 1.6; background-color: var(--paper); }
/* depth without gradients: a barely-there paper grain */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .035 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* solid, not blurred: a backdrop-filter here would trap the phone tab bar inside the top bar */
.topbar { box-shadow: none; border-bottom: 1px solid var(--rule); background: var(--paper); }
.topbar-in, .page { max-width: 1024px; }
.page { padding-top: 48px; }
.nav a::before { display: none; }
.nav a.active { border-bottom-color: var(--ink); }

.page-title { font-weight: 650; letter-spacing: -0.03em; line-height: 1.1; }
.page-head { border-bottom: 0; padding-bottom: 0; margin-bottom: 36px; }
.page-sub { color: var(--muted); }
.eyebrow { color: var(--muted); font-size: 12px; letter-spacing: .02em; }
.section { margin-bottom: 56px; }
.section-head { border-bottom: 1px solid var(--rule); padding-bottom: 10px; }
.section-head h2 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }

/* Buttons: black, 6px */
.btn { border-radius: var(--r); border-color: var(--rule); background: var(--surface); color: var(--ink); font-weight: 500; }
.btn:hover { background: var(--paper-2); }
.btn-primary, .btn-accent { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn-primary:hover, .btn-accent:hover { background: #333333; border-color: #333333; color: var(--on-ink); }
:root[data-theme="dark"] .btn-primary:hover, :root[data-theme="dark"] .btn-accent:hover { background: #d6d5d2; border-color: #d6d5d2; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-secondary { background: var(--surface); }
.input, select.input, textarea.input { background: var(--surface); border-color: var(--rule); }
.input:focus, select.input:focus, textarea.input:focus { border-color: var(--ink); outline: none; }

/* Cards: white, 1px #EAEAEA, 10px */
.callout, .pick-panel, .month-card, .setup, .stats, .auth-card, .confirm, .share, .form-section, details.more, .step-card {
  border: 1px solid var(--rule); border-radius: var(--r-card); background: var(--surface);
}
.callout { padding: 18px 20px; }
.callout.is-ask { background: var(--blue-wash); border-color: color-mix(in srgb, var(--blue) 25%, transparent); }
.confirm, .setup, .share { padding: 22px 24px 18px; }
.confirm .section-head, .setup .section-head, .share .section-head { border-bottom: 0; padding-bottom: 0; }
.stats { padding: 22px 24px; gap: 0; }
.stat { border-right-color: var(--rule); }
.stat .n { font-weight: 450; letter-spacing: -0.03em; }
.month-card { padding: 18px 22px; margin-top: 32px; }
.form-section { padding: 22px 24px; margin-bottom: 16px; }
.form-section h3 { font-family: var(--font); font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
details.more { padding: 0 24px; margin-bottom: 16px; }
details.more > summary { padding: 18px 0; }
details.more[open] { padding-bottom: 8px; }
details.more .form-section { border: 0; padding: 0; margin: 0; background: transparent; }
.form-actions { border-top: 0; padding-top: 8px; }
.pick-panel { border-radius: var(--r-card); padding: 6px; }
.pick-opt { border-radius: var(--r); }
.pick > summary { border-radius: var(--r); background: var(--surface); border-color: var(--rule); }
.pick > summary.is-empty { color: var(--red); background: var(--red-wash); border-color: transparent; }
.month-nav { border-color: var(--rule); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.month-nav a { border-right-color: var(--rule); }
.lang, .theme-toggle { border-color: var(--rule); border-radius: var(--r); overflow: hidden; }
.chip-select label, .chip-btn { border-radius: var(--r); background: var(--surface); border-color: var(--rule); }

/* Tags: pale pills */
.tag { padding: 2px 9px; border-radius: 999px; background: var(--hair-2); color: var(--ink-2); font-size: 11px; letter-spacing: .05em; line-height: 1.6; gap: 0; }
.tag::before { display: none; }
.tag-done { background: #edf3ec; color: var(--green); }
.tag-danger, .tag-open { background: var(--red-wash); color: var(--red); }
.tag-deep { background: var(--sand-wash); color: var(--sand); }
:root[data-theme="dark"] .tag-done { background: #1f2b20; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag-done { background: #1f2b20; } }
.today-tag { border-radius: 999px; background: var(--blue-wash); color: var(--blue); padding: 1px 8px; }

/* Lists: quiet dividers, the week reads like a document */
.list-item, .wk-row, .wk-day, .feed, .setup-steps li, .setting-row, .checklist-mini li, .checklist-edit li, .bar-row { border-color: var(--hair-2); }
.week { border-top: 0; }
.wk-day { padding: 18px 0 8px; }
.wk-date b { font-family: var(--font); font-weight: 600; font-size: 14px; color: var(--ink); }
.list-item.link:hover, .bar-row:hover { background: transparent; margin: 0; padding-left: 0; padding-right: 0; }
.list-item.link:hover .title, .bar-row:hover .name { color: var(--blue); }
.bar { border-radius: 999px; background: var(--hair-2); }
.bar .done { background: var(--ink); border-radius: 999px; }
.avatar { border-color: var(--surface); }

/* Motion: one entry for each major block, 600ms, staggered */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s cubic-bezier(.16, 1, .3, 1) calc(var(--index, 0) * 80ms), transform .6s cubic-bezier(.16, 1, .3, 1) calc(var(--index, 0) * 80ms); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .page { padding-top: 28px; }
  .nav { background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top-color: var(--rule); }
  .confirm, .setup, .share, .form-section, .stats { padding: 18px 16px 14px; }
  details.more { padding: 0 16px; }
  .section { margin-bottom: 40px; }
}
.message { border-left: 0; border-radius: var(--r-card); padding: 11px 14px 11px 16px; }
@media (max-width: 900px) { .messages { bottom: calc(80px + env(safe-area-inset-bottom)); width: calc(100% - 32px); } .message { white-space: normal; } }
.confirm-more > summary { list-style: none; cursor: pointer; padding: 12px 0 2px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.confirm-more > summary::-webkit-details-marker { display: none; }
.confirm-more > summary:hover { color: var(--ink); }
.confirm-more[open] > summary { display: none; }
@media (max-width: 900px) { .topbar .brand .txt { display: inline; } }
