/* Rentari IQ bookkeeping app. Builds on tokens.css and btn-action.css
   (copied from Rentari.AI) and follows Rentari.AI DESIGN.md: lime primary
   actions with dark text, purple outlines for secondary actions, #47AE72 and
   #D8293E for money and status, Open Sans. */

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("/static/fonts/open-sans-latin-variable.woff2") format("woff2");
}

:root {
  --ui-font: "Open Sans", Arial, sans-serif;
  --rail-width: 248px;
  --header-height: 60px;
  --money-in: var(--success);
  --money-out: var(--danger);
  --field-border: var(--brand-purple);
  --canvas: var(--surface-canvas-app);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--ui-font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--canvas);
}
a { color: var(--brand-deep-purple); }
a:hover { color: var(--brand-purple-fill-1); }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--btn-action-ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
h1, h2, h3 { line-height: 1.25; margin: 0; }
h1 { font-size: 1.625rem; font-weight: 700; }
h2 { font-size: 1.25rem; font-weight: 650; }
h3 { font-size: 1.05rem; font-weight: 650; }
p { margin: 0 0 var(--space-md); }
.muted { color: var(--text-muted); }
.small { font-size: 0.8125rem; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.money-in { color: var(--money-in); }
.money-out { color: var(--money-out); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 50; }
.skip-link:focus { left: 8px; }

/* ------------------------------------------------------------------ shell */
.shell { display: grid; grid-template-columns: var(--rail-width) 1fr; min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: var(--space-sm); padding: var(--space-lg) var(--space-md);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); padding: 2px 6px 8px; }
.brand svg { flex: none; }
.brand__name { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand__name b { color: var(--brand-deep-purple); }
.brand__by { display: block; font-size: 0.7rem; color: var(--text-muted); margin-top: -2px; }
.rail .btn-add { width: 100%; justify-content: center; }
.nav { display: flex; flex-direction: column; gap: 2px; margin-top: var(--space-sm); }
.nav a, .nav summary {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-md);
  color: var(--text-secondary); text-decoration: none; font-weight: 550; cursor: pointer; list-style: none;
}
.nav summary::-webkit-details-marker { display: none; }
.nav summary::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform var(--dur-fast); }
.nav details[open] > summary::after { transform: rotate(-135deg); }
.nav a:hover, .nav summary:hover { background: var(--menu-lavender); color: var(--text); }
.nav .sub a { padding-left: 40px; font-weight: 500; }
.nav a[aria-current="page"] { background: var(--pastel-purple); color: var(--text); box-shadow: inset 3px 0 0 var(--brand-purple); }
.nav svg { width: 20px; height: 20px; flex: none; }
.nav .badge { margin-left: auto; }
.rail__foot { margin-top: auto; border-top: 1px solid var(--border); padding-top: var(--space-sm); }
.progress-ring { margin-left: auto; width: 30px; height: 30px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--header-height);
  display: flex; align-items: center; gap: var(--space-md); padding: 0 var(--space-2xl);
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.topbar .menu-btn { display: none; }
.search { flex: 1; max-width: 640px; position: relative; }
.search input[type="search"] { width: 100%; padding: 9px 14px 9px 38px; border-radius: var(--radius-pill); border: 1px solid var(--border-strong); background: var(--surface-alt); font: inherit; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-muted); }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--elev-3); padding: var(--space-sm); max-height: 70vh; overflow: auto; }
.search-results h4 { margin: 8px 8px 4px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--text-muted); }
.search-results a { display: block; padding: 6px 8px; border-radius: var(--radius-sm); text-decoration: none; color: var(--text); }
.search-results a:hover, .search-results a:focus { background: var(--menu-lavender); }
.account-menu { margin-left: auto; position: relative; }
.account-menu summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 6px 10px; border-radius: var(--radius-md); font-weight: 600; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary:hover { background: var(--menu-lavender); }
.account-menu .menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 230px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--elev-3); padding: 6px; z-index: 30; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--menu-lavender); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--pastel-purple); display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; color: var(--brand-deep-purple); }

