/* Theme tokens */
:root {
  --primary: #006dbf;
  --tint: #dee9ff;
  --bg: #fcfcfc;
  --surface: #fff;
  --text: #212121;
  --muted: #6b7280;
  --line: #e4e7eb;
  --danger: #b42318;
  --font: Avenir, Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --primary: #90caf9;
  --tint: #183147;
  --bg: #0a0a0a;
  --surface: #171717;
  --text: #ededed;
  --muted: #bdbdbd;
  --line: #343434;
  --danger: #ffb4ab;
  color-scheme: dark;
}

/* Base elements and typography */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
}
[hidden] {
  display: none !important;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}
button {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}
button:hover {
  border-color: var(--primary);
  color: var(--primary);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--surface);
}
.primary:hover {
  color: var(--surface);
  filter: brightness(0.95);
}
.danger {
  color: var(--danger);
}
a {
  color: var(--primary);
}
input,
select,
textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 12px;
  min-height: 36px;
}
textarea {
  resize: vertical;
  min-height: 96px;
}
label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin: 12px 0 4px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 20px;
  font-weight: 600;
}
h2 {
  font-size: 16px;
  font-weight: 400;
}
h3 {
  font-size: 14px;
  font-weight: 600;
}
.muted,
small {
  color: var(--muted);
}
small {
  font-size: 12px;
}

/* Application shell and navigation */
.layout {
  min-height: 100vh;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1580px;
  min-height: 72px;
  margin: auto;
  padding: 10px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand-block {
  flex: 0 0 auto;
}
.brand {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.6px;
}
.brand span {
  color: var(--primary);
}
.product {
  font-size: 11px;
  color: var(--muted);
}
.primary-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}
.primary-nav button {
  border: 0;
  background: none;
}
.primary-nav button:hover,
.primary-nav button.active {
  background: var(--tint);
  color: var(--primary);
}
.nav-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}
.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar-menu {
  position: relative;
  min-width: 0;
}
.menu-icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  color: var(--text);
}
.toolbar-icon {
  width: 22px;
  height: 22px;
}
.menu-icon-button.active,
.menu-icon-button[aria-expanded="true"] {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--tint);
}
.header-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: max-content;
  min-width: 220px;
  max-width: min(280px, calc(100vw - 32px));
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgb(16 24 40 / 12%), 0 2px 6px rgb(16 24 40 / 6%);
  z-index: 20;
}
.account-menu-identity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 10px 6px;
  overflow-wrap: anywhere;
}
.account-menu-identity strong {
  font-size: 14px;
}
.account-menu-identity > span:not(.badge) {
  color: var(--muted);
  font-size: 12px;
}
.menu-divider {
  height: 1px;
  margin: 6px 4px;
  background: var(--line);
}
.header-menu button,
.header-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 36px;
  height: auto;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text);
  font-size: 14px;
  text-align: left;
  text-decoration: none;
  white-space: normal;
}
.header-menu button:hover,
.header-menu a:hover,
.header-menu button.active {
  background: var(--tint);
  color: var(--primary);
}
.menu-item-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.menu-item-text {
  flex: 1;
}
.external-mark {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}
.theme-switch {
  position: relative;
  width: 32px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 9px;
  background: var(--line);
}
.theme-switch::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  content: "";
  transition: transform .15s;
}
:root[data-theme="dark"] .theme-switch {
  background: var(--primary);
}
:root[data-theme="dark"] .theme-switch::after {
  transform: translateX(14px);
}
.content {
  max-width: 1580px;
  padding: 28px 32px;
  margin: auto;
}
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.page-head p {
  color: var(--muted);
  margin-top: 4px;
}
.overview-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.page-head:has(.cache-header-actions) {
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-bottom: 14px;
}
.cache-header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}
.cache-capacity {
  padding: 6px 8px;
  color: var(--muted);
  white-space: nowrap;
}

