/* Tidemark — shared styles
   Design references: NHS.uk design system (plain language, 44px+ tap targets,
   WCAG AA contrast, visible focus), Clue (calm palette, one accent, data-first). */

:root {
  /* "Sea glass" palette: teal brand, coral severity scale, sand background.
     All text and button pairs meet WCAG AA. */
  --bg: #f6f3ed;
  --surface: #ffffff;
  --surface-2: #ece8df;
  --ink: #1d2a2c;
  --ink-2: #4f5d5f;
  --line: #e2ddd3;
  --accent: #1d6b64;        /* teal, 6.3:1 with white text */
  --accent-ink: #ffffff;
  --accent-soft: #dcecea;
  --coral: #f2b8a2;         /* decorative highlight only, not for text */
  --sage: #1d6b64;
  --sage-soft: #dcecea;
  --sev-0: #ebe5dc;
  --sev-1: #f7d4c6;
  --sev-2: #ec9a7d;
  --sev-3: #b9503a;
  --flow: #8e2f5a;
  --focus: #ffbf47;         /* NHS-style high-visibility focus ring */
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(42, 35, 48, .06), 0 4px 16px rgba(42, 35, 48, .06);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 5px var(--ink); border-radius: 4px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin: 0 0 .6em; }
h3 { font-size: 1.25rem; margin: 0 0 .4em; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--focus); color: var(--ink); padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* Header / footer */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.brand svg { width: 30px; height: 30px; }
.nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 1rem; }
.nav a:hover { background: var(--surface-2); }
.nav a[aria-current="page"] { font-weight: 600; }

.site-footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 32px 0 48px; font-size: .9rem; color: var(--ink-2); }
.site-footer .wrap { display: grid; gap: 12px; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #155550; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-quiet { background: var(--surface-2); color: var(--ink); }
.btn-quiet:hover { background: var(--line); }
.btn-danger { background: transparent; color: #9b1c1c; border-color: #9b1c1c; }
.btn-danger:hover { background: #fbeaea; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: .9rem; }

/* Landing */
.hero { padding: 64px 0 40px; }
.hero-grid { display: grid; gap: 40px; align-items: center; grid-template-columns: 1.05fr .95fr; }
.hero .lede { font-size: 1.2rem; color: var(--ink-2); max-width: 34ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 12px; }
.trust-row { display: flex; gap: 18px; flex-wrap: wrap; padding: 0; margin: 16px 0 0; list-style: none; font-size: .95rem; color: var(--ink-2); }
.trust-row li::before { content: "✓"; color: var(--sage); font-weight: 700; margin-right: 6px; }

.preview-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); }
.preview-card h3 { font-family: var(--sans); font-size: 1rem; margin-bottom: 14px; }
.preview-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: .95rem; }
.preview-row:first-of-type { border-top: 0; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 22px; height: 22px; border-radius: 6px; background: var(--sev-0); display: inline-block; }
.dots i.on1 { background: var(--sev-1); } .dots i.on2 { background: var(--sev-2); } .dots i.on3 { background: var(--sev-3); }

.section { padding: 56px 0; }
.section-alt { background: var(--surface-2); }
.grid-3 { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.step-num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; margin-bottom: 12px; }
.tick-list { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 32px; }
.tick-list li { padding: 6px 0 6px 28px; position: relative; break-inside: avoid; }
.tick-list li::before { content: ""; position: absolute; left: 0; top: 14px; width: 14px; height: 14px; border-radius: 4px; background: var(--sev-2); }

