@import url('fonts.css');

/* Boyd-Baker.com - shared stylesheet.
   Fonts are vendored in assets/fonts/; nothing here reaches the network. */

:root{
  /* Neon pastel on a lifted indigo ground. No pure black, no amber.
     Four accents, each with a job - see the comment beside every token. */
  --bg: #14121C;
  --panel: #1C1927;
  --line: #2E2A3E;

  --accent: #7EE8C4;            /* mint   - interactive: nav, buttons, focus */
  --accent-soft: #7EE8C41f;
  --accent-2: #B9A0FF;          /* lilac  - section heads, code chips */
  --accent-2-soft: #B9A0FF1f;
  --accent-3: #FFB593;          /* peach  - links, versions, file meta */
  --accent-4: #8CCDFF;          /* sky    - numbers, lap times */
  --rose: #FF9DC0;              /* errors only */

  --ink: #141021;               /* text on a filled accent */

  --text: #ECE8F5;
  --text-muted: #9C96B0;
  --text-faint: #5E5875;
}

*{ box-sizing: border-box; margin: 0; padding: 0; }

html{ scroll-behavior: smooth; }

body{
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans', sans-serif;
  line-height: 1.55;
}

/* faint scanline texture, very subtle */
body::before{
  content: "";
  position: fixed; inset: 0;
  background: repeating-linear-gradient(
    to bottom, transparent 0, transparent 3px, #ffffff05 3px, #ffffff05 4px
  );
  pointer-events: none;
  z-index: 1;
}

.wrap{ max-width: 980px; margin: 0 auto; padding: clamp(24px, 6vw, 72px) clamp(20px, 5vw, 32px) 60px; position: relative; z-index: 2; }

a{ color: inherit; }

/* ---------- top bar ---------- */

.topbar{
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 40px; margin-bottom: 56px;
  border-bottom: 1px solid var(--line);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  color: var(--text-faint);
}

/* ---------- hero ---------- */

.hero{ margin-bottom: 64px; }