/* Shared components */
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.toolbar select,
.toolbar input {
  width: auto;
  max-width: 240px;
}
.toolbar label {
  margin: 0;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.card,
.panel {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 4px;
  padding: 20px;
}
.card .value {
  font-size: 20px;
  font-weight: 600;
  margin: 8px 0 4px;
}
.card .label {
  font-size: 12px;
  color: var(--muted);
}
.panel {
  margin-bottom: 16px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.grid2 {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
}
.overview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  margin-bottom: 16px;
}
.overview-grid > .panel {
  margin-bottom: 0;
}
.overview-side {
  min-width: 0;
  display: grid;
  grid-template-rows: repeat(2, 1fr);
  gap: 4px;
}
.overview-side .panel {
  margin-bottom: 0;
  padding: 10px 16px;
}
.overview-side .panel-head {
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}
.overview-side .detail-list {
  gap: 2px;
}
.prediction-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
}
.prediction-form-grid > div {
  min-width: 0;
}
.prediction-form-grid textarea {
  min-height: 94px;
}
.prediction-form-grid #kb-text {
  min-height: 132px;
}
.prediction-form-grid .muted {
  margin-top: 6px;
  font-size: 12px;
}
.prediction-form-grid #kb-status {
  display: block;
  margin-top: 6px;
}
.routing-editor .actions {
  margin-top: 16px;
}
.badge {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 10px;
  padding: 2px 6px;
  color: var(--muted);
}
.badge.blue {
  color: var(--primary);
  background: var(--tint);
  border-color: var(--tint);
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}
.quality-section {
  margin: 14px 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}
.quality-section .panel-head {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}
.quality-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.quality-card {
  display: flex;
  align-items: center;
  gap: 10px;
  height: auto;
  min-height: 56px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  text-align: left;
  white-space: normal;
  cursor: pointer;
}
.quality-card:hover,
.quality-card:focus-visible {
  border-color: var(--primary);
}
.quality-card > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.quality-card strong {
  flex: none;
  font-size: 21px;
  line-height: 1;
}
.quality-card strong small {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.quality-dialog {
  max-width: 760px;
}
.quality-score-summary {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-top: 12px;
}
.quality-score-summary > strong {
  flex: none;
  font-size: 30px;
  line-height: 1.2;
}
.quality-score-summary small {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
.quality-score-summary > span {
  color: var(--muted);
}
.quality-bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}
.quality-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}
.quality-total-bar {
  margin: 12px 0 16px;
}
.quality-breakdown .quality-factor {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.quality-factor-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px 16px;
  flex-wrap: wrap;
}
.quality-factor-heading strong {
  white-space: nowrap;
}
.quality-factor-weight {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.quality-factor-bar {
  margin-top: 8px;
}
.quality-breakdown p {
  margin: 6px 0 0;
  color: var(--muted);
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}
th {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  background: var(--bg);
}
th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
td {
  font-size: 12px;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: var(--bg);
}
.overview-source-table tbody tr:first-child,
.overview-source-table tbody tr:first-child:hover {
  background: var(--tint);
  font-weight: 600;
}
.overview-source-table tbody tr:first-child td {
  border-bottom: 2px solid var(--primary);
}
.empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}
.empty h2 {
  color: var(--text);
  margin-bottom: 8px;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 0;
  color: var(--muted);
  font-size: 12px;
}
.pager select {
  width: 72px;
}
.error {
  padding: 12px;
  border: 1px solid var(--danger);
  border-radius: 4px;
  color: var(--danger);
  margin-bottom: 16px;
}
.note {
  padding: 12px 16px;
  background: var(--tint);
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.6;
  margin: 16px 0;
}
.overview-footer {
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.fields .wide {
  grid-column: 1/-1;
}
.actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* Usage chart */
.chart {
  display: flex;
  height: 180px;
  align-items: flex-end;
  gap: 6px;
  padding-top: 20px;
  border-bottom: 1px solid var(--line);
}
.bar-group {
  height: 100%;
  flex: 1;
  min-width: 4px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
}
.bar {
  background: var(--primary);
  min-height: 2px;
  border-radius: 2px 2px 0 0;
}
.chart-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin-top: 8px;
}
.chart-empty-note {
  margin-top: 12px;
  font-size: 12px;
}
.meter {
  height: 6px;
  background: var(--line);
  border-radius: 4px;
  margin: 16px 0;
  overflow: hidden;
}
.meter span {
  display: block;
  height: 100%;
  background: var(--primary);
}

