:root {
  color-scheme: dark;
  --bg: #0d0f10;
  --surface: #151719;
  --surface-active: #1b1e20;
  --border: #303437;
  --border-strong: #4a4f52;
  --text: #f3f1ea;
  --muted: #a5aaa8;
  --dim: #808683;
  --accent: #ff5a1f;
  --focus: #f5c84b;
  --hvac: #62c987;
  --electrical: #f1c84b;
  --plumbing: #4aa3ff;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg); }

body {
  min-height: 100dvh;
  margin: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

.page-head {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid var(--border);
  background: #111315;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 650;
  letter-spacing: -.035em;
  line-height: 1.05;
}

.status {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 0 12px;
  border: 1px solid #5a3528;
  border-radius: 999px;
  background: #241915;
  color: #ffb99e;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.status span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

main {
  width: 100%;
  padding: 22px clamp(18px, 4vw, 54px) 32px;
}

.instruction {
  max-width: 68ch;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 0 22px;
}

.project-links a {
  color: #ffc1aa;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.project-links a:hover { text-decoration: underline; }
.project-links a:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.floor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 4vw, 58px);
}

.floor-group { min-width: 0; }

.floor-head {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 15px;
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
}

.floor-code {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -.06em;
}

.floor-head h2 {
  margin: 0 0 3px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -.02em;
}

.floor-head p {
  margin: 0;
  color: var(--dim);
  font-size: 11px;
}

.view-list { display: block; }

.view-row {
  min-height: 70px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  transition: background-color 160ms ease-out, border-color 160ms ease-out;
}

.view-row:hover {
  background: var(--surface-active);
  border-color: var(--border-strong);
}

.view-row:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  background: var(--surface-active);
}

.sheet-number {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -.04em;
}

.view-name {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.view-name strong {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -.015em;
}

.view-name small {
  overflow: hidden;
  color: var(--dim);
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.open-label {
  color: #ffc1aa;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.view-row.dollhouse .sheet-number { color: #d5d4cd; }
.view-row.hvac .sheet-number { color: var(--hvac); }
.view-row.electrical .sheet-number { color: var(--electrical); }
.view-row.plumbing .sheet-number { color: var(--plumbing); }

footer {
  min-height: 50px;
  display: flex;
  align-items: center;
  padding: 10px clamp(18px, 4vw, 54px);
  border-top: 1px solid var(--border);
  color: var(--dim);
  font-size: 10px;
  line-height: 1.4;
}

footer p { margin: 0; }

@media (max-width: 760px) {
  .page-head { min-height: 76px; padding: 13px 14px; }
  .eyebrow { font-size: 8px; }
  h1 { font-size: 20px; }
  .status { min-height: 28px; padding: 0 9px; font-size: 9px; }
  main { padding: 14px 14px 22px; }
  .instruction { margin-bottom: 14px; font-size: 12px; }
  .floor-grid { grid-template-columns: 1fr; gap: 20px; }
  .floor-head { min-height: 54px; gap: 11px; }
  .floor-code { font-size: 24px; }
  .floor-head h2 { font-size: 14px; }
  .view-row { min-height: 58px; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; padding: 7px 0; }
  .sheet-number { font-size: 15px; }
  .view-name strong { font-size: 14px; }
  .view-name small { font-size: 10px; }
  .open-label { font-size: 10px; }
  footer { min-height: 44px; padding: 8px 14px; }
}

@media (max-width: 370px) {
  .page-head { gap: 8px; }
  h1 { font-size: 18px; }
  .status { max-width: 82px; white-space: normal; line-height: 1.1; }
  .view-row { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 8px; }
  .open-label { font-size: 0; }
  .open-label span { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .view-row { transition: none; }
}
