/* Cotswolds directories: a plain public register.
   One typeface (Public Sans), thin rules, little decoration.
   The one signature element is the check stamp: a register check with its date.
   The build replaces #1f56f0 per site. */

@font-face { font-family: 'Public Sans'; src: url('/fonts/public-sans.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #ffffff;
  --wash: #f5f6f7;
  --ink: #111418;
  --text: #30353c;
  --muted: #646b74;
  --rule: #e1e4e8;
  --rule-strong: #b9bfc7;
  --accent: #1f56f0;
  --check: #136c3b;
  --check-wash: #edf6f0;
  --font: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font: 17px/1.6 var(--font); font-variant-numeric: tabular-nums; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
a { color: var(--accent); text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
@media (max-width: 600px) { .wrap { padding-left: 16px; padding-right: 16px; } body { font-size: 16px; } }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 10; }
.muted { color: var(--muted); }
svg.i { width: 16px; height: 16px; flex: none; vertical-align: -3px; }

/* Header */
.top { border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 8px 32px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 18px; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand .mark { width: 26px; height: 26px; color: var(--accent); }
.nav { display: flex; align-items: center; gap: 4px 24px; flex-wrap: wrap; font-size: 15px; }
.nav a { color: var(--text); text-decoration: none; }
.nav a:hover { color: var(--accent); }
.nav a[aria-current] { color: var(--ink); font-weight: 650; }
.nav .add { border: 1px solid var(--rule-strong); border-radius: 6px; padding: 6px 12px; color: var(--ink); }
.nav .add:hover { border-color: var(--ink); color: var(--ink); }

/* Page header */
.crumbs { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.crumbs li + li::before { content: '›'; margin-right: 4px; color: var(--rule-strong); }
.crumbs a { color: var(--muted); }
.pagehead { padding-top: 28px; padding-bottom: 12px; }
h1, h2, h3 { color: var(--ink); letter-spacing: -0.02em; }
h1 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.1; font-weight: 750; margin: 0 0 12px; max-width: 22ch; }
h2 { font-size: 24px; line-height: 1.25; font-weight: 700; margin: 40px 0 10px; }
h3 { font-size: 17px; line-height: 1.3; font-weight: 650; margin: 0; }
.dek { font-size: 19px; line-height: 1.5; color: var(--text); max-width: 60ch; margin: 0; }
.byline { font-size: 14px; color: var(--muted); margin: 14px 0 0; }
@media (max-width: 600px) { .dek { font-size: 17px; } h2 { font-size: 21px; } }

/* The check stamp: the one signature element */
.stamp { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; line-height: 1; font-weight: 600; color: var(--check); background: var(--check-wash); border: 1px solid color-mix(in srgb, var(--check) 35%, transparent); border-radius: 3px; padding: 5px 7px; text-decoration: none; white-space: nowrap; }
.stamp svg { width: 13px; height: 13px; }
.stamp time { font-weight: 400; color: color-mix(in srgb, var(--check) 75%, var(--ink)); }
a.stamp:hover { border-color: var(--check); }
.stamps { display: flex; flex-wrap: wrap; gap: 6px; }

/* Register: the table of firms */
.register { padding-top: 24px; padding-bottom: 40px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 12px; margin-bottom: 12px; }
.toolbar .field { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.toolbar input, .toolbar select { font: inherit; font-size: 15px; font-weight: 400; color: var(--ink); background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 6px; padding: 8px 10px; min-height: 40px; }
.toolbar input { width: 260px; }
.toolbar .count { margin-left: auto; font-size: 14px; color: var(--muted); }
.toolbar .count b { color: var(--ink); }
.toolbar button.reset { font: inherit; font-size: 14px; background: none; border: 0; color: var(--accent); text-decoration: underline; cursor: pointer; padding: 0; }
.nojs .toolbar .field, .nojs .toolbar .reset { display: none; }
@media (max-width: 640px) { .toolbar .field, .toolbar input, .toolbar select { width: 100%; } .toolbar .count { margin-left: 0; } }
.sortnote { font-size: 13px; color: var(--muted); margin: 0 0 8px; }

table.firms { width: 100%; border-collapse: collapse; font-size: 15px; }
table.firms th { text-align: left; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); padding: 8px 12px 8px 0; border-bottom: 2px solid var(--ink); white-space: nowrap; }
table.firms td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.firms tr[hidden] { display: none; }
table.firms .name { min-width: 190px; }
table.firms .name a { font-weight: 650; color: var(--ink); font-size: 16px; text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; }
table.firms .name strong { font-weight: 650; color: var(--ink); font-size: 16px; }
table.firms .name a:hover { color: var(--accent); text-decoration: underline; }
table.firms .name .co { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
table.firms .svc { color: var(--text); max-width: 26ch; }
table.firms .dist { white-space: nowrap; color: var(--muted); }
table.firms .tel a { white-space: nowrap; color: var(--ink); font-weight: 600; text-decoration: none; }
table.firms .tel a:hover { color: var(--accent); text-decoration: underline; }
table.firms .tel .web { display: block; font-weight: 400; font-size: 14px; color: var(--accent); margin-top: 2px; }
table.firms .none-check { color: var(--muted); font-size: 13px; }
@media (max-width: 760px) {
  table.firms thead { display: none; }
  table.firms, table.firms tbody, table.firms tr, table.firms td { display: block; }
  table.firms tr { border-bottom: 1px solid var(--rule); padding: 14px 0; }
  table.firms tr[hidden] { display: none; }
  table.firms td { border: 0; padding: 3px 0; }
  table.firms td[data-label]::before { content: attr(data-label) ': '; color: var(--muted); font-size: 13px; }
  table.firms .svc { max-width: none; }
}
.none { color: var(--muted); padding: 20px 0; }
.more-row { margin: 16px 0 0; }
.more-row button[hidden] { display: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font: 650 15px/1.2 var(--font); border-radius: 6px; padding: 10px 16px; text-decoration: none; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn.line { background: var(--paper); color: var(--ink); border-color: var(--rule-strong); }
.btn.line:hover { border-color: var(--ink); filter: none; }

/* Two-column body: article and side notes */
.body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px 64px; padding-top: 8px; padding-bottom: 56px; }
@media (max-width: 960px) { .body { grid-template-columns: 1fr; } }
.article { max-width: 70ch; }
.article p { margin: 0 0 14px; }
.article ul:not([class]) { margin: 0 0 14px; padding-left: 22px; }
.article li { margin: 4px 0; }
.side h2 { font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 32px 0 8px; }
.side h2:first-child { margin-top: 40px; }
.side ul { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.side li { padding: 6px 0; border-bottom: 1px solid var(--rule); }
.side li span { display: block; font-size: 13px; color: var(--muted); }

/* Link lists (towns, services, guides) */
.links { list-style: none; margin: 8px 0 0; padding: 0; columns: 3 220px; column-gap: 32px; }
.links li { break-inside: avoid; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.links a { font-weight: 600; text-decoration: none; color: var(--ink); }
.links a:hover { color: var(--accent); text-decoration: underline; }
.links span { color: var(--muted); font-size: 14px; margin-left: 6px; }
.links.desc li span { display: block; margin: 2px 0 0; }

/* Home */
.homehead { padding-top: 36px; padding-bottom: 16px; }
.homehead h1 { font-size: clamp(32px, 4.8vw, 52px); }
.facts { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 18px 0 0; padding: 0; list-style: none; font-size: 15px; color: var(--muted); }
.facts b { color: var(--ink); }

/* Tables in guides */
.table { margin: 18px 0 6px; overflow-x: auto; }
.article table { border-collapse: collapse; width: 100%; font-size: 15px; }
.article caption { text-align: left; font-weight: 650; color: var(--ink); padding: 0 0 6px; }
.article th, .article td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.article thead th { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); border-bottom: 2px solid var(--ink); }
.tnote { font-size: 13px; color: var(--muted); margin: 6px 0 18px; }

/* FAQs */
.faq details { border-bottom: 1px solid var(--rule); padding: 12px 0; }
.faq details:first-of-type { border-top: 1px solid var(--rule); }
.faq summary { cursor: pointer; font-weight: 650; color: var(--ink); }
.faq details p { margin: 8px 0 4px; }

/* Profile */
dl.kv { display: grid; grid-template-columns: 170px minmax(0, 1fr); margin: 8px 0 0; border-top: 2px solid var(--ink); }
dl.kv dt, dl.kv dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--rule); }
dl.kv dt { color: var(--muted); font-size: 14px; padding-top: 12px; }
@media (max-width: 600px) { dl.kv { grid-template-columns: 1fr; } dl.kv dt { border-bottom: 0; padding-bottom: 0; } }
.contact { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.claim { background: var(--wash); border-radius: 6px; padding: 18px 20px; margin-top: 32px; font-size: 15px; }
.claim h2 { font-size: 17px; margin: 0 0 6px; letter-spacing: 0; }
.claim p { margin: 0 0 10px; }

/* Sources */
.sources { font-size: 14px; color: var(--muted); }
.sources ol { padding-left: 20px; margin: 0; }
.sources li { margin: 3px 0; overflow-wrap: anywhere; }

/* Forms */
form.stack { display: grid; gap: 4px; max-width: 560px; }
form.stack label { font-weight: 650; font-size: 15px; margin-top: 12px; color: var(--ink); }
form.stack input, form.stack textarea { font: inherit; color: inherit; background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 6px; padding: 10px 12px; width: 100%; }
form.stack textarea { min-height: 130px; resize: vertical; }
form.stack .btn { margin-top: 18px; justify-self: start; }
.hp { position: absolute; left: -9999px; }

/* Changes log */
.log { list-style: none; padding: 0; margin: 8px 0 0; font-size: 15px; }
.log li { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.log time { color: var(--muted); }

/* Footer */
.foot { border-top: 1px solid var(--rule); background: var(--wash); padding: 36px 0 40px; font-size: 14px; margin-top: 24px; }
.foot .cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 24px; }
@media (max-width: 800px) { .foot .cols { grid-template-columns: 1fr 1fr; } }
.foot h2 { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 0 0 8px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin: 5px 0; }
.foot a { color: var(--text); text-decoration: none; }
.foot a:hover { color: var(--accent); text-decoration: underline; }
.foot .about p { margin: 8px 0 0; max-width: 34ch; color: var(--muted); }
.foot .legal { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 13px; }

/* Print: guides and profiles print cleanly */
@media print {
  .top .nav, .foot, .toolbar, .more-row, .claim, .skip { display: none !important; }
  body { font-size: 11pt; color: #000; }
  a { color: #000; }
  .article a[href^="http"]::after { content: ' (' attr(href) ')'; font-size: 9pt; color: #555; }
  .body { display: block; }
  .side { display: none; }
}
