/* «סקירה כללית» (js/overview.js; DECISIONS.md, 2026-10-21). DESIGN.md tokens; the product type scale: 600 for headings,
   500–600 for figures (DESIGN.md §3). Desktop = a 12-column grid of even rows; under 900px of its own width, one column. */

.ov-section { display: block; }
.ov {
    container: ov / inline-size;
    --ov-r: 14px;
    --ov-ink-3: #5f6e69; /* 4.8:1 on white: the DESIGN.md placeholder grey, here for quiet labels */
    --ov-warn: #8a5a0b;  /* amber's text partner: 6:1 on white */
    --ov-on-pine-2: rgb(255 255 255 / 0.78);
    --ov-old-age: #65a30d; /* DS_SERIES in js/constants.js: the same series colours as the calculator's charts */
    --ov-nursing: #059669;
    color: var(--ds-ink);
    font-family: var(--ds-font);
    font-size: var(--ds-text-base);
    line-height: 1.55;
}
.ov h2, .ov p { margin: 0; }
.ov h2 { text-wrap: balance; line-height: 1.25; }
.ov-n { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.ov-muted { color: var(--ov-ink-3); font-size: var(--ds-text-sm); }
.ov-ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ov-clamp { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* header */
.ov-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.ov-title { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; }
.ov-head p { color: var(--ov-ink-3); font-size: var(--ds-text-sm); margin-top: 2px; }

/* buttons */
.ov-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 10px; font: inherit; font-weight: 500; font-size: var(--ds-text-base); cursor: pointer; border: 1px solid var(--ds-line-strong); background: var(--ds-surface); color: var(--ds-ink); text-decoration: none; white-space: nowrap; transition: transform 140ms cubic-bezier(0.23, 1, 0.32, 1), background-color 140ms ease; }
.ov-btn:active { transform: scale(0.98); }
.ov-btn-update { background: var(--ds-mist); color: var(--ds-primary); border-color: transparent; font-weight: 600; }
.ov-btn-ghost { border-color: transparent; background: none; color: var(--ds-primary); padding: 0 8px; }
.ov-btn-edit { min-height: 32px; font-size: var(--ds-text-sm); color: var(--ds-muted); }
.ov-btn-edit .ov-ico { width: 16px; height: 16px; }
.ov-btn-sm { min-height: 34px; padding: 0 12px; font-size: var(--ds-text-sm); }
.ov-btn-light { background: var(--ds-surface); color: var(--ds-primary); border-color: transparent; font-weight: 600; }
.ov-btn-line { background: transparent; color: #fff; border-color: rgb(255 255 255 / 0.32); }
.ov-link { background: none; border: 0; padding: 0; font: inherit; font-size: var(--ds-text-sm); font-weight: 500; color: var(--ds-primary); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
    .ov-btn:hover { background: var(--ds-page); }
    .ov-btn-update:hover { background: var(--ds-line-strong); }
    .ov-btn-light:hover { background: var(--ds-mist); }
    .ov-btn-line:hover { background: rgb(255 255 255 / 0.08); }
    .ov-btn-ghost:hover { background: var(--ds-page); }
}
.ov :focus-visible { outline: 2px solid var(--ds-primary); outline-offset: 2px; border-radius: 6px; }
.ov-next :focus-visible { outline-color: #fff; }

/* grid: three even rows on desktop */
.ov-grid { display: grid; gap: 16px; }
.ov-grid > div { display: flex; flex-direction: column; min-width: 0; }
.ov-grid > div > * { flex: 1; }
@container ov (min-width: 900px) {
    .ov-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
    .ov-c-12 { grid-column: span 12; } .ov-c-8 { grid-column: span 8; } .ov-c-4 { grid-column: span 4; } .ov-c-6 { grid-column: span 6; }
}

/* panel */
.ov-panel { background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ov-r); min-width: 0; display: flex; flex-direction: column; }
.ov-ph { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 0 20px; min-height: 56px; border-bottom: 1px solid var(--ds-line); flex-wrap: wrap; }
.ov-ph h2 { font-size: var(--ds-text-base); font-weight: 600; }
.ov-ph-end { display: flex; align-items: center; gap: 8px; }
.ov-pb { padding: 4px 20px 8px; }
.ov-pf { margin-top: auto; padding: 8px 20px; border-top: 1px solid var(--ds-line); display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: var(--ds-text-sm); color: var(--ov-ink-3); min-height: 52px; }
.ov-empty { color: var(--ds-muted); font-size: var(--ds-text-sm); padding: 14px 0; }
@container ov (max-width: 899px) { .ov-ph { padding: 12px 20px; } .ov-ph h2 { flex: 1 0 auto; } }

/* money */
.ov-money-b { padding: 18px 20px 20px; display: grid; gap: 18px; align-content: start; }
.ov-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 0; }
.ov-kpi { padding-inline-end: 16px; min-width: 0; }
.ov-kpi + .ov-kpi { border-inline-start: 1px solid var(--ds-line); padding-inline-start: 16px; }
.ov-kpi .k { font-size: var(--ds-text-sm); color: var(--ov-ink-3); }
.ov-kpi .v { font-size: 1.6rem; font-weight: 500; margin-top: 2px; line-height: 1.15; }
.ov-kpi.is-now .v { font-weight: 600; }
.ov-kpi .d { font-size: var(--ds-text-sm); color: var(--ds-muted); margin-top: 2px; }
.ov-kpi.is-gap { grid-column: 1 / -1; border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid var(--ds-line); padding-top: 14px; display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 12px; }
.ov-kpi.is-gap .v { font-size: 1.15rem; }
.ov-kpi.is-gap .d { grid-column: 1 / -1; margin-top: 0; }
@container ov (min-width: 900px) {
    .ov-money-b { padding: 22px 24px 24px; }
    .ov-kpis { grid-template-columns: repeat(3, auto); justify-content: start; gap: 0; }
    .ov-kpi { padding-inline-end: 36px; }
    .ov-kpi + .ov-kpi { padding-inline-start: 36px; }
    .ov-kpi.is-gap { grid-column: auto; border-top: 0; padding-top: 0; display: block; border-inline-start: 1px solid var(--ds-line); padding-inline-start: 36px; }
    .ov-kpi .v, .ov-kpi.is-gap .v { font-size: 2.1rem; }
}
.ov-count { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--ds-line-strong); border-radius: 9px; background: var(--ds-page); }
.ov-count button { border: 0; background: none; min-height: 30px; padding: 0 10px; border-radius: 7px; font: inherit; font-size: var(--ds-text-sm); font-weight: 500; color: var(--ds-muted); cursor: pointer; white-space: nowrap; }
.ov-count button[aria-pressed="true"] { background: var(--ds-surface); color: var(--ds-ink); box-shadow: 0 1px 2px rgb(20 35 31 / 0.12); }
.ov-count button:disabled { opacity: 0.6; cursor: default; }
.ov-bar { display: flex; gap: 2px; height: 8px; border-radius: 99px; background: var(--ds-line); overflow: hidden; }
.ov-bar span { display: block; height: 100%; }
.ov-bar span.is-est, .ov-legend i.is-est { background-image: repeating-linear-gradient(-45deg, transparent 0 3px, var(--ds-surface) 3px 5px); }
.ov-legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 10px 0 0; padding: 0; list-style: none; font-size: var(--ds-text-sm); color: var(--ds-muted); }
.ov-legend li { display: flex; align-items: center; gap: 6px; }
.ov-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.ov-legend b { font-weight: 500; color: var(--ds-ink); }
.ov-onway { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--ds-line); font-size: var(--ds-text-sm); color: var(--ds-muted); }
.ov-onway > span { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.ov-onway b { font-weight: 500; color: var(--ds-ink); }
@container ov (min-width: 900px) { .ov-onway { display: flex; flex-wrap: wrap; gap: 8px 24px; } }
.ov-tag { display: inline-flex; align-items: center; gap: 5px; color: var(--ds-muted); }
.ov-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.ov-tag.is-ok::before { background: var(--ds-primary); }
.ov-tag.is-wait::before { box-shadow: inset 0 0 0 1.5px var(--ov-ink-3); }

/* work % */
.ov-wp { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--ds-line); }
.ov-wp-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ov-wp-h b { font-weight: 600; }
.ov-wp-track { position: relative; height: 36px; margin-inline: 6px; }
.ov-wp-track::before { content: ""; position: absolute; top: 6px; inset-inline: 0; height: 2px; border-radius: 2px; background: var(--ds-line-strong); }
.ov-wp-fill { position: absolute; top: 6px; height: 2px; background: var(--ds-primary); }
.ov-wp-dot { position: absolute; top: 2px; width: 10px; height: 10px; border-radius: 50%; transform: translateX(50%); background: var(--ds-surface); box-shadow: inset 0 0 0 2px var(--ds-ink); }
.ov-wp-dot.is-best { background: var(--ds-primary); box-shadow: none; }
.ov-wp-tick { position: absolute; top: 1px; width: 1px; height: 12px; background: var(--ov-ink-3); transform: translateX(50%); }
.ov-wp-lbl { position: absolute; top: 16px; transform: translateX(50%); font-size: var(--ds-text-sm); color: var(--ov-ink-3); white-space: nowrap; line-height: 1.2; }
.ov-wp-lbl.is-best { color: var(--ds-primary); font-weight: 500; }
.ov-wp-lbl.is-start { transform: none; inset-inline-start: 0 !important; }
.ov-wp-lbl.is-end { transform: none; inset-inline-start: auto !important; inset-inline-end: 0; }
.ov-wp-note { font-size: var(--ds-text-sm); color: var(--ds-muted); }
.ov-wp-note.is-flip { padding: 6px 10px; border: 1px dashed var(--ov-ink-3); border-radius: 8px; }
.ov-wp-sim { justify-self: start; }

