/* Look and feel after our own InvoiceChaser (invoicechaser.ca): Google Sans throughout, bold tight headings
   with a coloured or italic second line, bordered cards, solid blue buttons with 8px corners and full-width
   bands. Light by default for long reading; visitors whose system is set to dark get the dark version. */
:root {
  color-scheme: light;
  --primary: #0b57d0;
  --primary-hover: #0842a0;
  --on-primary: #ffffff;
  --primary-container: #062e6f;
  --on-primary-container: #041e49;
  --secondary-container: #e9eef6;
  --on-secondary-container: #1f1f1f;
  --button: #0b57d0;
  --button-hover: #0842a0;
  --on-button: #ffffff;
  --ink: #1f1f1f;
  --muted: #444746;
  --dim: #5f6368;
  --page: #ffffff;
  --surface: #ffffff;
  --surface-1: #f8fafd;
  --surface-2: #f0f4f9;
  --surface-3: #e9eef6;
  --window: #ffffff;
  --band: #f0f4f9;
  --band-raised: #e9eef6;
  --band-cta: #d3e3fd;
  /* The "how it works" band is the one deep-blue band on a light page. */
  --band-light: #062e6f;
  --ink-light: #ffffff;
  --muted-light: #d3e3fd;
  --band-light-link: #a8c7fa;
  --band-light-rule: #2f4f8a;
  --band-light-em: #a8c7fa;
  --footer: #f8fafd;
  --line: #c4c7c5;
  --line-soft: #e1e3e1;
  --mine: #d3e3fd;
  --mine-line: #a8c7fa;
  --shadow: 0 20px 50px rgba(31,31,31,.12);
  --card-ink: #1f1f1f;
  --tint-blue: #d3e3fd;   --deep-blue: #041e49;
  --tint-green: #c4eed0;  --deep-green: #0d652d;
  --tint-yellow: #feefc3; --deep-yellow: #594300;
  --tint-red: #fce8e6;    --deep-red: #8c1d18;
  --tint-purple: #f3e8fd; --deep-purple: #4a0072;
  --tint-teal: #cbf0f8;   --deep-teal: #004a59;
  --warning: #f9ab00;
  --danger: #d93025;
  --success: #188038;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 8px;
  --font: "Google Sans", "Google Sans Text", Roboto, "Segoe UI", system-ui, arial, sans-serif;
  --font-display: "Google Sans", Roboto, "Segoe UI", system-ui, arial, sans-serif;
  --tight: -.035em;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--page);
  --bs-border-color: var(--line);
  --bs-secondary-color: var(--muted);
  --bs-link-color: var(--primary);
  --bs-link-hover-color: var(--primary-hover);
  /* Old names, still used by a few rules. */
  --brand: var(--primary);
  --brand-dark: var(--primary-hover);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --primary: #a8c7fa;
    --primary-hover: #d3e3fd;
    --on-primary: #062e6f;
    --primary-container: #062e6f;
    --on-primary-container: #c2e7ff;
    --secondary-container: #282a2c;
    --on-secondary-container: #e3e3e3;
    --button: #0b57d0;
    --button-hover: #0842a0;
    --on-button: #ffffff;
    --ink: #e3e3e3;
    --muted: #c4c7c5;
    --dim: #8e918f;
    --page: #131314;
    --surface: #131314;
    --surface-1: #1e1f20;
    --surface-2: #1e1f20;
    --surface-3: #282a2c;
    --band: #1e1f20;
    --band-raised: #282a2c;
    --band-cta: #333537;
    --band-light: #f0f4f9;
    --ink-light: #1f1f1f;
    --muted-light: #444746;
    --footer: #131314;
    --line: #444746;
    --line-soft: #2d2f31;
    --mine: #062e6f;
    --card-ink: #1f1f1f;
    --tint-blue: #a8c7fa;   --deep-blue: #1f1f1f;
    --tint-green: #a8dab5;  --deep-green: #1f1f1f;
    --tint-yellow: #fde293; --deep-yellow: #1f1f1f;
    --tint-red: #f6aea9;    --deep-red: #1f1f1f;
    --tint-purple: #d7aefb; --deep-purple: #1f1f1f;
    --tint-teal: #78d9ec;   --deep-teal: #1f1f1f;
    --warning: #fdd663;
    --danger: #f28b82;
    --success: #81c995;
    --window: #282a2c;
    --band-light-link: #0b57d0;
    --band-light-rule: #c4c7c5;
    --band-light-em: #5f6368;
    --mine-line: #0842a0;
    --shadow: 0 20px 60px rgba(0,0,0,.35);
  }
}

