/* jcbot — aesthetic pass T-07 (flat layers, no heavy shadow) */

:root {
  color-scheme: dark;
  --bg0: #08090c;
  --bg1: #12161f;
  --bg2: #1c2330;
  --bg2-hover: #252d3d;
  --text: #eef1f6;
  --muted: #9aa3b5;
  --dim: #8b93a6;
  --accent: #6b9dff;
  --accent-soft: rgba(107, 157, 255, 0.14);
  --on-accent: #08090c;
  --border: rgba(255, 255, 255, 0.14);
  --border-soft: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.20);
  --radius: 8px;
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "WenQuanYi Micro Hei", "Noto Sans CJK SC", "Droid Sans Fallback",
    system-ui, -apple-system, sans-serif;
  --mono: "SF Mono", "Cascadia Code", "Consolas", ui-monospace, monospace;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg0: #f6f7f9;
  --bg1: #e4e8ef;
  --bg2: #ffffff;
  --bg2-hover: #eef1f6;
  --text: #141820;
  --muted: #5a6478;
  --dim: #606878;
  --accent: #1a56c4;
  --accent-soft: rgba(26, 86, 196, 0.10);
  --on-accent: #ffffff;
  --border: rgba(20, 24, 32, 0.14);
  --border-soft: rgba(20, 24, 32, 0.11);
  --border-strong: rgba(20, 24, 32, 0.20);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg0);
  line-height: 1.45;
  overflow-x: clip;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}


.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg1);
  border: 1px solid var(--border);
  color: var(--muted);
}

.badge.phase {
  background: var(--accent-soft);
  border-color: var(--border);
  color: var(--text);
  font-weight: 600;
}




/* Rules */
.prose {
  max-width: 40rem;
  background: var(--bg1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.15rem 1.1rem;
}

.prose h1 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
}

.prose .lead {
  color: var(--muted);
  margin: 0 0 1rem;
  font-size: 0.9286rem;
}

.prose h2 {
  margin: 1.1rem 0 0.4rem;
  font-size: 0.95rem;
  color: var(--accent);
}

.prose ul {
  margin: 0.35rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.prose li {
  margin: 0.25rem 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8571rem;
  margin: 0.4rem 0 0;
}

.prose th,
.prose td {
  text-align: left;
  padding: 0.55rem 0.45rem;
  border-bottom: 1px solid var(--border-soft);
  color: var(--muted);
  vertical-align: top;
}

.prose th {
  color: var(--text);
  font-weight: 650;
  font-size: 0.7857rem;
  background: var(--accent-soft);
}

.site-footer {
  margin-top: 1.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-soft);
  font-size: 0.75rem;
  color: var(--dim);
  text-align: center;
}








/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg1);
  overflow: hidden;
  padding: 0;
  min-height: 44px;
}
.theme-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--dim);
  font: inherit;
  font-size: 0.7857rem;
  font-weight: 600;
  padding: 0 0.75rem;
  min-height: 44px;
  cursor: pointer;
  line-height: 1;
}
.theme-toggle button + button {
  border-left: 1px solid var(--border-soft);
}
.theme-toggle button[aria-pressed="true"] {
  background: var(--text);
  color: var(--on-accent);
}
.theme-toggle button:hover {
  color: var(--text);
}
.theme-toggle button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  z-index: 1;
}

