:root {
  --forest-950: #071914;
  --forest-900: #0a211a;
  --forest-800: #123c30;
  --forest-700: #1b5d49;
  --steel: #3e5661;
  --steel-dark: #2b3d47;
  --paper: #f7f5ef;
  --white: #ffffff;
  --ink: #18241f;
  --muted: #69766f;
  --line: #dce2dc;
  --gold: #d1b26c;
  --danger: #a3483d;
  --ok: #2e7d4f;
  --shadow: 0 18px 55px rgba(7,25,20,.11);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.66 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; }
h1, h2, h3, p, dl, dd { margin-top: 0; }
h1, h2, h3 { line-height: 1.06; letter-spacing: -.035em; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .7rem 1rem; color: var(--ink); background: white; border-radius: 8px; }
.skip-link:focus { top: 1rem; }

.maint-header { position: absolute; inset: 0 0 auto; z-index: 30; min-height: 84px; padding: 0 max(1rem, calc((100vw - 1180px) / 2)); display: flex; align-items: center; gap: 1.5rem; color: white; border-bottom: 1px solid rgba(255,255,255,.16); }
.maint-brand { display: inline-flex; align-items: center; text-decoration: none; }
.maint-brand img { width: 178px; height: auto; display: block; }
.maint-header nav { margin-left: auto; display: flex; gap: .1rem; overflow-x: auto; scrollbar-width: none; }
.maint-header nav a { padding: .55rem .8rem; border-radius: 999px; color: white; text-decoration: none; white-space: nowrap; font-size: .86rem; font-weight: 700; }
.maint-header nav a:hover, .maint-header nav a:focus-visible { background: rgba(255,255,255,.12); outline: none; }
.maint-header nav a.home-link { border: 1px solid rgba(255,255,255,.35); }

