/* Kiln — warm, tactile, unfussy. The audience is makers; the site should feel
   closer to a well-set printed directory than to a SaaS dashboard. */

:root {
  --clay:        #b4491f;
  --clay-dark:   #8c3715;
  --clay-light:  #e8d3c6;
  --ink:         #241d19;
  --ink-soft:    #5e534c;
  --paper:       #fbf7f3;
  --paper-warm:  #f4ece4;
  /* Darkened from #e2d5c9 to clear the 3:1 required by WCAG 1.4.11 for
     boundaries that carry meaning — card edges separate one business's
     details from the next, so they are not purely decorative. */
  --line:        #9c8a74;
  --green-ok:    #2f6b43;
  --amber:       #a8690b;
  --red:         #a32c1c;
  --radius:      10px;
  --wrap:        1060px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
}

h1, h2, h3, .brand-text, .footer-brand {
  font-family: ui-serif, Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 0 0 .4em; }
h2 { font-size: 1.5rem; margin: 2rem 0 .6rem; }
h3 { font-size: 1.15rem; margin: 1.4rem 0 .4rem; }

a { color: var(--clay-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--clay); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-soft); }
.small { font-size: .875rem; }

/* Skip link: off-screen until focused, then unmissable. WCAG 2.4.1. */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--clay-dark); color: #fff; padding: .7rem 1.1rem;
  font-weight: 600; text-decoration: none; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }
main:focus { outline: none; }

/* ---------------------------------------------------------------- header */
.site-header {
  background: var(--paper-warm);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 22px; height: 22px; border-radius: 4px 4px 8px 8px;
  background: linear-gradient(160deg, var(--clay), var(--clay-dark));
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.15);
}
.brand-text { font-size: 1.3rem; }
.site-header nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.site-header nav a { font-size: .94rem; text-decoration: none; color: var(--ink-soft); }
.site-header nav a:hover { color: var(--clay-dark); text-decoration: underline; }

main.wrap { padding-top: 2rem; padding-bottom: 3.5rem; min-height: 60vh; }

/* ----------------------------------------------------------------- banner */
.banner-demo {
  background: #fff4d6; border-bottom: 1px solid #e8cf94;
  color: #6b4e05; padding: .65rem 20px; font-size: .9rem; text-align: center;
}

/* ------------------------------------------------------------------- hero */
.hero { padding: 1rem 0 2rem; border-bottom: 1px solid var(--line); margin-bottom: 2rem; }
.hero p.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 60ch; }

.stat-row { display: flex; flex-wrap: wrap; gap: 1.6rem; margin: 1.6rem 0 .5rem; }
.stat { min-width: 120px; }
.stat .n {
  font-family: ui-serif, Georgia, serif; font-size: 2rem; font-weight: 600;
  color: var(--clay-dark); display: block; line-height: 1.1;
}
.stat .l { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }

/* ------------------------------------------------------------------ cards */
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .35rem;
}
.card h3 { margin: 0; font-size: 1.05rem; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }

.tag {
  display: inline-block; font-size: .74rem; letter-spacing: .04em;
  text-transform: uppercase; padding: .18rem .5rem; border-radius: 999px;
  background: var(--clay-light); color: var(--clay-dark); white-space: nowrap;
}
.tag.claimed { background: #d8ecd9; color: #235c2f; }
.tag.company { background: #dde5f2; color: #2b456e; }
.tag.sole    { background: #f6e2cf; color: #8a4a12; }

/* ----------------------------------------------------------------- filters */
.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.4rem; }
.chip {
  display: inline-block; padding: .3rem .7rem; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; text-decoration: none;
  color: var(--ink-soft); font-size: .88rem;
}
.chip:hover { border-color: var(--clay); color: var(--clay-dark); }
.chip.on { background: var(--clay-dark); border-color: var(--clay-dark); color: #fff; }

/* ------------------------------------------------------------------ forms */
form.stack { display: flex; flex-direction: column; gap: .9rem; max-width: 480px; }
label { font-weight: 600; font-size: .93rem; display: block; margin-bottom: .25rem; }
input[type=text], input[type=email], input[type=search], select, textarea {
  width: 100%; padding: .6rem .7rem; font: inherit; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--clay); outline-offset: 1px; border-color: var(--clay);
}
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.check input { margin-top: .3rem; flex-shrink: 0; }

.btn {
  display: inline-block; padding: .62rem 1.15rem; border-radius: 8px;
  background: var(--clay-dark); color: #fff; border: 1px solid var(--clay-dark);
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--clay); color: #fff; }
.btn.secondary { background: #fff; color: var(--clay-dark); }
.btn.secondary:hover { background: var(--paper-warm); }

.searchbar { display: flex; gap: .5rem; margin-bottom: 1rem; }
.searchbar input { flex: 1; }

/* ---------------------------------------------------------------- notices */
.notice {
  border-left: 3px solid var(--clay); background: var(--paper-warm);
  padding: .85rem 1rem; border-radius: 0 8px 8px 0; margin: 1rem 0;
}
.notice.ok    { border-color: var(--green-ok); background: #eef6ef; }
.notice.error { border-color: var(--red); background: #fbecea; }

/* Long-form editorial: the about page and anything else that is mostly prose. */
.prose { max-width: 66ch; }
.prose p { margin: 0 0 1.1rem; }
.prose h2 { margin-top: 2.2rem; }
.prose .lead { font-size: 1.16rem; line-height: 1.55; color: var(--ink);
               border-left: 3px solid var(--clay); padding-left: 1rem;
               margin-bottom: 1.8rem; }

.crumbs {
  font-size: .84rem; color: var(--ink-soft); margin: 0 0 1rem;
}
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--clay-dark); text-decoration: underline; }

.filter-label {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-soft); font-weight: 600; margin-right: .2rem;
  align-self: center;
}

.card-contact { display: flex; flex-wrap: wrap; gap: .1rem .8rem; margin: .3rem 0 0; font-size: .86rem; }
.card-contact a { color: var(--ink-soft); text-decoration: none; }
.card-contact a:hover { color: var(--clay-dark); text-decoration: underline; }

/* ------------------------------------------------------------ link chips */
.links-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.2rem 0 1.6rem; }
.card-links { display: flex; flex-wrap: wrap; gap: .35rem; margin: .5rem 0 0; }

.link-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-soft); text-decoration: none;
  font-size: .88rem; line-height: 1;
}
.link-chip:hover { border-color: var(--clay); color: var(--clay-dark); }
.link-chip.primary {
  background: var(--clay-dark); border-color: var(--clay-dark); color: #fff;
  font-weight: 600;
}
.link-chip.primary:hover { background: var(--clay); color: #fff; }
.link-chip.small { font-size: .78rem; padding: .25rem .55rem; }
.link-chip.icon-only { padding: .3rem; }
.link-chip .icon { flex-shrink: 0; }

/* --------------------------------------------------------------- profile */
.profile-head { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; align-items: flex-start; }
.provenance { width: 100%; border-collapse: collapse; margin-top: .6rem; font-size: .9rem; }
.provenance th, .provenance td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.provenance th { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); font-weight: 600; }
.provenance td.key { font-weight: 600; white-space: nowrap; }

.claim-cta {
  border: 2px dashed var(--clay); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; background: #fff; margin: 1.6rem 0;
}
.claim-cta h3 { margin-top: 0; }

/* ----------------------------------------------------------------- tables */
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; margin: .8rem 0 1.6rem; }
table.data th, table.data td { padding: .45rem .6rem; border-bottom: 1px solid var(--line); text-align: left; }
table.data th { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

.gate { display: flex; align-items: baseline; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.gate .name { font-weight: 600; min-width: 170px; }
.gate .val { font-variant-numeric: tabular-nums; }
.pill { font-size: .74rem; padding: .12rem .5rem; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em; }
.pill.pass { background: #d8ecd9; color: #235c2f; }
.pill.fail { background: #f8dcd8; color: #8c2b1c; }
.pill.wait { background: #f0e6d4; color: #7a5d16; }

/* ---------------------------------------------------------------- pricing */
.price { font-family: ui-serif, Georgia, serif; font-size: 2.6rem; color: var(--clay-dark); }
.price small { font-size: 1rem; color: var(--ink-soft); }

.cols { display: grid; gap: 1.6rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ----------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); background: var(--paper-warm); padding: 2rem 0 2.5rem; }
.footer-inner { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer-inner a { display: block; font-size: .9rem; margin-bottom: .3rem; color: var(--ink-soft); }
.footer-inner a:hover { color: var(--clay-dark); }
.footer-brand { font-size: 1.15rem; margin: 0 0 .2rem; }
.footer-head { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); font-weight: 600; margin: 0 0 .5rem; }
.legal { margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid var(--line); max-width: 70ch; }

.pagination { display: flex; gap: .5rem; align-items: center; margin-top: 1.6rem; }

@media (max-width: 620px) {
  .header-inner { flex-direction: column; align-items: flex-start; gap: .6rem; }
  .stat-row { gap: 1.1rem; }
}

/* Available to assistive technology, invisible on screen. Used where a heading
   is needed for a coherent document outline but would be visual noise. */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  border: 0;
}
.provenance th[scope="row"] { font-weight: 600; text-transform: none;
  font-size: inherit; letter-spacing: normal; color: var(--ink); }