/* Gallery */
.g-intro {
  margin: 0 0 1rem;
  padding: 0.85rem 0.9rem;
  background: var(--bg1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.8571rem;
}
.g-intro p { margin: 0 0 0.75rem; }
.g-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.g-filter {
  appearance: none;
  border: 1px solid var(--border-soft);
  background: var(--bg0);
  color: var(--dim);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font: inherit;
  font-size: 0.7857rem;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.g-filter:hover { color: var(--text); border-color: var(--border); }
.g-filter.is-active {
  color: var(--on-accent);
  border-color: var(--text);
  background: var(--text);
}
.g-filter:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.g-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}
@media (min-width: 640px) {
  .g-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .g-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.g-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 100%;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.g-card:hover {
  background: var(--bg2-hover);
  border-color: var(--border-strong);
}
.g-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.g-num {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
}
.g-kind {
  font-size: 0.75rem;
  color: var(--dim);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}
.g-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.3;
}
.g-name a { color: var(--text); }
.g-name a:hover { color: var(--accent); text-decoration: none; }
.g-tag {
  margin: 0;
  font-size: 0.7857rem;
  color: var(--accent);
}
.g-traits, .g-praise {
  margin: 0;
  font-size: 0.7857rem;
  color: var(--muted);
  line-height: 1.4;
}
.g-praise {
  color: var(--dim);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.g-links {
  margin-top: auto;
  padding-top: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  border-top: 1px solid var(--border-soft);
}
.g-btn {
  font-size: 0.7857rem;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 0.2rem 0.55rem;
}
.g-btn:hover { text-decoration: none; background: var(--bg1); color: var(--text); }
.g-src {
  font-size: 0.75rem;
  color: var(--dim);
}


/* narrow pad — avoid page overflow from padding at 320 */




.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.nav-logo span { color: var(--accent); font-weight: 600; }
.nav-logo:hover { text-decoration: none; color: var(--text); }

.nav-edition {
  font-size: 0.75rem;
  color: var(--dim);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 0.1rem 0.4rem;
}


.app-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0.65rem 0.75rem 0.85rem;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 0.55rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border-soft);
}

.title-block h1 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}
.title-block p {
  margin: 0.15rem 0 0;
  font-size: 0.7857rem;
  color: var(--muted);
}

.topbar-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
}



.app-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  text-align: left;
  margin-top: 0.85rem;
}
.app-footer .footer-mid {
  color: var(--dim);
}

.page-pad {
  flex: 1;
  min-width: 0;
}


@media (max-width: 639px) {
  .app-main { padding: 0.5rem 0.5rem 0.75rem; }
}

/* contrib (T-15 sync) */


.contrib-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  color: var(--muted);
}

.contrib-table th,
.contrib-table td {
  padding: 0.2rem 0.35rem;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
}

.contrib-table th {
  font-weight: 600;
  color: var(--dim);
}

.contrib-table th:nth-child(2),
.contrib-table th:nth-child(3),
.contrib-table td:nth-child(2),
.contrib-table td:nth-child(3) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.contrib-table tbody tr:last-child td {
  border-bottom: none;
}



/* —— hub entry (index) —— */
.hub-page {
  display: flex;
  justify-content: center;
}
.workspace-page .hub {
  width: min(100%, 72rem);
  max-width: none;
  margin: 0 auto;
  padding: 1.5rem clamp(1rem, 3vw, 2rem) 2rem;
}
.hub {
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.hub-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 2rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-soft);
}
.hub-brand .nav-logo {
  font-size: 1.35rem;
}
.hub-blurb {
  margin: 0.35rem 0 0;
  font-size: 0.8571rem;
  color: var(--muted);
}
.hub-main {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.workspace-page .hub-main.workspace-main {
  width: 100%;
  max-width: none;
  align-self: stretch;
  flex: 1 1 auto;
  min-width: 0;
}
.cards-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.cards-nav > li {
  border-bottom: 1px solid var(--border);
}
.cards-nav > li:last-child {
  border-bottom: none;
}
.cards-nav a {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  align-items: start;
  column-gap: 0.85rem;
  padding: 1.1rem 0.35rem;
  min-height: 44px;
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.cards-nav a:hover {
  background: var(--bg1);
  text-decoration: none;
}
.cards-nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.cards-nav-idx {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.6;
  padding-top: 0.15rem;
}
.cards-nav-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.cards-nav-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}
.cards-nav-sub {
  font-size: 0.8571rem;
  color: var(--muted);
  line-height: 1.45;
}
.hub-footer {
  margin-top: auto;
  padding-top: 2rem;
  font-size: 0.75rem;
  color: var(--dim);
}

/* —— transformer demo —— */
.demo {
  margin-top: 1rem;
  max-width: 40rem;
  background: var(--bg1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.1rem;
}
.demo h2 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  color: var(--accent);
}
.demo-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.demo-toolbar button {
  min-height: 44px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-size: 0.8571rem;
  color: var(--text);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}
.demo-toolbar button:hover {
  background: var(--bg2-hover);
}
.demo-toolbar button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.demo-toolbar button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.demo-stage {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.demo-stage svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 260px;
}
.demo-attn-line {
  stroke: var(--accent);
  fill: none;
}
.demo-w-label {
  fill: var(--muted);
  font-size: 11px;
  font-family: var(--mono);
}
.demo-token-circle {
  fill: var(--bg2);
  stroke: var(--border-strong);
  stroke-width: 1.5;
}
.demo-token.is-query .demo-token-circle {
  stroke: var(--accent);
  stroke-width: 2.5;
  fill: var(--accent-soft);
}
.demo-token-text {
  fill: var(--text);
  font-size: 14px;
  font-weight: 650;
  pointer-events: none;
}
.demo-caption {
  margin: 0.55rem 0 0;
  font-size: 0.7857rem;
  color: var(--muted);
  min-height: 1.3em;
}
.demo-heatmap {
  margin-top: 0.65rem;
  overflow-x: auto;
}
.demo-heat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}
.demo-heat-table th,
.demo-heat-table td {
  padding: 0.35rem 0.4rem;
  text-align: center;
  border: 1px solid var(--border-soft);
  color: var(--text);
}
.demo-heat-table th {
  color: var(--muted);
  font-weight: 600;
  background: var(--bg2);
}
.demo-heat-table td.is-query-row {
  outline: 1px solid var(--accent);
}


