/* ==========================================================================
   H.O.D. OPERATIONS HUB
   House of Dank corporate stylesheet
   Brand: black / white / green primary. Gold, brown, silver accents.
   Type:  Montserrat throughout. Edo SZ for the hub title only.
   ========================================================================== */

/* --- Edo SZ -------------------------------------------------------------
   The H.O.D. display face. Used for the hub title only, never body text.
   48 KB TrueType, served as-is: small enough that woff2 would save nothing
   worth the extra build step.
   ---------------------------------------------------------------------- */
@font-face {
  font-family: "Edo SZ";
  src: url("/assets/fonts/edosz.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand core */
  --hod-black:  #000000;
  --hod-white:  #FFFFFF;
  --hod-green:  #46B03D;   /* Pantone 361 C */

  /* Brand accents */
  --hod-gold:   #D0B148;   /* Pantone 4018 C */
  --hod-brown:  #754B52;   /* Pantone 4097 C */
  --hod-silver: #CED2D5;   /* Pantone 427 C */
  --hod-red:    #D6222E;   /* Pantone 1795 C - status flags only */

  /* Derived neutrals */
  --ink:        #000000;
  --ink-soft:   #4A4A4A;
  --ink-faint:  #8A8A8A;
  --rule:       #E4E6E8;
  --rule-strong:#C8CCCF;
  --canvas:     #FFFFFF;
  --canvas-alt: #F7F8F8;

  --rail-w: 272px;
  --pad-x: clamp(24px, 5vw, 72px);

  --font: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-title: "Edo SZ", "Montserrat", sans-serif;
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 500;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; text-transform: uppercase; }
p  { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

/* --- Layout shell -------------------------------------------------------- */
.shell { display: flex; min-height: 100vh; }

/* ==========================================================================
   RAIL  (black, fixed, holds logo + the eight tabs)
   ========================================================================== */
.rail {
  width: var(--rail-w);
  flex: 0 0 var(--rail-w);
  background: var(--hod-black);
  color: var(--hod-white);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.rail__brand {
  padding: 30px 26px 24px;
  border-bottom: 1px solid rgba(255,255,255,.14);
}
.rail__logo {
  display: block;
  width: 66px;
  height: 66px;
  margin-bottom: 16px;
}
.rail__logo img { width: 100%; height: 100%; display: block; }

.rail__title {
  font-family: var(--font-title);
  font-size: 27px;
  line-height: .98;
  letter-spacing: .5px;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--hod-white);
}
/* Fallback shaping: only applies while Edo SZ is unavailable. */
.fonts-fallback .rail__title {
  font-weight: 900;
  font-size: 24px;
  letter-spacing: -.4px;
}
.rail__title em {
  display: block;
  font-style: normal;
  color: var(--hod-green);
}
.rail__scope {
  margin-top: 12px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--hod-silver);
}

/* Tab list */
.rail__nav { padding: 14px 0 28px; flex: 1; }
.rail__heading {
  padding: 14px 26px 10px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2px;
  color: rgba(255,255,255,.42);
}
.tab {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 26px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .85px;
  text-transform: uppercase;
  color: rgba(255,255,255,.74);
  border-left: 3px solid transparent;
  transition: color .14s, background .14s, border-color .14s;
}
.tab:hover { color: var(--hod-white); background: rgba(255,255,255,.06); }
.tab__num {
  font-size: 10px;
  font-weight: 800;
  color: rgba(255,255,255,.34);
  min-width: 13px;
}
.tab.is-active {
  color: var(--hod-white);
  background: rgba(70,176,61,.14);
  border-left-color: var(--hod-green);
}
.tab.is-active .tab__num { color: var(--hod-green); }

.rail__foot {
  padding: 18px 26px 24px;
  border-top: 1px solid rgba(255,255,255,.14);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,.4);
}

