/* Calculator page styles (index.html). Tokens + topbar + footer live in base.css. */

/* ---------- Hero ---------- */
.hero { padding: 20px 0 32px; }
.hero-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.hero-copy { min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 30px 0; }
.hero-title { font-size: 60px; line-height: 1.06; font-weight: 800; letter-spacing: -0.01em; max-width: 16em; text-wrap: balance; }
.hero-sub { font-size: 19px; line-height: 1.5; color: var(--muted); }
.hero-art { flex: 0 0 auto; width: 360px; margin-bottom: -4px; }

/* ---------- Workspace ---------- */
@media screen and (min-width: 1101px) { .workspace { zoom: 0.9; } }
.workspace { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; align-items: stretch; }
.calc-card { background: var(--glass-bg); border: 1px solid var(--glass-border); box-shadow: var(--shadow); border-radius: var(--radius-card); padding: 20px 36px 24px; display: flex; flex-direction: column; min-width: 0; }
.input-box { padding: 26px 0; min-width: 0; border-top: 1px solid var(--hairline); }
.input-box:first-child { border-top: 0; }
.input-box:last-of-type { border-bottom: 1px solid var(--hairline); padding-bottom: 28px; }
.calc-card > .input-box:last-of-type { margin-top: auto; border-bottom: 0; }
.field-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; min-width: 0; }
.field-label { font-size: 18px; font-weight: 600; color: var(--ink); }
.field-meta { font-size: 16px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }

/* sector picker */
.sector-box { padding-top: 16px; padding-bottom: 24px; }
.sector-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; border: 0; margin: 0; padding: 0; min-width: 0; }
.sector-opt { position: relative; display: block; min-width: 0; }
.sector-tile { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; height: 100%; min-height: 92px; padding: 12px 2px 10px; border-radius: 16px; border: 1px solid var(--hairline); background: var(--bg-soft); color: var(--body); --ill-green: #3a3e40; --ill-accent: #5c6264; font-size: 15px; font-weight: 600; line-height: 1.2; text-align: center; cursor: pointer; transition: background-color 140ms ease, border-color 140ms ease, transform 120ms ease; }
.sector-tile .ico { width: 42px; height: 42px; }
.sector-opt:hover .sector-tile { background: rgba(255, 255, 255, 0.07); color: var(--ink); }
.sector-opt input:checked + .sector-tile { background: var(--accent-soft); border-color: var(--accent-line); color: var(--ink); --ill-green: var(--brand); box-shadow: inset 0 1px 0 rgba(183, 255, 60, 0.18), 0 0 24px -10px rgba(183, 255, 60, 0.5); }
.sector-opt input:focus-visible + .sector-tile { outline: 2px solid var(--brand); outline-offset: 2px; }
.sector-opt input:active + .sector-tile { transform: scale(0.97); }
.sector-info { margin-top: 12px; font-size: 14px; line-height: 1.4; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 18px; }
.sector-info[hidden] { display: none; }
.sector-info strong { color: var(--ink); font-weight: 600; }

.switch { display: inline-flex; align-items: center; gap: 10px; min-height: 28px; font-size: 15px; font-weight: 600; color: var(--body); cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { position: relative; width: 38px; height: 22px; border-radius: 99px; background: var(--track); transition: background-color 160ms ease; flex: none; }
.switch-ui::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); transition: transform 160ms ease; }
.switch input:checked + .switch-ui { background: var(--brand); }
.switch input:checked + .switch-ui::after { transform: translateX(16px); background: var(--on-brand); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--brand); outline-offset: 2px; }
.switch-hit { display: inline-flex; align-items: center; min-height: 44px; margin: -8px 0; }

