/* ---------------------------------------------------------------------------
 * fluxx.css  —  The Fluxx ops platform
 *
 * ONE stylesheet for all pages. No preprocessor, no build step, no framework.
 * Designed to feel like the same brand universe as the live fluxx.digital
 * site — monochromatic, editorial, generous whitespace, no gold.
 *
 * Primary reference for every value in this file:
 *   /Strategy & Planning/Affiliate Marketing/Resort_Capsule_Mockup_v1.html
 * That mockup is the most recently signed-off, fully-specced brand artefact
 * in the workspace. Copy it — do not invent new values.
 *
 * Hard rules (from CLAUDE.md and live-site inspection 2026-04-10):
 *   - Monochromatic. No gold. No coloured accents.
 *   - Archivo 800 uppercase for every heading, tight tracking (-0.04em).
 *   - Courier Prime for body, italic for "feeling" lines.
 *   - IBM Plex Mono for ALL numerics, labels, kickers, metadata.
 *   - No emojis. No exclamation marks. Editorial tone.
 *   - Cards are white on bg, hairline border, no shadow.
 *   - Generous whitespace. One rule line per section break.
 *
 * If the Resort Capsule mockup and this file ever disagree, the mockup wins.
 * ------------------------------------------------------------------------- */

:root {
  /* Palette — exact values from Resort_Capsule_Mockup_v1.html */
  --text:   #28282A;
  --dark:   #1C1C1D;
  --bg:     #FAFAFA;
  --cream:  #F5F5F3;
  --white:  #FFFFFF;
  --rule:   #E6E6E3;
  --muted:  #8B8B8D;

  /* Typography — Google Fonts fallback set (Option B)
     Pragmatica Extended and Courier Std live in the first slot so that if
     Jayne later activates a Typekit licence the stylesheet upgrades for free. */
  --font-display: 'pragmatica-extended', 'Archivo', 'Helvetica Neue', sans-serif;
  --font-body:    'courier-std', 'Courier Prime', 'Courier New', monospace;
  --font-meta:    'IBM Plex Mono', monospace;
  --font-button:  'aktiv-grotesk', 'Archivo', system-ui, sans-serif;
}

/* Reset — only what's needed */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); }
body {
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
ul { list-style: none; }

/* ---------------------------------------------------------------------------
 * .heading — the Archivo utility class used by every display element.
 * Mirrors exactly the Resort Capsule .heading rule.
 * ------------------------------------------------------------------------- */
.heading {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--text);
}

/* ---------------------------------------------------------------------------
 * Page shell
 * ------------------------------------------------------------------------- */
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 60px 40px 120px;
}

/* Hairline divider, used between major sections */
.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 72px 0;
}

/* ---------------------------------------------------------------------------
 * Masthead — logo image + nav row + thin rule underneath
 * The logo is the real wordmark PNG from fluxx.digital (black on transparent).
 * Capped at 180px wide so it reads as masthead, not banner.
 * ------------------------------------------------------------------------- */
.masthead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 72px;
}
.masthead__brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.masthead__logo {
  width: 180px;
  height: auto;
}
.masthead__kicker {
  font-family: var(--font-meta);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}
.masthead__nav {
  display: flex;
  gap: 36px;
  font-family: var(--font-meta);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text);
}
.masthead__nav a { padding-bottom: 2px; }
.masthead__nav a[aria-current="page"] {
  border-bottom: 1px solid var(--text);
}
.masthead__nav a:hover { text-decoration: none; border-bottom: 1px solid var(--text); }

/* ---------------------------------------------------------------------------
 * Section header — small "01 · Rendered"-style label + big Archivo title.
 * Pattern copied verbatim from Resort Capsule .section-label / .section-title.
 * ------------------------------------------------------------------------- */
.section-head { margin-bottom: 48px; }

.section-head__label {
  display: inline-block;
  font-family: var(--font-meta);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  background: var(--text);
  color: var(--bg);
  padding: 7px 14px;
  margin-bottom: 28px;
}

.section-head__title {
  font-size: clamp(30px, 4.5vw, 52px);
  margin-bottom: 20px;
}

.section-head__intro {
  font-size: 15px;
  line-height: 1.7;
  max-width: 720px;
  color: var(--text);
}

/* ---------------------------------------------------------------------------
 * Tile grid — 2×2 on desktop, single column under 900px
 * ------------------------------------------------------------------------- */