.trialbar { display: flex; align-items: center; gap: var(--space-md); padding: 8px var(--space-2xl); background: var(--pastel-lime); border-bottom: 1px solid var(--border); font-weight: 600; }
.trialbar .btn { margin-left: auto; }
.notice { padding: 10px var(--space-2xl); background: var(--warning-bg, #fff7d6); border-bottom: 1px solid var(--border); }

.page { padding: var(--space-xl) var(--space-2xl) var(--space-4xl); max-width: 1400px; width: 100%; }
.crumbs { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 4px; }
.crumbs a { color: var(--text-muted); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-lg); flex-wrap: wrap; margin-bottom: var(--space-lg); }
.page-head .actions { display: flex; gap: var(--space-sm); flex-wrap: wrap; }
.page-sub { margin-top: 4px; color: var(--text-muted); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  min-height: 38px; padding: 7px 16px; border-radius: var(--radius-md);
  font: inherit; font-weight: 650; font-size: 0.9375rem; text-decoration: none; cursor: pointer;
  border: 1px solid var(--brand-purple); background: var(--surface); color: var(--brand-deep-purple);
  transition: background var(--dur-fast), box-shadow var(--dur-fast);
}
.btn:hover { background: var(--menu-lavender); color: var(--brand-purple-fill-1); }
.btn-primary { background: var(--btn-action-bg); color: var(--btn-action-fg); border-color: transparent; }
.btn-primary:hover { background: var(--btn-action-hover); color: var(--btn-action-fg); }
.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg, #fde8eb); color: var(--danger); }
.btn-quiet { border-color: transparent; background: transparent; }
.btn-sm { min-height: 30px; padding: 3px 10px; font-size: 0.8125rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.btn-group { display: inline-flex; }
.btn-group .btn + .btn { margin-left: -1px; }
.btn-group .btn:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.btn-group .btn:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--brand-deep-purple); text-decoration: underline; cursor: pointer; }

/* ------------------------------------------------------------------ cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--elev-1); }
.card + .card { margin-top: var(--space-lg); }
.card-pad { padding: var(--space-xl); }
.card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-md); padding: var(--space-lg) var(--space-xl); border-bottom: 1px solid var(--border-hairline); }
.card-body { padding: var(--space-lg) var(--space-xl); }
.grid { display: grid; gap: var(--space-lg); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { padding: var(--space-lg) var(--space-xl); }
.stat .label { font-size: 0.8125rem; color: var(--text-muted); font-weight: 600; }
.stat .value { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.empty { text-align: center; padding: var(--space-3xl) var(--space-xl); }
.empty h2 { margin-bottom: 8px; }
.empty p { color: var(--text-muted); max-width: 52ch; margin: 0 auto var(--space-lg); }

.badge { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: var(--radius-pill); font-size: 0.75rem; font-weight: 700; background: var(--surface-alt); color: var(--text-secondary); border: 1px solid var(--border); }
.badge-lime { background: var(--ink-purple-lime); color: var(--btn-action-fg); border-color: transparent; }
.badge-purple { background: var(--pastel-purple); color: var(--brand-deep-purple); border-color: transparent; }
.badge-warn { background: var(--attention-gold); color: #1b1600; border-color: transparent; }
.badge-ok { background: color-mix(in srgb, var(--success) 18%, #fff); color: #14532d; border-color: transparent; }
.badge-bad { background: color-mix(in srgb, var(--danger) 14%, #fff); color: #8a1222; border-color: transparent; }

.address { display: inline; font-weight: 600; font-size: 22px; background: var(--surface-card-sky); padding: 2px 8px; border-radius: var(--radius-sm); box-decoration-break: clone; -webkit-box-decoration-break: clone; line-height: 1.6; }

/* ----------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
table.data th { text-align: left; font-size: 0.8125rem; color: var(--text-muted); font-weight: 650; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface); }
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--table-divider); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: color-mix(in srgb, var(--menu-lavender) 60%, transparent); }
table.data .num, table.data th.num { text-align: right; }
table.data td.sub { color: var(--text-muted); font-size: 0.8125rem; }
.row-title { font-weight: 600; color: var(--text); text-decoration: none; }
a.row-title:hover { text-decoration: underline; }
.pager { display: flex; justify-content: flex-end; align-items: center; gap: var(--space-md); padding: var(--space-md) var(--space-xl); color: var(--text-muted); font-size: 0.875rem; }

/* report statements */
.report { padding: var(--space-xl); }
.report table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.report.centered table { max-width: 760px; margin: 0 auto; }
.report th { text-align: right; padding: 8px 12px; border-bottom: 1px solid var(--border-strong); font-weight: 700; vertical-align: bottom; }
.report th:first-child { text-align: left; }
.report td { padding: 6px 12px; }
.report td:not(:first-child) { text-align: right; white-space: nowrap; }
.report tr.r-header td { font-weight: 700; padding-top: 12px; }
.report tr.r-subtotal td { font-weight: 700; border-top: 1px solid var(--border); }
.report tr.r-total td { font-weight: 700; border-top: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong); }
.report tr.r-spacer td { height: 14px; padding: 0; }
.report tr.r-text td { color: var(--text-secondary); }
.report th:first-child, .report td:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.report td.l1 { padding-left: 28px; } .report td.l2 { padding-left: 48px; } .report td.l3 { padding-left: 68px; }
.report a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--brand-purple) 55%, transparent); text-underline-offset: 3px; }
.report .neg { color: var(--danger); }
.report-heading { text-align: center; margin-bottom: var(--space-xl); }
.report-heading h2 { font-size: 1.5rem; }
.applied { font-size: 0.875rem; color: var(--text-muted); margin-top: 4px; }
.applied span + span::before { content: " · "; }
.notes { margin-top: var(--space-xl); padding: var(--space-lg); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-alt); font-size: 0.875rem; color: var(--text-secondary); }
.notes p:last-child { margin: 0; }

