:root {
  --ink: #182321;
  --muted: #5d6b67;
  --line: #d8dfda;
  --paper: #f7f6f1;
  --panel: #ffffff;
  --green: #173d3a;
  --green-2: #245f58;
  --gold: #dba857;
  --blue: #365f7f;
  --soft-blue: #e9f0f3;
  --soft-green: #edf4ef;
  --danger: #8b2f2f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

a {
  color: var(--green-2);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.dev-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px clamp(18px, 4vw, 56px);
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.practice-banner {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.practice-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px clamp(18px, 8vw, 140px);
  color: #fff;
  background: var(--practice-strip, var(--green));
  font-weight: 800;
  font-size: 0.92rem;
}

.practice-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 92px;
  padding: 16px clamp(18px, 8vw, 140px);
}

.practice-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #111;
  text-decoration: none;
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  line-height: 1;
}

.practice-logo img {
  display: block;
  width: auto;
  max-width: min(380px, 52vw);
  max-height: 74px;
  object-fit: contain;
}

.practice-page-label {
  color: var(--blue);
  font-size: clamp(1rem, 1.6vw, 1.28rem);
  font-style: italic;
  font-weight: 600;
  white-space: nowrap;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 44px;
  border-radius: 12px;
  color: #fff;
  background: var(--practice-strip, var(--green));
  font-size: 1.05rem;
  font-weight: 900;
}

.practice-nav nav a {
  border: 0;
  border-radius: 0;
  padding: 14px 10px;
  color: #111;
  background: transparent;
  font-size: 1rem;
}

.practice-nav nav a.active {
  color: #111;
  background: transparent;
  box-shadow: inset 0 -4px 0 var(--green);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #fff;
  background: var(--green);
  font-weight: 800;
}

.brand small,
td small,
.practice-card span,
.admin-table small {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

nav a,
.tabs a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink);
  background: #fff;
  font-size: 0.92rem;
}

nav a.active,
.tabs a.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

main {
  max-width: 1220px;
  margin: 0 auto;
  padding: 24px clamp(16px, 4vw, 48px) 40px;
}

.search-strip {
  margin: 24px 0;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.footer-search {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px) 22px;
}

