/* Rate My Council */

:root {
  --navy: #0b3d6e;
  --navy-dark: #072a4d;
  --navy-tint: #e8eff7;
  --ink: #1b2a3a;
  --muted: #5b6b7c;
  --line: #dde3ea;
  --bg: #f4f6f9;
  --white: #fff;
  --star: #f2a516;
  --star-empty: #d3d9e0;
  --green: #1f8a4c;
  --red: #c8372d;
  --amber: #b86e00;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 38, 64, .06), 0 4px 16px rgba(16, 38, 64, .06);
  --wrap: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
}
img { max-width: 100%; height: auto; }
a { color: var(--navy); }
a:hover { color: var(--navy-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }
code { background: var(--bg); padding: .1em .35em; border-radius: 4px; font-size: .9em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -4rem; background: #ffbf47; color: #000; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { top: 1rem; }
.hp { position: absolute; left: -9999px; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .65rem 1.2rem; border: 1px solid var(--navy); border-radius: 6px;
  background: var(--navy); color: #fff; font-weight: 600; text-decoration: none; cursor: pointer;
  line-height: 1.2;
}
.button:hover { background: var(--navy-dark); color: #fff; }
.button-small { padding: .4rem .8rem; font-size: .9rem; }
.button-large { padding: .85rem 1.6rem; font-size: 1.05rem; }
.button-ghost { background: #fff; color: var(--navy); }
.button-ghost:hover { background: var(--navy-tint); color: var(--navy); }
.button-light { background: #fff; color: var(--navy); border-color: #fff; }
.button-light:hover { background: var(--navy-tint); color: var(--navy); }
.button-danger { background: #fff; color: var(--red); border-color: #e3b5b1; }
.button-danger:hover { background: #fbeceb; color: var(--red); }
.link-button { background: none; border: 0; padding: 0; color: var(--navy); text-decoration: underline; cursor: pointer; }
.arrow-link { font-weight: 600; text-decoration: none; white-space: nowrap; }
.arrow-link::after { content: " →"; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 2rem; min-height: 76px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--navy); }
.brand-mark {
  width: 42px; height: 42px; border-radius: 10px; background: var(--navy); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 1.35rem; flex: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.45rem; letter-spacing: -.01em; }
.brand-text small { color: var(--ink); font-size: .85rem; }
.main-nav { display: flex; align-items: center; gap: 1.6rem; margin-left: auto; }
.main-nav a { color: var(--ink); text-decoration: none; font-weight: 500; padding: .3rem 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current] { color: var(--navy); border-bottom-color: var(--navy); }
.nav-search svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; display: block; }
.header-cta { white-space: nowrap; }

/* Alerts */
.alert { padding: .8rem 1rem; border-radius: 8px; margin: 1rem 0; border: 1px solid; }
.alert ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.alert-success { background: #e9f6ee; border-color: #b7e0c5; color: #134e2c; }
.alert-error { background: #fbeceb; border-color: #efc1bd; color: #7d1f18; }
.alert-info { background: var(--navy-tint); border-color: #c4d5e8; color: var(--navy-dark); }

/* Hero */
.hero {
  color: #fff; text-align: center; padding: 72px 0 56px;
  /* To use a photograph instead, replace the SVG url() below with url('img/hero.jpg') center / cover */
  background:
    linear-gradient(180deg, rgba(7, 42, 77, .82), rgba(11, 61, 110, .88)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320' preserveAspectRatio='none'%3E%3Cpath fill='%23ffffff' fill-opacity='.06' d='M0 224l80-32c80-32 240-96 400-90.7 160 5.7 320 79.7 480 85.4 160 5.3 320-58.7 400-90.7l80-32V320H0z'/%3E%3Cpath fill='%23ffffff' fill-opacity='.08' d='M0 288l120-21.3c120-21.7 360-63.7 600-58.7s480 59 600 85.3l120 26.7V320H0z'/%3E%3C/svg%3E") bottom / 100% 60% no-repeat,
    var(--navy);
}
.hero h1 { color: #fff; font-size: clamp(1.9rem, 4.2vw, 2.9rem); max-width: 860px; margin: 0 auto .5rem; letter-spacing: -.01em; }
.hero-intro { font-size: 1.15rem; margin: 0 auto 1.8rem; max-width: 640px; opacity: .92; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5rem; margin: 1.2rem auto 0; max-width: 820px; }
.chips span { font-weight: 600; margin-right: .2rem; }
.chip { color: #fff; border: 1px solid rgba(255, 255, 255, .55); border-radius: 999px; padding: .2rem .8rem; text-decoration: none; font-size: .9rem; background: rgba(255, 255, 255, .06); }
.chip:hover { background: rgba(255, 255, 255, .18); color: #fff; }

/* Search */
.search { position: relative; max-width: 640px; margin: 0 auto; text-align: left; }
.search-box { display: flex; background: #fff; border-radius: 8px; border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow); }
.search-box input { flex: 1; min-width: 0; border: 0; padding: .95rem 1.1rem; font-size: 1.05rem; color: var(--ink); background: transparent; }
.search-box input:focus { outline: none; }
.search-box:focus-within { outline: 3px solid #ffbf47; }
.search-button { border: 0; background: var(--navy); color: #fff; width: 56px; margin: 5px; border-radius: 6px; cursor: pointer; display: grid; place-items: center; }
.search-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.search-large .search-box input { padding: 1.1rem 1.2rem; }
.search-suggestions { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); z-index: 30; overflow: hidden; }
.search-suggestions a { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--bg); }
.search-suggestions a:last-child { border-bottom: 0; }
.search-suggestions a:hover, .search-suggestions a[aria-selected="true"] { background: var(--navy-tint); }
.search-suggestions small { color: var(--muted); white-space: nowrap; }

/* Category strip */
.category-strip { background: var(--bg); border-bottom: 1px solid var(--line); }
.category-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.category-inner a { display: flex; align-items: center; gap: .9rem; padding: 1.3rem 1rem; color: var(--ink); text-decoration: none; }
.category-inner a:hover { background: #fff; }
.category-inner svg { width: 34px; height: 34px; flex: none; fill: none; stroke: var(--navy); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.category-inner strong { display: block; }
.category-inner small { color: var(--muted); }

/* Sections */
.section { padding: 48px 0; }
.section-tint { background: var(--bg); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.section-head h2 { font-size: 1.6rem; margin: 0; }
.section-sub { color: var(--muted); margin: .3rem 0 0; max-width: 640px; }
.page { padding-top: 24px; padding-bottom: 64px; }
.page-narrow { max-width: 820px; }
.split { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: start; }
.split h2 { font-size: 1.6rem; }
.split .arrow-link { display: inline-block; margin-top: 1rem; }
.filter input { border: 1px solid var(--line); border-radius: 6px; padding: .6rem .9rem; width: 260px; max-width: 100%; background: #fff; }
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty-state .button { margin-top: .5rem; }

/* Org logos */
.org-logo { display: grid; place-items: center; flex: none; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.org-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.org-logo-sm { width: 40px; height: 40px; }
.org-logo-md { width: 72px; height: 72px; }
.org-logo-lg { width: 128px; height: 128px; }
.org-logo-initials { background: var(--navy-tint); color: var(--navy); font-weight: 700; letter-spacing: .02em; border-color: #cfdcea; }
.org-logo-sm.org-logo-initials { font-size: .75rem; }
.org-logo-md.org-logo-initials { font-size: 1.2rem; }
.org-logo-lg.org-logo-initials { font-size: 2rem; }

/* Org cards */
.card-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: .8rem; }
.card-stack { display: grid; gap: .7rem; }
.org-card {
  display: flex; align-items: center; gap: 1rem; padding: 1rem; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.org-card:hover { border-color: #9fb6cf; box-shadow: var(--shadow); color: var(--ink); }
.org-card-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.org-card-text strong { color: var(--navy); line-height: 1.25; }
.org-card-score { font-size: .9rem; color: var(--muted); }
.org-card-score b { color: var(--ink); }
.org-card[hidden], [data-filter-name][hidden] { display: none; }

/* Stars */
.stars { display: inline-flex; gap: 1px; font-size: 1.1rem; line-height: 1; white-space: nowrap; }
.star { position: relative; color: var(--star-empty); }
.star-full { color: var(--star); }
.star-half::before { content: "★"; position: absolute; left: 0; top: 0; width: 50%; overflow: hidden; color: var(--star); }
.stars-lg { font-size: 1.9rem; }
.stars-sm { font-size: .95rem; }

/* Breadcrumbs and tabs */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .9rem; margin: 1rem 0 1.4rem; color: var(--muted); }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs > *:not(:last-child)::after { content: "›"; margin-left: .5rem; color: var(--muted); }
.tabs { display: flex; gap: 1.8rem; border-bottom: 1px solid var(--line); margin: 1.6rem 0 1.4rem; overflow-x: auto; }
.tabs a { padding: .7rem 0; text-decoration: none; color: var(--ink); font-weight: 500; white-space: nowrap; border-bottom: 3px solid transparent; }
.tabs a:hover { color: var(--navy); border-bottom-color: var(--navy); }
.back-link { text-decoration: none; font-weight: 600; }

/* Organisation page */
.org-header { display: flex; gap: 1.6rem; align-items: flex-start; }
.org-header-text { flex: 1; min-width: 0; }
.org-header h1 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); margin-bottom: .3rem; }
.org-summary { color: var(--muted); margin: 0 0 .8rem; font-size: 1.1rem; }
.org-meta { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; color: var(--ink); }
.org-meta li { display: flex; align-items: center; gap: .4rem; }
.org-meta li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--navy); opacity: .5; }
.org-header-cta { flex: none; }
.org-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.6rem; align-items: start; }
.org-main { display: grid; gap: 1.4rem; min-width: 0; }
.org-side { display: grid; gap: 1.4rem; min-width: 0; }
.org-main > *, .rating-panels > * { min-width: 0; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.panel > h2 { font-size: 1.2rem; }
.panel-note { font-size: .88rem; color: var(--muted); margin: 1rem 0 0; }
.rating-panels { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.rating-panels > :only-child { grid-column: 1 / -1; max-width: 420px; }
.big-score { margin: .2rem 0; font-size: 1.2rem; color: var(--muted); }
.big-score strong { font-size: 3.2rem; color: var(--ink); line-height: 1; }
.review-total { color: var(--muted); margin: .3rem 0 1rem; }
.small-sample { font-size: .88rem; background: #fff6e5; color: #6b4300; padding: .5rem .7rem; border-radius: 6px; }
.distribution { margin: 0; display: grid; gap: .35rem; }
.distribution div { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: .6rem; font-size: .9rem; }
.distribution dt { color: var(--ink); }
.distribution dd { margin: 0; display: flex; align-items: center; gap: .6rem; }
.bar { flex: 1; height: 10px; background: #edf0f4; border-radius: 99px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 99px; }
.bar-5 { background: #2e9d5b; } .bar-4 { background: #7cbf4a; } .bar-3 { background: #f2c230; } .bar-2 { background: #f0902f; } .bar-1 { background: #e5533d; }
.pct { width: 38px; text-align: right; color: var(--muted); }
.service-ratings ul, .service-table { list-style: none; margin: 0; padding: 0; }
.service-ratings li a, .service-table li a {
  display: grid; grid-template-columns: minmax(0, 1fr) 36px auto 92px 14px; align-items: center; gap: .7rem;
  padding: .65rem .2rem; border-bottom: 1px solid var(--bg); color: var(--ink); text-decoration: none;
}
.service-ratings li:last-child a, .service-table li:last-child a { border-bottom: 0; }
.service-ratings li a:hover, .service-table li a:hover { background: var(--bg); }
.service-score { font-weight: 700; text-align: right; }
.service-count { font-size: .88rem; color: var(--muted); }
.service-count.muted { grid-column: 2 / 5; text-align: right; }
.chevron { color: var(--muted); font-size: 1.3rem; line-height: 1; }
.service-table li a { grid-template-columns: 40px minmax(0, 1fr) 36px auto 92px 14px; }
.service-table li a .service-count.muted { grid-column: 3 / 6; }
.service-table-name { display: flex; flex-direction: column; min-width: 0; }
.service-table-name small { color: var(--muted); }
.reviews-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.reviews-head h2 { margin: 0; }
.service-filter { display: flex; align-items: center; gap: .6rem; font-size: .9rem; color: var(--muted); }
.service-filter select { padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.facts dl { margin: 0; }
.facts dl > div { padding: .65rem 0; border-bottom: 1px solid var(--bg); }
.facts dt { font-weight: 600; font-size: .9rem; }
.facts dd { margin: .1rem 0 0; color: var(--ink); overflow-wrap: anywhere; }
.related h2 { margin-bottom: .9rem; }
.related .org-card + .org-card { margin-top: .6rem; }
.trademark-note { font-size: .8rem; color: var(--muted); margin: 0; }
.table-scroll { overflow-x: auto; }
.tax-table { border-collapse: collapse; width: 100%; min-width: 560px; }
.tax-table th, .tax-table td { padding: .55rem .5rem; text-align: center; border: 1px solid var(--line); }
.tax-table th { background: var(--bg); font-weight: 600; font-size: .9rem; }

/* Reviews */
.review-list { display: grid; }
.review { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 1.2rem; padding: 1.2rem 0; border-top: 1px solid var(--line); }
.review-list > .review:first-child { border-top: 0; }
.review-author { display: flex; gap: .7rem; align-items: flex-start; }
.review-author div { display: flex; flex-direction: column; font-size: .92rem; min-width: 0; }
.review-author span:not(.avatar) { color: var(--muted); }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--navy-tint); color: var(--navy); display: grid; place-items: center; font-weight: 700; flex: none; font-size: .9rem; }
.review-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .8rem; color: var(--muted); font-size: .9rem; }
.review h3 { margin: .45rem 0 .3rem; font-size: 1.08rem; }
.review-body { margin: 0; color: #2d3d4e; }
.review-when { font-size: .85rem; color: var(--muted); margin: .4rem 0 0; }
.review-actions { display: flex; gap: 1.2rem; font-size: .85rem; margin-top: .6rem; }
.review-actions a { color: var(--muted); }
.official-response { margin-top: .9rem; padding: .9rem 1rem; background: var(--navy-tint); border-left: 4px solid var(--navy); border-radius: 0 8px 8px 0; }
.official-response p { margin: 0 0 .4rem; }
.official-label { font-weight: 700; color: var(--navy); font-size: .92rem; }
.official-by { font-size: .85rem; color: var(--muted); margin: 0 !important; }
.review-list-cards { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; }
.review-list-cards .review { grid-template-columns: 1fr; align-content: start; gap: .6rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.review-list-cards .review:first-child { border-top: 1px solid var(--line); }
.quoted-review { margin: 1rem 0 1.4rem; padding: 1rem 1.2rem; background: var(--bg); border-radius: var(--radius); }
.quoted-review strong { display: block; margin-top: .3rem; }
.quoted-review p { margin: .3rem 0 0; color: #2d3d4e; }
.pager { display: flex; justify-content: center; align-items: center; gap: 1.4rem; margin-top: 1.2rem; font-size: .95rem; }

/* Services browse */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .8rem; margin-top: 1.4rem; }
.category-card { display: flex; flex-direction: column; padding: 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.category-card:hover { border-color: #9fb6cf; box-shadow: var(--shadow); }
.category-card strong { color: var(--navy); font-size: 1.08rem; }
.category-card span { color: var(--muted); font-size: .9rem; }

/* Search page */
.search-section { margin-top: 2rem; }
.postcode-result { font-size: 1.15rem; }
.link-list { padding-left: 1.2rem; }
.link-list li { margin: .3rem 0; }
.page .search { margin: 1.2rem 0 0; max-width: none; }

/* Forms */
.stack-form { display: grid; gap: 1.1rem; }
.stack-form label, .stack-form legend { font-weight: 600; }
.stack-form label { display: flex; flex-direction: column; gap: .35rem; }
.stack-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.stack-form select, .stack-form textarea, .admin-table input:not([type="checkbox"]), .admin-table select, .inline-form select {
  border: 1px solid #b9c4d0; border-radius: 6px; padding: .6rem .75rem; background: #fff; font-weight: 400; width: 100%;
}
.stack-form textarea { resize: vertical; }
.stack-form small { font-weight: 400; color: var(--muted); font-size: .88rem; }
.stack-form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: .5rem; }
.stack-form .check { flex-direction: row; align-items: flex-start; gap: .6rem; font-weight: 400; }
.stack-form .check input { margin-top: .3rem; width: auto; flex: none; }
.form-row { display: flex; gap: 1rem; }
.form-row > label { flex: 1; min-width: 0; }
.form-row > label.narrow, label.narrow { flex: 0 0 170px; max-width: 240px; }
.field-error { color: var(--red); font-weight: 600; font-size: .9rem; }
[aria-invalid="true"] { border-color: var(--red) !important; }
.form-org { display: flex; gap: 1.2rem; align-items: center; margin-bottom: 1rem; }
.form-org h1 { margin: 0; }
.form-org .section-sub { margin-top: .2rem; }
.star-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: .1rem; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { font-size: 2.4rem; color: var(--star-empty); cursor: pointer; line-height: 1; font-weight: 400; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--star); }
.star-input input:focus-visible + label { outline: 3px solid #ffbf47; border-radius: 4px; }
.message-panel { text-align: center; padding: 2.5rem 2rem; margin-top: 2rem; }
.message-panel .button { margin-top: .8rem; }

/* Prose pages */
.prose { max-width: 760px; }
.prose .lead { font-size: 1.2rem; color: var(--muted); }
.prose h2 { margin-top: 1.8rem; }
.prose li { margin: .35rem 0; }

/* CTA */
.cta { display: flex; justify-content: space-between; align-items: center; gap: 2rem; background: var(--navy); color: #fff; border-radius: 14px; padding: 2.4rem 2.6rem; margin: 48px 0; }
.cta h2 { color: #fff; font-size: 1.7rem; margin-bottom: .3rem; }
.cta p { margin: 0; opacity: .88; max-width: 620px; }

/* Footer */
.site-footer { background: var(--navy-dark); color: #d3deea; padding: 2.6rem 0 1.4rem; margin-top: 2rem; }
.site-footer a { color: #fff; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; }
.footer-inner p { max-width: 520px; font-size: .95rem; }
.site-footer nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1.4rem; align-content: start; }
.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }
.brand-footer { color: #fff; }
.brand-footer .brand-mark { background: #fff; color: var(--navy); }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 1.6rem; padding-top: 1.2rem; }
.footer-legal p { font-size: .82rem; opacity: .8; margin: 0; }

/* Setup and login */
.setup-body { background: var(--bg); }
.setup { max-width: 720px; margin: 40px auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 2.2rem; }
.setup-narrow { max-width: 420px; }
.brand-line { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--navy); font-size: 1.15rem; margin: 0 0 1.4rem; }
.setup fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 1.2rem; }
.setup legend { padding: 0 .4rem; font-size: 1.05rem; }
.setup-checks { list-style: none; padding: 0; display: grid; gap: .3rem; }
.setup-checks .ok { color: var(--green); }
.setup-checks .warn { color: var(--amber); }
.setup-checks .fail { color: var(--red); font-weight: 700; }
.setup-config { width: 100%; font-family: Consolas, monospace; font-size: .85rem; }
.setup .button + .button { margin-left: .5rem; }

/* Admin */
.admin-body { background: var(--bg); font-size: 16px; }
.admin-header { display: flex; align-items: center; gap: 2rem; padding: .7rem 24px; background: var(--navy-dark); color: #fff; flex-wrap: wrap; }
.admin-header .brand { color: #fff; }
.admin-header .brand-mark { width: 34px; height: 34px; font-size: 1.1rem; background: #fff; color: var(--navy); }
.admin-header nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.admin-header nav a { color: #d3deea; text-decoration: none; padding: .3rem 0; border-bottom: 2px solid transparent; }
.admin-header nav a[aria-current], .admin-header nav a:hover { color: #fff; border-bottom-color: #fff; }
.admin-user { margin-left: auto; display: flex; gap: 1rem; align-items: center; font-size: .92rem; }
.admin-user a, .admin-user .link-button { color: #d3deea; }
.admin-user form { margin: 0; }
.admin-main { max-width: 1280px; margin: 0 auto; padding: 1.6rem 24px 4rem; }
.admin-main .panel { margin-bottom: 1.2rem; }
.admin-title { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.admin-title h1 { margin: 0; }
.admin-title-org { display: flex; align-items: center; gap: 1rem; }
.badge { display: inline-block; min-width: 1.5em; padding: 0 .45em; border-radius: 99px; background: #e5533d; color: #fff; font-size: .78rem; font-weight: 700; text-align: center; line-height: 1.5; }
.badge-muted { background: #c5ced8; }
.admin-tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.admin-tabs a { padding: .45rem .9rem; border-radius: 6px; text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--line); }
.admin-tabs a[aria-current] { background: var(--navy); color: #fff; border-color: var(--navy); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.stat strong { font-size: 2rem; color: var(--navy); line-height: 1.1; }
.stat span { color: var(--muted); font-size: .9rem; }
.admin-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; align-items: start; }
.admin-columns-wide { grid-template-columns: minmax(0, 1fr) 360px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.admin-table th, .admin-table td { padding: .55rem .5rem; border-bottom: 1px solid var(--bg); text-align: left; vertical-align: middle; }
.admin-table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.admin-table .num { text-align: right; }
.nowrap { white-space: nowrap; }
.input-tiny { width: 64px !important; }
.inline-form { display: inline-flex; gap: .4rem; align-items: center; margin: 0; }
.inline-form select { width: auto; padding: .35rem .5rem; font-size: .9rem; }
.admin-review header { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.admin-review h2 { margin: .5rem 0 .3rem; font-size: 1.15rem; }
.stars-text { color: var(--star); letter-spacing: .05em; margin-right: .4rem; }
.flag-list { margin: .5rem 0; padding: .6rem .8rem .6rem 2rem; background: #fff6e5; border-radius: 6px; color: #6b4300; }
.flag-list-inline { color: var(--red); font-weight: 600; }
.admin-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: .8rem; }
.admin-actions form { margin: 0; }
.panel-warn { border-color: #f1d39a; background: #fffcf4; }
.status { display: inline-block; padding: .05rem .55rem; border-radius: 99px; font-size: .8rem; font-weight: 700; text-transform: capitalize; vertical-align: middle; background: #e8edf2; color: var(--muted); }
.status-approved { background: #e3f3e9; color: #17663a; }
.status-flagged, .status-rejected { background: #fbeceb; color: #9a2a21; }
.status-pending, .status-unverified { background: #fff1d6; color: #7a4d00; }
.kv { margin: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--bg); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.plain-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.narrow-form { max-width: 560px; }
.logo-edit { display: flex; gap: 1.4rem; align-items: flex-start; }
.logo-edit .stack-form { flex: 1; }
.band-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .3rem 1rem; }
details summary { cursor: pointer; color: var(--navy); font-weight: 600; margin-top: .8rem; }
details .stack-form { margin-top: 1rem; }
.service-edit-table input[name="name"] { min-width: 180px; }

/* Responsive */
@media (max-width: 1080px) {
  .main-nav { gap: 1.1rem; }
  .org-layout { grid-template-columns: minmax(0, 1fr); }
  .rating-panels { grid-template-columns: minmax(0, 1fr); }
  .rating-panels > :only-child { max-width: none; }
  .admin-columns, .admin-columns-wide { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .header-inner { flex-wrap: wrap; gap: .6rem 1rem; padding-top: .7rem; padding-bottom: .7rem; }
  .main-nav { order: 3; width: 100%; margin: 0; overflow-x: auto; gap: 1.2rem; }
  .header-cta { margin-left: auto; }
  .brand-text small { display: none; }
  .category-inner { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 1.4rem; }
  .footer-inner { grid-template-columns: 1fr; }
  .review { grid-template-columns: 1fr; gap: .6rem; }
  .org-header { flex-wrap: wrap; }
  .org-header-text { flex-basis: 100%; }
  .org-header .org-logo-lg { width: 88px; height: 88px; }
  .org-header-cta { width: 100%; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .site-header { position: static; }
  .brand-text strong { font-size: 1.2rem; }
  .brand-mark { width: 36px; height: 36px; }
  .header-cta { padding: .5rem .8rem; font-size: .9rem; }
  .hero { padding: 44px 0 36px; }
  .category-inner { grid-template-columns: 1fr; }
  .category-inner a { padding: .8rem 0; }
  .section { padding: 32px 0; }
  .form-row { flex-direction: column; }
  .form-row > label.narrow, label.narrow { flex: 1; max-width: none; }
  .review-list-cards { grid-template-columns: 1fr; }
  .card-grid, .card-row { grid-template-columns: 1fr; }
  .filter input { width: 100%; }
  .section-head .filter { width: 100%; }
  .service-ratings li a { grid-template-columns: minmax(0, 1fr) 30px auto 14px; }
  .service-ratings .service-count:not(.muted) { display: none; }
  .service-ratings .service-count.muted { grid-column: 2 / 4; }
  .service-table li a { grid-template-columns: 40px minmax(0, 1fr) 30px auto 14px; }
  .service-table .service-count:not(.muted) { display: none; }
  .service-table li a .service-count.muted { grid-column: 3 / 5; }
  .cta { flex-direction: column; align-items: flex-start; padding: 1.8rem 1.4rem; }
  .setup { margin: 0; border-radius: 0; border: 0; padding: 1.4rem 16px; }
  .band-grid { grid-template-columns: repeat(2, 1fr); }
  .logo-edit { flex-direction: column; }
  .admin-table { display: block; overflow-x: auto; }
  .form-org { align-items: flex-start; }
}
.code-input { font-family: Consolas, "Courier New", monospace; width: 100%; padding: .6rem .75rem; border: 1px solid #b9c4d0; border-radius: 6px; background: var(--bg); }
.code-block { white-space: pre-wrap; word-break: break-all; font-size: .8rem; background: var(--bg); padding: .5rem; border-radius: 6px; max-width: 420px; margin: .4rem 0 0; }
