/* MonsiMarket: one stylesheet, system fonts, one accent (ink blue) on warm off-white. */
:root {
  --bg: #f8f4ec;
  --paper: #fffdf8;
  --ink: #1e1c18;
  --muted: #55504a;
  --rule: #d9d1c1;
  --accent: #1f3a5f;
  --accent-ink: #ffffff;
  --accent-soft: #e4eaf2;
  --warn: #7a2a1d;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --measure: 68ch;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1.0625rem/1.65 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--accent); color: var(--accent-ink); padding: 0.6rem 1rem; z-index: 10; }
.skip:focus { top: 0.75rem; }
.wrap { width: min(100% - 2rem, 68rem); margin-inline: auto; }
.narrow { width: min(100% - 2rem, 46rem); margin-inline: auto; }

/* header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--bg); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 2rem; padding-block: 1rem; }
.brand { font: 700 1.35rem/1 var(--serif); color: var(--accent); text-decoration: none; letter-spacing: -0.01em; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.4rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 0.35rem 0; border-bottom: 2px solid transparent; font-size: 0.97rem; }
.site-nav a:hover { border-bottom-color: var(--rule); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--accent); font-weight: 600; }

/* type */
h1, h2, h3 { font-family: var(--serif); color: var(--ink); line-height: 1.15; letter-spacing: -0.012em; margin: 0 0 0.6em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5.6vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.55rem, 3.4vw, 2.1rem); margin-top: 2.6em; }
h3 { font-size: 1.22rem; margin-top: 1.8em; }
p, ul, ol, dl, table, figure { margin: 0 0 1.1em; }
.measure, .prose p, .prose ul, .prose ol { max-width: var(--measure); }
.eyebrow { font: 600 0.82rem/1.3 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
.lede { font-size: 1.22rem; line-height: 1.55; color: var(--ink); max-width: 56ch; }
.small { font-size: 0.9rem; color: var(--muted); }
.muted { color: var(--muted); }
code, kbd { font: 0.9em var(--mono); background: var(--accent-soft); padding: 0.1em 0.35em; border-radius: 3px; }
main { padding-bottom: 4rem; }
section { margin-block: 0; }
.rule-top { border-top: 1px solid var(--rule); margin-top: 3.5rem; padding-top: 0.5rem; }
.draft-note { background: var(--paper); border: 1px solid var(--rule); border-left: 4px solid var(--accent); padding: 0.7rem 1rem; font-size: 0.95rem; max-width: var(--measure); }

/* hero */
.hero { padding-block: 3.2rem 1rem; display: grid; gap: 2.5rem; }
@media (min-width: 62rem) { .hero { grid-template-columns: 1.05fr 0.95fr; align-items: start; gap: 3.5rem; padding-top: 4.2rem; } }
.hero-fig { border: 1px solid var(--rule); background: var(--paper); padding: 0.6rem; box-shadow: 0 1px 0 var(--rule); }
.hero-fig figcaption, figure figcaption { font-size: 0.85rem; color: var(--muted); padding: 0.6rem 0.2rem 0.1rem; }
figure { margin-inline: 0; }
.shot { border: 1px solid var(--rule); background: #fff; }

/* buy block */
.buy { background: var(--paper); border: 1px solid var(--rule); padding: 1.2rem 1.3rem 1rem; max-width: 34rem; }
.price { margin: 0 0 0.8rem; font-size: 0.95rem; color: var(--muted); }
.price strong { font: 700 2.2rem/1 var(--serif); color: var(--ink); margin-right: 0.35rem; }
.btn { display: inline-block; padding: 0.8rem 1.25rem; font: 600 1rem/1.3 var(--sans); background: var(--accent); color: var(--accent-ink); text-decoration: none; border: 2px solid var(--accent); border-radius: 3px; cursor: pointer; }
.btn:hover { background: #162b47; border-color: #162b47; }
.btn-quiet { background: transparent; color: var(--accent); }
.btn-quiet:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.btn-pending { background: var(--paper); color: var(--accent); border-style: dashed; }
.btn-pending:hover { background: var(--accent-soft); color: var(--accent); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-block: 1rem; }
.buy .small { margin: 0.8rem 0 0; }

/* lists */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0; max-width: 52rem; }
.steps > li { counter-increment: s; display: grid; grid-template-columns: 3.2rem 1fr; gap: 0.5rem; padding: 1rem 0; border-top: 1px solid var(--rule); }
.steps > li:last-child { border-bottom: 1px solid var(--rule); }
.steps > li::before { content: counter(s, decimal-leading-zero); font: 700 1.6rem/1.2 var(--serif); color: var(--accent); }
.steps h3 { margin: 0 0 0.2rem; font-size: 1.1rem; }
.steps p { margin: 0; color: var(--ink); max-width: 60ch; }
.ticks { list-style: none; padding: 0; max-width: var(--measure); }
.ticks li { padding-left: 1.6rem; position: relative; margin-bottom: 0.45rem; }
.ticks li::before { content: ""; position: absolute; left: 0.1rem; top: 0.62em; width: 0.7rem; height: 0.38rem; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.crosses li::before { border: 0; width: 0.8rem; height: 2px; background: var(--warn); transform: none; top: 0.8em; }
.cols { display: grid; gap: 2rem; }
@media (min-width: 48rem) { .cols { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.cols > * > :first-child { margin-top: 0; }

/* tables */
.table-wrap { overflow-x: auto; margin-bottom: 1.4rem; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); }
table { border-collapse: collapse; width: 100%; font-size: 0.97rem; }
caption { text-align: left; font-weight: 600; padding: 0.7rem 0 0.4rem; caption-side: top; }
th, td { text-align: left; vertical-align: top; padding: 0.65rem 0.8rem 0.65rem 0; border-bottom: 1px solid var(--rule); }
thead th { border-bottom: 1px solid var(--ink); font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
th[scope="row"] { font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 40rem) {
  .table-wrap { border-bottom: 0; }
  table, tbody, tr, th, td { display: block; width: 100%; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  tr { padding: 0.8rem 0; border-bottom: 1px solid var(--rule); }
  th, td { border: 0; padding: 0.1rem 0; }
  th[scope="row"] { overflow-wrap: anywhere; }
  td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--muted); }
  caption { display: block; }
}

/* faq */
.qa { max-width: var(--measure); border-top: 1px solid var(--rule); padding-top: 0.2rem; }
.qa h3 { margin-top: 1.1rem; font-size: 1.15rem; }

/* gallery */
.gallery { display: grid; gap: 1.6rem; }
@media (min-width: 56rem) { .gallery.three { grid-template-columns: repeat(3, 1fr); align-items: start; } }

/* forms */
.form { max-width: 34rem; display: grid; gap: 1rem; }
.field label, .field legend { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 0.3rem; }
.field .hint { display: block; font-weight: 400; color: var(--muted); font-size: 0.85rem; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid #7d766a; border-radius: 3px; padding: 0.55rem 0.65rem; min-height: 2.7rem; }
textarea { min-height: 7rem; resize: vertical; }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--warn); border-width: 2px; }
.err { color: var(--warn); font-size: 0.9rem; margin: 0.3rem 0 0; min-height: 0; }
.err:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { padding: 0.8rem 1rem; border: 1px solid var(--rule); background: var(--paper); max-width: 34rem; }
.status:empty { display: none; }
.status.ok { border-left: 4px solid var(--accent); }
.status.bad { border-left: 4px solid var(--warn); }

/* quote preview */
.qp { background: var(--paper); border: 1px solid var(--rule); padding: 1.2rem; display: grid; gap: 1.6rem; }
@media (min-width: 56rem) { .qp { grid-template-columns: 1.1fr 0.9fr; padding: 1.6rem; gap: 2.4rem; } }
.qp fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.qp .grid2 { display: grid; gap: 0.8rem; grid-template-columns: 1fr 1fr; }
.qp .field label { font-size: 0.88rem; }
.qp dl { display: grid; grid-template-columns: 1fr auto; gap: 0.35rem 1rem; margin: 0; }
.qp dt { color: var(--muted); }
.qp dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.qp dt.total, .qp dd.total { border-top: 1px solid var(--ink); padding-top: 0.45rem; margin-top: 0.3rem; color: var(--ink); font-size: 1.15rem; }
.qp .verdict { margin-top: 0.8rem; padding: 0.5rem 0.7rem; background: var(--accent-soft); font-weight: 600; }

/* footer */
.site-footer { border-top: 1px solid var(--rule); padding-block: 2.2rem 3rem; font-size: 0.93rem; color: var(--muted); background: var(--bg); }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.3rem 1.3rem; padding: 0; margin: 0 0 1rem; }
.site-footer p { margin: 0 0 0.5rem; max-width: 70ch; }
.site-footer a { color: var(--ink); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
@media print { .site-header, .site-footer, .skip { display: none; } body { background: #fff; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.rule-top > h2:first-child { margin-top: 1.4rem; }
.buy + .ticks { margin-top: 1.5rem; }
.qp .grid2 { margin-bottom: 0.8rem; }
.qp .field + .field { margin-top: 0.8rem; }
.qp dl { column-gap: 0; row-gap: 0.4rem; }
.qp dt { padding-right: 1rem; }
.qp .btn-row { margin-bottom: 0; }
.qp .grid2 { align-items: end; }
main > .narrow, main > .wrap.prose > header:first-child:not(.hero) { padding-top: 3rem; }
.narrow { margin-left: max(1rem, calc((100% - 68rem) / 2)); margin-right: auto; }