/* Details and request results */
.detail-list {
  display: grid;
  gap: 12px;
}
.detail-list > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.detail-list dt {
  color: var(--muted);
  font-size: 12px;
}
.detail-list dd {
  margin: 0;
  text-align: right;
  font-size: 12px;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 16px;
}
.detail {
  max-height: 75vh;
  overflow: auto;
}
.detail pre,
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    12px/1.6 "Fira Code",
    monospace;
  background: var(--bg);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

/* Sign-in screen */
.login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.login-brand {
  padding: 64px;
  background: var(--tint);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-copy {
  max-width: 440px;
  margin: auto 0;
}
.login-copy h1 {
  font-size: 20px;
  line-height: 1.5;
  margin: 24px 0 16px;
}
.login-copy p {
  color: var(--muted);
  line-height: 1.8;
}
.login-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.login-box {
  max-width: 360px;
  width: 100%;
}
.login-box h2 {
  margin: 16px 0 8px;
}
.login-box button {
  margin: 24px 0;
  width: 100%;
}
.login-decoration {
  display: grid;
  gap: 8px;
  margin-top: 32px;
}
.login-decoration div {
  padding: 16px;
  border: 1px solid var(--primary);
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}
.login-decoration span {
  color: var(--primary);
}

/* Dialogs and notifications */
dialog {
  max-width: 600px;
  width: calc(100% - 32px);
  max-height: 90vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 24px;
}
dialog::backdrop {
  background: rgba(0, 0, 0, 0.35);
}
.history-dialog {
  max-width: 960px;
}
.import-wizard {
  max-width: 780px;
}
.import-wizard .table-wrap {
  max-height: 42vh;
}
.import-wizard-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.history-dialog .panel-head {
  gap: 12px;
}
.history-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}
.history-controls label {
  margin-top: 0;
}
.history-custom {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 10px;
}
.history-dialog #history-content h3 {
  margin: 20px 0 8px;
}
.history-dialog .chart {
  overflow-x: auto;
}
.history-dialog .table-wrap {
  max-height: 320px;
}
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 420px;
  padding: 16px 24px;
  background: var(--surface);
  border: 1px solid var(--primary);
  border-radius: 4px;
  z-index: 10;
}
.boot {
  padding: 48px;
  color: var(--muted);
}
.mobile-menu {
  display: none;
}
.result {
  margin-top: 16px;
}
.result h3 {
  color: var(--primary);
}
.classification-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.classification-layout .panel {
  min-width: 0;
}
.classification-head {
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.classification-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.classification-actions button {
  white-space: nowrap;
}
.target-picker {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.target-picker legend {
  margin: 12px 0 4px;
  color: var(--muted);
  font-size: 12px;
}
.target-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.target-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
}
.target-options input[type="checkbox"] {
  width: auto;
  min-height: 0;
  margin: 0;
}
#classification-csv {
  height: 210px;
  min-height: 150px;
}
#file-status,
#profile-help {
  margin-top: 6px;
  font-size: 12px;
}
.classification-help {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.classification-help summary {
  cursor: pointer;
}
.classification-help p {
  margin-top: 8px;
}
.classification-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.classification-result-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.classification-result-cards .panel {
  padding: 14px;
  margin: 0;
}
.classification-result-cards p {
  margin: 6px 0;
  overflow-wrap: anywhere;
}
.classification-meta {
  margin-top: 12px;
  font-size: 12px;
}
.result-summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  max-width: 360px;
}

