:root {
  --teal: #0e5e63;
  --teal-dark: #0a4347;
  --teal-soft: #e4f0ef;
  --gold: #c9a24a;
  --gold-dark: #a7832d;
  --gold-soft: #f6eedb;
  --coral: #f2784b;
  --cream: #fbf8f0;
  --white: #ffffff;
  --ink: #1d2a2c;
  --muted: #5b6a6c;
  --line: #e6dfcd;
  --danger: #b3261e;
  --danger-soft: #fbe9e7;
  --ok: #1d6f4a;
  --ok-soft: #e3f3ea;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(14, 67, 71, .06), 0 6px 20px rgba(14, 67, 71, .07);
  --serif: "Cinzel", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; height: auto; }
a { color: var(--teal); }
a:hover { color: var(--teal-dark); }
h1, h2, h3 { font-family: var(--serif); color: var(--teal); line-height: 1.2; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }
.lead { font-size: 1.1rem; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 52px; height: 52px; object-fit: contain; }
.brand span { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--teal); white-space: nowrap; }
.brand em { font-style: normal; color: var(--gold-dark); }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a { text-decoration: none; color: var(--ink); font-weight: 600; padding: 8px 12px; border-radius: 8px; }
.main-nav a:hover { background: var(--teal-soft); color: var(--teal-dark); }
.main-nav a.active:not(.btn) { color: var(--teal); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }
.main-nav .btn { margin-left: 8px; }
.main-nav .nav-quiet { color: var(--muted); font-weight: 400; }
.nav-toggle { display: none; }
.nav-toggle-label { display: none; }

.sub-nav { background: var(--teal); }
.sub-nav-inner { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.sub-nav a { color: #d9ecea; text-decoration: none; padding: 12px 14px; font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; }
.sub-nav a:hover { color: var(--white); }
.sub-nav a.active { color: var(--white); border-bottom-color: var(--gold); }
.sub-nav .sub-nav-switch { margin-left: auto; color: var(--gold-soft); }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--coral); color: var(--white); font-size: .78rem; line-height: 20px; text-align: center; }

