:root {
  color-scheme: dark;
  --bg: #071016;
  --panel: #101a22;
  --panel-strong: #17232d;
  --line: rgba(255, 255, 255, 0.12);
  --muted: #8b9aa7;
  --text: #f6f8f6;
  --blue: #79a8c6;
  --green: #7fc29b;
  --gold: #d6a95b;
  --red: #df765e;
  --paper: #f5f1e7;
  --ink: #111820;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at top left, rgba(121, 168, 198, 0.18), transparent 28%),
    linear-gradient(135deg, #05090d 0%, var(--bg) 46%, #0f1a22 100%);
  color: var(--text);
  font-family: "Instrument Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
textarea,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 18px;
  min-height: 100svh;
  padding: 18px;
}

.rail {
  position: sticky;
  top: 18px;
  align-self: start;
  display: grid;
  gap: 16px;
}

.home-link,
.rail-card,
.identity-card,
.panel,
.hero {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 26, 34, 0.86);
  box-shadow: var(--shadow);
}

.home-link {
  display: inline-flex;
  width: fit-content;
  min-height: 38px;
  align-items: center;
  padding: 0 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.identity-card,
.rail-card,
.panel,
.hero {
  padding: 22px;
}

.identity-card {
  display: grid;
  gap: 18px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 900;
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 220px;
  font-size: 1.55rem;
  line-height: 1.05;
}

h2 {
  max-width: 880px;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(3.2rem, 7vw, 7rem);
  font-weight: 400;
  line-height: 0.92;
}

h3 {
  margin-top: 6px;
  font-size: 1.25rem;
}

p {
  color: var(--muted);
  line-height: 1.65;
}

.rail-nav {
  display: grid;
  gap: 8px;
}

.rail-nav a {
  min-height: 44px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.84);
  padding: 0 14px;
  font-weight: 800;
}

.rail-card strong {
  display: block;
  margin: 7px 0 9px;
  font-size: 1rem;
}

.workspace {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: end;
  min-height: 360px;
  background:
    linear-gradient(135deg, rgba(121, 168, 198, 0.12), transparent 38%),
    rgba(16, 26, 34, 0.9);
}

.hero p:not(.overline) {
  max-width: 720px;
  margin-top: 22px;
}

.overline,
.eyebrow {
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.score-card {
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: 20px;
}

.score-card span {
  display: block;
  color: #516171;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.score-card strong {
  display: block;
  margin-top: 10px;
  font-size: 4.2rem;
  line-height: 0.9;
}

.score-card small {
  display: block;
  margin-top: 12px;
  color: #516171;
  line-height: 1.45;
}

.meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(17, 24, 32, 0.12);
  margin-top: 18px;
}

.meter div {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transition: width 220ms ease;
}

.dashboard-grid,
.proof-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.72fr);
  gap: 18px;
}

.panel {
  min-width: 0;
}

.panel-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.ghost-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  padding: 0 12px;
  font-weight: 800;
}

.module-list,
.radar-list,
.pipeline,
.artifact-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.module-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
}

.module-row input,
.artifact-list input {
  accent-color: var(--green);
}

.module-row strong,
.artifact-list span {
  display: block;
  color: #fff;
  font-weight: 800;
}

.module-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.status-pill {
  border-radius: 999px;
  background: rgba(121, 168, 198, 0.12);
  color: var(--blue);
  padding: 7px 9px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.skill-row {
  display: grid;
  gap: 7px;
}

.skill-row div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #fff;
  font-weight: 800;
}

.skill-meter {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.skill-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
}

.artifact-list label {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.badge-button,
.counter-row button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  padding: 0 13px;
  font-weight: 800;
}

.badge-button.active {
  border-color: rgba(214, 169, 91, 0.78);
  background: rgba(214, 169, 91, 0.16);
  color: #ffe0a5;
}

.badge-detail,
.muted-copy {
  margin-top: 16px;
}

.pipeline-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 14px;
}

.pipeline-item div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.pipeline-item strong {
  color: #fff;
}

.pipeline-item span {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.counter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

.counter-row button {
  width: 42px;
  border-radius: 8px;
}

.counter-row strong {
  min-width: 80px;
  color: #fff;
  font-size: 4rem;
  line-height: 1;
  text-align: center;
}

.week-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.58fr) minmax(360px, 1fr);
  gap: 20px;
  align-items: start;
}

textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  padding: 16px;
  line-height: 1.55;
}

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

@media (max-width: 980px) {
  .app-shell,
  .hero,
  .dashboard-grid,
  .proof-grid,
  .week-panel {
    grid-template-columns: 1fr;
  }

  .rail {
    position: static;
  }

  .rail-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 10px;
  }

  .identity-card,
  .rail-card,
  .panel,
  .hero {
    padding: 16px;
  }

  h2 {
    font-size: clamp(3rem, 17vw, 4.4rem);
  }

  .hero {
    min-height: auto;
  }

  .rail-nav {
    grid-template-columns: 1fr 1fr;
  }

  .module-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .status-pill {
    grid-column: 2;
    width: fit-content;
  }
}
