:root {
  color-scheme: light;
  --ink: #0f172a;
  --navy: #1e293b;
  --muted: #64748b;
  --line: #d8e0e8;
  --surface: #f8fafc;
  --paper: #f7f3ea;
  --panel: #ffffff;
  --teal: #0d9488;
  --green: #1e5a4b;
  --mint: #7dbe9b;
  --orange: #ea580c;
  --violet: #4c3f91;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
  --paper-shadow: 0 18px 46px rgba(84, 64, 36, 0.12);
  --radius: 8px;
  font-family: Avenir, "Century Gothic", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-theme="brief"] {
  --theme: var(--teal);
  --theme-dark: var(--navy);
  --theme-soft: #e8f5f2;
  --theme-paper: #f7f3ea;
}

body[data-theme="foresight"] {
  --theme: var(--green);
  --theme-dark: var(--green);
  --theme-soft: #e9f4ee;
  --theme-paper: #f4f8ee;
}

body[data-theme="vault"] {
  --theme: var(--orange);
  --theme-dark: var(--navy);
  --theme-soft: #fff0e8;
  --theme-paper: #fff7f0;
}

body[data-theme="canvas"] {
  --theme: var(--violet);
  --theme-dark: #2b254f;
  --theme-soft: #f0edf8;
  --theme-paper: #f9f6ff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  overflow-x: clip;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 54px);
  background: rgba(248, 250, 252, 0.93);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  text-decoration: none;
}

.brand img {
  width: 128px;
  height: auto;
}

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

