/* Footscray network sheets — site shell.
   Shares the artboard palette: bg #FAF9F5, ink #1C1A17, accent #A8622C, door teal #2C7A6E. */

:root {
  --bg: #FAF9F5; --ink: #1C1A17; --dim: #6B6862; --dim2: #55524D; --faint: #8C8880;
  --line: #E2DED4; --accent: #A8622C; --accent-bg: #FDF7F1; --teal: #2C7A6E; --teal-dk: #1F5A51;
  --paper: #FFFFFF;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
}
a { color: var(--accent); }
a:hover { color: #7A4620; }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250,249,245,0.94); backdrop-filter: blur(8px);
  border-bottom: 1.5px solid var(--ink);
}
.bar-in {
  max-width: 1248px; margin: 0 auto; padding: 11px 34px;
  display: flex; align-items: center; gap: 18px; justify-content: space-between;
}
.brand { display: flex; align-items: baseline; gap: 11px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand b { font-size: 15px; font-weight: 700; letter-spacing: -0.2px; white-space: nowrap; }
.brand span {
  font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 10px;
  letter-spacing: 1.1px; color: var(--accent); white-space: nowrap;
}
.menu { position: relative; }
.menu > summary {
  list-style: none; cursor: pointer; user-select: none;
  font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 10.5px; letter-spacing: 1.1px;
  color: var(--dim); border: 1.3px solid var(--ink); padding: 7px 13px; white-space: nowrap;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu[open] > summary { background: var(--ink); color: var(--bg); }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: min(92vw, 380px);
  background: var(--paper); border: 1.4px solid var(--ink); padding: 6px 0;
  max-height: 74vh; overflow-y: auto;
}
.menu-grp {
  font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 9.5px; letter-spacing: 1.1px;
  color: var(--accent); padding: 11px 16px 5px;
}
.menu-panel a {
  display: block; padding: 8px 16px; text-decoration: none; color: var(--ink);
  font-size: 13.5px; border-left: 3px solid transparent;
}
.menu-panel a:hover { background: #F6F2EA; }
.menu-panel a[aria-current="page"] { border-left-color: var(--accent); font-weight: 500; background: #FBF7F1; }

/* ---------- sheet ---------- */
.wrap { max-width: 1248px; margin: 0 auto; }
.sheetbody { padding: 32px 34px; display: flex; flex-direction: column; gap: 18px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.scrollx { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.scrollx svg { min-width: 700px; display: block; }

/* ---------- foot nav ---------- */
.foot { border-top: 1.5px solid var(--ink); margin: 26px 34px 0; padding: 20px 0 46px;
        display: flex; gap: 14px; justify-content: space-between; flex-wrap: wrap; }
.foot a {
  text-decoration: none; border: 1.3px solid var(--ink); padding: 11px 15px;
  display: flex; flex-direction: column; gap: 3px; color: var(--ink); max-width: 46%;
}
.foot a:hover { background: #F6F2EA; }
.foot .k { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 9.5px; letter-spacing: 1.1px; color: var(--dim); }
.foot .t { font-size: 13.5px; font-weight: 500; }
.foot .sp { flex: 1; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .bar-in { padding: 10px 18px; }
  .sheetbody { padding: 22px 18px; gap: 15px; }
  .foot { margin: 22px 18px 0; }
  .foot a { max-width: 100%; flex: 1 1 44%; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* schedule rows reflow to stacked cards */
  .row { grid-template-columns: 28px minmax(0, 1fr) !important; gap: 7px 11px !important; padding: 13px 12px !important; }
  .row > :nth-child(n+3) { grid-column: 2; }
  .row.hd { display: none !important; }
  .row > :nth-child(3), .row > :nth-child(4) { text-align: left !important; display: flex; gap: 7px; align-items: baseline; }
  .row > :nth-child(3)::before, .row > :nth-child(4)::before {
    font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 9.5px;
    letter-spacing: 0.9px; color: var(--faint); align-self: center;
  }
  .row > :nth-child(3)::before { content: "POINTS"; }
  .row > :nth-child(4)::before { content: "CABLES"; }
  .row > :nth-child(5) { font-size: 11px; opacity: 0.8; }

  .erow { grid-template-columns: minmax(0, 1fr) !important; gap: 5px !important; padding: 13px 12px !important; }
  .erow.ehd { display: none !important; }
  .erow > :nth-child(3) { text-align: left !important; }
  .erow > :nth-child(3)::before {
    content: "QTY "; font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 9.5px; letter-spacing: 0.9px; color: var(--faint);
  }

  .prow { grid-template-columns: minmax(0, 1fr) !important; gap: 5px !important; padding: 13px 12px !important; }
  .prow.phd { display: none !important; }
  .prow > :nth-child(3), .prow > :nth-child(4) { text-align: left !important; }
  .prow > :nth-child(3)::before {
    content: "QTY "; font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 9.5px; letter-spacing: 0.9px; color: var(--faint);
  }

  .sheetbody [style*="justify-content: space-between"] { flex-wrap: wrap; }
  .scrollx::after {
    content: "swipe to see the whole diagram →"; display: block; padding: 7px 2px 0;
    font-size: 11.5px; color: var(--faint);
  }
}

@media (max-width: 560px) {
  .brand span { display: none; }
  .bar-in { padding: 10px 14px; }
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .foot a { flex: 1 1 100%; }
}

/* ---------- print ---------- */
@media print {
  .bar, .foot, .scrollx::after { display: none !important; }
  body { background: #fff; }
  .sheetbody { padding: 0; }
  .scrollx svg { min-width: 0; }
  a[href]::after { content: none !important; }
}
