:root {
  --ink: #1a1714;
  --paper: #f3ead7;
  --tan: #e4d5b8;
  --rust: #c45c26;
  --pine: #2f5d50;
  --rule: #1a1714;
  --muted: #5c5348;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  line-height: 1.45;
}

a {
  color: var(--pine);
}

.bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  border-bottom: 2px solid var(--rule);
  background: var(--paper);
}

.mark {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: Fraunces, Georgia, serif;
  font-weight: 700;
  font-size: 22px;
}

.mark-box {
  width: 18px;
  height: 18px;
  border: 2px solid var(--rust);
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 5px var(--ink);
}

.byline {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.bar nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
  font-weight: 600;
}

.bar nav a {
  color: var(--ink);
  text-decoration: none;
}

.intro,
.uses,
.report,
.history,
footer {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.intro {
  padding: 48px 0 20px;
  border-bottom: 2px solid var(--rule);
}

.kicker {
  margin: 0 0 10px;
  color: var(--rust);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 500;
}

h1 {
  margin: 0 0 14px;
  max-width: 16ch;
  font-size: clamp(40px, 7vw, 68px);
  line-height: 0.95;
}

.lede {
  max-width: 62ch;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 19px;
}

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

input {
  min-height: 46px;
  padding: 0 12px;
  border: 2px solid var(--rule);
  background: #fffdf6;
  color: var(--ink);
  font: inherit;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.btn {
  min-height: 46px;
  padding: 0 18px;
  border: 2px solid var(--rule);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn.rust {
  color: #fffdf6;
  background: var(--rust);
}

.btn.ink {
  background: var(--ink);
  color: var(--paper);
}

.btn.ghost {
  background: transparent;
}

.btn:disabled {
  opacity: 0.5;
}

.hint {
  margin: 12px 0 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
}

.hint.error {
  color: #8a1f12;
}

.uses {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-bottom: 2px solid var(--rule);
}

.uses article {
  padding: 22px 18px 22px 0;
  border-right: 1px solid var(--rule);
}

.uses article:last-child {
  border-right: 0;
  padding-right: 0;
}

.uses h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.uses p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.report {
  padding: 28px 0;
  display: grid;
  gap: 18px;
}

.panel {
  padding: 22px 0;
  border-bottom: 1px solid var(--tan);
}

.panel h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.identity {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  align-items: center;
}

.identity img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  background: #fffdf6;
  border: 2px solid var(--rule);
}

.meta {
  margin: 0 0 6px;
  color: var(--muted);
}

.swatches,
.checks,
.contacts,
.exports {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.swatch,
.check,
.chip {
  border: 2px solid var(--rule);
  background: #fffdf6;
}

.swatch-chip {
  height: 70px;
  cursor: pointer;
}

.swatch-meta,
.check,
.chip {
  padding: 10px;
  font-size: 13px;
}

.swatch-meta strong,
.mono {
  font-family: "IBM Plex Mono", monospace;
}

.check.ok {
  border-color: var(--pine);
}

.check.bad {
  border-color: var(--rust);
}

.font-row,
.preview,
.share-card,
.mock {
  border: 2px solid var(--rule);
  background: #fffdf6;
  padding: 14px;
  margin-bottom: 10px;
}

.font-sample {
  margin: 8px 0 0;
  font-size: 28px;
}

.share-card img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  margin-bottom: 10px;
}

.mock-nav {
  display: flex;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid currentColor;
  font-weight: 700;
}

.mock-hero {
  padding: 28px 8px;
}

.mock-cta {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 16px;
  border: 0;
  font-weight: 700;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.history ul {
  list-style: none;
  padding: 0;
  margin: 0 0 40px;
}

.history button {
  width: 100%;
  margin-bottom: 6px;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--tan);
  padding: 8px 0;
  font: inherit;
  cursor: pointer;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

footer {
  padding: 28px 0 48px;
  border-top: 2px solid var(--rule);
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 860px) {
  .bar,
  .fields,
  .uses,
  .compare-grid,
  .identity {
    grid-template-columns: 1fr;
  }

  .bar nav,
  .byline {
    display: none;
  }

  .uses article {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    padding: 16px 0;
  }
}

@media print {
  .bar nav,
  .form-actions,
  .uses,
  .history,
  footer,
  .hint {
    display: none;
  }

  body {
    background: white;
  }
}