/* Contrib T/L/H (T-27) */
.contrib-table { width: 100%; table-layout: fixed; }
.contrib-table th:nth-child(1),
.contrib-table td:nth-child(1) { width: 42%; }
.contrib-table th:nth-child(n+2),
.contrib-table td:nth-child(n+2) { width: 19.3%; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 390px) {
  .contrib-table { font-size: 0.8125rem; }
}




/* Site chrome L0/L1 (T-30) */
.app-shell--chrome {
  display: block;
  grid-template-columns: none;
  min-height: 100vh;
  background: var(--bg0);
}
.app-shell--chrome > .app-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  padding: 0;
}
.site-chrome {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1rem;
  padding: 0.55rem 0.85rem;
  margin: 0;
  background: var(--bg1);
  border-bottom: 1px solid var(--border-soft);
}
@media (min-width: 1100px) {
  .site-chrome,
  .hub-header {
    flex-wrap: nowrap;
    align-items: center;
  }
  .hub-header .chrome-nav {
    flex: 1 1 auto;
    min-width: 0;
  }
  .hub-header .chrome-tools,
  .site-chrome .chrome-tools {
    flex: 0 0 auto;
  }
}
.chrome-brand {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
}
.chrome-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.15rem;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.chrome-link {
  flex: 0 0 auto;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}
a.chrome-link:hover {
  color: var(--text);
  background: var(--bg2);
  text-decoration: none;
}
.chrome-link.is-active {
  color: var(--text);
  background: var(--bg2);
  border-color: var(--border-soft);
  font-weight: 650;
}
.chrome-link--external::after {
  content: " ↗";
  font-size: 0.72em;
  opacity: 0.75;
}
.chrome-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
}
.page-body {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  min-width: 0;
}
.section-rail {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.75rem 0.55rem;
  background: var(--bg0);
  /* decoration budget: topbar border only — no rail right border */
}
.section-rail-label {
  margin: 0 0.35rem;
  font-size: 0.75rem;
  color: var(--dim);
  letter-spacing: 0.02em;
}
.section-nav {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}
.section-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  color: var(--muted);
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
}
a.section-link:hover,
button.section-link:hover {
  color: var(--text);
  background: var(--bg1);
  text-decoration: none;
}
.section-link.is-active {
  color: var(--text);
  background: var(--bg1);
  border-color: var(--border-soft);
  font-weight: 650;
}
.page-content {
  min-width: 0;
  padding: 0.65rem 0.85rem 0.85rem;
  display: flex;
  flex-direction: column;
}
.page-titlebar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem 1rem;
  margin-bottom: 0.55rem;
}
.page-title-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.hub-chrome {
  margin: 0;
  border-radius: 0;
}
.hub-blurb-below {
  margin: 0.75rem 1rem 0;
  color: var(--muted);
  font-size: 0.9286rem;
}
@media (max-width: 999px) {
  .page-body {
    grid-template-columns: 1fr;
  }
  .section-rail {
    padding: 0.45rem 0.65rem 0.35rem;
    border-bottom: 0; /* keep decoration budget on topbar only */
  }
  .section-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.2rem;
  }
  .section-link {
    width: auto;
  }
  .chrome-nav {
    order: 3;
    flex: 1 1 100%;
  }
}
@media (max-width: 639px) {
  .site-chrome { padding: 0.45rem 0.55rem; }
  .page-content { padding: 0.5rem 0.55rem 0.75rem; }
  .chrome-link { font-size: 0.7857rem; padding: 0.3rem 0.45rem; }
}