.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

/* ---------------------------------------------------------------------------
 * Tile card
 * Mirrors Resort Capsule .capsule card treatment:
 *   - white on bg
 *   - 1px solid --rule border, no shadow
 *   - generous internal padding
 *   - small kicker → big Archivo title → stats strip → body → hairline footer
 * ------------------------------------------------------------------------- */
.tile {
  background: var(--white);
  border: 1px solid var(--rule);
  padding: 40px 36px 32px;
  display: flex;
  flex-direction: column;
  min-height: 340px;
}

.tile__kicker {
  font-family: var(--font-meta);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 16px;
}

.tile__title {
  font-size: 28px;
  margin-bottom: 28px;
}

/* Stats strip inside a tile — cream bar, IBM Plex Mono numerics.
   Mirrors the Resort Capsule .capsule-stats block exactly. */
.tile__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--cream);
  border: 1px solid var(--rule);
  margin: 0 -36px 24px;         /* full-bleed inside the tile */
  padding: 0;
}
.tile__stats--two  { grid-template-columns: 1fr 1fr; }
.tile__stats--solo { grid-template-columns: 1fr; }

.tile__stat {
  padding: 22px 20px;
  border-right: 1px solid var(--rule);
}
.tile__stat:last-child { border-right: none; }

.tile__stat-label {
  font-family: var(--font-meta);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 8px;
}

.tile__stat-value {
  font-family: var(--font-meta);
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1;
}

/* Editorial body line inside a tile (used on Editorial/Finance Snapshots) */
.tile__body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 20px;
}

.tile__body--italic {
  font-style: italic;
  color: var(--text);
}

.tile__body strong {
  font-weight: 700;
  color: var(--text);
}

/* Footer row inside a tile — hairline above, meta text, right-aligned link */
.tile__footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: var(--font-meta);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.tile__footer a {
  color: var(--text);
  border-bottom: 1px solid var(--text);
  padding-bottom: 2px;
}
.tile__footer a:hover { text-decoration: none; }

/* Placeholder state — used before a sync runs.
   Numbers render as em-dashes in muted grey; footer italicises its note. */
.is-placeholder .tile__stat-value { color: var(--muted); }
.is-placeholder .tile__footer     { font-style: italic; }

/* ---------------------------------------------------------------------------
 * Status bar (bottom of the page) — mirrors the masthead rule line but below.
 * Holds "Last GA4 sync", "Last Pinterest sync", and a link to Settings.
 * ------------------------------------------------------------------------- */
.statusbar {
  margin-top: 96px;
  padding-top: 28px;
  border-top: 1px solid var(--text);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-meta);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.statusbar a { color: var(--text); }
.statusbar a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------------------------------------------------
 * BLOCKER STRIP  (Todo #5.5)
 * Horizontal bar above the tile grid. Shows up to 3 unresolved items sorted
 * by (severity DESC, due_date ASC). Sits on --cream with a top+bottom hairline.
 * Each row reads like an editorial line, not a UI alert: small meta kicker,
 * one-line title, optional due date. No colour other than the ink ⬛ marker
 * next to severity-3 items (unicode block, not an emoji — editorial allowed).
 * ------------------------------------------------------------------------- */
.blockers {
  background: var(--cream);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin: 0 0 56px;
  padding: 4px 0;
}
.blockers__heading {
  display: none; /* visually hidden — screen readers only via aria-label */
}
.blockers__row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 18px 28px;
  border-bottom: 1px solid var(--rule);
}
.blockers__row:last-child { border-bottom: none; }
.blockers__row a {
  display: contents;
  color: inherit;
}
.blockers__row:hover {
  background: var(--white);
  cursor: pointer;
}

.blockers__meta {
  font-family: var(--font-meta);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.5;
}
.blockers__meta--critical {
  color: var(--text);
  font-weight: 500;
}
.blockers__title {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}
.blockers__title strong { font-weight: 700; }
.blockers__due {
  font-family: var(--font-meta);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
}
.blockers__due--none { color: var(--muted); }
.blockers__empty {
  padding: 22px 28px;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
}

/* ---------------------------------------------------------------------------
 * STATUS PILL  (Todo #5.5)
 * Tiny inline label used on affiliate programmes and checklist steps. Uses
 * two flavours only: solid ink for "live/done", outline for everything else.
 * Monochromatic — no status colours. The text itself carries the meaning.
 * ------------------------------------------------------------------------- */