/* Base */
html { font-size: 15px; }
@media (min-width: 768px) { html { font-size: 16px; } }
body { background: var(--page); color: var(--muted); font-family: var(--font); font-size: 1rem; line-height: 1.5; -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; min-height: 100vh; }
body > .page { flex: 1 0 auto; }
h1, h2, h3, .display { font-family: var(--font-display); letter-spacing: var(--tight); color: var(--ink); }
strong, b, label, dt, th { color: var(--ink); }
h1 { font-size: 2.1rem; font-weight: 700; line-height: 1.12; margin: 8px 0 12px; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
.text-muted { color: var(--muted) !important; }
::selection { background: var(--primary-container); color: var(--on-primary-container); }
.container { max-width: 1120px; padding-left: 16px; padding-right: 16px; }

.skip-link { position: absolute; left: -10000px; top: 0; }
.skip-link:focus { left: 8px; top: 8px; z-index: 1000; background: var(--surface); padding: 8px 14px; border: 2px solid var(--primary); border-radius: var(--radius-sm); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--page); border-bottom: 1px solid var(--line-soft); }
.site-header .navbar { padding: 16px 0; }
.navbar-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; letter-spacing: -.04em; color: var(--ink) !important; }
.navbar-brand .logo { width: 30px; height: 30px; flex: none; }
.site-nav .nav-link { color: var(--muted) !important; font-weight: 400; font-size: .875rem; border-radius: var(--radius-sm); padding: 8px 9px !important; transition: background-color .15s ease, color .15s ease; white-space: nowrap; }
.site-nav .nav-link:hover { background: var(--surface-1); color: var(--ink) !important; }
.site-nav .nav-link.active { background: var(--surface-3); color: var(--ink) !important; font-weight: 600; }
.site-nav .nav-item { margin: 1px; }
.site-nav .nav-link.btn-link { border: 0; background: none; text-decoration: none; }
.site-nav .nav-link.btn-link:hover { background: var(--surface-1); }
.site-nav .nav-link.cta { background: var(--button); color: var(--on-button) !important; font-weight: 600; padding: 10px 18px !important; }
.site-nav .nav-link.cta:hover { background: var(--button-hover); }
.navbar-toggler { border: 1px solid var(--line); border-radius: 6px; padding: 7px 12px; color: var(--ink); font-size: .85rem; }
.navbar-toggler:focus { box-shadow: none; }
@media (max-width: 991.98px) {
  .site-nav { padding: 8px 0 4px; }
  .site-nav .nav-link { padding: 10px 14px !important; }
}

/* Buttons and forms */
.btn { border-radius: var(--radius-sm); font-family: var(--font-display); font-weight: 600; font-size: .9rem; padding: 10px 20px; letter-spacing: 0; display: inline-flex; align-items: center; justify-content: center; gap: 12px; }
.btn svg { width: 16px; height: 16px; fill: currentColor; flex: none; }
.btn-sm { padding: 5px 14px; }
.btn-lg { padding: 13px 20px; font-size: .9rem; line-height: 22px; }
.btn-primary { background: var(--button); border: 1px solid var(--button); color: var(--on-button); }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { background: var(--button-hover) !important; border-color: var(--button-hover) !important; color: var(--on-button) !important; }
.btn-outline-secondary, .btn-outline-primary, .btn-secondary, .btn-light { background: var(--surface-1); border: 1px solid var(--line); color: var(--ink); }
.btn-outline-secondary:hover, .btn-outline-primary:hover, .btn-secondary:hover, .btn-light:hover, .btn-outline-secondary:focus { background: var(--surface-3); border-color: var(--dim); color: var(--ink); }
.btn-tonal { background: var(--surface-3); color: var(--ink); border: 0; }
.btn-tonal:hover { background: var(--band-cta); color: var(--ink); }