/* ------------------------------------------------------------------ forms */
.form { display: grid; gap: var(--space-lg); }
.form-row { display: grid; gap: var(--space-lg); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .label { font-size: 0.875rem; font-weight: 650; color: var(--text-secondary); }
.field .hint { font-size: 0.8125rem; color: var(--text-muted); }
.field .error { font-size: 0.8125rem; color: var(--danger); font-weight: 600; }
input:not([type]), input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="number"], input[type="search"], input[type="tel"], input[type="file"], select, textarea {
  font: inherit; font-size: max(16px, 1rem); color: var(--text);
  padding: 9px 12px; border: 1px solid var(--field-border); border-radius: var(--radius-md); background: var(--surface); width: 100%; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--field-border); }
input::placeholder, textarea::placeholder { color: var(--text-disabled); font-size: 0.9rem; }
textarea { min-height: 84px; resize: vertical; }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 550; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--brand-deep-purple); flex: none; }
.form-actions { display: flex; gap: var(--space-sm); align-items: center; flex-wrap: wrap; }
.form-actions > select, .form-actions > input:not([type="checkbox"]):not([type="radio"]),
.form-actions > span > input, .card-head select { width: auto; max-width: 100%; }
.form-actions .spacer { flex: 1; }
.form-card { max-width: 760px; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-lg); margin: 0; }
legend { font-weight: 700; padding: 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 5px 13px; border-radius: var(--radius-pill); border: 1px solid var(--brand-purple); color: var(--brand-deep-purple); font-weight: 600; font-size: 0.875rem; background: var(--surface); }
.chip input:checked + span { background: var(--brand-deep-purple); color: #fff; border-color: var(--brand-deep-purple); }
.chip input:focus-visible + span { outline: 2px solid var(--btn-action-ring); outline-offset: 2px; }
.splits td { padding: 6px 6px; }
.alert { padding: 12px 16px; border-radius: var(--radius-md); border: 1px solid var(--border); margin-bottom: var(--space-lg); font-weight: 550; }
.alert-error { border-color: color-mix(in srgb, var(--danger) 45%, transparent); background: color-mix(in srgb, var(--danger) 8%, #fff); color: #7d1020; }
.alert-success { border-color: color-mix(in srgb, var(--success) 45%, transparent); background: color-mix(in srgb, var(--success) 10%, #fff); color: #14532d; }
.alert-info { border-color: color-mix(in srgb, var(--brand-blue) 45%, transparent); background: var(--pastel-blue); }
.alert-warn { border-color: var(--attention-gold); background: #fff8d8; color: #3b2f00; }
.flashes { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: grid; gap: 8px; max-width: min(420px, calc(100vw - 40px)); }
.flashes .alert { margin: 0; box-shadow: var(--elev-3); }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: var(--space-md); align-items: flex-end; padding: var(--space-lg) var(--space-xl); }
.filters .field { min-width: 170px; flex: 1; max-width: 260px; }

/* ----------------------------------------------------------- feed (T1) */
.feed-row { border-bottom: 1px solid var(--table-divider); }
.feed-line { display: grid; grid-template-columns: 34px 110px minmax(0, 1fr) auto auto; gap: var(--space-md); align-items: center; padding: 10px var(--space-xl); }
.feed-line .desc { min-width: 0; }
.feed-line .desc b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-line .desc span { color: var(--text-muted); font-size: 0.8125rem; }
.feed-line .amount { font-weight: 700; }
.book-panel { padding: var(--space-lg) var(--space-xl) var(--space-xl); background: var(--surface-alt); border-top: 1px dashed var(--border-strong); }
.book-panel[hidden] { display: none; }
.suggest { font-size: 0.8125rem; color: var(--text-muted); }

/* ---------------------------------------------------------------- property */
.prop-grid { display: grid; gap: var(--space-lg); grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.prop-card { display: flex; flex-direction: column; overflow: hidden; }
.prop-photo { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--pastel-purple), var(--pastel-teal)); display: grid; place-items: center; color: var(--brand-deep-purple); position: relative; }
.prop-photo img { width: 100%; height: 100%; object-fit: cover; }
.prop-photo .badge { position: absolute; top: 10px; left: 10px; }
.prop-card .card-body { flex: 1; }
.prop-card .card-foot { display: flex; gap: var(--space-sm); padding: var(--space-md) var(--space-xl) var(--space-lg); }

/* charts */
.chart { width: 100%; height: auto; display: block; }
.chart text { font-family: var(--ui-font); font-size: 11px; fill: var(--text-muted); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.8125rem; color: var(--text-secondary); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding: 0 var(--space-xl); }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--text-secondary); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a[aria-selected="true"] { color: var(--text); border-bottom-color: var(--brand-purple); }

/* steps (Get Started, Tax Review) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-md); }
.steps li { display: grid; grid-template-columns: 36px 1fr auto; gap: var(--space-md); align-items: center; padding: var(--space-lg) var(--space-xl); }
.step-num { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--surface-alt); border: 1px solid var(--border); }
.done .step-num { background: var(--success); color: #fff; border-color: transparent; }
.skipped .step-num { background: var(--attention-gold); border-color: transparent; }
.meter { height: 10px; border-radius: var(--radius-pill); background: var(--surface-alt); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--btn-action-bg); }

/* auth pages */
.auth { min-height: 100vh; display: grid; place-items: center; padding: var(--space-xl); background: linear-gradient(160deg, var(--menu-lavender), var(--surface-canvas-app)); }
.auth .card { width: min(460px, 100%); }
.auth .brand { justify-content: center; margin-bottom: var(--space-lg); }

/* marketing */
.site-head { display: flex; align-items: center; gap: var(--space-lg); padding: 14px var(--space-2xl); background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.site-head nav { display: flex; gap: var(--space-lg); margin-left: auto; align-items: center; }
.site-head nav a { text-decoration: none; color: var(--text-secondary); font-weight: 600; }
.site-head nav a:not(.btn), .site-foot a { display: inline-block; padding: 12px 0; }
.hero { padding: 72px var(--space-2xl) 56px; max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.02em; }
.hero p.lead { font-size: 1.15rem; color: var(--text-secondary); margin: 18px 0 26px; max-width: 56ch; }
.section { padding: 56px var(--space-2xl); max-width: 1180px; margin: 0 auto; }
.feature-grid { display: grid; gap: var(--space-lg); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feature { padding: var(--space-xl); }
.feature h3 { margin-bottom: 6px; }
.site-foot { padding: 32px var(--space-2xl); border-top: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font-size: 0.875rem; display: flex; gap: var(--space-lg); flex-wrap: wrap; align-items: center; }
.site-foot a { color: var(--text-muted); }

dialog { border: 0; border-radius: var(--radius-card); padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: var(--elev-4); }
dialog::backdrop { background: var(--surface-scrim); }
dialog .dialog-body { padding: var(--space-xl); }

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .site-head { position: static; flex-wrap: wrap; row-gap: 0; padding: 10px var(--space-lg); }
  .site-head nav { width: 100%; margin-left: 0; flex-wrap: wrap; column-gap: var(--space-lg); row-gap: 0; }
  .site-head nav .btn { margin-left: auto; }
  .site-foot { padding: 24px var(--space-lg); row-gap: 0; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 40; transform: translateX(-100%); transition: transform var(--dur-drawer) var(--ease-drawer); box-shadow: var(--elev-4); }
  body.rail-open .rail { transform: none; }
  body.rail-open::after { content: ""; position: fixed; inset: 0; background: var(--surface-scrim); z-index: 35; }
  .topbar { padding: 0 var(--space-lg); }
  .topbar .menu-btn { display: inline-flex; }
  .account-menu .who { display: none; }
  .page { padding: var(--space-lg) var(--space-lg) var(--space-3xl); }
  .trialbar, .notice { padding: 8px var(--space-lg); }
  .grid-2, .grid-3, .grid-4, .feature-grid { grid-template-columns: 1fr; }
  .feed-line { grid-template-columns: 28px 1fr auto; }
  .feed-line .date { grid-column: 2; font-size: 0.8125rem; color: var(--text-muted); }
  .feed-line .desc { grid-column: 2 / 4; }
  .address { font-size: 19px; }
  .card-pad, .card-body, .report { padding: var(--space-lg); }
  .card-head { padding: var(--space-md) var(--space-lg); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print {
  .rail, .topbar, .trialbar, .notice, .page-head .actions, .no-print, .flashes { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
  .card { border: 0; box-shadow: none; }
  .page { padding: 0; }
}