.pill {
  display: inline-block;
  font-family: var(--font-meta);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid var(--text);
  color: var(--text);
  background: var(--bg);
  vertical-align: middle;
}
.pill--solid {
  background: var(--text);
  color: var(--bg);
}
.pill--muted {
  border-color: var(--rule);
  color: var(--muted);
}

/* ---------------------------------------------------------------------------
 * DATA TABLE  (Todo #5.5)
 * Compact Plex Mono table used for affiliate programmes, broken links, and
 * commission rows. One hairline rule per row, no zebra, no borders on cells.
 * ------------------------------------------------------------------------- */
.ftable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-family: var(--font-meta);
  font-size: 12px;
}
.ftable thead th {
  text-align: left;
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 16px;
  border-bottom: 1px solid var(--text);
}
.ftable tbody td {
  padding: 18px 16px;
  border-bottom: 1px solid var(--rule);
  color: var(--text);
  vertical-align: top;
}
.ftable tbody tr:last-child td { border-bottom: 1px solid var(--text); }
.ftable td strong, .ftable th strong { font-weight: 700; }
.ftable td em { color: var(--muted); font-style: italic; }
.ftable--scroll {
  display: block;
  overflow-x: auto;
}

/* ---------------------------------------------------------------------------
 * PANEL  (Todo #5.5)
 * Card-like container used on the Settings page to group a related block
 * (Decisions, Integration checklists). Lighter than .tile — no min-height,
 * no enforced 2-column grid, sits inside the normal page flow.
 * ------------------------------------------------------------------------- */
.panel {
  background: var(--white);
  border: 1px solid var(--rule);
  padding: 32px 32px 28px;
  margin-top: 24px;
}
.panel__kicker {
  font-family: var(--font-meta);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.panel__title {
  font-size: 22px;
  margin-bottom: 16px;
}
.panel__body { font-size: 14px; line-height: 1.7; }

/* Decision list — one row per open decision */
.decision {
  padding: 20px 0;
  border-top: 1px solid var(--rule);
}
.decision:first-child { border-top: none; padding-top: 8px; }
.decision__name {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  font-size: 15px;
  margin-bottom: 10px;
  line-height: 1.3;
}
.decision__row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.7;
  margin-top: 6px;
}
.decision__label {
  font-family: var(--font-meta);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 2px;
}

/* Integration checklist — one row per step */
.checklist__group {
  padding: 20px 0;
  border-top: 1px solid var(--rule);
}
.checklist__group:first-child { border-top: none; padding-top: 8px; }
.checklist__group-name {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  font-size: 15px;
  margin-bottom: 14px;
}
.checklist__step {
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  gap: 14px;
  align-items: baseline;
  padding: 10px 0;
  border-top: 1px solid var(--rule);
  font-family: var(--font-body);
  font-size: 13px;
}
.checklist__step:first-child { border-top: none; }
.checklist__order {
  font-family: var(--font-meta);
  font-size: 10px;
  color: var(--muted);
}
.checklist__name { color: var(--text); }
.checklist__step--done .checklist__name {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.checklist__owner {
  font-family: var(--font-meta);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Wrapping layout for the Settings access strip + two panels */
.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 8px;
}
@media (max-width: 900px) {
  .panel-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------------
 * Responsive
 * ------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .page               { padding: 40px 20px 80px; }
  .masthead           { flex-direction: column; align-items: flex-start; gap: 24px; }
  .masthead__nav      { flex-wrap: wrap; gap: 20px; }
  .tiles              { grid-template-columns: 1fr; gap: 24px; }
  .tile               { padding: 32px 24px 24px; min-height: 0; }
  .tile__stats        { margin: 0 -24px 24px; }
  .section-head__title{ font-size: 30px; }
  .blockers__row      { grid-template-columns: 1fr; gap: 6px; padding: 16px 20px; }
  .blockers__due      { justify-self: start; }
  .panel              { padding: 24px 20px; }
  .decision__row      { grid-template-columns: 1fr; gap: 2px; }
  .checklist__step    { grid-template-columns: 24px 1fr; row-gap: 2px; }
  .checklist__step .pill, .checklist__step .checklist__owner { grid-column: 2; }
}