.maint-hero { position: relative; padding: 10rem max(1rem, calc((100vw - 1180px) / 2)) 4.5rem; color: white; background: var(--steel-dark); overflow: hidden; }
.maint-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(1100px 420px at 85% -10%, rgba(209,178,108,.22), transparent 60%), radial-gradient(800px 500px at -10% 110%, rgba(255,255,255,.07), transparent 55%); }
.hero-inner { position: relative; z-index: 1; }
.eyebrow { margin-bottom: .8rem; color: #d7c083; font-size: .75rem; font-weight: 850; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow.dark { color: var(--forest-700); }
.maint-hero h1 { margin-bottom: 1rem; font: 500 clamp(2.8rem, 6vw, 5rem)/1 Georgia, "Times New Roman", serif; }
.hero-lead { max-width: 640px; margin-bottom: 2.2rem; color: #dfe7e4; font-size: clamp(1.02rem, 2vw, 1.22rem); }

.hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; max-width: 900px; margin: 0; }
.hero-stats > div { padding: 1rem 1.1rem; border: 1px solid rgba(255,255,255,.16); border-radius: 16px; background: rgba(255,255,255,.06); }
.hero-stats dt { margin-bottom: .25rem; color: #b9c6c1; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.hero-stats dd { margin: 0; font: 500 1.5rem/1.1 Georgia, serif; }

.maint-section { padding: clamp(3rem, 7vw, 5rem) max(1rem, calc((100vw - 1180px) / 2)); }
.section-heading { margin-bottom: 2rem; display: grid; grid-template-columns: 1fr minmax(280px, 420px); gap: 2rem; align-items: end; }
.section-heading h2 { margin-bottom: 0; font: 500 clamp(2rem, 4.4vw, 3.4rem)/1 Georgia, serif; }
.section-heading > p { margin-bottom: .3rem; color: var(--muted); }

.category-block { margin-bottom: 2.5rem; }
.category-block:last-child { margin-bottom: 0; }
.category-title { display: flex; align-items: baseline; gap: .9rem; margin-bottom: 1.2rem; padding-bottom: .7rem; border-bottom: 2px solid var(--ink); }
.category-title h3 { margin: 0; font: 500 1.5rem/1.1 Georgia, serif; }
.category-title .count { color: var(--muted); font-size: .85rem; font-weight: 700; }

.asset-card { margin-bottom: 1rem; border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: 0 8px 28px rgba(7,25,20,.05); overflow: hidden; }
.asset-card > summary { list-style: none; display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem; cursor: pointer; }
.asset-card > summary::-webkit-details-marker { display: none; }
.asset-card > summary:hover { background: #fbfaf6; }
.asset-card > summary:focus-visible { outline: 2px solid var(--forest-700); outline-offset: -2px; }
.asset-card[open] > summary { border-bottom: 1px solid var(--line); background: #fbfaf6; }
.asset-code { flex: none; padding: .3rem .65rem; border-radius: 8px; color: white; background: var(--steel); font: 800 .74rem/1.4 monospace; letter-spacing: .06em; }
.asset-summary-main { min-width: 0; flex: 1; }
.asset-summary-main strong { display: block; font-size: 1.02rem; }
.asset-summary-main span { color: var(--muted); font-size: .85rem; }
.asset-status { flex: none; padding: .28rem .7rem; border-radius: 999px; font-size: .72rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.asset-status.active { color: #1d5c38; background: #e2f0e6; }
.asset-status.inactive { color: #6b6250; background: #efe9d8; }
.asset-status.retired { color: #8a3f35; background: #f3e2de; }
.asset-toggle { flex: none; color: var(--muted); font-size: 1.2rem; transition: transform .15s ease; }
.asset-card[open] .asset-toggle { transform: rotate(180deg); }

.asset-body { padding: 1.3rem; }
.asset-photo { margin: 0 0 1.3rem; }
.asset-photo img { width: 100%; max-height: 420px; display: block; object-fit: cover; border-radius: 14px; }
.spec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem 1.5rem; margin: 0 0 1.5rem; }
.spec-grid > div { min-width: 0; }
.spec-grid dt { color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.spec-grid dd { margin: .15rem 0 0; font-weight: 650; overflow-wrap: anywhere; }

.asset-log-title { margin: 0 0 .8rem; font-size: 1rem; font-weight: 850; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--white); box-shadow: 0 8px 28px rgba(7,25,20,.05); }
.log-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.log-table th, .log-table td { padding: .75rem .9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.log-table thead th { color: var(--muted); font-size: .7rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; background: #fbfaf6; white-space: nowrap; }
.log-table tbody tr:last-child th, .log-table tbody tr:last-child td { border-bottom: none; }
.log-table .num { text-align: right; white-space: nowrap; }
.log-table td.date { white-space: nowrap; font-weight: 650; }
.log-table .service-type { display: inline-block; padding: .2rem .6rem; border-radius: 999px; background: #e8eef2; color: var(--steel-dark); font-size: .74rem; font-weight: 800; white-space: nowrap; }

.empty-state, .error-state { padding: 2.2rem 1.5rem; border: 1px dashed var(--line); border-radius: 16px; background: var(--white); color: var(--muted); text-align: center; }
.error-state { border-color: #e0b7b0; color: var(--danger); }
.loading { color: var(--muted); }

.data-note { margin-top: 1rem; color: var(--muted); font-size: .85rem; }

.maint-footer { padding: 2.3rem max(1rem, calc((100vw - 1180px) / 2)); display: flex; justify-content: space-between; gap: 2rem; color: #d4ded8; background: var(--forest-950); }
.maint-footer div { display: flex; flex-direction: column; gap: .2rem; }
.maint-footer span { color: #93a29b; font-size: .82rem; }
.maint-footer a { text-decoration: none; font-weight: 700; }

@media (max-width: 860px) {
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-heading { grid-template-columns: 1fr; gap: .6rem; }
  .spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .asset-card > summary { flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .spec-grid { grid-template-columns: 1fr; }
}
