/* Public site — ivory, charcoal and gold */
:root {
  --ivory: #FAF6EE;
  --champagne: #F1E7D0;
  --paper: #FFFDF8;
  --ink: #1D1B19;
  --muted: #6F6A5E;
  --gold: #B8923A;
  --gold-deep: #8A6A1F;
  --gold-soft: #E9D9A8;
  --burgundy: #7A1E2B;
  --line: #E3D6B5;
  --danger: #A12B2B;
  --ok: #2F6B3F;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.site { margin: 0; background: var(--ivory); color: var(--ink); font-family: var(--sans); font-size: 1rem; line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; }
body.site main { flex: 1; }
a { color: var(--gold-deep); }
a:hover { color: var(--burgundy); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .5rem 1rem; z-index: 99; }
.skip:focus { left: 0; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem clamp(1rem, 4vw, 3rem); border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); font-family: var(--serif); font-size: 1.4rem; font-weight: 600; }
.brand-monogram { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 1.5px solid var(--gold); color: var(--gold-deep); font-family: var(--serif); font-size: 1.25rem; font-weight: 700; }
.brand-monogram.lg { width: 3.2rem; height: 3.2rem; font-size: 1.7rem; }
.brand-logo { height: 2.4rem; width: auto; max-width: 9rem; object-fit: contain; }
.brand-logo.lg { height: 3.4rem; max-width: 12rem; }
.topnav { display: flex; align-items: center; gap: 1.1rem; font-size: .95rem; }
.topnav a { text-decoration: none; color: var(--ink); }
.topnav a:hover { color: var(--gold-deep); }
.linklike { background: none; border: 0; padding: 0; color: var(--gold-deep); font: inherit; cursor: pointer; text-decoration: underline; }
.linklike:disabled { color: var(--muted); cursor: default; text-decoration: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .75rem 1.5rem; border: 1px solid var(--ink); background: var(--ink); color: var(--ivory); font: 600 .95rem var(--sans); text-decoration: none; border-radius: 2px; cursor: pointer; transition: background .15s, color .15s; }
.btn:hover { background: #000; color: #fff; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #1d1608; }
.btn-gold:hover { background: var(--gold-deep); border-color: var(--gold-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--champagne); color: var(--ink); border-color: var(--gold); }
.btn-sm { padding: .45rem .9rem; font-size: .85rem; }
.btn-block { width: 100%; }
.btn.loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; width: 1.1rem; height: 1.1rem; border: 2px solid rgba(0,0,0,.25); border-top-color: #1d1608; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.loading::after { animation-duration: 2s; } }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .6rem; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: 1.6rem; }

/* landing */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; padding: clamp(2rem, 6vw, 5rem) clamp(1rem, 6vw, 6rem); max-width: 1200px; margin: auto; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); letter-spacing: -.01em; }
.kicker { color: var(--gold-deep); font-weight: 600; margin: 0 0 .8rem; }
.lead { font-size: 1.15rem; max-width: 34em; color: #3a362f; }
.cta { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.6rem; }
.hero-fig { margin: 0; text-align: center; }
.hero-fig figcaption { margin-top: .8rem; color: var(--muted); font-size: .85rem; }
@media (max-width: 800px) { .hero { grid-template-columns: 1fr; } }

/* auth + cards */
.auth { max-width: 460px; margin: clamp(1.5rem, 5vw, 4rem) auto; padding: 0 1rem; }
.auth.wide { max-width: 760px; }
.auth h1 { text-align: center; font-size: clamp(1.9rem, 4vw, 2.5rem); }
.sub { color: var(--muted); text-align: center; margin: 0 0 1.4rem; }
.card-form { background: var(--paper); border: 1px solid var(--line); padding: clamp(1.2rem, 4vw, 2rem); margin-bottom: 1.4rem; box-shadow: 0 1px 0 rgba(184,146,58,.25), 0 12px 30px -18px rgba(60,40,0,.25); }
.card-form h2 { font-size: 1.4rem; margin-bottom: 1rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.field label em { font-weight: 400; color: var(--muted); font-style: normal; }
.field input { width: 100%; padding: .7rem .8rem; border: 1px solid #cdbf98; background: #fff; font: inherit; color: var(--ink); border-radius: 2px; }
.field input:focus { border-color: var(--gold); outline: 2px solid rgba(184,146,58,.35); }
.field input:disabled { background: #f3eee1; color: var(--muted); }
.field.invalid input { border-color: var(--danger); }
.err { display: block; color: var(--danger); font-size: .85rem; min-height: 0; }
.err:empty { display: none; }
.hint { display: block; color: var(--muted); font-size: .8rem; margin-top: .25rem; }
.otp input { font-size: 1.6rem; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1rem; }
@media (max-width: 640px) { .row2, .row3 { grid-template-columns: 1fr; } }
.form-msg { display: none; padding: .7rem .9rem; margin-bottom: 1rem; font-size: .92rem; border-left: 3px solid var(--danger); background: #fbeeee; color: #6e1d1d; }
.form-msg.ok { border-color: var(--ok); background: #eef6ef; color: #1f4a2b; }
.aux { text-align: center; font-size: .92rem; margin: .9rem 0 0; color: var(--muted); }

/* dashboard */
.dash { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 3rem); max-width: 1200px; margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 4vw, 2rem); align-items: start; }
.dash .sub { text-align: left; }
@media (max-width: 900px) { .dash { grid-template-columns: 1fr; } }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--paper); }
.table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.table th, .table td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .78rem; color: var(--muted); font-weight: 600; background: #f8f1df; }
.table .ref { display: block; color: var(--muted); font-size: .75rem; }
.table .actions { white-space: nowrap; display: flex; gap: .4rem; }
.muted { color: var(--muted); }
.pager { display: flex; gap: .4rem; margin-top: 1rem; flex-wrap: wrap; }
.pg { border: 1px solid var(--line); background: var(--paper); padding: .35rem .7rem; cursor: pointer; font: inherit; }
.pg.on { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.sitefoot { border-top: 1px solid var(--line); padding: 1.2rem; text-align: center; color: var(--muted); font-size: .85rem; }
.sitefoot p { margin: 0; }
.report-toolbar, .print-toolbar { max-width: 900px; margin: 1.2rem auto 0; padding: 0 1rem; display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; }