.page-body--single {
  grid-template-columns: minmax(0, 1fr);
}
.ops-diary {
  max-width: 40rem;
  margin: 0.15rem 0 0;
}
.ops-empty {
  margin: 0;
  padding: 1rem 0.15rem;
  color: var(--muted);
  font-size: 0.9286rem;
}
.ops-day {
  margin: 0 0 0.65rem;
  background: var(--bg1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}
.ops-day details {
  margin: 0;
}
.ops-day summary {
  padding: 0.7rem 0.85rem;
  cursor: pointer;
}
.ops-day time {
  font-weight: 650;
  margin-right: 0.75rem;
  color: var(--text);
}
.ops-summary {
  color: var(--muted);
  font-size: 0.875rem;
}
.ops-body {
  padding: 0 0.85rem 0.85rem;
  color: var(--text);
}
.ops-body h2 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}
.ops-body h3 {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.95rem;
  color: var(--accent);
}
.ops-body p {
  margin: 0.35rem 0 0;
}
.ops-body ul,
.ops-body ol {
  margin: 0.35rem 0 0;
  padding-left: 1.15rem;
}
.ops-body li {
  margin: 0.25rem 0;
}
.ops-body code {
  font-family: var(--mono);
  font-size: 0.8571rem;
}

.design-trends {
  margin: 0.15rem 0 0;
}
.trend-empty {
  margin: 0;
  padding: 1rem 0.15rem;
  color: var(--muted);
  font-size: 0.9286rem;
}
.trend-day {
  margin: 0 0 0.85rem;
}
.trend-day details {
  margin: 0;
}
.trend-day summary {
  padding: 0.15rem 0 0.65rem;
  cursor: pointer;
}
.trend-day time {
  font-weight: 650;
  margin-right: 0.75rem;
  color: var(--text);
}
.trend-summary {
  color: var(--muted);
  font-size: 0.875rem;
}
.trend-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}
@media (min-width: 640px) {
  .trend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .trend-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.trend-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 100%;
}
.trend-card h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.3;
}
.trend-point {
  margin: 0;
  font-size: 0.7857rem;
  color: var(--muted);
  line-height: 1.4;
}
.trend-meta {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.trend-source {
  font-size: 0.7857rem;
}
.trend-dead {
  font-size: 0.75rem;
  color: var(--muted);
}
.trend-note {
  margin: 0;
  font-size: 0.75rem;
  color: var(--dim);
  line-height: 1.4;
}
.trend-note span {
  margin-right: 0.35rem;
  color: var(--muted);
}
.trend-card img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  background: var(--bg1);
}


/* —— T-41 reports —— */
.report-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.report-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.report-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius, 10px);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.report-card:hover {
  border-color: var(--accent);
}

.report-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.report-card-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--fg);
}

.report-card-sub {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}

.report-list-note {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.robots-column {
  max-width: 40rem;
  margin: 0.15rem 0 0;
}

.robot-category + .robot-category {
  margin-top: 1.35rem;
}

.robot-category-title {
  margin: 0 0 0.65rem;
  font-size: 0.9375rem;
  font-weight: 650;
  color: var(--muted);
}

.robots-empty {
  margin: 0;
  padding: 1rem 0.15rem;
  color: var(--muted);
  font-size: 0.9286rem;
  line-height: 1.55;
}

.robot-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.robot-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius, 10px);
  background: var(--surface);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.robot-card:hover {
  border-color: var(--accent);
}

