:root {
  color-scheme: light;
  --paper: #faf7f2;
  --paper-deep: #f4efe7;
  --ink: #1f1d1b;
  --muted: #766f66;
  --wine: #6b2c3f;
  --green: #3f5b4a;
  --line: #e5ded3;
  --blue: #4a6fa5;
  --gold: #c89b3c;
  --red: #a0453c;
  --stone: #8a8378;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html, body { max-width: 100%; overflow-x: hidden; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--sans); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
h1, h2, h3, blockquote { font-family: var(--serif); font-weight: 400; line-height: 1.2; }
h1 { font-size: clamp(2.6rem, 5.4vw, 4.7rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.9rem, 3vw, 2.75rem); letter-spacing: -.025em; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1rem; }
.wrap { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.eyebrow { margin-bottom: .75rem; color: var(--wine); font-size: .72rem; font-weight: 650; letter-spacing: .16em; text-transform: uppercase; }
.muted, .fine-print, .label-note { color: var(--muted); }
.fine-print { font-size: .83rem; }
.label-note { font-weight: 400; font-size: .82rem; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: .4rem; padding: .68rem 1.15rem; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--ink); font-size: .92rem; font-weight: 600; line-height: 1.2; transition: background-color 240ms ease, border-color 240ms ease, color 240ms ease; }
.button:hover { background: var(--paper-deep); border-color: #c9beb1; }
.button.primary { border-color: var(--wine); background: var(--wine); color: #fffaf6; }
.button.primary:hover { background: #5f2638; border-color: #5f2638; }
.button.secondary { background: transparent; }
.button.danger { border-color: #d8b8b0; color: var(--red); }
.button.danger:hover { background: #f4e8e3; }
.button.outline { border-color: var(--wine); color: var(--wine); }
.button.outline:hover { background: #f1e9e8; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.full-width { width: 100%; }
.text-link { color: var(--wine); font-weight: 600; }
.text-link span { display: inline-block; margin-left: .3rem; transition: transform 240ms ease; }
.text-link:hover span { transform: translateX(3px); }
.quiet-link { border: 0; background: none; color: var(--ink); font-size: .92rem; }
.quiet-link:hover { color: var(--wine); }
.centered { text-align: center; }
.section { padding-block: 112px; }
.section-rule { border-top: 1px solid var(--line); }
.section-intro { max-width: 620px; }
.section-intro h2 { margin: 0 0 1.1rem; }
.section-intro > p:not(.eyebrow) { max-width: 570px; color: var(--muted); }
.section-intro.centered { margin-inline: auto; }

/* Public pages */
.site-header { display: flex; min-height: 86px; align-items: center; justify-content: space-between; gap: 2rem; border-bottom: 1px solid var(--line); }
.wordmark { font-family: var(--serif); font-size: 1.45rem; letter-spacing: -.04em; }
.wordmark span, .account-brand > span { color: var(--wine); }
.site-nav, .header-actions, .site-footer > div { display: flex; align-items: center; gap: 1.6rem; }
.site-nav a, .site-footer a { color: var(--muted); font-size: .9rem; }
.site-nav a:hover, .site-footer a:hover { color: var(--wine); }
.site-footer > div { flex-wrap: wrap; justify-content: flex-end; gap: .7rem 1.3rem; }
.closing-cta p:not(.eyebrow) { max-width: 680px; margin: 0 auto 24px; color: var(--muted); }
.legal-text { white-space: normal; overflow-wrap: anywhere; max-width: 850px; }
.hero { display: grid; min-height: 690px; grid-template-columns: 1fr .95fr; align-items: center; gap: 4rem; padding-block: 72px 92px; }
.hero-copy { max-width: 620px; }
.hero h1 { max-width: 660px; margin: 0 0 1.5rem; }
.lead { color: #5f5850; font-size: 1.12rem; line-height: 1.75; }
.hero-actions { display: flex; align-items: center; gap: 1.7rem; margin: 2rem 0 1.5rem; }
.hero-art { position: relative; color: var(--wine); }
.hero-art svg { display: block; width: 100%; }
.art-caption { display: block; margin-top: .6rem; color: var(--muted); font-family: var(--serif); font-size: .92rem; font-style: italic; text-align: center; }
.three-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.situation-list { margin-top: 54px; }
.situation-list article { min-height: 205px; padding: 1.5rem 1.4rem 1.2rem 0; border-top: 1px solid var(--line); }
.small-index { color: var(--wine); font-family: var(--serif); font-size: 1.35rem; }
.situation-list h3 { margin: 1.15rem 0 .6rem; }
.situation-list p, .steps p, .plan-card > p:not(.eyebrow):not(.price) { color: var(--muted); }
.steps { display: grid; gap: 0; margin: 2.7rem 0 0; padding: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 105px 1fr; gap: 1rem; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.steps li > span { color: var(--wine); font-family: var(--serif); font-size: 2.2rem; }
.steps h3 { margin: .3rem 0 .4rem; }
.steps p { margin-bottom: 0; }
.account-preview-section { background: var(--paper-deep); }
.preview-layout { display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: 5rem; }
.preview-layout .section-intro .text-link { display: inline-block; margin-top: .6rem; }
.preview-frame { display: grid; min-height: 370px; grid-template-columns: 145px 1fr; border: 1px solid #d8cec2; background: var(--paper); }
.preview-sidebar { display: flex; flex-direction: column; gap: 1.1rem; padding: 1.3rem 1rem; background: var(--ink); color: var(--paper); font-family: var(--serif); }
.preview-sidebar i { width: 85%; height: 1px; background: #69635d; }
.preview-sidebar i:first-of-type { margin-top: 1.3rem; }
.preview-content { padding: 1.4rem clamp(1rem, 3vw, 2.2rem); }
.preview-content .eyebrow { font-size: .62rem; }
.preview-content h3 { margin: 0 0 1.2rem; }
.preview-book { display: flex; align-items: center; gap: .75rem; padding: 1rem 0; border-block: 1px solid var(--line); }
.preview-book > div { display: grid; flex: 1; }
.preview-book strong { font-family: var(--serif); font-weight: 400; }
.preview-book small { color: var(--muted); }
.preview-book b { font-family: var(--serif); font-size: 1.15rem; font-weight: 400; }
.preview-lines { display: grid; gap: .6rem; padding: 1.2rem 0; }
.preview-lines span { height: 1px; background: var(--line); }
.preview-lines span:nth-child(2) { width: 80%; }
.preview-lines span:nth-child(3) { width: 55%; }
.preview-table { display: grid; grid-template-columns: 1fr auto; border-top: 1px solid var(--line); font-size: .68rem; }
.preview-table span { padding: .45rem .3rem; border-bottom: 1px solid var(--line); }
.preview-table span:nth-child(2n) { color: var(--muted); }
.plan-grid { margin-top: 3rem; align-items: stretch; }
.plan-card { display: flex; min-height: 350px; flex-direction: column; padding: 1.7rem 1.65rem; border: 1px solid var(--line); background: transparent; transition: border-color 240ms ease; }
.plan-card:hover { border-color: #b9aa9a; }
.plan-card.featured { border-color: var(--wine); }
.plan-card h2, .plan-card h3 { margin: .1rem 0 .8rem; }
.price { margin: 1.1rem 0 .7rem; font-family: var(--serif); font-size: 2.4rem; line-height: 1.2; }
.price small { font-size: 1.2rem; }
.plan-card .button { width: 100%; margin-top: auto; }
.plan-card ul { margin: .4rem 0 1.5rem; padding-left: 1.2rem; color: var(--muted); }
.plan-card li { padding: .3rem 0; }
.paper-table-wrap { overflow-x: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.paper-table { width: 100%; border-collapse: collapse; text-align: left; }
.paper-table th, .paper-table td { padding: 1rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.paper-table th { color: var(--muted); font-size: .76rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.paper-table td { font-size: .92rem; }
.paper-table tbody tr:last-child td { border-bottom: 0; }
.report-sample { display: grid; grid-template-columns: .7fr 1.3fr; align-items: start; gap: 4rem; }
.status-dot { display: inline-block; width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--stone); vertical-align: middle; }
.status-dot.planned { background: var(--blue); }
.status-dot.working { background: var(--gold); }
.status-dot.done { background: var(--green); }
.status-dot.overdue { background: var(--red); }
.status-dot.refused { background: var(--stone); }
.faq-list { max-width: 820px; margin: 2.5rem auto 0; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { position: relative; padding: 1.25rem 2.4rem 1.25rem 0; cursor: pointer; font-family: var(--serif); font-size: 1.2rem; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { position: absolute; right: .2rem; content: "+"; color: var(--wine); font-family: var(--sans); font-size: 1.25rem; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { max-width: 680px; padding: 0 2rem 1rem 0; color: var(--muted); }
.closing-cta { padding: 106px 0 118px; border-top: 1px solid var(--line); text-align: center; }
.closing-cta h2 { max-width: 650px; margin: 0 auto 1.6rem; font-size: clamp(2.5rem, 4.5vw, 4rem); }
.site-footer { display: flex; min-height: 100px; align-items: center; justify-content: space-between; gap: 2rem; border-top: 1px solid var(--line); }
.pricing-main { padding-block: 100px 110px; }
.pricing-main .section-intro { max-width: 730px; }
.pricing-main h1 { margin: .5rem 0 1rem; font-size: clamp(2.5rem, 5vw, 4rem); }
.pricing-grid { margin-top: 3.5rem; }
.pricing-grid .plan-card { min-height: 400px; }
.pricing-note { max-width: 680px; margin: 2rem auto 2.5rem; color: var(--muted); font-size: .9rem; text-align: center; }

/* Authentication and legal pages */
.auth-page, .legal-page { min-height: 100vh; }
.auth-layout { display: grid; min-height: calc(100vh - 170px); grid-template-columns: 1fr minmax(380px, .8fr); align-items: center; gap: clamp(3rem, 9vw, 8rem); padding-block: 4rem; }
.auth-aside { max-width: 560px; }
.auth-aside h1 { margin: 0 0 1.2rem; font-size: clamp(2.7rem, 5vw, 4.1rem); }
.auth-aside > p:not(.eyebrow) { max-width: 450px; color: var(--muted); }
.auth-aside blockquote { margin: 3rem 0 0; color: var(--wine); font-size: 1.45rem; font-style: italic; }
.auth-card { padding: 1.7rem 1.8rem 1.3rem; border: 1px solid var(--line); }
.auth-tabs { display: flex; gap: 1.4rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.auth-tab { position: relative; padding: .3rem 0 .8rem; border: 0; background: none; color: var(--muted); }
.auth-tab[aria-selected="true"] { color: var(--wine); }
.auth-tab[aria-selected="true"]::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--wine); content: ""; }
.auth-card h2 { margin: .2rem 0 .6rem; font-size: 1.8rem; }
.auth-card form { display: grid; gap: 1rem; }
.auth-card form > .muted { margin-bottom: .1rem; }
label { display: grid; gap: .4rem; color: var(--ink); font-size: .88rem; font-weight: 600; }
input, select, textarea { width: 100%; min-height: 44px; padding: .65rem .7rem; border: 1px solid #cfc6ba; border-radius: 4px; outline: none; background: transparent; color: var(--ink); }
textarea { min-height: auto; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--wine); outline: 2px solid #6b2c3f24; }
input[type="checkbox"] { width: 17px; min-height: 17px; height: 17px; accent-color: var(--wine); }
.consent-list { display: grid; gap: .7rem; margin: .2rem 0; }
.consent { display: flex; align-items: flex-start; gap: .6rem; color: var(--muted); font-size: .8rem; font-weight: 400; line-height: 1.45; }
.consent input { flex: 0 0 17px; margin-top: .1rem; }
.consent a { color: var(--wine); text-decoration: underline; text-underline-offset: 2px; }
.auth-footnote { margin: 1.3rem 0 0; color: var(--muted); font-size: .78rem; }
.auth-footnote a { color: var(--wine); text-decoration: underline; text-underline-offset: 2px; }
.form-message { margin: 1rem 0; padding: .8rem 1rem; border: 1px solid var(--line); color: var(--green); font-size: .88rem; }
.form-message.bad, .error-message { border-color: #d8b8b0; color: var(--red); }
.legal-document { max-width: 780px; padding-block: 4rem 7rem; }
.legal-document h1 { margin: 0 0 1.6rem; font-size: clamp(2.4rem, 5vw, 3.7rem); }
.legal-document h2 { margin: 2rem 0 .6rem; font-size: 1.5rem; }
.legal-document p, .legal-document li { color: #514b44; }
.legal-draft { padding: .9rem 1rem; border-left: 2px solid var(--gold); background: #f1eadd; color: #55472e !important; }

/* Author cabinet */
.account-body { background: var(--paper); }
.account-shell { display: grid; min-height: 100vh; grid-template-columns: 220px minmax(0, 1fr); }
.account-sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; padding: 1.5rem 1rem; background: var(--ink); color: var(--paper); }
.account-brand { display: grid; padding: .4rem .55rem 1.6rem; font-family: var(--serif); font-size: 1.3rem; line-height: 1.25; }
.account-brand small { margin-top: .4rem; color: #c1b9af; font-family: var(--sans); font-size: .76rem; }
.account-sidebar nav { display: grid; gap: .3rem; }
.account-sidebar nav a, .account-sidebar-foot a { padding: .62rem .65rem; color: #c7c0b8; font-size: .86rem; }
.account-sidebar nav a:hover, .account-sidebar nav a.current { color: #fff; background: #393532; }
.account-sidebar-foot { display: grid; margin-top: auto; border-top: 1px solid #48423d; padding-top: .75rem; }
.account-main { width: min(1100px, 100%); min-width: 0; margin-inline: auto; padding: 0 clamp(1.3rem, 5vw, 4.5rem) 3rem; }
.account-topbar { display: flex; min-height: 74px; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); }
.account-user { display: flex; align-items: center; gap: 1.2rem; font-size: .85rem; }
.account-section { padding-block: 3.5rem; scroll-margin-top: 1rem; }
.account-section h1 { margin: .2rem 0 .8rem; font-size: clamp(2.5rem, 4vw, 3.5rem); }
.account-section h2 { margin: .1rem 0; font-size: 1.85rem; }
.account-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 2.7rem; padding: 1.3rem 0; border-block: 1px solid var(--line); }
.account-stats div { display: grid; gap: .35rem; }
.account-stats span { color: var(--muted); font-size: .83rem; }
.account-stats strong { font-family: var(--serif); font-size: 2rem; font-weight: 400; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.section-heading .eyebrow { margin-bottom: .4rem; }
.subscription-stack { display: grid; gap: .75rem; }
.subscription-card { padding: 1.2rem 1.25rem; border: 1px solid var(--line); border-left: 3px solid var(--wine); }
.subscription-card.expired { border-left-color: var(--stone); }
.subscription-card-heading, .subscription-status-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.subscription-card-heading > div { display: grid; }
.book-title { font-family: var(--serif); font-size: 1.3rem; }
.subscription-price { font-family: var(--serif); font-size: 1.4rem; font-weight: 400; white-space: nowrap; }
.subscription-status-row { justify-content: flex-start; margin-top: .9rem; color: var(--muted); font-size: .82rem; }
.date-mono { margin-left: auto; font-family: ui-monospace, Consolas, monospace; font-size: .78rem; }
.author-book-form { display: grid; gap: 1rem; margin-bottom: 2rem; padding: 1.2rem; border: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-grid .wide { grid-column: 1 / -1; }
.author-book-form .button { justify-self: start; }
.paper-table { min-width: 600px; }
.paper-table td { font-size: .86rem; }
.account-footer { display: flex; gap: 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.account-footer a { color: var(--muted); font-size: .8rem; text-decoration: underline; text-underline-offset: 2px; }
.checkout-form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 1rem; padding: 1.2rem 0; border-block: 1px solid var(--line); }
.checkout-form .button { white-space: nowrap; }
.report-download-form { display: flex; align-items: end; gap: 1rem; max-width: 520px; padding-block: 1.2rem; border-block: 1px solid var(--line); }
.report-download-form label { flex: 1; }
.account-section .paper-table td a { color: var(--wine); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }

/* Staff workspace */
.shell { display: grid; width: 100%; min-width: 0; min-height: 100vh; grid-template-columns: 222px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; gap: 2rem; padding: 1.35rem .85rem; background: var(--ink); color: var(--paper); }
.brand { display: flex; align-items: center; gap: .65rem; padding: .35rem .6rem; }
.brand-mark { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid #9c8e80; border-radius: 4px; color: #fff; font-family: var(--serif); font-size: 1.1rem; }
.brand strong, .brand small { display: block; }
.brand strong { font-family: var(--serif); font-size: 1.05rem; font-weight: 400; }
.brand small { color: #c1b9af; font-size: .72rem; }
.sidebar nav { display: grid; gap: .2rem; }
.sidebar nav button { padding: .66rem .7rem; border: 0; border-radius: 4px; background: transparent; color: #c7c0b8; font-size: .84rem; text-align: left; }
.sidebar nav button:hover, .sidebar nav button.active { background: #393532; color: #fff; }
.sidebar nav .admin-portal-nav { padding: .66rem .7rem; border-radius: 4px; color: #d6c3a0; font-size: .84rem; text-decoration: none; }
.sidebar nav .admin-portal-nav:hover { background: #393532; color: #fff; }
.sidebar-foot { display: grid; gap: .3rem; margin-top: auto; padding: .9rem .65rem 0; border-top: 1px solid #48423d; color: #ded8d0; font-size: .76rem; }
.text-button { border: 0; background: transparent; color: #ded8d0; text-align: left; }
.main { width: 100%; min-width: 0; max-width: 100%; padding: 1.5rem clamp(1rem, 3vw, 2.8rem) 4rem; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.35rem; }
.topbar h1 { margin: .2rem 0 0; font-size: 2rem; }
.badge { padding: .2rem .55rem; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); font-size: .76rem; }
.page { display: none; width: 100%; min-width: 0; max-width: 1250px; }
.page.active { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
.card { width: 100%; min-width: 0; max-width: 100%; padding: 1.25rem 1.35rem; border: 1px solid var(--line); background: transparent; }
.card h2 { margin: 0 0 .9rem; font-size: 1.4rem; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.card-heading h2 { margin-bottom: .7rem; }
.actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.schedule-row { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; color: var(--muted); }
.table-scroll { width: 100%; min-width: 0; max-width: 100%; max-height: 460px; overflow: auto; overscroll-behavior-x: contain; border-block: 1px solid var(--line); }
#page-claims .table-scroll { max-height: clamp(180px, min(70vh, calc(100vh - 18rem)), 75vh); }
.table-scroll table { width: 100%; min-width: 650px; border-collapse: collapse; }
.table-scroll th, .table-scroll td { padding: .85rem .8rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table-scroll th { position: sticky; top: 0; z-index: 1; background: var(--paper); color: var(--muted); font-size: .7rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.table-scroll td { font-size: .84rem; }
.table-scroll tbody tr:hover { background: #f4efe8; }
.table-scroll tbody tr.selected { outline: 1px solid #bcaeb0; outline-offset: -1px; background: #f4ecea; }
.table-scroll td .button { min-height: 34px; margin: .08rem; padding: .35rem .5rem; font-size: .76rem; }
.table-scroll td a { color: var(--wine); text-decoration: underline; overflow-wrap: anywhere; }
.table-scroll td input[type="checkbox"] { width: 17px; min-height: 17px; height: 17px; }
#page-history .table-scroll table { width: max-content; min-width: 100%; table-layout: auto; }
#page-history .table-scroll th, #page-history .table-scroll td { white-space: nowrap; overflow-wrap: normal; word-break: normal; }
#page-history .table-scroll td a { white-space: nowrap; overflow-wrap: normal; word-break: normal; }
.progress { position: relative; display: grid; height: 42px; place-items: center; overflow: hidden; margin-top: 1rem; border: 1px solid var(--line); background: #e8edf1; }
.progress > div { position: absolute; inset: 0 auto 0 0; width: 0; background: #91a9c6; transition: width 300ms ease; }
.progress.complete > div { background: #7f9a84; }
.progress span { z-index: 1; font-size: .82rem; font-weight: 650; }
.calendar-heading { display: flex; align-items: center; justify-content: center; gap: 1.5rem; margin-bottom: 1rem; }
.calendar-heading h2 { min-width: 180px; margin: 0; text-align: center; }
.icon-button { border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--ink); font-size: 1.4rem; line-height: 1; padding: .3rem .7rem; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .25rem; }
.calendar-grid .weekday { padding: .45rem; color: var(--muted); font-size: .74rem; text-align: center; }
.calendar-grid button { min-height: 68px; border: 1px solid transparent; border-radius: 3px; background: transparent; color: var(--ink); text-align: left; vertical-align: top; }
.calendar-grid button:hover { border-color: var(--line); }
.calendar-grid button.selected { border-color: var(--wine); }
.calendar-grid button.today { border-color: var(--ink); }
.calendar-grid button.selected.today { border-color: var(--wine); outline: 1px solid var(--ink); outline-offset: 2px; }
.calendar-grid button.has-checks::after { display: block; color: var(--blue); content: "•"; font-size: 1.4rem; line-height: .8; }
.calendar-grid .blank { border: 0; }
.day-list { padding-left: 1.2rem; color: var(--muted); }
.day-list li { padding: .2rem 0; }
.summary { display: flex; gap: .7rem; flex-wrap: wrap; margin: 1rem 0; }
.summary span { padding: .4rem .65rem; border: 1px solid var(--line); font-size: .82rem; }
dialog { width: min(92vw, 420px); padding: 1.4rem; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); color: var(--ink); }
dialog::backdrop { background: #1f1d1b80; }
dialog form { display: grid; gap: 1rem; }
dialog .actions { justify-content: flex-end; }
.cookie-notice { width: min(92vw, 500px); padding: 0; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 18px 70px #1f1d1b38; }
.cookie-notice-content { display: grid; gap: .8rem; padding: clamp(1.25rem, 5vw, 2rem); }
.cookie-notice-content .eyebrow, .cookie-notice-content h2, .cookie-notice-content p { margin: 0; }
.cookie-notice-content h2 { font-size: 1.8rem; }
.cookie-notice-content p:not(.eyebrow) { color: var(--muted); }
.cookie-notice-content a { color: var(--wine); text-decoration: underline; text-underline-offset: 2px; }
.cookie-notice-content .card-actions { display: flex; justify-content: flex-end; gap: .6rem; flex-wrap: wrap; }
.cookie-notice-content .button { min-width: 145px; }
.welcome { display: grid; min-height: 100vh; place-items: center; padding: 2rem; background: var(--paper); }
.login-card { width: min(100%, 430px); padding: 2rem; border: 1px solid var(--line); background: var(--paper); }
.login-card h1 { margin: .8rem 0; font-size: 2.3rem; }
.login-card form { display: grid; gap: 1rem; margin-top: 1.5rem; }
.login-card form .button, .login-card .yandex { width: 100%; }
.login-card .divider { margin: .8rem 0; color: var(--muted); text-align: center; }
.login-card p { color: var(--muted); }
.message { margin-top: 1rem; }
.error { color: var(--red); }

html[data-theme="dark"] { color-scheme: dark; --paper: #1f1d1b; --paper-deep: #292522; --ink: #f3eee8; --muted: #b9afa5; --line: #48423d; --wine: #b36b7d; --green: #8ba18e; }
html[data-theme="dark"] .table-scroll th { background: var(--paper); }
html[data-theme="dark"] .table-scroll tbody tr:hover { background: #302b27; }
html[data-theme="dark"] .table-scroll tbody tr.selected { background: #3d3032; }
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea { border-color: #635a52; }
html[data-theme="dark"] .paper-table th, html[data-theme="dark"] .paper-table td { border-color: var(--line); }

@media (max-width: 900px) {
  .hero { min-height: 0; grid-template-columns: 1fr; gap: 2rem; padding-block: 70px; }
  .hero-art { max-width: 590px; margin-inline: auto; }
  .preview-layout, .report-sample { grid-template-columns: 1fr; gap: 2rem; }
  .auth-layout { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .account-shell, .shell { grid-template-columns: 1fr; }
  .account-sidebar, .sidebar { position: static; height: auto; gap: .7rem; }
  .account-sidebar nav, .sidebar nav { display: flex; overflow-x: auto; }
  .account-sidebar nav a, .sidebar nav button { flex: 0 0 auto; white-space: nowrap; }
  .account-sidebar-foot { display: flex; gap: .6rem; margin-top: .6rem; }
  .sidebar-foot { display: flex; justify-content: space-between; margin-top: .5rem; }
}
@media (max-width: 680px) {
  .wrap { width: min(100% - 32px, 540px); }
  .site-header { min-height: 70px; gap: 1rem; }
  .site-nav { display: none; }
  .header-actions { gap: .7rem; }
  .header-actions .button { min-height: 40px; padding: .5rem .7rem; font-size: .8rem; }
  .section { padding-block: 76px; }
  .three-columns { grid-template-columns: 1fr; gap: 1rem; }
  .situation-list { margin-top: 2rem; }
  .situation-list article { min-height: 0; padding-bottom: 1.4rem; }
  .steps li { grid-template-columns: 58px 1fr; }
  .steps li > span { font-size: 1.7rem; }
  .preview-frame { grid-template-columns: 88px 1fr; min-height: 300px; }
  .preview-sidebar { padding-inline: .65rem; font-size: .82rem; }
  .preview-content { padding: 1rem .8rem; }
  .preview-book { align-items: flex-start; flex-wrap: wrap; }
  .preview-book b { margin-left: 1.5rem; }
  .paper-table { min-width: 620px; }
  .site-footer { min-height: 100px; align-items: flex-start; flex-direction: column; justify-content: center; gap: .5rem; padding-block: 1rem; }
  .site-footer > div { flex-wrap: wrap; gap: 1rem; }
  .pricing-main { padding-block: 65px; }
  .auth-layout { min-height: 0; grid-template-columns: 1fr; gap: 2rem; padding-block: 3rem; }
  .auth-aside h1 { font-size: 2.8rem; }
  .auth-aside blockquote { margin-top: 1.3rem; }
  .auth-card { padding: 1.2rem; }
  .account-main { padding-inline: 1rem; }
  .account-topbar { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: .8rem; }
  .account-user { width: 100%; justify-content: space-between; }
  .account-section { padding-block: 2.5rem; }
  .account-stats { gap: .7rem; }
  .account-stats span { font-size: .72rem; }
  .account-stats strong { font-size: 1.55rem; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .subscription-card { padding: .9rem; }
  .subscription-status-row { flex-wrap: wrap; }
  .date-mono { width: 100%; margin-left: 1rem; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .checkout-form { grid-template-columns: 1fr; }
  .checkout-form .button { width: 100%; }
  .report-download-form { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

.single-plan-grid { display: grid; grid-template-columns: minmax(280px, 560px); justify-content: center; gap: 24px; margin: 3rem auto 0; }
