:root {
  color-scheme: light;
  --bg: #efeae3;
  --ink: #1c1b19;
  --muted: #5c564e;
  --line: #d8d0c6;
  --card: #fffcf8;
  --accent: #3d4f5f;
  --verified: #2f5d50;
  --inferred: #8a8175;
  --suspected: #a15c38;
  --identified: #6e4c7a;
  --focus: #1c1b19;
}

* { box-sizing: border-box; }

html { font-size: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--ink);
  color: var(--card);
  padding: 0.4rem 0.7rem;
  z-index: 2;
}

.skip:focus { top: 0.75rem; }

a { color: var(--accent); }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.site-header, .site-footer {
  width: min(42rem, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header { padding: 1.5rem 0 0.25rem; }

.brand, .eyebrow {
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--muted);
}

.sheet {
  width: min(42rem, calc(100% - 2rem));
  margin: 1.25rem auto 2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(1.4rem, 4vw, 2.6rem);
}

h1 {
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  font-weight: 500;
  font-size: clamp(2.2rem, 8vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0.35rem 0 0.8rem;
}

h2 {
  font-size: 1.15rem;
  margin: 1.6rem 0 0.4rem;
}

.lead { font-size: 1.2rem; margin: 0 0 0.8rem; }

.note, .fine { color: var(--muted); }

.site-footer { margin-top: auto; padding: 0 0 1.5rem; }

.site-footer nav { display: flex; gap: 1rem; }

code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.92em;
  word-break: break-all;
}

.dash-body { display: block; }

.dash {
  width: min(72rem, calc(100% - 1.5rem));
  margin: 1rem auto 2rem;
}

.dash-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.dash h1, .admin-login h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0; color: var(--ink); }

.admin-login { margin-top: 8vh; }

