:root {
  color-scheme: light;
  --bg: #f6f6f3;
  --surface: #ffffff;
  --surface-2: #f0f1ec;
  --ink: #151515;
  --muted: #666b70;
  --line: #d8d9d2;
  --accent: #b71d2a;
  --accent-2: #0c6758;
  --gold: #a8741a;
  --blue: #275a8d;
  --shadow: 0 18px 50px rgba(22, 23, 20, 0.08);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

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

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto minmax(190px, 1fr);
  align-items: center;
  gap: 20px;
  min-height: 68px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 246, 243, 0.94);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #171717;
  background: var(--ink);
  color: white;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 700;
}

.brand strong,
.brand em {
  display: block;
  line-height: 1.05;
  letter-spacing: 0;
}

.brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
}

.brand em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-transform: uppercase;
}

.topnav {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
}

.topnav a {
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.topnav a:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.small-button,
.full-button,
.ask-form button {
  border: 0;
  border-radius: 6px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.small-button {
  justify-self: end;
  padding: 10px 13px;
}

.small-button:hover,
.full-button:hover,
.ask-form button:hover {
  background: var(--accent);
}

.workspace {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
  padding: 18px;
}

.left-rail,
.right-rail {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 14px;
}

.rail-section,
.ask-card,
.answer-panel,
.section-grid {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.rail-section {
  padding: 16px;
}

.rail-section h2,
.section-heading h2,
.watch-grid h3 {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0;
}

.muted,
.section-heading p,
.rail-section p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.metric-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.metric-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.metric-list dt {
  color: var(--muted);
  font-size: 12px;
}

.metric-list dd {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

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

.question-chip {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.question-chip:hover {
  border-color: var(--ink);
  background: white;
}

.price-line {
  margin-top: 12px;
  padding: 10px;
  border-left: 3px solid var(--accent);
  background: #fbf5f5;
  font-size: 13px;
  font-weight: 800;
}

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

.ask-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
  padding: 24px;
}

.ask-copy h1 {
  max-width: 620px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 4vw, 58px);
  line-height: 0.98;
  letter-spacing: 0;
}

.ask-copy p {
  max-width: 560px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.ask-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: var(--radius);
}

.ask-form input {
  width: 100%;
  min-width: 0;
  padding: 14px 12px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}

.ask-form button {
  padding: 0 16px;
}

.answer-panel {
  scroll-margin-top: 86px;
  min-height: 360px;
  padding: 0;
  overflow: hidden;
}

.answer-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  background: #fcfcfa;
}

.answer-header h2 {
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 1.15;
}

.answer-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.answer-type {
  padding: 7px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.answer-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 20px;
}

.brief {
  display: grid;
  gap: 16px;
}

.brief-summary {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

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

.data-table th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.bar-list {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  gap: 5px;
}

.bar-row span {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  font-size: 12px;
  font-weight: 750;
}

.bar-row b {
  min-width: 0;
  overflow-wrap: anywhere;
}

.bar-row em {
  flex: 0 0 auto;
  text-align: right;
}

.bar-track {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-2);
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent-2);
}

.evidence-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.evidence-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
}

.evidence-card p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.evidence-card a {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.source-list {
  display: grid;
  gap: 10px;
}

.side-card {
  display: grid;
  gap: 12px;
  align-content: start;
}

.side-card h3 {
  margin: 0;
  font-size: 13px;
  text-transform: uppercase;
}

.section-grid {
  padding: 20px;
}

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

.section-heading p {
  max-width: 480px;
  margin: 0;
}

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

.topic-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fcfcfa;
  cursor: pointer;
}

.topic-card:hover {
  border-color: var(--ink);
}

.topic-card h3 {
  margin: 0;
  font-size: 16px;
}

.topic-card dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0;
}

.topic-card dt {
  color: var(--muted);
  font-size: 11px;
}

.topic-card dd {
  margin: 2px 0 0;
  font-weight: 800;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.rank-item button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue);
  cursor: pointer;
  font-weight: 800;
  text-align: left;
}

.rank-item span {
  color: var(--muted);
  white-space: nowrap;
}

.action-box {
  background: #151515;
  color: white;
}

.action-box p {
  color: #d8d9d2;
}

.full-button {
  width: 100%;
  padding: 12px 14px;
  background: white;
  color: var(--ink);
}

.proof-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.revenue-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.revenue-list span {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 750;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

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

  .right-rail {
    position: static;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}

@media (min-width: 1500px) {
  .ask-card {
    grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  }

  .answer-body {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

@media (max-width: 860px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .topnav {
    display: none;
  }

  .workspace {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .left-rail,
  .right-rail {
    position: static;
    grid-template-columns: 1fr;
  }

  .ask-card,
  .watch-grid,
  .topic-grid {
    grid-template-columns: 1fr;
  }

  .ask-form {
    grid-template-columns: 1fr;
  }

  .ask-form button {
    min-height: 44px;
  }
}

@media print {
  .topbar,
  .left-rail,
  .right-rail,
  .ask-card,
  .section-grid {
    display: none;
  }

  .workspace,
  .main-panel,
  .answer-body {
    display: block;
    padding: 0;
  }

  .answer-panel {
    box-shadow: none;
    border: 0;
  }
}
