@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/InterVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #070a12;
  --surface: rgba(14, 20, 34, 0.88);
  --surface-strong: #101827;
  --line: rgba(148, 163, 184, 0.17);
  --text: #f5f7fb;
  --muted: #94a3b8;
  --cyan: #17e7d6;
  --cyan-soft: rgba(23, 231, 214, 0.1);
  --violet: #8b5cf6;
  --amber: #f6b73c;
  --danger: #ff5d73;
}

html,
body,
#q-app {
  min-height: 100%;
  background:
    radial-gradient(circle at 14% -10%, rgba(23, 231, 214, 0.11), transparent 32rem),
    radial-gradient(circle at 89% 8%, rgba(139, 92, 246, 0.13), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  letter-spacing: -0.01em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black, transparent 76%);
}

.nicegui-content {
  padding: 0 !important;
}

.app-header {
  position: sticky !important;
  top: 0;
  z-index: 20;
  min-height: 72px;
  padding: 0 24px !important;
  background: rgba(7, 10, 18, 0.76) !important;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, 100%);
  min-height: 72px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
}

.header-actions {
  align-items: center;
  gap: 16px;
}

.header-session-actions {
  align-items: center;
  gap: 8px;
}

.header-username {
  max-width: 150px;
  overflow: hidden;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-logout {
  min-height: 34px !important;
  padding: 0 11px !important;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 9px;
  color: #d9e3ee !important;
  font-size: 11px !important;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.header-logout:hover {
  border-color: rgba(23, 231, 214, .38);
  background: rgba(23, 231, 214, .08) !important;
  color: var(--cyan) !important;
}

.header-link {
  color: #b8c6d6 !important;
  font-size: 12px;
  font-weight: 620;
  text-decoration: none !important;
  transition: color .2s ease;
}

.header-link:hover {
  color: var(--cyan) !important;
}

.brand-lockup {
  align-items: center;
  gap: 12px;
}

.brand-link {
  color: inherit !important;
  text-decoration: none !important;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(23, 231, 214, .46);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(23, 231, 214, .19), rgba(139, 92, 246, .13));
  box-shadow: inset 0 0 20px rgba(23, 231, 214, .08);
  color: var(--cyan);
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
}

.brand-copy,
.heading-copy,
.file-copy,
.metric-copy,
.download-copy,
.page-copy {
  gap: 1px !important;
}

.brand-name {
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .12em;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 11px;
}

.privacy-pill,
.format-pill {
  padding: 7px 11px;
  border: 1px solid rgba(23, 231, 214, .22);
  border-radius: 999px;
  background: var(--cyan-soft);
  color: #7ff7ed;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: .06em;
}

.page-shell {
  width: min(1180px, calc(100% - 40px));
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  gap: 0 !important;
}

.hero {
  align-items: center;
  padding: 78px 0 52px;
  text-align: center;
}

.eyebrow,
.section-kicker,
.metric-label,
.download-format {
  color: var(--cyan);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: .1em;
  line-height: 1.4;
}

.hero-title {
  max-width: 850px;
  margin: 12px 0 0;
  font-size: clamp(38px, 6vw, 70px);
  font-weight: 760;
  letter-spacing: -.055em;
  line-height: 1.02;
}

.hero-copy {
  max-width: 650px;
  margin-top: 15px;
  color: #b2bdcc;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.6;
}

.privacy-note {
  align-items: center;
  gap: 7px;
  margin-top: 21px;
  color: #79dfd7;
  font-size: 13px;
}

.workspace {
  width: 100%;
}

.login-surface {
  width: min(620px, 100%);
  margin: 0 auto;
  padding: clamp(25px, 5vw, 42px) !important;
}

.login-intro,
.login-form {
  width: 100%;
}

.login-intro {
  gap: 6px !important;
}

.login-icon {
  margin-bottom: 12px;
  color: var(--cyan);
}

.login-copy {
  max-width: 510px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.login-form {
  gap: 14px !important;
  margin-top: 26px;
}

.login-action {
  margin-top: 4px;
}

.login-divider {
  width: 100%;
  align-items: center;
  gap: 12px;
  color: #708095;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
}

.login-divider .q-separator {
  flex: 1;
  background: var(--line);
}

.google-login-button,
.email-register-button {
  width: 100%;
  min-height: 46px;
  border-radius: 12px !important;
  color: #e3eaf3 !important;
}

.google-login-button {
  border-color: rgba(148, 163, 184, .32) !important;
}

.provider-unavailable {
  color: #718095;
  font-size: 11px;
  text-align: center;
}

.email-register {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #cbd5e1;
}

.email-register .q-expansion-item__container > .q-item {
  min-height: 50px;
}

.email-register .q-expansion-item__content {
  padding: 0 14px 15px;
}

.email-register .themed-field {
  margin-top: 11px;
}

.email-register-button {
  margin-top: 13px;
  color: var(--cyan) !important;
}

.surface {
  border: 1px solid var(--line) !important;
  border-radius: 20px !important;
  background: var(--surface) !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .28) !important;
  backdrop-filter: blur(18px);
}

.upload-surface {
  position: relative;
  width: 100%;
  padding: clamp(22px, 4vw, 38px) !important;
  overflow: hidden;
}

.upload-surface::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 15%;
  width: 70%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: .65;
}