.hero-mark{
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  font-size: clamp(42px, 8vw, 76px);
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.hero-mark .o{ color: var(--accent); }

.hero-tag{
  margin-top: 18px;
  font-size: 18px;
  color: var(--text-muted);
  max-width: 54ch;
}
.hero-tag p + p{ margin-top: 12px; }
.hero-tag strong{ color: var(--text); font-weight: 600; }

.hero-desc{
  margin-top: 20px;
  max-width: 62ch;
  font-size: 15.5px;
  color: var(--text);
}

/* ---------- section heading ---------- */

.sec-head{
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  color: var(--accent-2);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

section{ margin-bottom: 56px; }

/* ---------- usage panels ---------- */

.usage-grid{
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 16px;
}

.u-panel{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.u-title{
  font-weight: 600;
  font-size: 15.5px;
  margin-bottom: 6px;
}

.u-sub{
  color: var(--text-muted);
  font-size: 13.5px;
  margin-bottom: 16px;
}

/* Updates — feed style */
.u-panel.updates .feed-item{
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.u-panel.updates .feed-item:first-of-type{ border-top: none; }
.feed-ver{ font-family: 'IBM Plex Mono', monospace; color: var(--accent-3); margin-right: 8px; }
.feed-note{ color: var(--text-muted); }

/* Documentation — single link card */
.u-panel.docs{ justify-content: space-between; }
.doc-link{
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--accent-3);
  text-decoration: none;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* Downloads — disabled state */
.u-panel.downloads{ opacity: 0.55; }
.soon-badge{
  align-self: flex-start;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text-faint);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 3px 10px;
  margin-top: auto;
}

/* ---------- links row: steam + video ---------- */

.links-grid{
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 16px;
}

.link-panel{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
}

/* Steam panel */
.steam-panel{ display: flex; flex-direction: column; justify-content: space-between; }
.steam-row{ display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.steam-icon{
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #171a21;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.steam-name{ font-weight: 600; font-size: 15px; }
.steam-sub{ font-size: 13px; color: var(--text-muted); }

.steam-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: var(--accent);
  color: var(--ink);
  font-weight: 600;
  font-size: 13.5px;
  border-radius: 8px;
  padding: 11px 16px;
  transition: filter 0.15s ease;
}
.steam-btn:hover{ filter: brightness(1.08); }

/* Video panel */
.video-panel{ padding: 0; overflow: hidden; }
.video-panel .u-title{ padding: 20px 24px 0; }
.video-frame{
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  margin-top: 16px;
}
.video-frame iframe{ position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-caption{ padding: 14px 24px 22px; font-size: 13px; color: var(--text-muted); }

footer{
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--text-faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}


/* ---------- stat row ---------- */
.stat-row{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}
.stat-n{
  font-family: 'IBM Plex Mono', monospace;
  font-size: 32px;
  font-weight: 600;
  color: var(--accent-4);
  line-height: 1;
}
.stat-l{
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ---------- screens table ---------- */
.screens{
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.screens th{
  text-align: left;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  padding: 0 14px 10px 0;
  border-bottom: 1px solid var(--line);
}
.screens td{
  padding: 14px 14px 14px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--text-muted);
}
.screens td:first-child{
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}
.screens td .keys{
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  color: var(--text-faint);
  font-weight: 400;
  margin-top: 3px;
}
.table-scroll{ overflow-x: auto; }

/* ---------- documents list ---------- */
.doc-row{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
  transition: padding-left 0.18s ease;
}
a.doc-row:hover{ padding-left: 7px; }
.doc-name{ font-size: 15.5px; font-weight: 600; }
.doc-desc{ font-size: 13.5px; color: var(--text-muted); margin-top: 3px; font-weight: 400; }
.doc-meta{
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  color: var(--accent-3);
  white-space: nowrap;
}
.doc-row.inert .doc-meta{ color: var(--text-faint); }

@media (max-width: 760px){
  .usage-grid{ grid-template-columns: 1fr; }
  .links-grid{ grid-template-columns: 1fr; }
  .stat-row{ grid-template-columns: repeat(2, 1fr); }
}

/* ================================================================
   NAV  - shared across pages
   ================================================================ */

.nav{
  display: flex; align-items: center; gap: 26px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
}
.nav a{
  color: var(--text-faint);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color .15s;
}
.nav a:hover{ color: var(--text-muted); }
.nav a[aria-current="page"]{ color: var(--accent); border-bottom-color: var(--accent); }

/* ================================================================
   HOME
   ================================================================ */

.bio{ max-width: 62ch; font-size: 15.5px; color: var(--text); }
.bio p + p{ margin-top: 14px; }
.bio .lede{ font-size: 18px; color: var(--text-muted); }

.card-grid{ display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

.card{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  display: flex; flex-direction: column;
  text-decoration: none;
  transition: border-color .15s;
}
a.card:hover{ border-color: var(--accent); }
.card-title{ font-weight: 600; font-size: 15.5px; margin-bottom: 6px; }
.card-sub{ color: var(--text-muted); font-size: 13.5px; }
.card-go{
  margin-top: auto; padding-top: 16px;
  font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--accent-3);
}
.card.locked .card-go{ color: var(--text-faint); }

/* ---------- recent-laps widget ---------- */

.lap-widget{ display: flex; flex-direction: column; gap: 0; }
.lap-widget .lap-line{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.lap-widget .lap-line:first-of-type{ border-top: none; }
.lap-where{ color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lap-car{ color: var(--text-muted); font-size: 12px; display: block; }
.lap-t{ font-family: 'IBM Plex Mono', monospace; color: var(--accent-4); font-size: 13.5px; }

/* ================================================================
   RACING
   ================================================================ */

.filters{ display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.filters select, .filters input{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  padding: 8px 11px;
}
.filters input{ flex: 1; min-width: 160px; }
.filters select:focus, .filters input:focus{ outline: none; border-color: var(--accent); }

table.laps{ width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.laps th{
  text-align: left;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-faint);
  padding: 0 14px 10px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
table.laps th:hover{ color: var(--text-muted); }
table.laps th .arrow{ color: var(--accent-4); }
table.laps td{
  padding: 11px 14px 11px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: baseline;
}
table.laps tr:hover td{ background: #ffffff05; }
.t-time{ font-family: 'IBM Plex Mono', monospace; font-size: 14px; color: var(--accent-4); white-space: nowrap; }
.t-splits{ font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; color: var(--text-faint); white-space: nowrap; }
.t-date{ font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.t-car{ color: var(--text-muted); font-size: 12.5px; }

.sim-tag{
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 2px 9px;
  color: var(--text-muted);
  white-space: nowrap;
}
.sim-tag.ac{ border-color: #3d6b8a; color: #7fb3d4; }
.sim-tag.acc{ border-color: #7a4b2a; color: #d4a07f; }
.sim-tag.dr2{ border-color: #6b5a2a; color: #d4c17f; }

.empty-note{ color: var(--text-faint); font-size: 13.5px; padding: 22px 0; }

/* ================================================================
   RESOURCES  - the vault gate
   ================================================================ */

.gate{ max-width: 640px; }
.gate textarea{
  width: 100%;
  min-height: 120px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  padding: 14px;
  resize: vertical;
}
.gate textarea:focus{ outline: none; border-color: var(--accent); }
.gate textarea.drop{ border-color: var(--accent); background: var(--accent-soft); }

.btn{
  background: var(--accent);
  color: var(--ink);
  border: none;
  border-radius: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  padding: 11px 20px;
  cursor: pointer;
}
.btn:hover{ filter: brightness(1.08); }
.btn:disabled{ opacity: .5; cursor: default; filter: none; }
.btn.ghost{ background: transparent; color: var(--text-muted); border: 1px solid var(--line); }
.btn.ghost:hover{ color: var(--text); border-color: var(--text-faint); filter: none; }

.gate-row{ display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.gate-msg{ font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; }
.gate-msg.err{ color: var(--rose); }
.gate-msg.ok{ color: var(--accent); }
.gate-msg.work{ color: var(--text-muted); }

.accepts{ margin-top: 26px; border-top: 1px solid var(--line); padding-top: 18px; }
.accepts li{ list-style: none; padding: 7px 0; font-size: 13.5px; color: var(--text-muted); }
.accepts li b{ color: var(--text); font-weight: 600; }
.accepts .k{
  font-family: 'IBM Plex Mono', monospace; font-size: 11.5px;
  color: var(--accent-2); background: var(--accent-2-soft);
  border-radius: 4px; padding: 1px 6px;
}

.vault-doc{ display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.vault-actions{ display: flex; gap: 8px; flex-shrink: 0; }

@media (max-width: 760px){
  .card-grid{ grid-template-columns: 1fr; }
  .nav{ gap: 16px; font-size: 12px; }
  .topbar{ flex-wrap: wrap; gap: 14px; }
}

/* ----------------------------------------------------------------
   RESOURCES - the public key, shown in the page itself
   ---------------------------------------------------------------- */

/* 64-column armour. It scrolls sideways on a phone rather than wrapping,
   because a re-wrapped block is a block that will not decrypt. */
.armor{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(9px, 1.5vw, 12px);
  line-height: 1.5;
  color: var(--text-muted);
  white-space: pre;
  overflow: auto;
}
.armor .edge{ color: var(--accent); }

.key-meta{
  margin-top: 12px;
  font-family: 'IBM Plex Mono', monospace; font-size: 12px;
  color: var(--text-faint);
  word-break: break-all;
}
.key-meta b{ color: var(--accent); font-weight: 600; letter-spacing: .04em; }

/* the four steps, sitting directly above the box they describe */
.steps{
  margin-bottom: 22px;
  list-style: none; counter-reset: step;
}
.steps li{
  position: relative; padding: 5px 0 5px 26px;
  font-size: 13.5px; color: var(--text-muted);
}
.steps li::before{
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 6px;
  font-family: 'IBM Plex Mono', monospace; font-size: 11.5px;
  color: var(--accent);
}
.steps .c{ color: var(--text); }
.steps .k{
  font-family: 'IBM Plex Mono', monospace; font-size: 11.5px;
  color: var(--accent-2); background: var(--accent-2-soft);
  border-radius: 4px; padding: 1px 6px;
}

.gate-row .btn{ text-decoration: none; display: inline-block; }

/* ---------- the key, shown in the open under the hero ---------- */

#key-section{ margin-bottom: 56px; }
#armor-inline{ max-width: 640px; max-height: 300px; }

.parley{ margin-top: 20px; max-width: 66ch; list-style: none; }
.parley li{ padding: 7px 0; font-size: 13.5px; color: var(--text-muted); }
.parley li b{ color: var(--text); font-weight: 600; }

/* ----------------------------------------------------------------
   Prose links inside body copy.
   The base rule is a{ color: inherit } because nav, cards and doc-rows
   all set their own colour. Text blocks had no inline links until the
   PanOpticon sub-pages; these get the peach the token comment reserves
   for links, and nothing else on any page is touched.
   ---------------------------------------------------------------- */
.hero-desc a,
.parley a,
.accepts a{ color: var(--accent-3); }