.privacy-band { background: var(--sage); color: #fff; border-radius: 20px; padding: 36px; display: grid; gap: 24px; grid-template-columns: 1fr 1fr; }
.privacy-band h2 { color: #fff; }
.privacy-band ul { margin: 0; padding-left: 20px; }
.privacy-band li { margin-bottom: 8px; }
.privacy-band a { color: #fff; }

.signup { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.signup input[type=email] { flex: 1 1 260px; }
.honeypot { display: none; }

details.faq { border-bottom: 1px solid var(--line); padding: 4px 0; }
details.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--accent); }
details.faq[open] summary::after { content: "–"; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq p { color: var(--ink-2); }

.disclaimer { background: var(--surface-2); border-left: 4px solid var(--sage); padding: 16px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: .95rem; }
.callout-warn { background: #fff4e5; border-left: 4px solid #b26a00; padding: 16px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* Article */
.article { padding: 48px 0; }
.article h2 { margin-top: 1.6em; }
.article li { margin-bottom: .4em; }
.article .meta { color: var(--ink-2); font-size: .95rem; margin-bottom: 2em; }
.sources { font-size: .95rem; }

/* Forms */
input[type=email], input[type=text], input[type=date], select, textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface);
  border: 2px solid #7f8b8c; border-radius: var(--radius-sm); padding: 10px 12px; min-height: 48px;
}
textarea { width: 100%; min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--ink); }
label { font-weight: 600; }

/* ---------- Tracker app ---------- */
.app-main { padding: 24px 0 40px; }
.app-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.app-head h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin: 0; }
.tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 999px; margin: 8px 0 24px; overflow-x: auto; }
.tabs button { flex: 1 0 auto; min-height: 44px; padding: 8px 18px; border: 0; border-radius: 999px; background: transparent; font: 600 .95rem var(--sans); color: var(--ink-2); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.panel[hidden] { display: none; }

.date-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.date-nav .icon-btn { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); font-size: 1.3rem; cursor: pointer; color: var(--ink); }
.date-nav .icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.date-label { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; min-width: 13ch; }
.save-status { margin-left: auto; font-size: .9rem; color: var(--sage); font-weight: 600; min-height: 1.4em; }

