@font-face {
  font-family: "Space Grotesk Variable";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/space-grotesk.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/ibm-plex-mono.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --bg: #07090a;
  --ink: #f2f4f1;
  --muted: #94a0a5;
  --line: rgb(216 226 231 / 14%);
  --line-strong: rgb(216 226 231 / 34%);
  --surface: #0d1114;
  --accent: #b8dce7;
  --accent-strong: #d8eef4;
  --danger: #ef9a9a;
  font-family: "Space Grotesk Variable", "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: #d3d3d3;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: #d3d3d3;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.topbar,
footer {
  position: fixed;
  z-index: 10;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 clamp(20px, 4vw, 48px);
  border-color: var(--line);
  background: rgb(7 9 10 / 84%);
  backdrop-filter: blur(18px);
}

.topbar {
  top: 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: .14em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand img {
  width: 42px;
  height: 40px;
  object-fit: contain;
  filter: invert(1);
}

.eyebrow,
footer {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.topbar-right,
.topbar-actions,
.user-profile {
  display: flex;
  align-items: center;
}

.topbar-right {
  gap: clamp(18px, 3vw, 40px);
}

.topbar-actions {
  gap: 18px;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 30px);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.primary-nav a {
  padding: 8px 0;
  color: var(--muted);
  text-decoration: none;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: var(--accent);
}

.user-profile {
  gap: 10px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
}

.user-copy {
  display: grid;
  line-height: 1.2;
  text-align: right;
}

.user-copy strong,
.user-copy span {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-copy strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.user-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.signout {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: transparent;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}

.signout:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.shell {
  display: grid;
  min-height: 100vh;
  padding: 96px clamp(24px, 6vw, 88px) 92px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(540px, 1.08fr);
  align-items: start;
  gap: clamp(40px, 5vw, 76px);
  width: min(1560px, 100%);
  margin: auto;
}

.hero-copy {
  max-width: 820px;
}

.hero-copy h2 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(34px, 3.8vw, 56px);
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: 1.04;
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--accent);
}

h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(44px, 5.6vw, 80px);
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: .99;
}

.lede {
  max-width: 600px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.5;
}

.hero-description {
  max-width: 680px;
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.55;
}

.engine-samples {
  margin-top: 28px;
}

.engine-samples > p {
  margin: 0 0 12px;
  color: var(--ink);
  font-weight: 600;
}

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

.engine-samples li {
  padding-left: 13px;
  border-left: 2px solid var(--accent);
  color: #dce3e4;
  font-size: 15px;
}

.engine-samples li span {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

.quota-note {
  max-width: 660px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.quota-note strong {
  color: var(--ink);
  font-weight: 600;
}

.terms {
  max-width: 660px;
  margin: 10px 0 0;
  color: #697479;
  font-size: 14px;
  line-height: 1.45;
}

.terms a {
  color: #7f8b90;
  text-underline-offset: 2px;
}

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

.signin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 230px;
  min-height: 48px;
  gap: 12px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 0;
  color: var(--bg);
  background: var(--ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.header-signin .signin-button {
  min-width: 188px;
  min-height: 36px;
  gap: 9px;
  padding: 0 14px;
  font-size: 12px;
}

.header-signin .signin-button svg {
  width: 16px;
  height: 16px;
}

.signin-button:disabled {
  cursor: wait;
  opacity: .65;
}

.signin-button:hover {
  border-color: var(--accent);
  background: var(--accent);
  transform: translateY(-1px);
}

.signin-button:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 4px;
}

.signin-button svg {
  width: 18px;
  height: 18px;
  padding: 2px;
  border-radius: 2px;
  background: #fff;
}

.signin-message {
  max-width: 520px;
  margin: 14px 0 0;
  color: var(--danger);
  font-size: 13px;
}

.header-signin .signin-message {
  position: fixed;
  top: 72px;
  right: clamp(20px, 4vw, 48px);
  max-width: min(420px, calc(100vw - 40px));
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgb(239 154 154 / 35%);
  background: var(--surface);
  box-shadow: 0 12px 32px rgb(0 0 0 / 35%);
}

.hero-media {
  align-self: start;
  width: 100%;
  max-width: 840px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 34px 90px rgb(0 0 0 / 34%);
}

.hero-media img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-media figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 15px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.hero-media figcaption span:first-child {
  color: var(--ink);
}

.requests-page {
  align-self: start;
  width: min(1320px, 100%);
  margin: 28px auto 0;
}

.generation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.request-cards {
  display: contents;
}

.generation-create-card,
.generation-card {
  min-height: 250px;
  padding: 22px;
  border: 1px solid rgb(184 220 231 / 28%);
  border-radius: 18px;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.generation-create-card:hover,
.generation-card:hover {
  border-color: var(--accent);
  background: #11171a;
  transform: translateY(-2px);
}

.generation-create-card:focus-visible,
.generation-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.generation-create-card {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  border-style: dashed;
  color: var(--accent);
  text-align: center;
}

.generation-create-card span {
  font-size: 42px;
  font-weight: 300;
  line-height: .8;
}

.generation-create-card strong {
  font-size: 20px;
  font-weight: 550;
}

.generation-card {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.generation-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.format-icon {
  display: grid;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  color: var(--accent);
  place-items: center;
}

.format-icon svg {
  width: 24px;
  height: 24px;
}

.generation-card-request {
  margin-top: 24px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
}

.generation-card-created {
  margin-top: auto;
  padding-top: 24px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: .04em;
}

.documents-page {
  width: min(980px, 100%);
  margin: 18px auto 40px;
}

.document-tabs {
  display: flex;
  gap: 8px;
  padding-top: 30px;
  border-bottom: 1px solid var(--line);
}

.document-tab {
  min-width: 108px;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-bottom: 0;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 550;
  cursor: pointer;
}

.document-tab:hover {
  color: var(--ink);
  background: rgb(184 220 231 / 4%);
}

.document-tab[aria-selected="true"] {
  margin-bottom: -1px;
  border-color: var(--line-strong);
  border-bottom: 1px solid var(--bg);
  color: var(--accent);
  background: var(--bg);
}

.document-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -3px;
}

.document-tab-panel[hidden] {
  display: none;
}

.documents-content {
  display: grid;
  gap: 54px;
  padding: 52px 0 24px;
}

.document-section {
  display: grid;
  grid-template-columns: minmax(150px, .32fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 72px);
}

.document-section h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -.015em;
}

.document-copy {
  min-width: 0;
  color: #c5cbcd;
  font-size: 16px;
  line-height: 1.7;
}

.document-copy > :first-child {
  margin-top: 0;
}

.document-copy > :last-child {
  margin-bottom: 0;
}

.document-copy h3 {
  margin: 34px 0 10px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
}

.document-copy ul,
.document-copy ol {
  padding-left: 22px;
}

.document-copy li + li {
  margin-top: 8px;
}

.document-example {
  margin: 20px 0;
  padding: 20px 22px;
  overflow-x: auto;
  border: 1px solid var(--line);
  color: #dce3e4;
  background: #090c0e;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.instruction-formula {
  padding: 18px 20px;
  border-left: 2px solid var(--accent);
  color: var(--ink);
  background: rgb(184 220 231 / 5%);
}

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

.page-header h1 {
  font-size: clamp(38px, 4.5vw, 62px);
}

.create-button,
.view-button,
.cancel-button {
  border-radius: 0;
  font: inherit;
  cursor: pointer;
}

.create-button {
  min-width: 118px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  color: var(--bg);
  background: var(--ink);
  font-weight: 650;
}

.create-button:hover,
.view-button:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}

.requests-message {
  margin: -12px 0 18px;
  font-size: 13px;
}

.requests-message[data-kind="error"] {
  color: var(--danger);
}

.requests-message[data-kind="success"] {
  color: #8fbda1;
}

.requests-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--surface);
}

