:root {
  color-scheme: dark;
  --bg: #090b10;
  --panel: #111722;
  --panel-2: #151d29;
  --line: #2a3443;
  --text: #f4efe5;
  --muted: #a8b0bd;
  --gold: #d7b56d;
  --cyan: #6fcbe8;
  --green: #76d391;
  --warn: #e3bd67;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

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

.shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: #0c1119;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rail > a:not(.brand) {
  border-left: 2px solid transparent;
  color: var(--muted);
  padding: 11px 10px;
}

.rail > a:not(.brand):hover,
.rail > a:not(.brand):focus-visible {
  border-left-color: var(--gold);
  color: var(--text);
  outline: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.eyebrow,
.quick-card span,
.quick-card small {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.panel,
.quick-card,
.cards article {
  border: 1px solid var(--line);
  background: var(--panel);
}

.workspace {
  padding: 28px;
  display: grid;
  gap: 24px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  align-items: center;
  gap: 28px;
  min-height: min(620px, calc(100vh - 56px));
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  max-width: 860px;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: 0.95;
  margin: 10px 0 18px;
}

.hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-art {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
}

.actions,
.study-row,
.output-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.button {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  padding: 11px 16px;
  cursor: pointer;
  font: inherit;
}

.button.primary {
  border-color: color-mix(in srgb, var(--gold), white 10%);
  background: #2b2415;
  color: var(--gold);
}

.panel {
  padding: 22px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.quick-card {
  min-height: 150px;
  padding: 18px;
  display: grid;
  align-content: space-between;
  gap: 12px;
}

.quick-card strong {
  font-size: 1.35rem;
}

.quick-card:hover,
.quick-card:focus-visible {
  border-color: color-mix(in srgb, var(--gold), white 12%);
  outline: none;
}

.study-form {
  display: grid;
  gap: 10px;
}

.study-form label {
  color: var(--muted);
}

.study-row input {
  flex: 1;
  min-width: min(100%, 320px);
  border: 1px solid var(--line);
  background: #0c1119;
  color: var(--text);
  padding: 12px;
  font: inherit;
}

.study-output {
  margin-top: 16px;
  color: var(--muted);
}

.study-output ol {
  margin: 10px 0 0;
  padding-left: 22px;
  color: var(--text);
}

.output-actions {
  margin-top: 14px;
}

.cards article {
  padding: 18px;
}

.section-heading h2 {
  margin-top: 6px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.cards article {
  min-height: 190px;
  display: grid;
  gap: 10px;
}

.tool-status {
  width: fit-content;
  border: 1px solid var(--line);
  padding: 4px 8px;
  color: var(--cyan);
  text-transform: uppercase;
  font-size: 0.78rem;
}

.tool-status.available {
  color: var(--green);
}

.tool-status.account_required {
  color: var(--warn);
}

.cards p {
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 900px) {
  .shell,
  .hero,
  .quick-grid,
  .cards {
    grid-template-columns: 1fr;
  }

  .rail {
    position: static;
    height: auto;
  }

  .workspace {
    padding: 18px;
  }

  .hero {
    min-height: auto;
    padding-bottom: 24px;
  }
}