.section-heading,
.result-heading,
.card-heading,
.review-heading {
  width: 100%;
  align-items: center;
  justify-content: space-between;
}

.account-actions {
  align-items: center;
  gap: 8px;
}

.quota-pill {
  padding: 7px 10px;
  border: 1px solid rgba(23, 231, 214, .22);
  border-radius: 999px;
  background: var(--cyan-soft);
  color: #7ff7ed;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  letter-spacing: .04em;
}

.section-title,
.result-filename {
  font-size: clamp(21px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -.035em;
}

.drop-zone {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 210px;
  margin-top: 26px;
  border: 1px dashed rgba(23, 231, 214, .36) !important;
  border-radius: 16px !important;
  background: rgba(6, 11, 20, .65) !important;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.drop-zone:hover {
  border-color: var(--cyan) !important;
  background: rgba(23, 231, 214, .045) !important;
  transform: translateY(-1px);
}

.drop-zone .q-uploader__header,
.drop-zone .q-uploader__list {
  opacity: 0;
}

.drop-overlay {
  position: absolute;
  z-index: 3;
  top: 128px;
  left: 50%;
  width: min(540px, calc(100% - 70px));
  min-height: 140px;
  transform: translateX(-50%);
  align-items: center;
  justify-content: center;
  gap: 18px;
  cursor: pointer;
  outline: none;
  pointer-events: auto;
  border-radius: 14px;
}

.drop-overlay:focus-visible {
  box-shadow: 0 0 0 2px var(--cyan);
}

.drop-icon {
  padding: 15px;
  border: 1px solid rgba(23, 231, 214, .2);
  border-radius: 14px;
  background: var(--cyan-soft);
  color: var(--cyan);
}

.drop-copy {
  gap: 5px !important;
}

.drop-title {
  font-size: 16px;
  font-weight: 650;
}

.drop-help,
.file-meta,
.option-help,
.card-subtitle,
.character-count,
.page-meta,
.processing-help,
.footer-row,
.review-explanation {
  color: var(--muted);
  font-size: 12px;
}

.file-card {
  width: 100%;
  margin-top: 14px;
  padding: 13px 14px;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(23, 231, 214, .2);
  border-radius: 13px;
  background: var(--cyan-soft);
}

.file-icon,
.metric-icon {
  color: var(--cyan);
}

.file-copy {
  min-width: 0;
  flex: 1;
}

.file-name {
  max-width: 100%;
  overflow: hidden;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  color: var(--muted) !important;
}

.advanced-options {
  width: 100%;
  margin-top: 19px;
  border-top: 1px solid var(--line);
  color: #c5cfdb;
}

.advanced-options .q-expansion-item__container > .q-item {
  padding: 18px 2px 10px;
}

.options-grid {
  width: 100%;
  gap: 16px;
}

.themed-field {
  width: 100%;
}

.password-field {
  margin-top: 14px;
}

.themed-field .q-field__control {
  border-radius: 12px;
}

.enhance-switch {
  margin-top: 10px;
}

.user-admin {
  border-top: 1px solid rgba(139, 92, 246, .28);
}

.admin-fields {
  margin-top: 15px;
}

.admin-create-button {
  min-height: 40px;
  margin-top: 12px;
  border-radius: 10px !important;
  color: var(--cyan) !important;
}

.primary-action,
.secondary-action {
  width: 100%;
  min-height: 52px;
  margin-top: 25px;
  border-radius: 13px !important;
  background: linear-gradient(105deg, #10cbbd, #28e5d7) !important;
  box-shadow: 0 13px 35px rgba(23, 231, 214, .16) !important;
  color: #041313 !important;
  font-size: 15px !important;
  font-weight: 750 !important;
  transition: transform .2s ease, box-shadow .2s ease !important;
}

.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 17px 42px rgba(23, 231, 214, .23) !important;
}

.primary-action.q-btn--disabled {
  background: #202938 !important;
  color: #69778b !important;
  box-shadow: none !important;
}

.processing-surface,
.error-surface {
  width: 100%;
  min-height: 440px;
  align-items: center;
  justify-content: center;
  padding: 48px !important;
  text-align: center;
}

.scanner {
  display: grid;
  width: 116px;
  height: 132px;
  margin-bottom: 20px;
  place-items: center;
}

.scanner-page {
  position: relative;
  width: 82px;
  height: 108px;
  padding: 22px 15px;
  overflow: hidden;
  border: 1px solid rgba(23, 231, 214, .34);
  border-radius: 10px;
  background: linear-gradient(145deg, #141e2d, #0b111c);
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
  transform: rotate(-2deg);
}

.scanner-page span {
  display: block;
  height: 3px;
  margin-bottom: 10px;
  border-radius: 2px;
  background: rgba(148,163,184,.35);
}

.scanner-page span:nth-child(2) { width: 78%; }
.scanner-page span:nth-child(4) { width: 65%; }

.scanner-page i {
  position: absolute;
  inset: 0;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 16px 3px rgba(23,231,214,.48);
  animation: scan 2.1s ease-in-out infinite;
}

@keyframes scan {
  0%, 100% { transform: translateY(6px); opacity: .25; }
  50% { transform: translateY(99px); opacity: 1; }
}

.processing-title {
  margin-top: 8px;
  font-size: clamp(25px, 4vw, 36px);
  font-weight: 730;
  letter-spacing: -.04em;
}

.progress-bar {
  width: min(520px, 90%);
  margin-top: 26px;
}

.progress-label {
  margin-top: 12px;
  color: #c4cfda;
}

.processing-help {
  max-width: 500px;
  margin-top: 7px;
  line-height: 1.5;
}

.error-icon {
  color: var(--danger);
}

.error-copy {
  max-width: 650px;
  margin-top: 10px;
  color: #b8c2cf;
  line-height: 1.6;
}

.error-surface .secondary-action {
  width: auto;
  min-width: 210px;
}

.result-heading {
  margin-bottom: 18px;
}

.success {
  color: #65f1aa;
}

.new-document {
  min-height: 40px;
  border-radius: 11px !important;
  color: #d2dae5 !important;
}

.metrics-grid {
  width: 100%;
  gap: 14px;
}

.metric-card {
  min-width: 0;
  padding: 17px 18px !important;
  flex-direction: row !important;
  align-items: center;
  gap: 12px;
}

.metric-card.metric-alert {
  border-color: rgba(246, 183, 60, .46) !important;
  background: rgba(246, 183, 60, .08) !important;
}

.metric-alert .metric-icon,
.metric-alert .metric-label {
  color: var(--amber);
}

.metric-value {
  overflow: hidden;
  font-size: 15px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-grid {
  width: 100%;
  grid-template-columns: minmax(0, 1.65fr) minmax(290px, .85fr) !important;
  gap: 16px;
  margin-top: 16px;
}

.editor-card {
  min-width: 0;
  padding: 22px !important;
}

.copy-button {
  color: var(--cyan) !important;
}

.text-editor {
  width: 100%;
  margin-top: 17px;
}

.text-editor textarea {
  min-height: 470px !important;
  color: #e6edf5 !important;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.75 !important;
}

.text-editor .q-field__control {
  border-radius: 12px;
  background: rgba(5, 9, 16, .62);
}

.character-count {
  align-self: flex-end;
  margin-top: 8px;
  font-family: "JetBrains Mono", monospace;
}

.result-sidebar {
  min-width: 0;
  gap: 16px !important;
}

.review-card,
.download-card {
  width: 100%;
  padding: 21px !important;
}

.review-alert {
  border-color: rgba(246, 183, 60, .33) !important;
}

.review-alert .section-kicker,
.review-alert .review-icon {
  color: var(--amber);
}

.review-explanation {
  margin-top: 15px;
  line-height: 1.55;
}

.warning-row {
  width: 100%;
  align-items: flex-start;
  gap: 5px;
  margin-top: 11px;
  color: #d8c6a1;
  font-size: 12px;
  line-height: 1.45;
}

.download-list {
  width: 100%;
  gap: 8px !important;
  margin-top: 15px;
}

.download-row {
  width: 100%;
  min-height: 60px;
  padding: 9px 10px !important;
  justify-content: flex-start !important;
  border: 1px solid var(--line);
  border-radius: 12px !important;
  color: #dce4ee !important;
}

.download-row:hover {
  border-color: rgba(23,231,214,.35);
  background: var(--cyan-soft) !important;
}

.download-copy {
  flex: 1;
  align-items: flex-start;
  margin-left: 7px;
}

.download-label {
  font-weight: 620;
}

.download-format {
  color: var(--muted);
  font-size: 9px;
}

.download-arrow {
  color: var(--cyan);
}

.page-details {
  width: 100%;
  margin-top: 16px;
  color: #d4dce7;
}

.page-details .q-item {
  min-height: 66px;
  padding: 12px 20px;
}

.page-list {
  width: 100%;
  padding: 0 20px 18px;
  gap: 10px !important;
}

.page-row {
  width: 100%;
  padding: 13px;
  align-items: flex-start;
  border-top: 1px solid var(--line);
}

.page-number {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 8px;
  background: var(--cyan-soft);
  color: var(--cyan);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}

.page-method {
  font-size: 13px;
  font-weight: 650;
}

.low-line {
  max-width: 100%;
  margin-top: 6px;
  overflow: hidden;
  color: #e2bd75;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.explanation-section {
  width: 100%;
  padding: 112px 0 56px;
  gap: 24px !important;
  scroll-margin-top: 88px;
}

.explanation-page-shell {
  min-height: calc(100vh - 72px);
}

.explanation-intro {
  max-width: 790px;
  gap: 0 !important;
}

.explanation-title {
  margin-top: 12px;
  font-size: clamp(31px, 5vw, 52px);
  font-weight: 750;
  letter-spacing: -.05em;
  line-height: 1.08;
}

.explanation-lead {
  max-width: 760px;
  margin-top: 18px;
  color: #afbac9;
  font-size: 16px;
  line-height: 1.7;
}

.explanation-summary-grid {
  width: 100%;
  gap: 14px;
  margin-top: 16px;
}

.explanation-summary-card {
  min-width: 0;
  min-height: 210px;
  padding: 23px !important;
  transition: transform .2s ease, border-color .2s ease !important;
}

.explanation-summary-card:hover {
  border-color: rgba(23, 231, 214, .34) !important;
  transform: translateY(-2px);
}

.summary-icon,
.detail-icon {
  color: var(--cyan);
}

.summary-title {
  margin-top: 20px;
  font-size: 18px;
  font-weight: 690;
  letter-spacing: -.025em;
}

.summary-copy,
.step-copy,
.detail-copy {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.summary-copy {
  margin-top: 7px;
}

.explanation-block {
  width: 100%;
  margin-top: 44px;
  gap: 0 !important;
}

.explanation-subtitle {
  margin-top: 7px;
  font-size: clamp(21px, 3vw, 28px);
  font-weight: 710;
  letter-spacing: -.035em;
}

.pipeline-grid {
  position: relative;
  width: 100%;
  gap: 12px;
  margin-top: 22px;
}

.pipeline-step {
  min-width: 0;
  min-height: 195px;
  padding: 21px !important;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  background: rgba(9, 14, 25, .7) !important;
  box-shadow: none !important;
}

.step-number {
  color: var(--cyan);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: .09em;
}

.step-title {
  margin-top: 24px;
  font-size: 16px;
  font-weight: 680;
}

.step-copy {
  margin-top: 7px;
}

.details-grid {
  width: 100%;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 14px;
  margin-top: 32px;
}

.explanation-detail-card {
  min-width: 0;
  padding: clamp(22px, 3vw, 30px) !important;
}

.explanation-detail-card .explanation-subtitle {
  margin-top: 20px;
}

.detail-copy {
  margin-top: 12px;
}

.technology-list {
  margin-top: 20px;
  gap: 7px;
}

.technology-pill {
  padding: 6px 9px;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 8px;
  background: rgba(148, 163, 184, .06);
  color: #c7d1dd;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
}

.endpoint-list {
  width: 100%;
  gap: 7px !important;
  margin-top: 19px;
}

.endpoint-row {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(4, 8, 15, .52);
}

.endpoint-method {
  min-width: 38px;
  color: var(--cyan);
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  font-weight: 700;
}

.method-post {
  color: #65f1aa;
}

.endpoint-path {
  min-width: 0;
  overflow: hidden;
  color: #cbd6e2;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.endpoint-copy {
  min-width: 0;
  flex: 1;
  gap: 2px !important;
}

.endpoint-description {
  color: #8291a4;
  font-size: 10px;
  line-height: 1.4;
}

.external-note {
  width: 100%;
  margin-top: 17px;
  padding: 13px;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid rgba(246, 183, 60, .25);
  border-radius: 11px;
  background: rgba(246, 183, 60, .065);
  color: #d9c7a7;
  font-size: 11px;
  line-height: 1.55;
}

.external-note .q-icon {
  flex: 0 0 auto;
  color: var(--amber);
}

.external-note .q-label {
  flex: 1;
}

.service-notes-grid {
  margin-top: 0;
}

.cost-list {
  width: 100%;
  gap: 8px !important;
  margin-top: 18px;
}

.cost-row {
  align-items: flex-start;
  gap: 8px;
  color: #c3cedb;
  font-size: 12px;
}

.cost-row .q-icon {
  color: #65f1aa;
}

.license-note {
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: #8291a4;
  font-size: 10px;
  line-height: 1.55;
}

.api-guide {
  width: 100%;
  margin-top: 18px;
  padding: clamp(22px, 4vw, 34px) !important;
}

.api-guide-list {
  width: 100%;
  gap: 8px !important;
  margin-top: 23px;
}

.api-guide .endpoint-row {
  padding: 12px 13px;
}

.api-guide .endpoint-method {
  min-width: 48px;
}

.history-page-shell {
  min-height: calc(100vh - 72px);
  padding-top: 70px;
}

.history-title-row {
  width: 100%;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.history-title {
  margin-top: 10px;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 750;
  letter-spacing: -.05em;
  line-height: 1.08;
}

.history-lead {
  max-width: 650px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.history-primary-link {
  display: inline-flex;
  min-height: 42px;
  padding: 0 16px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(23, 231, 214, .35);
  border-radius: 11px;
  color: var(--cyan) !important;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none !important;
}

.history-auth-card,
.history-empty {
  width: min(620px, 100%);
  margin: 70px auto 0;
  padding: 42px !important;
  align-items: center;
  text-align: center;
}

.history-auth-card .history-primary-link,
.history-empty .history-primary-link {
  margin-top: 20px;
}

.history-grid {
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px;
  margin-top: 34px;
}

.history-card {
  min-width: 0;
  padding: 22px !important;
}

.history-card-heading {
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.history-card-copy {
  min-width: 0;
  flex: 1;
  gap: 2px !important;
}

.history-filename {
  max-width: 100%;
  overflow: hidden;
  font-size: 16px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-meta,
.history-expiry {
  color: #8190a3;
  font-size: 10px;
}

.history-tags {
  width: 100%;
  margin-top: 19px;
  gap: 6px;
}

.history-tag {
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #aebbc9;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
}

.history-expiry {
  margin-top: 15px;
}

.history-open-button {
  width: 100%;
  min-height: 41px;
  margin-top: 17px;
  border-radius: 10px !important;
  color: var(--cyan) !important;
}

.history-detail-nav {
  width: 100%;
  margin-top: 30px;
  align-items: center;
  justify-content: space-between;
}

.history-detail-nav .history-expiry {
  margin-top: 0;
}

.history-detail-grid {
  width: 100%;
  grid-template-columns: minmax(0, 1.65fr) minmax(290px, .85fr) !important;
  gap: 16px;
  margin-top: 16px;
}

.history-editor-card {
  min-width: 0;
}

.history-delete-card {
  width: 100%;
  padding: 20px !important;
  border-color: rgba(255, 93, 115, .25) !important;
}

.danger-kicker {
  color: var(--danger);
}

.history-delete-button {
  width: 100%;
  min-height: 41px;
  margin-top: 13px;
  border-radius: 10px !important;
  color: var(--danger) !important;
}

.confirm-delete-dialog {
  width: min(460px, calc(100vw - 32px));
  padding: 26px !important;
}

.dialog-actions {
  width: 100%;
  margin-top: 22px;
  justify-content: flex-end;
}

.footer-link {
  color: var(--cyan) !important;
  text-decoration: none !important;
}

.creator-credit {
  align-items: center;
  gap: 5px;
  color: #8190a3;
}

.creator-credit a {
  color: var(--cyan) !important;
  text-decoration: none !important;
}

.statistics-page-shell {
  padding-top: 70px;
}

.statistics-intro {
  width: 100%;
}

.statistics-title {
  color: var(--text);
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 730;
  letter-spacing: -.055em;
  line-height: .95;
}

.statistics-lead {
  max-width: 700px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.statistics-metrics-grid {
  width: 100%;
  gap: 12px;
  margin-top: 34px;
}

.statistics-metric-card {
  min-height: 155px;
  padding: 21px !important;
}

.statistics-metric-value {
  margin-top: 19px;
  color: var(--text);
  font-size: 32px;
  font-weight: 720;
  line-height: 1;
}

.statistics-metric-label {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.statistics-chart-card {
  width: 100%;
  margin-top: 14px;
  padding: 24px !important;
}

.statistics-chart {
  width: 100%;
  height: 390px;
  margin-top: 12px;
}

.statistics-chart.user-chart {
  height: 320px;
}

.statistics-note {
  margin-top: 16px;
  color: #8190a3;
  font-size: 11px;
  line-height: 1.6;
}

.admin-statistics-link {
  display: inline-flex;
  margin-top: 16px;
  color: var(--cyan) !important;
  font-size: 12px;
  text-decoration: none !important;
}

.api-docs-page-shell {
  padding-top: 70px;
}

.api-docs-title-row {
  width: 100%;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.api-docs-title {
  color: var(--text);
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 730;
  letter-spacing: -.055em;
  line-height: .95;
}

.api-docs-lead {
  max-width: 680px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.api-docs-external-link {
  flex: none;
  color: var(--cyan) !important;
  text-decoration: none !important;
}

.api-role-row {
  width: 100%;
  margin-top: 30px;
  align-items: center;
  gap: 12px;
}

.api-role-badge {
  padding: 7px 10px;
  border-radius: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: .08em;
}

.api-role-badge.admin {
  border: 1px solid rgba(255, 188, 73, .32);
  background: rgba(255, 188, 73, .09);
  color: #ffc868;
}

.api-role-badge.user {
  border: 1px solid rgba(23, 231, 214, .3);
  background: var(--cyan-soft);
  color: #7ff7ed;
}

.api-role-description {
  color: var(--muted);
  font-size: 12px;
}

.api-key-card {
  width: 100%;
  margin-top: 14px;
  padding: 24px !important;
}

.api-key-auth-card {
  flex-direction: row !important;
  align-items: center;
  gap: 18px;
}

.api-key-auth-card .history-primary-link {
  flex: none;
  margin-left: auto;
}

.api-key-heading {
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
}

.api-key-copy {
  min-width: 0;
  gap: 3px !important;
}

.api-key-title {
  color: var(--text);
  font-size: 21px;
  font-weight: 680;
}

.personal-key-field {
  width: 100%;
  margin-top: 17px;
  font-family: "JetBrains Mono", monospace;
}

.personal-key-field input {
  font-size: 12px !important;
  letter-spacing: .015em;
}

.api-key-actions {
  margin-top: 12px;
  align-items: center;
  gap: 8px;
}

.api-key-actions .history-delete-button {
  width: auto;
  min-height: 40px;
  margin-top: 0;
  color: var(--muted) !important;
}

.api-key-warning {
  margin-top: 13px;
  color: #8492a5;
  font-size: 11px;
  line-height: 1.55;
}

.api-quick-grid {
  width: 100%;
  gap: 12px;
  margin-top: 36px;
}

.api-quick-card {
  min-height: 190px;
  padding: 22px !important;
}

.api-step-number {
  color: var(--cyan);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: .12em;
}

.api-step-title {
  margin-top: 25px;
  color: var(--text);
  font-size: 17px;
  font-weight: 650;
}

.api-step-copy {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.api-docs-notice {
  width: 100%;
  margin-top: 14px;
  padding: 15px 18px;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
  border: 1px solid rgba(32, 215, 255, .18);
  border-radius: 12px;
  background: rgba(32, 215, 255, .055);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.api-docs-notice .q-icon {
  flex: none;
  color: var(--cyan);
}

.api-examples-section {
  width: min(1680px, calc(100vw - 32px));
  margin-top: 38px;
  margin-left: 50%;
  transform: translateX(-50%);
}

.api-examples-lead {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.api-language-tabs {
  width: 100% !important;
  max-width: none !important;
  margin-top: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.api-language-tabs .q-tab--active {
  color: var(--cyan) !important;
}

.api-language-panels,
.api-language-panel {
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  background: transparent !important;
}

.api-language-panels .q-panel,
.api-language-panels .q-tab-panel {
  width: 100% !important;
  min-width: 100% !important;
  max-width: none !important;
}

.api-examples-list {
  width: 100% !important;
  max-width: none !important;
  align-self: stretch;
  padding-top: 14px;
  gap: 12px !important;
}

.api-example-card {
  width: 100% !important;
  max-width: none !important;
  align-self: stretch;
  min-width: 0;
  padding: 22px !important;
}

.api-example-heading {
  width: 100%;
  align-items: center;
  justify-content: space-between;
}

.api-example-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
}

.api-example-language {
  color: var(--cyan);
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.api-example-code {
  width: 100% !important;
  max-width: none !important;
  align-self: stretch;
  margin-top: 13px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #090d16 !important;
  font-size: 12px !important;
}

.swagger-frame {
  width: min(1680px, calc(100vw - 32px));
  height: max(1500px, calc(100vh - 110px));
  margin-top: 18px;
  margin-left: 50%;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fafafa;
}

.footer-row {
  width: 100%;
  padding: 32px 2px 40px;
  justify-content: space-between;
}

@media (max-width: 760px) {
  .app-header {
    padding: 0 16px !important;
  }

  .privacy-pill {
    display: none;
  }

  .header-actions {
    gap: 10px;
  }

  .header-link {
    font-size: 10px;
  }

  .header-username {
    display: none;
  }

  .header-logout {
    width: 34px;
    min-width: 34px !important;
    padding: 0 !important;
  }

  .header-logout .q-btn__content > span:not(.q-icon) {
    display: none;
  }

  .page-shell {
    width: min(100% - 24px, 1180px);
  }

  .hero {
    padding: 52px 8px 35px;
  }

  .hero-title {
    font-size: clamp(38px, 12vw, 54px);
  }

  .section-heading,
  .result-heading {
    align-items: flex-start;
    gap: 12px;
  }

  .format-pill {
    display: none;
  }

  .drop-overlay {
    top: 141px;
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .options-grid,
  .metrics-grid,
  .result-grid,
  .explanation-summary-grid,
  .pipeline-grid,
  .details-grid,
  .statistics-metrics-grid,
  .history-grid,
  .history-detail-grid {
    grid-template-columns: 1fr !important;
  }

  .history-page-shell {
    padding-top: 45px;
  }

  .statistics-page-shell {
    padding-top: 45px;
  }

  .statistics-chart-card {
    padding: 18px 10px !important;
  }

  .api-docs-page-shell {
    padding-top: 45px;
  }

  .api-docs-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .api-key-auth-card {
    align-items: flex-start;
    flex-direction: column !important;
  }

  .api-key-auth-card .history-primary-link {
    width: 100%;
    margin-left: 0;
  }

  .api-key-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .api-key-actions .q-btn {
    width: 100%;
  }

  .api-role-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .api-quick-grid {
    grid-template-columns: 1fr !important;
  }

  .api-language-tabs .q-tab {
    min-width: auto;
    padding: 0 11px;
    font-size: 11px;
  }

  .api-examples-section {
    width: calc(100vw - 16px);
  }

  .api-quick-card {
    min-height: auto;
  }

  .swagger-frame {
    width: calc(100vw - 16px);
    height: 1250px;
    border-radius: 12px;
  }

  .history-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .history-primary-link {
    width: 100%;
  }

  .explanation-section {
    padding: 78px 0 40px;
  }

  .explanation-summary-card,
  .pipeline-step {
    min-height: auto;
  }

  .endpoint-path {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .processing-surface,
  .error-surface {
    min-height: 400px;
    padding: 32px 20px !important;
  }

  .text-editor textarea {
    min-height: 360px !important;
  }

  .footer-row {
    flex-direction: column;
    gap: 5px;
  }
}

@media (max-width: 520px) {
  .brand-copy {
    display: none;
  }

  .header-actions {
    gap: 6px;
  }

  .header-link {
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
