/* Subby. Navy and neon orange, League Spartan, phone first. */

@font-face {
  font-family: 'League Spartan';
  src: url('/fonts/league-spartan-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --navy: #0B1F3A;            /* deep navy */
  --navy-2: #13294A;
  --navy-3: #1D3760;
  --orange: #FF5A1F;          /* neon orange: fills only, never text on white (2.9:1). Headline accent: .hl */
  --orange-hover: #FF7443;
  --on-orange: #0B1F3A;       /* navy text on orange (5.3:1) */
  --ink: #0B1F3A;
  --muted: #4A5568;           /* slate, 7.4:1 on white */
  --soft: #6B7588;            /* grey, 4.7:1 on white */
  --line: #E3E6EC;
  --line-strong: #CBD1DB;
  --bg: #F4F5F8;
  --card: #FFFFFF;
  --ok: #0E7A4B;
  --ok-bg: #E7F6EE;
  --warn: #8A5300;
  --warn-bg: #FFF5E0;
  --stop: #B00020;
  --stop-bg: #FDECEE;
  --on-navy-soft: rgba(255, 255, 255, .78);
  --font: 'League Spartan', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 20px;
  --r-pill: 999px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --shadow: 0 1px 2px rgba(11, 31, 58, .06), 0 8px 24px rgba(11, 31, 58, .08);
  --shadow-lg: 0 2px 4px rgba(11, 31, 58, .06), 0 24px 64px rgba(11, 31, 58, .18);
  /* Focus: one 4px ring touching the control, no gap. Fields: 2px edge plus a 4px ring of 30% accent. */
  --focus: 0 0 0 4px var(--orange);
  --focus-field: 0 0 0 4px rgba(255, 90, 31, .3);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.45; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--ink); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; }