/* multi sector rows */
.multi-list { display: grid; gap: 8px; margin-top: 8px; }
.multi-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--input-border); border-radius: var(--radius-input); background: var(--bg-surface); }
.multi-row select { grid-column: 1 / -1; }
.multi-row select, .multi-row input { width: 100%; min-width: 0; height: 48px; border: 1px solid var(--input-border); border-radius: 12px; background: var(--bg-soft); color: var(--ink); padding: 0 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.multi-row .icon-btn { width: 44px; height: 44px; }
.multi-row .icon-btn[disabled] { opacity: 0.3; cursor: default; }
.multi-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.btn-text { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: var(--radius-pill); border: 1px dashed var(--dash); background: transparent; color: var(--ink); font-size: 14px; font-weight: 700; }
.btn-text:hover { background: rgba(255, 255, 255, 0.06); }
.btn-text[disabled] { opacity: 0.45; cursor: default; }
.multi-total { font-size: 14px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

/* money inputs */
.money-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.money-input { width: 100%; min-width: 0; height: 56px; border: 0; padding: 0; background: transparent; color: var(--ink); font-size: 44px; font-weight: 800; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.money-input::placeholder { color: var(--muted); opacity: 0.7; font-weight: 700; }
.money-input:focus { outline: none; }
.money-input--sm::placeholder { font-size: 20px; font-weight: 600; }
.money-input--sm { font-size: 38px; font-weight: 700; letter-spacing: -0.015em; }
.currency-badge { display: inline-flex; align-items: center; height: 46px; padding: 0 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--hairline); color: var(--ink); font-size: 15px; font-weight: 800; flex: none; }

.slider-block { margin-top: 12px; }
.rev-slider { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 8px; border-radius: var(--radius-pill); background: linear-gradient(to right, var(--brand) 0, var(--brand) calc(var(--p, 0.48) * (100% - 26px) + 13px), var(--track) calc(var(--p, 0.48) * (100% - 26px) + 13px), var(--track) 100%); margin: 12px 0 6px; padding: 0; cursor: pointer; touch-action: pan-y; }
.rev-slider:focus-visible { outline: 2px solid var(--brand); outline-offset: 6px; border-radius: 99px; }
.rev-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); border: 3px solid var(--brand); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 18px -2px rgba(183, 255, 60, 0.6); cursor: grab; transition: transform 150ms ease, box-shadow 150ms ease; }
.rev-slider::-webkit-slider-thumb:hover, .rev-slider:active::-webkit-slider-thumb { transform: scale(1.14); box-shadow: 0 0 0 6px var(--focus); }
.rev-slider::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--ink); border: 3px solid var(--brand); cursor: grab; }
.slider-ticks { position: relative; height: 24px; margin: 0 -2px; font-size: 16px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; user-select: none; }
.tick { position: absolute; top: 0; left: calc(var(--p) * (100% - 26px) + 13px); transform: translateX(-50%); white-space: nowrap; }
.tick--0 { --p: 0; transform: translateX(-13px); }
.tick--1 { --p: 0.2; color: var(--ink); }
.tick--3 { --p: 0.6; color: var(--ink); }
.tick--5 { --p: 1; transform: translateX(calc(-100% + 13px)); }
.chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.q-chip { min-height: 58px; padding: 0 6px; border-radius: var(--radius-pill); border: 1px solid var(--input-border); background: var(--bg-soft); color: var(--ink); font-size: 18px; font-weight: 700; white-space: nowrap; transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease; }
.q-chip:hover { background: rgba(255, 255, 255, 0.08); }
.q-chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--brand); border-color: var(--accent-line); }
.field-error { margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--warn-text); background: var(--warn-bg); padding: 4px 10px; border-radius: 10px; }

.note-small { font-size: 13px; line-height: 1.4; color: var(--muted); padding: 0; }
.sector-box .note-small { margin-top: 10px; }

/* ---------- Result card ---------- */
.result-card { container-type: inline-size; position: relative; background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius-card); padding: 24px 36px 28px; min-width: 0; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.result-card > .cta-row { margin-top: auto; padding-top: 18px; }
.result-tools { display: inline-flex; align-items: center; gap: 8px; }
.copy-btn { width: 44px; height: 44px; margin: -8px -10px -8px 0; border-color: transparent; color: var(--body); font-size: 20px; }
.result-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.result-label { font-size: 18px; font-weight: 600; color: var(--ink); }
.total-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: nowrap; margin-top: 4px; min-width: 0; }
.total-num { font-size: clamp(30px, calc((100cqi - 96px) / (var(--len, 10) * 0.6)), 84px); white-space: nowrap; line-height: 1; font-weight: 800; letter-spacing: -0.045em; color: var(--brand); text-shadow: 0 0 40px rgba(183, 255, 60, 0.25); font-variant-numeric: tabular-nums; }
.total-num.is-text { color: var(--ink); text-shadow: none; font-size: 44px; letter-spacing: -0.03em; line-height: 1.15; padding: 14px 0 8px; }
.total-cur { flex: none; font-size: 32px; font-weight: 800; color: var(--ink); text-decoration: underline; text-decoration-color: var(--brand); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.total-unit { flex: none; white-space: nowrap; font-size: 18px; font-weight: 600; color: var(--muted); }
.pill-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: var(--radius-pill); background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--brand); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pill--warn { background: var(--warn-bg); border-color: rgba(255, 201, 120, 0.3); color: var(--warn-text); }
.example-note { font-size: 13px; font-weight: 500; color: var(--muted); }
.pill-aside { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }

.meter-box { margin-top: 16px; background: var(--bg-surface); border: 1px solid var(--hairline); border-radius: var(--radius-input); padding: 10px 16px 8px; }
.meter-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 17px; }
.meter-title { font-weight: 600; color: var(--body); }
.meter-track-wrap { position: relative; height: 20px; display: flex; align-items: center; margin: 0 9px; }
.meter-track { width: 100%; height: 8px; border-radius: var(--radius-pill); display: flex; overflow: hidden; background: var(--track); }
.meter-seg { height: 100%; border-right: 2px solid #0b0c0c; }
.meter-seg--exempt { width: 20%; background: var(--meter-exempt); }
.meter-seg--choice { width: 40%; background: #5c6264; }
.meter-seg--income { width: 40%; background: var(--meter-income); border-right: 0; }
.meter-dot { position: absolute; top: 50%; left: 48%; width: 3px; height: 28px; margin: -14px 0 0 -1.5px; border-radius: 2px; background: var(--brand); pointer-events: none; cursor: default; }
.meter-dot::after { content: ""; position: absolute; left: 50%; top: -7px; margin-left: -5px; border: 5px solid transparent; border-top-color: var(--brand); border-bottom: 0; }
.meter-labels { position: relative; height: 22px; margin: 2px 9px 0; font-size: 15px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.meter-lbl { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.meter-lbl--1 { left: 20%; }
.meter-lbl--3 { left: 60%; }

.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; margin-top: 14px; background: var(--bg-surface); border: 1px solid var(--hairline); border-radius: var(--radius-pill); }
.seg[hidden] { display: none; }
.seg-btn { position: relative; min-height: 48px; padding: 4px 10px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--muted); font-size: 15px; font-weight: 700; line-height: 1.15; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease; }
.seg-btn[aria-pressed="true"] { background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06)); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 4px 14px -6px rgba(0, 0, 0, 0.8); }
.seg-btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.seg-sub { font-size: 13px; font-weight: 600; color: var(--muted); }