.btn-link { color: var(--primary); }
.btn:focus-visible, .form-control:focus, .form-select:focus, .form-check-input:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 30%, transparent);
  border-color: var(--primary);
}
.form-control, .form-select { border-radius: var(--radius-sm); border-color: var(--line); padding: 10px 14px; background-color: var(--surface-1); color: var(--ink); }
.form-control::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.alert { border: 0; border-radius: 12px; padding: 14px 20px; }
.alert-success { background: var(--tint-green); color: var(--deep-green); }
.alert-info { background: var(--tint-blue); color: var(--deep-blue); }
.alert-warning { background: var(--tint-yellow); color: var(--deep-yellow); }
.alert-danger { background: var(--tint-red); color: var(--deep-red); }
.badge { border-radius: 999px; font-weight: 500; }
.table { color: var(--ink); --bs-table-bg: transparent; --bs-table-color: var(--ink); }
.table > :not(caption) > * > * { border-bottom-color: var(--line-soft); }

/* Page content */
main { padding: 24px 0 56px; }
main > h1:first-child, main > .alert + h1 { margin-top: 8px; }
main section, main .compose { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 24px 28px; margin: 16px 0; }
main section h2 { font-size: 1.35rem; margin-top: 0; }
main label { display: block; font-weight: 500; margin: 12px 0 6px; }
main form button { margin-top: 12px; }
@media (max-width: 600px) { main section, main .compose { padding: 18px 18px; border-radius: var(--radius-md); } h1 { font-size: 1.85rem; } }

.search-row { display: flex; gap: 8px; align-items: center; margin: 12px 0; }
.search-row input { max-width: 420px; }

