:root {
  --ink: oklch(21% 0.035 252);
  --navy: oklch(18% 0.045 252);
  --muted: oklch(43% 0.025 252);
  --paper: oklch(98.5% 0.006 45);
  --sheet: oklch(96% 0.012 252);
  --soft: oklch(94% 0.014 252);
  --panel: oklch(99% 0.004 45);
  --line: oklch(84% 0.02 252);
  --line-strong: oklch(66% 0.03 252);
  --rose: oklch(55% 0.12 22);
  --rose-deep: oklch(42% 0.11 22);
  --sage: oklch(43% 0.075 155);
  --blue: oklch(43% 0.095 246);
  --gold: oklch(68% 0.11 75);
  --focus: oklch(63% 0.14 75);
  --shell: min(1180px, calc(100% - 36px));
}

* { box-sizing: border-box; }

html { background: var(--sheet); }

body {
  margin: 0;
  background:
    linear-gradient(135deg, oklch(99% 0.005 45), oklch(95% 0.014 252) 42%, oklch(96% 0.018 22));
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", Verdana, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

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

.wrap {
  width: var(--shell);
  margin-inline: auto;
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 16px;
  padding: 0 22px;
  background: var(--navy);
  color: var(--paper);
  border: 1px solid oklch(30% 0.04 252);
}

.brand {
  font-family: "Iowan Old Style", Baskerville, Georgia, serif;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}

nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 13px;
  font-weight: 760;
}

nav a {
  color: inherit;
  text-decoration: none;
}

nav a:hover,
.crumbs a:hover,
.directory-row:hover span,
.vendor-name:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.wedj-pill {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  background: var(--paper);
  color: var(--navy);
  font-weight: 850;
}

.ledger-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  margin-top: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 18px 45px oklch(20% 0.03 252 / .12);
}

.context-rail {
  min-width: 0;
  padding: 28px 22px;
  background:
    linear-gradient(180deg, var(--soft), oklch(97% 0.016 45));
  border-right: 1px solid var(--line);
}

.context-rail h2 {
  margin: 0;
  font-family: "Iowan Old Style", Baskerville, Georgia, serif;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.03;
  letter-spacing: 0;
}

.context-rail p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
}

.rail-button,
.primary-action,
.quiet-action {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 850;
  line-height: 1.2;
}

.rail-button {
  width: 100%;
  margin-top: 22px;
  padding: 11px 13px;
  background: var(--rose);
  color: var(--paper);
}

