/* appeals-corpus local styles — layered on top of /design/stratum-ds-v2.css */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg, #06060c);
  color: var(--text, #f1f1f5);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent, #818cf8); }

.wrap { max-width: 1200px; margin: 0 auto; padding: 24px 28px 64px; }

/* Breadcrumb */
.crumb {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--text-muted, #8c8ca6);
  margin-bottom: 14px;
  text-transform: uppercase;
}
.crumb a { color: var(--text-dim, #c6c6d5); }
.crumb a:hover { color: var(--text, #f1f1f5); }
.crumb .sep { color: var(--text-muted, #8c8ca6); padding: 0 6px; }

/* Header */
.page-head {
  border-bottom: 1px solid var(--border, #2a2a3a);
  padding-bottom: 18px;
  margin-bottom: 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
}
.page-head h1 {
  font-family: 'Bricolage Grotesque', 'Syne', sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: var(--text, #f1f1f5);
}
.page-head .lede {
  font-size: 0.85rem;
  color: var(--text-dim, #c6c6d5);
  margin-top: 8px;
  max-width: 720px;
  line-height: 1.55;
}
.meta-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  font-family: 'DM Mono', 'Source Code Pro', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 3px;
  text-transform: uppercase;
}
.pill-blue   { background: rgba(59,130,246,0.15);  color: #93c5fd; border: 1px solid rgba(59,130,246,0.3); }
.pill-purple { background: rgba(168,85,247,0.15);  color: #d8b4fe; border: 1px solid rgba(168,85,247,0.3); }
.pill-amber  { background: rgba(245,158,11,0.15);  color: #fcd34d; border: 1px solid rgba(245,158,11,0.3); }
.pill-green  { background: rgba(34,197,94,0.15);   color: #86efac; border: 1px solid rgba(34,197,94,0.3); }
.pill-red    { background: rgba(239,68,68,0.15);   color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }

/* Sections */
.section { margin-bottom: 40px; }
.section-header {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border-sub, #1f1f2d);
}
.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.2em;
  color: var(--cyan, #22d3ee); text-transform: uppercase;
}
.section-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.05rem; font-weight: 700;
  color: var(--text, #f1f1f5);
}
p { font-size: 0.82rem; color: var(--text-dim, #c6c6d5); line-height: 1.7; margin-bottom: 12px; }
strong { color: var(--text, #f1f1f5); font-weight: 600; }
em { color: var(--text-muted, #8c8ca6); font-style: italic; }

/* Stat grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.stat-card {
  background: var(--surface2, #1d1d2c);
  border: 1px solid var(--border, #2a2a3a);
  border-radius: 6px;
  padding: 14px 16px;
}
.stat-label {
  font-size: 0.65rem; color: var(--text-muted, #8c8ca6);
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 6px;
}
.stat-value {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.7rem; line-height: 1; font-weight: 800;
}
.stat-sub { font-size: 0.7rem; color: var(--text-muted, #8c8ca6); margin-top: 6px; line-height: 1.45; }
.sv-green { color: #86efac; }
.sv-amber { color: #fcd34d; }
.sv-red   { color: #fca5a5; }
.sv-blue  { color: #93c5fd; }
.sv-purple{ color: #d8b4fe; }
.sv-cyan  { color: #67e8f9; }

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 14px 0;
  border: 1px solid var(--border, #2a2a3a);
  border-radius: 6px;
  background: var(--surface, #11111a);
}
table.dt {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  font-family: 'DM Mono', 'Source Code Pro', monospace;
}
table.dt thead tr { background: var(--surface2, #1d1d2c); border-bottom: 1px solid var(--border, #2a2a3a); }
table.dt th {
  padding: 10px 12px; text-align: left;
  font-size: 0.65rem; font-weight: 600;
  color: var(--text-dim, #c6c6d5);
  letter-spacing: 0.08em; text-transform: uppercase;
  white-space: nowrap; cursor: pointer; user-select: none;
}
table.dt th:hover { background: rgba(99,102,241,0.08); color: var(--text, #f1f1f5); }
table.dt th:focus-visible { outline: 2px solid var(--accent, #6366f1); outline-offset: -2px; }
table.dt .sort-ind { color: var(--text-muted, #8c8ca6); margin-left: 4px; font-size: 0.7rem; }
table.dt td {
  padding: 8px 12px; border-bottom: 1px solid var(--border-sub, #1f1f2d);
  color: var(--text-dim, #c6c6d5); vertical-align: top; line-height: 1.45;
}
table.dt tbody tr:last-child td { border-bottom: none; }
table.dt tbody tr:hover { background: rgba(255,255,255,0.025); }

/* Cell coloring */
.c-good     { color: #86efac; }
.c-warn     { color: #fcd34d; }
.c-bad      { color: #fca5a5; }
.c-restrictive { background: rgba(239,68,68,0.10); color: #fca5a5; }
.c-deviates    { background: rgba(245,158,11,0.10); color: #fcd34d; }
.c-permissive  { background: rgba(34,197,94,0.08);  color: #86efac; }
.c-na          { color: var(--text-muted, #8c8ca6); font-style: italic; }

/* Heatmap cells */
.hm { font-family: 'DM Mono', monospace; font-size: 0.7rem; padding: 6px 8px; text-align: center; min-width: 42px; }
.hm-0  { background: #14141e; color: #5a5a72; }
.hm-1  { background: #1c2a1c; color: #a7d49b; }
.hm-2  { background: #1f3a1f; color: #b8e0ad; }
.hm-3  { background: #234a23; color: #c9eac0; }
.hm-4  { background: #275a27; color: #d8f4d2; }
.hm-5  { background: #2a6a2a; color: #e8ffe2; }
.hm-empty { background: transparent; color: var(--text-muted, #8c8ca6); }

/* Wayback viability cells */
.via-green  { background: rgba(34,197,94,0.18);  color: #86efac; font-weight: 600; }
.via-yellow { background: rgba(245,158,11,0.18); color: #fcd34d; }
.via-gray   { background: rgba(124,124,144,0.10); color: #6c6c84; font-style: italic; }

/* Callouts */
.callout {
  border-radius: 6px; padding: 14px 16px; margin: 14px 0;
  font-size: 0.82rem; line-height: 1.7;
  border-left: 3px solid;
}
.callout-amber { background: rgba(245,158,11,0.07); border-color: #f59e0b; color: #fcd34d; }
.callout-red   { background: rgba(239,68,68,0.07);  border-color: #ef4444; color: #fca5a5; }
.callout-green { background: rgba(34,197,94,0.07);  border-color: #22c55e; color: #86efac; }
.callout-blue  { background: rgba(59,130,246,0.07); border-color: #3b82f6; color: #93c5fd; }
.callout-purple{ background: rgba(168,85,247,0.07); border-color: #a855f7; color: #d8b4fe; }
.callout strong { color: inherit; }

ul.bullets { margin: 10px 0 14px 18px; }
ul.bullets li { font-size: 0.82rem; color: var(--text-dim, #c6c6d5); line-height: 1.7; margin-bottom: 6px; }

/* Card grid for landing */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.card {
  display: block;
  background: var(--surface2, #1d1d2c);
  border: 1px solid var(--border, #2a2a3a);
  border-radius: 8px;
  padding: 18px 18px 16px;
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: var(--accent, #6366f1); transform: translateY(-1px); }
.card-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem; font-weight: 700;
  color: var(--text, #f1f1f5);
  margin-bottom: 8px;
}
.card-tag {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem; letter-spacing: 0.1em;
  color: var(--cyan, #22d3ee);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.card-desc { font-size: 0.78rem; color: var(--text-dim, #c6c6d5); line-height: 1.5; }
.card-stats {
  display: flex; gap: 12px; margin-top: 12px; flex-wrap: wrap;
}
.card-stat {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-muted, #a0a0b8);
}
.card-stat strong { color: #86efac; font-weight: 600; }

/* Footer */
.foot {
  margin-top: 48px; padding-top: 16px;
  border-top: 1px solid var(--border-sub, #1f1f2d);
  font-size: 0.72rem; color: var(--text-muted, #8c8ca6);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

/* Loading */
.loading { font-family: 'DM Mono', monospace; font-size: 0.78rem; color: var(--text-muted, #8c8ca6); padding: 12px; }

/* Mobile */
@media (max-width: 768px) {
  .wrap { padding: 16px 14px 48px; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .stat-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .card-grid { grid-template-columns: 1fr; }
  table.dt { font-size: 0.72rem; }
  table.dt th, table.dt td { padding: 6px 8px; }
  .page-head h1 { font-size: 1.3rem; }
}