.robot-card-link {
  color: inherit;
  text-decoration: none;
}

.robot-card-link:hover .robot-card-title {
  color: var(--accent);
}

.robot-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.robot-card-source {
  color: var(--muted);
  text-decoration: none;
}

a.robot-card-source:hover {
  color: var(--accent);
  text-decoration: underline;
}

.robot-card-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--fg);
}

.robot-card-sub {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}

.harness-column {
  max-width: 40rem;
  margin: 0.15rem 0 0;
}

.harness-category + .harness-category {
  margin-top: 1.35rem;
}

.harness-category-title {
  margin: 0 0 0.65rem;
  font-size: 0.9375rem;
  font-weight: 650;
  color: var(--muted);
}

.harness-empty {
  margin: 0;
  padding: 1rem 0.15rem;
  color: var(--muted);
  font-size: 0.9286rem;
  line-height: 1.55;
}

#good-reads {
  margin-bottom: 1.5rem;
}

#good-reads .harness-card-link {
  font-weight: normal;
  line-height: 1.55;
  font-size: 0.9286rem;
}

.harness-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.harness-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius, 10px);
  background: var(--surface);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.harness-card:hover {
  border-color: var(--accent);
}

.harness-card-link {
  color: inherit;
  text-decoration: none;
}

.harness-card-link:hover .harness-card-title {
  color: var(--accent);
}

.harness-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.harness-card-source {
  color: var(--muted);
  text-decoration: none;
}

a.harness-card-source:hover {
  color: var(--accent);
  text-decoration: underline;
}

.harness-card-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--fg);
}

.harness-card-sub {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}

.report-source-note {
  margin: 0 0 1rem;
  padding: 0.65rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--muted);
  background: var(--surface-2, var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
}

.report-source-note code {
  font-size: 0.75rem;
  word-break: break-all;
}

.report-prose .table-scroll,
.prose .table-scroll {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.75rem 0 1rem;
}

.prose pre.code-scroll,
.report-prose pre.code-scroll {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.75rem 0 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  background: var(--surface-2, var(--surface));
  font-size: 0.8125rem;
  line-height: 1.45;
}

.prose pre.code-scroll code,
.report-prose pre.code-scroll code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: transparent;
  padding: 0;
}

.prose a,
.report-prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose hr,
.report-prose hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}

.prose h3,
.report-prose h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.05rem;
}

/* Superlinear Share Your Projects comparison */
.sla-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-bottom: 1.5rem;
}
.sla-disclaimer {
  margin: 0;
  padding: 0.65rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted);
  background: var(--surface-2, var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
}
.sla-stats { margin: 0; }
.sla-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.65rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.sla-stat-grid li {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  background: var(--surface);
}
.sla-stat-n {
  font-size: 1.35rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}
