:root {
  color-scheme: dark;
  --bg: oklch(14% 0.034 250);
  --shell: oklch(11% 0.025 250);
  --sidebar: oklch(12% 0.03 250);
  --panel: oklch(17% 0.04 250);
  --panel-2: oklch(21% 0.052 250);
  --line: oklch(34% 0.07 248);
  --line-soft: oklch(27% 0.055 250);
  --text: oklch(97% 0.01 250);
  --muted: oklch(76% 0.035 250);
  --muted-2: oklch(64% 0.04 250);
  --blue: oklch(57% 0.22 260);
  --cyan: oklch(78% 0.14 220);
  --blue-soft: oklch(48% 0.14 250);
  --blue-deep: oklch(28% 0.09 250);
  --green: oklch(72% 0.2 145);
  --yellow: oklch(84% 0.16 95);
  --red: oklch(65% 0.22 25);
  --radius: 12px;
  --radius-sm: 8px;
  --focus: 0 0 0 3px oklch(78% 0.14 220 / 38%);
  --font: "Aptos", "Segoe UI Variable", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  background:
    radial-gradient(circle at top left, oklch(45% 0.14 250 / 24%), transparent 38rem),
    radial-gradient(circle at bottom right, oklch(34% 0.1 240 / 18%), transparent 32rem),
    var(--bg);
}

button,
input,
select {
  font: inherit;
}

button,
select,
input {
  border-radius: var(--radius-sm);
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.app-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--shell);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100vh;
  min-height: 100vh;
  padding: 20px 18px;
  border-right: 1px solid var(--line-soft);
  background: var(--sidebar);
  overflow: auto;
  overscroll-behavior: contain;
}

.main-area {
  min-width: 0;
  padding: 24px;
  background:
    radial-gradient(circle at top left, oklch(33% 0.1 250 / 18%), transparent 28rem),
    oklch(10% 0.02 270);
}

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

.page-header h1 {
  max-width: none;
  margin: 0;
  font-size: 1.85rem;
  line-height: 1.15;
}

.page-subtitle {
  max-width: 68ch;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.data-notice {
  width: fit-content;
  margin: 12px 0 0;
  padding: 7px 10px;
  border: 1px solid oklch(84% 0.16 95 / 38%);
  border-radius: 8px;
  background: oklch(84% 0.16 95 / 10%);
  color: oklch(88% 0.13 95);
  font-size: .84rem;
  line-height: 1.4;
}

.header-stat {
  display: grid;
  gap: 5px;
  min-width: 170px;
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: oklch(15% 0.035 250);
}

.header-stat span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
}

.header-stat strong {
  font-size: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 10px;
  border: 1px solid oklch(78% 0.14 220 / 34%);
  background:
    radial-gradient(circle at 72% 24%, oklch(78% 0.14 220 / 30%), transparent 1.1rem),
    linear-gradient(145deg, oklch(20% 0.06 250), oklch(31% 0.12 250));
  color: white;
  font-weight: 800;
}

.logo-bars {
  display: flex;
  align-items: end;
  gap: 4px;
  height: 24px;
}

.logo-bars i {
  display: block;
  width: 6px;
  border-radius: 3px;
  background: var(--cyan);
}

.logo-bars i:nth-child(1) {
  height: 12px;
  background: oklch(78% 0.14 220);
}

.logo-bars i:nth-child(2) {
  height: 18px;
  background: oklch(68% 0.18 245);
}

.logo-bars i:nth-child(3) {
  height: 24px;
  background: oklch(57% 0.22 260);
}

.brand strong {
  display: block;
  font-size: 1.12rem;
  letter-spacing: 0;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: .82rem;
  margin-top: 2px;
}

.side-nav,
.filters {
  display: grid;
  gap: 9px;
  align-content: start;
}

.filters {
  grid-template-columns: 1fr;
  min-width: 0;
}

.filter-box {
  display: grid;
  gap: 12px;
  flex: 0 0 auto;
  min-height: 0;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: oklch(14% 0.034 250);
  overflow: visible;
}

.filter-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.filter-heading p {
  max-width: 24ch;
  margin: 3px 0 0;
  color: var(--muted-2);
  font-size: .8rem;
  line-height: 1.35;
}

.nav-label {
  margin: 4px 0 2px;
  color: var(--muted-2);
  font-size: .76rem;
  font-weight: 800;
}

label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 650;
}

.filter-wide {
  grid-column: 1 / -1;
}

.filters label small {
  display: block;
  margin-top: 6px;
  color: var(--muted-2);
  font-size: .75rem;
  line-height: 1.35;
}

