:root {
  color-scheme: light;
  --ink: #162a3a;
  --muted: #3e5160;
  --line: #dce4df;
  --paper: #ffffff;
  --canvas: #f6f7f4;
  --green: #08745d;
  --green-dark: #065b4a;
  --green-soft: #e4f3ed;
  --blue: #2b6388;
  --blue-soft: #eaf2f8;
  --amber: #8a5a14;
  --amber-soft: #fff3dc;
  --red: #a53e42;
  --shadow: 0 10px 28px rgba(22, 42, 58, .07);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html { min-width: 0; scroll-behavior: smooth; scroll-padding-block: 1rem; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 16px; line-height: 1.5; }
button, input, select { font: inherit; }
button, a, select, input { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
[hidden] { display:none!important; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #76500f; outline-offset: 3px; }
.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; }
.skip-link { position:absolute; left:8px; top:8px; z-index:30; transform:translateY(-160%); min-height:44px; padding:8px 12px; border-radius:12px; background:#163c34; color:#fff; font-weight:700; }
.skip-link:focus { transform:none; }
.field-error { margin:0; color:#7d2e32; font-size:.9rem; font-weight:700; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color:#7d2e32; }
.prototype-banner { display:flex; align-items:center; justify-content:center; gap:9px; min-height:34px; padding:5px 16px; background:#163c34; color:#fff; font-size:.78rem; letter-spacing:.015em; text-align:center; }
.prototype-dot { width:8px; height:8px; border-radius:50%; background:#8ad2ad; flex:none; }
.topbar { display:flex; align-items:center; justify-content:space-between; gap:20px; max-width:1240px; margin:auto; padding:18px 30px; }
.brand { display:inline-flex; align-items:center; gap:11px; min-width:max-content; }
.brand-mark { display:grid; place-items:center; width:42px; height:42px; border-radius:14px 14px 14px 5px; background:transparent; color:#fff; font-size:1.5rem; font-weight:800; overflow:hidden; }
.brand-logo { display:block; width:42px; height:42px; border-radius:14px 14px 14px 5px; }
.admin-body { background:var(--bg, #f6f7f4); }
.admin-panel { max-width:42rem; margin:1.5rem auto; }
.admin-out { margin-top:1rem; padding:1rem; background:#0f1f1a; color:#d7f3ea; border-radius:12px; overflow:auto; font-size:.85rem; }
.brand-name { display:flex; align-items:baseline; gap:4px; font-size:1.1rem; font-weight:800; letter-spacing:.025em; }
.brand-name b { color:var(--green); }
.brand-name small { align-self:center; margin-left:8px; color:var(--muted); font-size:.56rem; font-weight:700; letter-spacing:.13em; }
.topbar-right { display:flex; align-items:center; gap:18px; }
.demo-user { display:flex; align-items:center; gap:9px; color:var(--muted); font-size:.88rem; }
.avatar { display:grid; place-items:center; width:34px; height:34px; border-radius:50%; background:#e2eee8; color:var(--green-dark); font-weight:750; }
.language-picker { position: relative; }
.language-picker > button { display: inline-flex; align-items: center; gap: 8px; width: 100%; max-width: 15.5rem; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font: inherit; cursor: pointer; }
.language-picker > button:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 2px; }
.language-menu { position: absolute; z-index: 30; top: calc(100% + 4px); right: 0; min-width: 100%; margin: 0; padding: 6px; list-style: none; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.language-menu button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 6px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.language-menu button:hover, .language-menu button:focus { background: #edf2ef; }
.flag-icon { width: 22px; height: 16px; flex: none; overflow: visible; filter: drop-shadow(0 1px 1px rgba(22, 42, 58, .28)); }
.main-nav { border-top:1px solid rgba(22,42,58,.06); border-bottom:1px solid var(--line); background:rgba(255,255,255,.64); }
.nav-inner { display:grid; grid-template-columns:repeat(6, minmax(0, 1fr)); align-items:start; justify-items:center; gap:12px; max-width:1180px; margin:auto; padding:12px 16px 14px; }
.nav-button { display:flex; flex-direction:column; align-items:center; justify-content:flex-start; gap:7px; box-sizing:border-box; width:100%; min-width:0; min-height:88px; padding:2px 4px 6px; border:0; border-radius:0; background:transparent; color:var(--muted); cursor:pointer; font-size:.82rem; font-weight:650; line-height:1.15; box-shadow:none; }
.nav-button:hover { background:transparent; color:var(--ink); }
.nav-button[aria-current="page"],
.nav-button[aria-current="page"]:hover { background:transparent; border:0; color:var(--green-dark); box-shadow:none; }
.nav-button span:not(.nav-icon) { display:block; width:100%; min-width:0; line-height:1.15; text-align:center; white-space:nowrap; }
.page-shell { width:min(100% - 48px, 1120px); margin:0 auto; padding:34px 0 64px; }
.page-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:22px; }
.page-heading-content { display:flex; min-width:0; align-items:flex-start; gap:13px; }
.page-heading-content > .feature-icon { width:44px; height:44px; flex:none; border-radius:14px; }
.page-heading-text { min-width:0; }
.eyebrow { display:block; margin:0 0 7px; color:var(--green); font-size:.72rem; font-weight:800; letter-spacing:.13em; text-transform:uppercase; }
h1,h2,h3,p { margin-top:0; }
h1 { margin-bottom:7px; font-size:clamp(1.8rem,3.4vw,2.55rem); line-height:1.13; letter-spacing:-.035em; }
h2 { margin-bottom:8px; font-size:1.3rem; line-height:1.25; letter-spacing:-.018em; }
h3 { margin-bottom:5px; font-size:1rem; }
.lede { max-width:650px; margin:0; color:var(--muted); font-size:1.03rem; }
.tax-year-chip { display:flex; align-items:center; gap:8px; padding:10px 13px; border:1px solid var(--line); border-radius:12px; background:#fff; font-size:.9rem; font-weight:650; white-space:nowrap; }
.card { border:1px solid var(--line); border-radius:20px; background:var(--paper); box-shadow:var(--shadow); }
.card-pad { padding:23px; }
.section-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:17px; }
.section-head p { margin:0; color:var(--muted); font-size:.92rem; }
.summary-card { margin-bottom:22px; padding:22px 24px; }
.summary-top { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:18px; }
.summary-top p { margin:0; color:var(--muted); font-size:.9rem; }
.summary-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.metric { min-width:0; padding:16px 17px; border-radius:15px; background:#f6f8f6; }
.metric-label { display:flex; align-items:center; gap:7px; margin-bottom:7px; color:var(--muted); font-size:.86rem; font-weight:650; }
.metric-value { margin:0; color:var(--ink); font-size:clamp(1.42rem,2.8vw,1.9rem); font-weight:780; letter-spacing:-.035em; font-variant-numeric:tabular-nums; }
.metric.balance { background:var(--green-soft); }
.metric.balance .metric-value { color:var(--green-dark); }
.fine-print { margin:13px 0 0; color:var(--muted); font-size:.82rem; }
.action-section { margin-bottom:22px; }
.action-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.action-tile { display:flex; min-height:142px; flex-direction:column; align-items:flex-start; justify-content:space-between; gap:16px; padding:19px; border:1px solid var(--line); border-radius:18px; background:#fff; text-align:left; cursor:pointer; box-shadow:0 5px 16px rgba(22,42,58,.035); transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.action-tile:hover { transform:translateY(-2px); border-color:#a9cdbb; box-shadow:var(--shadow); }
.feature-icon { display:grid; place-items:center; width:40px; height:40px; flex:none; border-radius:13px; font-size:1.12rem; font-weight:750; }
.feature-icon--home,.feature-icon--income { background:var(--green-soft); color:var(--green-dark); }
.feature-icon--records { background:#edf2f4; color:#365968; }
.feature-icon--expense { background:#f9ece9; color:#8b3f34; }
.feature-icon--receipt { background:#edf1fa; color:#344f8a; }
.feature-icon--reports { background:#e8f1f2; color:#315b62; }
.feature-icon--letters { background:var(--amber-soft); color:#70470c; }
.feature-icon--deadlines { background:#f2edf9; color:#60437c; }
.feature-icon--account { background:#e8f1ea; color:#315a3c; }
.nav-button .feature-icon.nav-icon { display:grid; place-items:center; width:56px; height:56px; min-width:56px; border-radius:16px; font-size:1.35rem; line-height:1; box-shadow:inset 0 0 0 1px rgba(22,42,58,.06), 0 4px 10px rgba(22,42,58,.05); }
.nav-button:hover .feature-icon.nav-icon,
.nav-button[aria-current="page"]:hover .feature-icon.nav-icon { box-shadow:inset 0 0 0 1px rgba(22,42,58,.1), 0 6px 14px rgba(22,42,58,.07); }
.tile-icon { border-radius:13px; }
.tile-copy { display:block; }
.tile-title { display:block; margin-bottom:3px; font-weight:750; letter-spacing:-.015em; }
.tile-detail { display:block; color:var(--muted); font-size:.82rem; line-height:1.4; }
.home-lower { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(250px,.8fr); gap:18px; align-items:start; }
.record-list { display:grid; gap:0; }
.record-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:12px; padding:13px 0; border-top:1px solid #edf0ed; }
.record-main { min-width:0; }
.record-title { display:block; overflow:hidden; color:var(--ink); font-weight:650; text-overflow:ellipsis; white-space:nowrap; }
.record-meta { display:block; color:var(--muted); font-size:.82rem; }
.record-amount { font-weight:750; font-variant-numeric:tabular-nums; white-space:nowrap; }
.amount-income { color:var(--green-dark); }
.amount-expense { color:#994c46; }
.quiet-link { border:0; background:transparent; color:var(--green-dark); cursor:pointer; font-size:.88rem; font-weight:700; text-decoration:underline; text-underline-offset:3px; }
.welcome-card { margin-bottom:22px; padding:19px 21px; border:1px solid #ead8af; border-radius:18px; background:#fffaf0; }
.welcome-card p { margin:0 0 13px; color:#60503a; font-size:.92rem; }
.profile-options { display:flex; flex-wrap:wrap; gap:8px; }
.chip-button { min-height:44px; padding:8px 12px; border:1px solid #d8c8a7; border-radius:999px; background:#fff; color:var(--ink); cursor:pointer; font-size:.87rem; font-weight:650; }
.chip-button[aria-pressed="true"] { border-color:var(--green); background:var(--green-soft); color:var(--green-dark); }
.small-note { margin:11px 0 0!important; color:var(--muted)!important; font-size:.78rem!important; }
.notice-box { display:flex; align-items:flex-start; gap:12px; padding:15px 17px; border:1px solid #d8e6ef; border-radius:15px; background:var(--blue-soft); color:#244c64; }
.notice-box p { margin:0; font-size:.9rem; }
.notice-icon { flex:none; font-size:1.12rem; }
.help-button { display:inline-grid; place-items:center; width:36px; height:36px; padding:0; border:1.5px solid #547265; border-radius:50%; background:#fff; color:#244c3b; cursor:pointer; font-size:1rem; font-weight:800; line-height:1; vertical-align:middle; }
.help-button:hover { background:var(--green-soft); }
.page-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.period-tabs { display:flex; flex-wrap:wrap; gap:7px; padding:5px; border:1px solid var(--line); border-radius:14px; background:#f4f6f3; }
.period-tabs button { min-height:44px; padding:8px 15px; border:0; border-radius:10px; background:transparent; color:var(--muted); cursor:pointer; font-weight:700; }
.period-tabs button[aria-pressed="true"] { background:#fff; color:var(--green-dark); box-shadow:0 2px 7px rgba(22,42,58,.08); }
.report-controls { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:14px; margin:17px 0; }
.select-control { min-height:44px; padding:8px 34px 8px 11px; border:1px solid var(--line); border-radius:11px; background:#fff; color:var(--ink); }
.report-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:11px; }
.report-stat { padding:15px; border-radius:14px; background:#f6f8f6; }
.report-stat span { display:block; margin-bottom:5px; color:var(--muted); font-size:.83rem; }
.report-stat strong { display:block; font-size:1.22rem; font-variant-numeric:tabular-nums; }
.button-row { display:flex; flex-wrap:wrap; gap:9px; margin-top:18px; }
.rehearsal-share-bar { position:sticky; top:0; z-index:6; margin-top:12px; margin-bottom:4px; padding:8px 0; background:var(--paper,#fff); }
.rehearsal-share-bar .button { flex:1 1 100%; min-height:48px; }
#rehearsal-share { scroll-margin-top:5.5rem; }
#rehearsal-share-files { overflow-wrap:anywhere; }
.button { display:inline-flex; min-height:46px; align-items:center; justify-content:center; gap:8px; padding:10px 15px; border:1px solid var(--line); border-radius:12px; background:#fff; color:var(--ink); cursor:pointer; font-weight:700; }
a.button { text-decoration:none; }
.button:disabled { cursor:not-allowed; opacity:.55; filter:grayscale(.2); }
.button-primary { border-color:var(--green); background:var(--green); color:#fff; }
.button-primary:hover { background:var(--green-dark); }
.button-secondary:hover { border-color:#b2c9bd; background:#f7faf7; }
.button-danger { border-color:#ead0cc; color:#95443d; }
.field-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; margin:18px 0; }
.setup-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin:18px 0; }
.setup-grid .full { grid-column:1 / -1; }
.field-label-row { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.field-label-row label { margin:0; }
.field-label-row .help-button { flex:none; }
.setup-actions { justify-content:flex-end; }
.field { display:grid; gap:7px; min-width:0; }
.field.full { grid-column:1/-1; }
.field label { font-size:.9rem; font-weight:700; }
.field input, .field select { width:100%; min-height:49px; padding:10px 12px; border:1px solid #cdd8d2; border-radius:12px; background:#fff; color:var(--ink); }
.field input:disabled, .field select:disabled { border-color:#d9dfda; background:#f0f2ef; color:#68746d; cursor:not-allowed; }
.field-hint { color:var(--muted); font-size:.79rem; }
.wizard-progress { display:flex; align-items:center; gap:8px; margin:5px 0 18px; color:var(--muted); font-size:.86rem; font-weight:650; }
.progress-track { flex:1; height:7px; overflow:hidden; border-radius:99px; background:#e5eae6; }
.progress-fill { height:100%; border-radius:inherit; background:var(--green); transition:width .2s ease; }
.summary-list { display:grid; gap:0; margin:14px 0; }
.summary-line { display:flex; align-items:baseline; justify-content:space-between; gap:14px; padding:11px 0; border-bottom:1px solid #edf0ed; }
.summary-line span { color:var(--muted); }
.summary-line strong { text-align:right; overflow-wrap:anywhere; }
.checkline { display:flex; align-items:flex-start; gap:10px; margin:14px 0; }
.checkline input { width:20px; height:20px; margin:2px 0 0; accent-color:var(--green); }
.receipt-sample { display:flex; align-items:center; gap:13px; padding:15px; border:1px dashed #aec1b5; border-radius:15px; background:#f8fbf8; }
.receipt-sample-icon { display:grid; place-items:center; width:44px; height:50px; border-radius:8px; background:#fff; box-shadow:0 2px 6px #162a3a12; font-size:1.35rem; }
.receipt-sample p { margin:0; color:var(--muted); font-size:.83rem; }
.receipt-privacy, .receipt-manual-note, .receipt-discard-note { margin-bottom:16px; }
.receipt-intro { margin:12px 0 18px; }
.receipt-picker { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.receipt-picker:focus-within .button { outline:3px solid #76500f; outline-offset:3px; }
.receipt-picker .small-note { flex-basis:100%; margin:0; }
.receipt-picker .button { cursor:pointer; }
.receipt-preview { margin:16px 0; padding:10px; border:1px solid var(--line); border-radius:14px; background:#f8fbf8; }
.receipt-preview img { display:block; width:100%; max-height:360px; object-fit:contain; border-radius:8px; }
.receipt-preview figcaption { padding:8px 3px 0; color:var(--muted); font-size:.82rem; }
.receipt-actions { justify-content:flex-start; }
.receipt-actions .button { flex:1 1 190px; }
.receipt-cancel-row { margin-top:8px; }
.receipt-summary { margin:14px 0; }
.letter-grid { display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); gap:18px; }
.letter-paper { min-height:230px; padding:22px; border:1px solid #e2ddd3; border-radius:14px; background:linear-gradient(160deg,#fffefb,#fbf8f0); box-shadow:0 6px 16px #162a3a0c; }
.letter-paper .letter-mark { color:#6d7790; font-size:.75rem; font-weight:800; letter-spacing:.1em; }
.letter-paper p { color:#4e5962; font-family:Georgia,serif; font-size:.92rem; }
.deadline-row { display:flex; align-items:flex-start; gap:12px; padding:14px 0; border-top:1px solid #edf0ed; }
.deadline-bullet { display:grid; place-items:center; width:32px; height:32px; flex:none; border-radius:10px; background:var(--amber-soft); color:var(--amber); }
.plan-card { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:22px; border:1px solid var(--line); border-radius:18px; background:#fff; }
.plan-price { color:var(--green-dark); font-size:1.55rem; font-weight:600; letter-spacing:-.015em; white-space:nowrap; }
.plan-price-pro { display:flex; align-items:baseline; flex-wrap:wrap; column-gap:.42rem; row-gap:.15rem; line-height:1.15; white-space:normal; }
.plan-price-pro .plan-amount { color:var(--green-dark); font-weight:600; font-size:inherit; letter-spacing:-.015em; white-space:nowrap; }
.plan-price-pro .plan-period { color:var(--muted); font-size:.78em; font-weight:400; letter-spacing:0; white-space:nowrap; }
.locked-note { color:var(--muted); font-size:.86rem; }
.toast { position:fixed; z-index:10; right:20px; bottom:24px; max-width:min(92vw,420px); padding:13px 16px; border-radius:13px; background:#183a32; color:#fff; box-shadow:var(--shadow); font-weight:650; }
.help-dialog { width:min(500px,calc(100vw - 28px)); max-height:min(85dvh,640px); overflow:auto; padding:24px; border:0; border-radius:20px; color:var(--ink); box-shadow:0 20px 70px #0f222f40; }
.help-dialog::backdrop { background:rgba(13,31,40,.46); backdrop-filter:blur(3px); }
.dialog-head { display:flex; align-items:flex-start; justify-content:space-between; gap:15px; }
.dialog-head h2 { margin-bottom:12px; }
.icon-button { display:grid; place-items:center; width:42px; height:42px; border:1px solid var(--line); border-radius:12px; background:#fff; cursor:pointer; font-size:1.4rem; }
.help-dialog p { color:#425361; }
.help-dialog .dialog-caution { padding:12px; border-radius:11px; background:var(--amber-soft); color:#69480f; font-size:.87rem; }
.wizard-actions { display:flex; flex-wrap:wrap; justify-content:space-between; gap:10px; margin-top:20px; padding-top:16px; border-top:1px solid #edf0ed; scroll-margin-bottom:1rem; }
.wizard-actions .button { min-width:118px; }
.empty-state { padding:25px; border:1px dashed var(--line); border-radius:15px; color:var(--muted); text-align:center; }
.landlord-notice { margin:-6px 0 16px; }
.account-profile { margin-top:18px; }
.auth-panel { margin:0 0 18px; }
.auth-status { margin:0 0 12px; padding:10px 12px; border-radius:11px; background:var(--green-soft); color:var(--green-dark); font-size:.9rem; font-weight:650; }
.integration-warning { margin-top:12px; }
.auth-actions { margin-top:12px; }
.auth-panel[hidden], #auth-parking { display:none!important; }
@media (max-width:800px) {
  .topbar { padding:14px 20px; }
  .page-shell { width:min(100% - 36px, 690px); padding-top:22px; }
  .action-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .home-lower { grid-template-columns:1fr; }
  .letter-grid { grid-template-columns:1fr; }
}
.plan-compare { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.plan-compare .plan-card { align-items:flex-start; flex-direction:column; min-width:0; }
.plan-compare .plan-price { white-space:normal; overflow-wrap:anywhere; }
@media (max-width:560px) {
  body { font-size:15px; }
  .prototype-banner { justify-content:flex-start; min-height:40px; padding-inline:14px; overflow-wrap:anywhere; font-size:.85rem; text-align:start; }
  .topbar { align-items:flex-start; flex-wrap:wrap; gap:10px; padding:13px 15px; }
  .brand { gap:8px; }
  .brand-mark { width:36px; height:36px; border-radius:12px 12px 12px 4px; font-size:1.25rem; }
  .brand-name { display:block; font-size:.95rem; line-height:1.15; }
  .brand-name small { display:block; margin:3px 0 0; font-size:.7rem; letter-spacing:.04em; }
  .topbar-right { flex:1 1 160px; flex-direction:column; align-items:stretch; gap:6px; }
  .language-control, .language-picker, .language-picker > button { width:100%; max-width:none; }
  .demo-user { gap:5px; font-size:.85rem; }
  .avatar { width:26px; height:26px; }
  .language-control select, .field input, .field select { min-height:44px; font-size:16px; }
  .nav-inner { grid-template-columns:repeat(3, minmax(0, 1fr)); gap:10px 8px; padding:12px 10px 14px; }
  .nav-button { min-height:96px; font-size:.78rem; }
  .nav-button span:not(.nav-icon) { overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; white-space:normal; }
  .page-shell { width:calc(100% - 28px); padding:16px 0 30px; }
  .page-heading { align-items:flex-start; flex-direction:column; gap:9px; margin-bottom:14px; }
  .page-heading-content { gap:10px; }
  .page-heading-content > .feature-icon { width:38px; height:38px; border-radius:12px; font-size:1rem; }
  h1, .eyebrow, .tile-title, .tile-detail, .lede, .toast { overflow-wrap:anywhere; }
  h1 { font-size:clamp(1.45rem, 7vw, 1.8rem); }
  .eyebrow { letter-spacing:.04em; }
  .record-title { white-space:normal; overflow:visible; text-overflow:unset; }
  .record-row { grid-template-columns:minmax(0,1fr); }
  .toast { overflow-wrap:anywhere; }
  .lede { font-size:.95rem; }
  .tax-year-chip { align-self:flex-start; min-height:40px; }
  .summary-card { margin-bottom:15px; padding:14px; border-radius:17px; }
  .summary-grid, .report-stats { grid-template-columns:1fr; gap:8px; }
  .metric { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 13px; }
  .metric-label { margin:0; }
  .metric-value { font-size:1.23rem; }
  .action-grid { gap:9px; }
  .action-tile { min-height:116px; gap:9px; padding:12px; border-radius:15px; }
  .action-tile .feature-icon { width:36px; height:36px; border-radius:11px; font-size:1rem; }
  .tile-title { font-size:.92rem; }
  .tile-detail { font-size:.75rem; }
  .card-pad { padding:15px; }
  .section-head { margin-bottom:10px; }
  .field-grid, .page-grid, .setup-grid { grid-template-columns:1fr; gap:10px; margin-block:14px; }
  .setup-grid .full { grid-column:auto; }
  .field.full { grid-column:auto; }
  .report-controls { align-items:stretch; flex-direction:column; }
  .period-tabs button { flex:1; }
  .button-row .button { flex:1 1 140px; }
  .plan-compare { grid-template-columns:1fr; }
  .plan-card { align-items:flex-start; flex-direction:column; gap:11px; padding:18px; }
  .plan-price { font-size:1.35rem; }
  .wizard-actions { position:static; margin:16px 0 0; padding:12px 0 max(8px,env(safe-area-inset-bottom)); background:transparent; }
  .wizard-actions .button { min-width:0; flex:1 1 120px; }
  .help-dialog { padding:20px; border-radius:18px; }
  .help-button { width:36px; height:36px; }
  .home-lower { gap:12px; }
  .account-profile { margin-top:14px; }
  .auth-panel { padding:14px; }
  .auth-actions .button { flex:1 1 140px; }
  .toast { right:12px; bottom:14px; left:12px; max-width:none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior:auto!important; transition-duration:.01ms!important; animation-duration:.01ms!important; }
}
@media print {
  .prototype-banner,.topbar,.main-nav,.button,.help-button,.welcome-card { display:none!important; }
  body { background:#fff; }
  .page-shell { width:100%; padding:0; }
  .card { box-shadow:none; break-inside:avoid; }
}

/* Integration keeps the approved controls in normal flow, including small viewports. */
.progress-width-1 { display:block; width:33%; }
.progress-width-2 { display:block; width:67%; }
.progress-width-3 { display:block; width:100%; }
.record-row { flex-wrap:wrap; }
.record-row .quiet-link { min-height:44px; padding:8px; }
.record-main { min-width:0; overflow-wrap:anywhere; }
.report-period { overflow-wrap:anywhere; }
@media print {
  .period-tabs,.report-controls,.quiet-link { display:none!important; }
  .prototype-banner { display:block!important; background:white; color:#111; }
  .record-list,.card { break-inside:auto; }
  .record-row { break-inside:avoid; }
  #app::before { content:'EMOTAX UK · Local test'; display:block; font-weight:bold; margin-bottom:12px; }
}

.entry-method { margin:14px 0; padding:12px; border:1px solid var(--line); border-radius:14px; }
.entry-method legend { font-weight:700; padding:0 4px; }
.entry-method label { display:flex; align-items:center; gap:8px; min-height:44px; }
.deadline-row div { min-width:0; }
.deadline-row h3, .deadline-row p, #legal-drafts h3, #legal-drafts p { overflow-wrap:anywhere; }

/* Presentation for the six-area demonstration; no change to data authority. */
.demo-read-notice { border:1px solid #bed8e5; background:#eef7fb; color:#19384c; border-radius:16px; padding:14px 18px; margin-bottom:20px; }
.demo-read-notice p { margin:5px 0 0; line-height:1.5; }
.action-tile[data-nav] { text-align:start; cursor:pointer; }
.action-tile[data-nav] .tile-copy { display:flex; justify-content:space-between; align-items:center; gap:10px; width:100%; }
.receipt-read-card { border:1px solid var(--line); border-radius:12px; margin:16px 0; padding:16px; }
.receipt-read-card summary { min-height:44px; cursor:pointer; font-weight:700; overflow-wrap:anywhere; }
.receipt-read-card dl { display:grid; grid-template-columns:auto 1fr; gap:10px 18px; }
.receipt-read-card dd { margin:0; }
.assistant-questions { display:flex; flex-wrap:wrap; gap:12px; }
.assistant-questions button[aria-pressed="true"] { border-color:#155d79; background:#e7f4fa; }
.assistant-answer { padding:24px; margin:20px 0; border-left:4px solid #155d79; background:#f4f8fb; font-size:1.1rem; line-height:1.7; border-radius:8px; }
.assistant-sheet textarea, .assistant-sheet input[type="text"], .assistant-sheet input[inputmode="decimal"] { width:100%; min-height:44px; font-size:16px; }
.assistant-sheet textarea { min-height:140px; }
.assistant-result { scroll-margin-bottom:40vh; }
.touch-target { display:inline-flex; align-items:center; justify-content:center; min-height:44px; min-width:44px; padding:8px 12px; }
.action-tile-closed { cursor:default; }
.action-tile-closed:hover { transform:none; }
.tile-note { margin:0; font-size:.92rem; line-height:1.35; }
@media (max-width:560px) { .assistant-sheet textarea { min-height:96px; } }
button:disabled { cursor:not-allowed; opacity:.55; }
:focus-visible { outline:3px solid #1365b3; outline-offset:3px; }
@media (max-width:560px) {
  .main-nav { position:static; }
  .nav-button span:not(.nav-icon) { text-align:center; }
  .assistant-questions .button { width:100%; text-align:start; white-space:normal; }
  .assistant-answer { padding:16px; font-size:1rem; }
  .demo-read-notice { padding:12px; font-size:.9rem; }
}

/* Existing form styles, with room for preview actions on narrow screens. */
.preview-actions { margin-bottom:20px; }
.preview-actions .button-row, .preview-confirm { margin-top:16px; }
.preview-confirm { align-items:flex-start; line-height:1.5; }
#preview-status { border:2px solid #a66716; background:#fff8e8; margin-bottom:20px; }
.record-row { flex-wrap:wrap; }
.record-main { flex:1 1 160px; min-width:0; }
@media(max-width:560px){ .preview-actions .button { width:100%; white-space:normal; } .wizard-actions,.receipt-actions { flex-wrap:wrap; } .wizard-actions .button { white-space:normal; } }