.rail-stat {
  display: grid;
  gap: 4px;
  margin-top: 18px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.rail-stat b {
  color: var(--rose-deep);
  font-family: "Iowan Old Style", Baskerville, Georgia, serif;
  font-size: 30px;
  line-height: 1;
}

.rail-stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.ledger-main {
  min-width: 0;
  background: var(--panel);
}

.page-head {
  padding: 34px 30px 26px;
  border-bottom: 1px solid var(--line);
}

.ledger-head { background: linear-gradient(180deg, oklch(99% 0.004 45), var(--panel)); }

.eyebrow {
  margin: 0 0 10px;
  color: var(--rose-deep);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-family: "Iowan Old Style", Baskerville, Georgia, serif;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1;
  letter-spacing: 0;
  text-wrap: balance;
}

.deck {
  max-width: 780px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.link-note {
  margin: 18px 0 0;
}

.primary-action {
  padding: 12px 15px;
  background: var(--rose);
  color: var(--paper);
  border: 1px solid var(--rose);
}

.primary-action:hover,
.rail-button:hover {
  background: var(--rose-deep);
  border-color: var(--rose-deep);
}

.quiet-action {
  padding: 10px 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.crumbs a { text-decoration: none; }

.directory,
.ledger-section {
  padding: 24px 30px 36px;
}

.directory-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.directory-title h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.directory-title p {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
  text-align: right;
}

.directory-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(236px, 1fr));
  border-top: 1px solid var(--line);
}

.directory-row {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.directory-list .directory-row {
  padding-inline: 12px;
}

.directory-row span {
  font-weight: 800;
}

.directory-row b {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.service-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.service-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 310px);
  min-height: 66px;
  border-bottom: 1px solid var(--line);
}

.service-main,
.service-wedj {
  display: flex;
  align-items: center;
  padding: 14px 0;
  text-decoration: none;
}

.service-main {
  justify-content: space-between;
  gap: 14px;
  padding-right: 18px;
  font-weight: 900;
}

.service-main span { font-size: 18px; }

.service-main b {
  min-width: 38px;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.service-wedj {
  justify-content: center;
  padding-inline: 14px;
  background: oklch(96% 0.034 22);
  color: var(--rose-deep);
  border: 1px solid oklch(86% 0.05 22);
  border-bottom: 0;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.service-row:last-child .service-wedj { border-bottom: 1px solid oklch(86% 0.05 22); }

.vendor-list {
  border-top: 1px solid var(--line);
}

.vendor-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.vendor-photo {
  position: relative;
  display: block;
  width: 76px;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--soft);
  border-radius: 50%;
  text-decoration: none;
}

.vendor-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.img-fallback {
  background:
    linear-gradient(135deg, oklch(94% 0.018 252), oklch(97% 0.018 22)) !important;
}

.vendor-photo span {
  position: absolute;
  left: 0;
  bottom: 0;
  min-width: 28px;
  height: 24px;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--paper);
  font-size: 12px;
  font-weight: 900;
}

.vendor-name {
  color: var(--blue);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
  text-decoration: none;
}

.vendor-meta {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.vendor-desc {
  max-width: 760px;
  margin: 8px 0 0;
  color: oklch(30% 0.025 252);
  font-family: "Iowan Old Style", Baskerville, Georgia, serif;
  font-size: 16.5px;
  line-height: 1.45;
}

.vendor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 11px;
}

.vendor-actions a {
  color: var(--rose-deep);
  font-size: 13px;
  font-weight: 900;
  text-underline-offset: 3px;
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(190px, 300px) minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  padding: 32px 30px;
  border-bottom: 1px solid var(--line);
}

.profile-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  background: var(--soft);
  border: 1px solid var(--line);
}

.profile-meta {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.profile-section {
  padding: 26px 30px;
  border-bottom: 1px solid var(--line);
}

.profile-section h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.profile-section p {
  max-width: 780px;
  margin: 12px 0 0;
  color: oklch(30% 0.025 252);
  font-family: "Iowan Old Style", Baskerville, Georgia, serif;
  font-size: 18px;
  line-height: 1.55;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.contact-card {
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 13px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.contact-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.contact-card b {
  overflow-wrap: anywhere;
  font-size: 15px;
}

.footer {
  padding-block: 24px 36px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.footer a {
  color: var(--blue);
  font-weight: 850;
}

@media (max-width: 860px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 16px;
  }

  .ledger-layout {
    grid-template-columns: 1fr;
  }

  .context-rail {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .profile-hero {
    grid-template-columns: 1fr;
  }

  .profile-photo {
    max-width: 420px;
  }
}

@media (max-width: 640px) {
  :root { --shell: min(100% - 24px, 1180px); }

  .topbar { margin-top: 10px; }

  .page-head,
  .directory,
  .ledger-section,
  .profile-hero,
  .profile-section {
    padding-inline: 18px;
  }

  h1 { font-size: 34px; }

  .deck { font-size: 16px; }

  .directory-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .directory-title p { text-align: left; }

  .directory-list { grid-template-columns: 1fr; }

  .service-row { grid-template-columns: 1fr; }

  .service-main { padding-right: 0; }

  .service-wedj {
    justify-content: flex-start;
    border-bottom: 1px solid oklch(86% 0.05 22);
  }

  .vendor-row {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
  }

  .vendor-photo { width: 58px; }
  .vendor-name { font-size: 18px; }
  .vendor-desc { font-size: 15px; }
}