.advanced-filters {
  grid-column: 1 / -1;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: oklch(13% 0.03 250);
}

.advanced-filters summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 11px;
  color: var(--text);
  cursor: pointer;
  font-size: .86rem;
  font-weight: 750;
}

.advanced-filters summary::marker {
  color: var(--cyan);
}

.advanced-grid {
  display: grid;
  gap: 9px;
  padding: 0 11px 11px;
}

select,
input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  background: oklch(15% 0.035 250);
  color: var(--text);
  padding: 0 11px;
}

input::placeholder {
  color: oklch(72% 0.035 250);
}

.search-field {
  min-width: 0;
}

.ghost-button {
  min-height: 40px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 0 14px;
  cursor: pointer;
}

.ghost-button.compact {
  min-height: 32px;
  padding: 0 10px;
  font-size: .82rem;
}

.ghost-button:hover {
  border-color: var(--cyan);
  background: oklch(22% 0.055 250);
}

.view-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  padding: 0 10px;
  cursor: pointer;
  font-weight: 750;
  text-align: left;
}

.view-tab:hover {
  color: var(--text);
  border-color: var(--cyan);
}

.view-tab.active {
  border-color: oklch(57% 0.16 250 / 46%);
  background: oklch(24% 0.08 250);
  color: var(--text);
}

.nav-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 7px;
  background: oklch(20% 0.055 250);
  color: var(--cyan);
  flex: 0 0 auto;
}

.nav-icon svg,
.card-icon svg,
.mini-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.sidebar-note {
  display: grid;
  gap: 6px;
  flex: 0 0 auto;
  margin-top: 0;
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: oklch(15% 0.035 250);
}

.sidebar-note strong {
  color: var(--text);
}

.sidebar-note span {
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.45;
}

main {
  display: grid;
  gap: 20px;
  margin-top: 0;
}

.view-panel {
  display: none;
}

.view-panel.active {
  display: grid;
  gap: 20px;
}

.answer-section {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, .6fr);
  gap: 20px;
  align-items: stretch;
}

.answer-copy,
.recommendation-panel,
.panel,
.metric-card,
.insight-band {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel);
}

.answer-copy {
  padding: clamp(26px, 4vw, 48px);
  background:
    radial-gradient(circle at 84% 18%, oklch(54% 0.15 240 / 20%), transparent 16rem),
    linear-gradient(135deg, oklch(18% 0.045 250), oklch(22% 0.07 245));
}

.section-kicker {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: .8rem;
  font-weight: 750;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(2.2rem, 4.4vw, 4.6rem);
  line-height: .96;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.25;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1rem;
}

.main-insight {
  max-width: 72ch;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.recommendation-panel {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 24px;
}

.panel-label {
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
}

#recommendedStack {
  font-size: 2.35rem;
  line-height: 1;
}

.score-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
}

.score-row b {
  color: var(--cyan);
  font-size: 1.5rem;
}

.meter {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: oklch(26% 0.06 250);
}

.meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transition: width 180ms ease-out;
}

.recommendation-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.decision-box {
  display: grid;
  gap: 10px;
  padding-top: 2px;
}

.decision-group {
  display: grid;
  gap: 7px;
}

.decision-group strong {
  color: var(--text);
  font-size: .9rem;
}

.decision-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.decision-list li,
.decision-alert {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: oklch(19% 0.04 250);
  color: var(--muted);
  padding: 9px 10px;
  font-size: .88rem;
  line-height: 1.4;
}

.decision-alert {
  border-color: oklch(84% 0.16 95 / 40%);
  background: oklch(84% 0.16 95 / 9%);
  color: oklch(86% 0.12 95);
}

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

.metric-card {
  min-height: 120px;
  padding: 18px 18px 16px;
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-icon,
.mini-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid oklch(57% 0.16 250 / 32%);
  border-radius: 8px;
  background: oklch(24% 0.065 250);
  color: var(--cyan);
  flex: 0 0 auto;
}

.metric-card span {
  color: var(--muted);
  font-size: .84rem;
  font-weight: 700;
}

.metric-card strong {
  display: block;
  margin-top: 13px;
  font-size: 1.7rem;
  line-height: 1.1;
}

.metric-card small {
  display: block;
  margin-top: 10px;
  color: var(--muted-2);
  line-height: 1.35;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr);
  gap: 20px;
}

.panel {
  min-width: 0;
  padding: 20px;
}

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

.panel-heading.compact {
  align-items: center;
}

