/* AlphAgentic Tools — unified design system (calm brain surface) */
:root {
  --bg: #07080c;
  --panel: rgba(16, 18, 26, 0.78);
  --panel-solid: #10121a;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --text: #eef0f5;
  --muted: #8b92a5;
  --faint: #5c6478;
  --accent: #c4a882;
  --accent-2: #7a9bb8;
  --gold: #d4b56a;
  --ok: #6fbf9a;
  --warn: #c9a66b;
  --bad: #c47a7a;
  --font-display: "Satoshi", "Space Grotesk", system-ui, sans-serif;
  --font-body: "Satoshi", "Inter", system-ui, sans-serif;
  --font-mono: "Space Grotesk", ui-monospace, monospace;
  --r: 16px;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --max: 1120px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}
body {
  background:
    radial-gradient(900px 480px at 72% -5%, rgba(122, 155, 184, 0.11), transparent 55%),
    radial-gradient(700px 400px at 8% 100%, rgba(196, 168, 130, 0.06), transparent 50%),
    #07080c;
  -webkit-font-smoothing: antialiased;
}
button, select, input { font: inherit; color: inherit; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: rgba(196, 168, 130, 0.35); color: #fff; }

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 3.5rem;
}

/* shared top nav */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.85rem 0 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.site-nav .brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-right: auto;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.site-nav .brand:hover { text-decoration: none; }
.site-nav .brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: #000;
}
.site-nav .brand small {
  display: block;
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.site-nav a:not(.brand) {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
}
.site-nav a:not(.brand):hover,
.site-nav a:not(.brand).on {
  color: var(--text);
  border-color: var(--line);
  text-decoration: none;
}

.pill {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  color: var(--faint);
}
.pill.live {
  color: var(--ok);
  border-color: rgba(111, 191, 154, 0.35);
}
.pill.live::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  margin-right: 0.4rem;
  box-shadow: 0 0 8px var(--ok);
}

.page-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.8vw, 2.5rem);
  letter-spacing: -0.04em;
  line-height: 1.08;
}
.lede {
  margin: 0 0 1.4rem;
  color: var(--muted);
  max-width: 58ch;
  line-height: 1.55;
  font-size: 0.95rem;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  backdrop-filter: blur(16px);
  padding: 1.1rem 1.2rem;
}
.panel h2, .panel h3 {
  margin: 0 0 0.15rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}
.panel .sub {
  margin: 0 0 0.9rem;
  font-size: 0.72rem;
  color: var(--faint);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}
@media (max-width: 720px) {
  .card-grid { grid-template-columns: 1fr; }
}
.card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.15rem 1.2rem;
  background: var(--panel);
  backdrop-filter: blur(16px);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.card:hover {
  border-color: rgba(196, 168, 130, 0.4);
  transform: translateY(-2px);
  text-decoration: none;
}
.card .k {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: var(--text);
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}
.card .go {
  margin-top: 0.85rem;
  font-size: 0.82rem;
  color: var(--accent-2);
  font-weight: 600;
}

.btn, .ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover, .ghost:hover {
  color: var(--text);
  border-color: var(--line-2);
  text-decoration: none;
}
.btn.primary, .ghost.primary {
  background: linear-gradient(135deg, rgba(196, 168, 130, 0.2), rgba(122, 155, 184, 0.15));
  color: var(--text);
  border-color: rgba(196, 168, 130, 0.35);
  font-weight: 600;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}