.requests-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  table-layout: fixed;
}

.requests-table th,
.requests-table td {
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.requests-table th {
  vertical-align: middle;
}

.requests-table td {
  vertical-align: top;
}

.requests-table th {
  color: var(--muted);
  background: #090c0e;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.requests-table th:nth-child(1) { width: 190px; }
.requests-table th:nth-child(2) { width: 110px; }
.requests-table th:nth-child(4) { width: 130px; }
.requests-table th:nth-child(5) { width: 150px; }
.requests-table th:nth-child(6) { width: 110px; }
.requests-table th:nth-child(7) { width: 100px; }

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

.requests-table tbody tr:hover {
  background: rgb(184 220 231 / 3%);
}

.created-cell {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.format-label,
.status-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.format-label {
  color: var(--accent);
}

.request-fields {
  display: grid;
  gap: 12px;
}

.request-field {
  display: grid;
  gap: 4px;
}

.request-field-label {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.request-field-value {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.status-label {
  display: inline-flex;
  padding: 5px 8px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
}

.status-processing,
.status-queued,
.status-accepted {
  border-color: rgb(184 220 231 / 30%);
  color: var(--accent);
}

.status-succeeded {
  border-color: rgb(143 189 161 / 38%);
  color: #8fbda1;
}

.status-failed {
  border-color: rgb(239 154 154 / 40%);
  color: var(--danger);
}

.request-actions {
  text-align: right !important;
}

.view-button {
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: transparent;
  font-size: 12px;
}

.requests-empty {
  padding: 72px 24px;
  color: var(--muted);
  text-align: center;
}

.requests-empty p {
  margin: 0 0 12px;
}

.text-button {
  padding: 0;
  border: 0;
  color: var(--accent);
  background: transparent;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.generation-modal,
.media-modal,
.request-detail-modal {
  width: min(700px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 34px 120px rgb(0 0 0 / 65%);
}

.generation-modal {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
}

.generation-modal::backdrop,
.media-modal::backdrop,
.request-detail-modal::backdrop {
  background: rgb(0 0 0 / 72%);
  backdrop-filter: blur(5px);
}

.modal-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 28px 0;
}

.modal-header .eyebrow {
  margin: 9px 0 0;
}

.modal-close {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  font: 300 26px/1 sans-serif;
  cursor: pointer;
}

.modal-close:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.request-detail-modal {
  width: min(920px, calc(100vw - 32px));
  height: min(860px, calc(100vh - 32px));
  max-height: calc(100vh - 32px);
  overflow: hidden;
}

.request-detail-modal[open] {
  display: flex;
  flex-direction: column;
}

.detail-modal-close {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 18px;
  color: var(--ink);
  background: rgb(7 9 10 / 82%);
  backdrop-filter: blur(10px);
}

.request-detail-preview {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  min-height: 150px;
  border-bottom: 1px solid var(--line);
  background: #050708;
  place-items: center;
}

.request-detail-preview[hidden],
.request-detail-preview audio[hidden],
.request-detail-preview video[hidden] {
  display: none;
}

.request-detail-preview audio {
  width: calc(100% - 64px);
  margin: 52px 32px 32px;
}

.request-detail-preview video {
  display: block;
  width: 100%;
  max-height: min(42vh, 520px);
  background: #000;
}

.preview-loading {
  margin: 58px 24px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.request-detail-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  padding: 32px;
}

.request-detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 30px;
}

.request-detail-meta div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
}

.request-detail-meta dt,
.request-field-label {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.request-detail-meta dd {
  margin: 9px 0 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.request-detail-status {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px !important;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.request-detail-fields {
  display: grid;
  flex: 1 1 auto;
  gap: 24px;
  min-height: 0;
  padding-top: 28px;
  padding-right: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid var(--line);
}

.request-detail-fields .request-field {
  gap: 8px;
}

.request-detail-fields .request-field-value {
  color: #dce3e4;
  font-size: 16px;
  line-height: 1.65;
}

.request-detail-message {
  margin: 24px 0 0;
  color: var(--danger);
}

.media-modal {
  width: min(920px, calc(100vw - 32px));
  overflow: hidden;
}

.media-modal[data-media-type="audio"] {
  width: min(620px, calc(100vw - 32px));
}

.media-modal-header {
  align-items: center;
  padding-bottom: 22px;
}

.media-modal-header .eyebrow {
  margin: 0 0 7px;
}

.media-modal-header h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 36px);
}

.media-stage {
  display: grid;
  min-height: 160px;
  place-items: center;
  border-top: 1px solid var(--line);
  background: #050708;
}

.media-stage audio {
  width: calc(100% - 56px);
  margin: 44px 28px;
}

.media-stage video {
  display: block;
  width: 100%;
  max-height: min(70vh, 720px);
  background: #000;
}

.media-stage audio[hidden],
.media-stage video[hidden] {
  display: none;
}

.view-button:disabled {
  cursor: wait;
  opacity: .55;
}

.generation-form {
  display: grid;
  padding: 22px 28px 28px;
  background: var(--surface);
}

.generation-form label {
  margin-bottom: 9px;
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.form-field,
.music-fields {
  display: grid;
}

.music-fields {
  gap: 22px;
}

.form-field[hidden],
.music-fields[hidden] {
  display: none;
}

.generation-form select,
.generation-form textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--ink);
  background: #090c0e;
  font: inherit;
  outline: none;
}

.generation-form select {
  min-height: 46px;
  margin-bottom: 0;
  padding: 0 14px;
}

.selected-model {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 10px 0 28px;
  color: var(--muted);
  font-size: 12px;
}

.selected-model span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.selected-model strong {
  color: var(--ink);
  font-weight: 500;
}

.generation-form textarea {
  min-height: 110px;
  padding: 14px;
  line-height: 1.5;
  resize: vertical;
}

.generation-form select:focus,
.generation-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.generation-form textarea::placeholder {
  color: #5f696d;
}

.generation-form textarea:disabled {
  color: var(--accent);
  background: #0b1013;
  cursor: not-allowed;
  opacity: 1;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  margin-top: 14px;
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.cancel-button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: transparent;
}

.cancel-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.field-count {
  justify-self: end;
  margin-top: 8px;
  color: #6f7a7f;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
}

.generate-button {
  min-width: 130px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 0;
  color: var(--bg);
  background: var(--ink);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.generate-button:hover {
  border-color: var(--accent);
  background: var(--accent);
}

.generate-button:disabled {
  cursor: wait;
  opacity: .55;
}

.generation-message {
  margin: 18px 0 0;
  font-size: 13px;
}

.generation-message[data-kind="error"] {
  color: var(--danger);
}

.generation-message[data-kind="success"] {
  color: #8fbda1;
}

footer {
  bottom: 0;
  height: 52px;
  justify-content: center;
  border-top: 1px solid var(--line);
  color: #6f7a7f;
}

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 56px;
    width: min(900px, 100%);
  }

  .hero-copy {
    max-width: 800px;
  }

  .hero-media {
    max-width: 900px;
  }
}

@media (max-width: 900px) {
  .shell {
    padding-top: 104px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .hero-media {
    max-width: 680px;
  }

  .document-section {
    grid-template-columns: 1fr;
    gap: 18px;
  }

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

@media (max-width: 560px) {
  .topbar {
    padding-right: 16px;
    padding-left: 16px;
  }

  .brand span,
  .user-copy {
    display: none;
  }

  .topbar-right,
  .topbar-actions {
    gap: 12px;
  }

  .primary-nav {
    gap: 14px;
    font-size: 9px;
  }

  .signout {
    padding: 0 8px;
  }

  .shell {
    padding: 100px 20px 92px;
  }

  h1 {
    font-size: clamp(40px, 13vw, 58px);
  }

  .signin-button {
    width: 100%;
  }

  .header-signin .signin-button {
    width: auto;
    min-width: 0;
    padding: 0 10px;
  }

  .header-signin .signin-button span {
    display: none;
  }

  .hero-media figcaption span:last-child {
    display: none;
  }

  .page-header {
    align-items: center;
  }

  .documents-content {
    gap: 44px;
    padding-top: 42px;
  }

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

  .generation-create-card,
  .generation-card {
    min-height: 220px;
  }

  .request-detail-content {
    padding: 26px 22px;
  }

  .request-detail-preview audio {
    width: calc(100% - 40px);
    margin-right: 20px;
    margin-left: 20px;
  }

  .modal-header,
  .generation-form {
    padding-right: 22px;
    padding-left: 22px;
  }

  .form-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .modal-actions,
  .modal-actions button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Signed-in workspace and streaming chat. */
.shell:has(.workspace-tabs:not([hidden])) {
  align-content: start;
}

.workspace-tabs {
  display: flex;
  gap: 28px;
  width: min(1320px, 100%);
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.workspace-tabs button {
  padding: 14px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.workspace-tabs button[aria-selected="true"] {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.workspace-tabs button:focus-visible,
.chat-composer :focus-visible,
.chat-history:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.chats-page {
  width: min(1320px, 100%);
  margin: 28px auto 0;
}

.chat-intro {
  margin: 12px 0 0;
  color: var(--muted);
}

.chat-layout {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(0, 2.2fr);
  gap: 24px;
  align-items: start;
}

.chat-composer,
.chat-conversation {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--surface);
}

.chat-composer {
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.chat-composer label,
.chat-history-header h2 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 500;
}

.chat-composer select,
.chat-composer textarea {
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--ink);
  background: var(--bg);
  font: inherit;
  font-size: 14px;
}

.chat-composer textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.6;
}

.chat-composer textarea::placeholder { color: #77858b; }
.chat-composer :disabled { opacity: .55; cursor: not-allowed; }
.chat-hint { margin: 10px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.5; }
#chat-new { align-self: start; margin-bottom: 28px; }
.chat-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.chat-actions .generate-button { flex: 1; }
.chat-status { min-height: 2.8em; margin: 18px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.chat-status[data-kind="error"] { color: var(--danger); }

.chat-history-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.chat-history-header h2 { margin: 0; }
#chat-model-name { color: var(--accent); font-size: 12px; overflow-wrap: anywhere; }
.chat-history { height: clamp(440px, 58vh, 800px); overflow-y: auto; padding: 24px; scrollbar-gutter: stable; }
.chat-empty { display: grid; align-content: center; min-height: 100%; text-align: center; }
.chat-empty h3 { margin: 0 0 12px; font-size: 22px; font-weight: 500; }
.chat-empty p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.chat-message { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.chat-message:last-child { margin-bottom: 0; border-bottom: 0; }
.chat-message h3 { margin: 0 0 10px; color: var(--accent); font-size: 12px; font-weight: 500; }
.chat-message-user h3 { color: var(--muted); }
.chat-message-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; font-size: 14px; }
.chat-message-note { color: var(--muted); font-size: 12px; line-height: 1.5; }
.chat-message-note:empty { display: none; }

@media (max-width: 760px) {
  .chat-layout { grid-template-columns: 1fr; }
  .chat-composer textarea { min-height: 120px; height: 140px; }
  .chat-history { height: 480px; }
}

/* Paired inference workspace */
.comparison-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.demo-setup { display: flex; align-items: end; gap: 24px; padding: 28px; border: 1px solid #293136; background: #0e1214; }
.demo-setup > div { flex: 1; }
.demo-setup label { display: block; margin-bottom: 12px; }
.demo-setup select { width: 100%; }
.demo-progress { display: flex; align-items: center; gap: 24px; border: 1px solid #293136; padding: 32px; }
.spinner { width: 28px; height: 28px; border: 3px solid #293136; border-top-color: #acd9e6; border-radius: 50%; animation: spin 1s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.comparison-panes { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 24px; }
.paired-history { height: 52vh; min-height: 300px; overflow-y: auto; padding: 24px; overflow-wrap: anywhere; }
.paired-history:empty::after { content: 'Send a message to begin.'; color: #89999e; }
.paired-history .chat-message { margin-bottom: 24px; }
.paired-history .chat-message h3 { margin-top: 16px; }
.paired-history details { color: #89999e; margin: 14px 0; }
.paired-composer { margin: 24px 0; padding: 24px; border: 1px solid #293136; background: #0e1214; }
.paired-composer textarea { display: block; width: 100%; margin: 12px 0; }
.chat-history-header span { color: #acbdc4; font-size: 12px; }
[hidden] { display: none !important; }
@media(max-width: 760px) { .comparison-panes { grid-template-columns: 1fr; } .demo-setup { flex-direction: column; align-items: stretch; } .paired-history { height: 40vh; } }
@media(prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.demo-setup select, .paired-composer textarea {
  font: inherit; color: #edf1f2; background: #080b0c; border: 1px solid #4b565b; border-radius: 0; padding: 14px;
}
.paired-composer textarea:focus, .demo-setup select:focus { outline: 2px solid #acd9e6; outline-offset: 3px; }
.paired-composer textarea:disabled { opacity: .65; }
.comparison-panes .chat-conversation { min-height: 0; }
footer { position: relative; }
.comparison-header h1 { font-size: clamp(30px, 3.4vw, 44px); }
.paired-history { height: clamp(260px, 38vh, 440px); min-height: 260px; }
.paired-composer .chat-hint { margin-bottom: 0; }

/* Let the conversations fill the signed-in viewport. */
.comparison-active .shell { max-width: none; width: 100%; padding: 76px 20px 12px; }
.comparison-active footer { display: none; }
.comparison-active .chats-page { padding: 0; margin: 0; width: 100%; max-width: none; }
.comparison-toolbar { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-bottom: 8px; font-size: 12px; color: #acbdc4; }
.comparison-toolbar button { padding: 8px 16px; min-height: 34px; }
.chat-status { margin: 4px 0; font-size: 12px; }
.chat-status:empty { display: none; }
.comparison-panes { gap: 12px; }
.comparison-panes .chat-history-header { padding: 12px 16px; gap: 10px; flex-wrap: wrap; }
.pane-stats { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pane-stats strong { font-size: 13px; font-weight: 500; color: #d5edf3; font-variant-numeric: tabular-nums; }
.paired-history { height: calc(100dvh - 310px); min-height: 220px; padding: 12px 16px; }
.paired-composer { display: flex; align-items: stretch; gap: 10px; padding: 0; margin: 10px 0 0; border: 0; background: none; }
.paired-composer textarea { flex: 1; min-width: 0; width: auto; margin: 0; padding: 10px 12px; resize: none; }
.paired-composer button { width: auto; flex: 0 0 auto; padding: 10px 18px; }
.prompt-word-count { color: #9ca7ad; font-size: 12px; }
@media(max-width: 760px) {
  .comparison-active .shell { padding: 72px 8px 8px; }
  .paired-history { height: 32dvh; min-height: 160px; }
  .pane-stats { align-items: flex-start; }
  .paired-composer button { padding: 8px; font-size: 12px; }
}
.chat-status.quiet-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.comparison-toolbar:has(#demo-end[hidden]) { display: none; }
.demo-progress { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: stretch; gap: 12px; padding: 0; border: 0; }
.preparation-card { padding: 24px; border: 1px solid #293136; background: #0e1214; min-width: 0; }
.preparation-card h2 { font-size: 17px; margin: 0 0 24px; }
.preparation-state { display: flex; align-items: center; gap: 12px; min-height: 42px; }
.preparation-state strong { font-size: 14px; overflow-wrap: anywhere; }
.preparation-card p, .preparation-card li { color: #acbdc4; font-size: 13px; font-variant-numeric: tabular-nums; }
.preparation-card ol { padding-left: 20px; line-height: 2.2; }
.preparation-done { color: #a2e8bc; }
@media(max-width: 560px) { .demo-progress { gap: 8px; } .preparation-card { padding: 12px; } .preparation-card h2 { font-size: 14px; } .preparation-card li { font-size: 11px; } }

.chat-message-note.is-streaming::before {
  content: ""; display: inline-block; width: 7px; height: 7px;
  margin-right: 8px; border-radius: 50%; background: var(--accent);
  animation: reply-pulse 1s ease-in-out infinite;
}
@keyframes reply-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) {
  .chat-message-note.is-streaming::before { animation: none; }
}

/* Setup-only infrastructure figure; chat keeps its full viewport. */
.demo-topology { margin: 18px 0 0; padding: 0; border: 0; background: transparent; }
.demo-setup[hidden] + .demo-topology { display: none; }
.topology-map { display: block; width: 100%; max-width: 1120px; height: auto; margin: 0 auto; }
.demo-topology figcaption { max-width: 1060px; margin: 0 auto; }
.demo-topology figcaption p { font-size: 14px; line-height: 1.65; color: #acbdc4; margin: 12px 0 0; }
.demo-topology figcaption strong { color: #edf1f2; font-weight: 500; }
.topology-mobile { display: none; }
@media(max-width: 760px) {
  .topology-map { display: none; }
  .topology-mobile { display: grid; gap: 12px; margin: 18px 0; }
  .topology-mobile > div { display: grid; gap: 7px; padding: 14px; border: 1px solid #364d58; background: #0c1318; }
  .topology-mobile span { font-size: 13px; color: #acbdc4; }
  .topology-mobile strong { font-size: 14px; font-weight: 500; }
  .topology-origin { text-align: center; }
  .topology-origin > span:last-child, .topology-destination b { color: #b8dce7; font-size: 14px; }
  .topology-destination:nth-child(2) b { color: #a2e8bc; }
}

.demo-setup { flex-wrap: wrap; }
.demo-model-note { width: 100%; flex: none; margin: 0; color: var(--text-muted, #a7b0b5); font-size: 14px; }

/* Streamed Markdown and generated media share the existing conversation panes. */
.markdown-content { white-space: normal; overflow-wrap: anywhere; }
.markdown-content > :first-child { margin-top: 0; }
.markdown-content > :last-child { margin-bottom: 0; }
.markdown-content p, .markdown-content ul, .markdown-content ol { margin: .7em 0; }
.markdown-content ul, .markdown-content ol { padding-left: 1.6em; }
.markdown-content h1, .markdown-content h2, .markdown-content h3,
.markdown-content h4, .markdown-content h5, .markdown-content h6 { margin: 1em 0 .5em; line-height: 1.3; }
.markdown-content h1 { font-size: 1.5em; }
.markdown-content h2 { font-size: 1.3em; }
.markdown-content h3 { font-size: 1.15em; }
.markdown-content pre { padding: 14px; overflow-x: auto; white-space: pre; background: #10191e; border-radius: 8px; }
.markdown-content code { font-family: ui-monospace, monospace; font-size: .9em; background: #10191e; }
.markdown-content :not(pre) > code { padding: .1em .3em; border-radius: 3px; }
.markdown-content blockquote { margin: 1em 0; padding-left: 1em; border-left: 3px solid #55717c; color: #afc0c8; }
.markdown-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1em 0; }
.markdown-content th, .markdown-content td { padding: 8px 12px; border: 1px solid #35484f; }
.markdown-content a { color: #8edbcc; }
.generated-image { display: block; width: 100%; max-width: 1024px; height: auto; border-radius: 8px; margin-bottom: 10px; }

.turn-comparison { width: min(540px, calc(100vw - 40px)); box-sizing: border-box; padding: 28px; border: 1px solid #465056; border-radius: 16px; background: #101719; color: #edf3f5; box-shadow: 0 20px 80px #0008; }
.turn-comparison::backdrop { background: #0003; }
.turn-comparison h2 { margin-top: 0; font-size: 1.2rem; }
.comparison-summary { font-size: 1.3rem; line-height: 1.45; font-weight: 600; }
.comparison-note { color: #b4bfc4; font-size: .85rem; line-height: 1.5; }
.turn-comparison button { display: block; margin: 12px 0 0 auto; }

.chat-status[data-kind="busy"] { max-width: 1060px; margin: 12px auto 0; min-height: 0; font-size: 14px; line-height: 1.65; color: #f0c47a; }

.comparison-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.comparison-table > tbody > tr > th { width: 48px; padding: 8px 12px 8px 0; text-align: left; vertical-align: top; }
.comparison-table > tbody > tr > td { padding: 8px 0; vertical-align: top; overflow-wrap: anywhere; }
.comparison-table .comparison-note { width: 100%; border-collapse: collapse; margin: 0; }
.comparison-note th { width: 90px; white-space: nowrap; padding: 4px 10px 4px 0; text-align: left; vertical-align: top; font-weight: 500; }
.comparison-note td { padding: 4px 0; vertical-align: top; }
@media(max-width: 480px) { .turn-comparison { padding: 20px; } }

.topology-specs-wrap { max-width: 1060px; margin: 18px auto 0; overflow-x: auto; }
.topology-specs { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.65; color: #acbdc4; }
.topology-specs th, .topology-specs td { padding: 8px 16px; text-align: left; white-space: nowrap; border-bottom: 1px solid #293136; }
.topology-specs th { color: #edf1f2; font-weight: 500; }
.topology-specs th:first-child { padding-left: 0; }
.topology-specs th:last-child, .topology-specs td:last-child { padding-right: 0; }

/* Shared hardware colors from selection through preparation and comparison. */
:root { --v6e: #62e2cf; --h100: #c1a5ff; }
.demo-setup { border-radius: 16px; background: #111b1e; border-color: #344446; }
.demo-setup label { color: #d5e4e7; font-size: 13px; }
.demo-setup select { border-radius: 9px; background-color: #101719; }
#demo-proceed, #paired-send, #comparison-close { border-radius: 10px; transition: box-shadow .18s ease, transform .18s ease; }
#demo-proceed:hover:not(:disabled), #paired-send:hover:not(:disabled), #comparison-close:hover { box-shadow: 0 0 22px #62e2cf25; transform: translateY(-1px); }
.topology-mobile > div { border-radius: 12px; }
.topology-destination:nth-child(2) strong, .topology-destination:nth-child(2) b, .topology-specs tbody tr:first-child th { color: var(--v6e); }
.topology-destination:nth-child(3) strong, .topology-destination:nth-child(3) b, .topology-specs tbody tr:last-child th { color: var(--h100); }
.preparation-card { --host-color: var(--v6e); border-radius: 16px; border-color: #344b49; background: radial-gradient(ellipse at top left, #62e2cf0d, transparent 70%), #101719; }
.preparation-card:has(#gpu-prep-title) { --host-color: var(--h100); border-color: #45405a; background: radial-gradient(ellipse at top left, #c1a5ff12, transparent 70%), #14151c; }
.preparation-card h2 { color: var(--host-color); margin-bottom: 18px; }
.preparation-card .spinner { border-top-color: var(--host-color); }
.preparation-card .preparation-done { color: var(--host-color); }
.preparation-card .prep-phases { display: flex; list-style: none; gap: 8px; padding: 0; margin: 0 0 20px; }
.preparation-card .prep-phases li { flex: 1; position: relative; padding: 9px 3px 10px; border-bottom: 2px solid #39434c; color: #a0abb4; font-size: 12px; line-height: 1.4; }
.prep-phases li::before { content: '○'; margin-right: 6px; }
.preparation-card .prep-phases .is-complete { color: var(--host-color); border-color: var(--host-color); }
.prep-phases .is-complete::before { content: '✓'; }
.preparation-card .prep-phases .is-current { color: #f0f6f7; border-color: var(--host-color); }
.prep-phases .is-current::before { content: '●'; color: var(--host-color); animation: reply-pulse 1.4s ease-in-out infinite; }
.comparison-panes .chat-conversation { border-radius: 14px; overflow: hidden; border-color: #344b49; }
.comparison-panes .chat-conversation:has(#gpu-title) { border-color: #45405a; }
.comparison-panes .chat-history-header { background: linear-gradient(110deg, #142826, #101719); }
.comparison-panes .chat-conversation:has(#gpu-title) .chat-history-header { background: linear-gradient(110deg, #252034, #14151c); }
#tpu-title, #tpu-metrics { color: var(--v6e); }
#gpu-title, #gpu-metrics { color: var(--h100); }
#tpu-title::before, #gpu-title::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin: 0 8px 2px 0; box-shadow: 0 0 10px currentColor; }
#gpu-history .chat-message-note.is-streaming::before { background: var(--h100); }
#tpu-history .chat-message-note.is-streaming::before { background: var(--v6e); }
.turn-comparison { background: #111b1e; border-color: #485c61; box-shadow: 0 24px 100px #000a; }
.turn-comparison::backdrop { background: #0003; backdrop-filter: none; }
.comparison-summary { color: #d5cfc2; font-weight: 500; }
.comparison-summary strong { color: inherit; font-weight: 750; }
.comparison-table > tbody > tr:first-child { --metric-color: var(--v6e); }
.comparison-table > tbody > tr:nth-child(2) { --metric-color: var(--h100); }
.comparison-table > tbody > tr:first-child > th, .comparison-table > tbody > tr:nth-child(2) > th { color: var(--metric-color); }
.comparison-table > tbody > tr:nth-child(-n+2) > td { line-height: 1.8; font-variant-numeric: tabular-nums; }
.comparison-metric { display: inline-block; color: #ccd5db; }
.comparison-metric.is-best { color: var(--metric-color); font-weight: 650; text-decoration: underline; text-decoration-color: var(--metric-color); text-underline-offset: 5px; }
@media (prefers-reduced-motion: reduce) { .prep-phases .is-current::before { animation: none; } #demo-proceed, #paired-send, #comparison-close { transition: none; } }
@media(max-width:560px) { .preparation-card .prep-phases { gap: 4px; } .preparation-card .prep-phases li { font-size: 10px; } .prep-phases li::before { margin-right: 3px; } }
#tpu-metrics .metric-primary, #gpu-metrics .metric-primary { color: inherit; font-size: 15px; font-weight: 650; }
#tpu-metrics .metric-secondary, #gpu-metrics .metric-secondary { color: #a8b9c0; font-size: 12px; }
.comparison-active .shell { grid-template-columns: minmax(0, 1fr); }
.comparison-active .chats-page, .demo-setup > div { min-width: 0; }
.topology-specs-wrap { max-width: min(1060px, 100%); }
.preparation-card .prep-phases li { min-width: 0; flex-basis: 0; }
@media(max-width:560px) {
  .preparation-card .prep-phases li { padding-left: 0; padding-right: 0; font-size: 9px; text-align: center; }
  .prep-phases li::before { display: block; margin: 0 0 5px; }
}

/* One hardware color throughout each card/header and each metrics row. */
.topology-specs tbody tr:first-child > * { color: var(--v6e); }
.topology-specs tbody tr:last-child > * { color: var(--h100); }
.topology-origin > * { color: #d5cfc2; }
.topology-destination:nth-child(2) > * { color: var(--v6e); }
.topology-destination:nth-child(3) > * { color: var(--h100); }
.preparation-card :is(h2, p, li, strong), .preparation-card .prep-phases :is(li, .is-current) { color: var(--host-color); }
.preparation-card .prep-phases li:not(.is-current):not(.is-complete) { opacity: .65; }
.chat-conversation:has(#tpu-title) .chat-history-header { color: var(--v6e); }
.chat-conversation:has(#gpu-title) .chat-history-header { color: var(--h100); }
.comparison-panes .chat-history-header span, #tpu-metrics .metric-secondary, #gpu-metrics .metric-secondary { color: inherit; }
.comparison-table > tbody > tr:nth-child(-n+2) > td, .comparison-table .comparison-metric { color: var(--metric-color); }

.topology-specs thead th { color: #d5cfc2; }

.topology-origin > span:last-child { color: #d5cfc2; }

/* QYJOHN light palette: neutral canvas, white surfaces, stable host accents. */
:root {
  color-scheme: light;
  --bg: #d3d3d3;
  --ink: #263238;
  --muted: #59676d;
  --line: #d3dadd;
  --line-strong: #98a8ae;
  --surface: #ffffff;
  --accent: #246572;
  --accent-strong: #184c57;
  --button-bg: #c2d7d8;
  --button-hover: #aecacc;
  --button-ink: #294d55;
  --button-border: #9eb9bd;
  --danger: #ad3434;
  --v6e: #08786b;
  --h100: #7051a4;
  --v6e-soft: #eaf5f1;
  --h100-soft: #f2edf8;
  --neutral-soft: #f2f0eb;
  --neutral-ink: #665e50;
  --shadow: 0 3px 14px #26323808;
}
.topbar { background: var(--bg); border-color: #b9c1c4; backdrop-filter: none; }
.brand { font-size: 16px; font-weight: 700; }
.brand span, .header-signin .signin-button span { display: inline; }
body:not(.comparison-active) .shell { display: none; }
.header-signin .signin-button, .signout, .comparison-toolbar button {
  color: var(--button-ink); background: var(--button-bg); border-color: var(--button-border); border-radius: 8px;
}
.header-signin .signin-button:hover, .signout:hover, .comparison-toolbar button:hover { color: var(--button-ink); background: var(--button-hover); border-color: var(--button-border); }
.preparation-card, .preparation-card:has(#gpu-prep-title), .turn-comparison {
  background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); color: var(--ink);
}
.demo-setup { background: transparent; border-color: transparent; box-shadow: none; }
.demo-setup label { color: var(--muted); }
.demo-setup select, .paired-composer textarea {
  color: var(--ink); background: #fafbfb; border-color: #aebcc1; border-radius: 9px;
}
.demo-setup select:hover, .paired-composer textarea:hover { border-color: #778d95; }
.demo-setup select:focus, .paired-composer textarea:focus { outline-color: var(--accent); background: white; }
.demo-setup select, .demo-setup select:focus { background: #dedede; }
.paired-composer textarea::placeholder { color: var(--muted); }
.generate-button { color: var(--button-ink); background: var(--button-bg); border-color: var(--button-border); }
.generate-button:hover { color: var(--button-ink); background: var(--button-hover); border-color: var(--button-border); }
#demo-proceed:hover:not(:disabled), #paired-send:hover:not(:disabled), #comparison-close:hover { box-shadow: 0 3px 12px #24657225; }
.demo-model-note, .demo-topology figcaption p, .prompt-word-count, .comparison-toolbar, #demo-status { color: var(--muted); }
.demo-topology figcaption strong { color: var(--ink); }
#demo-status[data-kind="error"] { color: var(--danger); }
#demo-status[data-kind="busy"] { color: #805006; }
.topology-specs-wrap { padding: 0; border-radius: 12px; background: transparent; box-shadow: none; }
.topology-specs th, .topology-specs td { border-color: var(--line); padding-top: 12px; padding-bottom: 12px; }
.topology-specs thead { background: var(--neutral-soft); }
.topology-specs thead th { color: var(--neutral-ink); }
.topology-specs tbody tr:first-child { background: var(--v6e-soft); }
.topology-specs tbody tr:last-child { background: var(--h100-soft); }
.topology-specs th:first-child, .topology-specs td:first-child { padding-left: 12px; }
.topology-specs th:last-child, .topology-specs td:last-child { padding-right: 12px; }
.topology-specs tbody tr:last-child > * { border-bottom: 0; }
.topology-mobile > div { background: var(--neutral-soft); border-color: #c4bfb5; }
.topology-origin > *, .topology-origin > span:last-child { color: var(--neutral-ink); }
.topology-destination:nth-child(2) { background: var(--v6e-soft); border-color: #b3d4c9; }
.topology-destination:nth-child(3) { background: var(--h100-soft); border-color: #d0c2e2; }
.preparation-card { border-top: 3px solid var(--host-color); }
.preparation-card:has(#gpu-prep-title) { border-top-color: var(--h100); }
.preparation-card .prep-phases li { border-bottom-color: var(--line); }
.preparation-card .prep-phases li:not(.is-current):not(.is-complete) { color: var(--muted); opacity: 1; }
.spinner { border-color: var(--line); }
.comparison-panes .chat-conversation, .comparison-panes .chat-conversation:has(#gpu-title) { border-color: #bbc9cc; background: var(--surface); box-shadow: var(--shadow); }
.comparison-panes .chat-history-header { background: var(--v6e-soft); border-bottom-color: #c7ded5; }
.comparison-panes .chat-conversation:has(#gpu-title) .chat-history-header { background: var(--h100-soft); border-bottom-color: #ddd1e9; }
#tpu-title::before, #gpu-title::before { box-shadow: none; }
.paired-history details, .paired-history:empty::after { color: var(--muted); }
.markdown-content pre, .markdown-content code { background: #f0f3f4; color: #33444c; }
.markdown-content blockquote { border-color: #91aab3; color: var(--muted); }
.markdown-content th, .markdown-content td { border-color: var(--line); }
.markdown-content a { color: var(--accent); }
.turn-comparison { border-color: #b6c2c6; box-shadow: 0 24px 80px #26323833; }
.turn-comparison::backdrop { background: #26323824; backdrop-filter: none; }
.comparison-summary { color: var(--neutral-ink); }
.comparison-note { color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: #c4e3e4; color: #203d43; }