.brand strong {
  font-size: 16px;
  line-height: 1.1;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.nav a {
  text-decoration: none;
}

.nav a:hover {
  color: var(--ink);
}

.chooser {
  min-height: calc(100vh - 73px);
  display: grid;
  grid-template-columns: minmax(560px, 0.95fr) minmax(520px, 1.05fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  padding: clamp(28px, 4vw, 54px) clamp(18px, 5vw, 72px);
  background:
    linear-gradient(135deg, rgba(247, 243, 234, 0.92), rgba(248, 250, 252, 0.72) 42%, rgba(232, 245, 242, 0.8)),
    var(--surface);
}

.chooser > * {
  min-width: 0;
  max-width: 100%;
}

.kicker,
.rail-label {
  display: block;
  margin: 0 0 12px;
  color: var(--theme);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1,
h2,
.tile-title,
.login-body h3,
.workspace-center h3,
.depth-main h3 {
  font-family: Cambria, ui-serif, Georgia, "Times New Roman", serif;
}

h1 {
  max-width: 860px;
  margin-bottom: 20px;
  font-size: clamp(44px, 4.2vw, 66px);
  line-height: 1;
  letter-spacing: 0;
  text-wrap: balance;
  overflow-wrap: normal;
  hyphens: manual;
}

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

.decision-bar {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
  max-width: 760px;
  margin-top: 20px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

.decision-bar div {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius);
}

.decision-bar span {
  color: var(--navy);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.decision-bar strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
}

.decision-action {
  min-height: 48px;
  align-self: stretch;
  padding: 0 16px;
  border: 1px solid var(--theme-dark);
  border-radius: var(--radius);
  background: var(--theme-dark);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.recommendation-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(260px, 0.8fr);
  gap: 18px;
  max-width: 760px;
  margin-top: 24px;
  padding: 18px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(247, 243, 234, 0.9)),
    #fff;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-left: 5px solid var(--theme);
  border-radius: var(--radius);
  box-shadow: var(--paper-shadow);
}

.recommendation-copy {
  display: grid;
  gap: 9px;
}

.recommendation-copy span,
.brief-strip span {
  color: var(--theme);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.recommendation-copy strong {
  max-width: 390px;
  color: var(--ink);
  font-family: Cambria, ui-serif, Georgia, "Times New Roman", serif;
  font-size: 25px;
  line-height: 1.05;
}

.recommendation-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.recommendation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recommendation-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--theme-dark);
  border-radius: var(--radius);
  background: #fff;
  color: var(--theme-dark);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.recommendation-action.primary {
  background: var(--theme-dark);
  color: #fff;
}

.recommendation-action.secondary {
  background: transparent;
}

.recommendation-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.recommendation-list strong {
  color: var(--ink);
}

.explain-card,
.terms-card {
  max-width: 680px;
  margin-top: 16px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.explain-card > span,
.terms-card > span {
  display: block;
  margin-bottom: 12px;
  color: var(--theme);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.explain-grid article {
  min-width: 0;
  padding: 12px;
  background: var(--surface);
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: var(--radius);
}

.explain-grid strong,
.terms-card dt {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.explain-grid p,
.terms-card dd {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.terms-card dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.terms-card div {
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
}

.terms-card div:first-child {
  padding-top: 0;
  border-top: none;
}

.brief-strip,
.data-chipset {
  display: grid;
  gap: 5px;
  max-width: 560px;
  margin-top: 24px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-left: 5px solid var(--theme);
  border-radius: var(--radius);
}

.brief-strip {
  margin-top: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(247, 243, 234, 0.86)),
    var(--paper);
  box-shadow: 0 10px 28px rgba(84, 64, 36, 0.08);
}

.data-chipset span,
.source-badge span,
.input-card span {
  color: var(--theme);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.data-chipset strong,
.brief-strip strong,
.source-badge strong,
.input-card strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}

.data-chipset small,
.brief-strip small,
.source-badge small {
  color: var(--muted);
  line-height: 1.35;
}

.chooser-options {
  grid-column: 2;
  display: grid;
  gap: 14px;
  align-self: start;
  min-width: 0;
  width: 100%;
}

.chooser-details {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
  gap: 16px;
  align-items: start;
}

.chooser-details .explain-card,
.chooser-details .terms-card {
  max-width: none;
  margin-top: 0;
}

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

.mosaic-copy {
  display: grid;
  gap: 5px;
  max-width: none;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.mosaic-copy span {
  color: var(--theme);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.mosaic-copy strong {
  font-size: 16px;
}

.mosaic-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.style-tile {
  min-height: 218px;
}

.style-tile button {
  position: relative;
  overflow: clip;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(54px, 1fr);
  gap: 7px;
  width: 100%;
  height: 100%;
  min-height: 218px;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: var(--radius);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

.style-tile button:hover,
.style-tile.selected button {
  transform: translateY(-2px);
  border-color: var(--theme-dark);
  box-shadow: var(--shadow);
}

.style-tile.selected button::before {
  content: "Anbefalet";
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--theme-dark);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.tile-brief button {
  background: linear-gradient(140deg, #fffaf0 0%, #ffffff 46%, #e8f5f2 100%);
}

.tile-foresight button {
  background: radial-gradient(circle at 85% 15%, rgba(125, 190, 155, 0.45), transparent 28%), #f4f8ee;
}

.tile-vault button {
  background: linear-gradient(140deg, #101827 0%, #1e293b 48%, #fff0e8 49%, #ffffff 100%);
  color: #fff;
}

.tile-vault .tile-copy,
.tile-vault .tile-number {
  color: rgba(255, 255, 255, 0.78);
}

.tile-canvas button {
  background:
    linear-gradient(90deg, rgba(76, 63, 145, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(76, 63, 145, 0.12) 1px, transparent 1px),
    #f9f6ff;
  background-size: 32px 32px;
}

.tile-number {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.tile-title {
  font-size: clamp(27px, 2.6vw, 36px);
  line-height: 0.98;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.tile-copy {
  max-width: 330px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.tile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.tile-tags b {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--theme-dark);
  font-size: 11px;
  font-family: Avenir, "Century Gothic", ui-sans-serif, system-ui, sans-serif;
  font-weight: 900;
  text-transform: uppercase;
}

.tile-vault .tile-tags b {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.tile-preview {
  align-self: end;
  width: 100%;
  min-height: 66px;
  display: grid;
  gap: 6px;
  margin-top: 4px;
}

.tile-preview i {
  display: block;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.memo-preview {
  grid-template-columns: 1.1fr 0.9fr;
  grid-template-rows: 18px 1fr 16px;
}

.memo-preview i:first-child {
  grid-column: span 2;
  background: var(--navy);
}

.memo-preview i:nth-child(2) {
  grid-row: span 2;
}

.map-preview {
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
}

.map-preview i:first-child {
  grid-column: 1 / 4;
  background: var(--green);
}

.map-preview i:nth-child(2) {
  grid-column: 3 / 5;
  grid-row: 2 / 4;
  background: var(--mint);
}

.vault-preview {
  grid-template-columns: 0.8fr 1.2fr;
  grid-template-rows: repeat(3, 1fr);
}

.vault-preview i {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.28);
}

.vault-preview i:first-child {
  grid-row: span 3;
  background: rgba(234, 88, 12, 0.92);
}

.canvas-preview {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

.canvas-preview i:nth-child(odd) {
  background: rgba(76, 63, 145, 0.16);
}

.prototype,
.depth,
.decision {
  padding: clamp(44px, 7vw, 84px) clamp(18px, 5vw, 72px);
}

.prototype {
  background: #fff;
  border-top: 1px solid var(--line);
}

.prototype[hidden] {
  display: none;
}

.prototype-head,
.depth-head {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-bottom: 28px;
}

.prototype-head h2,
.depth-head h2,
.decision h2 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 66px);
  line-height: 0.98;
}

.prototype-head p,
.decision p,
#prototype-summary {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.text-button {
  width: fit-content;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-weight: 850;
  cursor: pointer;
}

.mobile-note {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 750;
}

.visual-control {
  display: grid;
  gap: 5px;
  max-width: 820px;
  margin: 0 0 22px;
  padding: 12px 14px;
  background: #ecfdf5;
  border: 1px solid #86efac;
  border-left: 5px solid #16a34a;
  border-radius: var(--radius);
}

.visual-control span {
  color: #166534;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.visual-control strong {
  color: #14532d;
  font-size: 14px;
  line-height: 1.35;
}

.prototype-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.78fr) minmax(580px, 1.22fr);
  gap: 18px;
  align-items: stretch;
}

.prototype-grid.mobile-flow {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), min(100%, 390px)));
  justify-content: center;
  align-items: start;
  gap: 28px;
}

.phone-frame {
  width: 100%;
  max-width: min(390px, 100%);
  min-width: 0;
  height: fit-content;
  margin: 0 auto;
  border: 10px solid #111827;
  border-radius: 34px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.phone-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 28px;
  padding: 0 18px;
  background: var(--theme-dark);
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 800;
}

.workspace-layout.mobile-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.workspace-layout.mobile-stack > * {
  min-height: 0;
}

.perspective-bar {
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

.perspective {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
}

.perspective.active {
  border-color: var(--theme-dark);
  background: var(--theme-dark);
  color: #fff;
}

.perspective-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.uncertainty-barometer {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.barometer-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.barometer-head strong {
  font-size: 13px;
  color: var(--theme-dark);
}

.barometer-track {
  margin-top: 8px;
  height: 8px;
  border-radius: 999px;
  background: #e8edf2;
  overflow: hidden;
}

.barometer-fill {
  height: 100%;
  width: 84%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), var(--teal));
  transition: width 0.35s ease;
}

.barometer-fill.level-medium {
  background: linear-gradient(90deg, #fbbf24, #ea580c);
}

.barometer-fill.level-low {
  background: linear-gradient(90deg, #f87171, #dc2626);
}

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

.source-rail p.source-item {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.source-badge {
  display: inline-block;
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e9f4ee;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.source-badge.partial {
  background: #fff0e8;
  color: var(--orange);
}

.source-item.verified-high .source-badge:not(.partial) {
  background: #e9f4ee;
}

.source-item.verified-medium .source-badge:not(.partial) {
  background: #e8f5f2;
}

.workspace-mode-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 14px 0;
  background: #fff;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.workspace-mode {
  flex: 1;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.workspace-mode.active {
  border-color: var(--theme-dark);
  background: var(--theme-soft);
  color: var(--theme-dark);
}

.chat-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
}

.chat-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.chat-tagline {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.chat-session-cost {
  margin: 0;
  color: var(--theme-dark);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.chat-model-bar {
  display: grid;
  gap: 6px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.chat-model-bar label {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chat-model-bar select {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.chat-price {
  font-size: 13px;
  font-weight: 800;
  color: var(--theme-dark);
}

.chat-model-meta {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.chat-source-count {
  margin: 0;
  padding: 8px 10px;
  background: var(--theme-soft);
  border-radius: var(--radius);
  color: var(--theme-dark);
  font-size: 12px;
  font-weight: 700;
}

.artifact-toolbar {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.artifact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.artifact-action {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--theme-dark);
  border-radius: 999px;
  background: #fff;
  color: var(--theme-dark);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.artifact-action:hover {
  background: var(--theme-soft);
}

.artifact-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.artifact-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.artifact-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.artifact-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--theme-soft);
  color: var(--theme-dark);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.artifact-card h4 {
  margin: 6px 0 0;
  font-size: 16px;
  line-height: 1.2;
}

.artifact-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.artifact-meta {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.artifact-player audio,
.artifact-player video {
  width: 100%;
  border-radius: var(--radius);
  background: #000;
}

.artifact-player video {
  max-height: 220px;
}

.artifact-play-hint {
  margin: 0;
  font-size: 12px;
  color: var(--theme-dark);
  font-weight: 700;
}

.chat-thread {
  display: grid;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px 2px;
}

.chat-message {
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.45;
}

.chat-message.user {
  justify-self: end;
  max-width: 92%;
  background: var(--theme-dark);
  color: #fff;
}

.chat-message.user p {
  margin: 0;
}

.chat-message.assistant,
.chat-message.typing {
  background: var(--surface);
  border: 1px solid var(--line);
}

.chat-welcome p {
  margin: 0 0 8px;
}

.chat-welcome-hint {
  color: var(--muted);
  font-size: 13px;
}

.chat-answer ul {
  margin: 0;
  padding-left: 18px;
}

.chat-answer li + li {
  margin-top: 6px;
}

.chat-grounded {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.chat-citations {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chat-citations.empty {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.citation-chip {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--theme-dark);
  font-size: 11px;
  font-weight: 700;
  cursor: default;
}

.chat-barometer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
}

.chat-barometer strong {
  display: block;
  margin: 4px 0 6px;
  color: var(--theme-dark);
}

.chat-barometer .barometer-track {
  height: 6px;
}

.chat-typing {
  margin: 0;
  color: var(--muted);
}

.chat-typing .dots {
  display: inline-block;
  animation: chat-dots 1.2s infinite;
}

@keyframes chat-dots {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-suggestion {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.chat-suggestion:hover {
  border-color: var(--theme-dark);
  background: var(--theme-soft);
}

.chat-composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
}

.chat-composer textarea {
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  resize: vertical;
}

.chat-composer button {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius);
  background: var(--theme-dark);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

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

.case-card,
.source-rail {
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.case-card h3,
.source-rail h3 {
  font-size: 20px;
  line-height: 1.1;
}

.mobile-answers {
  grid-template-columns: 1fr;
}

.login-preview,
.main-preview,
.depth-main,
.depth-side,
.decision-panel {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 54px rgba(15, 23, 42, 0.08);
}

.window-bar {
  display: grid;
  grid-template-columns: 10px 10px 10px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 0 15px;
  background: var(--theme-dark);
  color: #fff;
  font-size: 13px;
}

.window-bar span {
  width: 10px;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
}

.window-bar strong {
  justify-self: end;
}

.login-body {
  display: grid;
  gap: 16px;
  padding: clamp(24px, 4vw, 42px);
  background: var(--theme-paper);
}

.login-body > * {
  min-width: 0;
  max-width: 100%;
}

.secure-chip {
  width: fit-content;
  padding: 8px 11px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--theme-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.login-body h3 {
  margin: 4px 0 0;
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1;
}

.phone-frame .login-body h3 {
  font-size: clamp(30px, 3vw, 44px);
}

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

.source-badge {
  display: grid;
  gap: 5px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.login-body label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.login-body input {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.login-body button,
.button {
  min-height: 48px;
  border: 1px solid var(--theme-dark);
  border-radius: var(--radius);
  background: var(--theme-dark);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.login-body button {
  width: 100%;
  justify-self: stretch;
}

.main-preview {
  padding: 0 0 16px;
  background: var(--theme-soft);
}

.main-preview .workspace-top,
.main-preview .workspace-layout {
  padding-left: 14px;
  padding-right: 14px;
}

.main-preview .workspace-top {
  padding-top: 14px;
}

.workspace-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.workspace-top span:first-child {
  color: var(--theme);
}

.workspace-layout {
  display: grid;
  grid-template-columns: minmax(150px, 0.6fr) minmax(300px, 1.35fr) minmax(150px, 0.6fr);
  gap: 12px;
}

.workspace-layout aside,
.workspace-center {
  min-height: 430px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.workspace-layout aside h3 {
  font-size: 22px;
  line-height: 1.05;
}

.workspace-layout aside p {
  color: var(--muted);
  line-height: 1.45;
}

.input-card {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  padding: 13px;
  background: var(--theme-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.workspace-center h3 {
  max-width: 620px;
  font-size: clamp(28px, 3.8vw, 50px);
  line-height: 1;
}

.phone-frame .workspace-center h3 {
  font-size: 34px;
  line-height: 1.04;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 24px 0;
}

.choice-row button {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

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

.answer-strip.mobile-answers {
  grid-template-columns: 1fr;
}

.answer-strip article {
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--theme);
  border-radius: var(--radius);
  background: var(--surface);
}

.answer-strip span {
  display: block;
  margin-bottom: 20px;
  color: var(--theme);
  font-size: 12px;
  font-weight: 900;
}

.answer-strip strong {
  font-size: 15px;
}

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

.answer-strip.mobile-answers article {
  min-height: auto;
}

.answer-strip.mobile-answers span {
  margin-bottom: 8px;
}

.source-rail p,
.workspace-layout aside:last-child p {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.workspace-layout aside:last-child p strong {
  font-size: 13px;
}

.workspace-layout aside:last-child p span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.prototype-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  text-decoration: none;
}

.button.secondary {
  background: #fff;
  color: var(--theme-dark);
}

.depth {
  background: var(--theme-paper);
  border-top: 1px solid var(--line);
}

.depth[hidden] {
  display: none;
}

.depth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.65fr);
  gap: 18px;
}

.depth-main,
.depth-side,
.decision-panel {
  padding: clamp(22px, 4vw, 34px);
}

.depth-main h3 {
  max-width: 820px;
  font-size: clamp(32px, 4.6vw, 62px);
  line-height: 0.98;
}

.depth-main ol {
  display: grid;
  gap: 14px;
  max-width: 760px;
  margin: 28px 0 0;
  padding-left: 24px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.depth-side h3,
.decision-panel h3 {
  margin-bottom: 14px;
  font-family: Cambria, ui-serif, Georgia, "Times New Roman", serif;
  font-size: 30px;
  line-height: 1.05;
}

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

.input-options {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

.input-options span {
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 850;
}

.decision {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
  background: var(--navy);
  color: #fff;
}

.decision .kicker {
  color: var(--mint);
}

.decision p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 18px;
  line-height: 1.55;
}

.decision-panel {
  color: var(--ink);
}

.decision-panel ol {
  display: grid;
  gap: 12px;
  margin: 0 0 22px;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.45;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(18px, 5vw, 72px);
  background: #fff;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

@media (max-width: 1180px) {
  .depth-layout,
  .decision {
    grid-template-columns: 1fr;
  }

  .mosaic-copy {
    grid-column: auto;
    max-width: none;
  }

  .workspace-layout:not(.mobile-stack) {
    grid-template-columns: 1fr;
  }

  .workspace-layout aside,
  .workspace-center {
    min-height: auto;
  }
}

@media (max-width: 1220px) {
  .chooser {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .chooser-options {
    grid-column: auto;
  }

  h1 {
    max-width: 860px;
    font-size: clamp(42px, 5.4vw, 58px);
    line-height: 1.02;
  }
}

@media (max-width: 900px) {
  .explain-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 740px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .brand img {
    width: 112px;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .chooser {
    display: flex;
    flex-direction: column;
    padding-inline: 14px;
  }

  .chooser-intro {
    display: block;
  }

  .chooser-intro,
  .recommendation-panel,
  .decision-bar,
  .explain-card,
  .terms-card,
  .brief-strip,
  .data-chipset,
  .chooser-options,
  .mosaic-copy,
  .mosaic-grid {
    width: 100%;
    max-width: 100%;
  }

  .mosaic-grid,
  .answer-strip,
  .chooser-details {
    grid-template-columns: 1fr;
  }

  .recommendation-panel {
    grid-template-columns: 1fr;
    padding: 16px;
  }

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

  .decision-action {
    width: 100%;
  }

  .recommendation-copy strong {
    font-size: 23px;
  }

  .recommendation-list {
    gap: 6px;
    font-size: 13px;
  }

  .style-tile,
  .style-tile button {
    min-height: 274px;
  }

  .prototype-head,
  .depth-head {
    grid-template-columns: 1fr;
  }

  .prototype {
    padding-inline: 14px;
  }

  .prototype-grid.mobile-flow {
    grid-template-columns: minmax(0, 1fr);
  }

  .login-body {
    padding: 24px;
  }

  h1 {
    font-size: clamp(34px, 9vw, 44px);
    line-height: 1.05;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  .site-footer {
    flex-direction: column;
  }
}
