@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("fonts/barlow-semi-condensed-700.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --surface-base: #080d1c;
  --surface-deep: #000119;
  --surface-panel: #101b31;
  --surface-raised: #172e50;
  --text-primary: #ffffff;
  --text-secondary: #bac9e1;
  --text-link: #80c6ff;
  --subtle: var(--text-secondary);
  --line: #344663;
  --dark-line: var(--line);
  --brand-soft: #142e50;
  --display-font: "Barlow Semi Condensed", var(--font);
}

html {
  scrollbar-color: #536b93 var(--surface-base);
}

body {
  background: var(--surface-base);
  color: var(--text-primary);
}

:focus-visible {
  outline-color: var(--brand-light);
}

input, textarea, select {
  caret-color: var(--text-link);
}

main :is(h1, h2, h3, h4) {
  font-family: var(--display-font);
  font-weight: 700;
  letter-spacing: -.025em;
}

.site-header {
  position: sticky;
  top: 0;
  background: var(--surface-deep);
  border-bottom-color: var(--line);
}

.header-inner {
  height: 88px;
}

.nav-link {
  color: var(--text-secondary);
  font-size: .9rem;
}

.nav-link:is(:hover, [aria-current="page"], [aria-current="location"]) {
  color: var(--text-link);
}

.site-footer {
  background: var(--surface-deep);
  border-top: 1px solid var(--line);
}

.site-footer :is(.muted, p, .section-kicker, .footer-note, .footer-bottom),
.footer-links > span:not(.section-kicker) {
  color: var(--text-secondary);
}

.page-hero,
.page-hero-dark {
  background: var(--surface-deep);
  color: var(--text-primary);
  border-bottom-color: var(--line);
}

.page-hero h1 {
  font-size: clamp(2.7rem, 5.8vw, 5.3rem);
  line-height: 1.02;
}

.page-hero :is(p, .breadcrumbs),
.page-hero-dark :is(p, .breadcrumbs),
.section-lead,
.muted {
  color: var(--text-secondary);
}

.text-link,
.prose a,
.breadcrumbs a:hover,
.auth-switch a,
.software-releases summary,
.ccid-technical summary,
.ccid-session-notice > span,
.app-price,
.badge {
  color: var(--text-link);
}

.text-link:hover,
.prose a:hover,
.auth-switch a:hover,
.contact-details a:hover {
  color: var(--white);
}

.button-primary,
.button-dark {
  background: var(--brand-hover);
  color: var(--white);
}

.button-primary:hover,
.button-dark:hover {
  background: var(--brand);
}

.button-light {
  background: var(--surface-raised);
  color: var(--white);
  border-color: #54749d;
}

.button-light:hover,
.button-outline:hover {
  background: #203e66;
  color: var(--white);
}

.button-outline {
  color: var(--text-link);
  border-color: #54749d;
}

:is(.panel, .auth-card, .app-card, .release-item, .payment-option, .ccid-pending-panel, .drop-zone) {
  background: var(--surface-panel);
  color: var(--text-primary);
  border-color: var(--line);
}

.app-card:hover {
  border-color: #759dcf;
}

.utility-card .app-card-header {
  justify-content: flex-end;
}

.app-icon {
  background: var(--brand-soft);
  color: var(--text-link);
}

.app-status {
  color: var(--text-secondary);
}

.app-status::before,
.app-status.planned::before {
  background: var(--text-link);
}

.app-card p,
.panel > p,
.release-item p,
.detail-aside p,
.auth-card p,
.auth-intro p,
.prose {
  color: var(--text-secondary);
}

.app-card p {
  font-size: .95rem;
  line-height: 1.65;
}

.app-status,
.badge {
  font-size: .7rem;
}

.prose :is(h2, h3),
td:first-child,
.ccid-description,
.ccid-technical dd,
.ccid-guidance code {
  color: var(--text-primary);
}

.detail-aside {
  background: var(--surface-panel);
  border: 1px solid var(--line);
}

.detail-aside .text-link {
  display: flex;
  width: fit-content;
  min-height: 44px;
}

.contact-banner,
.platform-section {
  background: #102345;
  color: var(--text-primary);
}

.platform-section :is(.section-kicker, .section-lead, .feature-list) {
  color: var(--text-secondary);
}

.service-row:hover,
.account-sidebar a:hover {
  background: var(--surface-raised);
}

.service-row:hover .service-arrow {
  background: var(--brand-hover);
  color: var(--white);
}

:where(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]):not([type="button"]):not([type="submit"]), textarea, select),
.form-stack input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.form-stack textarea,
.form-stack select,
.ccid-toolbar input,
.ccid-toolbar select,
.ccid-table select,
.ambient-scheme-select,
.ambient-hex-wrap input,
.ambient-upload-form input[type="file"],
.ccid-upload-form input[type="file"] {
  background: var(--surface-base);
  border-color: #536b93;
  color: var(--text-primary);
}

input::placeholder,
textarea::placeholder {
  color: #9daec8;
  opacity: 1;
}

input:is(:-webkit-autofill, :-webkit-autofill:hover, :-webkit-autofill:focus) {
  -webkit-text-fill-color: var(--text-primary);
  box-shadow: 0 0 0 1000px var(--surface-base) inset;
  caret-color: var(--text-link);
}