.range { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.range a, button, .button {
  display: inline-block;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

.range a[aria-current="true"], button.primary {
  background: var(--accent);
  color: #f7f4ef;
  border-color: var(--accent);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.7rem;
  margin: 0.8rem 0 1rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
}

.card strong {
  display: block;
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  margin: 0.8rem 0;
}

.legend { display: flex; flex-wrap: wrap; gap: 0.8rem 1rem; font-size: 0.85rem; color: var(--muted); }

.swatch { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 2px; margin-right: 0.3rem; vertical-align: -1px; }
.swatch.verified { background: var(--verified); }
.swatch.inferred { background: var(--inferred); }
.swatch.suspected { background: var(--suspected); }
.swatch.identified { background: var(--identified); }

.chart { width: 100%; height: auto; display: block; }

.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }

th, td { text-align: left; padding: 0.45rem 0.4rem; border-bottom: 1px solid var(--line); vertical-align: top; }

th { font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.form-row { display: flex; flex-direction: column; gap: 0.3rem; margin: 0 0 0.8rem; }

input[type="text"], input[type="password"] {
  font: inherit;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  width: min(24rem, 100%);
}

.error { color: #8a2f1e; }

.ok { color: var(--verified); }

.assessment {
  white-space: pre-wrap;
  font-family: Georgia, "Iowan Old Style", serif;
  font-size: 1rem;
  line-height: 1.5;
}

.inline-form { display: inline; }

.exports { display: flex; flex-wrap: wrap; gap: 0.4rem; }

@media (max-width: 640px) {
  .dash { width: min(72rem, calc(100% - 1rem)); }
  .sheet { width: min(42rem, calc(100% - 1rem)); }
}

input[type="email"], input[type="search"], input[type="number"], textarea, select {
  font: inherit;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  width: min(36rem, 100%);
}

textarea { min-height: 6rem; }

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.unread td { font-weight: 650; }

.bars { list-style: none; padding: 0; }
.bars li { display: grid; grid-template-columns: 7rem 1fr auto; gap: 0.6rem; align-items: center; margin: 0.25rem 0; }
.bar { display: block; height: 0.55rem; background: var(--accent); border-radius: 99px; }
.b0 { width: 6%; } .b1 { width: 14%; } .b2 { width: 24%; } .b3 { width: 34%; } .b4 { width: 44%; }
.b5 { width: 54%; } .b6 { width: 64%; } .b7 { width: 74%; } .b8 { width: 84%; } .b9 { width: 94%; } .b10 { width: 100%; }

.thread { list-style: none; padding: 0; }
.thread li { border-top: 1px solid var(--line); padding: 0.8rem 0; }
.thread .meta, .note-card .meta { color: var(--muted); font-size: 0.85rem; margin: 0; }
.thread .body { margin: 0.3rem 0 0; }
.note-card { border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem 1rem; margin: 0.5rem 0; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.filters { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: end; margin: 0.5rem 0 1rem; }
.optional { color: var(--muted); font-weight: 400; }
.field-error { color: #8a2f1e; }

body.sales {
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(214, 178, 94, 0.16), transparent 55%),
    #0b1220;
  color: #e8eef8;
}

body.sales a { color: #f0d48a; }
body.sales a:hover { color: #fff; }

.sales-bar, .sales-footer {
  width: min(68rem, calc(100% - 2rem));
  margin: 0 auto;
}

.sales-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 0;
}

.sales-brand {
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.sales-nav { display: flex; gap: 1rem; }

body.sales main {
  width: min(68rem, calc(100% - 2rem));
  margin: 0 auto 2rem;
}

body.sales .hero, body.sales .panel {
  background: rgba(18, 28, 48, 0.92);
  border: 1px solid rgba(232, 238, 248, 0.12);
  border-radius: 22px;
  padding: clamp(1.4rem, 4vw, 3rem);
  margin: 1rem 0;
}

body.sales .hero h1, body.sales h1 {
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
  font-weight: 500;
  font-size: clamp(3rem, 10vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin: 0.2rem 0;
  color: #fff;
}

body.sales .subtitle { font-size: clamp(1.15rem, 2.5vw, 1.6rem); margin: 0.4rem 0; color: #f0d48a; }
body.sales .availability { font-size: clamp(1.2rem, 3vw, 1.8rem); margin: 0.8rem 0 1.2rem; }

body.sales .actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }

body.sales .cta, body.sales .ghost, body.sales button {
  display: inline-block;
  border-radius: 999px;
  padding: 0.9rem 1.3rem;
  text-decoration: none;
  border: 1px solid transparent;
  font: inherit;
  cursor: pointer;
}

body.sales .cta, body.sales button.cta {
  background: #f0d48a;
  color: #1a1408;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.sales a.cta { color: #1a1408; }
body.sales .ghost, body.sales button.ghost, body.sales button {
  background: transparent;
  color: #e8eef8;
  border-color: rgba(232, 238, 248, 0.35);
}

body.sales .value-label { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; color: #9aabc4; margin-bottom: 0; }
body.sales .value { font-family: Georgia, serif; font-size: clamp(2.4rem, 7vw, 4rem); margin: 0.2rem 0; color: #fff; }
body.sales .disclaimer, body.sales .fine, body.sales .notes { color: #c5d0e2; }
body.sales .highlights { columns: 2; padding-left: 1.1rem; }
body.sales table { width: 100%; border-collapse: collapse; }
body.sales th, body.sales td { text-align: left; padding: 0.55rem 0.4rem; border-bottom: 1px solid rgba(232, 238, 248, 0.12); }
body.sales caption { text-align: left; color: #9aabc4; margin-bottom: 0.4rem; }
.sales-footer { padding: 1rem 0 2.5rem; color: #9aabc4; }
.sales-footer nav { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 0.8rem; }
.check-row label { display: flex; gap: 0.6rem; align-items: flex-start; }
.captcha-row img { display: block; border-radius: 8px; background: #0b1220; margin: 0.4rem 0; }

.rise { animation: rise 0.7s ease both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .rise { animation: none; }
}

@media (max-width: 700px) {
  .sales-bar { flex-direction: column; align-items: flex-start; }
  .highlights { columns: 1; }
  .bars li { grid-template-columns: 1fr; }
  body.sales .hero h1, body.sales h1 { font-size: clamp(2.4rem, 12vw, 3.4rem); }
}
