:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --panel: #ffffff;
  --panel-soft: #f1f3ee;
  --ink: #18201f;
  --muted: #5d6965;
  --line: #d8ddd6;
  --navy: #1d3557;
  --teal: #0f766e;
  --gold: #9a6b13;
  --red: #a33a33;
  --indigo: #5252a3;
  --green: #4f7d44;
  --shadow: 0 18px 50px rgba(24, 32, 31, 0.08);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
}

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

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

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

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

.brand-block {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 1.18rem;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.55rem;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.04rem;
}

h4 {
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  border-color: var(--line);
  background: var(--panel);
  color: var(--ink);
}

.nav-glyph {
  width: 28px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--panel-soft);
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 800;
}

.sidebar-note {
  margin-top: auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e2d3a8;
  border-radius: var(--radius);
  background: #fff8e6;
  color: #4a3921;
  font-size: 0.86rem;
  line-height: 1.4;
}

.sidebar-note p {
  margin: 0;
}

.status-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--green);
}

.status-dot.warn {
  background: var(--gold);
}

.status-dot.risk {
  background: var(--red);
}

.main-panel {
  min-width: 0;
  padding: 24px 28px 34px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.topbar-actions,
.button-row,
.filter-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.primary-button,
.ghost-button,
.tool-button,
.model-chip,
.filter-chip {
  min-height: 38px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  white-space: nowrap;
}

.primary-button {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
  font-weight: 700;
}

.ghost-button,
.tool-button,
.model-chip,
.filter-chip {
  background: var(--panel);
  color: var(--ink);
}

.tool-button:hover,
.model-chip:hover,
.filter-chip:hover,
.ghost-button:hover {
  border-color: #aeb7af;
}

.model-chip.active,
.filter-chip.active {
  border-color: var(--teal);
  background: #e8f6f2;
  color: #064e48;
}

.notice-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.notice {
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.notice.strong {
  border-color: #d7bf7a;
  background: #fff8e6;
}

.notice-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.notice strong,
.notice span:last-child {
  display: block;
}

.notice strong {
  margin-bottom: 4px;
}

.notice span:last-child {
  color: var(--muted);
  font-size: 0.9rem;
}

.view-root {
  display: grid;
  gap: 16px;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items: stretch;
}

.hero-copy,
.media-panel,
.panel,
.metric-card,
.response-card,
.control-row,
.task-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 24px;
}

.hero-copy h3 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: 2rem;
  line-height: 1.08;
}

.lead {
  max-width: 780px;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.55;
}

.media-panel {
  overflow: hidden;
  min-height: 280px;
}

.media-panel img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  display: block;
}

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

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

.metric-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.55rem;
}

.metric-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.panel {
  padding: 18px;
}

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

.panel-header p {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

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

.capability-list,
.plain-list,
.task-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.capability-list li,
.plain-list li {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfa;
}

.capability-list strong,
.plain-list strong {
  display: flex;
  gap: 8px;
  align-items: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #edf1f4;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 800;
}

.tag.ready {
  background: #e8f4e6;
  color: #2f5d2b;
}

.tag.warn {
  background: #fff1cf;
  color: #67440a;
}

.tag.risk {
  background: #fde8e4;
  color: #84251f;
}

.tag.value {
  background: #eeeafd;
  color: #40368b;
}

.architecture-map {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  align-items: stretch;
}

.arch-node {
  min-height: 110px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfa;
}

.arch-node strong {
  display: block;
  margin-bottom: 8px;
}

.arch-node span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.workbench-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  gap: 16px;
}

.prompt-box textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfa;
  color: var(--ink);
}

.context-stack {
  display: grid;
  gap: 8px;
}

.context-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfa;
}

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

.response-card {
  min-height: 196px;
  padding: 14px;
}

.response-card h4 {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.response-card p {
  color: var(--muted);
  line-height: 1.5;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.91rem;
}

.data-table th,
.data-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: #34403c;
  background: #f3f5f1;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.control-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.35fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  box-shadow: none;
}

.meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7e3;
}

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

.chart-stack {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 140px 1fr 52px;
  gap: 10px;
  align-items: center;
}

.bar {
  height: 12px;
  border-radius: 999px;
  background: #e5e7e3;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--green);
}

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

.task-column {
  display: grid;
  align-content: start;
  gap: 10px;
}

.task-column h4 {
  margin-bottom: 0;
  padding: 10px 0;
  border-bottom: 2px solid var(--line);
}

.task-card {
  padding: 12px;
  box-shadow: none;
}

.task-card p {
  margin-bottom: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.small-meta {
  color: var(--muted);
  font-size: 0.83rem;
}

.domain-box {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfa;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.86rem;
  overflow-x: auto;
}

.visual-proof {
  margin: 0;
}

.visual-proof img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.visual-proof figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

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

  .nav-item {
    justify-content: center;
  }

  .notice-row,
  .hero-panel,
  .two-col,
  .workbench-grid,
  .task-board {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .three-col,
  .architecture-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .main-panel,
  .sidebar {
    padding: 16px;
  }

  .topbar,
  .panel-header,
  .control-row {
    display: grid;
  }

  .nav-list,
  .metric-grid,
  .three-col,
  .architecture-map,
  .response-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h3 {
    font-size: 1.55rem;
  }

  .bar-row {
    grid-template-columns: 1fr;
  }
}
