/* Oak Kids HR — one stylesheet. Tokens first, then layout, then components. */

@font-face { font-family: Figtree; font-weight: 400; font-display: swap; src: url(fonts/figtree-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Figtree; font-weight: 500; font-display: swap; src: url(fonts/figtree-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: Figtree; font-weight: 600; font-display: swap; src: url(fonts/figtree-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: Figtree; font-weight: 700; font-display: swap; src: url(fonts/figtree-latin-700-normal.woff2) format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  --bg: #F3F5F2;
  --surface: #FFFFFF;
  --surface-2: #F8F9F7;
  --ink: #2F302E;
  --ink-2: #5E615B;
  --ink-3: #868A82;
  --line: #E1E5DE;
  --line-strong: #CDD3C8;
  --accent: #3F7D32;
  --accent-ink: #FFFFFF;
  --accent-soft: #E7F1E3;
  --side: #FBFCFA;

  /* status, from the logo's leaves */
  --ok: #3F7D32;     --ok-soft: #E7F1E3;
  --warn: #9A6200;   --warn-soft: #FCF0D9;
  --bad: #B3262E;    --bad-soft: #FBE6E7;
  --info: #136E9E;   --info-soft: #E2F1F9;

  /* category leaves */
  --leaf-overview: #8A8D86;
  --leaf-recruitment: #EF8D3C;
  --leaf-people: #6FA03C;
  --leaf-pay: #F2B652;
  --leaf-time: #D61F2C;
  --leaf-admin: #1C97D6;
  --leaf-me: #EE6578;
  --leaf-growth: #2E9E8F;
  --leaf-cases: #7A5BB5;
  --leaf-insights: #3D6FB6;
  --leaf-life: #E4A11B;

  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(47, 48, 46, .06);
  --focus: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);
  color-scheme: light;
}

/* Dark: follows the device unless the person picked a theme. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #191B18; --surface: #222420; --surface-2: #1D1F1B; --ink: #ECEEE9; --ink-2: #B4B8AF; --ink-3: #8B9086;
    --line: #33362F; --line-strong: #44483F; --accent: #7DBE68; --accent-ink: #132011; --accent-soft: #263521; --side: #1D1F1B;
    --ok: #7DBE68; --ok-soft: #233320; --warn: #F2B652; --warn-soft: #3A2E17; --bad: #F08088; --bad-soft: #3D1F22; --info: #6BC0EC; --info-soft: #17303D;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #191B18; --surface: #222420; --surface-2: #1D1F1B; --ink: #ECEEE9; --ink-2: #B4B8AF; --ink-3: #8B9086;
  --line: #33362F; --line-strong: #44483F; --accent: #7DBE68; --accent-ink: #132011; --accent-soft: #263521; --side: #1D1F1B;
  --ok: #7DBE68; --ok-soft: #233320; --warn: #F2B652; --warn-soft: #3A2E17; --bad: #F08088; --bad-soft: #3D1F22; --info: #6BC0EC; --info-soft: #17303D;
  --shadow: none; color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 Figtree, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 600; }
h1 { font-size: 24px; letter-spacing: -.01em; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0 0 12px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-sm); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
[hidden] { display: none !important; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--side); border-right: 1px solid var(--line); padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; color: var(--ink); }
.brand img { width: 34px; height: auto; }
.brand b { display: block; font-size: 16px; font-weight: 700; }
.brand span { display: block; font-size: 12.5px; color: var(--ink-3); }
.brand:hover { text-decoration: none; }

.nav-group h2 { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); padding: 0 8px 6px; }
.nav-group h2 i { width: 9px; height: 13px; border-radius: 9px 1px 9px 1px; background: var(--leaf); flex: none; }
.nav-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.nav-group a { display: block; padding: 7px 10px 7px 25px; border-radius: var(--radius-sm); color: var(--ink-2); font-weight: 500; font-size: 14.5px; }
.nav-group a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav-group a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: inset 3px 0 0 var(--leaf), var(--shadow); }
.leaf-overview { --leaf: var(--leaf-overview); } .leaf-recruitment { --leaf: var(--leaf-recruitment); } .leaf-people { --leaf: var(--leaf-people); }
.leaf-pay { --leaf: var(--leaf-pay); } .leaf-time { --leaf: var(--leaf-time); } .leaf-admin { --leaf: var(--leaf-admin); } .leaf-me { --leaf: var(--leaf-me); }
.side-foot { margin-top: auto; font-size: 12.5px; color: var(--ink-3); padding: 0 8px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 12px; padding: 12px 32px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 5; }
.top .spacer { flex: 1; }
.btn.menu-btn { display: none; }
.content { padding: 28px 32px 56px; max-width: 1240px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); }
.readonly-note { background: var(--info-soft); color: var(--info); padding: 8px 32px; font-size: 13.5px; font-weight: 500; }

/* Branch picker, user and theme */
.picker { display: flex; align-items: center; gap: 8px; }
.picker select { min-width: 0; width: auto; max-width: 260px; }
.who { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.who b { font-weight: 600; }
.who span { color: var(--ink-3); }
.theme { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--surface-2); }
.theme button { border: 0; background: none; color: var(--ink-3); width: 30px; height: 26px; border-radius: 999px; cursor: pointer; display: grid; place-items: center; }
.theme button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.theme svg { width: 15px; height: 15px; }

/* ---------- Components ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel + .panel { margin-top: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head p { margin: 2px 0 0; font-size: 13.5px; color: var(--ink-2); }
.panel-body { padding: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.grid-2 > .panel + .panel { margin-top: 0; }
.stack > * + * { margin-top: 18px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 18px; overflow: hidden; }
.stat { padding: 14px 18px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat dt { font-size: 13px; color: var(--ink-2); }
.stat dd { margin: 2px 0 0; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat.is-alert dd { color: var(--bad); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--ink-2); padding: 9px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.right, th.right { text-align: right; }
.table-wrap { overflow-x: auto; }
tbody tr:hover { background: var(--surface-2); }

.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.pill.info { background: var(--info-soft); color: var(--info); border-color: transparent; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.empty { padding: 26px 18px; color: var(--ink-2); font-size: 14px; }

dl.facts { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
dl.facts dt { color: var(--ink-2); }
dl.facts dd { margin: 0; }

/* Forms */
label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 5px; }
.hint { font-weight: 400; color: var(--ink-3); font-size: 12.5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=tel], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 8px 10px; min-height: 38px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.field { margin-bottom: 14px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; font-size: 14px; }
.check input { margin-top: 3px; accent-color: var(--accent); }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form input, .inline-form select { width: auto; min-height: 34px; padding: 5px 8px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 14px/1 Figtree, system-ui, sans-serif; padding: 10px 16px; min-height: 38px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--bad); }
.btn.small { padding: 6px 10px; min-height: 30px; font-size: 13px; }
.btn.link { border: 0; background: none; color: var(--accent); padding: 0; min-height: 0; font-weight: 600; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.alert { padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 14px; font-weight: 500; border: 1px solid transparent; }
.alert.success { background: var(--ok-soft); color: var(--ok); }
.alert.error { background: var(--bad-soft); color: var(--bad); }
.alert.warning { background: var(--warn-soft); color: var(--warn); }
.alert.info { background: var(--info-soft); color: var(--info); }

.tabs { display: flex; gap: 4px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 6px 12px; border-radius: 999px; color: var(--ink-2); font-weight: 500; font-size: 14px; border: 1px solid var(--line); background: var(--surface); }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.tabs a:hover { text-decoration: none; }

/* Applicant board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.lane { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-height: 140px; }
.lane h2 { font-size: 13.5px; display: flex; justify-content: space-between; color: var(--ink-2); margin: 2px 4px 10px; }
.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 8px; color: var(--ink); box-shadow: var(--shadow); }
.card:hover { border-color: var(--line-strong); text-decoration: none; }
.card b { display: block; font-weight: 600; }
.card span { display: block; font-size: 12.5px; color: var(--ink-2); }

/* Permission matrix */
.matrix td, .matrix th { text-align: center; }
.matrix td:first-child, .matrix th:first-child { text-align: left; }
.yes { color: var(--ok); font-weight: 700; }
.no { color: var(--ink-3); }
.ro { color: var(--info); font-size: 12.5px; font-weight: 600; }
.matrix .group td { background: var(--surface-2); font-weight: 600; font-size: 12.5px; color: var(--ink-2); text-align: left; }

/* Sign-in and public pages */
.bare { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth { width: 100%; max-width: 400px; }
.auth .brand { justify-content: center; margin-bottom: 22px; }
.auth .brand img { width: 52px; }
.auth .panel-body { padding: 26px; }
.auth h1 { font-size: 20px; margin-bottom: 4px; }
.auth .btn.primary { width: 100%; }
.code-input { font-size: 22px !important; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.qr { display: grid; place-items: center; padding: 14px; background: #fff; border-radius: var(--radius-sm); border: 1px solid var(--line); margin: 14px 0; }
.qr canvas { width: 180px; height: 180px; image-rendering: pixelated; }
.secret { font: 600 15px/1.4 ui-monospace, Menlo, monospace; letter-spacing: .08em; word-break: break-all; background: var(--surface-2); padding: 8px 10px; border-radius: var(--radius-sm); }

.public-top { background: var(--surface); border-bottom: 1px solid var(--line); }
.public-top .wrap, .public .wrap { max-width: 820px; margin: 0 auto; padding: 16px 24px; }
.public .wrap { padding: 36px 24px 64px; }
.job { display: block; padding: 18px; color: var(--ink); }
.job:hover { background: var(--surface-2); text-decoration: none; }
.job h2 { margin-bottom: 4px; }
.auth-foot { display: flex; justify-content: center; margin-top: 16px; }
.public-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.honey { position: absolute; left: -9999px; }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 20; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.2); }
  body.nav-open .side { transform: none; }
  .btn.menu-btn { display: inline-flex; }
  .top { padding: 10px 16px; flex-wrap: wrap; }
  .content { padding: 20px 16px 48px; }
  .readonly-note { padding: 8px 16px; }
  .grid-2 { grid-template-columns: 1fr; }
  .who span { display: none; }
  .picker select { min-width: 0; max-width: 150px; }
  dl.facts { grid-template-columns: 1fr; gap: 2px; }
  dl.facts dd { margin-bottom: 8px; }
}

/* Spacing utilities */
.gap-top { margin-top: 14px; }
.steps { padding-left: 18px; margin: 0 0 4px; }
.steps li { margin-bottom: 4px; }
.narrow { max-width: 420px; }

/* Row disclosure: a compact "Update" toggle that opens a small form under the row */
details.row-edit > summary { list-style: none; cursor: pointer; display: inline-flex; }
details.row-edit > summary::-webkit-details-marker { display: none; }
details.row-edit[open] > summary { margin-bottom: 10px; }
details.row-edit .fields { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.panel-head > a { white-space: nowrap; }
@media (max-width: 900px) { .stat { border-bottom: 1px solid var(--line); } }
.picker { flex-wrap: wrap; }

/* Payroll steps */
.progress { list-style: none; display: flex; gap: 0; margin: 0 0 18px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.progress li { flex: 1; padding: 9px 14px; font-size: 13.5px; font-weight: 600; color: var(--ink-3); border-right: 1px solid var(--line); }
.progress li:last-child { border-right: 0; }
.progress li.done { color: var(--ok); }
.progress li.now { color: var(--ink); background: var(--accent-soft); box-shadow: inset 0 -3px 0 var(--accent); }
.leave-row { align-items: flex-start !important; flex-wrap: wrap; }
a.pill:hover { text-decoration: none; filter: brightness(.97); }
tfoot td { border-top: 1px solid var(--line-strong); background: var(--surface-2); }

/* Payslip, printable */
.print-page { background: var(--surface); }
.slip { max-width: 640px; margin: 32px auto; padding: 0 20px; }
.slip-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid var(--ink); padding-bottom: 14px; margin-bottom: 18px; }
.slip-head img { width: 64px; height: auto; }
.slip-head h1 { text-align: right; }
.slip-head p { text-align: right; margin: 2px 0 0; color: var(--ink-2); }
.slip-table { margin: 20px 0; }
.slip-table th { background: none; border-bottom: 1px solid var(--ink-3); }
.slip-table .sum td { font-weight: 600; }
.slip-table tfoot td { font-size: 17px; font-weight: 700; border-top: 2px solid var(--ink); background: none; }
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #fff; --ink: #000; --ink-2: #333; --ink-3: #555; --line: #bbb; }
  .no-print { display: none; }
  .slip { margin: 0 auto; }
}

/* ---------- Growth and cases ---------- */
.leaf-growth { --leaf: var(--leaf-growth); } .leaf-cases { --leaf: var(--leaf-cases); }
.leaf-insights { --leaf: var(--leaf-insights); } .leaf-life { --leaf: var(--leaf-life); }
.pill.level-exceeding { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.level-meeting { background: var(--info-soft); color: var(--info); border-color: transparent; }
.pill.level-needs_support { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.level-below { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.big-num { font-size: 26px; font-weight: 600; margin-right: 6px; }
.checklist { list-style: decimal; margin: 0; padding: 4px 18px 0 38px; }
.checklist li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.checklist p { margin: 0 0 8px; }
.choice { display: flex; gap: 18px; margin-bottom: 8px; }
.check-detail { border-bottom: 1px solid var(--line); padding: 0 18px; }
.check-detail:last-child { border-bottom: 0; }
.check-detail summary { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; cursor: pointer; list-style: none; }
.check-detail summary::-webkit-details-marker { display: none; }
.check-detail[open] { padding-bottom: 10px; }
.duty-form { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.duty-form .check { white-space: nowrap; }
.scores { display: grid; grid-template-columns: 1fr repeat(4, 64px); align-items: center; gap: 6px 4px; margin-bottom: 16px; }
.scores .head { font-size: 12.5px; color: var(--ink-2); font-weight: 600; text-align: center; }
.scores label.cell { display: grid; place-items: center; margin: 0; padding: 6px 0; border-radius: var(--radius-sm); cursor: pointer; }
.scores label.cell:hover { background: var(--surface-2); }
.scores input { accent-color: var(--accent); }
.note-box { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin: 0 0 12px; font-size: 14px; }
.timeline { list-style: none; margin: 0; padding: 0 18px; }
.timeline li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline .meta { font-size: 12.5px; color: var(--ink-3); margin-bottom: 4px; }
.timeline p { white-space: pre-wrap; margin: 0; font-size: 14px; }
.private-note { display: flex; gap: 10px; align-items: flex-start; background: var(--accent-soft); color: var(--ink); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13.5px; margin-bottom: 18px; }
.money-lines td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.money-lines .minus { color: var(--bad); }
.letter { max-width: 640px; margin: 32px auto; padding: 0 20px; font-size: 15px; line-height: 1.7; }
.letter .sign { margin-top: 56px; }
@media (max-width: 900px) { .scores { grid-template-columns: 1fr repeat(4, 40px); } }
fieldset.plain { border: 0; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
fieldset.plain legend { font-size: 13.5px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.card b .pill { display: inline-flex; vertical-align: 1px; margin-left: 4px; font-size: 11.5px; }
.card b .pill.info { color: var(--info); }

/* ---------- Keep and scale ---------- */
.staff-card { max-width: 380px; overflow: hidden; }
.staff-card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: var(--accent); color: var(--accent-ink); }
.staff-card-head img { width: 34px; height: auto; background: #fff; border-radius: 50%; padding: 3px; }
.staff-card-head b { display: block; } .staff-card-head span { font-size: 13px; opacity: .85; }
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.wall .panel + .panel { margin-top: 0; }
.wall-card { border-top: 4px solid var(--leaf-life); }
.wall-card.kind-star { border-top-color: var(--leaf-pay); }
.wall-card.kind-thanks { border-top-color: var(--leaf-me); }
.wall-card h2 { margin-bottom: 2px; }
fieldset.scale { border: 0; padding: 0; margin: 0 0 20px; }
fieldset.scale legend { font-weight: 600; margin-bottom: 10px; padding: 0; }
.scale-row { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; }
.scale-row label { margin: 0; }
.scale-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.scale-row span { display: grid; place-items: center; height: 40px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; background: var(--surface); }
.scale-row input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.scale-row input:focus-visible + span { box-shadow: var(--focus); }
.scale-ends { display: flex; justify-content: space-between; margin-top: 4px; }
.survey[dir="rtl"] { font-size: 17px; }
.score-bar { display: inline-flex; align-items: center; gap: 10px; }
.score-bar .bar { width: 120px; height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.score-bar .bar i { display: block; height: 100%; background: var(--accent); }
.bar .w0 { width: 0; } .bar .w1 { width: 10%; } .bar .w2 { width: 20%; } .bar .w3 { width: 30%; } .bar .w4 { width: 40%; } .bar .w5 { width: 50%; }
.bar .w6 { width: 60%; } .bar .w7 { width: 70%; } .bar .w8 { width: 80%; } .bar .w9 { width: 90%; } .bar .w10 { width: 100%; }
.up { color: var(--ok); font-weight: 600; } .down { color: var(--bad); font-weight: 600; }
.letter.wide { max-width: 900px; }
.inspect-person { margin-top: 26px; break-inside: avoid; }
.inspect-person h2 { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 16px; }
.ladder { list-style: none; margin: 0; padding: 0 18px; }
.ladder li { padding: 10px 0 10px 22px; border-left: 2px solid var(--line); position: relative; }
.ladder li::before { content: ""; position: absolute; left: -6px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); }
.ladder li.done::before { background: var(--accent); border-color: var(--accent); }
.ladder li.now::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.ladder li.now b { color: var(--accent); }
@media (max-width: 900px) { .scale-row span { height: 36px; font-size: 13px; } .score-bar .bar { width: 70px; } }
.cover-offer { border-bottom: 1px solid var(--line); background: var(--warn-soft); }

/* ---------- Contracts and signing ---------- */
.contract-grid { grid-template-columns: 3fr 2fr; }
.contract h1 { font-size: 21px; margin-bottom: 8px; }
.contract h2, .contract-print h2 { font-size: 16px; margin: 20px 0 8px; }
.contract p, .contract li { font-size: 14.5px; line-height: 1.6; }
.contract-schedule { margin: 4px 0 8px; }
.contract-schedule th { width: 40%; background: none; white-space: normal; }
.contract-terms { padding-left: 20px; margin: 0; }
.contract-terms li { margin-bottom: 8px; }
.sign-pad { position: relative; border: 2px dashed var(--line-strong); border-radius: var(--radius-sm); background: #fff; touch-action: none; }
.sign-pad canvas { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; cursor: crosshair; }
.sign-pad [data-signature-clear] { position: absolute; top: 6px; right: 6px; }
.sign-pad.signed { border-style: solid; border-color: var(--accent); }
.sig-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 14px; }
.sig-img { width: 100%; max-width: 260px; height: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.hash { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; word-break: break-all; }
@media (max-width: 900px) { .contract-grid { grid-template-columns: 1fr; } }

/* Readiness */
.readiness { table-layout: fixed; }
.readiness td { vertical-align: top; overflow-wrap: break-word; }
.readiness-what { width: 190px; }
.readiness td:nth-child(2) { width: 120px; }
.readiness td:nth-child(4) { width: 110px; }
@media (max-width: 900px) {
  .readiness, .readiness tbody { display: block; }
  .readiness tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .readiness td, .readiness-what, .readiness td:nth-child(2), .readiness td:nth-child(4) { display: block; width: auto; padding: 0; border: 0; }
  .readiness td:nth-child(3), .readiness td:nth-child(4) { grid-column: 1 / -1; text-align: left; }
}
.readonly-note.warn-note { background: var(--warn-soft); color: var(--warn); }
.readonly-note.warn-note a { color: inherit; text-decoration: underline; }