.soft-pill,
.status-pill,
.trend-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  white-space: nowrap;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
}

.status-pill.good,
.trend-pill.up {
  border-color: oklch(72% 0.2 145 / 45%);
  color: var(--green);
}

.status-pill.warn,
.trend-pill.flat {
  border-color: oklch(84% 0.16 95 / 45%);
  color: var(--yellow);
}

.status-pill.risk,
.trend-pill.down {
  border-color: oklch(65% 0.22 25 / 45%);
  color: var(--red);
}

.ranking-list {
  display: grid;
  gap: 9px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 34px minmax(145px, 1fr) minmax(140px, 1.4fr) repeat(4, minmax(72px, .65fr)) 82px;
  gap: 12px;
  align-items: center;
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: oklch(19% 0.04 250);
  cursor: pointer;
  transition: background 160ms ease-out, border-color 160ms ease-out;
}

.ranking-row:hover,
.ranking-row.active {
  border-color: var(--cyan);
  background: oklch(22% 0.055 250);
}

.rank-number {
  color: var(--muted);
  font-weight: 800;
}

.stack-name strong,
.stack-name small {
  display: block;
}

.stack-name small {
  margin-top: 4px;
  color: var(--muted-2);
}

.bar-cell {
  display: grid;
  gap: 6px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}

.bar-track {
  height: 7px;
  border-radius: 999px;
  background: oklch(29% 0.055 250);
}

.bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.data-cell {
  color: var(--muted);
  font-size: .88rem;
}

.data-cell strong {
  display: block;
  color: var(--text);
  font-size: .95rem;
}

.stack-analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.analysis-item {
  min-height: 82px;
  padding: 13px;
  border-radius: 10px;
  background: oklch(19% 0.04 250);
}

.analysis-item span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}

.analysis-item strong {
  display: block;
  margin-top: 7px;
  font-size: 1rem;
}

.salary-range {
  margin-top: 16px;
}

.range-scale {
  position: relative;
  height: 38px;
  margin: 16px 0 8px;
}

.range-scale::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 16px;
  height: 8px;
  border-radius: 999px;
  background: oklch(29% 0.055 250);
}

.range-fill {
  position: absolute;
  top: 16px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.range-dot {
  position: absolute;
  top: 10px;
  width: 20px;
  height: 20px;
  transform: translateX(-50%);
  border: 4px solid var(--cyan);
  border-radius: 50%;
  background: var(--panel);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: .8rem;
}

.stack-verdict {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.analysis-list ul {
  display: grid;
  gap: 7px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.analysis-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  font-size: .9rem;
}

.analysis-list b {
  color: var(--cyan);
}

.insight-band {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(320px, 1.2fr);
  gap: 20px;
  padding: 22px;
}

.insight-band p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

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

.mini-insight {
  padding: 14px;
  border-radius: 10px;
  background: oklch(19% 0.04 250);
}

.mini-insight header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
}

.mini-insight strong {
  display: block;
}

.mini-insight span {
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.45;
}

.trend-layout {
  display: grid;
  gap: 16px;
}

.trend-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.trend-list {
  display: grid;
  gap: 8px;
}

.trend-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border-radius: 10px;
  background: oklch(19% 0.04 250);
}

.sparkline {
  width: 100%;
  height: 96px;
  overflow: visible;
}

.sparkline path {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sparkline circle {
  fill: var(--cyan);
}

.roadmap {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: roadmap;
}

.roadmap-source {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: oklch(19% 0.04 250);
}

.roadmap-source p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.roadmap-source strong {
  color: var(--text);
}

.roadmap-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 38px;
  border-radius: 8px;
  background: oklch(52% 0.18 255);
  color: white;
  padding: 0 13px;
  font-size: .9rem;
  font-weight: 750;
  text-decoration: none;
}

.roadmap-link:hover {
  background: oklch(58% 0.18 250);
}

.roadmap li {
  counter-increment: roadmap;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 11px;
  align-items: center;
  min-height: 54px;
  padding: 10px;
  border-radius: 10px;
  background: oklch(19% 0.04 250);
}

.roadmap li::before {
  content: counter(roadmap);
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: oklch(33% 0.11 255);
  color: var(--cyan);
  font-weight: 850;
}

.empty-state {
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  color: var(--muted);
  background: oklch(19% 0.04 250);
}

.assistant-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
}