.sla-stat-k { font-size: 0.8125rem; color: var(--muted); }
.sla-stat-meta { margin: 0.5rem 0 0; font-size: 0.8125rem; color: var(--muted); }
.sla-analysis h2 { margin: 0 0 0.5rem; font-size: 1.125rem; }
.sla-analysis p { margin: 0 0 0.65rem; font-size: 0.9375rem; line-height: 1.55; color: var(--text, var(--fg)); }
.sla-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: flex-end;
}
.sla-filter {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8125rem;
  color: var(--muted);
}
.sla-filter select {
  min-width: 10rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  background: var(--surface);
  color: var(--fg);
  font-size: 0.875rem;
}
.sla-result-bar {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}
.sla-clear-btn {
  margin-left: 0.75rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.8125rem;
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
}
.sla-clear-btn:hover { border-color: var(--accent); color: var(--accent); }
.sla-tier {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}
.sla-tier-label { line-height: 1.3; }
.sla-tier--A-paid-proven {
  color: #0d5c36;
  background: rgba(34, 160, 107, 0.14);
  border-color: rgba(34, 160, 107, 0.35);
}
.sla-tier--B-priced-unproven {
  color: #7a4d00;
  background: rgba(230, 160, 40, 0.16);
  border-color: rgba(230, 160, 40, 0.4);
}
.sla-tier--C-experiment {
  color: #1a4d8c;
  background: rgba(70, 130, 220, 0.14);
  border-color: rgba(70, 130, 220, 0.35);
}
.sla-tier--D-unknown {
  color: var(--muted);
  background: var(--surface-2, var(--surface));
  border-color: var(--border);
}
[data-theme="dark"] .sla-tier--A-paid-proven { color: #7dffb8; }
[data-theme="dark"] .sla-tier--B-priced-unproven { color: #ffd27a; }
[data-theme="dark"] .sla-tier--C-experiment { color: #9ec5ff; }
.sla-table-scroll { margin-top: 0.25rem; }
.sla-table {
  width: 100%;
  min-width: 64rem;
  table-layout: auto;
  font-size: 0.8125rem;
}
.sla-table th,
.sla-table td {
  vertical-align: top;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.sla-table th {
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
  font-weight: 600;
}
.sla-col-title { min-width: 14rem; word-break: break-word; }
.sla-col-evidence { min-width: 12rem; max-width: 18rem; line-height: 1.45; }
.sla-col-scores { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sla-score--empty { color: var(--muted); font-style: normal; }
.sla-enrich--full_post { color: #0d5c36; font-weight: 600; }
.sla-enrich--list_only { color: var(--muted); }
.sla-muted { color: var(--muted); }
.sla-cards { display: none; gap: 0.75rem; }
.sla-card {
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  padding: 0.75rem;
  background: var(--surface);
}
.sla-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.sla-card-head h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
  word-break: break-word;
}
.sla-card-title {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.45;
  word-break: break-word;
}
.sla-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.75rem;
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
}
.sla-card-meta dt { color: var(--muted); font-weight: 500; }
.sla-card-meta dd { margin: 0; }
.sla-card-evidence {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.45;
}
.sla-card-links { margin: 0; font-size: 0.8125rem; }
@media (max-width: 860px) {
  .sla-table-scroll { display: none; }
  .sla-cards { display: flex; flex-direction: column; }
  .sla-filters { flex-direction: column; align-items: stretch; }
  .sla-filter select { width: 100%; min-width: 0; }
}

.sla-section-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin: 0 0 1.25rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  border-radius: 0.5rem;
  background: var(--surface-2, rgba(0, 0, 0, 0.02));
  font-size: 0.875rem;
}
.sla-back {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.sla-back:hover { text-decoration: underline; }
.sla-section-current {
  font-weight: 600;
  color: var(--muted);
}
.sla-section-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
}
.sla-section-links a {
  color: var(--text, var(--fg));
  text-decoration: none;
  padding: 0.15rem 0.35rem;
  border-radius: 0.25rem;
}
.sla-section-links a:hover { color: var(--accent); }
.sla-section-links a.is-active {
  font-weight: 600;
  color: var(--accent);
  background: rgba(0, 0, 0, 0.04);
}
.sla-source-note {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.875rem;
  line-height: 1.55;
  border-left: 3px solid var(--accent);
  background: var(--surface-2, rgba(0, 0, 0, 0.02));
  color: var(--muted);
}
.sla-hub-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.85rem;
}
.sla-hub-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  height: 100%;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  border-radius: 0.55rem;
  text-decoration: none;
  color: inherit;
  background: var(--card, var(--surface));
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.sla-hub-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.sla-hub-card h2 {
  margin: 0;
  font-size: 1.05rem;
}
.sla-hub-card p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.45;
}
.sla-hub-metrics {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: var(--text, var(--fg));
}
.sla-bias-callout {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid #c45c00;
  border-radius: 0.5rem;
  background: rgba(196, 92, 0, 0.08);
}
.sla-bias-title {
  margin: 0 0 0.35rem;
  font-weight: 700;
  font-size: 0.9375rem;
}
.sla-bias-ratio { margin: 0 0 0.5rem; font-size: 0.9375rem; }
.sla-bias-body {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
}
.sla-block { margin: 0 0 1.5rem; }
.sla-block h2 { margin: 0 0 0.65rem; font-size: 1.125rem; }
.sla-denom, .sla-muted-note {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  color: var(--muted);
}
.sla-theme-list, .sla-post-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.sla-theme-card, .sla-post-card {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  border-radius: 0.45rem;
  background: var(--card, var(--surface));
}
.sla-theme-card h3, .sla-post-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  line-height: 1.4;
}
.sla-theme-meta { margin: 0 0 0.5rem; font-size: 0.8125rem; color: var(--muted); }
.sla-post-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: 0.25rem 0.75rem;
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
}
.sla-post-meta dt { color: var(--muted); font-weight: 500; }
.sla-post-meta dd { margin: 0; }
.sla-post-summary { margin: 0; font-size: 0.875rem; line-height: 1.5; }
.sla-highlights ul { margin: 0; padding-left: 1.2rem; }
@media (max-width: 640px) {
  .sla-section-nav { flex-direction: column; align-items: flex-start; }
  .sla-section-links { width: 100%; }
}