option,
optgroup {
  background: var(--surface-panel);
  color: var(--text-primary);
}

input:disabled,
textarea:disabled,
select:disabled {
  color: var(--text-secondary);
  opacity: .65;
}

.drop-zone input[type="file"]::file-selector-button,
.ccid-upload-form input[type="file"]::file-selector-button {
  background: var(--brand-hover);
  color: var(--white);
  border: 1px solid #54749d;
}

th {
  background: var(--surface-deep);
  color: var(--text-secondary);
}

tbody tr:hover {
  background-color: #172e5066;
}

.status {
  background: var(--surface-raised);
  color: var(--text-secondary);
}

.status-completed,
.status-paid,
.status-processing {
  background: var(--brand-soft);
  color: var(--text-link);
}

.status-failed,
.status-cancelled,
.message-error,
.errorlist {
  background: #351c28;
  color: #ffb4b4;
  border-color: #ce6573;
}

.status-queued,
.status-pending,
.message-warning {
  background: #332b1a;
  color: #f7d897;
  border-color: #b79853;
}

.message,
.message-info,
.message-success,
.message-status {
  background: var(--brand-soft);
  color: var(--text-link);
}

.message-error {
  background: #351c28;
  color: #ffb4b4;
}

.message-warning {
  background: #332b1a;
  color: #f7d897;
}

.danger-button {
  color: #ffb4b4;
}

.danger-button:hover {
  color: #ffd1d1;
}

.account-sidebar a.active,
.account-sidebar a[aria-current="page"],
.badge,
.ccid-id,
.ccid-change-label {
  color: var(--text-link);
}

.stat-item,
.progress-line,
.ccid-upload-form input[type="file"],
.ccid-sessions-section,
.ccid-session-notice,
.ccid-technical dl {
  background: var(--surface-panel);
}

.ccid-pending-icon {
  background: #332b1a;
  color: #f7d897;
}

.ccid-table-panel .table-wrap {
  overscroll-behavior-inline: contain;
}

.auth-modal,
.auth-modal__frame,
.auth-modal__fallback {
  background: var(--surface-panel);
  color: var(--text-primary);
}

.auth-modal__main,
.auth-modal__intro {
  background: var(--surface-deep);
}

.auth-modal__intro h2 {
  font-family: var(--display-font);
  font-weight: 700;
  letter-spacing: -.025em;
}

.auth-modal__close {
  background: var(--surface-panel);
  color: var(--text-primary);
  border-color: #54749d;
}

.auth-modal__close:hover {
  background: var(--surface-raised);
}

.auth-modal__fallback,
.auth-modal__fallback .text-link {
  color: var(--text-secondary);
}

.auth-complete {
  display: grid;
  min-height: 100dvh;
  align-items: center;
  padding: 1.5rem;
}

.auth-complete main {
  width: min(100%, 32rem);
  margin: auto;
}

.ambient-history-section,
.ambient-theme-chip,
.ambient-controls,
.ambient-hex-wrap,
.ambient-file-details dl {
  background: var(--surface-panel);
  border-color: var(--line);
}

.ambient-theme-chip:hover,
.ambient-theme-chip.is-selected,
.ambient-color-control.is-modified .ambient-hex-wrap {
  background: var(--brand-soft);
  border-color: #759dcf;
}

.ambient-theme-chip.is-selected,
.ambient-color-label [data-color-changed],
.ambient-quick-actions .text-link,
.ambient-reset,
.ambient-file-details summary {
  color: var(--text-link);
}

.ambient-theme-chip,
.ambient-color-label label,
.ambient-scene-heading,
.ambient-scene-footer,
.ambient-preview-note,
.ambient-controls-hint,
.ambient-export-bar p,
.ambient-file-details dt,
.ambient-hex-wrap > span {
  color: var(--text-secondary);
}

.ambient-file-details dd,
.ambient-scheme-panel legend {
  color: var(--text-primary);
}

.ambient-control-divider,
.ambient-picker-label,
.ambient-export-bar,
.ambient-file-details,
.ambient-hex-wrap > span {
  border-color: var(--line);
}

.ambient-signature-notice {
  background: var(--brand-soft);
  color: var(--text-secondary);
  border-color: #759dcf;
}

.ambient-hex-wrap:has(input[aria-invalid="true"]) {
  border-color: #ffb4b4;
}

.ambient-empty-icon {
  background: var(--brand-soft);
  color: var(--text-link);
}

.ambient-picker-label input[type="color"]::-moz-color-swatch {
  border-color: var(--surface-panel);
}

@media (min-width: 741px) {
  .utility-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .site-header .nav-links {
    left: auto;
    width: min(23rem, 100%);
    padding-inline: 1.5rem;
    background: var(--surface-deep);
    border-left: 1px solid var(--line);
    max-height: calc(100dvh - 88px);
  }
}

@media (max-width: 740px) {
  .header-inner {
    height: 70px;
  }

  .brand-image {
    width: 104px;
    height: auto;
  }

  .site-header .nav-links {
    max-height: calc(100dvh - 70px);
  }
}