.breakdown { margin-top: 6px; }
.bd-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 8px 0; }
.bd-row + .bd-row { border-top: 1px dashed var(--dash); }
.bd-left { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bd-name { font-size: 18px; font-weight: 600; color: var(--ink); }
.bd-formula { font-size: 15px; line-height: 1.4; color: var(--muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bd-right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; max-width: 48%; }
.bd-val { font-size: 19px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bd-val--muted { font-size: 15px; font-weight: 600; color: var(--body); }
.bd-val--warn { font-size: 14px; color: var(--warn-text); background: var(--warn-bg); padding: 2px 10px; border-radius: 99px; white-space: normal; text-align: right; }
.bd-sub { font-size: 13px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.badge { display: block; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--body); font-variant-numeric: tabular-nums; }
.callout { margin-top: 10px; padding: 12px 14px; border-radius: var(--radius-input); border: 1px solid rgba(255, 201, 120, 0.22); background: var(--warn-bg); color: var(--warn-text); font-size: 14px; font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.callout[hidden] { display: none; }
.callout button { min-height: 40px; padding: 0 16px; border-radius: 99px; border: 1.5px solid currentColor; background: transparent; color: inherit; font-weight: 700; font-size: 14px; }
.next-deadline { margin-top: 14px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-input); background: var(--bg-surface); border: 1px solid var(--hairline); }
.next-deadline .ico { width: 28px; height: 28px; color: var(--brand); }
.next-deadline b { display: block; font-size: 18px; color: var(--ink); font-weight: 700; }
.next-deadline span { font-size: 15px; color: var(--muted); }
.cta-row { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-top: 18px; }
.cta-row .btn { width: 100%; min-height: 62px; font-size: 20px; }
.link-actions { display: flex; gap: 6px 28px; flex-wrap: wrap; align-items: center; }
.link-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 2px; border: 0; background: none; color: var(--ink); font-weight: 600; font-size: 17px; text-decoration: underline; text-decoration-color: var(--glass-border-strong); text-underline-offset: 4px; text-decoration-thickness: 2px; }
.link-btn--plain { text-decoration: none; }
.link-btn:hover { text-decoration-color: var(--brand); }
.toast { min-height: 20px; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--brand); }

/* ---------- Sections ---------- */
.section { padding: 88px 0 0; }
.section-head { max-width: 62ch; margin-bottom: 24px; }
.section h2 { font-size: 38px; line-height: 1.1; font-weight: 800; letter-spacing: -0.032em; text-wrap: balance; }
.section-head p { margin-top: 12px; font-size: 17px; color: var(--muted); }
.panel { background: var(--glass-bg); border: 1px solid var(--glass-border); box-shadow: var(--shadow); border-radius: var(--radius-card); padding: 28px; }

/* checklist */
.todo-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 18px; }
.progress-pill { display: inline-flex; padding: 6px 14px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-border); font-size: 14px; font-weight: 700; color: var(--ink); }
.todo-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.todo { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 16px 18px 18px; background: var(--glass-bg); border-radius: 24px; border: 1px solid var(--glass-border); box-shadow: var(--shadow); transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease; min-width: 0; }
.todo.is-done { border-color: var(--accent-line); box-shadow: var(--glass-hi), var(--glow); }
.todo-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.todo-step { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 10px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--glass-border); color: var(--ink); font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.todo-step .ico { width: 22px; height: 22px; color: var(--brand); }
.todo.is-done .todo-step { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.todo.is-done .todo-step .ico { color: var(--on-brand); }
.todo-step b { font-weight: 800; }
.todo-body { min-width: 0; }
.todo-title { font-size: 18px; line-height: 1.3; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.todo-detail { margin-top: 6px; font-size: 15px; line-height: 1.55; color: var(--muted); }
.todo-check { position: relative; width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; background: transparent; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.todo-check .box { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--glass-border-strong); background: var(--bg-surface); display: flex; align-items: center; justify-content: center; transition: background-color 160ms ease; }
.todo-check[aria-pressed="true"] .box { background: var(--brand); border-color: var(--brand); }
.todo-check svg { width: 20px; height: 20px; overflow: visible; }
.todo-check path { fill: none; stroke: var(--on-brand); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.todo-check[aria-pressed="true"] path { stroke-dashoffset: 0; }

/* two column feature rows */
.feature { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 40px; align-items: center; }
.feature--rev { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
.feature-art { max-width: 380px; width: 100%; margin: 0 auto; }
.feature-art--cal { max-width: 360px; }
.points { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.points li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 16px; }
.points li::before { content: ""; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--accent-line); background: var(--accent-soft) url("/assets/img/check-dot.svg") center / 15px no-repeat; }
.status-card { margin-top: 20px; padding: 16px 18px; border-radius: 20px; background: var(--glass-bg); border: 1px solid var(--glass-border); border-left: 3px solid var(--brand); box-shadow: var(--shadow); color: var(--body); font-weight: 600; }
.status-card strong { color: var(--ink); }
.status-card--warn { background: var(--warn-bg); border-color: rgba(255, 201, 120, 0.22); border-left-color: var(--warn-text); color: var(--warn-text); }
.two-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.mini-card { padding: 16px; border-radius: 20px; background: var(--glass-bg); border: 1px solid var(--glass-border); box-shadow: var(--shadow); }
.mini-card p { color: var(--muted); }
.mini-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.mini-card p { font-size: 14px; line-height: 1.5; }

/* deadlines */
.deadline-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.deadline-grid--monthly { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dl { padding: 12px 16px; border-radius: 20px; background: var(--glass-bg); border: 1px solid var(--glass-border); box-shadow: var(--glass-hi); min-width: 0; }
.dl.is-next { border-color: var(--accent-line); background: radial-gradient(120% 100% at 0% 0%, rgba(183, 255, 60, 0.12), transparent 70%), var(--glass-bg); box-shadow: var(--glass-hi), var(--glow); }
.dl-period { font-size: 13px; font-weight: 600; color: var(--muted); }
.dl-date { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.dl-tag { display: inline-block; margin-top: 2px; font-size: 12px; font-weight: 700; color: var(--muted); }
.dl.is-next .dl-tag { color: var(--brand); }
.pro-teaser { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 18px; border: 1px dashed var(--dash); border-radius: 20px; background: rgba(255, 255, 255, 0.02); }
.pro-teaser h3 { font-size: 16px; font-weight: 700; }
.pro-teaser p { font-size: 14px; margin-top: 4px; }

/* Pro */
.pro-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 48px; align-items: center; }
.pro-list { list-style: none; margin: 20px 0 24px; padding: 0; display: grid; gap: 14px; }
.pro-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; }
.pro-list .ic { width: 44px; height: 44px; border-radius: 14px; background: var(--accent-soft); border: 1px solid var(--accent-line); box-shadow: var(--glass-hi); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.pro-list b { display: block; color: var(--ink); font-size: 16px; }
.pro-list span { font-size: 15px; color: var(--muted); }
.paper-wrap { position: relative; padding: 24px 12px 32px; }
.paper-stack { position: relative; width: min(100%, 390px); margin: 0 auto; aspect-ratio: 210 / 297; }
.paper { position: absolute; inset: 0; background: #f5f5f0; color: #050505; border-radius: 6px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 22px 44px -14px rgba(0, 0, 0, 0.9); padding: 7% 7.5% 6%; display: flex; flex-direction: column; gap: 3.5%; transform: rotate(2.6deg); font-size: clamp(7px, 1.9vw, 10px); line-height: 1.4; overflow: hidden; }
.paper--back { transform: rotate(-3.4deg) translate(-3%, 2%); background: #2a2d2e; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 24px -12px rgba(0, 0, 0, 0.8); padding: 0; border: 1px solid var(--glass-border); }
.paper--back::before { content: ""; position: absolute; left: 8%; right: 8%; top: 9%; height: 9%; border-radius: 3px; background: rgba(183, 255, 60, 0.22); }
.paper-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1.5px solid #050505; padding-bottom: 3%; }
.paper-logo { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 1.15em; }
.paper-logo i { width: 2.2em; height: 2.2em; border-radius: 0.6em; background: #b7ff3c; display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 800; font-size: 1em; }
.paper-meta { text-align: right; color: #585d5f; font-size: 0.9em; }
.paper h4 { font-size: 1.5em; line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; color: #050505; }
.paper-total { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; background: #e9e9e3; border-radius: 8px; padding: 4% 5%; }
.paper-total small { display: block; color: #585d5f; font-size: 0.9em; }
.paper-total b { font-size: 2.4em; line-height: 1; font-weight: 800; letter-spacing: -0.03em; }
.paper table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.paper th { text-align: left; font-weight: 700; color: #585d5f; padding: 0.35em 0; border-bottom: 1px solid #d0d0c9; font-size: 0.9em; }
.paper th:not(:first-child), .paper td:not(:first-child) { text-align: right; }
.paper td { padding: 0.4em 0; border-bottom: 1px dashed #d0d0c9; }
.paper tr.win td { font-weight: 800; }
.paper tr.win td:nth-child(2) { background: #e9ffc4; border-radius: 4px; padding-right: 0.4em; }
.paper h5 { font-size: 1.05em; font-weight: 800; margin: 0 0 0.3em; color: #050505; }
.paper ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.3em; }
.paper li { display: flex; justify-content: space-between; gap: 8px; }
.paper li span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; }
.paper-bars { display: flex; align-items: flex-end; gap: 6px; height: 3.6em; }
.paper-bars i { display: block; flex: 1; border-radius: 3px 3px 0 0; background: #cfd1ca; }
.paper-bars .k { background: #b7ff3c; }
.paper-foot { margin-top: auto; color: #585d5f; font-size: 0.85em; border-top: 1px solid #dcdcd5; padding-top: 2.5%; }

/* legal */
.legal-table-wrap { overflow-x: auto; border-radius: 24px; background: var(--glass-bg); border: 1px solid var(--glass-border); box-shadow: var(--shadow); }
.legal-table { width: 100%; border-collapse: collapse; min-width: 0; font-variant-numeric: tabular-nums; }
.legal-table th, .legal-table td { padding: 12px 16px; text-align: left; vertical-align: middle; }
.legal-table thead th { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: rgba(255, 255, 255, 0.03); border-bottom: 1px solid var(--hairline); }
.legal-table tbody tr + tr td, .legal-table tbody tr + tr th { border-top: 1px dashed var(--dash); }
.legal-table .num { text-align: right; white-space: nowrap; font-weight: 700; color: var(--ink); }
.legal-sector { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center; font-weight: 500; color: var(--body); font-size: 15px; }
.legal-sector .ico { width: 44px; height: 44px; color: var(--ink); --ill-green: #3a3e40; }
.legal-sector b { display: block; color: var(--ink); font-weight: 700; font-size: 15px; }
.legal-note { margin-top: 12px; font-size: 14px; color: var(--muted); }
.tier-list { margin: 28px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.tier-list li { padding: 16px 18px; background: var(--glass-bg); border: 1px solid var(--glass-border); box-shadow: var(--shadow); border-radius: 20px; font-size: 15px; }
.tier-list b { display: block; font-size: 17px; color: var(--ink); margin-bottom: 2px; }
.sources { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.sources a { display: inline-block; padding: 8px 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.sources-h { font-size: 20px; font-weight: 700; margin-top: 32px; }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { background: var(--glass-bg); border: 1px solid var(--glass-border); box-shadow: var(--shadow); border-radius: 20px; padding: 0 20px; transition: border-color 160ms ease; }
.faq details[open] { border-color: var(--glass-border-strong); }
.faq summary { list-style: none; cursor: pointer; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-weight: 700; font-size: 17px; color: var(--ink); padding: 12px 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 24px; height: 24px; flex: none; background: currentColor; -webkit-mask: url("/assets/img/chevron.svg") center / contain no-repeat; mask: url("/assets/img/chevron.svg") center / contain no-repeat; transition: transform 200ms ease; }
.faq details[open] summary::after { transform: rotate(180deg); background: var(--brand); }
.faq details p { padding: 0 0 18px; font-size: 16px; line-height: 1.6; color: var(--body); }

/* ---------- Pro dialog ---------- */

/* sticky mobile bar */
.mobile-bar { display: none; }

/* ---------- Motion ---------- */
.js .reveal { opacity: 0; }
.no-reveal .reveal { opacity: 1 !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .feature, .feature--rev, .pro-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .feature-art { max-width: 300px; }
  .hero-art { width: 280px; }
}
@media (max-width: 860px) {
  .mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(14, 15, 16, 0.7); -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%); border-top: 1px solid var(--glass-border); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 -10px 30px -12px rgba(0, 0, 0, 0.9); }
  .mobile-bar .lbl { display: block; font-size: 13px; color: var(--muted); font-weight: 500; }
  .mobile-bar .val { font-size: 19px; font-weight: 800; color: var(--brand); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
  .mobile-bar .btn { min-height: 48px; padding: 0 22px; }
  body { padding-bottom: 76px; }
}
@media (max-width: 640px) {
  .hero { padding-top: 12px; }
  .hero-head { align-items: flex-start; gap: 12px; margin-bottom: 12px; }
  .hero-title { font-size: 32px; line-height: 1.08; letter-spacing: -0.01em; }
  .hero-sub { font-size: 15px; }
  .hero-art { width: 132px; margin-top: 4px; }
  .calc-card { padding: 8px 18px 12px; border-radius: 24px; }
  .input-box { padding: 20px 0; }
  .field-label { font-size: 16px; }
  .field-meta { font-size: 13px; }
  .sector-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sector-tile { flex-direction: row; justify-content: flex-start; gap: 8px; min-height: 56px; padding: 6px 8px; text-align: left; font-size: 13px; }
  .sector-tile .ico { width: 32px; height: 32px; }
  .money-input { font-size: 34px; }
  .money-input--sm { font-size: 28px; }
  .q-chip { min-height: 48px; }
  .chips { gap: 6px; }
  .q-chip { font-size: 13px; padding: 0 2px; }
  .multi-row select, .multi-row input { padding: 0 8px; font-size: 15px; }
  .multi-row select { font-size: 13.5px; font-weight: 600; }
  .result-card { padding: 20px 18px 22px; border-radius: 24px; }
  .total-num.is-text { font-size: 32px; }
  .total-cur { font-size: 26px; }
  .total-unit { font-size: 16px; }
  .meter-box { padding: 10px 12px 8px; }
  .seg-btn { font-size: 14px; padding: 4px 6px; }
  .bd-row { gap: 12px; }
  .bd-right { max-width: 52%; }
  .section { padding-top: 60px; }
  .section h2 { font-size: 28px; }
  .panel { padding: 18px; border-radius: 24px; }
  .todo-list { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .todo { padding: 14px 16px 16px; }
  .two-cards { grid-template-columns: minmax(0, 1fr); }
  .deadline-grid { gap: 8px; }
  .deadline-grid--monthly { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dl { padding: 10px 12px; }
  .dl-date { font-size: 19px; }
  .pro-teaser { grid-template-columns: minmax(0, 1fr); }
  .legal-table th, .legal-table td { padding: 10px 12px; }
  .legal-sector { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; font-size: 13px; }
  .legal-sector .ico { width: 36px; height: 36px; }
    .paper { font-size: 7.4px; }
}
@media print {
  .topbar, .mobile-bar, .cta-row,   .reveal { opacity: 1 !important; }
}

/* ---------- Pro tools ---------- */
.lock-ico { display: none; }
.is-locked .lock-ico { display: inline-block; }
.text-input { width: 100%; min-height: 48px; padding: 0 16px; border-radius: var(--radius-input); border: 1px solid var(--input-border); background: var(--bg-surface); color: var(--ink); font-size: 16px; }
.text-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(183, 255, 60, 0.16); }
.pro-tools { margin-top: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tool-card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 24px; padding: 22px 24px; box-shadow: var(--shadow); min-width: 0; display: grid; gap: 12px; align-content: start; }
.tool-card--wide { grid-column: 1 / -1; }
.tool-card h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.tool-card p { font-size: 15px; color: var(--muted); }
.tool-card .btn--ghost { justify-self: start; }
.tool-card [data-when] { display: grid; gap: 12px; }
.tool-card [data-when][hidden] { display: none; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.tool-actions .btn { flex: 1 1 180px; padding: 0 18px; }
.chart-box { min-width: 0; }
.chart-svg { display: block; width: 100%; max-width: 760px; height: auto; margin: 0 auto; }
.chart-grid { stroke: var(--hairline); stroke-width: 1; }
.chart-tick, .chart-axis { fill: var(--muted); font-size: 12px; font-weight: 600; }
.chart-a { stroke: var(--brand); stroke-width: 3; }
.chart-b { stroke: var(--ink); stroke-width: 3; }
.chart-mark { stroke-width: 1.5; stroke-dasharray: 4 4; }
.chart-mark--be { stroke: var(--brand); }
.chart-mark--you { stroke: var(--body); }
.chart-dot { stroke: var(--bg-page); stroke-width: 2; }
.chart-dot--be { fill: var(--brand); }
.chart-dot--you { fill: var(--ink); }
.chart-label { fill: var(--ink); font-size: 12.5px; font-weight: 700; }
.chart-label--you { fill: var(--body); }
.chart-legend { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; color: var(--body); }
.chart-legend li { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 18px; height: 4px; border-radius: 2px; }
.sw--a { background: var(--brand); }
.sw--b { background: var(--ink); }
.chart-summary, .chart-empty { font-size: 15px; color: var(--body); }
.scn-form { display: flex; gap: 8px; }
.scn-form .btn--ghost { flex: none; }
.scn-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.scn-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 14px; background: var(--bg-surface); border: 1px solid var(--hairline); }
.scn-item label { display: flex; align-items: center; min-height: 36px; }
.scn-item input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--brand); }
.scn-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: var(--ink); font-size: 15px; }
.scn-name small { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.scn-btn { min-height: 36px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--glass-border); background: transparent; color: var(--ink); font-size: 13px; font-weight: 700; }
.scn-btn:hover { background: rgba(255, 255, 255, 0.08); }
.scn-compare { overflow-x: auto; }
.scn-compare table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.scn-compare th, .scn-compare td { padding: 8px 10px; text-align: right; border-bottom: 1px dashed var(--dash); white-space: nowrap; }
.scn-compare th:first-child, .scn-compare td:first-child { text-align: left; color: var(--muted); font-weight: 600; }
.scn-compare thead th { color: var(--ink); font-weight: 700; }
.scn-compare tr.is-total td { color: var(--brand); font-weight: 800; }
@media (max-width: 860px) {
  .pro-tools { grid-template-columns: minmax(0, 1fr); }
  .tool-card { padding: 18px; }
}

@media screen and (min-width: 1101px) and (max-height: 1100px) {
  .hero { padding: 12px 0 20px; }
  .hero-head { align-items: center; margin-bottom: 14px; }
  .hero-copy { gap: 2px; }
  .hero-title { font-size: 40px; max-width: none; }
  .hero-sub { font-size: 16px; }
  .hero-art { width: 170px; margin-bottom: 0; }
  .workspace { gap: 20px; }
  .calc-card { padding: 6px 28px 14px; }
  .result-card { padding: 16px 28px 18px; }
  .input-box { padding: 14px 0; }
  .input-box:last-of-type { padding-bottom: 16px; }
  .sector-box { padding-top: 12px; padding-bottom: 14px; }
  .field-header { margin-bottom: 8px; }
  .field-label { font-size: 16px; }
  .field-meta { font-size: 14px; }
  .sector-tile { min-height: 70px; padding: 8px 2px 6px; gap: 4px; font-size: 13px; }
  .sector-tile .ico { width: 30px; height: 30px; }
  .sector-info { margin-top: 8px; }
  .money-input { height: 44px; font-size: 34px; }
  .money-input--sm { font-size: 30px; }
  .currency-badge { height: 38px; padding: 0 12px; }
  .slider-block { margin-top: 6px; }
  .slider-ticks { font-size: 14px; height: 20px; }
  .chips { gap: 8px; margin-top: 8px; }
  .q-chip { min-height: 42px; font-size: 15px; }
  .result-label { font-size: 16px; }
  .total-num { font-size: clamp(28px, calc((100cqi - 96px) / (var(--len, 10) * 0.6)), 60px); }
  .total-num.is-text { font-size: 34px; padding: 8px 0 4px; }
  .total-cur { font-size: 24px; }
  .pill-row { margin-top: 8px; }
  .pill { padding: 4px 12px; }
  .meter-box { margin-top: 10px; padding: 8px 14px 4px; }
  .meter-header { font-size: 15px; margin-bottom: 2px; }
  .meter-labels { font-size: 13px; height: 18px; }
  .seg { margin-top: 10px; }
  .seg-btn { min-height: 38px; font-size: 14px; }
  .bd-row { padding: 5px 0; }
  .bd-name { font-size: 16px; }
  .bd-formula { font-size: 13px; }
  .bd-val { font-size: 17px; }
  .next-deadline { margin-top: 8px; padding: 8px 12px; }
  .next-deadline b { font-size: 16px; }
  .next-deadline span { font-size: 14px; }
  .cta-row { gap: 4px; }
  .result-card > .cta-row { padding-top: 10px; }
  .cta-row .btn { min-height: 50px; font-size: 18px; }
  .link-btn { min-height: 36px; font-size: 15px; }
  .toast { min-height: 0; margin-top: 0; }
}
@media screen and (min-width: 1101px) and (max-height: 880px) {
  .hero { padding: 20px 0 18px; }
  .hero-copy { gap: 6px; }
  .hero-title { font-size: 34px; }
  .hero-sub { font-size: 15px; }
  .hero-art { display: none; }
  .hero-head { margin-bottom: 10px; }
  .input-box { padding: 10px 0; }
  .input-box:last-of-type { padding-bottom: 12px; }
  .sector-box { padding-top: 8px; padding-bottom: 10px; }
  .sector-tile { min-height: 56px; padding: 6px 2px 4px; gap: 2px; }
  .sector-tile .ico { width: 22px; height: 22px; }
  .money-input { height: 40px; font-size: 30px; }
  .q-chip { min-height: 38px; }
  .total-num { font-size: clamp(26px, calc((100cqi - 96px) / (var(--len, 10) * 0.6)), 48px); }
  .bd-row { padding: 3px 0; }
  .bd-formula { font-size: 12px; }
  .meter-box { padding: 6px 12px 2px; }
  .cta-row .btn { min-height: 46px; font-size: 17px; }
}
@media screen and (min-width: 1101px) and (max-height: 810px) {
  .topbar { height: 64px; }
  .hero { padding: 18px 0 12px; }
  .hero-title { font-size: 30px; }
  .hero-sub { font-size: 14px; }
  .pill-row { margin-top: 6px; }
  .meter-box { margin-top: 6px; }
  .seg { margin-top: 6px; }
  .next-deadline { margin-top: 6px; }
  .result-card > .cta-row { padding-top: 8px; }
  .total-num { font-size: clamp(26px, calc((100cqi - 96px) / (var(--len, 10) * 0.6)), 44px); }
  .hero-copy { gap: 6px; }
  .hero-head { margin-bottom: 14px; }
  .sector-box .note-small { margin-top: 6px; }
  .sector-tile { min-height: 50px; }
  .calc-card { padding: 2px 24px 10px; }
  .result-card { padding: 10px 24px 12px; }
  .input-box { padding: 8px 0; }
  .slider-ticks { height: 18px; font-size: 13px; }
  .q-chip { min-height: 36px; font-size: 14px; }
  .seg-btn { min-height: 34px; }
  .next-deadline { padding: 6px 12px; }
  .cta-row .btn { min-height: 44px; }
  .link-btn { min-height: 32px; }
}