p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 52px; padding: 0 var(--s5); border: 0; border-radius: var(--r-pill); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; cursor: pointer; text-decoration: none; transition: background .2s var(--ease), transform .1s var(--ease), box-shadow .2s var(--ease), opacity .2s; white-space: nowrap; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn--primary { background: var(--orange); color: var(--on-orange); }
.btn--primary:hover:not([disabled]) { background: var(--orange-hover); }
.btn--primary:focus-visible { box-shadow: 0 0 0 4px var(--navy); }
.btn--dark { background: var(--navy); color: #fff; }
.btn--dark:hover:not([disabled]) { background: var(--navy-3); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line-strong); }
.btn--ghost:hover:not([disabled]) { box-shadow: inset 0 0 0 2px var(--ink); }
.btn--ghost:focus-visible { box-shadow: inset 0 0 0 2px var(--ink), var(--focus); }
.btn--quiet { background: transparent; color: var(--ink); min-height: 44px; padding: 0 var(--s3); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.btn--quiet:hover:not([disabled]) { background: rgba(11, 31, 58, .05); }
.btn--danger { background: var(--stop); color: #fff; }
.btn--sm { min-height: 44px; padding: 0 var(--s4); font-size: 15px; }
.btn--block { width: 100%; }
.btn .spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Fields ── */
.field { display: grid; gap: var(--s2); align-content: start; }
.field + .field { margin-top: var(--s4); }
.field__label { font-weight: 600; font-size: 15px; }
.field__hint { font-size: 14px; color: var(--muted); }
.field__error { display: flex; gap: var(--s2); align-items: flex-start; font-size: 15px; color: var(--stop); font-weight: 600; }
.field__error svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.input, .select, .textarea { width: 100%; min-height: 52px; padding: 12px var(--s4); border: 2px solid var(--line-strong); border-radius: var(--r); background: var(--card); font-size: 17px; transition: border-color .15s, box-shadow .15s; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: var(--s7); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--soft); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--soft); }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid transparent; border-color: var(--navy); box-shadow: var(--focus-field); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--stop); border-width: 3px; }
.affix { position: relative; }
.affix > span { position: absolute; left: var(--s4); top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.affix > .input { padding-left: 34px; }
.affix--end > span { left: auto; right: var(--s4); }
.affix--end > .input { padding-left: var(--s4); padding-right: 88px; }
.grid-2 { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.grid-2 > .field + .field { margin-top: 0; }
.grid-2 + .field, .field + .grid-2, .grid-2 + .grid-2 { margin-top: var(--s4); }
@media (max-width: 520px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip { min-height: 44px; padding: 0 var(--s4); border-radius: var(--r-pill); border: 2px solid var(--line-strong); background: var(--card); font-weight: 600; font-size: 15px; cursor: pointer; transition: border-color .15s var(--ease), background .15s var(--ease), color .15s var(--ease); }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: 52px; cursor: pointer; }
.switch input { appearance: none; width: 52px; height: 32px; border-radius: var(--r-pill); background: var(--line-strong); position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s var(--ease); }
.switch input:checked { background: var(--navy); }
.switch input:checked::after { transform: translateX(20px); }

/* ── Brand ── */
/* Headline accent. Neon orange is never text on white, at any size (2.9:1).
   An accent word in a headline sits on an orange block in navy instead (5.3:1). See DESIGN.md. */
.hl { background: var(--orange); color: var(--on-orange); padding: .04em .16em 0; margin: 0 -.04em; border-radius: .14em; font-style: normal; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.logo { height: 36px; width: auto; }
.logo--sm { height: 28px; }

/* ── Landing ── */
.landing { min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); background: var(--navy); color: #fff; }
.landing__left { display: flex; flex-direction: column; padding: var(--s6) var(--s8); background: var(--card); color: var(--ink); position: relative; z-index: 1; }
.landing__top { display: flex; align-items: center; justify-content: space-between; }
.landing__main { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 500px; padding: var(--s7) 0; }
.landing__foot { font-size: 14px; color: var(--muted); display: flex; gap: var(--s4); flex-wrap: wrap; }
.display { font-size: clamp(42px, 5.4vw, 72px); font-weight: 700; letter-spacing: -0.045em; line-height: .98; }
.lead { font-size: 20px; color: var(--muted); margin-top: var(--s5); line-height: 1.4; max-width: 440px; }
.landing__form { margin-top: var(--s6); }
.landing__row { display: flex; gap: var(--s2); }
.landing__row .input { flex: 1; }
.landing__fine { margin-top: var(--s3); font-size: 14px; color: var(--muted); }
.points { display: grid; gap: var(--s3); margin: var(--s6) 0 0; padding: 0; list-style: none; }
.points li { display: flex; gap: var(--s3); align-items: center; font-weight: 600; }
/* Accent tick: neon orange disc, navy tick (same rule as .hl) */
.tick { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--orange); color: var(--on-orange); }
.tick svg { width: 68%; height: 68%; }

.landing__right { position: relative; overflow: hidden; display: grid; place-items: center; padding: var(--s6); }
.landing__right::before { content: ''; position: absolute; inset: -20%; background: radial-gradient(40% 40% at 70% 30%, rgba(255, 90, 31, .32), transparent 70%), radial-gradient(50% 50% at 20% 80%, rgba(29, 55, 96, .9), transparent 70%); }
.stage { position: relative; width: min(560px, 100%); aspect-ratio: 560 / 620; }

/* The phone and invoice drawing on the landing page. Decorative: hidden from screen readers. */
.mock-phone { position: absolute; left: 0; top: 4%; width: 54%; aspect-ratio: 300 / 600; background: #050E1C; border-radius: 44px; padding: 12px; box-shadow: 0 40px 80px rgba(0, 0, 0, .45), inset 0 0 0 2px rgba(255, 255, 255, .08); z-index: 2; animation: float 7s ease-in-out infinite; }
.mock-phone__screen { height: 100%; border-radius: 34px; background: var(--bg); overflow: hidden; display: flex; flex-direction: column; color: var(--ink); }
.mock-phone__bar { display: flex; justify-content: center; padding: 10px 0 6px; }
.mock-phone__bar span { width: 34%; height: 22px; border-radius: 999px; background: #050E1C; }
.mock-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 16px 10px; }
.mock-head b { font-size: 15px; }
.mock-head .pill { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--navy); color: #fff; }
.mock-note { margin: 0 12px; padding: 12px 12px 48px; background: #fff; border-radius: 16px; font-size: 12.5px; line-height: 1.45; min-height: 140px; box-shadow: var(--shadow); position: relative; }
.mock-note .typed { white-space: pre-wrap; }
.mock-note .caret { display: inline-block; width: 2px; height: 1em; background: var(--orange); vertical-align: -2px; animation: blink 1s step-end infinite; }
.mock-mic { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%; background: var(--orange); color: var(--navy); display: grid; place-items: center; }
.mock-mic svg { width: 18px; height: 18px; }
.mock-mic::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--orange); opacity: 0; animation: ping 2s ease-out infinite; }
.mock-card { margin: 10px 12px 0; padding: 12px; border-radius: 16px; background: var(--navy); color: #fff; font-size: 12px; opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.mock-card.is-on { opacity: 1; transform: none; }
.mock-card__row { display: flex; justify-content: space-between; align-items: baseline; }
.mock-card__big { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; }
.mock-card__tick { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: #8FF0C0; font-weight: 600; }
.mock-card__tick svg { width: 14px; height: 14px; }
.mock-week { margin: 10px 12px 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.mock-week span { height: 44px; border-radius: 8px; background: #fff; position: relative; overflow: hidden; }
.mock-week span::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: var(--h, 0%); background: var(--navy); border-radius: 6px; transition: height .8s var(--ease); }
.mock-week span.today::after { background: var(--orange); }

.mock-doc { position: absolute; right: 0; bottom: 0; width: 62%; aspect-ratio: 210 / 297; background: #fff; border-radius: 10px; box-shadow: 0 30px 70px rgba(0, 0, 0, .4); padding: 7%; color: var(--ink); font-size: 8px; z-index: 1; transform: rotate(3deg); animation: float 7s ease-in-out -3.5s infinite; display: flex; flex-direction: column; }
.mock-doc__band { height: 5px; background: linear-gradient(90deg, var(--navy) 0 70%, var(--orange) 70%); border-radius: 3px; margin-bottom: 10%; }
.mock-doc h4 { font-size: 15px; letter-spacing: -0.03em; }
.mock-doc .muted { color: var(--muted); }
.mock-doc__line { height: 5px; border-radius: 3px; background: var(--line); margin-top: 6px; }
.mock-doc__rows { margin-top: 10%; display: grid; gap: 7px; }
.mock-doc__rows div { display: grid; grid-template-columns: 1fr 3fr 1fr; gap: 6px; }
.mock-doc__rows i { height: 5px; border-radius: 3px; background: var(--line); }
.mock-doc__rows i:last-child { background: var(--line-strong); }
.mock-doc__total { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--navy); padding-top: 8px; }
.mock-doc__total b { font-size: 16px; letter-spacing: -0.03em; }
.mock-doc__stamp { position: absolute; top: 20%; right: 8%; transform: rotate(-8deg); border: 2px solid var(--ok); color: var(--ok); font-weight: 800; font-size: 11px; padding: 3px 8px; border-radius: 6px; letter-spacing: .08em; opacity: 0; transition: opacity .4s; }
.mock-doc__stamp.is-on { opacity: 1; }

@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes ping { 0% { transform: scale(.8); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }

@media (max-width: 900px) {
  .landing { grid-template-columns: minmax(0, 1fr); }
  .landing__left { padding: var(--s5); }
  .landing__main { padding: var(--s7) 0 var(--s6); }
  .landing__right { padding: var(--s7) var(--s5); }
  .stage { width: min(420px, 100%); }
}
@media (max-width: 520px) {
  .landing__row { flex-direction: column; }
  .landing__row .btn { width: 100%; }
}

/* ── Sign up steps ── */
.auth { min-height: 100svh; display: grid; place-items: center; padding: var(--s5); background: var(--bg); }
.auth__card { width: min(520px, 100%); background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: var(--s6); animation: rise .4s var(--ease); }
.auth__card--wide { width: min(640px, 100%); }
@media (max-width: 520px) { .auth { padding: var(--s3); place-items: start center; } .auth__card { padding: var(--s5); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.auth__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s5); }
.auth__title { font-size: 32px; font-weight: 700; letter-spacing: -0.035em; margin-top: var(--s5); }
.auth__text { margin-top: var(--s2); color: var(--muted); }
.auth__text b { color: var(--ink); word-break: break-all; }
.auth__form { margin-top: var(--s5); }
.auth__actions { display: flex; gap: var(--s2); justify-content: space-between; align-items: center; margin-top: var(--s6); flex-wrap: wrap; }
.auth__actions .btn--primary { margin-left: auto; }
.section-label { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: var(--s6) 0 var(--s3); }

.steps { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.steps li { flex: 1; height: 6px; border-radius: 99px; background: var(--line); position: relative; overflow: hidden; }
.steps li.is-done { background: var(--navy); }
.steps li.is-now::after { content: ''; position: absolute; inset: 0; width: 50%; background: var(--orange); border-radius: 99px; animation: grow .6s var(--ease); }
@keyframes grow { from { width: 0; } }
.steps__label { margin-top: var(--s3); font-size: 14px; font-weight: 600; color: var(--muted); display: flex; justify-content: space-between; }

.code { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 8px repeat(3, minmax(0, 1fr)); gap: var(--s2); margin-top: var(--s5); }
.code__gap { width: 8px; }
.code input { width: 100%; min-width: 0; height: 64px; text-align: center; font-family: var(--mono); font-size: 28px; font-weight: 700; border: 2px solid var(--line-strong); border-radius: var(--r); background: var(--card); caret-color: var(--orange); transition: border-color .15s, box-shadow .15s, background .15s; padding: 0; }
.code input:focus { outline: 2px solid transparent; border-color: var(--navy); box-shadow: var(--focus-field); }
.code input.is-filled { border-color: var(--navy); }
.code.is-wrong input { border-color: var(--stop); animation: shake .4s; }
.code.is-right input { border-color: var(--ok); background: var(--ok-bg); }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
@media (max-width: 380px) { .code input { height: 56px; font-size: 24px; } .code { gap: 6px; } }

.resend { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: var(--s5); padding: var(--s2) var(--s2) var(--s2) var(--s4); background: var(--bg); border-radius: var(--r); min-height: 60px; }
.resend__text { font-size: 15px; color: var(--muted); }
.resend .btn { flex: none; }
.ring { width: 22px; height: 22px; flex: none; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3; }
.ring .ring__track { stroke: var(--line-strong); }
.ring .ring__bar { stroke: var(--navy); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }

.notice { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); border-radius: var(--r); font-size: 15px; font-weight: 500; margin-top: var(--s4); }
.notice svg { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.notice--ok { background: var(--ok-bg); color: var(--ok); }
.notice--stop { background: var(--stop-bg); color: var(--stop); }
.notice--warn { background: var(--warn-bg); color: var(--warn); }
.notice--info { background: var(--bg); color: var(--ink); }

.done-mark { width: 72px; height: 72px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; animation: pop .5s var(--ease); }
.done-mark svg { width: 40px; height: 40px; }
@keyframes pop { 0% { transform: scale(.5); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }

/* ── App shell: rail of weeks (desktop), top bar (phone) ── */
.app { min-height: 100svh; display: grid; grid-template-columns: 272px minmax(0, 1fr); }
.rail { position: sticky; top: 0; height: 100svh; background: var(--navy); color: #fff; padding: var(--s5) var(--s3); display: flex; flex-direction: column; gap: var(--s4); }
.rail__logo { padding: 0 var(--s3); margin-bottom: var(--s3); }
.rail__label { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--on-navy-soft); padding: 0 var(--s3); }
.nav { display: grid; gap: 2px; align-content: start; overflow-y: auto; flex: 1; min-height: 0; margin: 0 calc(var(--s1) * -1); padding: 0 var(--s1); }
.wk { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 56px; padding: var(--s2) var(--s3); border-radius: var(--r); color: var(--on-navy-soft); text-decoration: none; position: relative; transition: background .15s, color .15s; }
.wk:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.wk.is-current { background: rgba(255, 255, 255, .1); color: #fff; }
.wk.is-current::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 4px; background: var(--orange); }
.wk__name { font-weight: 700; font-size: 16px; line-height: 1.2; }
.wk__name small { display: block; font-weight: 500; font-size: 13px; opacity: .8; }
.wk__end { display: grid; justify-items: end; gap: 2px; font-size: 13px; flex: none; }
.wk__end b { font-size: 15px; font-variant-numeric: tabular-nums; }
.dot { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .3); flex: none; }
.dot--open::before { background: var(--orange); }
.dot--ask::before { background: #FFC14D; }
.dot--sent::before { background: #8DB4FF; }
.dot--paid::before { background: #3DDC84; }
.wk-list .wk { color: var(--ink); border-radius: 0; border-top: 1px solid var(--line); }
.wk-list .wk:first-child { border-top: 0; }
.wk-list .wk:hover { background: #FAFBFC; color: var(--ink); }
.wk-list .wk.is-current { background: #FFF6F1; color: var(--ink); }
.wk-list .wk__end { color: var(--muted); }
.wk-list .dot::before { box-shadow: inset 0 0 0 1px rgba(11, 31, 58, .25); }
.rail__foot { border-top: 1px solid rgba(255, 255, 255, .12); padding-top: var(--s3); display: grid; gap: var(--s2); }
.rail__link { display: flex; align-items: center; gap: var(--s3); min-height: 48px; padding: 0 var(--s3); border-radius: var(--r); color: var(--on-navy-soft); text-decoration: none; font-weight: 600; }
.rail__link svg { width: 22px; height: 22px; flex: none; }
.rail__link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.rail__link[aria-current="page"] { background: rgba(255, 255, 255, .1); color: #fff; }
.rail__link[aria-current="page"] svg { color: var(--orange); } /* on navy */
button.rail__link { width: 100%; border: 0; background: none; font: inherit; cursor: pointer; text-align: left; }
.rail__foot .rail__link { min-height: 44px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--orange); color: var(--on-orange); display: grid; place-items: center; font-weight: 700; font-size: 18px; flex: none; line-height: 1; padding-top: 2px; box-sizing: border-box; }
.acct { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3) var(--s3); min-width: 0; }
.acct__id { display: grid; min-width: 0; line-height: 1.25; }
.acct__id b { font-size: 15px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct__id span { font-size: 13px; color: var(--on-navy-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct--sheet { padding: 0 0 var(--s4); }
.acct--sheet .avatar { width: 52px; height: 52px; font-size: 22px; }
.acct--sheet .acct__id b { color: var(--ink); font-size: 18px; }
.acct--sheet .acct__id span { color: var(--muted); font-size: 15px; }
.icon-btn--acct .avatar { width: 34px; height: 34px; font-size: 15px; }
.acct-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s3); width: 100%; min-height: 64px; padding: var(--s3) var(--s4); border: 0; border-top: 1px solid var(--line); background: none; font: inherit; color: var(--ink); text-align: left; text-decoration: none; cursor: pointer; }
.acct-row:first-child { border-top: 0; }
.acct-row:hover { background: #FAFBFC; }
.acct-row > svg { width: 22px; height: 22px; color: var(--muted); }
.acct-row b { display: block; font-size: 17px; }
.acct-row small { display: block; font-size: 14px; color: var(--muted); }
.main { padding: var(--s6) var(--s7) var(--s8); max-width: 1240px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s5); flex-wrap: wrap; }
.page-title { font-size: 40px; font-weight: 700; letter-spacing: -0.04em; }
.page-sub { color: var(--muted); margin-top: var(--s1); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mobile-top { display: none; }

@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .main { padding: var(--s4) var(--s4) var(--s7); }
  .mobile-top { display: flex; align-items: center; justify-content: space-between; padding: var(--s2) var(--s2) var(--s2) var(--s4); background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
  .mobile-top .row { gap: 0; }
  .page-title { font-size: 32px; }
}

/* ── Cards ── */
.card { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: var(--s5); }
.card + .card { margin-top: var(--s4); }
.card__title { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.card__sub { color: var(--muted); font-size: 15px; margin-top: 2px; }
.card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); margin-bottom: var(--s4); }
.row { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.row--end { justify-content: flex-end; }
.row--between { justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.num { font-variant-numeric: tabular-nums; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s4); align-items: start; }
.settings-grid .card + .card { margin-top: 0; }
@media (max-width: 1000px) { .settings-grid { grid-template-columns: minmax(0, 1fr); } }

/* ── The week ── */
.wk-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s5); }
.wk-head .page-title { margin-top: 2px; }
.wk-step { display: flex; gap: var(--s2); flex: none; }
.icon-btn--ring { box-shadow: inset 0 0 0 2px var(--line-strong); background: var(--card); }
.icon-btn--ring:hover { box-shadow: inset 0 0 0 2px var(--ink); background: var(--card); }
.icon-btn[aria-disabled="true"] { opacity: .35; pointer-events: none; }
.welcome { margin: 0 0 var(--s4); }
.wk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 368px; gap: var(--s5); align-items: start; }
.wk-side { position: sticky; top: var(--s5); display: grid; gap: var(--s4); }
@media (max-width: 1120px) { .wk-grid { grid-template-columns: minmax(0, 1fr); } .wk-side { position: static; } }

.composer { position: relative; }
.composer__ctx { display: flex; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s3); }
.ctx { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0 var(--s4); border-radius: var(--r-pill); background: var(--card); box-shadow: inset 0 0 0 2px var(--line); border: 0; font-weight: 600; font-size: 15px; cursor: pointer; position: relative; }
.ctx svg { width: 18px; height: 18px; color: var(--muted); }
.ctx:hover { box-shadow: inset 0 0 0 2px var(--line-strong); }
.ctx:focus-within { box-shadow: inset 0 0 0 2px var(--navy), var(--focus-field); }
.ctx input, .ctx select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; min-height: 44px; }
.note-wrap { position: relative; }
.note { display: block; width: 100%; min-height: 240px; padding: var(--s4) var(--s4) 84px; border: 2px solid var(--line-strong); border-radius: var(--r-lg); font-size: 19px; line-height: 1.55; resize: vertical; background: var(--card); transition: border-color .15s, box-shadow .15s; }
.note:focus { outline: 2px solid transparent; border-color: var(--navy); box-shadow: var(--focus-field); }
.note::placeholder { color: var(--soft); }
.composer__tools { position: absolute; left: var(--s3); right: var(--s3); bottom: var(--s3); display: flex; align-items: center; justify-content: space-between; gap: var(--s2); pointer-events: none; }
.composer__tools > * { pointer-events: auto; }
.mic { width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--orange); color: var(--on-orange); display: grid; place-items: center; cursor: pointer; position: relative; transition: transform .15s var(--ease), background .15s; flex: none; }
.mic:hover { background: var(--orange-hover); }
.mic:focus-visible { box-shadow: 0 0 0 4px var(--navy); }
.mic svg { width: 28px; height: 28px; }
.mic.is-live { background: var(--navy); color: #fff; }
.mic.is-live::before, .mic.is-live::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid var(--orange); animation: ping 1.6s ease-out infinite; }
.mic.is-live::after { animation-delay: .8s; }
.composer__hint { font-size: 14px; color: var(--muted); font-weight: 600; }
.examples { margin-top: var(--s3); display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; }
.examples > span { font-size: 14px; color: var(--muted); font-weight: 600; margin-right: var(--s1); }
.examples .chip { min-height: 40px; font-size: 14px; }

.read { margin-top: var(--s4); }
.read:empty { display: none; }
.read__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s3); }
.read__head h2 { font-size: 15px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 99px; letter-spacing: .02em; white-space: nowrap; }
.status svg { width: 14px; height: 14px; }
.status--ready { background: var(--ok-bg); color: var(--ok); }
.status--ask { background: var(--warn-bg); color: var(--warn); }
.status--stop { background: var(--stop-bg); color: var(--stop); }
.status--locked { background: var(--bg); color: var(--muted); }
.status--open { background: var(--warn-bg); color: var(--warn); }
.status--sent { background: #E8EEF8; color: var(--navy-3); }
.status--paid { background: var(--ok-bg); color: var(--ok); }

.dayread { border-radius: var(--r-lg); background: var(--navy); color: #fff; padding: var(--s5); position: relative; overflow: hidden; }
.dayread + .dayread { margin-top: var(--s3); }
.dayread::after { content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 90, 31, .35), transparent 70%); pointer-events: none; }
.dayread__top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); position: relative; z-index: 1; }
.dayread__date { font-size: 15px; color: var(--on-navy-soft); font-weight: 600; }
.dayread__site { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; margin-top: 2px; overflow-wrap: anywhere; }
.dayread__site.is-missing { color: #FFB394; }
.dayread__hours { text-align: right; flex: none; }
.dayread__hours b { display: block; font-size: 48px; font-weight: 700; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.dayread__hours span { font-size: 13px; color: var(--on-navy-soft); font-weight: 600; }
.dayread__times { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s4); }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .1); font-size: 14px; font-weight: 600; }
.tag svg { width: 16px; height: 16px; opacity: .85; }
.tag--soft { color: var(--on-navy-soft); }
.tag--missing { background: rgba(255, 90, 31, .22); color: #FFC7B0; }
.dayread__tasks { margin: var(--s4) 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.dayread__tasks li { display: flex; gap: var(--s2); font-size: 16px; }
.dayread__tasks li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); margin-top: 9px; flex: none; }
.dayread__sec { margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid rgba(255, 255, 255, .14); }
.dayread__lab { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--on-navy-soft); margin-bottom: var(--s2); }
.exp { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: 4px 0; }
.exp__what { min-width: 0; }
.exp__what b { font-variant-numeric: tabular-nums; margin-right: var(--s2); }
.exp__toggle { font-size: 13px; font-weight: 700; padding: 0 12px; border-radius: 99px; border: 0; cursor: pointer; background: rgba(255, 255, 255, .14); color: #fff; min-height: 36px; flex: none; }
.exp__toggle[aria-pressed="true"] { background: var(--orange); color: var(--on-orange); }
.exp__toggle:focus-visible { box-shadow: 0 0 0 4px #fff; }
.private { display: flex; gap: var(--s2); align-items: flex-start; font-size: 15px; color: rgba(255, 255, 255, .88); }
.private svg { width: 16px; height: 16px; margin-top: 3px; flex: none; }

.checks { margin-top: var(--s3); display: grid; gap: var(--s2); }
.check { display: flex; gap: var(--s2); align-items: flex-start; font-size: 15px; padding: var(--s3); border-radius: var(--r); font-weight: 500; }
.check svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.check--check { background: var(--warn-bg); color: var(--warn); }
.check--stop { background: var(--stop-bg); color: var(--stop); }

.ask { margin-top: var(--s3); background: var(--card); border: 2px solid var(--orange); border-radius: var(--r-lg); padding: var(--s4); animation: rise .3s var(--ease); }
.ask__q { font-weight: 700; font-size: 18px; display: flex; gap: var(--s2); align-items: center; }
.ask__q svg { width: 22px; height: 22px; color: var(--orange); flex: none; } /* icon fill */
.ask__body { margin-top: var(--s3); display: grid; gap: var(--s3); }
.ask__row { display: flex; gap: var(--s2); }
.ask__row .input { flex: 1; min-width: 0; }

.save { margin-top: var(--s4); display: grid; gap: var(--s2); }
.saved { display: flex; align-items: center; gap: var(--s3); padding: var(--s4); border-radius: var(--r-lg); background: var(--ok-bg); color: var(--ok); font-weight: 700; animation: rise .35s var(--ease); margin-bottom: var(--s4); }
.saved svg { width: 28px; height: 28px; flex: none; }
.saved .small { display: block; font-weight: 500; }

/* ── Lists ── */
.group { margin-top: var(--s5); }
.group:first-child { margin-top: 0; }
.group__head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 var(--s2) var(--s2); gap: var(--s3); }
.group__title { font-size: 14px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.list { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.item { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: var(--s4); align-items: center; padding: var(--s4) var(--s5); border: 0; border-top: 1px solid var(--line); background: none; width: 100%; text-align: left; cursor: pointer; transition: background .15s; min-height: 72px; color: var(--ink); text-decoration: none; }
.item:first-child { border-top: 0; }
.item:hover { background: #FAFBFC; }
.item:focus-visible { box-shadow: inset 0 0 0 4px var(--orange); }
.item__date { font-weight: 700; line-height: 1.15; }
.item__date small { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.item__main b { display: block; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item__main span { display: block; color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item__end { text-align: right; display: grid; gap: 4px; justify-items: end; }
.item__end b { font-size: 18px; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .item { grid-template-columns: 52px minmax(0, 1fr) auto; padding: var(--s3) var(--s4); gap: var(--s3); } }

.empty { text-align: center; padding: var(--s8) var(--s5); }
.empty svg { width: 56px; height: 56px; margin: 0 auto var(--s4); color: var(--line-strong); }
.empty h3 { font-size: 22px; }
.empty p { color: var(--muted); margin: var(--s2) auto var(--s5); max-width: 400px; }

/* ── Sheets ── */
.sheet { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100svh; width: 100%; height: 100%; margin: 0; }
.sheet::backdrop { background: rgba(5, 14, 28, .55); backdrop-filter: blur(4px); }
.sheet[open] { display: grid; place-items: center; }
.sheet__panel { width: min(640px, calc(100vw - 32px)); max-height: calc(100svh - 48px); overflow: auto; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); animation: rise .3s var(--ease); display: flex; flex-direction: column; }
.sheet__panel--wide { width: min(1000px, calc(100vw - 32px)); }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s4) var(--s4) var(--s4) var(--s5); border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 2; }
.sheet__title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.sheet__body { padding: var(--s5); }
.sheet__foot { display: flex; gap: var(--s2); justify-content: flex-end; padding: var(--s4) var(--s5); border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--card); flex-wrap: wrap; z-index: 2; }
.sheet__foot .spacer { margin-right: auto; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; flex: none; color: var(--ink); }
.icon-btn:hover { background: var(--bg); }
.icon-btn svg { width: 22px; height: 22px; }
@media (max-width: 640px) {
  .sheet[open] { place-items: end stretch; }
  .sheet__panel, .sheet__panel--wide { width: 100%; max-height: 92svh; border-radius: var(--r-lg) var(--r-lg) 0 0; animation: up .3s var(--ease); }
  .sheet__foot { padding-bottom: calc(var(--s4) + env(safe-area-inset-bottom)); }
  .sheet__foot .btn { flex: 1; }
  .sheet__foot .spacer { margin-right: 0; }
}
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

.toast { position: fixed; left: 50%; bottom: var(--s6); transform: translateX(-50%); background: var(--navy); color: #fff; padding: var(--s3) var(--s5); border-radius: var(--r-pill); font-weight: 600; box-shadow: var(--shadow-lg); z-index: 100; display: flex; gap: var(--s3); align-items: center; animation: rise .3s var(--ease); max-width: calc(100vw - 32px); }
.toast svg { width: 20px; height: 20px; color: #8FF0C0; flex: none; }

.history { display: grid; gap: var(--s2); margin-top: var(--s3); }
.history__item { padding: var(--s3) var(--s4); background: var(--bg); border-radius: var(--r); font-size: 15px; }
.history__item b { display: block; }

/* ── Invoice document (A4 at 96 dpi: 794 x 1123) ── */
.doc-wrap { background: #E9ECF1; border-radius: var(--r); padding: var(--s4); overflow: hidden; }
.doc-scale { transform-origin: top left; width: 794px; }
.doc { width: 794px; min-height: 1123px; background: #fff; color: var(--ink); padding: 56px 60px 48px; font-size: 13px; line-height: 1.45; display: flex; flex-direction: column; box-shadow: 0 2px 12px rgba(11, 31, 58, .12); font-family: var(--font); }
.doc__band { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--navy) 0 78%, var(--orange) 78%); margin-bottom: 36px; }
.doc__top { display: flex; justify-content: space-between; gap: 32px; }
.doc__biz { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.doc__who { margin-top: 8px; color: var(--muted); }
.doc__title { text-align: right; flex: none; }
.doc__title h2 { font-size: 34px; letter-spacing: -0.04em; }
.doc__title p { font-family: var(--mono); font-size: 15px; font-weight: 700; margin-top: 4px; }
.doc__meta { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; margin-top: 36px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.doc__lab { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; margin-bottom: 4px; }
.doc dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0; }
.doc dt { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; padding-top: 2px; }
.doc dd { margin: 0; text-align: right; font-weight: 600; }
.doc table { width: 100%; border-collapse: collapse; margin-top: 28px; }
.doc th { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 0 8px 8px; border-bottom: 2px solid var(--navy); }
.doc td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.doc td ul { margin: 0; padding-left: 14px; }
.doc td li { margin: 1px 0; }
.doc__sec td { padding-top: 18px; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.doc__totals { display: flex; justify-content: flex-end; margin-top: 20px; }
.doc__totals dl { width: 300px; }
.doc__totals dd { font-variant-numeric: tabular-nums; }
.doc__totals .doc__due { border-top: 2px solid var(--navy); padding-top: 10px; margin-top: 6px; }
.doc__totals dd.doc__due { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.doc__pay { margin-top: auto; padding-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: end; }
.doc__paybox { background: var(--bg); border-radius: 10px; padding: 16px 18px; }
.doc__paybox dd { text-align: left; font-family: var(--mono); }
.doc__note { color: var(--muted); font-size: 11.5px; }

.print-root { display: none; }
@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; }
  body > *:not(.print-root) { display: none !important; }
  .print-root { display: block !important; }
  .print-root .doc { box-shadow: none; width: 210mm; min-height: 297mm; }
}

/* ── Dev mailbox (local only, never on the live site) ── */
.devmail { position: fixed; right: var(--s4); bottom: var(--s4); z-index: 200; width: min(440px, calc(100vw - 32px)); font-size: 14px; display: flex; flex-direction: column; align-items: flex-end; gap: var(--s2); pointer-events: none; }
.devmail > * { pointer-events: auto; }
.devmail__pill { display: flex; align-items: center; gap: var(--s2); background: #111; color: #fff; border: 0; border-radius: 99px; padding: 10px 16px; font-weight: 700; cursor: pointer; box-shadow: var(--shadow-lg); min-height: 44px; }
.devmail__pill i { width: 8px; height: 8px; border-radius: 50%; background: #3DDC84; }
.devmail__pill.has-new i { background: var(--orange); animation: blink 1s step-end infinite; }
.devmail__panel { width: 100%; background: #111; color: #fff; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); animation: rise .3s var(--ease); }
.devmail__head { padding: var(--s3) var(--s3) var(--s3) var(--s4); display: flex; justify-content: space-between; align-items: center; gap: var(--s2); }
.devmail__head p { color: #bbb; font-size: 12px; }
.devmail__head b { display: block; font-size: 14px; }
.devmail iframe { width: 100%; height: min(460px, 55svh); border: 0; background: #F3F4F7; display: block; }
.devmail__use { background: var(--orange); color: var(--on-orange); border: 0; border-radius: 99px; padding: 0 14px; min-height: 40px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.devmail__x { background: transparent; border: 0; color: #fff; width: 40px; height: 40px; cursor: pointer; display: grid; place-items: center; border-radius: 50%; }
.devmail__x svg { width: 20px; height: 20px; }

/* Small helpers used by the app script */
.sr-reset { border: 0; padding: 0; margin: 0; min-width: 0; }
.item__date svg { width: 24px; height: 24px; color: var(--muted); }
.item__end > svg { width: 20px; height: 20px; color: var(--soft); }
.sheet__body > .notice:first-child { margin-top: 0; }
.sheet__body .saved { margin-bottom: var(--s4); }
/* Headings take focus when a step or page opens, for screen readers. No ring, since they are not controls. */
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; box-shadow: none; }
.settings-wide { grid-column: 1 / -1; }
.settings-grid > div { display: grid; gap: var(--s4); align-content: start; }

/* ── Composer ── */
.say-title { font-size: 30px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.15; }
.composer > .card__sub { margin: var(--s1) 0 var(--s4); }
.ctx--static { cursor: default; }
.ctx--static:hover { box-shadow: inset 0 0 0 2px var(--line); }
@media (max-width: 520px) { .say-title { font-size: 26px; } }

/* ── Journal: the days of the week, newest first ── */
.journal { margin-top: var(--s6); }
.journal #saved-slot .saved { margin: 0 0 var(--s3); }
.journal__list { list-style: none; margin: 0; padding: 0; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.jday { display: grid; grid-template-columns: 68px minmax(0, 1fr); border-top: 1px solid var(--line); }
.jday:first-child { border-top: 0; }
.jday__date { padding: var(--s4) 0 var(--s3) var(--s4); display: grid; align-content: start; justify-items: start; gap: 2px; }
.jday__date b { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.jday__date > span { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.jday.is-today .jday__date > span { background: var(--orange); color: var(--on-orange); border-radius: 8px; padding: 2px 6px 0; margin-left: -6px; }
.jday.is-empty .jday__date > span { color: var(--soft); }
.jday.is-today.is-empty .jday__date > span { color: var(--on-orange); }
.jday__bar { width: 32px; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: var(--s1); }
.jday__bar i { display: block; height: 100%; background: var(--navy); }
.jday.is-target { box-shadow: inset 4px 0 0 var(--orange); background: #FFFAF7; }
.jday__body { padding: var(--s2) var(--s2) var(--s2) 0; display: grid; gap: 2px; min-width: 0; }
.jentry { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s3); align-items: center; min-height: 64px; padding: var(--s2) var(--s3); border: 0; border-radius: var(--r); background: none; text-align: left; cursor: pointer; color: var(--ink); transition: background .15s; width: 100%; }
.jentry:hover { background: var(--bg); }
.jentry:focus-visible { box-shadow: inset 0 0 0 3px var(--orange); }
.jentry__main b { display: block; font-size: 17px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jentry__main b .muted { font-weight: 600; }
.jentry__main > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 15px; line-height: 1.35; margin-top: 2px; }
.jentry__end { display: grid; justify-items: end; gap: 4px; }
.jentry__end b { font-size: 18px; }
.lockmark { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.lockmark svg { width: 13px; height: 13px; }
.jentry.is-new { animation: fresh 2.6s var(--ease); }
@keyframes fresh { 0%, 40% { background: var(--ok-bg); } 100% { background: transparent; } }
.jday__empty { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: 60px; padding: 0 0 0 var(--s3); color: var(--soft); font-size: 15px; font-weight: 500; }
.jday__empty .btn { color: var(--ink); text-decoration: none; }
.jday__empty .btn svg { width: 18px; height: 18px; }
.journal__foot { margin-top: var(--s3); padding: 0 var(--s2); }
@media (max-width: 520px) {
  .jday { grid-template-columns: 54px minmax(0, 1fr); }
  .jday__date { padding-left: var(--s3); }
  .jentry { padding: var(--s2); }
  .jday__empty .btn { padding: 0 var(--s2); }
}

/* ── Invoice cards beside the week ── */
.inv { padding: var(--s5); }
.inv__top { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); }
.inv__client { font-size: 22px; font-weight: 700; letter-spacing: -0.025em; margin-top: 4px; line-height: 1.15; }
.track { list-style: none; margin: var(--s4) 0; padding: 0; display: flex; gap: 6px; }
.track li { flex: 1; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--soft); white-space: nowrap; }
.track li::after { content: ''; flex: 1; height: 2px; border-radius: 2px; background: var(--line); min-width: 8px; }
.track li:last-child { flex: none; }
.track li:last-child::after { display: none; }
.track i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; box-shadow: inset 0 0 0 2px var(--line-strong); flex: none; }
.track i svg { width: 14px; height: 14px; }
.track .is-done { color: var(--ink); }
.track .is-done i { background: var(--navy); color: #fff; box-shadow: none; }
.track .is-done::after { background: var(--navy); }
.track .is-now { color: var(--ink); }
.track .is-now i { background: var(--orange); color: var(--on-orange); box-shadow: none; }
.inv__lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.inv__lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto 88px; gap: var(--s3); align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 600; }
.inv__lines li small { display: block; font-size: 13px; font-weight: 500; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv__lines .num { text-align: right; }
.inv__lines--ghost { border-top: 0; margin-top: var(--s2); }
.inv__lines--ghost li { border: 2px dashed rgba(255, 90, 31, .7); border-radius: var(--r); background: #FFF6F1; padding: var(--s2) var(--s3); animation: rise .3s var(--ease); }
.inv__lines--ghost li + li { margin-top: var(--s2); }
.inv__pending { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--on-orange); background: var(--orange); width: fit-content; padding: 4px 10px; border-radius: 99px; margin-top: var(--s2); }
.inv__pending svg { width: 16px; height: 16px; }
.inv__total { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s3); margin: var(--s4) 0; }
.inv__total > span { font-size: 15px; font-weight: 600; color: var(--muted); }
.inv__total small { display: block; font-size: 13px; font-weight: 500; }
.inv__total b { font-size: 32px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.inv__hint { font-size: 14px; color: var(--muted); margin-top: var(--s3); }
.inv--ready .inv__hint { margin: calc(var(--s2) * -1) 0 var(--s4); }
.inv__actions { display: flex; justify-content: flex-end; gap: var(--s2); }
.inv--note p:not(.eyebrow) { margin: var(--s2) 0 var(--s4); }
.inv__label { display: flex; align-items: center; gap: var(--s2); font-size: 17px; font-weight: 700; margin-bottom: var(--s2); }
.inv__label svg { width: 22px; height: 22px; color: var(--orange); } /* icon fill */
.owed { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s3); align-items: center; width: 100%; padding: var(--s3) 0; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; cursor: pointer; color: var(--ink); }
.owed:hover { background: var(--bg); }
.owed small { display: block; font-size: 13px; color: var(--muted); }
.owed__end { display: grid; justify-items: end; gap: 4px; }

/* What you said, shown in the day sheet */
.said { margin: 0 0 var(--s5); }
.said figcaption { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.said blockquote { margin: var(--s2) 0 0; padding: var(--s3) var(--s4); background: var(--bg); border-radius: var(--r); box-shadow: inset 4px 0 0 var(--orange); font-size: 17px; line-height: 1.5; }
@media (max-width: 520px) {
  .wk-head { position: relative; display: block; }
  .wk-step { position: absolute; top: 0; right: 0; }
  .wk-head .eyebrow, .wk-head .page-title { padding-right: 104px; }
}

/* Costs in the day sheet */
.costs { margin-top: var(--s5); }
.costs .field__hint { margin-bottom: var(--s3); }
.cost { position: relative; padding: var(--s3) var(--s4); padding-right: 64px; background: var(--bg); border-radius: var(--r); margin-bottom: var(--s2); }
.cost__grid { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: var(--s2) var(--s3); }
.cost__f { display: grid; gap: 4px; min-width: 0; }
.cost__f > span:first-child { font-size: 14px; font-weight: 700; }
.cost__f i { font-style: normal; font-weight: 500; color: var(--muted); }
.cost .input { min-height: 48px; background: var(--card); }
.cost__del { position: absolute; top: var(--s3); right: var(--s2); }
.cost__err { margin-top: var(--s2); }
.seg { display: flex; padding: 3px; background: var(--card); border: 2px solid var(--line-strong); border-radius: 99px; min-height: 48px; }
.seg button { flex: 1; border: 0; border-radius: 99px; background: none; font: inherit; font-size: 15px; font-weight: 700; color: var(--muted); cursor: pointer; padding: 0 var(--s3); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.seg button:focus-visible { box-shadow: inset 0 0 0 3px var(--orange); }
fieldset:disabled .seg button { cursor: default; }
.costs__none { color: var(--muted); font-size: 15px; margin-bottom: var(--s2); }
.costs__add svg { width: 18px; height: 18px; }
.hist__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.hist__list li { padding: var(--s3) var(--s4); background: var(--bg); border-radius: var(--r); font-size: 15px; }
.hist__list b { display: block; }
.hist__list span { color: var(--muted); }
@media (max-width: 520px) {
  .cost { padding: var(--s3); padding-right: var(--s3); }
  .cost__grid { grid-template-columns: minmax(0, 1fr); }
  .cost__f:first-child { padding-right: 56px; }
}
.cost input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.cost input[type="number"]::-webkit-inner-spin-button, .cost input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.cost .input::placeholder { font-style: italic; }

/* ── Reports ── */
.rep-tabs { max-width: 520px; margin-bottom: var(--s4); }
.rep-periods { display: flex; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s5); }
.rep-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--s4); align-items: start; }
.rep-grid .card + .card { margin-top: 0; }
@media (max-width: 1000px) { .rep-grid { grid-template-columns: minmax(0, 1fr); } }
.rep__hero { padding-bottom: var(--s4); border-bottom: 1px solid var(--line); margin-bottom: var(--s3); }
.rep__big { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin: var(--s2) 0 var(--s1); }
.rep__big span { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.rep__big b { font-size: 40px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.rep-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.rep-table td, .rep-table th { padding: 10px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.rep-table td + td, .rep-table th + th { padding-left: var(--s3); }
.rep-table .num { text-align: right; white-space: nowrap; }
.rep-sec th { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: var(--s4); }
.rep-code { width: 48px; font-weight: 700; color: var(--muted); }
.rep-strong td { font-weight: 700; }
.rep-total td { font-weight: 700; font-size: 18px; border-bottom: 0; border-top: 2px solid var(--ink); }
.rep-sub { display: block; font-size: 13px; color: var(--muted); }
.rep-notes { list-style: none; padding: 0; margin: var(--s4) 0 0; display: grid; gap: var(--s2); }
.rep-note { display: flex; gap: var(--s2); align-items: flex-start; font-size: 15px; padding: var(--s3); border-radius: var(--r); background: var(--bg); }
.rep-note svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--muted); }
.rep-note--warn { background: var(--warn-bg); color: var(--warn); }
.rep-note--warn svg { color: var(--warn); }
.rep__actions { display: flex; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s5); }
.rep__actions .btn { flex: 1 1 200px; }
.rep__check { display: flex; gap: var(--s2); align-items: flex-start; font-size: 14px; color: var(--muted); margin-top: var(--s3); }
.rep__check svg { width: 18px; height: 18px; flex: none; color: var(--ok); }
.bc-list .item { padding-left: 0; padding-right: 0; grid-template-columns: 64px minmax(0, 1fr) auto; }
.bc-list .item:first-child { border-top: 0; }
.bc-list .item__end small { font-size: 13px; }
.exp__private { font-size: 13px; font-weight: 700; padding: 0 12px; border-radius: 99px; background: rgba(255, 255, 255, .14); color: var(--on-navy-soft); min-height: 36px; display: inline-flex; align-items: center; flex: none; }
.rep-ask__fig { margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid rgba(255, 255, 255, .16); display: grid; gap: var(--s1); }
.rep-ask__fig .muted { color: var(--on-navy-soft); }
.rep-ask__fig b { font-size: 36px; font-weight: 700; letter-spacing: -0.04em; line-height: 1.1; }
.rep-ask__fig .check { margin-top: var(--s2); }
.rep-ask .small.muted { color: var(--on-navy-soft); }
.rep-ask__more { justify-content: center; gap: var(--s1); }
.cost__gst .switch { min-height: 48px; justify-content: flex-start; }
.seg button[disabled] { opacity: .4; cursor: not-allowed; }
.sheet__intro { margin-bottom: var(--s4); }
.bc-list .item__main b { white-space: normal; overflow-wrap: anywhere; }
#payg-amount .field, #payg-rate .field { margin-top: var(--s4); }
