:root {
  --canvas: #f7f8f4; --surface: #fff; --ink: #23382e; --muted: #607067;
  --brand: #244d3d; --brand-hover: #173e2e; --accent: #c26742; --line: #dce3db;
  --soft: #edf2eb; --danger: #9e352e; --danger-bg: #fcefeb; --success: #286444;
  --warning: #815b16; --warning-bg: #faf3e3; --radius: 12px; --radius-sm: 7px;
  --shadow: 0 2px 9px rgb(35 56 46 / 3%); --space-1: .25rem; --space-2: .5rem;
  --space-3: .75rem; --space-4: 1rem; --space-6: 1.5rem; --space-8: 2rem;
  --space-12: 3rem; --space-16: 4rem; --font: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: Georgia, "Times New Roman", serif; --content-width: 1180px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 16px/1.6 var(--font); overflow-wrap: anywhere; }
button, input, select, textarea { font: inherit; }
a { color: var(--brand); text-underline-offset: 4px; }
a:hover { color: var(--brand-hover); }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
img, svg { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 4.2vw, 3.3rem); line-height: 1.12; letter-spacing: -.045em; font-weight: 600; margin-bottom: var(--space-6); }
h2 { font-size: 1.3rem; line-height: 1.3; letter-spacing: -.02em; font-weight: 600; margin-bottom: var(--space-3); }
h3 { font-size: 1.08rem; }
p { margin-bottom: var(--space-4); }
.container { width: min(100% - 2rem, var(--content-width)); margin-inline: auto; }
main.container { min-height: 60vh; padding-top: var(--space-8); padding-bottom: var(--space-16); }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { width: min(100% - 2rem, var(--content-width)); margin: auto; min-height: 84px; display: flex; justify-content: space-between; align-items: center; gap: var(--space-6); flex-wrap: wrap; padding-block: var(--space-4); }
.brand { display: inline-flex; align-items: center; gap: var(--space-3); font-size: 1.3rem; font-weight: 650; letter-spacing: -.045em; text-decoration: none; white-space: nowrap; }
.brand-suffix { color: var(--muted); font-weight: 400; }
.brand-mark { width: 30px; height: 30px; background: var(--accent); border-radius: 50%; box-shadow: inset 0 0 0 5px var(--surface), inset 0 0 0 7px var(--accent); border: 2px solid var(--accent); transform: rotate(-25deg); }
.site-nav { display: flex; gap: var(--space-6); align-items: center; font-size: .9rem; flex-wrap: wrap; }
.site-nav > a:not(.button) { text-decoration: none; padding-block: .6rem; color: var(--muted); }
.site-nav > a[aria-current="page"] { color: var(--brand); box-shadow: 0 2px var(--brand); }
.site-nav form { margin: 0; }
.nav-logout, .nav-toggle { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); padding: .6rem .8rem; color: var(--brand); cursor: pointer; min-height: 44px; }
.nav-toggle { display: none; }
.nav-account { border-left: 1px solid var(--line); padding-left: var(--space-4); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .7rem 1.15rem; background: var(--brand); color: #fff; border: 1px solid var(--brand); border-radius: var(--radius-sm); font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.35; text-align: center; }
.button:hover { color: #fff; background: var(--brand-hover); border-color: var(--brand-hover); }
.button.secondary { background: var(--surface); color: var(--brand); border-color: var(--line); }
.button.secondary:hover { background: var(--soft); }
.button.danger { background: var(--danger-bg); color: var(--danger); border-color: #eacbc5; }
.button.small { min-height: 44px; font-size: .9rem; padding: .6rem 1rem; }
.eyebrow { font-size: .73rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 650; color: var(--muted); margin-bottom: var(--space-4); }
.lead { font-size: 1.12rem; line-height: 1.65; color: var(--muted); max-width: 58ch; }
.muted { color: var(--muted); }
.small-text { font-size: .86rem; }
.actions, .form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }
.home-hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--space-16); align-items: center; padding-block: var(--space-8) var(--space-12); }
.hero-copy h1 { max-width: 14ch; }
.hero-copy .actions { margin-top: var(--space-8); }
.hero-graphic { height: 330px; position: relative; overflow: hidden; background: #eaf0e6; border-radius: var(--radius); border: 1px solid #dce5d6; }
.graphic-label { position: absolute; top: 24px; left: 24px; font-size: .6rem; letter-spacing: .14em; color: var(--brand); z-index: 1; }
.target-ring { position: absolute; border: 1px solid #bacdb4; border-radius: 50%; width: 410px; height: 410px; right: -96px; bottom: -185px; }
.ring-two { width: 520px; height: 520px; right: -151px; bottom: -240px; }
.ring-three { width: 630px; height: 630px; right: -206px; bottom: -295px; }
.clay-disc { position: absolute; top: 89px; left: 90px; width: 103px; height: 103px; border: 12px solid #e2a27f; border-radius: 50%; background: var(--accent); box-shadow: 0 14px 0 -6px #a85536; transform: rotate(-24deg) scaleY(.6); }
.graphic-line { position: absolute; height: 1px; width: 220px; background: #9db895; transform: rotate(-35deg); left: -80px; bottom: 77px; }
.graphic-bottom { position: absolute; bottom: 24px; left: 24px; font-size: .65rem; letter-spacing: .2em; color: var(--brand); }
.notice { display: flex; gap: var(--space-4); align-items: flex-start; padding: var(--space-6); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--soft); }
.notice p { margin: .15rem 0 0; color: var(--muted); font-size: .9rem; }
.notice-mark { width: 24px; height: 24px; border: 1px solid #9eafa1; border-radius: 50%; display: flex; justify-content: center; align-items: center; flex-shrink: 0; font-family: var(--font-display); }
.section { margin-top: var(--space-12); }
.section-heading, .heading-row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-6); }
.section-heading h2, .section-heading .eyebrow { margin-bottom: 0; }
.section-heading .eyebrow + h2 { margin-top: .5rem; }
.grid { display: grid; gap: var(--space-6); }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-8); box-shadow: var(--shadow); min-width: 0; }
.card > :last-child { margin-bottom: 0; }
.text-link { font-weight: 600; font-size: .9rem; text-decoration: none; display: inline-flex; gap: 1rem; padding-block: .6rem; }
.member-strip { margin-top: var(--space-12); padding: var(--space-8); border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: var(--space-8); background: var(--soft); border-radius: var(--radius); }
.member-strip p:last-child { margin-bottom: 0; }
.page-heading { margin: var(--space-4) 0 var(--space-8); }
.page-heading h1 { margin-bottom: var(--space-4); }
.page-heading p { margin-bottom: .5rem; }
.page-heading .eyebrow { margin-bottom: var(--space-4); }
.narrow { max-width: 680px; margin-inline: auto; }
.prose { max-width: 820px; margin-bottom: var(--space-6); }
.plain-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.auth-shell { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-16); align-items: center; padding-block: var(--space-12); max-width: 1040px; margin: auto; }
.auth-intro h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.3rem, 4vw, 3.4rem); }
.auth-card { max-width: 480px; width: 100%; }
.auth-card h2 { margin-bottom: var(--space-6); }
.field { margin-bottom: var(--space-6); min-width: 0; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .45rem; }
input:not([type="checkbox"]):not([type="hidden"]), select, textarea { width: 100%; min-height: 48px; border: 1px solid #b9c8bc; border-radius: var(--radius-sm); padding: .7rem .8rem; color: var(--ink); background: var(--surface); }
textarea { resize: vertical; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
.required { color: var(--accent); }
.field-hint { color: var(--muted); font-size: .8rem; margin: .4rem 0 0; }
.field-error { color: var(--danger); display: block; font-size: .86rem; margin-top: .4rem; }
.form-footer { border-top: 1px solid var(--line); padding-top: var(--space-6); margin-top: var(--space-6); color: var(--muted); font-size: .9rem; }
.form-actions { justify-content: space-between; }
.username-hint { background: var(--soft); border-radius: var(--radius-sm); padding: var(--space-4); font-size: .9rem; }
.optional-fields { margin-bottom: var(--space-6); border-top: 1px solid var(--line); padding-top: var(--space-4); }
summary { cursor: pointer; min-height: 44px; padding-block: .5rem; font-weight: 600; }
.checkbox-row { display: flex; gap: var(--space-3); align-items: center; min-height: 48px; padding-block: .5rem; cursor: pointer; }
.checkbox-row input { width: 20px; height: 20px; accent-color: var(--brand); flex-shrink: 0; }
fieldset { border: 0; padding: 0; margin: 0 0 var(--space-6); }
legend { font-weight: 600; margin-bottom: var(--space-3); }
.alert { padding: var(--space-6); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: var(--space-6); overflow-wrap: anywhere; }
.alert.success { background: #edf6ee; color: var(--success); border-color: #c7dec9; }
.alert.error { background: var(--danger-bg); color: var(--danger); border-color: #eacbc5; }
.alert ul { margin-bottom: 0; padding-left: var(--space-6); }
.badge { display: inline-flex; align-items: center; gap: .5rem; font-size: .78rem; font-weight: 600; line-height: 1.35; padding: .4rem .65rem; border-radius: 6px; background: #edf0ee; color: #56645b; max-width: 100%; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.badge-operational, .badge-approved { background: #edf6ee; color: #286444; }
.badge-fault, .badge-rejected, .badge-disabled { background: var(--danger-bg); color: var(--danger); }
.badge-empty, .badge-pending { background: var(--warning-bg); color: var(--warning); }
.badge-maintenance { background: #eaf1f8; color: #385c7a; }
.empty-state { padding: var(--space-8); text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-state p { color: var(--muted); max-width: 45ch; margin-inline: auto; }
.empty-icon { color: #91a797; font-size: 2rem; display: block; margin-bottom: var(--space-3); }
.status-list { display: grid; }
.status-row { padding: var(--space-4) 0; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.status-row p { margin: .1rem 0 0; }
.metric { font-size: 2.6rem; line-height: 1; font-weight: 500; letter-spacing: -.05em; margin-bottom: var(--space-4); }
.metric-card h2 { font-size: .95rem; color: var(--muted); }
.dashboard-grid { grid-template-columns: 1.5fr 1fr; align-items: start; }
.activity-list { list-style: none; padding: 0; margin: 0; }
.activity-list li { display: flex; gap: var(--space-4); padding: var(--space-4) 0; border-top: 1px solid var(--line); }
.activity-list p { margin: 0; }
.activity-dot { height: 9px; width: 9px; background: var(--accent); border-radius: 50%; flex-shrink: 0; margin-top: .5rem; }
.future-list { list-style: none; padding: 0; margin: var(--space-6) 0 0; }
.future-list li { display: flex; gap: var(--space-4); justify-content: space-between; padding-block: var(--space-4); border-top: 1px solid var(--line); flex-wrap: wrap; }
.filter-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-4); margin-bottom: var(--space-6); }
.filter-form .field { margin: 0; flex: 1; min-width: 180px; }
.responsive-table { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--surface); }
.responsive-table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); background: var(--soft); padding: var(--space-4); }
.responsive-table td { padding: var(--space-4); border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.row-link { font-weight: 600; display: inline-block; padding-block: .6rem; }
.table-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pagination { display: flex; gap: var(--space-4); justify-content: center; align-items: center; flex-wrap: wrap; margin-top: var(--space-6); }
.subnav { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: var(--space-8); }
.subnav a { padding: .55rem .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; min-height: 44px; }
.detail-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--space-6); align-items: start; }
.definition { margin: 0; }
.definition div { display: grid; grid-template-columns: 140px 1fr; gap: var(--space-4); padding-block: .8rem; border-top: 1px solid var(--line); }
.definition dt { color: var(--muted); }
.definition dd { margin: 0; overflow-wrap: anywhere; }
.history-note { color: var(--muted); font-size: .85rem; margin-top: .5rem; }
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding-block: var(--space-8); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); flex-wrap: wrap; font-size: .85rem; }
.footer-inner p { margin: 0; color: var(--muted); }
.footer-inner > div { display: flex; gap: var(--space-6); flex-wrap: wrap; }
.footer-inner a:not(.brand) { display: inline-flex; align-items: center; min-height: 44px; }
.error-page { padding-block: var(--space-16); max-width: 660px; }
dialog { width: min(480px, calc(100% - 2rem)); border: 1px solid var(--line); border-radius: var(--radius); padding: 0; color: var(--ink); }
dialog::backdrop { background: rgb(24 43 32 / 40%); }
.dialog-body { padding: var(--space-8); }
.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: fixed; top: 1rem; left: 1rem; z-index: 10; background: var(--surface); padding: 1rem; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
@media (max-width: 1050px) {
  .header-inner { gap: var(--space-4); }
  .site-nav { width: 100%; gap: var(--space-4); }
  html.js .nav-toggle { display: block; }
  html.js .site-nav:not(.is-open) { display: none; }
  .site-nav > a:not(.button) { min-height: 44px; }
  .home-hero { gap: var(--space-8); }
}
@media (max-width: 767px) {
  main.container { padding-top: var(--space-6); padding-bottom: var(--space-12); }
  .header-inner { min-height: 74px; }
  .site-nav { align-items: stretch; flex-direction: column; }
  .nav-account { border-left: 0; padding-left: 0; }
  .nav-logout { width: 100%; text-align: left; }
  .home-hero { grid-template-columns: 1fr; padding-block: var(--space-4) var(--space-8); }
  .hero-copy h1 { max-width: 18ch; }
  .hero-graphic { height: 210px; }
  .clay-disc { top: 56px; left: 65px; }
  .two, .three, .dashboard-grid, .detail-grid, .auth-shell { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr 1fr; gap: var(--space-3); }
  .metrics .card:last-child { grid-column: 1 / -1; }
  .metric-card { padding: var(--space-6); }
  .metric { font-size: 2.2rem; }
  .card { padding: var(--space-6); }
  .card .grid.two { gap: 0; }
  .notice { padding: var(--space-4); }
  .section { margin-top: var(--space-8); }
  .member-strip { padding: var(--space-6); flex-direction: column; align-items: flex-start; gap: var(--space-6); }
  .auth-shell { gap: var(--space-6); padding-block: var(--space-4); }
  .auth-card { max-width: none; }
  .responsive-table, .responsive-table tbody { display: block; width: 100%; }
  .responsive-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .responsive-table tr { display: block; padding: var(--space-4); border-bottom: 1px solid var(--line); }
  .responsive-table td { display: grid; grid-template-columns: minmax(85px, .65fr) minmax(0, 1fr); align-items: center; gap: var(--space-3); padding: .4rem 0; border: 0; }
  .responsive-table td::before { content: attr(data-label); color: var(--muted); font-size: .78rem; }
  .responsive-table .badge { justify-self: start; }
  .definition div { grid-template-columns: 100px 1fr; }
  .form-actions { gap: var(--space-6); }
  .form-actions .button { width: 100%; }
  .filter-form .button { width: 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: var(--space-4); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
