@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-600-italic.woff2") format("woff2");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("/fonts/outfit-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("/fonts/outfit-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("/fonts/outfit-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --night: #140e0c;
  --night-2: #1c1210;
  --panel: rgba(42, 24, 18, 0.88);
  --panel-solid: #261610;
  --line: rgba(240, 180, 120, 0.2);
  --sand: #f6efe6;
  --muted: #e0cbb8;
  --fine: #d2bba6;
  --sun: #ff7a3c;
  --gold: #f0b45a;
  --rose: #e38b78;
  --cactus: #8fd0a4;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  --sidebar: 248px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--sand);
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(255, 122, 60, 0.28), transparent 60%),
    radial-gradient(700px 380px at 100% 0%, rgba(196, 92, 120, 0.16), transparent 55%),
    linear-gradient(180deg, #24140f 0%, var(--night) 38%, #120c0a 100%);
  background-attachment: fixed;
}

button, input, textarea { font: inherit; color: inherit; }

button { cursor: pointer; }

a { color: inherit; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--gold);
  color: #2a140c;
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 50;
}

.skip:focus { top: 12px; }

.shell {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px 18px;
  background: linear-gradient(180deg, #1a0f0c 0%, #100b09 100%);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow: auto;
}

.brand { display: flex; gap: 12px; align-items: center; padding: 0 6px; }

.mark { width: 48px; height: 48px; flex: none; filter: drop-shadow(0 0 12px rgba(255, 122, 60, 0.35)); }

.brand-kicker, .brand-sub, .eyebrow, .fine, .side-note {
  margin: 0;
  color: var(--fine);
}

.brand-kicker, .eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.brand-name {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.brand-sub { font-size: 13px; }

nav { display: flex; flex-direction: column; gap: 4px; }

nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid transparent;
}

nav a svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

nav a:hover { background: rgba(255, 122, 60, 0.08); color: var(--sand); }

nav a.is-active {
  color: #2a140c;
  background: linear-gradient(90deg, #ffb067, #ff7a3c);
  box-shadow: 0 0 22px rgba(255, 122, 60, 0.28);
}

.side-note { margin-top: auto; font-size: 13px; line-height: 1.45; padding: 0 6px; }

#who { margin-top: auto; }

.side-note + .side-note, #logout + .side-note { margin-top: 8px; }

#logout { width: 100%; }

nav a[hidden], button[hidden] { display: none !important; }

body.is-signed-out nav, body.is-signed-out #logout, body.is-signed-out #who { display: none; }

body.is-signed-out #logout + .side-note { margin-top: auto; }

.text-link { color: var(--gold); }

.live {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  font-size: 14px;
}

.live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.live-live { color: var(--cactus); }
.live-stale-amber { color: var(--gold); }
.live-stale-red { color: #ff8f73; }

.ship-list { list-style: none; margin: 0; padding: 0; }
.ship-list li { display: grid; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line); }
.ship-list span, .ship-list a { color: var(--fine); }

.choice-row .ghost.is-on { border-color: var(--gold); color: var(--gold); }

.badge-jeff { color: var(--gold); margin: 8px 0 0; }

.login-wrap { max-width: 34rem; }

label { display: block; margin: 12px 0 6px; }

input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(12, 7, 6, 0.45);
}

.topbar, .backdrop { display: none; }

.main {
  width: min(1120px, 100%);
  padding: 32px 28px 72px;
}

.hero h1, .page-head h1 {
  margin: 6px 0 8px;
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(42px, 6vw, 68px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-shadow: 0 0 28px rgba(255, 122, 60, 0.25);
}

.lede { margin: 0 0 18px; max-width: 40rem; color: var(--muted); font-size: 17px; line-height: 1.45; }

.banner {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(240, 180, 90, 0.28);
  background: rgba(240, 180, 90, 0.08);
  color: var(--muted);
  font-size: 14px;
}

.stack, .split, .stats, .team-grid { margin-top: 16px; }

.split { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 16px; align-items: start; }

.split-bots { grid-template-columns: 1.45fr 0.7fr; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 16px 14px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 220, 180, 0.06);
  backdrop-filter: blur(8px);
}

.card h2, .card h3, .page-head h1 { overflow-wrap: anywhere; }

.card h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.card-head, .bot-row-top, .form-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.card-head p { margin: 0; color: var(--gold); font-variant-numeric: tabular-nums; }

.attention-list, .file-list, .bounds { list-style: none; margin: 12px 0 0; padding: 0; }

.attention-list a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.attention-list span, .role, .fine { color: var(--fine); }

.role, .task, .fine, .recorded { margin: 6px 0 0; line-height: 1.45; }

.task { color: var(--sand); }

textarea {
  width: 100%;
  margin-top: 12px;
  min-height: 96px;
  resize: vertical;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(12, 7, 6, 0.45);
}

textarea:focus { outline: 2px solid var(--gold); border-color: transparent; }

button, .ghost {
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0 16px;
  background: linear-gradient(90deg, #ffb067, #ff7a3c);
  color: #2a140c;
  font-weight: 600;
}

.ghost, .btn-decline, .btn-later {
  background: transparent;
  color: var(--sand);
  border-color: var(--line);
}

.btn-decline { border-color: rgba(227, 139, 120, 0.7); color: #ffd2c6; }

.btn-later { border-color: rgba(240, 180, 90, 0.7); color: var(--gold); }

button:disabled { opacity: 0.6; cursor: wait; }

.form-row { margin-top: 10px; align-items: flex-start; }

.form-error { min-height: 1.2em; margin: 8px 0 0; color: #ffb1a1; }

.thread { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }

.note {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.note p { margin: 4px 0; line-height: 1.45; }

.note-from { color: var(--gold); font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }

.chip, .pill, .lead-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  letter-spacing: 0.03em;
  border: 1px solid var(--line);
}

.pill, .lead-tag { white-space: nowrap; flex: none; }

.chip { text-transform: none; letter-spacing: 0; color: var(--sand); margin-left: 6px; }

.lead-tag { margin-left: 8px; color: #2a140c; background: var(--gold); border: 0; }

.meter {
  margin-top: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  overflow: hidden;
}

.meter span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #c45c26, #ff7a3c 55%, #f0b45a);
  box-shadow: 0 0 16px rgba(255, 122, 60, 0.65);
}

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

.stat {
  text-align: left;
  border-radius: 18px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: var(--sand);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 104px;
}

.stat-label { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fine); }

.stat-value {
  font-family: "Fraunces", Georgia, serif;
  font-size: 40px;
  line-height: 1;
}

.stat-working .stat-value { color: #ffb088; text-shadow: 0 0 16px rgba(255, 122, 60, 0.45); }
.stat-waiting .stat-value { color: var(--muted); }
.stat-needs_approval .stat-value { color: var(--gold); text-shadow: 0 0 16px rgba(240, 180, 90, 0.35); }
.stat-problem .stat-value { color: #ff9b86; text-shadow: 0 0 16px rgba(227, 139, 120, 0.4); }

.stat.is-on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), var(--shadow); }

.bot-list { display: flex; flex-direction: column; }

.bot-row { padding: 14px 0; border-top: 1px solid var(--line); }

.bot-row:first-child { border-top: 0; padding-top: 4px; }

.bot-row h3, .team-card h2, .decision h3 { margin: 0; font-size: 18px; }

.verified { margin: 6px 0 0; color: var(--muted); font-variant-numeric: tabular-nums; }

.pill-working { color: #ffd0b8; border-color: rgba(255, 122, 60, 0.5); }
.pill-waiting { color: var(--muted); }
.pill-needs_approval { color: var(--gold); border-color: rgba(240, 180, 90, 0.55); }
.pill-problem { color: #ffb1a1; border-color: rgba(227, 139, 120, 0.7); }
.pill-task-done { color: var(--cactus); border-color: rgba(143, 208, 164, 0.5); }
.pill-task-blocked, .pill-task-open { color: var(--gold); }
.pill-task-doing { color: #ffd0b8; border-color: rgba(255, 122, 60, 0.5); }

.k { color: var(--gold); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; margin-right: 6px; }

.shop-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }

.shop-nums p { margin: 0; }

.shop-nums strong {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-size: 36px;
  color: var(--gold);
  text-shadow: 0 0 16px rgba(240, 180, 90, 0.3);
}

.shop-card .ghost, .shop-card button { margin-top: 12px; }

.shop-card { position: sticky; top: 18px; }

.page-head { margin-bottom: 8px; }

.decision-groups, .system-grid { display: flex; flex-direction: column; gap: 18px; }

.decision-groups h2, .report-title {
  margin: 8px 0;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.decision { margin-bottom: 12px; }

.decision p { line-height: 1.5; }

.choice-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }

.team-card.is-lead { border-color: rgba(255, 122, 60, 0.55); box-shadow: 0 0 24px rgba(255, 122, 60, 0.12), var(--shadow); }

.report { display: grid; gap: 8px; margin: 8px 0 0; }

.report div { padding-top: 8px; border-top: 1px solid var(--line); }

.report dt { color: var(--gold); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }

.report dd { margin: 4px 0 0; line-height: 1.45; }

.table-wrap { overflow-x: auto; }

table.tasks { width: 100%; border-collapse: collapse; margin-top: 8px; }

.tasks th, .tasks td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.4;
}

.tasks th { color: var(--gold); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }

.file-list li, .bounds li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.ok { color: var(--cactus); }
.bad { color: #ffb1a1; }

.empty { color: var(--muted); margin: 12px 0 0; }

.loading { color: var(--muted); font-size: 18px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

::selection { background: #ff7a3c; color: #2a140c; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 15;
    padding: 10px 14px;
    background: rgba(16, 10, 8, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
  }
  .topbar button { background: transparent; color: var(--sand); border-color: var(--line); }
  .topbar-title { font-family: "Fraunces", Georgia, serif; font-size: 20px; }
  .sidebar {
    position: fixed;
    z-index: 30;
    width: min(84vw, 320px);
    transform: translateX(-105%);
    transition: transform 160ms ease;
  }
  .sidebar.is-open { transform: none; }
  .backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(8, 4, 3, 0.62);
    z-index: 20;
  }
  .main { padding: 18px 14px 56px; }
  .split, .split-bots, .stats { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .shop-card { position: static; order: -1; }
  .split-bots { display: flex; flex-direction: column; }
}

@media (max-width: 720px) {
  .tasks thead { display: none; }
  .tasks, .tasks tbody, .tasks tr, .tasks td { display: block; width: 100%; }
  .tasks tr {
    margin-bottom: 12px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.18);
  }
  .tasks td {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 8px;
    padding: 8px 0;
    border: 0;
  }
  .tasks td::before {
    content: attr(data-label);
    color: var(--gold);
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