/* Responsive layouts */
/* First-use workspace and the standalone/in-app user guide */
.welcome-hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
  gap: 32px;
  padding: 32px;
  background: var(--surface);
}
.welcome-eyebrow {
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.welcome-hero h2 {
  max-width: 680px;
  margin: 12px 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.18;
}
.welcome-hero p {
  max-width: 690px;
  color: var(--muted);
}
.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.getting-started-api p {
  margin: 12px 0;
}
.getting-started-api p button {
  height: auto;
  padding: 0;
  border: 0;
  color: var(--primary);
  text-decoration: underline;
}
.getting-started-api pre {
  overflow-x: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  font: 12px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.welcome-flow {
  display: grid;
  align-content: center;
  gap: 10px;
}
.welcome-flow span {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--primary);
  font-weight: 700;
}
.welcome-flow b {
  color: var(--text);
  font-weight: 500;
}
.welcome-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.welcome-steps .panel {
  padding: 22px;
}
.welcome-step-number {
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}
.welcome-steps h3 {
  margin: 10px 0;
}
.welcome-steps p,
.welcome-footnote {
  color: var(--muted);
}
.welcome-footnote {
  margin-top: 18px;
}
.guide-standalone-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  max-width: 1060px;
  margin: auto;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
}
.guide-standalone-head strong {
  font-size: 19px;
}
.guide-standalone-head strong span,
.guide-standalone-head a,
.user-guide a {
  color: var(--primary);
}
.user-guide {
  max-width: 1000px;
  margin: 0 auto 80px;
  padding: 10px 28px;
  font-size: 15px;
  line-height: 1.7;
}
.user-guide-intro {
  padding: 8px 0 18px;
}
.user-guide-intro nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.user-guide section {
  padding: 24px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 90px;
}
.user-guide h2 {
  margin: 0 0 12px;
  font-size: 23px;
}
.user-guide p {
  margin: 10px 0;
}
.guide-steps {
  padding-left: 22px;
}
.guide-steps li {
  margin: 12px 0;
}
.guide-note {
  margin-top: 18px;
  padding: 14px 18px;
  border-left: 3px solid var(--primary);
  background: var(--tint);
}
.user-guide pre {
  overflow-x: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  font-size: 13px;
  line-height: 1.5;
}
.user-guide code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

@media (max-width: 1100px) {
  .overview-side {
    grid-template-rows: auto;
  }
  .topbar-inner {
    gap: 12px;
  }
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid2,
  .classification-layout,
  .split {
    grid-template-columns: 1fr;
  }
  .detail {
    max-height: none;
  }
}
@media (max-width: 1000px) {
  .topbar-inner {
    min-height: 64px;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 16px;
  }
  .primary-nav {
    display: none;
    order: 4;
    flex-basis: 100%;
    align-items: stretch;
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }
  .layout.menu-open .primary-nav {
    display: grid;
  }
  .mobile-menu {
    display: inline-block;
    margin-left: auto;
  }
  .topbar-actions {
    margin-left: 0;
  }
  .nav-trigger {
    width: 100%;
    justify-content: flex-start;
  }
}
@media (max-width: 700px) {
  .import-wizard-options {
    grid-template-columns: 1fr;
  }
  .brand {
    font-size: 16px;
  }
  .product {
    font-size: 10px;
  }
  .content {
    padding: 20px 16px;
  }
  .page-head {
    flex-direction: column;
  }
  .page-head:has(.cache-header-actions) {
    align-items: flex-start;
  }
  .overview-header-actions {
    justify-content: flex-start;
  }
  .history-controls,
  .history-custom {
    grid-template-columns: 1fr;
  }
  .cards {
    gap: 8px;
  }
  .card {
    padding: 16px;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .fields .wide {
    grid-column: auto;
  }
  .prediction-form-grid {
    grid-template-columns: 1fr;
  }
  .classification-result-cards {
    grid-template-columns: 1fr;
  }
  .welcome-hero,
  .welcome-steps {
    grid-template-columns: 1fr;
  }
  .welcome-hero {
    padding: 22px;
  }
  .user-guide {
    padding: 8px 18px;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-brand {
    padding: 24px;
  }
  .login-copy,
  .login-decoration {
    display: none;
  }
  .login-form {
    padding: 48px 24px;
  }
  .toolbar input {
    max-width: 100%;
  }
}