/* next action */
.ov-next { background: var(--ds-primary); color: #fff; border-radius: var(--ov-r); padding: 0 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.ov-next-lbl { display: flex; align-items: center; gap: 8px; min-height: 56px; margin: 0 -20px; padding: 0 20px; border-bottom: 1px solid rgb(255 255 255 / 0.16); font-size: var(--ds-text-sm); color: var(--ov-on-pine-2); }
.ov-next-lbl i { width: 7px; height: 7px; border-radius: 50%; background: var(--ds-amber); }
.ov-next h2 { font-size: 1.2rem; font-weight: 600; line-height: 1.3; color: #fff; }
.ov-next p { color: var(--ov-on-pine-2); font-size: var(--ds-text-sm); }
.ov-due { display: flex; align-items: center; gap: 10px; font-size: var(--ds-text-sm); flex-wrap: wrap; }
.ov-days { background: var(--ds-amber); color: var(--ds-ink); border-radius: 6px; padding: 1px 8px; font-weight: 600; }
.ov-nsteps { list-style: none; margin: 4px 0 0; padding: 12px 0 0; border-top: 1px solid rgb(255 255 255 / 0.16); display: grid; gap: 10px; font-size: var(--ds-text-sm); }
.ov-nsteps label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.ov-nsteps input { appearance: none; width: 18px; height: 18px; border-radius: 50%; margin: 1px 0 0; flex: none; box-shadow: inset 0 0 0 1.5px var(--ov-on-pine-2); cursor: pointer; display: grid; place-items: center; }
.ov-nsteps input:checked { background: #fff; box-shadow: none; }
.ov-nsteps input:checked::after { content: ""; width: 5px; height: 9px; border: solid var(--ds-primary); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.ov-nsteps li.is-done span { color: var(--ov-on-pine-2); text-decoration: line-through; text-decoration-thickness: 1px; }
.ov-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
/* The other claims, under the next action (Roy, 2026-10-25): one line each, on the pine, with its button. */
.ov-also { list-style: none; margin: 0; padding: 10px 0 0; border-top: 1px solid rgba(255,255,255,.22); display: flex; flex-direction: column; gap: 8px; font-size: var(--ds-text-sm); color: var(--ov-on-pine-2); }
.ov-also li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.ov-also b { color: #fff; font-weight: 600; }
.ov-also .ov-link { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
@container ov (min-width: 900px) { .ov-next { padding: 0 24px 24px; } .ov-next-lbl { margin: 0 -24px; padding: 0 24px; } .ov-next h2 { font-size: 1.3rem; } }

/* path */
.ov-only-phone { display: block; }
.ov-only-desk { display: none !important; }
@container ov (min-width: 900px) { .ov-only-phone { display: none !important; } .ov-only-desk { display: grid !important; } }
.ov-tracks { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.ov-track { padding: 16px 0; min-width: 0; }
.ov-track + .ov-track { border-inline-start: 1px solid var(--ds-line); padding-inline-start: 24px; }
.ov-track:not(:last-child) { padding-inline-end: 24px; }
.ov-track-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.ov-track-h b { font-weight: 600; }
.ov-track-h span, .ov-mtrack-h span { font-size: var(--ds-text-sm); color: var(--ov-ink-3); white-space: nowrap; }
.ov-steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); list-style: none; margin: 0; padding: 0; }
.ov-step { position: relative; padding-top: 18px; padding-inline-end: 8px; min-width: 0; }
.ov-step::before { content: ""; position: absolute; top: 4px; inset-inline-start: 10px; inset-inline-end: -2px; height: 2px; background: var(--ds-line-strong); }
.ov-step:last-child::before { display: none; }
.ov-step.is-done::before { background: var(--ds-primary); }
.ov-node { position: absolute; top: 0; inset-inline-start: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--ds-surface); box-shadow: inset 0 0 0 2px var(--ds-line-strong); }
.ov-step.is-done .ov-node { background: var(--ds-primary); box-shadow: none; }
.ov-step.is-now .ov-node { background: var(--ds-amber); box-shadow: 0 0 0 4px rgb(235 165 69 / 0.25); }
.ov-step .t { font-size: var(--ds-text-sm); font-weight: 500; overflow-wrap: anywhere; }
.ov-step.is-todo .t { color: var(--ov-ink-3); font-weight: 400; }
.ov-step .dt { font-size: var(--ds-text-sm); color: var(--ov-ink-3); }
.ov-step.is-now .dt { color: var(--ov-warn); }
.ov-mtrack { display: grid; gap: 8px; padding: 14px 0; border-top: 1px solid var(--ds-line); }
.ov-mtrack:first-child { border-top: 0; }
.ov-mtrack-h { display: flex; justify-content: space-between; gap: 12px; }
.ov-mtrack-h b { font-weight: 600; }
.ov-meter { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.ov-meter i { height: 4px; border-radius: 2px; background: var(--ds-line-strong); }
.ov-meter i.is-done { background: var(--ds-primary); }
.ov-meter i.is-now { background: var(--ds-amber); }
.ov-mtrack p { font-size: var(--ds-text-sm); color: var(--ds-muted); }

/* upcoming */
.ov-agenda { list-style: none; margin: 0; padding: 0; }
.ov-agenda li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--ds-line); }
.ov-agenda li:first-child { border-top: 0; }
.ov-date { text-align: center; line-height: 1.1; }
.ov-date b { display: block; font-size: 1.1rem; font-weight: 600; }
.ov-date span { font-size: var(--ds-text-sm); color: var(--ov-ink-3); }
.ov-ag-main { min-width: 0; }
.ov-ag-t { font-weight: 500; }
.ov-ag-m { font-size: var(--ds-text-sm); color: var(--ov-ink-3); display: flex; flex-wrap: wrap; gap: 0 10px; }
.ov-kind { font-size: var(--ds-text-sm); color: var(--ds-muted); border: 1px solid var(--ds-line-strong); border-radius: 6px; padding: 0 7px; white-space: nowrap; }
.ov-kind.is-deadline { border-color: var(--ds-amber); color: var(--ov-warn); }

/* documents */
.ov-docs-prog { display: flex; align-items: center; gap: 10px; font-size: var(--ds-text-sm); color: var(--ds-muted); min-width: 9rem; }
.ov-docs-line { flex: 1; height: 4px; border-radius: 2px; background: var(--ds-line-strong); overflow: hidden; }
.ov-docs-line span { display: block; height: 100%; background: var(--ds-primary); }
.ov-doc { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--ds-line); }
.ov-doc:first-child { border-top: 0; }
.ov-doc-st { width: 20px; height: 20px; margin-top: 1px; display: grid; place-items: center; cursor: pointer; }
.ov-doc-st input { appearance: none; width: 20px; height: 20px; border-radius: 50%; margin: 0; box-shadow: inset 0 0 0 1.5px var(--ov-ink-3); cursor: pointer; display: grid; place-items: center; }
.ov-doc-st input:checked { background: var(--ds-primary); box-shadow: none; }
.ov-doc-st input:checked::after { content: ""; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.ov-doc-st.is-req { border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ds-amber); cursor: default; }
.ov-doc-main { min-width: 0; }
.ov-doc-t { font-weight: 500; }
.ov-doc-w { font-size: var(--ds-text-sm); color: var(--ov-ink-3); }
.ov-doc-w.is-due { color: var(--ov-warn); }
@container ov (max-width: 899px) { .ov-clamp { -webkit-line-clamp: 3; } }

/* the nursing card, when nursing is in play, sits under the overview */
.ov-nursing { margin-top: 20px; border-radius: var(--ov-r); }

@media (prefers-reduced-motion: reduce) { .ov-btn { transition: none; } }
html.a11y-no-anim .ov-btn { transition: none; }