#messages { display: flex; flex-direction: column; gap: 12px; }
.message { max-width: 720px; border: 0; border-radius: var(--radius-md); border-top-left-radius: 6px; padding: 12px 18px; background: var(--surface-2); }
.message.mine { align-self: flex-end; background: var(--mine); border-top-left-radius: var(--radius-md); border-top-right-radius: 6px; }
.message header { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.message time { color: var(--muted); font-size: .85rem; }
.message .topic { color: var(--primary-hover); font-weight: 500; margin: 4px 0 0; }
.message .body { white-space: pre-wrap; margin: 6px 0 0; overflow-wrap: anywhere; }
.message .attachments { margin: 6px 0 0; padding-left: 18px; }
.message .receipt { color: var(--muted); font-size: .85rem; margin: 6px 0 0; }
.empty { color: var(--muted); }

details.compose summary { font-weight: 500; cursor: pointer; font-family: var(--font-display); font-size: 1.1rem; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 14px; }
.balance-amount { font-family: var(--font-display); font-size: 1.75rem; font-weight: 500; margin: 0; }

#expenses { display: flex; flex-direction: column; gap: 12px; }
.expense { border: 0; border-left: 6px solid var(--line); border-radius: var(--radius-md); padding: 14px 20px; background: var(--surface-2); }
.expense header { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.expense .amounts, .expense .state, .expense .reason { margin: 6px 0 0; }
.expense .state { font-weight: 500; }
.expense.status-pending, .expense.status-proposed { border-left-color: var(--warning); }
.expense.status-disputed { border-left-color: var(--danger); }
.expense.status-accepted, .expense.status-paid { border-left-color: var(--primary); }
.expense.status-settled { border-left-color: var(--success); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-top: 10px; }
.actions form button { margin-top: 0; }
.inline-form { display: flex; gap: 6px; align-items: flex-end; flex-wrap: wrap; }
.inline-form label { margin: 0; font-weight: 500; font-size: .85rem; width: 100%; }
.inline-form input { max-width: 220px; }
.inline-form.attach input[type=file] { max-width: 340px; }
.receipts { margin: 6px 0 0; padding-left: 18px; }
.attach { margin-top: 8px; }

.month-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.month-nav h2 { margin: 0; font-size: 1.4rem; min-width: 10ch; text-align: center; }
.month-nav .spacer { flex: 1; }
table.month { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 4px; background: transparent; }
table.month th { text-align: center; font-size: .8rem; font-weight: 500; color: var(--muted); padding: 6px 0; text-transform: uppercase; letter-spacing: .04em; }
table.month td { vertical-align: top; height: 96px; border: 0; border-radius: var(--radius-sm); background: var(--surface-2); padding: 6px; overflow: hidden; }
table.month td.outside { background: var(--surface-1); color: var(--muted); opacity: .7; }
.day-number { display: block; font-size: .8rem; font-weight: 500; }
.chip { display: block; font-size: .75rem; border-radius: 8px; padding: 2px 6px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--tint-yellow); color: var(--deep-yellow); }
.chip.mine { background: var(--tint-blue); color: var(--deep-blue); }
.chip.cancelled { text-decoration: line-through; opacity: .6; }
.chip.changed { outline: 1px dashed var(--primary); }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.week-day { background: var(--surface-2); border: 0; border-radius: var(--radius-md); padding: 10px; min-height: 130px; }
.week-day h3 { font-size: .85rem; margin: 0 0 6px; color: var(--muted); }
.week-day .chip { white-space: normal; }
@media (max-width: 700px) { .week { grid-template-columns: 1fr; } .week-day { min-height: 0; } }
.occurrences { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.occurrences li { border-bottom: 1px solid var(--line-soft); padding-bottom: 10px; }
.occurrences li:last-child { border-bottom: 0; padding-bottom: 0; }
.occurrences li.cancelled strong { text-decoration: line-through; }
.occurrences .state { font-weight: 500; }
.print-only { display: none; }

.province-list { columns: 2 220px; padding-left: 18px; }
.province-list li { margin: 6px 0; }
.province-links li { margin: 8px 0; }
.other-provinces { margin-top: 24px; }
.other-provinces h2 { font-size: 1.15rem; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.admin-nav { margin: 0 0 12px; }
.guide-editor { font-family: ui-monospace, Consolas, monospace; font-size: .9rem; }
.guide-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.guide-list li { margin: 0; background: var(--surface-2); border-radius: var(--radius-md); padding: 20px 22px; transition: background-color .15s ease; }
.guide-list li:hover { background: var(--surface-3); }
main section .guide-list li { background: var(--surface); }
main section .guide-list li:hover { background: var(--surface-1); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.guide-list a { font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; text-decoration: none; }
.guide-list a:hover { text-decoration: underline; }
.guide-list p { margin: 6px 0 0; color: var(--muted); }
.guide { max-width: 760px; }
.guide-meta { color: var(--muted); font-size: .9rem; }
.guide-body h2 { font-size: 1.4rem; margin-top: 32px; }
.guide-body p, .guide-body li { line-height: 1.75; }
.guide-disclaimer { border-top: 1px solid var(--line-soft); padding-top: 14px; margin-top: 32px; }
.child h2 { display: flex; gap: 10px; align-items: baseline; }
.child-details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 8px 0; }
.child-details dt { font-weight: 500; }
.child-details dd { margin: 0; }
.child-details .notes { white-space: pre-wrap; overflow-wrap: anywhere; }
.child-history { padding-left: 18px; margin: 6px 0 0; }
.child details { margin-top: 8px; }
.steps li { margin: 8px 0; line-height: 1.55; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
.more-links { margin-top: 12px; }
.policy { max-width: 780px; }
.policy h1 { font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 700; line-height: 1.15; margin: 8px 0 16px; }
.policy > .lead { font-size: 1.2rem; color: var(--muted); line-height: 1.6; margin-bottom: 8px; }
.policy h2 { font-size: 1.5rem; margin: 40px 0 12px; padding-top: 28px; border-top: 1px solid var(--line-soft); }
.policy li, .policy p { line-height: 1.75; }
.policy h3 { font-size: 1.1rem; margin: 22px 0 6px; color: var(--primary-hover); }
.policy table { margin-top: 12px; }
.compare td { vertical-align: top; }

/* Dashboard tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 20px 0; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; border: 0; border-radius: var(--radius-md); background: var(--surface-2); color: var(--ink); text-decoration: none; transition: background-color .15s ease, transform .15s ease; }
.tile:hover, .tile:focus { background: var(--surface-3); color: var(--ink); }
.tile.attention { background: var(--tint-red); color: var(--deep-red); }
.tile.attention .tile-label { color: var(--deep-red); }
.tile-count { font-family: var(--font-display); font-size: 2.4rem; font-weight: 500; line-height: 1; }
.tile-count.small-count { font-size: 1.7rem; }
.tile-label { color: var(--muted); }
.password-toggle { padding: 2px 0; margin-bottom: 8px; }

/* Account pages: one narrow card under the heading. */
.account-page { max-width: 480px; margin: 0 auto; }
.account-page .lead { color: var(--muted); font-size: 1.02rem; line-height: 1.7; }
main section.account-card { padding: 28px; }
.account-card label { margin-top: 16px; }
.account-card form > label:first-of-type { margin-top: 0; }
.account-card .form-check { margin: 14px 0 4px; padding-left: 1.6em; }
.account-card .form-check label { margin: 0; font-weight: 400; }
.account-card button[type=submit] { margin-top: 18px; }
.field-error { display: block; color: var(--danger); font-size: .88rem; margin-top: 4px; }
.field-error:empty { display: none; }
.field-hint { color: var(--muted); font-size: .85rem; margin: 6px 0 0; }
.account-links { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-direction: column; gap: 8px; }
.validation-summary-valid { display: none; }
.alert ul { margin: 0; padding-left: 18px; }
.attention-badge { font-size: .7rem; vertical-align: top; }
.downloads li { margin: 8px 0; }
.report-tools { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.report h2 { font-size: 1.25rem; margin-top: 24px; border-bottom: 1px solid var(--line-soft); padding-bottom: 6px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media print { .table-scroll { overflow: visible; } }
.fingerprint, .report-table .fingerprint { font-family: ui-monospace, Consolas, monospace; font-size: .7rem; overflow-wrap: anywhere; }
.report-table .num { text-align: right; white-space: nowrap; }
.timeline { list-style: none; padding: 0; }
.timeline li { padding: 8px 0; border-bottom: 1px solid var(--line-soft); break-inside: avoid; }
.timeline .when { color: var(--muted); font-size: .85rem; margin-right: 8px; }
.timeline .kind { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--primary-hover); font-weight: 500; }
.timeline .what { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 600px) { table.month { border-spacing: 2px; } table.month td { height: 64px; padding: 3px; border-radius: 8px; } .chip { font-size: .65rem; } }

/* Bordered cards in the app, as on InvoiceChaser. */
.message, .tile, .week-day, .guide-list li, .link-card { border: 1px solid var(--line) !important; }
.message.mine { border-color: var(--mine-line) !important; }
.tile.attention { border-color: var(--tint-red) !important; }

/* Landing pages, after InvoiceChaser */
main section.hero, main section.band, main section.plain, main section.section-block { background: none; padding: 0; border: 0; border-radius: 0; }
/* Full-width bands without horizontal scrolling: the colour is painted past the container by a shadow and clipped to the viewport. */
.band-full { position: relative; background: var(--band-bg) !important; box-shadow: 0 0 0 100vmax var(--band-bg); clip-path: inset(0 -100vmax); border: 0 !important; border-radius: 0 !important; margin: 0 !important; padding: 72px 0 !important; }
.band-dark { --band-bg: var(--band); }
.band-raised { --band-bg: var(--band-raised); }
.band-cta { --band-bg: var(--band-cta); }
.band-light { --band-bg: var(--band-light); color: var(--muted-light); }
.band-light h2, .band-light h3, .band-light strong { color: var(--ink-light); }
.band-light a:not(.btn) { color: var(--band-light-link); }

.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 20px; }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
.kicker-line { display: block; font-size: .65rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.band-light .kicker-line { color: var(--muted-light); }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 40px 0 64px !important; }
.hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.4rem); font-weight: 700; line-height: 1.1; letter-spacing: var(--tight); margin: 0 0 22px; max-width: 18ch; }
.hero h1 .accent { display: block; color: var(--primary); }
.hero .lead { font-size: 1.06rem; color: var(--muted); max-width: 34rem; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 14px; }
.hero-note { color: var(--muted); font-size: .85rem; margin: 0 0 18px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.chips li { background: var(--surface-1); border: 1px solid var(--line); border-radius: 24px; padding: 5px 12px; font-size: .72rem; font-weight: 600; color: var(--muted); }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 16px !important; } }

.hero-window { background: var(--window); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 0 20px 16px; box-shadow: var(--shadow); }
.window-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 46px; font-size: .78rem; color: var(--muted); }
.window-bar .dots { display: inline-flex; gap: 5px; }
.window-bar .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.window-bar .tag { border: 1px solid var(--line); border-radius: 24px; padding: 2px 10px; color: var(--primary); font-size: .7rem; }
.hero-art { background: var(--primary-container); border: 1px solid var(--line); border-radius: 12px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.window-caption { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 2px 0; }
.window-caption strong { display: block; font-size: .92rem; }
.window-caption span { font-size: .8rem; color: var(--muted); }
.round-link { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-1); color: var(--primary); }
.round-link svg { width: 16px; height: 16px; fill: currentColor; }
.mock { background: #fff; color: #1f1f1f; border-radius: 10px; padding: 14px 16px; box-shadow: 0 6px 18px rgba(0,0,0,.25); font-size: .88rem; }
.mock-label { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: #5f6368; font-weight: 700; margin-bottom: 8px; }
.mock-bubble { border-radius: 14px; padding: 8px 12px; margin: 6px 0; max-width: 85%; }
.mock-bubble.them { background: #f0f4f9; border-top-left-radius: 4px; }
.mock-bubble.me { background: #d3e3fd; color: #062e6f; margin-left: auto; border-top-right-radius: 4px; }
.mock-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; font-size: .7rem; color: #5f6368; }
.mock-week b { display: block; height: 24px; border-radius: 6px; margin-top: 4px; }
.mock-week .a { background: #a8c7fa; }
.mock-week .b { background: #fde293; }
.mock-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mock-pill { background: #c4eed0; color: #0d652d; border-radius: 999px; padding: 3px 10px; font-size: .74rem; font-weight: 600; white-space: nowrap; }

.section-head { margin: 0 auto 36px; max-width: 760px; text-align: center; }
.section-head h2, .split-head h2, .cta-band h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); font-weight: 700; line-height: 1.15; letter-spacing: var(--tight); margin: 0 0 14px; }
h2 em { display: block; font-style: italic; font-weight: 400; color: var(--dim); }
.band-light h2 em { color: var(--band-light-em); }
.section-head p { color: var(--muted); font-size: 1.05rem; margin: 0; }
.section-block { padding: 72px 0 !important; }

.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 960px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .bento { grid-template-columns: 1fr; } }
main .feature-card { margin: 0; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 22px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-1); color: var(--muted); }
.band-dark .feature-card { background: var(--page); }
main .feature-card .card-num { font-size: .72rem; font-weight: 700; color: var(--dim); letter-spacing: .08em; }
main .feature-card h3 { font-size: 1.25rem; line-height: 1.25; margin: 10px 0 0; color: var(--ink); }
main .feature-card p { margin: 0; line-height: 1.7; font-size: .95rem; }
main .feature-card .card-link { margin-top: auto; padding-top: 14px; font-size: .85rem; font-weight: 600; color: var(--primary); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
main .feature-card .card-link:hover { text-decoration: underline; }
.card-link svg { width: 16px; height: 16px; fill: currentColor; }
.card-art { height: 150px; border-radius: 12px; background: radial-gradient(circle at 75% 20%, #0b57d0 0, transparent 55%), var(--primary-container); display: grid; place-items: center; color: #a8c7fa; margin-bottom: 8px; }
.card-art svg { width: 64px; height: 64px; fill: currentColor; filter: drop-shadow(0 8px 16px rgba(0,0,0,.35)); }

/* "How it works" in a light band: heading on the left, numbered steps on the right. */
.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: start; }
.split-head p { font-size: 1.02rem; line-height: 1.8; max-width: 30rem; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 24px; } }
.step-cards { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.step-cards li { counter-increment: step; display: grid; grid-template-columns: 56px 1fr; column-gap: 8px; padding: 22px 0; border-bottom: 1px solid var(--band-light-rule); line-height: 1.7; color: var(--muted-light); }
.step-cards li:first-child { padding-top: 0; }
.step-cards li:last-child { border-bottom: 0; }
.step-cards li::before { content: "0" counter(step); grid-row: span 2; font-family: var(--font-display); font-size: 1.6rem; font-weight: 400; color: var(--ink-light); line-height: 1.2; }
.step-cards strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -.02em; color: var(--ink-light); margin-bottom: 6px; }

.link-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.link-card { display: flex; flex-direction: column; gap: 8px; background: var(--surface-1); border-radius: var(--radius-md); padding: 22px 24px; color: var(--ink); text-decoration: none; transition: background-color .15s ease, border-color .15s ease; }
.link-card:hover { background: var(--surface-3); color: var(--ink); border-color: var(--dim) !important; }
.link-card .kicker { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--primary); font-weight: 700; }
.link-card strong { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; letter-spacing: -.02em; line-height: 1.35; }
.link-card span:last-child { color: var(--muted); font-size: .92rem; }
.section-more { margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.cta-band { text-align: center; }
.cta-band h2 { font-weight: 400; letter-spacing: -.03em; }
.cta-band p { margin: 0 auto; max-width: 52ch; color: var(--muted); }
.cta-band .hero-actions { justify-content: center; }
.fine-print { color: var(--muted); font-size: .85rem; margin-top: 32px; text-align: center; }

/* Footer */
.site-footer { background: var(--footer); border-top: 1px solid var(--line-soft); padding: 56px 0 28px; margin-top: 0; color: var(--muted); font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
.site-footer h2 { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: var(--dim); margin: 0 0 14px; font-family: var(--font); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 9px 0; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.footer-about p { max-width: 36ch; line-height: 1.6; margin: 10px 0 0; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; letter-spacing: -.04em; color: var(--ink); }
.footer-brand .logo { width: 28px; height: 28px; }
.footer-bottom { border-top: 1px solid var(--line-soft); margin-top: 36px; padding-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; font-size: .82rem; }

@media print {
  .band-full { box-shadow: none; clip-path: none; background: none !important; padding: 0 !important; }
  :root { color-scheme: light; --ink: #000; --muted: #222; --page: #fff; --surface: #fff; --surface-2: #fff; --line: #999; --line-soft: #ccc; --primary: #0b57d0; }
  .no-print, body > header, .site-header, .footer, .site-footer, .alert { display: none !important; }
  .print-only { display: block; }
  body { background: #fff; color: #000; }
  main section { background: none; padding: 0; }
}

/* Guide topics: illustrated topic cards, topic pages and the illustration on each guide. */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin: 8px 0 24px; }
.topic-card { display: flex; flex-direction: column; gap: 2px; padding: 10px 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); text-decoration: none; transition: background-color .15s ease, box-shadow .15s ease; }
.topic-card:hover { background: var(--surface-1); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.topic-card img { width: 100%; height: auto; border-radius: 12px; margin-bottom: 8px; }
.topic-card strong { font-family: var(--font-display); font-weight: 500; font-size: 1.05rem; padding: 0 4px; }
.topic-card span { color: var(--muted); font-size: .9rem; padding: 0 4px; }
.topic-heading { color: inherit; text-decoration: none; }
.topic-heading:hover { text-decoration: underline; }
.topic-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 32px; align-items: center; margin-bottom: 24px; }
.topic-hero img { width: 100%; height: auto; border-radius: 20px; }
.topic-chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.topic-chips a { display: inline-block; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; }
.topic-chips a:hover { background: var(--surface-1); }
.guide-art { display: block; width: 100%; height: auto; max-height: 280px; object-fit: cover; border-radius: 20px; margin: 8px 0 8px; }
@media (max-width: 720px) {
    .topic-hero { grid-template-columns: 1fr; gap: 12px; }
    .topic-hero img { order: -1; }
    .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
.see-all { font-weight: 500; }

/* Free tools */
.tool-hero { padding: 32px 0 24px; }
.tool-hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); font-weight: 700; letter-spacing: var(--tight); margin: 0 0 14px; max-width: 26ch; }
.tool-hero .lead { color: var(--muted); max-width: 44rem; line-height: 1.7; }
.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; margin-bottom: 40px; }
.tool-form, .tool-result { background: var(--surface-2); border-radius: var(--radius-md); padding: 24px; }
.tool-form .form-label { display: block; font-weight: 500; margin: 14px 0 6px; }
.tool-form .form-label:first-child { margin-top: 0; }
.tool-form .btn { margin-top: 18px; }
.tool-result h2 { font-size: 1.25rem; margin: 0 0 16px; }
.time-bar { position: relative; display: flex; height: 22px; border-radius: 11px; overflow: hidden; background: var(--surface-3); }
.time-a { background: var(--primary); }
.time-b { background: #f29b5c; }
.time-forty { position: absolute; top: -4px; bottom: -4px; left: 40%; border-left: 2px dashed var(--ink); }
.time-figures { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.time-figures dt { font-weight: 500; color: var(--muted); }
.time-figures dd { margin: 0; font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; }
.time-figures small { display: block; font-size: .85rem; font-weight: 400; color: var(--muted); }
.time-verdict { font-weight: 500; }
.night-strip { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 3px; margin-bottom: 12px; }
.night-strip span { text-align: center; border-radius: 6px; padding: 4px 0; font-weight: 600; font-size: .85rem; }
.night-strip small { display: block; font-weight: 400; font-size: .7rem; opacity: .8; }
.night-a { background: var(--primary); color: #fff; }
.night-b { background: #f29b5c; color: #1f1f1f; }
.tool-notes { max-width: 46rem; }
@media (max-width: 760px) { .tool-layout { grid-template-columns: 1fr; } }

/* Separation roadmap */
.roadmap-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.roadmap-jump a { background: var(--surface-2); border-radius: 18px; padding: 6px 14px; text-decoration: none; font-size: .9rem; }
.roadmap { list-style: none; padding: 0; margin: 0 0 32px; }
.roadmap > li { margin: 0 0 32px; scroll-margin-top: 90px; }
.roadmap h2 { display: flex; align-items: center; gap: 12px; font-size: 1.4rem; margin: 0 0 6px; }
.roadmap-number { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: var(--on-button, #fff); font-size: 1rem; flex: none; }
.roadmap-tool { border: 2px solid var(--primary); }
.guide-callout { background: var(--surface-2); border-radius: var(--radius-md); padding: 18px 22px; margin: 0 0 24px; }

/* Language menu: always visible, also on phones (outside the collapsed menu) */
.site-header .navbar > .container { flex-wrap: wrap; }
.lang-menu { order: 3; margin-left: auto; }
.navbar-toggler { order: 4; margin-left: 8px; }
.navbar-collapse { order: 5; }
@media (min-width: 992px) {
    .navbar-collapse { order: 2; }
    .lang-menu { order: 3; margin-left: 12px; }
}
.lang-toggle { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid var(--line); border-radius: 18px; padding: 5px 12px; color: var(--ink); font-size: .88rem; }
.lang-toggle:hover, .lang-toggle[aria-expanded="true"] { background: var(--surface-2); }
.lang-toggle svg { width: 16px; height: 16px; fill: currentColor; }
.lang-menu .dropdown-menu { min-width: 9rem; }
.lang-menu .dropdown-item.active { background: var(--primary); color: var(--on-button, #fff); }
.guide-search { display: flex; gap: 8px; max-width: 640px; margin-top: 16px; }
.guide-search .form-control { flex: 1 1 auto; min-width: 0; }