@media (max-width: 720px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
.kpi {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  padding: 0.75rem 0.85rem;
}
.kpi label {
  display: block;
  font-size: 0.65rem;
  color: var(--faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  margin-bottom: 0.3rem;
}
.kpi b {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.kpi span { font-size: 0.72rem; color: var(--muted); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
th {
  text-align: left;
  font-weight: 500;
  color: var(--faint);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  padding: 0.4rem;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 0.6rem 0.4rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
td.n { color: var(--text); font-weight: 500; }
tr:last-child td { border-bottom: 0; }

.tag {
  display: inline-flex;
  font-size: 0.68rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.tag.ok { color: var(--ok); border-color: rgba(111, 191, 154, 0.3); }
.tag.warn { color: var(--warn); border-color: rgba(201, 166, 107, 0.3); }
.tag.bad { color: var(--bad); border-color: rgba(196, 122, 122, 0.3); }

.bars { display: grid; gap: 0.5rem; }
.bar-row {
  display: grid;
  grid-template-columns: 90px 1fr 44px;
  gap: 0.5rem;
  align-items: center;
}
.bar-row span { font-size: 0.78rem; color: var(--muted); }
.bar-row em {
  font-style: normal;
  font-size: 0.72rem;
  color: var(--faint);
  font-family: var(--font-mono);
  text-align: right;
}
.track {
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.track i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  width: 0;
  transition: width 1s var(--ease);
}

.file-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  background: var(--panel);
  margin-bottom: 0.65rem;
}
.file-row h2 { margin: 0; font-size: 1rem; font-weight: 600; letter-spacing: -0.02em; }
.file-row p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.82rem; }

.note {
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.74rem;
  color: var(--faint);
  line-height: 1.5;
}
.note strong { color: var(--muted); font-weight: 500; }

.site-foot {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.7rem;
  color: var(--faint);
  font-family: var(--font-mono);
}

/* apply-specific layout using same tokens */
.apply-stage {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 0.85rem;
  min-height: 0;
}
@media (max-width: 960px) {
  .apply-stage { grid-template-columns: 1fr; }
}
.rail {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  backdrop-filter: blur(16px);
  padding: 0.9rem;
  max-height: calc(100vh - 140px);
  overflow: auto;
}
.rail-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0.4rem 0 0.65rem;
}
.rail-head h2 {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.rail-head span { font-size: 0.72rem; color: var(--faint); font-family: var(--font-mono); }

.pick {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  padding: 0.8rem 0.9rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.pick:hover { border-color: rgba(196, 168, 130, 0.35); transform: translateX(2px); }
.pick.on {
  border-color: rgba(196, 168, 130, 0.5);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.pick .rank {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.25rem;
}
.pick .title { font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.2rem; }
.pick .why {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pick .fitrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--faint);
}
.pick .bar {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.pick .bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
}

.job-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
}
.job {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.5rem 0.55rem;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  text-align: left;
  font-size: 0.74rem;
  color: var(--muted);
}
.job:hover, .job.rec { color: var(--text); border-color: rgba(196, 168, 130, 0.35); }
.job .jt { display: block; font-weight: 600; font-size: 0.78rem; }
.job .jp { font-family: var(--font-mono); font-size: 0.6rem; color: var(--accent); margin-top: 0.15rem; }

.dossier { min-height: 0; }
.hero-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  align-items: center;
  margin-bottom: 0.85rem;
}
.hero-panel img {
  width: 88px;
  height: 88px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid var(--line-2);
}
.hero-panel .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.35rem;
}
.hero-panel h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 1.9rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
  font-weight: 600;
}
.hero-panel .sub {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 52ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.bullet {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0.75rem;
  border-left: 2px solid rgba(196, 168, 130, 0.4);
  padding: 0.35rem 0 0.35rem 0.75rem;
  margin-bottom: 0.45rem;
}
.bullet b {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-2);
  font-weight: 500;
}
.bullet span { color: var(--muted); font-size: 0.9rem; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.55rem;
}
.shot {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
  aspect-ratio: 16 / 10;
  position: relative;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.shot.in { opacity: 1; transform: none; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.4rem 0.55rem;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}

.present {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
}
.present.on { display: grid; }
.present-card {
  width: min(880px, calc(100% - 2rem));
  min-height: min(60vh, 480px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel-solid);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  display: grid;
  align-content: center;
  gap: 0.9rem;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
}
.present-card .k {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.present-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  max-width: 14ch;
}
.present-card p, .present-card li { color: var(--muted); font-size: 1.02rem; max-width: 48ch; }
.present-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.25rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  align-items: center;
}
.present-nav .dot {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--line-2);
  border: 0;
  padding: 0;
  cursor: pointer;
}
.present-nav .dot.on { width: 20px; background: var(--accent); }

.hud-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.hud-actions label {
  font-size: 0.72rem;
  color: var(--faint);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.hud-actions select {
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  color: var(--text);
}

@media print {
  .site-nav, .present, .hero-actions, .no-print { display: none !important; }
  body { background: #fff; color: #111; }
  .panel, .card, .hero-panel, .rail { background: #fff; border-color: #ddd; backdrop-filter: none; }
}