/* ==========================================================================
   MAIN
   ========================================================================== */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.crumb {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 26px var(--pad-x) 0;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.crumb a:hover { color: var(--hod-green); }
.crumb span.sep { color: var(--rule-strong); }
.crumb .here { color: var(--ink); }

/* Page head */
.phead {
  padding: 22px var(--pad-x) 30px;
  border-bottom: 2px solid var(--hod-black);
}
.phead__eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2.4px;
  color: var(--hod-green);
  margin-bottom: 11px;
}
.phead h1 {
  font-size: clamp(30px, 4.4vw, 50px);
  line-height: 1.02;
  letter-spacing: -.8px;
  font-weight: 900;
}
.phead__purpose {
  margin-top: 13px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  max-width: 56ch;
}

/* Home hero */
.hero { padding: 54px var(--pad-x) 42px; border-bottom: 2px solid var(--hod-black); }
.hero__title {
  font-family: var(--font-title);
  font-size: clamp(40px, 6.4vw, 84px);
  line-height: .92;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  overflow-wrap: break-word;
}
.fonts-fallback .hero__title { font-weight: 900; letter-spacing: -2px; }
/* Green fill, heavy black outline: the H.O.D. wordmark treatment.
   paint-order puts the stroke behind the fill so the letterforms stay crisp.
   Stroke is in em so it scales with the clamped font size. */
.hero__title em {
  display: block;
  font-style: normal;
  color: var(--hod-green);
  -webkit-text-stroke: 0.075em var(--hod-black);
  paint-order: stroke fill;
}
/* Montserrat fallback is already heavy; a stroke on top turns it to mud. */
.fonts-fallback .hero__title em {
  -webkit-text-stroke: 0;
}
.hero__sub {
  margin-top: 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.hero__rule {
  margin-top: 26px;
  height: 5px;
  width: 128px;
  background: var(--hod-green);
}

/* ==========================================================================
   SECTION GRID
   ========================================================================== */
.grid-wrap { padding: 34px var(--pad-x) 56px; flex: 1; }
.grid-wrap__label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 2.2px;
  color: var(--ink-faint);
  margin-bottom: 18px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  background: var(--canvas);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.card {
  background: var(--canvas);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 132px;
  position: relative;
  transition: background .14s;
}
.card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--hod-black);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .18s ease;
}
.card:hover { background: var(--canvas-alt); }
.card:hover::before { transform: scaleY(1); }
.card--green:hover::before  { background: var(--hod-green); }
.card--gold:hover::before   { background: var(--hod-gold); }
.card--brown:hover::before  { background: var(--hod-brown); }
.card--silver:hover::before { background: var(--hod-silver); }

.card__num {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1.4px;
  color: var(--ink-faint);
}
.card__name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .3px;
  line-height: 1.18;
}
.card__purpose {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-soft);
  line-height: 1.5;
}
.card__go {
  margin-top: auto;
  padding-top: 12px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.6px;
  color: var(--ink-faint);
}
.card:hover .card__go { color: var(--hod-green); }

/* Tab cards on home get a little more presence */
.card--tab { min-height: 148px; }
.card--tab .card__name { font-size: 19px; letter-spacing: -.2px; }

/* ==========================================================================
   EMPTY PAGE BODY
   ========================================================================== */
.empty {
  margin: 34px var(--pad-x) 56px;
  border: 2px dashed var(--rule-strong);
  padding: 62px 34px;
  text-align: center;
  background: var(--canvas-alt);
}
/* Full-colour mark, so it carries its own weight at low opacity rather than
   greying out the way a flat silhouette would. */
.empty__mark {
  width: 48px; height: 48px;
  margin: 0 auto 20px;
  opacity: .38;
}
.empty__mark img { width: 100%; height: 100%; display: block; }
.empty h2 {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1.8px;
  margin-bottom: 10px;
}
.empty p {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  max-width: 44ch;
  margin: 0 auto;
  line-height: 1.6;
}

/* ==========================================================================
   FOOTER  (page marker centered, Last Updated right - H.O.D. doc standard)
   ========================================================================== */