.prose h4,
.report-prose h4 {
  margin: 1rem 0 0.4rem;
  font-size: 0.95rem;
}

@media (max-width: 719px) {
  .page-body:has(.report-prose) .section-rail {
    display: none;
  }
}

/* JC Workspace Phase 1 */
.workspace-page .workspace-main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 0 1.5rem;
}
.ws-section {
  margin: 0 0 1.75rem;
  padding: 1rem 1.05rem;
  background: var(--bg1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}
.ws-section--recent {
  padding: 1.15rem 1.1rem 1.25rem;
}
.ws-section-head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}
.ws-section-sub,
.ws-agents-hint,
.ws-noscript-note,
.ws-reports-note,
.ws-fetch-error,
.ws-empty {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.ws-output-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.ws-output-list[hidden],
.ws-recent-static[hidden] {
  display: none !important;
}
.ws-date-group {
  margin: 0 0 1rem;
}
.ws-date-group:last-child {
  margin-bottom: 0;
}
.ws-date-group-label {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--dim);
}
.ws-date-group[data-date-group="today"] .ws-date-group-label,
.ws-date-group[data-date-group="yesterday"] .ws-date-group-label,
.ws-date-group[data-date-group="earlier"] .ws-date-group-label {
  letter-spacing: 0.04em;
}
.ws-section--recent {
  flex: 1 1 auto;
}
.ws-output-card {
  display: block;
  padding: 0.75rem 0.85rem;
  background: var(--bg2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
}
.ws-output-card:hover {
  background: var(--bg2-hover);
  text-decoration: none;
}
.ws-output-card--sample {
  border-style: dashed;
}
.ws-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.ws-output-title {
  display: block;
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.35;
}
.ws-output-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.35rem;
}
.ws-tag {
  font-size: 0.72rem;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  color: var(--dim);
}
.ws-agent-badge {
  font-size: 0.72rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text);
}
.ws-project-tag {
  font-size: 0.72rem;
  color: var(--dim);
}
.ws-sample-label {
  border-style: dashed;
}
.ws-sample-banner {
  margin: 0 0 0.55rem;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  background: var(--bg2);
  font-size: 0.85rem;
  color: var(--muted);
}
.ws-projects-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
}
.ws-project-card {
  display: block;
  padding: 0.85rem;
  background: var(--bg2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  color: inherit;
}
.ws-project-name {
  display: block;
  font-weight: 650;
}
.ws-project-desc {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.ws-agent-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.ws-agent-chip {
  font: inherit;
  font-size: 0.78rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  cursor: pointer;
}
.ws-agent-chip[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.ws-back-link {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}
.ws-live-region:not(:empty) {
  margin-top: 0.75rem;
}
@media (max-width: 639px) {
  .workspace-page .workspace-main {
    padding: 0 0.55rem 1rem;
  }
  .ws-section {
    padding: 0.85rem 0.75rem;
  }
}