fieldset.group { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 8px 20px 12px; margin: 0 0 16px; }
fieldset.group > legend { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; padding: 0 6px; }
.sym-row { display: grid; grid-template-columns: minmax(150px, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.sym-row:first-of-type { border-top: 0; }
.sym-name { font-weight: 600; }
.sym-hint { display: block; font-weight: 400; font-size: .85rem; color: var(--ink-2); }
.seg { display: inline-flex; border: 2px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { min-width: 44px; min-height: 44px; padding: 10px 12px; font-size: .85rem; font-weight: 600; cursor: pointer; display: grid; place-items: center; color: var(--ink-2); border-left: 1px solid var(--line); }
.seg label:first-of-type { border-left: 0; }
.seg input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: -3px; }
.seg input:checked + label.v0 { background: #fff; color: var(--ink); }
.seg input:checked + label.v1 { background: var(--sev-1); color: var(--ink); }
.seg input:checked + label.v2 { background: var(--sev-2); color: #2a1610; }
.seg input:checked + label.v3 { background: var(--sev-3); color: #fff; }
.seg.flow input:checked + label { background: var(--flow); color: #fff; }
.seg.flow input:checked + label.f0 { background: #fff; color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label { min-height: 44px; display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); font-weight: 600; font-size: .9rem; cursor: pointer; }
.chips input:checked + label { background: var(--sage); border-color: var(--sage); color: #fff; }
.chips input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }

.log-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; align-items: center; margin-top: 8px; }

.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat .k { font-size: .85rem; color: var(--ink-2); }
.stat .v { font-family: var(--serif); font-size: 1.8rem; font-weight: 600; line-height: 1.1; margin-top: 4px; }
.stat .v.small-v { font-size: 1.2rem; padding-top: 6px; }
.chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 20px; }
.chart-card h3 { font-family: var(--sans); font-size: 1rem; }
.chart svg { display: block; width: 100%; height: auto; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: var(--ink-2); margin-top: 8px; }
.legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--sev-2); }
.legend .lg-flow::before { background: var(--flow); border-radius: 50%; }
.legend .lg-none::before { background: transparent; border: 1px dashed #b0a8a0; }

table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data th, table.data td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
table.data td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar { height: 10px; background: var(--sev-0); border-radius: 99px; min-width: 80px; }
.bar > span { display: block; height: 100%; background: var(--sev-2); border-radius: 99px; }

.empty { text-align: center; padding: 40px 20px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); color: var(--ink-2); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 600; box-shadow: var(--shadow); z-index: 50; }
.toast[hidden] { display: none; }

/* Report (screen) */
.report { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.report h2 { font-size: 1.6rem; margin-bottom: .2em; }
.report h3 { margin-top: 1.4em; font-family: var(--sans); font-size: 1.05rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); border-bottom: 2px solid var(--ink); padding-bottom: 6px; }
.report .r-meta { color: var(--ink-2); font-size: .95rem; }
.report ul { padding-left: 20px; }
.report .note-list li { margin-bottom: 6px; }
.report textarea { min-height: 120px; }
.print-questions, .print-only { display: none; white-space: pre-wrap; }

@media (max-width: 860px) {
  .hero-grid, .grid-3, .grid-2, .privacy-band { grid-template-columns: 1fr; }
  .tick-list { columns: 1; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .sym-row { grid-template-columns: 1fr; gap: 6px; }
  .seg { width: 100%; }
  .seg label { flex: 1; padding: 10px 4px; }
  .report { padding: 20px; }
  .nav { flex-wrap: nowrap; gap: 2px; }
  .nav a { padding: 8px 6px; font-size: .9rem; white-space: nowrap; }
  .nav a.btn { padding: 8px 12px; }
  .brand { font-size: 1.15rem; gap: 8px; }
  .brand img { width: 26px; height: 26px; }
  .tabs { display: grid; grid-template-columns: 1fr 1fr; border-radius: 18px; overflow: visible; }
  .tabs button { border-radius: 14px; padding: 8px 6px; }
  .save-status { flex-basis: 100%; margin-left: 0; }
}

/* Print: only the doctor report */
@media print {
  body { background: #fff; font-size: 11pt; }
  .site-header, .site-footer, .tabs, .app-head, .no-print, .panel:not(#panel-report), .toast { display: none !important; }
  #panel-report { display: block !important; }
  .report { border: 0; padding: 0; }
  .report textarea, .report input, .report label[for="r-name"] { display: none; }
  .print-questions { display: block; border: 1px solid #999; padding: 8px; min-height: 60px; }
  .print-only { display: block; font-weight: 600; }
  .print-only:empty { display: none; }
  .chart-card, .stat { break-inside: avoid; border-color: #999; }
  table.data { font-size: 10pt; }
  a { color: inherit; text-decoration: none; }
  @page { margin: 16mm; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

@media (max-width: 560px) { .nav a.hide-sm { display: none; } }
.nav a.btn-primary { color: var(--accent-ink); }
.nav a.btn-primary:hover { background: #155550; }

/* ---------- v2: notices, quick logging, calendar, profile, treatments ---------- */
.notices { display: grid; gap: 10px; margin-bottom: 12px; }
.notice { background: var(--sage-soft); border: 1px solid #b5d3cf; border-radius: var(--radius); padding: 14px 18px; display: flex; gap: 12px 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.notice p { margin: 0; flex: 1 1 320px; font-size: .95rem; }
.notice-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.info-card { background: var(--sage-soft); border-left: 4px solid var(--sage); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 12px 16px; margin-bottom: 14px; font-size: .95rem; }
.quick-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.quick-bar .btn:disabled { opacity: .5; cursor: not-allowed; }
#bleed-warn .callout-warn { margin: 6px 0 10px; }

.hf-row { background: var(--surface-2); margin: 0 -20px; padding: 10px 20px; border-top: 0; }
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.step-btn { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); font: 600 1.4rem/1 var(--sans); color: var(--ink); cursor: pointer; }
.step-btn:hover { background: var(--accent-soft); border-color: var(--sev-2); }
.step-btn:disabled { opacity: .35; cursor: not-allowed; }
.stepper output { min-width: 2.2ch; text-align: center; font-family: var(--serif); font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; }

.cal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cal-head .icon-btn { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); font-size: 1.3rem; cursor: pointer; color: var(--ink); }
.cal-head .icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.cal-title { margin: 0; font-size: 1.5rem; min-width: 10ch; text-align: center; flex: 1; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; font-size: .8rem; font-weight: 600; color: var(--ink-2); padding-bottom: 4px; }
.cal-day { position: relative; aspect-ratio: 1 / 1; min-height: 44px; border-radius: 10px; border: 1px solid transparent; background: var(--sev-0); cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 6px; font: 600 .9rem var(--sans); color: var(--ink); }
.cal-day:hover:not(:disabled) { outline: 2px solid var(--ink); outline-offset: -2px; }
.cal-day:disabled { opacity: .35; cursor: default; background: transparent; border: 1px dashed var(--line); }
.cal-day.unlogged { background: transparent; border: 1px dashed #c9c0b5; color: var(--ink-2); }
.cal-day.lvl-0 { background: #fff; border-color: var(--line); }
.cal-day.lvl-1 { background: var(--sev-1); }
.cal-day.lvl-2 { background: var(--sev-2); color: #2a1610; }
.cal-day.lvl-3 { background: var(--sev-3); color: #fff; }
.cal-day.is-today { box-shadow: 0 0 0 3px var(--ink); }
.cal-marks { display: flex; gap: 4px; align-items: center; }
.cal-marks i { display: inline-block; border-radius: 50%; }
.m-flow { background: var(--flow); width: 8px; height: 8px; box-shadow: 0 0 0 2px #fff; }
.m-spot { width: 5px; height: 5px; }
.m-heavy { width: 11px; height: 11px; }
.m-tx { width: 10px; height: 10px; background: var(--sage) !important; border-radius: 2px !important; transform: rotate(45deg); box-shadow: 0 0 0 2px #fff; }
.cal-legend { margin-top: 14px; }
.legend .lg-s1::before { background: var(--sev-1); }
.legend .lg-s3::before { background: var(--sev-3); }
.legend .lg-tx::before { background: transparent; border-left: 2px dashed var(--sage); border-radius: 0; width: 0; margin-right: 10px; }
.cal-legend .lg-tx::before { background: var(--sage); border: 0; width: 9px; height: 9px; transform: rotate(45deg); border-radius: 1px; }

.card.stack { margin-bottom: 20px; }
.h-card { font-size: 1.3rem; margin-bottom: .4em; }
.h-gap { margin-top: 1.4em; }
fieldset.plain { border: 0; padding: 0; margin: 0 0 18px; }
fieldset.plain > legend { font-weight: 600; padding: 0; margin-bottom: 8px; }
.radio-list { display: grid; gap: 6px; }
.radio, .check-row { display: flex; align-items: center; gap: 10px; font-weight: 400; min-height: 44px; cursor: pointer; }
.check-row { margin: 0; }
.radio input, .check-row input { width: 22px; height: 22px; accent-color: var(--accent); flex: 0 0 auto; }
.tx-list { list-style: none; padding: 0; margin: 0 0 16px; }
.tx-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tx-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tx-form { display: grid; grid-template-columns: 2fr 1.4fr 1fr 1fr auto; gap: 12px; align-items: end; background: var(--surface-2); padding: 16px; border-radius: var(--radius-sm); }
.tx-form p { margin: 0; }
.tx-form input, .tx-form select { width: 100%; }
.safety-list { list-style: none; padding: 0; margin: 0 0 14px; font-size: .95rem; }
.safety-list li { padding: 6px 0 6px 28px; position: relative; }
.safety-list li::before { position: absolute; left: 0; top: 6px; font-weight: 700; }
.safety-list li.ok::before { content: "✓"; color: var(--sage); }
.safety-list li.warn::before { content: "!"; color: #b26a00; width: 18px; text-align: center; }
.tx-compare { padding: 12px 0 6px; border-top: 1px solid var(--line); }
.tx-compare:first-of-type { border-top: 0; }
table.compare { margin: 10px 0 6px; }
.th-sub { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: .75rem; }

@media (max-width: 860px) {
  .tx-form { grid-template-columns: 1fr 1fr; }
  .tx-form p:first-child, .tx-submit { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .tabs { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
  .cal-grid { gap: 3px; }
  .cal-day { padding: 4px; font-size: .8rem; border-radius: 7px; }
  .hf-row { grid-template-columns: 1fr auto; margin: 0 -20px; }
  table.compare { font-size: .85rem; }
  .tx-form { grid-template-columns: 1fr; }
}
@media print {
  .hf-row, .quick-bar, #bleed-card { display: none !important; }
  .tx-compare { break-inside: avoid; }
}
@media (max-width: 900px) {
  .tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); border-radius: 18px; overflow: visible; }
  .tabs button { border-radius: 14px; padding: 8px 6px; }
}
.nav a.btn { border-radius: 999px; }
