/* House style: paper, ink, one red. Sharp edges, borders doing the work. */

:root {
  --paper: #fafafa;
  --ink: #0a0a0a;
  --gray-100: #f5f5f5;
  --gray-300: #d4d4d4;
  --gray-500: #737373;
  --gray-800: #262626;
  --red: #e63946;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(64rem, 100% - 2.5rem); margin-inline: auto; }

h1, h2, h3 { font-family: 'Space Grotesk', system-ui, sans-serif; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.5rem); font-weight: 700; line-height: 1.1; margin: 0 0 1.25rem; }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); font-weight: 700; margin: 0 0 1rem; }
h3 { font-size: 1.05rem; font-weight: 500; margin: 2rem 0 0.75rem; }

.red { color: var(--red); }

.kicker {
  font: 500 0.72rem/1 'JetBrains Mono', ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--red);
  margin: 0 0 0.9rem;
}

code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.85em;
  background: rgba(10, 10, 10, 0.06);
  padding: 0.1em 0.35em;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(3.5rem, 10vw, 7rem) 0 clamp(3rem, 8vw, 5rem);
}
.hero .kicker { color: var(--red); }
.hero .lede { font-size: clamp(1rem, 2.4vw, 1.2rem); max-width: 44ch; color: #e5e5e5; margin: 0 0 1.5rem; }
.hero .note {
  max-width: 52ch;
  font-size: 0.85rem;
  color: #a3a3a3;
  border-left: 2px solid var(--red);
  padding-left: 1rem;
  margin: 0;
}

/* ── Sections ─────────────────────────────────────────────────────────── */

main section {
  padding: clamp(3rem, 7vw, 4.5rem) 0;
  border-top: 1px solid var(--gray-300);
}
main section:first-child { border-top: 0; }

.prose { max-width: 68ch; color: var(--gray-800); }
.caption { font-size: 0.85rem; color: var(--gray-500); max-width: 68ch; margin-top: 0.9rem; }

/* ── Stats ────────────────────────────────────────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1px;
  background: var(--gray-300);
  border: 2px solid var(--ink);
  margin: 2rem 0;
}
.stat { background: var(--paper); padding: 1.25rem 1.1rem; }
.stat-value {
  display: block;
  font: 500 clamp(1.5rem, 4vw, 2rem)/1 'JetBrains Mono', ui-monospace, monospace;
  margin-bottom: 0.4rem;
}
.stat-value.hot { color: var(--red); }
.stat-label {
  font: 400 0.68rem/1.3 'JetBrains Mono', ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--gray-500);
}
.stat-error { color: var(--red); }

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 2.5rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
td { padding: 0.55rem 0; border-bottom: 1px solid var(--gray-300); vertical-align: baseline; }
td.num {
  text-align: right;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  white-space: nowrap;
}
td.key { font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 500; }
tr:last-child td { border-bottom: 0; }

.sessions td.when { color: var(--gray-500); font-size: 0.82rem; white-space: nowrap; }
.sessions td.task { color: var(--gray-500); }
.bar { display: block; height: 3px; background: var(--ink); margin-top: 0.35rem; }
.bar.mcp { background: var(--red); }

/* ── Jira frame ───────────────────────────────────────────────────────── */

.jira-frame { border: 1px solid var(--gray-300); background: #fff; margin: 2rem 0 0; max-width: 46rem; }
.jira-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--gray-300);
  background: var(--gray-100);
  font-size: 0.88rem;
}
.jira-avatar {
  display: grid;
  place-items: center;
  width: 1.9rem; height: 1.9rem;
  background: var(--ink); color: var(--paper);
  font: 500 0.7rem 'JetBrains Mono', monospace;
  border-radius: 50%;
}
.jira-when { margin-left: auto; color: var(--gray-500); font-size: 0.8rem; }
.jira-body { padding: 1.1rem; font-size: 0.92rem; }
.jira-body p { margin: 0 0 0.55rem; }
.jira-body strong { font-weight: 600; }
.jira-body em { color: var(--gray-500); font-style: normal; font-size: 0.85em; }
.jira-body ul { margin: 0.2rem 0 0.8rem; padding-left: 1.2rem; }
.jira-body li { margin-bottom: 0.2rem; }
.jira-body .marker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--gray-500);
}

/* ── Button demo (styles lifted from jira-button.css) ─────────────────── */

.button-row { display: flex; flex-wrap: wrap; gap: 2rem; margin: 2rem 0 0; }
.button-demo { display: flex; flex-direction: column; gap: 0.6rem; }
.button-demo .caption { margin: 0; }

.tt-root { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.tt-button {
  appearance: none;
  border: 2px solid #0a0a0a;
  border-radius: 0;
  background: #fafafa;
  color: #0a0a0a;
  font: 600 14px/1 'Inter', system-ui, sans-serif;
  padding: 12px 18px;
  cursor: pointer;
  box-shadow: 4px 4px 0 #0a0a0a;
  transition: transform 80ms ease, box-shadow 80ms ease;
}
.tt-button:hover { transform: translate(1px, 1px); box-shadow: 3px 3px 0 #0a0a0a; }
.tt-button:active { transform: translate(4px, 4px); box-shadow: none; }
.tt-active .tt-button { background: #e63946; color: #fafafa; }
.tt-detail {
  max-width: 280px;
  padding: 6px 10px;
  background: #0a0a0a;
  color: #fafafa;
  font: 500 11px/1.4 'JetBrains Mono', ui-monospace, monospace;
}
.tt-detail:empty { display: none; }

/* ── Terminal ─────────────────────────────────────────────────────────── */

.term {
  background: var(--ink);
  color: #e5e5e5;
  padding: 1.4rem 1.5rem;
  overflow-x: auto;
  font: 400 0.84rem/1.75 'JetBrains Mono', ui-monospace, monospace;
  margin: 2rem 0 0;
}
.term .p { color: var(--gray-500); }
.term .r { color: var(--red); }
.term .b { color: #fff; font-weight: 500; }

/* ── Claims ───────────────────────────────────────────────────────────── */

.claims { margin-top: 2rem; border-top: 2px solid var(--ink); }
.claim {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--gray-300);
  max-width: 68ch;
}
.claim p { margin: 0; }
.claim-mark {
  font: 500 0.9rem/1.6 'JetBrains Mono', monospace;
  color: var(--ink);
  flex-shrink: 0;
}
.claim-open .claim-mark { color: var(--red); }
.claim-open p { color: var(--gray-500); }

/* ── Footer ───────────────────────────────────────────────────────────── */

footer {
  background: var(--ink);
  color: #a3a3a3;
  padding: 3rem 0;
  font-size: 0.88rem;
}
footer p { margin: 0; max-width: 60ch; }

/* ── Narrow screens ───────────────────────────────────────────────────── */
/* The operator reads these from a phone, so this is the case that matters. */

@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, 1fr); }

  /* Five columns will not fit. Drop the task description — the ticket key and
     the duration are what you scan for; the task is on the ticket. */
  .sessions td.task { display: none; }
  .sessions td { font-size: 0.82rem; padding: 0.5rem 0.4rem 0.5rem 0; }
  .sessions td.when { font-size: 0.72rem; }

  .term { font-size: 0.68rem; padding: 1rem 1.1rem; line-height: 1.9; }

  .jira-frame { margin-inline: -0.5rem; }
  .jira-when { margin-left: 0; width: 100%; }

  .button-row { gap: 1.5rem; }
  .split { gap: 1.75rem; }
}