@media (max-width: 860px) {
  .nav-toggle-label { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; cursor: pointer; border-radius: 8px; }
  .nav-toggle-label span, .nav-toggle-label span::before, .nav-toggle-label span::after { display: block; width: 22px; height: 2px; background: var(--teal); position: relative; content: ""; }
  .nav-toggle-label span::before { position: absolute; top: -7px; }
  .nav-toggle-label span::after { position: absolute; top: 7px; }
  .main-nav { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--white); border-bottom: 1px solid var(--line); padding: 8px 20px 16px; box-shadow: var(--shadow); }
  .nav-toggle:checked ~ .main-nav { display: flex; }
  .main-nav .btn { margin: 8px 0 0; }
  .main-nav a.active:not(.btn) { box-shadow: none; background: var(--teal-soft); border-radius: 8px; }
  .brand span { font-size: 1rem; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 1rem var(--sans); padding: 11px 22px; border-radius: 999px; border: 2px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.btn-sm { padding: 7px 16px; font-size: .95rem; }
.btn-xs { padding: 3px 12px; font-size: .85rem; }
.btn-teal { background: var(--teal); color: var(--white); }
.btn-teal:hover { background: var(--teal-dark); color: var(--white); }
.btn-gold, .main-nav a.btn-gold { background: var(--gold); color: var(--white); }
.btn-gold:hover, .main-nav a.btn-gold:hover { background: var(--gold-dark); color: var(--white); }
.btn-outline { background: transparent; color: var(--teal); border-color: var(--teal); }
.btn-outline:hover { background: var(--teal); color: var(--white); }
.btn-light { background: rgba(255, 255, 255, .14); color: var(--white); border-color: rgba(255, 255, 255, .7); }
.btn-light:hover { background: var(--white); color: var(--teal); }
.btn-danger { background: transparent; color: var(--danger); border-color: #e5b4ae; }
.btn-danger:hover { background: var(--danger); color: var(--white); border-color: var(--danger); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--teal); text-decoration: underline; cursor: pointer; }
.link-btn.danger { color: var(--danger); }

/* Hero */
.hero { position: relative; color: var(--white); background: var(--teal-dark) url("../img/hero.jpg") center 40% / cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(10, 52, 56, .88) 0%, rgba(10, 67, 71, .62) 50%, rgba(10, 67, 71, .15) 100%); }
.hero-inner { position: relative; padding: clamp(72px, 12vw, 150px) 20px; }
.hero-eyebrow { font-family: var(--serif); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: 12px; }
.hero h1 { color: var(--white); font-size: clamp(2.2rem, 6vw, 3.8rem); max-width: 14ch; margin-bottom: 16px; }
.hero p { font-size: 1.2rem; max-width: 34rem; color: #e8f2f1; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Sections */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-white { background: var(--white); }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title p { color: var(--muted); max-width: 40rem; margin: 0 auto; }
.divider { width: 64px; height: 3px; background: var(--gold); border: 0; margin: 16px auto 20px; }
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.feature { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.feature-icon { width: 48px; height: 48px; border-radius: 50%; background: var(--teal-soft); color: var(--teal); display: grid; place-items: center; margin-bottom: 14px; }
.feature-icon svg { width: 24px; height: 24px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split > * { min-width: 0; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; gap: 28px; } }
.cta-band { background: var(--teal); color: var(--white); text-align: center; }
.cta-band h2 { color: var(--white); }
.cta-band p { color: #d9ecea; }
.cta-band .hero-actions { justify-content: center; }

/* Cards, panels, lists */
.page { padding: 36px 0 64px; }
.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.page-header h1 { margin-bottom: 4px; }
.page-header .lead { margin: 0; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card + .card { margin-top: 20px; }
.grid > .card + .card { margin-top: 0; }
.card h2 { font-size: 1.25rem; }
.card-title-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.card-title-row h2 { margin: 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 14px 0; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; padding-top: 0; }
.list > li:last-child { padding-bottom: 0; }
.list-title { font-weight: 700; }
.meta { color: var(--muted); font-size: .9rem; }
.empty { color: var(--muted); font-style: italic; margin: 0; }
.pin { display: inline-block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--gold-dark); background: var(--gold-soft); border-radius: 4px; padding: 1px 8px; margin-right: 6px; vertical-align: middle; }
.tag { display: inline-block; font-size: .8rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--teal-soft); color: var(--teal-dark); }
.tag-pending { background: var(--gold-soft); color: var(--gold-dark); }
.tag-suspended { background: var(--danger-soft); color: var(--danger); }
.tag-admin { background: var(--teal); color: var(--white); }
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.tag-coral { background: #fde6dc; color: #b4441c; }
.code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-weight: 700; letter-spacing: .12em; background: var(--gold-soft); color: var(--gold-dark); padding: 1px 8px; border-radius: 4px; }
.plate { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-weight: 700; letter-spacing: .06em; border: 1px solid var(--ink); border-radius: 4px; padding: 0 6px; background: var(--white); white-space: nowrap; }
.standing { display: flex; flex-wrap: wrap; gap: 8px 32px; align-items: baseline; }
.standing .amount { font-family: var(--serif); font-size: 2rem; color: var(--teal); line-height: 1.1; }
.standing .amount.owing { color: #b4441c; }

.result-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.bar { height: 10px; border-radius: 5px; background: var(--teal-soft); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--teal); border-radius: 5px; }

/* Gate screen: big touch targets for a phone or tablet at the gatehouse. */
.gate-search { display: flex; gap: 10px; margin-bottom: 24px; }
.gate-search input { flex: 1; font-size: 1.2rem; padding: 14px 16px; }
.gate-search .btn { padding: 14px 24px; }
.guest { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; }
.guest-name { font-size: 1.15rem; font-weight: 700; }
.guest .btn { min-width: 120px; padding: 12px 20px; }
.guest-state { font-size: .9rem; font-weight: 600; }
.guest-state.inside { color: var(--ok); }
.guest-state.left { color: var(--muted); }
@media (max-width: 640px) { .guest { grid-template-columns: 1fr; } .guest .btn { width: 100%; } }
.notice-body, .post-body { overflow-wrap: anywhere; }

.doc-link { display: flex; gap: 14px; align-items: flex-start; text-decoration: none; color: var(--ink); }
.doc-link:hover .list-title { color: var(--teal); text-decoration: underline; }
.doc-icon { flex: none; width: 40px; height: 40px; border-radius: 8px; background: var(--gold-soft); color: var(--gold-dark); display: grid; place-items: center; }
.doc-icon svg { width: 20px; height: 20px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.stat strong { display: block; font-size: 1.9rem; font-family: var(--serif); color: var(--teal); line-height: 1.1; }
.stat.attention strong { color: var(--coral); }

.posts { display: grid; gap: 16px; }
.post { display: grid; grid-template-columns: 44px 1fr; gap: 14px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--teal); color: var(--white); display: grid; place-items: center; font-weight: 700; font-family: var(--serif); }
.post-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
td .actions { display: flex; gap: 6px; flex-wrap: wrap; }
td form { display: inline; }
/* On phones, "stack" tables show each row as a small card with labelled cells. */
@media (max-width: 640px) {
  .card { padding: 18px; }
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.stack tr:last-child { border-bottom: 0; }
  table.stack td { border: 0; padding: 2px 0; }
  table.stack td[data-label]::before { content: attr(data-label) ": "; font-size: .85rem; color: var(--muted); }
}

/* Forms */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
label { display: block; font-weight: 600; margin-bottom: 6px; }
.hint { font-weight: 400; color: var(--muted); font-size: .9rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=url], input[type=search], input[type=date], select, textarea {
  width: 100%; font: inherit; padding: 11px 14px; border: 1px solid #cfc6b0; border-radius: 8px; background: var(--white); color: var(--ink);
}
textarea { min-height: 140px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--teal); }
.form-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hp { position: absolute; left: -9999px; }
.auth-card { max-width: 480px; margin: 0 auto; }
.auth-card .brand-mark { display: block; width: 96px; margin: 0 auto 12px; }
.auth-card h1 { text-align: center; }
.auth-foot { text-align: center; margin-top: 18px; color: var(--muted); }
.search-row { display: flex; gap: 10px; margin-bottom: 24px; }
.search-row input { flex: 1; }

/* Flash messages */
.flashes { padding-top: 20px; }
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 10px; border: 1px solid; }
.flash-success { background: var(--ok-soft); border-color: #b6dcc6; color: var(--ok); }
.flash-error { background: var(--danger-soft); border-color: #efc2bc; color: var(--danger); }
.flash-info { background: var(--teal-soft); border-color: #bcd9d6; color: var(--teal-dark); }

/* Footer */
.site-footer { background: var(--teal-dark); color: #cfe3e1; padding: 36px 0; margin-top: auto; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { width: 64px; height: 64px; border-radius: 50%; background: var(--white); padding: 4px; }
.footer-brand strong { display: block; font-family: var(--serif); color: var(--white); }
.footer-brand span { font-size: .9rem; color: var(--gold); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-nav a { color: #e8f2f1; text-decoration: none; }
.footer-nav a:hover { color: var(--gold); }
.footer-copy { width: 100%; margin: 8px 0 0; font-size: .85rem; color: #94b9b6; }