.footer-search form {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.footer-search label {
  margin-bottom: 8px;
}

.footer-search div {
  display: flex;
  gap: 10px;
}

.search-strip label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

.search-strip div {
  display: flex;
  gap: 10px;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #b9c3be;
  border-radius: 6px;
  background: #fff;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid var(--green);
  border-radius: 6px;
  background: #fff;
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

button,
.button.primary {
  color: #fff;
  background: var(--green);
}

.page-title {
  margin: 8px 0 22px;
}

.page-title p,
.overline,
.column-label {
  margin: 0 0 8px;
  color: var(--blue);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.82rem;
}

.page-title h1,
.landing-copy h2,
.practice-hero h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.landing {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  min-height: 470px;
  background: var(--green);
  color: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.dev-picker {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 0 40px;
}

.dev-picker h2 {
  margin: 0 0 16px;
  text-align: center;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.05;
}

.dev-picker .code-entry {
  margin-top: 22px;
}

.access-panel {
  min-height: 460px;
  display: grid;
  place-items: center;
  padding: 28px 0 46px;
}

.access-panel form {
  width: min(620px, 100%);
  display: grid;
  gap: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(22px, 4vw, 34px);
  box-shadow: 0 18px 48px rgba(24, 49, 45, 0.12);
}

.access-title {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  text-align: center;
}

.access-title h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.08;
  color: var(--green);
}

.access-title p {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 700;
  color: var(--purple);
}

.access-panel p:not(.form-error) {
  margin: 0;
  color: var(--muted);
}

.access-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 18px;
}

.access-disclaimer {
  margin-top: 12px;
  font-size: 0.86rem;
  line-height: 1.45;
}

.landing-copy {
  padding: clamp(28px, 5vw, 64px);
  align-self: center;
}

.landing-copy p:not(.overline) {
  max-width: 680px;
  color: #e8eeea;
  font-size: 1.1rem;
}

.landing-art,
.hero-panel {
  min-height: 320px;
  background:
    linear-gradient(135deg, rgba(23, 61, 58, 0.1), rgba(23, 61, 58, 0.35)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='700' viewBox='0 0 900 700'%3E%3Crect width='900' height='700' fill='%23e6eee8'/%3E%3Cpath d='M0 570 C160 470 280 610 440 500 S720 430 900 520 L900 700 L0 700 Z' fill='%23bfd2ca'/%3E%3Cpath d='M0 160 C150 80 300 160 460 110 S740 50 900 130 L900 0 L0 0 Z' fill='%23d8c397' opacity='.82'/%3E%3Cpath d='M210 400 h260 v36 H210zM255 335 h170 v42 H255zM520 330 h82 v106 h-82z' fill='%23173d3a' opacity='.92'/%3E%3Ccircle cx='620' cy='225' r='74' fill='%23dba857' opacity='.9'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
}

.practice-grid,
.info-grid,
.plan-grid,
.inclusion-grid,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0;
}

.practice-card,
.info-grid article,
.plan-card,
.inclusion-card,
.admin-grid article,
.future-panel,
.notice,
.source-note,
.results article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.practice-thumb {
  height: 168px;
  margin: -20px -20px 18px;
  border-radius: 8px 8px 0 0;
  background-size: cover;
  background-position: center;
}

.code-entry {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 18px;
  align-items: end;
  margin: 18px 0;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.code-entry form div {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.code-entry p {
  margin: 0;
  color: var(--muted);
}

.practice-card h3,
.info-grid h3,
.plan-card h3,
.inclusion-card h3,
.results h3 {
  margin: 6px 0 10px;
}

.practice-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.practice-hero > div:first-child {
  padding: clamp(24px, 4vw, 48px);
  align-self: center;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 20px;
  color: #fff;
  background-size: cover;
  background-position: center;
}

.practice-theme.young-vets {
  --green: #1f6b7a;
  --green-2: #245f70;
  --gold: #7cb342;
  --practice-strip: #1f6b7a;
}

.practice-theme.craig-robinson-vets {
  --green: #1f8f43;
  --green-2: #16813b;
  --gold: #7b3f91;
  --practice-strip: #7b3f91;
  --soft-green: #eef5f8;
}

.practice-theme.vh-vets {
  --green: #42345f;
  --green-2: #5b4a7a;
  --gold: #caa35f;
  --practice-strip: #42345f;
  --soft-green: #eef2f7;
}

.practice-theme.fernlea-vets {
  --green: #008f4f;
  --green-2: #00733f;
  --gold: #5d0b7b;
  --practice-strip: #5d0b7b;
  --soft-green: #eef8f1;
}

.practice-theme.stroud-road-vets {
  --green: #245f5a;
  --green-2: #1d4c48;
  --gold: #9b7c42;
  --practice-strip: #245f5a;
  --soft-green: #edf6f4;
}

.practice-theme.equine-vet-repro {
  --green: #6b1435;
  --green-2: #4f1028;
  --gold: #2f3f59;
  --practice-strip: #6b1435;
  --soft-green: #f7eef2;
}

.practice-intro {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
  gap: 0;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.practice-intro-copy {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: clamp(24px, 5vw, 48px);
}

.practice-intro-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
  color: var(--green);
}

.practice-intro-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
}

.practice-intro-copy .column-label {
  color: var(--gold);
}

.practice-intro-image {
  min-height: 265px;
  display: flex;
  align-items: end;
  justify-content: end;
  padding: 22px;
  background-size: cover;
  background-position: center;
}

.practice-intro-image img {
  max-width: min(320px, 74%);
  max-height: 112px;
  padding: 14px 18px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
}

.split-index {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0 0 18px;
}

.split-index > div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.split-index > div:first-child {
  border-left: 6px solid var(--green);
}

.split-index > div:last-child {
  border-right: 6px solid var(--blue);
}

.split-index a,
.admin-grid a {
  display: block;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.detail-list div,
.inclusion-card dl div,
.plan-card dl div,
.future-panel dl div {
  background: #fff;
  padding: 16px;
}

dt {
  font-weight: 800;
  color: var(--green);
}

dd {
  margin: 4px 0 0;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

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

th {
  color: #fff;
  background: var(--green);
  font-size: 0.92rem;
}

code,
.status {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--soft-blue);
  color: #19384d;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
}

.setup-hint {
  color: #6aa9c8;
  font-style: italic;
}

.status {
  font-family: inherit;
  background: var(--soft-green);
  color: var(--green);
  font-weight: 800;
}

.big-price {
  margin: 0;
  font-size: 2rem;
  font-weight: 900;
  color: var(--green);
}

.notice {
  border-left: 6px solid var(--gold);
  margin-bottom: 16px;
}

.source-note {
  margin-top: 16px;
  color: var(--muted);
}

.future-panel {
  max-width: 820px;
}

.admin-login {
  min-height: 420px;
  display: grid;
  place-items: center;
}

.admin-login form,
.edit-form {
  width: min(720px, 100%);
  display: grid;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 700;
  color: var(--green);
}

.form-error {
  color: var(--danger);
  font-weight: 800;
}

.admin-table {
  display: grid;
  gap: 12px;
}

.admin-table form {
  display: grid;
  grid-template-columns: 1.2fr repeat(4, minmax(120px, 1fr)) 72px;
  gap: 10px;
  align-items: end;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-table form:has(label:nth-of-type(6)) {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.results {
  display: grid;
  gap: 12px;
}

.back-link {
  margin: 24px 0;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(18px, 4vw, 56px);
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: #fff;
}

@media (max-width: 880px) {
  .site-header,
  .dev-header,
  .practice-topline,
  .practice-nav,
  .search-strip div,
  .code-entry,
  .code-entry form div,
  .access-entry,
  .footer-search div,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .practice-nav {
    gap: 14px;
  }

  .practice-nav nav {
    justify-content: flex-start;
  }

  .landing,
  .practice-hero,
  .practice-intro,
  .split-index,
  .detail-list,
  .practice-grid,
  .info-grid,
  .plan-grid,
  .inclusion-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .access-entry {
    grid-template-columns: 1fr;
  }

  .admin-table form,
  .admin-table form:has(label:nth-of-type(6)) {
    grid-template-columns: 1fr;
  }
}