.assistant-toggle {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 1px solid oklch(68% 0.13 230 / 55%);
  border-radius: 16px;
  background: linear-gradient(135deg, oklch(42% 0.13 255), oklch(34% 0.1 225));
  color: white;
  box-shadow: 0 18px 44px oklch(6% 0.02 250 / 52%);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.assistant-toggle:hover {
  transform: translateY(-2px);
  border-color: var(--cyan);
}

.assistant-toggle svg,
.assistant-close svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.assistant-panel {
  position: absolute;
  right: 0;
  bottom: 70px;
  display: grid;
  grid-template-rows: auto minmax(180px, 1fr) auto auto;
  width: min(390px, calc(100vw - 28px));
  max-height: min(620px, calc(100vh - 110px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: oklch(13% 0.032 250 / 96%);
  box-shadow: 0 24px 70px oklch(4% 0.02 250 / 72%);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(.98);
  transform-origin: bottom right;
  transition: opacity .18s ease, transform .18s ease;
}

.assistant-widget.open .assistant-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.assistant-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.assistant-header strong {
  display: block;
  font-size: .98rem;
}

.assistant-header span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.4;
}

.assistant-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.assistant-close:hover {
  color: var(--text);
  border-color: var(--line);
}

.assistant-messages {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  overflow: auto;
}

.assistant-message {
  max-width: 86%;
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  color: var(--text);
  background: oklch(18% 0.04 250);
  font-size: .9rem;
  line-height: 1.45;
}

.assistant-message-user {
  justify-self: end;
  border-color: oklch(58% 0.14 245 / 65%);
  background: oklch(28% 0.09 250);
}

.assistant-message-system {
  color: var(--muted);
}

.assistant-message-error {
  border-color: oklch(65% 0.22 25 / 55%);
  color: oklch(86% 0.09 25);
}

.assistant-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 12px;
}

.assistant-prompts button {
  min-height: 32px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: oklch(18% 0.04 250);
  color: var(--muted);
  padding: 0 10px;
  font-size: .78rem;
  cursor: pointer;
}

.assistant-prompts button:hover {
  color: var(--text);
  border-color: var(--cyan);
}

.assistant-form {
  display: grid;
  gap: 9px;
  padding: 14px;
  border-top: 1px solid var(--line-soft);
  background: oklch(11% 0.025 250);
}

.assistant-form label {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
}

.assistant-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 74px;
  max-height: 150px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: oklch(15% 0.035 250);
  color: var(--text);
  padding: 10px 11px;
  font: inherit;
}

.assistant-form textarea::placeholder {
  color: oklch(72% 0.035 250);
}

.assistant-form button {
  min-height: 40px;
  border: 1px solid oklch(58% 0.15 245 / 70%);
  border-radius: 10px;
  background: oklch(46% 0.15 250);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.assistant-form button:disabled {
  cursor: wait;
  opacity: .68;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .ghost-button {
    width: 100%;
  }

  .ranking-row {
    grid-template-columns: 34px minmax(145px, 1fr) minmax(140px, 1fr) repeat(2, minmax(72px, .65fr));
  }

  .ranking-row .hide-md {
    display: none;
  }
}

@media (max-width: 900px) {
  .app-shell {
    display: block;
    width: 100%;
    min-height: auto;
    margin: 0;
    overflow: visible;
  }

  .sidebar {
    position: static;
    height: auto;
    min-height: 0;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
    overflow: visible;
  }

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

  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .advanced-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-heading p {
    max-width: 42ch;
  }

  .page-header {
    display: grid;
  }

  .answer-section,
  .workspace-grid,
  .insight-band {
    grid-template-columns: 1fr;
  }

  .mini-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .side-nav,
  .metrics-grid,
  .stack-analysis-grid,
  .trend-columns {
    grid-template-columns: 1fr;
  }

  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .advanced-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .answer-copy,
  .recommendation-panel,
  .panel,
  .insight-band {
    padding: 16px;
  }

  .sidebar,
  .main-area {
    padding: 14px;
  }

  .filter-box {
    padding: 12px;
  }

  .filter-heading {
    display: grid;
  }

  .ghost-button.compact {
    width: 100%;
  }

  h1 {
    font-size: 2.35rem;
  }

  .ranking-row {
    grid-template-columns: 30px 1fr;
    align-items: start;
  }

  .ranking-row > *:not(.rank-number):not(.stack-name) {
    grid-column: 2;
  }

  #recommendedStack {
    font-size: 2rem;
  }

  .assistant-widget {
    right: 14px;
    bottom: 14px;
  }

  .assistant-panel {
    bottom: 66px;
  }
}

@media (max-width: 360px) {
  .filters,
  .advanced-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