.foot {
  margin-top: auto;
  border-top: 1px solid var(--rule);
  padding: 16px var(--pad-x) 26px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.foot__left  { justify-self: start; }
.foot__page  { justify-self: center; color: var(--ink); }
.foot__right { justify-self: end; text-align: right; }

/* ==========================================================================
   ITEM LIST  (what belongs in a section, built or not)
   ========================================================================== */
.items { border-top: 1px solid var(--rule); }
.item { border-bottom: 1px solid var(--rule); }

/* The row itself is the grid. For a built item the <a> is the grid so the
   whole row is clickable; the <li> then just gets out of the way. */
.item:not(.item--built),
.item--built > a {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 15px 4px;
}
.item--built { display: block; }
.item--built:hover { background: var(--canvas-alt); }

.item__num {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--ink-faint);
}
.item__name {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .2px;
  text-transform: uppercase;
}
.item:not(.item--built) .item__name { color: var(--ink-soft); }
.item__state {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--ink-faint);
  white-space: nowrap;
}
.item--built:hover .item__state { color: var(--hod-green); }
.item__state--todo { color: var(--rule-strong); }

/* ==========================================================================
   STORE STRIP  (a location's own details, at the top of its folder)
   ========================================================================== */
.strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  border: 1px solid var(--rule);
  border-left: 4px solid var(--hod-green);
  margin-bottom: 4px;
}
.strip__cell {
  padding: 15px 18px;
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.strip__cell:last-child { border-right: 0; }
.strip__label {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 1.6px;
  color: var(--ink-faint);
}
.strip__value { font-size: 12.5px; font-weight: 600; line-height: 1.4; }
.strip__value--gap {
  color: var(--hod-brown);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.3px;
}
.strip__value a { border-bottom: 1px solid var(--rule-strong); }
.strip__value a:hover { color: var(--hod-green); border-bottom-color: var(--hod-green); }

/* ==========================================================================
   CHIPS  (a GM's master categories)
   ========================================================================== */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--hod-black);
  padding: 8px 14px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

/* ==========================================================================
   NOTE BLOCK  (provenance, caveats)
   ========================================================================== */
.note {
  border-left: 4px solid var(--hod-gold);
  background: var(--canvas-alt);
  padding: 16px 20px;
  margin-bottom: 24px;
  max-width: 78ch;
}
.note__title {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.8px;
  margin-bottom: 7px;
}
.note p:not(.note__title) {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--ink-soft);
}
.note strong { color: var(--ink); font-weight: 700; }

/* ==========================================================================
   MATRIX TABLE
   ========================================================================== */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); }
.matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 660px;
}
.matrix thead th {
  background: var(--hod-black);
  color: var(--hod-white);
  text-align: left;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  padding: 12px 14px;
  white-space: nowrap;
}
.matrix tbody th {
  text-align: left;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .3px;
  white-space: nowrap;
}
.matrix th,
.matrix td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.matrix tbody tr:hover { background: var(--canvas-alt); }
.matrix tbody tr:last-child th,
.matrix tbody tr:last-child td { border-bottom: 0; }
.matrix a { color: var(--ink); border-bottom: 1px solid var(--rule-strong); }
.matrix a:hover { color: var(--hod-green); border-bottom-color: var(--hod-green); }

.td--gap {
  color: var(--hod-brown);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 1.3px;
}
.tag {
  display: inline-block;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1.2px;
  padding: 2px 6px;
  margin-left: 6px;
  vertical-align: middle;
}
.tag--new { background: var(--hod-green); color: var(--hod-white); }

.table-foot {
  margin-top: 14px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-soft);
}
.table-foot strong { color: var(--ink); font-weight: 700; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .rail {
    width: 100%; flex: none; height: auto; position: static;
  }
  .rail__nav { padding-bottom: 14px; }
  .rail__nav ul { display: flex; flex-wrap: wrap; gap: 2px; padding: 0 14px; }
  .tab {
    border-left: none;
    border-bottom: 3px solid transparent;
    padding: 9px 13px;
    font-size: 11px;
  }
  .tab.is-active { border-left-color: transparent; border-bottom-color: var(--hod-green); }
  .rail__foot { display: none; }
  .foot { grid-template-columns: 1fr; text-align: center; }
  .foot__left, .foot__page, .foot__right { justify-self: center; text-align: center; }
}

@media print {
  .rail { display: none; }
  .foot { position: fixed; bottom: 0; left: 0; right: 0; }
}
