/*
 * NextCaptain premium aviation design system.
 *
 * Presentation only: existing markup, state, navigation, motion, data flow,
 * accessibility semantics and feature behavior remain owned by the canonical
 * application files.
 */

:root {
  /* NCColors - runtime theme values remain the source of truth. */
  --nc-palette-canvas-dark: #020a18;
  --nc-palette-canvas-light: #f4f7fb;
  --nc-palette-surface-dark: #071529;
  --nc-palette-surface-light: #ffffff;
  --nc-palette-surface-elevated-dark: #0b1c34;
  --nc-palette-surface-elevated-light: #eef2f7;
  --nc-palette-border-dark: #1a3353;
  --nc-palette-border-light: #d9e1ec;
  --nc-palette-text-primary-dark: #f8faff;
  --nc-palette-text-primary-light: #07172f;
  --nc-palette-text-secondary-dark: #a9b5c7;
  --nc-palette-text-secondary-light: #66728a;
  --nc-palette-gold-dark: #f5b63a;
  --nc-palette-gold-light: #eca52e;
  --nc-palette-gold-text-dark: #f5b63a;
  --nc-palette-gold-text-light: #a95f00;
  --nc-palette-blue-dark: #2e8bff;
  --nc-palette-blue-light: #0d67d1;
  --nc-palette-deep-navy-dark: #000714;
  --nc-palette-deep-navy-light: #07172f;
  /* NCColors - official semantic color contract. */
  --nc-color-canvas: var(--nc-palette-canvas-dark);
  --nc-color-surface: var(--nc-palette-surface-dark);
  --nc-color-surface-elevated: var(--nc-palette-surface-elevated-dark);
  --nc-color-border: var(--nc-palette-border-dark);
  --nc-color-text-primary: var(--nc-palette-text-primary-dark);
  --nc-color-text-secondary: var(--nc-palette-text-secondary-dark);
  --nc-color-accent-gold: var(--nc-palette-gold-dark);
  --nc-color-accent-gold-text: var(--nc-palette-gold-text-dark);
  --nc-color-accent-blue: var(--nc-palette-blue-dark);
  --nc-color-deep-navy: var(--nc-palette-deep-navy-dark);
  /* Document identity accents: one stable color per document family. */
  --nc-document-medical: #ff7d86;
  --nc-document-pilot: #5e9bff;
  --nc-document-passport: #5cd38a;
  --nc-document-language: var(--nc-color-accent-gold);
  --nc-document-other: var(--nc-color-text-secondary);
  --nc-canvas: var(--background-primary);
  --nc-canvas-secondary: var(--background-secondary);
  --nc-canvas-deep: var(--navigation-background);
  --nc-surface: var(--surface-card);
  --nc-surface-elevated: var(--surface-elevated);
  --nc-text-primary: var(--text-primary);
  --nc-text-secondary: var(--text-secondary);
  --nc-text-muted: var(--text-muted);
  --nc-accent-blue: var(--accent-primary);
  --nc-accent-blue-glow: var(--accent-secondary);
  --nc-accent-blue-deep: var(--button-primary);
  --nc-accent-gold: #e8be58;
  --nc-accent-gold-deep: #c99a36;
  --nc-success: var(--status-success, #5cd38a);
  --nc-warning: var(--status-warning, #f3c45a);
  --nc-danger: var(--status-error, #ff7d86);
  --nc-border: #d3deed;
  --nc-border-strong: #a9bdd8;
  --nc-overlay: rgba(3, 11, 24, 0.62);
  --nc-on-accent: var(--button-text, #ffffff);
  --nc-feedback-text: #f7faff;
  --nc-feedback-muted: #a9b6cb;
  --nc-bottom-nav-canvas: var(--nc-color-deep-navy);
  --nc-bottom-nav-surface: var(--nc-color-surface-elevated);
  --nc-bottom-nav-border: var(--nc-color-border);
  --nc-bottom-nav-text: var(--nc-color-text-secondary);
  --nc-bottom-nav-active: var(--nc-color-accent-gold-text);
  --nc-bottom-nav-blue: var(--nc-color-accent-blue);
  --nc-bottom-nav-center: var(--nc-color-deep-navy);
  --nc-bottom-nav-center-text: var(--nc-color-accent-gold);

  /* Authentication maps only to the official NCColors contract. */
  --nc-auth-canvas: var(--nc-color-canvas);
  --nc-auth-card: var(--nc-color-surface);
  --nc-auth-card-elevated: var(--nc-color-surface-elevated);
  --nc-auth-tab-strip: var(--nc-color-deep-navy);
  --nc-auth-card-stroke: var(--nc-color-border);
  --nc-auth-input: var(--nc-color-surface-elevated);
  --nc-auth-input-stroke: var(--nc-color-border);
  --nc-auth-input-text: var(--nc-color-text-primary);
  --nc-auth-placeholder: var(--nc-color-text-secondary);
  --nc-auth-primary: color-mix(in srgb, var(--nc-color-accent-blue) 80%, var(--nc-color-deep-navy));
  --nc-auth-primary-pressed: color-mix(in srgb, var(--nc-color-accent-blue) 70%, var(--nc-color-deep-navy));
  --nc-auth-primary-text: var(--nc-palette-surface-light);
  --nc-auth-secondary: var(--nc-color-surface);
  --nc-auth-secondary-text: var(--nc-color-text-primary);
  --nc-auth-tab-active: var(--nc-color-accent-blue);
  --nc-auth-tab-inactive: var(--nc-color-surface-elevated);
  --nc-auth-tab-active-text: var(--nc-color-text-primary);
  --nc-auth-tab-inactive-text: var(--nc-color-text-secondary);
  --nc-auth-label: var(--nc-color-text-secondary);
  --nc-auth-title: var(--nc-color-text-primary);
  --nc-auth-subtitle: var(--nc-color-text-secondary);
  --nc-auth-muted: var(--nc-color-text-secondary);
  --nc-auth-link: var(--nc-color-accent-gold-text);
  --nc-auth-gold: var(--nc-color-accent-gold);
  --nc-auth-gold-deep: var(--nc-color-accent-gold-text);
  --nc-auth-floating-copy-shadow: 0 1px 3px rgba(1, 4, 13, 0.72);
  --nc-accent-blue-soft: color-mix(in srgb, var(--nc-accent-blue) 12%, transparent);
  --nc-accent-blue-soft-strong: color-mix(in srgb, var(--nc-accent-blue) 16%, transparent);
  --nc-accent-blue-border: color-mix(in srgb, var(--nc-accent-blue-glow) 24%, transparent);
  --nc-accent-blue-border-strong: color-mix(in srgb, var(--nc-accent-blue-glow) 50%, transparent);
  --nc-accent-gold-soft: color-mix(in srgb, var(--nc-accent-gold) 10%, transparent);
  --nc-accent-gold-border: color-mix(in srgb, var(--nc-accent-gold) 34%, transparent);
  --nc-muted-soft: color-mix(in srgb, var(--nc-text-muted) 12%, transparent);
  --nc-muted-track: color-mix(in srgb, var(--nc-text-muted) 22%, transparent);
  --nc-surface-glass: color-mix(in srgb, var(--nc-surface) 82%, transparent);
  --nc-nav-glass: color-mix(in srgb, var(--nc-canvas-deep) 90%, transparent);
  --nc-highlight-soft: rgba(255, 255, 255, 0.1);
  --nc-highlight-subtle: rgba(255, 255, 255, 0.04);
  --nc-highlight-strong: rgba(255, 255, 255, 0.16);

  /* NCTypography */
  --nc-font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  --nc-font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --nc-auth-font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  --nc-auth-font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --nc-auth-type-title: 1.02rem;
  --nc-auth-type-subtitle: 0.74rem;
  --nc-auth-type-label: 0.74rem;
  --nc-auth-type-input: 1rem;
  --nc-auth-type-tab: 0.82rem;
  --nc-auth-type-action: 1rem;
  --nc-auth-type-secondary: 1rem;
  --nc-auth-line-control: 1.35;
  --nc-type-caption: 0.75rem;
  --nc-type-label: 0.8125rem;
  --nc-type-body: 0.9375rem;
  --nc-type-subtitle: 1.0625rem;
  --nc-type-title: 1.25rem;
  --nc-type-display: 1.75rem;
  --nc-line-compact: 1.2;
  --nc-line-body: 1.5;
  --nc-weight-regular: 400;
  --nc-weight-medium: 500;
  --nc-weight-semibold: 600;
  --nc-weight-bold: 700;
  --nc-weight-heavy: 800;

  /* NCSpacing */
  --nc-space-1: 4px;
  --nc-space-2: 8px;
  --nc-space-3: 12px;
  --nc-space-4: 16px;
  --nc-space-5: 20px;
  --nc-space-6: 24px;
  --nc-space-8: 32px;

  /* NCRadius */
  --nc-radius-xs: 4px;
  --nc-radius-sm: 6px;
  --nc-radius-md: 8px;
  --nc-radius-round: 999px;

  /* NCElevation */
  --nc-elevation-1: 0 1px 2px rgba(3, 11, 24, 0.06), 0 8px 24px rgba(3, 11, 24, 0.08);
  --nc-elevation-2: 0 2px 8px rgba(3, 11, 24, 0.1), 0 18px 46px rgba(3, 11, 24, 0.12);
  --nc-elevation-overlay: 0 28px 80px rgba(3, 11, 24, 0.3);
  --nc-focus-ring: 0 0 0 3px rgba(75, 141, 255, 0.28);
  --nc-blue-glow: 0 10px 28px rgba(46, 123, 255, 0.2);

  /* NCGradients */
  --nc-canvas-wash: linear-gradient(180deg, #eaf0f8 0, var(--nc-canvas) 280px, var(--nc-canvas) 100%);
  --nc-surface-sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.98), var(--nc-surface));
  --nc-button-fill: var(--nc-accent-blue-deep);
  --nc-media-overlay: linear-gradient(180deg, rgba(3, 11, 24, 0.02) 34%, rgba(3, 11, 24, 0.78) 100%);

  /* NCMotion - aliases only; existing timing remains authoritative. */
  --nc-motion-fast: var(--motion-duration-control, 180ms);
  --nc-motion-standard: var(--motion-duration-standard, 280ms);
  --nc-motion-ease: var(--motion-ease-standard, cubic-bezier(0.2, 0.72, 0.22, 1));
}

[data-theme-tone="dark"] {
  color-scheme: dark;
  --nc-border: rgba(36, 74, 134, 0.6);
  --nc-border-strong: rgba(47, 120, 255, 0.48);
  --nc-overlay: rgba(1, 4, 13, 0.82);
  --nc-elevation-1: 0 1px 2px rgba(0, 0, 0, 0.24), 0 9px 26px rgba(0, 0, 0, 0.2);
  --nc-elevation-2: 0 2px 9px rgba(0, 0, 0, 0.3), 0 20px 52px rgba(0, 0, 0, 0.28);
  --nc-elevation-overlay: 0 30px 90px rgba(0, 0, 0, 0.58);
  --nc-focus-ring: 0 0 0 3px rgba(75, 141, 255, 0.34);
  --nc-blue-glow: 0 8px 24px rgba(47, 120, 255, 0.16);
  --nc-canvas-wash: linear-gradient(180deg, #031027 0%, #010612 100%);
  --nc-surface-sheen: linear-gradient(180deg, rgba(7, 22, 46, 0.96), var(--nc-surface));
  --nc-media-overlay: linear-gradient(180deg, rgba(2, 7, 20, 0.02) 24%, rgba(1, 4, 13, 0.92) 100%);
}

[data-theme-tone="light"] {
  --nc-color-canvas: var(--nc-palette-canvas-light);
  --nc-color-surface: var(--nc-palette-surface-light);
  --nc-color-surface-elevated: var(--nc-palette-surface-elevated-light);
  --nc-color-border: var(--nc-palette-border-light);
  --nc-color-text-primary: var(--nc-palette-text-primary-light);
  --nc-color-text-secondary: var(--nc-palette-text-secondary-light);
  --nc-color-accent-gold: var(--nc-palette-gold-light);
  --nc-color-accent-gold-text: var(--nc-palette-gold-text-light);
  --nc-color-accent-blue: var(--nc-palette-blue-light);
  --nc-color-deep-navy: var(--nc-palette-deep-navy-light);
  --nc-document-medical: #b4233c;
  --nc-document-pilot: var(--nc-color-accent-blue);
  --nc-document-passport: #176b45;
  --nc-document-language: var(--nc-color-accent-gold-text);
  --nc-document-other: var(--nc-color-text-secondary);
  --nc-bottom-nav-canvas: var(--nc-color-surface);
  --nc-bottom-nav-surface: var(--nc-color-surface-elevated);
  --nc-bottom-nav-border: var(--nc-color-border);
  --nc-bottom-nav-text: var(--nc-color-text-secondary);
  --nc-bottom-nav-active: var(--nc-color-accent-gold-text);
  --nc-bottom-nav-blue: var(--nc-color-accent-blue);
  --nc-bottom-nav-center: var(--nc-color-deep-navy);
  --nc-bottom-nav-center-text: var(--nc-color-accent-gold);
  --nc-auth-primary: var(--nc-color-accent-blue);
  --nc-auth-primary-pressed: color-mix(in srgb, var(--nc-color-accent-blue) 88%, var(--nc-color-deep-navy));
}

/* Foundation */

html {
  background: var(--nc-canvas);
}

body {
  background: var(--nc-canvas-wash);
  color: var(--nc-text-primary);
  font-family: var(--nc-font-text);
  font-size: var(--nc-type-body);
  font-weight: var(--nc-weight-regular);
  line-height: var(--nc-line-body);
  letter-spacing: 0;
}

body,
button,
input,
select,
textarea {
  letter-spacing: 0;
}

.app-shell,
.drawer-card,
.news-card,
.news-detail-card,
.public-document-card,
.prep-detail-card,
.confirm-card,
.confirmation-dialog,
.license-document-dialog,
.license-expiry-dialog {
  color: var(--nc-text-primary);
  font-family: var(--nc-font-text);
}

.app-shell :is(h1, h2, h3, h4, h5, h6),
.drawer-card :is(h1, h2, h3, h4),
.news-card :is(h1, h2, h3, h4),
.news-detail-card :is(h1, h2, h3, h4),
.public-document-card :is(h1, h2, h3, h4),
.prep-detail-card :is(h1, h2, h3, h4),
.confirm-card :is(h1, h2, h3, h4),
.confirmation-dialog :is(h1, h2, h3, h4),
.license-document-dialog :is(h1, h2, h3, h4),
.module-card-title-row strong,
.license-template-card strong {
  color: var(--nc-text-primary);
  font-family: var(--nc-font-display);
  letter-spacing: 0;
}

.app-shell h1 {
  font-size: var(--nc-type-display);
  font-weight: var(--nc-weight-heavy);
  line-height: 1.12;
}

.app-shell h2 {
  font-size: var(--nc-type-title);
  font-weight: var(--nc-weight-bold);
  line-height: 1.2;
}

.app-shell h3,
.app-shell h4 {
  font-weight: var(--nc-weight-semibold);
  line-height: 1.3;
}

.app-shell .eyebrow,
.drawer-card .eyebrow,
.news-card .eyebrow,
.news-detail-card .eyebrow,
.public-document-card .eyebrow,
.prep-detail-card .eyebrow {
  color: var(--nc-accent-blue-glow);
  font-size: var(--nc-type-caption);
  font-weight: var(--nc-weight-bold);
  letter-spacing: 0;
  line-height: var(--nc-line-compact);
}

.microcopy,
.field-message,
.module-menu-description,
.panel p,
.panel li,
.policy-card p,
.account-note,
.license-section-heading p {
  color: var(--nc-text-secondary);
}

.app-shell a,
.drawer-card a,
.news-card a,
.news-detail-card a,
.public-document-card a,
.prep-detail-card a {
  color: var(--nc-accent-blue-glow);
  text-underline-offset: 3px;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--nc-accent-blue-glow);
  outline-offset: 3px;
}

/* App chrome and navigation */

.topbar {
  border-bottom-color: var(--nc-border);
}

.nc-wordmark {
  display: inline-flex;
  align-items: baseline;
  max-width: 100%;
  color: var(--nc-color-accent-gold-text);
  font-family: var(--nc-font-display);
  font-weight: var(--nc-weight-heavy);
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.nc-wordmark-initial {
  flex: 0 0 auto;
  font-size: 1em;
  font-weight: var(--nc-weight-medium);
  line-height: 1;
}

.nc-wordmark-rest {
  flex: 0 0 auto;
  font-size: 0.64em;
  font-weight: var(--nc-weight-semibold);
  line-height: 1;
}

.nc-brand-symbol {
  display: block;
  flex: 0 0 auto;
  align-self: center;
  width: auto;
  height: 0.78em;
  max-width: 1.6em;
  margin-inline-start: 0.22em;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.brief-button,
.theme-toggle,
.user-pill,
.topbar-notifications {
  border-color: var(--nc-border);
  background: var(--nc-surface-glass);
  color: var(--nc-text-primary);
  box-shadow: var(--nc-elevation-1);
  backdrop-filter: blur(12px) saturate(112%);
  -webkit-backdrop-filter: blur(12px) saturate(112%);
}

[data-theme-tone="light"] :is(.brief-button, .theme-toggle, .user-pill, .topbar-notifications) {
  background: color-mix(in srgb, var(--nc-surface) 90%, transparent);
}

.brief-button {
  border-radius: var(--nc-radius-md);
}

.brief-button span {
  color: var(--nc-accent-gold);
}

.theme-toggle-icon {
  background: var(--nc-accent-blue-soft);
  color: var(--nc-accent-blue-glow);
}

.user-pill span {
  background: var(--nc-button-fill);
  color: var(--nc-on-accent);
}

.notification-badge {
  border-color: var(--nc-surface);
  background: var(--nc-accent-gold);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--nc-accent-gold) 18%, transparent);
}

.tabs {
  border-color: var(--nc-border);
  background: var(--nc-nav-glass);
  box-shadow: var(--nc-elevation-2), inset 0 1px var(--nc-highlight-subtle);
  backdrop-filter: blur(18px) saturate(112%);
  -webkit-backdrop-filter: blur(18px) saturate(112%);
}

.tab,
.tab-label {
  color: var(--nc-text-muted);
}

.tab-icon {
  background: var(--nc-muted-soft);
  color: var(--nc-text-muted);
}

.tab.active {
  background: var(--nc-accent-blue-soft);
  color: var(--nc-accent-blue-glow);
  box-shadow: inset 0 0 0 1px var(--nc-accent-blue-border);
}

.tab.active .tab-icon {
  background: var(--nc-accent-blue);
  color: var(--nc-on-accent);
}

.tab-main-menu,
.tab-main-menu.active {
  border-color: var(--nc-border-strong);
  background: linear-gradient(145deg, var(--nc-surface-elevated), var(--nc-canvas-secondary));
  color: var(--nc-accent-blue-glow);
  box-shadow: 0 0 0 3px var(--nc-accent-blue-soft), var(--nc-blue-glow);
}

.tab-main-menu.active {
  border-color: var(--nc-accent-blue-border-strong);
  background: var(--nc-button-fill);
  color: var(--nc-on-accent);
}

.tab-main-menu .tab-icon,
.tab-main-menu.active .tab-icon {
  background: var(--nc-highlight-soft);
  color: inherit;
}

/* Screen headings and shared surfaces */

.workspace-heading,
.module-heading {
  border-bottom: 1px solid var(--nc-border);
  padding-bottom: var(--nc-space-3);
}

.workspace-heading > div,
.module-heading > div,
.panel-head > div {
  min-width: 0;
}

.back-to-main {
  border-color: var(--nc-border);
  border-radius: var(--nc-radius-sm);
  background: var(--nc-surface);
  color: var(--nc-text-secondary);
  box-shadow: var(--nc-elevation-1);
}

.back-to-main > span:first-child {
  color: var(--nc-accent-blue-glow);
}

.status-chip,
.module-card-badge,
.forum-category,
.prep-chip-row span {
  border: 1px solid var(--nc-accent-blue-border);
  background: var(--nc-accent-blue-soft);
  color: var(--nc-accent-blue-glow);
}

.points-pill,
.leader-row.top-1 .rank,
.leader-row.top-2 .rank,
.leader-row.top-3 .rank {
  color: var(--nc-accent-gold);
}

.panel,
.quiz-card,
.stat-card,
.policy-card,
.leader-row,
.forum-topic,
.forum-rule,
.prep-track-card,
.access-feature,
.logbook-summary-card,
.logbook-flight-card,
.logbook-period-stack article,
.license-template-card,
.license-document-card,
.account-section,
.theme-card,
.workspace-strip,
.admin-user-row,
.brief-summary-grid article,
.news-detail-context {
  border-color: var(--nc-border);
  border-radius: var(--nc-radius-md);
  background: var(--nc-surface-sheen);
  box-shadow: var(--nc-elevation-1);
}

.panel {
  background: var(--nc-surface-sheen);
}

.stat-card strong,
.logbook-summary-card strong,
.logbook-period-stack strong,
.brief-summary-grid strong {
  color: var(--nc-text-primary);
  font-family: var(--nc-font-display);
  font-variant-numeric: tabular-nums;
}

.stat-card span,
.logbook-summary-card span,
.logbook-period-stack span,
.logbook-period-stack small,
.brief-summary-grid span {
  color: var(--nc-text-secondary);
}

/* Home and module imagery */

.module-card {
  border-color: var(--nc-border);
  border-radius: var(--nc-radius-md);
  background: var(--nc-surface);
  color: var(--nc-text-primary);
  box-shadow: var(--nc-elevation-1);
}

.module-card:hover:not(:disabled),
.module-card:focus-visible {
  border-color: var(--nc-border-strong);
  box-shadow: var(--nc-elevation-2);
}

.module-card-media {
  background: var(--nc-canvas-deep);
}

.module-card-image {
  filter: saturate(0.92) contrast(1.05);
}

[data-theme-tone="dark"] .module-card-image {
  filter: saturate(0.88) contrast(1.08) brightness(0.9);
}

.module-card-media-shade {
  height: 54%;
  background: var(--nc-media-overlay);
}

.module-card-fallback {
  border-color: var(--nc-border-strong);
  background: var(--nc-canvas-deep);
  color: var(--nc-accent-blue-glow);
}

.module-card-body {
  border-top-color: var(--nc-border);
  background: var(--nc-surface);
}

.module-card-title-row strong {
  font-size: 1rem;
  font-weight: var(--nc-weight-bold);
}

.module-card-body > small {
  color: var(--nc-text-secondary);
}

.module-card-mini-icon {
  border: 1px solid var(--nc-accent-blue-border);
  background: var(--nc-accent-blue-soft);
  color: var(--nc-accent-blue-glow);
}

.module-card-arrow {
  color: var(--nc-text-muted);
}

/* Controls and forms */

button,
input,
select,
textarea {
  font-family: var(--nc-font-text);
}

.app-shell :is(select, input, textarea),
.drawer-card :is(select, input, textarea),
.news-card :is(select, input, textarea),
.public-document-card :is(select, input, textarea),
.prep-detail-card :is(select, input, textarea),
.confirm-card :is(select, input, textarea),
.confirmation-dialog :is(select, input, textarea),
.license-document-dialog :is(select, input, textarea) {
  border-color: var(--nc-border);
  border-radius: var(--nc-radius-sm);
  background: var(--nc-surface-elevated);
  color: var(--nc-text-primary);
  font-size: var(--nc-type-body);
  font-weight: var(--nc-weight-medium);
  line-height: 1.35;
}

.app-shell :is(input, textarea)::placeholder,
.drawer-card :is(input, textarea)::placeholder,
.confirmation-dialog :is(input, textarea)::placeholder,
.license-document-dialog :is(input, textarea)::placeholder {
  color: var(--nc-text-muted);
  opacity: 1;
}

.app-shell :is(select, input, textarea):focus,
.drawer-card :is(select, input, textarea):focus,
.news-card :is(select, input, textarea):focus,
.public-document-card :is(select, input, textarea):focus,
.prep-detail-card :is(select, input, textarea):focus,
.confirm-card :is(select, input, textarea):focus,
.confirmation-dialog :is(select, input, textarea):focus,
.license-document-dialog :is(select, input, textarea):focus {
  border-color: var(--nc-accent-blue-glow);
  box-shadow: var(--nc-focus-ring);
}

.field-label,
label > .field-label {
  color: var(--nc-text-secondary);
  font-size: var(--nc-type-caption);
  font-weight: var(--nc-weight-semibold);
}

.primary-action,
.secondary-action,
.danger-action,
.icon-button,
.segment,
.compact {
  border-radius: var(--nc-radius-sm);
  font-weight: var(--nc-weight-semibold);
}

.primary-action {
  border: 1px solid var(--nc-accent-blue-border-strong);
  background: var(--nc-button-fill);
  color: var(--nc-on-accent);
  box-shadow: var(--nc-blue-glow), inset 0 1px var(--nc-highlight-strong);
}

.primary-action:hover:not(:disabled),
.primary-action:focus-visible {
  filter: brightness(1.06);
}

.secondary-action,
.icon-button {
  border-color: var(--nc-border-strong);
  background: var(--nc-surface-elevated);
  color: var(--nc-text-primary);
  box-shadow: var(--nc-elevation-1);
}

.danger-action {
  border-color: color-mix(in srgb, var(--nc-danger) 48%, transparent);
  background: color-mix(in srgb, var(--nc-danger) 11%, var(--nc-surface));
  color: var(--nc-danger);
}

.segmented,
.login-mode-selector {
  border-color: var(--nc-border);
  background: var(--nc-canvas-secondary);
}

.segment {
  color: var(--nc-text-secondary);
}

.segment.active {
  background: var(--nc-surface-elevated);
  color: var(--nc-accent-blue-glow);
  box-shadow: inset 0 0 0 1px var(--nc-border-strong), var(--nc-elevation-1);
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--nc-accent-blue);
}

/* Authentication */

.login-card {
  --ink: var(--nc-auth-input-text);
  --muted: var(--nc-auth-muted);
  --text-primary: var(--nc-auth-title);
  --text-secondary: var(--nc-auth-subtitle);
  --text-muted: var(--nc-auth-muted);
  --line: var(--nc-auth-card-stroke);
  --border-default: var(--nc-auth-input-stroke);
  --surface: var(--nc-auth-card);
  --surface-2: var(--nc-auth-card-elevated);
  --input-background: var(--nc-auth-input);
  --accent: var(--nc-auth-link);
  --accent-primary: var(--nc-auth-tab-active);
  --action-bg: var(--nc-auth-primary);
  --action-bg-2: var(--nc-auth-primary-pressed);
  --action-ink: var(--nc-auth-primary-text);
  border-color: var(--nc-auth-card-stroke);
  color: var(--nc-auth-title);
  font-family: var(--nc-auth-font-text);
  letter-spacing: 0;
  gap: 10px;
  width: min(calc(100% - 36px), 420px);
  padding: 12px;
  box-shadow: 0 18px 44px color-mix(in srgb, var(--nc-auth-canvas) 58%, transparent), inset 0 1px color-mix(in srgb, var(--nc-auth-title) 7%, transparent);
}

.login-card-header {
  border-color: var(--nc-auth-card-stroke);
  border-radius: var(--nc-radius-md);
  padding: 10px;
  background: var(--nc-auth-card);
  box-shadow: inset 2px 0 var(--nc-auth-gold);
}

.login-brand-lockup > img {
  flex-basis: 44px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--nc-auth-card-stroke);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--nc-auth-canvas) 62%, transparent);
}

.login-brand-lockup h1 {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  color: var(--nc-color-accent-gold-text);
  font-family: var(--nc-auth-font-display);
  font-size: var(--nc-auth-type-title);
  font-weight: var(--nc-weight-bold);
  letter-spacing: 0;
  line-height: 1.12;
  white-space: nowrap;
}

.login-brand-lockup h1 .nc-brand-symbol,
.login-intro-title .nc-brand-symbol {
  height: 0.82em;
  max-width: 1.7em;
}

.login-intro-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  white-space: nowrap;
}

@media (max-width: 360px) {
  .login-intro-title .nc-brand-symbol {
    height: 0.66em;
    margin-inline-start: 0.14em;
  }
}

.login-brand-lockup span {
  color: var(--nc-auth-gold-deep);
  font-family: var(--nc-auth-font-text);
  font-size: var(--nc-auth-type-subtitle);
  font-weight: var(--nc-weight-semibold);
  letter-spacing: 0;
  line-height: 1.3;
}

.login-panel {
  gap: 10px;
}

.login-mode-selector {
  gap: var(--nc-space-1);
  border-color: var(--nc-auth-card-stroke);
  border-radius: var(--nc-radius-md);
  padding: var(--nc-space-1);
  background: var(--nc-auth-tab-strip);
}

.login-mode-selector .segment {
  position: relative;
  min-width: 0;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: var(--nc-radius-sm);
  padding-inline: var(--nc-space-2);
  background: transparent;
  color: var(--nc-auth-tab-inactive-text);
  font-family: var(--nc-auth-font-text);
  font-size: var(--nc-auth-type-tab);
  font-weight: var(--nc-weight-semibold);
  letter-spacing: 0;
  line-height: 1.2;
  box-shadow: none;
}

.login-mode-selector .segment.active {
  border-color: var(--nc-auth-tab-active);
  background: color-mix(in srgb, var(--nc-auth-tab-active) 20%, var(--nc-auth-tab-inactive));
  color: var(--nc-auth-tab-active-text);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nc-auth-tab-active) 16%, transparent);
}

.login-mode-selector .segment.active::after {
  position: absolute;
  right: 26%;
  bottom: 3px;
  left: 26%;
  height: 2px;
  border-radius: var(--nc-radius-round);
  background: var(--nc-auth-gold);
  content: "";
}

.login-mode-selector .segment:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--nc-auth-tab-active) 34%, transparent);
  outline-offset: 2px;
}

.login-view,
.login-view .form-grid {
  gap: 10px;
}

.login-view label,
.login-panel label {
  gap: var(--nc-space-1);
}

.login-panel .field-label {
  margin: 0;
  color: var(--nc-auth-label);
  font-family: var(--nc-auth-font-text);
  font-size: var(--nc-auth-type-label);
  font-weight: var(--nc-weight-semibold);
  letter-spacing: 0;
  line-height: 1.3;
  text-shadow: var(--nc-auth-floating-copy-shadow);
}

.login-panel :is(input:not([type="checkbox"]), select, textarea) {
  min-height: 50px;
  border-color: var(--nc-auth-input-stroke);
  border-radius: var(--nc-radius-md);
  padding: 12px 13px;
  background: var(--nc-auth-input);
  color: var(--nc-auth-input-text);
  font-family: var(--nc-auth-font-text);
  font-size: var(--nc-auth-type-input);
  font-weight: var(--nc-weight-medium);
  letter-spacing: 0;
  line-height: var(--nc-auth-line-control);
}

.login-panel :is(input:not([type="checkbox"]), textarea)::placeholder {
  color: var(--nc-auth-placeholder);
  font: inherit;
  opacity: 1;
}

.login-panel :is(input:not([type="checkbox"]), select, textarea):focus {
  border-color: var(--nc-auth-tab-active);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--nc-auth-tab-active) 22%, transparent);
}

.login-panel :is(input:not([type="checkbox"]), select, textarea)[aria-invalid="true"] {
  border-color: var(--nc-danger);
}

.password-input-row input {
  padding-right: 72px;
}

.password-visibility {
  right: var(--nc-space-2);
  min-width: 52px;
  border-radius: var(--nc-radius-xs);
  color: var(--nc-auth-tab-active);
  font-family: var(--nc-auth-font-text);
  font-size: 0.9375rem;
  font-weight: var(--nc-weight-semibold);
  letter-spacing: 0;
}

.password-visibility:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--nc-auth-tab-active) 30%, transparent);
  outline-offset: 1px;
}

.login-panel .primary-action {
  min-height: 50px;
  border: 1px solid color-mix(in srgb, var(--nc-auth-link) 58%, var(--nc-auth-primary));
  border-radius: var(--nc-radius-md);
  background: var(--nc-auth-primary);
  color: var(--nc-auth-primary-text);
  font-family: var(--nc-auth-font-text);
  font-size: var(--nc-auth-type-action);
  font-weight: var(--nc-weight-semibold);
  letter-spacing: 0;
  line-height: 1.2;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--nc-auth-primary) 22%, transparent), inset 0 1px color-mix(in srgb, var(--nc-auth-primary-text) 16%, transparent);
}

.login-panel .primary-action:active:not(:disabled) {
  background: var(--nc-auth-primary-pressed);
}

.login-panel .secondary-action {
  min-height: 46px;
  border-color: var(--nc-auth-input-stroke);
  border-radius: var(--nc-radius-md);
  background: var(--nc-auth-secondary);
  color: var(--nc-auth-secondary-text);
  font-family: var(--nc-auth-font-text);
  font-size: var(--nc-auth-type-secondary);
  font-weight: var(--nc-weight-semibold);
  letter-spacing: 0;
  line-height: 1.25;
  box-shadow: none;
}

.login-panel .secondary-action.compact {
  width: 100%;
  min-height: 44px;
  justify-self: center;
  border-color: color-mix(in srgb, var(--nc-auth-gold) 48%, var(--nc-auth-card-stroke));
  padding-inline: var(--nc-space-3);
  background: var(--nc-auth-secondary);
  color: var(--nc-auth-link);
  font-size: 0.9375rem;
}

.login-guest-access .secondary-action {
  width: 100%;
  border-color: var(--nc-auth-card-stroke);
  background: var(--nc-auth-card);
}

.login-panel .legal-consent-row {
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: start;
  gap: var(--nc-space-3);
  border-color: var(--nc-auth-input-stroke);
  padding: var(--nc-space-3);
  background: var(--nc-auth-card);
}

.login-panel .legal-consent-row input[type="checkbox"] {
  align-self: start;
  width: 24px;
  height: 24px;
  margin-top: 0;
  accent-color: var(--nc-auth-tab-active);
}

.login-panel .legal-consent-row > span {
  min-width: 0;
}

.login-panel .legal-consent-row strong {
  display: flex;
  align-items: center;
  min-height: 24px;
  color: var(--nc-auth-title);
  font-size: var(--nc-auth-type-label);
  font-weight: var(--nc-weight-semibold);
  line-height: 1.35;
}

.login-panel .legal-consent-row small,
.login-card .microcopy,
.login-card .password-strength strong,
.login-note {
  color: var(--nc-auth-muted);
  font-family: var(--nc-auth-font-text);
  font-size: 0.8125rem;
  font-weight: var(--nc-weight-regular);
  letter-spacing: 0;
  line-height: 1.45;
  text-shadow: var(--nc-auth-floating-copy-shadow);
}

.login-card :is(.microcopy, .legal-consent-row, .login-note) a,
.login-legal-links a {
  color: var(--nc-auth-link);
  font-family: var(--nc-auth-font-text);
  font-weight: var(--nc-weight-medium);
  text-decoration-color: color-mix(in srgb, var(--nc-auth-link) 58%, transparent);
  text-underline-offset: 3px;
}

.login-legal-links-fixed {
  right: 18px;
  left: 18px;
  justify-content: center;
}

.login-legal-links-fixed::after {
  flex: 0 0 100%;
  width: min(150px, 42vw);
  height: 1px;
  margin: -2px auto 0;
  background: linear-gradient(90deg, transparent, var(--nc-auth-gold), transparent);
  content: "";
  opacity: 0.68;
}

.login-legal-links-fixed a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.8125rem;
  letter-spacing: 0;
}

.login-panel .legal-consent-row a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.login-card .microcopy a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.login-card .password-strength span {
  background: var(--nc-auth-input-stroke);
}

.login-card .password-strength span.active {
  background: var(--nc-auth-gold);
}

.login-card :is(.auth-secondary-panel, .recovery-panel, .login-note) {
  border-color: var(--nc-auth-card-stroke);
  background: var(--nc-auth-card-elevated);
}

.login-card .recovery-panel > span,
.login-card .verification-heading .eyebrow {
  color: var(--nc-auth-gold-deep);
  font-family: var(--nc-auth-font-text);
  font-size: 0.8125rem;
  font-weight: var(--nc-weight-semibold);
  letter-spacing: 0;
}

.login-card .verification-heading h2 {
  color: var(--nc-auth-title);
  font-family: var(--nc-auth-font-display);
  font-size: 1.125rem;
  font-weight: var(--nc-weight-semibold);
  letter-spacing: 0;
}

.login-card .field-error {
  color: var(--nc-danger);
  font-family: var(--nc-auth-font-text);
  font-size: 0.8125rem;
  font-weight: var(--nc-weight-medium);
}

.login-card .auth-alert {
  border-left-color: var(--nc-danger);
  background: color-mix(in srgb, var(--nc-danger) 10%, var(--nc-auth-card));
  color: var(--nc-auth-title);
  font-family: var(--nc-auth-font-text);
  font-size: 0.875rem;
  font-weight: var(--nc-weight-medium);
}

.login-screen.cinematic-expanded .login-card {
  border-color: color-mix(in srgb, var(--nc-auth-card-stroke) 82%, transparent);
  background: color-mix(in srgb, var(--nc-auth-card) 20%, transparent);
}

.login-language-compact select,
.login-cinematic-sound {
  border-color: color-mix(in srgb, var(--nc-auth-card-stroke) 88%, transparent);
  background: color-mix(in srgb, var(--nc-auth-tab-strip) 38%, transparent);
  color: var(--nc-palette-text-primary-dark);
}

.login-language-compact select:is(:hover, :focus-visible),
.login-cinematic-sound:is(:hover, :focus-visible),
.login-screen.cinematic-audio-playing .login-cinematic-sound {
  border-color: var(--nc-auth-tab-active);
  background: color-mix(in srgb, var(--nc-auth-tab-strip) 52%, transparent);
  color: var(--nc-palette-text-primary-dark);
}

.login-intro-title,
.login-intro-action,
.login-cinematic-continue:is(:hover, :focus-visible) {
  color: var(--nc-palette-text-primary-dark);
}

@media (max-width: 759px) {
  .login-card {
    width: min(calc(100% - 32px), 420px);
  }
}

@media (min-width: 760px) {
  .login-screen.cinematic-expanded .login-card {
    bottom: max(70px, calc(var(--safe-bottom) + 64px));
    max-height: min(72dvh, calc(100dvh - var(--safe-top) - var(--safe-bottom) - 108px));
  }
}

/* Quiz and results */

.quiz-card {
  border-color: var(--nc-border-strong);
  background:
    linear-gradient(90deg, var(--nc-accent-blue) 0 calc(100% - 22px), var(--nc-accent-gold) calc(100% - 22px)) top / 100% 3px no-repeat,
    var(--nc-surface-sheen);
  box-shadow: var(--nc-elevation-2);
}

.quiz-topline,
.question-jump,
.completion-action-group {
  border-color: var(--nc-border);
  background: var(--nc-canvas-secondary);
}

.progress-track {
  background: var(--nc-muted-track);
}

.answer-option {
  border-color: var(--nc-border);
  border-radius: var(--nc-radius-md);
  background: var(--nc-surface-elevated);
  color: var(--nc-text-primary);
  box-shadow: var(--nc-elevation-1);
}

.answer-option:hover:not(:disabled),
.answer-option:focus-visible,
.answer-option.selected {
  border-color: var(--nc-border-strong);
  background: color-mix(in srgb, var(--nc-accent-blue) 13%, var(--nc-surface));
}

.answer-option.correct {
  border-color: color-mix(in srgb, var(--nc-success) 68%, transparent);
  background: color-mix(in srgb, var(--nc-success) 13%, var(--nc-surface));
}

.answer-option.wrong {
  border-color: color-mix(in srgb, var(--nc-danger) 68%, transparent);
  background: color-mix(in srgb, var(--nc-danger) 12%, var(--nc-surface));
}

.option-letter,
.option-marker {
  background: var(--nc-canvas-deep);
  color: var(--nc-text-primary);
}

.question-grid-button {
  border-color: var(--nc-border);
  background: var(--nc-surface);
  color: var(--nc-text-secondary);
}

.question-grid-button[aria-current="step"] {
  border-color: var(--nc-accent-blue-glow);
  box-shadow: var(--nc-focus-ring);
}

.answer-details,
.feedback-box,
.answer-reference,
.completion-answer-card {
  border-color: var(--nc-border);
  border-radius: var(--nc-radius-md);
  background: var(--nc-canvas-secondary);
}

/* Digital Logbook and data surfaces */

.logbook-navigation {
  border-bottom-color: var(--nc-border);
}

.logbook-navigation button {
  border-color: var(--nc-border);
  background: var(--nc-surface);
  color: var(--nc-text-secondary);
}

.logbook-navigation button.active {
  border-color: var(--nc-border-strong);
  background: var(--nc-accent-blue-deep);
  color: var(--nc-on-accent);
  box-shadow: var(--nc-blue-glow);
}

.logbook-form-section,
.logbook-form-disclosure,
.logbook-settings-section,
.logbook-entry-dock,
.logbook-note-panel,
.logbook-route-time-board,
.logbook-starting-totals {
  border-color: var(--nc-border);
  border-radius: var(--nc-radius-md);
  background: var(--nc-canvas-secondary);
}

.logbook-form-section-heading,
.logbook-note-panel > summary,
.logbook-form-disclosure > summary,
.logbook-starting-totals > summary {
  color: var(--nc-text-primary);
}

.logbook-entry-action {
  border-color: var(--nc-border);
  background: var(--nc-surface);
  color: var(--nc-text-secondary);
}

.logbook-entry-action.active {
  border-color: var(--nc-border-strong);
  background: var(--nc-accent-blue-soft-strong);
  color: var(--nc-accent-blue-glow);
}

.logbook-placeholder-field > .field-label,
.logbook-native-placeholder-field > .field-label {
  color: var(--nc-text-muted);
}

.logbook-total-row,
.logbook-flight-card,
.logbook-match-row,
.logbook-candidate-row,
.logbook-roster-row,
.logbook-import-history-row,
.logbook-import-item,
.import-pdf-source-panel,
.import-source-row {
  border-color: var(--nc-border);
  background: var(--nc-surface);
}

.logbook-total-row > output,
.logbook-total-row strong {
  color: var(--nc-accent-blue-glow);
  font-variant-numeric: tabular-nums;
}

.logbook-scan-page,
.logbook-scan-image,
.question-image img,
.answer-reference-image img,
.license-document-visual {
  border-color: var(--nc-border);
  border-radius: var(--nc-radius-md);
  background: var(--nc-canvas-secondary);
}

table,
.data-table,
.table-wrap {
  border-color: var(--nc-border);
  color: var(--nc-text-primary);
}

th,
td {
  border-color: var(--nc-border);
}

th {
  background: var(--nc-canvas-secondary);
  color: var(--nc-text-secondary);
  font-size: var(--nc-type-caption);
  font-weight: var(--nc-weight-semibold);
}

.leader-row.top-1,
.leader-row.top-2,
.leader-row.top-3 {
  border-color: var(--nc-accent-gold-border);
}

.forum-like.liked {
  border-color: color-mix(in srgb, var(--nc-accent-gold) 50%, transparent);
  background: var(--nc-accent-gold-soft);
  color: var(--nc-accent-gold);
}

/* Profile, documents, settings and policy */

.license-workspace-overview {
  border-color: var(--nc-border);
  background: var(--nc-canvas-secondary);
}

.license-workspace-mark {
  border-color: var(--nc-border-strong);
  background: var(--nc-canvas-deep);
  color: var(--nc-accent-blue-glow);
}

.license-type-icon {
  border-color: color-mix(in srgb, var(--license-type-accent) 36%, var(--nc-border));
  background: color-mix(in srgb, var(--license-type-accent) 12%, var(--nc-color-surface-elevated));
  color: var(--license-type-accent);
}

.license-template-card:hover,
.license-template-card:focus-visible {
  border-color: var(--nc-border-strong);
  box-shadow: var(--nc-elevation-2);
}

.license-safety-note,
.operational-advisory,
.account-note {
  border-color: var(--nc-accent-gold-border);
  background: var(--nc-accent-gold-soft);
  color: var(--nc-text-secondary);
}

.settings-column-stack-connected > .panel,
.settings-column-stack-connected > .panel:first-child,
.settings-column-stack-connected > .panel + .panel {
  border-color: var(--nc-border);
  background: var(--nc-surface-sheen);
}

.setting-row {
  border-color: var(--nc-border);
}

.setting-row strong,
.setting-row small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.policy-link {
  color: var(--nc-accent-blue-glow);
}

/* Overlays and feedback */

.account-drawer,
.notification-drawer,
.news-modal,
.news-detail-modal,
.public-document-modal,
.prep-modal,
.confirm-modal,
.image-modal {
  background: var(--nc-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.drawer-card,
.notification-card,
.news-card,
.news-detail-card,
.public-document-card,
.prep-detail-card,
.confirm-card,
.confirmation-dialog,
.license-document-dialog,
.license-expiry-dialog {
  border: 1px solid var(--nc-border-strong);
  border-radius: var(--nc-radius-md);
  background: var(--nc-surface-elevated);
  box-shadow: var(--nc-elevation-overlay);
}

.notification-item {
  border-color: var(--nc-border);
  background: var(--nc-surface);
  color: var(--nc-text-primary);
}

.notification-item:hover,
.notification-item:focus-visible {
  border-color: var(--nc-accent-blue-border-strong);
  background: color-mix(in srgb, var(--nc-accent-blue) 7%, var(--nc-surface));
}

.notification-item-icon {
  background: var(--nc-accent-blue-soft);
  color: var(--nc-accent-blue-glow);
}

.notification-item-copy small,
.notification-empty p {
  color: var(--nc-text-secondary);
}

.notification-item-arrow,
.notification-empty .button-icon {
  color: var(--nc-accent-gold);
}

.toast,
.app-toast {
  border: 1px solid var(--nc-border-strong);
  border-radius: var(--nc-radius-sm);
  background: var(--nc-canvas-deep);
  color: var(--nc-feedback-text);
  box-shadow: var(--nc-elevation-overlay);
}

.app-toast strong {
  color: var(--nc-feedback-text);
}

.app-toast span {
  color: var(--nc-feedback-muted);
}

/* Shared workspace palette: mirror Main Menu across every signed-in module. */

body:not(.entry-mode) {
  --nc-canvas: var(--nc-color-canvas);
  --nc-canvas-secondary: var(--nc-color-surface);
  --nc-canvas-deep: var(--nc-color-deep-navy);
  --nc-surface: var(--nc-color-surface);
  --nc-surface-elevated: var(--nc-color-surface-elevated);
  --nc-text-primary: var(--nc-color-text-primary);
  --nc-text-secondary: var(--nc-color-text-secondary);
  --nc-text-muted: color-mix(in srgb, var(--nc-color-text-secondary) 72%, transparent);
  --nc-accent-blue: var(--nc-color-accent-blue);
  --nc-accent-blue-glow: var(--nc-color-accent-blue);
  --nc-accent-blue-deep: color-mix(in srgb, var(--nc-color-accent-blue) 82%, var(--nc-color-deep-navy));
  --nc-accent-gold: var(--nc-color-accent-gold);
  --nc-accent-gold-deep: var(--nc-color-accent-gold-text);
  --nc-border: var(--nc-color-border);
  --nc-border-strong: color-mix(in srgb, var(--nc-color-accent-blue) 38%, var(--nc-color-border));
  --nc-button-fill: var(--nc-accent-blue-deep);
  --nc-canvas-wash: linear-gradient(
    180deg,
    color-mix(in srgb, var(--nc-color-canvas) 92%, var(--nc-color-accent-blue)) 0%,
    var(--nc-color-canvas) 36%,
    color-mix(in srgb, var(--nc-color-canvas) 96%, var(--nc-color-deep-navy)) 100%
  );
  --nc-surface-sheen: linear-gradient(
    180deg,
    color-mix(in srgb, var(--nc-color-surface-elevated) 28%, var(--nc-color-surface)),
    var(--nc-color-surface)
  );
  background: var(--nc-canvas-wash);
}

body:not(.entry-mode) .app-shell {
  color: var(--nc-color-text-primary);
}

body:not(.entry-mode) .screen:not(#homeScreen) .module-heading {
  border-color: var(--nc-color-border);
}

body:not(.entry-mode) .screen:not(#homeScreen) .module-heading .eyebrow,
body:not(.entry-mode) .screen:not(#homeScreen) .license-section-heading .eyebrow {
  color: var(--nc-color-accent-blue);
}

body:not(.entry-mode) .screen:not(#homeScreen) :is(.module-heading, .workspace-heading) h2 {
  color: var(--nc-color-text-primary);
}

body:not(.entry-mode) .screen:not(#homeScreen) .back-to-main {
  border-color: var(--nc-color-border);
  background: var(--nc-color-surface);
  color: var(--nc-color-text-primary);
}

body:not(.entry-mode) .screen:not(#homeScreen) :is(
  .back-to-main > span:first-child,
  .module-card-mini-icon,
  .module-card-arrow,
  .license-workspace-mark
) {
  color: var(--nc-color-accent-gold);
}

body:not(.entry-mode) .screen:not(#homeScreen) .module-card-mini-icon {
  border-color: color-mix(in srgb, var(--nc-color-accent-gold) 42%, var(--nc-color-border));
  background: color-mix(in srgb, var(--nc-color-accent-gold) 10%, var(--nc-color-surface));
}

body:not(.entry-mode) .screen:not(#homeScreen) :is(.module-card-badge, .status-chip) {
  border-color: color-mix(in srgb, var(--nc-color-accent-blue) 34%, var(--nc-color-border));
  background: color-mix(in srgb, var(--nc-color-accent-blue) 12%, var(--nc-color-surface));
  color: var(--nc-color-accent-blue);
}

/* Approved cinematic Home composition */

.nextcaptain-home {
  --nc-canvas: var(--nc-color-canvas);
  --nc-canvas-secondary: var(--nc-color-surface);
  --nc-canvas-deep: var(--nc-color-deep-navy);
  --nc-surface: var(--nc-color-surface);
  --nc-surface-elevated: var(--nc-color-surface-elevated);
  --nc-text-primary: var(--nc-color-text-primary);
  --nc-text-secondary: var(--nc-color-text-secondary);
  --nc-text-muted: color-mix(in srgb, var(--nc-color-text-secondary) 72%, transparent);
  --nc-accent-blue: var(--nc-color-accent-blue);
  --nc-accent-blue-glow: var(--nc-color-accent-blue);
  --nc-accent-gold: var(--nc-color-accent-gold);
  --nc-border: var(--nc-color-border);
  --nc-border-strong: color-mix(in srgb, var(--nc-color-accent-blue) 38%, var(--nc-color-border));
  color: var(--nc-color-text-primary);
}

body.home-dashboard-active {
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--nc-color-deep-navy) 94%, var(--nc-color-accent-blue)) 0%,
      var(--nc-color-canvas) 34%,
      var(--nc-color-deep-navy) 100%
    );
}

body.home-dashboard-active .app-shell {
  background: transparent;
}

body.home-dashboard-active .topbar {
  display: none;
}

body.home-dashboard-active .app-shell {
  padding-top: max(14px, calc(var(--safe-top) + 8px));
}

.home-dashboard,
.home-workspace-directory {
  width: min(100%, 980px);
  min-width: 0;
  margin-inline: auto;
}

.home-dashboard {
  display: grid;
  gap: 10px;
}

.home-workspace-directory {
  display: grid;
  gap: 18px;
}

.home-hero-header {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 2px 2px 4px;
}

.home-eyebrow,
.home-card-kicker {
  margin: 0;
  color: var(--nc-color-accent-blue);
  font-family: var(--nc-font-text);
  font-size: 0.68rem;
  font-weight: var(--nc-weight-semibold);
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.home-hero-header h2 {
  margin: 0;
  color: var(--nc-color-accent-gold-text);
  font-family: var(--nc-font-display);
  font-size: clamp(2.25rem, 10vw, 2.9rem);
  font-weight: var(--nc-weight-heavy);
  letter-spacing: 0;
  line-height: 0.98;
}

.home-hero-header .nc-wordmark > :nth-child(-n + 2) {
  color: var(--nc-color-text-primary);
}

.home-hero-header .nc-wordmark > :nth-child(n + 3) {
  color: var(--nc-color-accent-gold-text);
}

.home-greeting {
  margin: 5px 0 0;
  color: var(--nc-color-text-primary);
  font-family: var(--nc-font-display);
  font-size: clamp(1.3rem, 5.8vw, 1.65rem);
  font-weight: var(--nc-weight-semibold);
  line-height: 1.08;
}

.home-subtitle {
  max-width: 44rem;
  margin: 2px 0 0;
  color: var(--nc-color-text-secondary);
  font-size: 0.84rem;
  line-height: 1.35;
}

.home-weather-card,
.home-news-card {
  position: relative;
  isolation: isolate;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--nc-color-border);
  border-radius: var(--nc-radius-md);
  background: var(--nc-color-surface);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--nc-color-deep-navy) 48%, transparent);
}

.home-weather-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  min-height: 220px;
}

.home-weather-image,
.home-news-image {
  position: absolute;
  inset: 0;
  z-index: -3;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-weather-image {
  object-position: 22% center;
}

.home-weather-overlay,
.home-news-overlay {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.home-weather-overlay {
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--nc-palette-deep-navy-dark) 76%, transparent) 0%,
      color-mix(in srgb, var(--nc-palette-deep-navy-dark) 24%, transparent) 54%,
      color-mix(in srgb, var(--nc-palette-deep-navy-dark) 72%, transparent) 100%
    ),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--nc-palette-surface-elevated-dark) 4%, transparent),
      color-mix(in srgb, var(--nc-palette-deep-navy-dark) 46%, transparent)
    );
}

.home-news-overlay {
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--nc-palette-deep-navy-dark) 96%, transparent) 0%,
      color-mix(in srgb, var(--nc-palette-deep-navy-dark) 72%, transparent) 56%,
      color-mix(in srgb, var(--nc-palette-deep-navy-dark) 88%, transparent) 100%
    ),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--nc-palette-surface-elevated-dark) 10%, transparent),
      color-mix(in srgb, var(--nc-palette-deep-navy-dark) 76%, transparent)
    );
}

.home-weather-primary {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 5px;
  min-width: 0;
  padding: 14px 14px 14px 16px;
}

.home-weather-primary > :is(.home-card-kicker, h3) {
  max-width: calc(100% - 52px);
}

.home-weather-primary h3 {
  max-width: 18rem;
  margin: 0;
  color: var(--nc-palette-text-primary-dark);
  font-size: clamp(1rem, 4.3vw, 1.15rem);
  font-weight: var(--nc-weight-semibold);
  line-height: 1.16;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.home-weather-reading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.home-weather-reading strong {
  color: var(--nc-palette-text-primary-dark);
  font-family: var(--nc-font-display);
  font-size: clamp(3.3rem, 15vw, 4.25rem);
  font-weight: var(--nc-weight-medium);
  letter-spacing: -0.035em;
  line-height: 0.94;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

.home-weather-icon {
  width: 32px;
  height: 32px;
  color: var(--nc-palette-gold-dark);
}

.home-weather-icon svg {
  width: 30px;
  height: 30px;
}

.home-weather-primary > p:not(.home-card-kicker) {
  max-width: 19rem;
  margin: 0;
  color: var(--nc-palette-text-secondary-dark);
  font-size: 0.72rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.home-weather-permission {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 6px 8px;
  width: min(100%, 19rem);
  margin-top: 3px;
  border: 1px solid color-mix(in srgb, var(--nc-palette-blue-dark) 42%, transparent);
  border-radius: var(--nc-radius-sm);
  padding: 8px;
  background: color-mix(in srgb, var(--nc-palette-deep-navy-dark) 82%, transparent);
  color: var(--nc-palette-text-primary-dark);
}

.home-weather-permission[hidden],
.home-weather-actions[hidden],
.home-weather-airport-fallback[hidden] {
  display: none;
}

.home-weather-permission > .button-icon,
.home-weather-permission > .button-icon svg {
  width: 17px;
  height: 17px;
  color: var(--nc-palette-gold-dark);
}

.home-weather-permission-copy {
  min-width: 0;
  font-size: 0.7rem;
  font-weight: var(--nc-weight-semibold);
  line-height: 1.25;
}

.home-weather-permission-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.home-weather-permission-actions button {
  min-width: 0;
  min-height: 44px;
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--nc-palette-blue-dark) 48%, transparent);
  border-radius: var(--nc-radius-sm);
  padding: 6px 8px;
  background: color-mix(in srgb, var(--nc-palette-surface-elevated-dark) 92%, transparent);
  color: var(--nc-palette-text-primary-dark);
  font: inherit;
  font-size: 0.7rem;
  font-weight: var(--nc-weight-semibold);
}

.home-weather-permission-actions #homeWeatherAllow {
  border-color: var(--nc-palette-blue-dark);
  background: var(--nc-palette-blue-dark);
}

.home-weather-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin-top: 2px;
}

.home-weather-action {
  min-height: 44px;
  min-width: 0;
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--nc-palette-blue-dark) 48%, transparent);
  border-radius: var(--nc-radius-sm);
  padding: 5px 10px;
  background: color-mix(in srgb, var(--nc-palette-surface-elevated-dark) 88%, transparent);
  color: var(--nc-palette-text-primary-dark);
  font: inherit;
  font-size: 0.68rem;
  font-weight: var(--nc-weight-semibold);
}

.home-weather-location {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.home-weather-location-controls {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  min-width: 0;
}

.home-weather-location .button-icon,
.home-weather-location .button-icon svg {
  width: 15px;
  height: 15px;
}

.home-weather-location[aria-pressed="true"] {
  border-color: var(--nc-palette-gold-dark);
  color: var(--nc-palette-gold-dark);
}

.home-weather-location.is-current:disabled {
  cursor: default;
  opacity: 1;
}

.home-weather-refresh {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
}

.home-weather-refresh .button-icon,
.home-weather-refresh .button-icon svg {
  width: 17px;
  height: 17px;
}

.home-weather-refresh.is-loading .button-icon {
  animation: ncWeatherRefreshSpin 700ms linear infinite;
}

.home-weather-airport-fallback {
  display: grid;
  gap: 5px;
  width: min(100%, 19rem);
  margin-top: 4px;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--nc-palette-blue-dark) 42%, transparent);
  border-radius: var(--nc-radius-sm);
  background: color-mix(in srgb, var(--nc-palette-deep-navy-dark) 86%, transparent);
}

.home-weather-airport-fallback > label {
  color: var(--nc-palette-text-primary-dark);
  font-size: 0.7rem;
  font-weight: var(--nc-weight-semibold);
  line-height: 1.25;
}

.home-weather-airport-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  min-width: 0;
}

.home-weather-airport-entry input,
.home-weather-airport-entry button {
  min-width: 0;
  min-height: 44px;
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--nc-palette-blue-dark) 48%, transparent);
  border-radius: var(--nc-radius-sm);
  background: color-mix(in srgb, var(--nc-palette-surface-elevated-dark) 96%, transparent);
  color: var(--nc-palette-text-primary-dark);
  font: inherit;
  font-size: 1rem;
  line-height: 1.2;
}

.home-weather-airport-entry input {
  width: 100%;
  padding: 8px 10px;
  text-transform: uppercase;
}

.home-weather-airport-entry input::placeholder {
  color: var(--nc-palette-text-secondary-dark);
  opacity: 1;
}

.home-weather-airport-entry input:focus-visible {
  border-color: var(--nc-palette-blue-dark);
  outline: 2px solid color-mix(in srgb, var(--nc-palette-blue-dark) 30%, transparent);
  outline-offset: 1px;
}

.home-weather-airport-entry button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 10px;
  background: var(--nc-palette-blue-dark);
  font-size: 0.7rem;
  font-weight: var(--nc-weight-semibold);
}

.home-weather-airport-entry .button-icon,
.home-weather-airport-entry .button-icon svg {
  width: 15px;
  height: 15px;
}

.home-weather-airport-fallback > small {
  color: var(--nc-palette-text-secondary-dark);
  font-size: 0.66rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

@keyframes ncWeatherRefreshSpin {
  to {
    transform: rotate(360deg);
  }
}

#homeWeatherDetails[aria-expanded="true"] {
  border-color: var(--nc-palette-gold-dark);
  color: var(--nc-palette-gold-dark);
  font-weight: var(--nc-weight-bold);
}

.home-weather-action:disabled {
  cursor: default;
  opacity: 0.62;
}

.home-weather-metrics {
  z-index: 1;
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  min-width: 0;
  margin: 0;
  border-left: 0;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--nc-palette-deep-navy-dark) 8%, transparent),
    color-mix(in srgb, var(--nc-palette-deep-navy-dark) 86%, transparent)
  );
}

.home-weather-metrics > div {
  display: grid;
  align-content: center;
  gap: 1px;
  min-width: 0;
  padding: 8px 10px;
  border-bottom: 0;
}

.home-weather-metrics dt {
  color: var(--nc-palette-blue-dark);
  font-size: 0.61rem;
  font-weight: var(--nc-weight-semibold);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.home-weather-metrics dd {
  margin: 0;
  color: var(--nc-palette-text-primary-dark);
  font-family: var(--nc-font-display);
  font-size: 1.28rem;
  font-weight: var(--nc-weight-medium);
  line-height: 1;
}

.home-weather-metrics small {
  min-width: 0;
  color: var(--nc-palette-text-secondary-dark);
  font-size: 0.58rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.home-news-card {
  display: grid;
  align-items: center;
  width: 100%;
  min-height: 148px;
  border: 1px solid var(--nc-color-border);
  padding: 0;
  color: var(--nc-palette-text-primary-dark);
  font: inherit;
  text-align: left;
}

.home-news-image {
  object-position: center;
}

.home-news-overlay {
  background:
    linear-gradient(90deg, rgba(1, 4, 13, 0.98) 0%, rgba(2, 7, 20, 0.9) 43%, rgba(2, 7, 20, 0.24) 76%, rgba(1, 4, 13, 0.18) 100%),
    linear-gradient(180deg, rgba(2, 7, 20, 0.04), rgba(1, 4, 13, 0.54));
}

.home-news-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 4px;
  width: min(72%, 34rem);
  min-width: 0;
  min-height: 148px;
  padding: 14px 16px;
}

.home-news-copy strong,
.home-news-copy small,
.home-news-meta {
  min-width: 0;
  overflow-wrap: anywhere;
}

.home-news-copy strong {
  color: var(--nc-palette-text-primary-dark);
  font-family: var(--nc-font-display);
  font-size: clamp(0.98rem, 4vw, 1.16rem);
  line-height: 1.18;
}

.home-news-copy small {
  display: -webkit-box;
  color: var(--nc-palette-text-secondary-dark);
  font-size: 0.68rem;
  line-height: 1.3;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-news-meta {
  color: var(--nc-palette-blue-dark);
  font-size: 0.61rem;
  font-weight: var(--nc-weight-semibold);
  line-height: 1.2;
}

.home-news-action {
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--nc-palette-gold-dark);
  font-size: 0.7rem;
  font-weight: var(--nc-weight-semibold);
  white-space: nowrap;
}

.home-news-action span {
  font-size: 1.15rem;
}

.home-news-card:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--nc-accent-blue) 58%, transparent);
  outline-offset: 2px;
}

/* Live Home information hierarchy */

.home-weather-report-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-width: min(100%, 168px);
}

.home-weather-report {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 1px;
  min-width: 0;
  text-align: left;
}

.home-weather-report strong,
.home-weather-report small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-weather-report strong {
  color: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.home-weather-report small {
  color: var(--nc-palette-text-secondary-dark);
  font-size: 0.56rem;
  font-weight: var(--nc-weight-medium);
}

.home-weather-card.is-loading :is(.home-weather-reading strong, .home-weather-metrics dd, .home-weather-report small) {
  color: transparent;
  border-radius: var(--nc-radius-xs);
  background: linear-gradient(
    100deg,
    color-mix(in srgb, var(--nc-text-secondary) 14%, transparent) 20%,
    color-mix(in srgb, var(--nc-text-primary) 28%, transparent) 45%,
    color-mix(in srgb, var(--nc-text-secondary) 14%, transparent) 70%
  );
  background-size: 220% 100%;
  animation: ncHomeSkeleton 1.25s ease-in-out infinite;
}

.home-news-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--nc-space-3);
  width: 100%;
  min-width: 0;
  min-height: 56px;
  margin: 0;
  border: 1px solid var(--nc-color-border);
  border-radius: var(--nc-radius-md);
  padding: 9px 12px;
  background: color-mix(in srgb, var(--nc-color-surface) 96%, var(--nc-color-deep-navy));
  color: var(--nc-color-text-primary);
  font: inherit;
  text-align: left;
}

.home-news-entry > span:first-child {
  display: grid;
  flex: 1 1 auto;
  gap: 2px;
  min-width: 0;
}

.home-news-entry strong,
.home-news-entry small {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
}

.home-news-entry strong {
  font-family: var(--nc-font-display);
  font-size: 0.94rem;
  font-weight: var(--nc-weight-semibold);
  white-space: nowrap;
}

.home-news-entry small {
  color: var(--nc-color-text-secondary);
  font-size: 0.68rem;
  line-height: 1.3;
}

.home-news-entry .home-news-action {
  position: static;
  right: auto;
  bottom: auto;
  flex: 0 0 auto;
  min-height: 44px;
  margin: 0;
  color: var(--nc-color-accent-gold-text);
}

.home-news-entry:is(:hover, :focus-visible) {
  border-color: color-mix(in srgb, var(--nc-color-accent-blue) 58%, var(--nc-color-border));
  background: var(--nc-color-surface-elevated);
  color: var(--nc-color-text-primary);
  outline: none;
}

.home-news-entry:focus-visible {
  box-shadow: inset 0 0 0 2px var(--nc-color-accent-blue);
}

.home-snapshot-card,
.home-fact-card {
  min-width: 0;
  border: 1px solid var(--nc-color-border);
  border-radius: var(--nc-radius-md);
  background: var(--nc-color-surface);
  box-shadow: var(--nc-elevation-1);
}

.home-snapshot-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--nc-space-3);
  min-height: 66px;
  padding: 11px 13px;
}

.home-snapshot-card > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.home-snapshot-card > div > span {
  color: var(--nc-color-text-secondary);
  font-size: 0.72rem;
}

.home-snapshot-card > strong {
  flex: 0 1 auto;
  min-width: 0;
  color: var(--nc-color-text-primary);
  font-family: var(--nc-font-display);
  font-size: clamp(1rem, 4.4vw, 1.25rem);
  font-weight: var(--nc-weight-semibold);
  line-height: 1.15;
  text-align: right;
  overflow-wrap: anywhere;
}

.home-currency-section {
  display: grid;
  gap: 0;
  min-width: 0;
  border-block: 1px solid var(--nc-color-border);
  padding: 4px 0;
}

.home-currency-section.hidden {
  display: none;
}

.home-currency-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--nc-space-3);
  min-height: 44px;
  padding: 4px 2px;
}

.home-currency-section > header > span {
  color: var(--nc-color-text-secondary);
  font-size: 0.68rem;
  font-weight: var(--nc-weight-medium);
}

.home-currency-section .text-action,
.home-fact-card .text-action,
.aviation-news-item .text-action {
  min-height: 44px;
  margin: 0;
  padding-inline: 2px;
  color: var(--nc-color-accent-gold-text);
  font-size: 0.72rem;
  font-weight: var(--nc-weight-semibold);
}

.home-currency-list {
  display: grid;
  min-width: 0;
}

.home-currency-empty {
  margin: 0;
  padding: 10px 2px;
  border-top: 1px solid color-mix(in srgb, var(--nc-color-border) 72%, transparent);
  color: var(--nc-color-text-secondary);
  font-size: 0.74rem;
}

.home-currency-empty.hidden,
.home-currency-later.hidden {
  display: none;
}

.home-currency-later {
  display: grid;
  min-width: 0;
  border-top: 1px solid color-mix(in srgb, var(--nc-color-border) 72%, transparent);
}

.home-currency-later > summary {
  display: grid;
  place-items: center;
  min-height: 44px;
  margin: 0;
  color: var(--nc-color-accent-gold-text);
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
}

.home-currency-later > summary::-webkit-details-marker {
  display: none;
}

.home-currency-later-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.home-currency-chevron {
  width: 11px;
  height: 11px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 180ms ease;
}

.home-currency-later[open] .home-currency-chevron {
  transform: rotate(225deg) translate(-2px, -2px);
}

.home-currency-later[open] > summary {
  order: 2;
  border-top: 1px solid color-mix(in srgb, var(--nc-color-border) 72%, transparent);
}

.home-currency-later[open] > .home-currency-list {
  order: 1;
}

.home-currency-later > .home-currency-list .home-currency-row:first-child {
  border-top: 0;
}

@media (prefers-reduced-motion: reduce) {
  .home-currency-chevron {
    transition: none;
  }
}

.home-currency-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px var(--nc-space-3);
  min-width: 0;
  padding: 10px 2px;
  border-top: 1px solid color-mix(in srgb, var(--nc-color-border) 72%, transparent);
}

.home-currency-row > div,
.home-currency-row > span,
.home-currency-row > div > strong,
.home-currency-row > div > time {
  min-width: 0;
  overflow-wrap: anywhere;
}

.home-currency-row > div {
  display: grid;
  gap: 2px;
}

.home-currency-row > div > strong {
  color: var(--nc-color-text-primary);
  font-size: 0.82rem;
  font-weight: var(--nc-weight-semibold);
}

.home-currency-row > div > time {
  color: var(--nc-color-text-secondary);
  font-size: 0.66rem;
}

.home-currency-row > span {
  align-self: center;
  color: var(--nc-color-text-secondary);
  font-size: 0.72rem;
  text-align: right;
}

.home-currency-row.status-critical > span {
  color: var(--nc-danger);
  font-weight: var(--nc-weight-semibold);
}

.home-currency-row.status-warning > span {
  color: var(--nc-color-accent-gold-text);
  font-weight: var(--nc-weight-semibold);
}

.home-fact-card {
  display: grid;
  gap: 7px;
  padding: 13px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--nc-color-accent-blue) 7%, transparent), transparent 52%),
    var(--nc-color-surface);
}

.home-fact-card.hidden {
  display: none;
}

.home-fact-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--nc-space-3);
  min-width: 0;
}

.home-fact-meta {
  display: grid;
  justify-items: end;
  gap: 2px;
  min-width: 0;
  text-align: right;
}

.home-fact-meta > span {
  color: var(--nc-color-accent-gold-text);
  font-size: 0.65rem;
  font-weight: var(--nc-weight-semibold);
  overflow-wrap: anywhere;
}

.home-fact-review-status {
  max-width: 24ch;
  color: var(--nc-color-text-secondary);
  font-size: 0.58rem;
  font-weight: var(--nc-weight-medium);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.home-fact-review-status.hidden {
  display: none;
}

.home-fact-card h3,
.home-fact-card > p {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.home-fact-card h3 {
  color: var(--nc-color-text-primary);
  font-family: var(--nc-font-display);
  font-size: 0.98rem;
  font-weight: var(--nc-weight-semibold);
}

.home-fact-card > p {
  color: var(--nc-color-text-secondary);
  font-size: 0.76rem;
  line-height: 1.45;
}

.home-fact-card > small {
  color: color-mix(in srgb, var(--nc-color-text-secondary) 72%, transparent);
  font-size: 0.65rem;
  line-height: 1.35;
}

.home-fact-card .text-action {
  justify-self: start;
}

body.aviation-news-active {
  background: var(--nc-color-deep-navy);
}

body.aviation-news-active .topbar {
  display: none;
}

body.aviation-news-active .app-shell {
  width: 100%;
  max-width: none;
  padding: 0 0 calc(92px + var(--safe-bottom));
  background: var(--nc-color-deep-navy);
}

body.aviation-news-active main {
  width: 100%;
  min-width: 0;
}

.aviation-news-screen {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.aviation-news-screen.active {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0 !important;
}

.aviation-news-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 100svh;
  overflow: hidden;
  color: var(--nc-palette-text-primary-dark);
  background: var(--nc-palette-deep-navy-dark);
}

.aviation-news-hero-image,
.aviation-news-hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.aviation-news-hero-image {
  z-index: -2;
  object-fit: cover;
  object-position: center 48%;
  background: var(--nc-palette-deep-navy-dark);
}

.aviation-news-hero-overlay {
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 7, 20, 0.76) 0%, rgba(0, 7, 20, 0.08) 27%, rgba(0, 7, 20, 0.18) 58%, rgba(0, 7, 20, 0.94) 100%),
    linear-gradient(90deg, rgba(0, 7, 20, 0.48), transparent 58%);
}

.aviation-news-heading {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--nc-space-3);
  margin: 0;
  border: 0;
  padding: max(14px, calc(var(--safe-top) + 10px)) clamp(14px, 4vw, 44px) 12px;
  background: linear-gradient(180deg, rgba(0, 7, 20, 0.48), transparent);
}

.aviation-news-heading > .back-to-main {
  grid-column: 1;
}

.aviation-news-heading > div {
  grid-column: 2;
}

.aviation-news-heading > #aviationNewsRefresh {
  grid-column: 3;
}

.aviation-news-heading h2,
.aviation-news-heading p {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.aviation-news-heading #aviationNewsStatus {
  margin-top: 4px;
  color: rgba(248, 250, 255, 0.74);
  font-size: 0.72rem;
  line-height: 1.35;
}

.aviation-news-heading .eyebrow {
  color: var(--nc-palette-gold-dark) !important;
}

.aviation-news-heading h2 {
  color: var(--nc-palette-text-primary-dark) !important;
}

.aviation-news-heading h2:focus,
.aviation-news-feed-heading h2:focus {
  outline: none;
}

.aviation-news-heading .back-to-main,
.aviation-news-heading .icon-button {
  border-color: rgba(248, 250, 255, 0.3) !important;
  background: rgba(2, 10, 24, 0.42) !important;
  color: var(--nc-palette-text-primary-dark) !important;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.aviation-news-hero-caption {
  align-self: end;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 10px;
  width: min(calc(100% - 28px), 700px);
  margin: 0 clamp(14px, 5vw, 64px) clamp(164px, 18vh, 220px);
  text-shadow: 0 2px 18px rgba(0, 7, 20, 0.68);
}

.aviation-news-hero-caption > .button-icon {
  grid-row: 1 / 5;
  align-self: start;
  width: 34px;
  height: 34px;
  margin-top: 2px;
  color: var(--nc-palette-gold-dark);
}

.aviation-news-hero-caption > p,
.aviation-news-hero-caption > h2,
.aviation-news-hero-caption > strong,
.aviation-news-hero-caption > span:last-child {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.aviation-news-hero-caption > p {
  color: var(--nc-palette-gold-dark);
  font-size: 0.7rem;
  font-weight: var(--nc-weight-bold);
  text-transform: uppercase;
}

.aviation-news-hero-caption > h2 {
  color: var(--nc-palette-text-primary-dark);
  font-family: var(--nc-font-display);
  font-size: clamp(2.2rem, 9vw, 4.8rem);
  font-weight: var(--nc-weight-bold);
  line-height: 0.98;
  text-shadow: 0 3px 24px rgba(0, 7, 20, 0.82);
}

.aviation-news-hero-caption > h2:focus {
  outline: none;
}

.aviation-news-hero-caption > strong {
  color: rgba(248, 250, 255, 0.88);
  font-size: clamp(0.9rem, 2.7vw, 1.2rem);
  line-height: 1.2;
}

.aviation-news-hero-caption > span:last-child {
  color: rgba(248, 250, 255, 0.78);
  font-size: clamp(0.76rem, 2vw, 0.92rem);
  line-height: 1.4;
}

.aviation-news-scroll-cue {
  position: absolute;
  z-index: 2;
  bottom: max(104px, calc(var(--safe-bottom) + 96px));
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 0;
  padding: 8px 14px;
  background: transparent;
  color: var(--nc-palette-text-primary-dark);
  font: inherit;
  font-size: 0.76rem;
  font-weight: var(--nc-weight-semibold);
  transform: translateX(-50%);
}

.aviation-news-scroll-cue > span:last-child {
  color: var(--nc-palette-gold-dark);
  font-size: 1.2rem;
}

.aviation-news-feed {
  display: grid;
  align-content: start;
  gap: var(--nc-space-4);
  min-height: 100svh;
  padding: clamp(26px, 6vw, 58px) clamp(14px, 5vw, 64px) calc(36px + var(--safe-bottom));
  background:
    linear-gradient(180deg, var(--nc-color-deep-navy), var(--nc-color-canvas) 24%, var(--nc-color-canvas));
}

.aviation-news-feed > * {
  width: min(100%, 900px);
  margin-inline: auto;
}

.aviation-news-feed-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--nc-space-4);
  min-width: 0;
  border-bottom: 1px solid var(--nc-color-border);
  padding-bottom: var(--nc-space-4);
}

.aviation-news-feed-heading > div:first-child,
.aviation-news-feed-heading h2,
.aviation-news-feed-heading p {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.aviation-news-feed-heading h2 {
  color: var(--nc-color-text-primary);
  font-size: clamp(1.35rem, 4vw, 2rem);
}

.aviation-news-feed-heading #aviationNewsDaySummary {
  margin-top: 5px;
  color: var(--nc-color-text-secondary);
  font-size: 0.76rem;
  line-height: 1.4;
}

.aviation-news-day-navigation {
  display: grid;
  grid-template-columns: minmax(0, auto) auto minmax(0, auto);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.aviation-news-day-navigation button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--nc-color-border);
  border-radius: var(--nc-radius-sm);
  padding: 8px 11px;
  background: var(--nc-color-surface);
  color: var(--nc-color-text-primary);
  font: inherit;
  font-size: 0.72rem;
  font-weight: var(--nc-weight-semibold);
  white-space: nowrap;
}

.aviation-news-day-navigation button:not(:disabled):active {
  border-color: var(--nc-color-accent-blue);
  color: var(--nc-color-accent-blue);
}

.aviation-news-day-navigation button:disabled {
  opacity: 0.38;
}

#aviationNewsDayPosition {
  color: var(--nc-color-accent-gold-text);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  font-weight: var(--nc-weight-semibold);
  white-space: nowrap;
}

.aviation-news-list {
  display: grid;
  gap: var(--nc-space-3);
  min-width: 0;
}

.aviation-news-item {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--nc-border);
  border-radius: var(--nc-radius-md);
  background: var(--nc-surface);
  box-shadow: var(--nc-elevation-1);
}

.aviation-news-item > img {
  width: 100%;
  height: 100%;
  min-height: 124px;
  object-fit: cover;
  background: var(--nc-surface-elevated);
}

.aviation-news-item-copy {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  padding: 12px;
}

.aviation-news-item-copy h3,
.aviation-news-item-copy > p,
.aviation-news-item-meta {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.aviation-news-item-copy h3 {
  color: var(--nc-text-primary);
  font-family: var(--nc-font-display);
  font-size: 0.94rem;
  line-height: 1.25;
}

.aviation-news-item-copy > p:not(.home-card-kicker) {
  display: -webkit-box;
  overflow: hidden;
  color: var(--nc-text-secondary);
  font-size: 0.74rem;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.aviation-news-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  color: var(--nc-text-secondary);
  font-size: 0.65rem;
}

.aviation-news-item-meta span {
  color: var(--nc-accent-blue);
  font-weight: var(--nc-weight-semibold);
}

.aviation-news-item .text-action {
  justify-self: start;
}

.weather-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 96;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: max(18px, calc(var(--safe-top) + 10px)) 14px max(18px, calc(var(--safe-bottom) + 10px));
  background: var(--nc-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.weather-detail-modal.hidden {
  display: none;
}

.weather-detail-card {
  width: min(100%, 720px);
  min-width: 0;
  max-height: min(88dvh, 820px);
  overflow: auto;
  border: 1px solid var(--nc-border-strong);
  border-radius: var(--nc-radius-md);
  padding: 14px;
  background: var(--nc-surface);
  color: var(--nc-text-primary);
  box-shadow: var(--nc-elevation-overlay);
}

.weather-detail-card .fixed-top-bar {
  position: sticky;
  top: -14px;
  z-index: 2;
  margin: -14px -14px 10px;
  border-bottom: 1px solid var(--nc-border);
  padding: 14px;
  background: color-mix(in srgb, var(--nc-surface) 96%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

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

.weather-detail-tabs .segment {
  min-height: 44px;
}

.weather-detail-content {
  min-width: 0;
}

.weather-detail-grid,
.weather-forecast-group dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--nc-border);
  border-radius: var(--nc-radius-sm);
  background: var(--nc-border);
}

.weather-detail-grid > div,
.weather-forecast-group dl > div {
  display: grid;
  align-content: start;
  gap: 3px;
  min-width: 0;
  padding: 10px;
  background: var(--nc-surface-elevated);
}

.weather-detail-grid dt,
.weather-forecast-group dt {
  color: var(--nc-text-secondary);
  font-size: 0.64rem;
  font-weight: var(--nc-weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.weather-detail-grid dd,
.weather-forecast-group dd {
  min-width: 0;
  margin: 0;
  color: var(--nc-text-primary);
  font-size: 0.78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.weather-forecast-groups {
  display: grid;
  gap: 0;
  min-width: 0;
  margin-top: 14px;
  border-top: 1px solid var(--nc-border);
}

.weather-forecast-group {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding-block: 12px;
  border-bottom: 1px solid var(--nc-border);
}

.weather-forecast-group > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--nc-space-3);
  min-width: 0;
}

.weather-forecast-group > header strong {
  color: var(--nc-color-accent-gold-text);
  font-size: 0.8rem;
}

.weather-forecast-group > header span {
  min-width: 0;
  color: var(--nc-text-secondary);
  font-size: 0.66rem;
  text-align: right;
  overflow-wrap: anywhere;
}

.weather-raw-report {
  width: 100%;
  min-width: 0;
  margin: 0;
  overflow: auto;
  border: 1px solid var(--nc-border);
  border-radius: var(--nc-radius-sm);
  padding: 12px;
  background: var(--nc-canvas-deep);
  color: var(--nc-feedback-text);
  font: 500 0.8rem/1.55 ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: text;
  -webkit-user-select: text;
}

.weather-source-line {
  margin: 10px 0 0;
  color: var(--nc-text-secondary);
  font-size: 0.68rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

@keyframes ncHomeSkeleton {
  from { background-position: 100% 0; }
  to { background-position: -120% 0; }
}

.home-trust-strip {
  display: grid;
  grid-template-columns: minmax(20px, 1fr) auto minmax(20px, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  border: 1px solid var(--nc-color-border);
  border-radius: var(--nc-radius-md);
  padding: 8px 10px;
  background: color-mix(in srgb, var(--nc-color-surface) 94%, var(--nc-color-deep-navy));
}

.home-trust-strip > span {
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--nc-color-accent-gold) 58%, transparent));
}

.home-trust-strip > span:last-child {
  background: linear-gradient(90deg, color-mix(in srgb, var(--nc-color-accent-gold) 58%, transparent), transparent);
}

.home-trust-strip strong {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: var(--nc-color-text-secondary);
  font-size: 0.64rem;
  font-weight: var(--nc-weight-medium);
  white-space: nowrap;
}

.home-trust-strip .button-icon {
  width: 15px;
  height: 15px;
  color: var(--nc-color-accent-gold);
}

.home-workspace-directory .workspace-heading {
  border-color: var(--nc-color-border);
}

.home-workspace-directory .workspace-heading .eyebrow {
  color: var(--nc-color-accent-blue);
}

.home-workspace-directory .workspace-heading h2 {
  color: var(--nc-color-text-primary);
}

.home-workspace-directory .back-to-main {
  border-color: var(--nc-color-border);
  background: var(--nc-color-surface);
  color: var(--nc-color-text-primary);
}

.home-workspace-directory .back-to-main span,
.home-workspace-directory .module-card-mini-icon,
.home-workspace-directory .module-card-arrow {
  color: var(--nc-color-accent-gold);
}

.home-workspace-directory .module-card-mini-icon {
  border-color: color-mix(in srgb, var(--nc-color-accent-gold) 42%, var(--nc-color-border));
  background: color-mix(in srgb, var(--nc-color-accent-gold) 10%, var(--nc-color-surface));
}

.home-workspace-directory .module-card-badge,
.home-workspace-directory .status-chip {
  border-color: color-mix(in srgb, var(--nc-color-accent-blue) 34%, var(--nc-color-border));
  background: color-mix(in srgb, var(--nc-color-accent-blue) 12%, var(--nc-color-surface));
  color: var(--nc-color-accent-blue);
}

.home-workspace-directory .module-card {
  border-color: var(--nc-color-border);
  background: var(--nc-color-surface);
  color: var(--nc-color-text-primary);
}

.home-workspace-directory .module-card-body {
  border-top-color: var(--nc-color-border);
  background: var(--nc-color-surface);
}

.home-workspace-directory .module-card-body > small {
  color: var(--nc-color-text-secondary);
}

/* Premium aviation bottom navigation */

body:not(.quiz-active) .app-shell {
  padding-bottom: calc(112px + var(--safe-bottom));
}

#primaryNavigation.tabs {
  position: fixed;
  top: auto;
  right: auto;
  bottom: max(8px, var(--safe-bottom));
  left: 50%;
  z-index: 80;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  width: min(calc(100% - 24px), 640px);
  height: 78px;
  min-height: 78px;
  margin: 0;
  padding: 7px 10px;
  overflow: visible;
  border: 1px solid var(--nc-bottom-nav-border);
  border-radius: 26px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--nc-bottom-nav-surface) 72%, transparent), transparent 44%),
    color-mix(in srgb, var(--nc-bottom-nav-canvas) 96%, transparent);
  box-shadow:
    0 14px 34px color-mix(in srgb, var(--nc-color-deep-navy) 54%, transparent),
    inset 0 1px color-mix(in srgb, var(--nc-color-text-primary) 8%, transparent);
  transform: translate3d(-50%, 0, 0);
  backdrop-filter: blur(12px) saturate(106%);
  -webkit-backdrop-filter: blur(12px) saturate(106%);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

body.quiz-active #primaryNavigation.tabs {
  display: none;
}

#primaryNavigation.tabs::before {
  position: absolute;
  top: -14px;
  left: 50%;
  z-index: 0;
  width: 78px;
  height: 38px;
  border: 1px solid var(--nc-bottom-nav-border);
  border-bottom: 0;
  border-radius: 44px 44px 0 0;
  background: var(--nc-bottom-nav-canvas);
  content: "";
  transform: translate3d(-50%, 0, 0);
}

#primaryNavigation .navigation-group {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 2px;
  min-width: 0;
}

#primaryNavigation .navigation-group-left,
#primaryNavigation .navigation-group-right {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-content: stretch;
}

#primaryNavigation .navigation-main {
  position: relative;
  z-index: 2;
  display: grid;
  width: 70px;
  height: 100%;
  min-width: 70px;
  min-height: 0;
  place-items: center;
}

#primaryNavigation .nc-bottom-navigation-item {
  position: relative;
  display: grid;
  min-width: 44px;
  min-height: 58px;
  place-items: center;
  border: 0;
  border-radius: 12px;
  padding: 4px 2px 3px;
  background: transparent;
  color: var(--nc-bottom-nav-text);
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

#primaryNavigation .nc-tab-visual {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: 32px minmax(13px, auto);
  align-items: center;
  justify-items: center;
  gap: 2px;
  width: 100%;
  min-width: 0;
  transform: translate3d(0, 0, 0);
  transform-origin: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition:
    color 160ms ease,
    transform 160ms cubic-bezier(0.2, 0.72, 0.22, 1);
}

#primaryNavigation .nc-bottom-navigation-item:not(.tab-main-menu) .nc-tab-visual {
  top: -2px;
}

#primaryNavigation .nc-bottom-navigation-item:not(.tab-main-menu):active .nc-tab-visual {
  transform: translateY(2px) scale(0.93);
}

#primaryNavigation .tab-main-menu:active .nc-tab-visual {
  transform: none;
}

#primaryNavigation .tab-icon,
#primaryNavigation .tab.active .tab-icon {
  position: relative;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  overflow: visible;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: currentColor;
  box-shadow: none;
  transition: color var(--motion-navigation-control-duration, 160ms) var(--motion-navigation-ease, ease);
}

#primaryNavigation .tab-icon svg {
  display: block;
  width: 29px;
  height: 29px;
  overflow: visible;
  stroke-width: 1.8;
}

#primaryNavigation .tab-label {
  display: block;
  min-width: 0;
  max-width: 100%;
  color: currentColor;
  font-family: var(--nc-font-text);
  font-size: 0.65rem;
  font-weight: var(--nc-weight-semibold);
  line-height: 1.08;
  overflow-wrap: normal;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#primaryNavigation .nc-bottom-navigation-item:not(.tab-main-menu)::after {
  position: absolute;
  right: calc(50% - 9px);
  bottom: 0;
  left: calc(50% - 9px);
  height: 3px;
  border-radius: var(--nc-radius-round);
  background: var(--nc-bottom-nav-active);
  content: "";
  opacity: 0;
  transform: scaleX(0.55);
  transition:
    opacity var(--motion-navigation-control-duration, 160ms) var(--motion-navigation-ease, ease),
    transform var(--motion-navigation-control-duration, 160ms) var(--motion-navigation-ease, ease);
}

#primaryNavigation .nc-tab-underglow {
  position: absolute;
  bottom: 3px;
  left: 50%;
  z-index: 0;
  width: 46px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--nc-bottom-nav-blue) 38%, transparent), transparent 72%);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, 0, 0) scale(0.78);
  transition:
    opacity var(--motion-navigation-control-duration, 160ms) var(--motion-navigation-ease, ease),
    transform var(--motion-navigation-control-duration, 160ms) var(--motion-navigation-ease, ease);
}

#primaryNavigation .nc-bottom-navigation-item.active {
  background: transparent;
  color: var(--nc-bottom-nav-active);
  box-shadow: none;
}

#primaryNavigation .nc-bottom-navigation-item.active::after {
  opacity: 1;
  transform: scaleX(1);
}

#primaryNavigation .nc-bottom-navigation-item.active .nc-tab-underglow {
  opacity: 0.2;
  transform: translate3d(-50%, 0, 0) scale(1);
}

#primaryNavigation .nc-bottom-navigation-item:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--nc-bottom-nav-blue) 58%, transparent);
  outline-offset: 2px;
}

#primaryNavigation .tab-main-menu,
#primaryNavigation .tab-main-menu.active {
  width: 70px;
  height: 70px;
  min-width: 70px;
  min-height: 70px;
  border: 1px solid color-mix(in srgb, var(--nc-bottom-nav-blue) 54%, var(--nc-bottom-nav-border));
  border-radius: 50%;
  padding: 0;
  background: var(--nc-bottom-nav-center);
  color: var(--nc-bottom-nav-center-text);
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--nc-bottom-nav-blue) 12%, transparent),
    0 10px 24px color-mix(in srgb, var(--nc-bottom-nav-blue) 18%, transparent),
    inset 0 1px color-mix(in srgb, var(--nc-palette-text-primary-dark) 12%, transparent);
  transform: translateY(-14px);
}

#primaryNavigation .tab-main-menu.active {
  border-color: var(--nc-bottom-nav-active);
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--nc-bottom-nav-blue) 18%, transparent),
    0 11px 26px color-mix(in srgb, var(--nc-bottom-nav-blue) 22%, transparent),
    inset 0 1px color-mix(in srgb, var(--nc-palette-text-primary-dark) 14%, transparent);
}

#primaryNavigation .tab-main-menu .nc-tab-visual {
  display: grid;
  grid-template-rows: 1fr;
  gap: 0;
  width: 100%;
  height: 100%;
  place-items: center;
}

#primaryNavigation .tab-main-menu .tab-icon,
#primaryNavigation .tab-main-menu.active .tab-icon {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: transparent;
  color: var(--nc-bottom-nav-center-text);
}

#primaryNavigation .nc-center-emblem {
  position: relative;
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: center;
  transition: transform var(--motion-navigation-control-duration, 160ms) var(--motion-navigation-ease, cubic-bezier(0.2, 0.72, 0.22, 1));
}

#primaryNavigation .tab-main-menu.motion-pressed .nc-center-emblem {
  transform: translate3d(0, 1px, 0) scale(0.96);
}

#primaryNavigation .nc-center-ring {
  position: relative;
  z-index: 2;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 2px solid var(--nc-bottom-nav-center-text);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 2px color-mix(in srgb, var(--nc-bottom-nav-center-text) 14%, transparent),
    0 0 14px color-mix(in srgb, var(--nc-bottom-nav-center-text) 18%, transparent);
}

#primaryNavigation .tab-main-mark {
  display: block;
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  overflow: visible;
  color: var(--nc-bottom-nav-center-text);
  transform-origin: center;
}

#primaryNavigation .tab-main-mark path {
  fill: currentColor;
}

#primaryNavigation .nc-tab-main-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

#primaryNavigation .nc-center-ripple {
  position: absolute;
  z-index: 1;
  width: 58px;
  height: 58px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

#primaryNavigation .nc-center-ripple-gold {
  color: var(--nc-bottom-nav-center-text);
}

#primaryNavigation :is(.nc-home-emblem, .nc-logbook-spine, .nc-quiz-tassel) {
  stroke: var(--nc-bottom-nav-active);
}

#primaryNavigation :is(.nc-home-emblem, .nc-logbook-page, .nc-quiz-tassel) {
  transform-box: fill-box;
}

#primaryNavigation .nc-tab-icon-shine {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: -75%;
  z-index: 3;
  display: block;
  width: 52%;
  background: linear-gradient(100deg, transparent, color-mix(in srgb, var(--nc-bottom-nav-active) 64%, transparent), transparent);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 0, 0) skewX(-14deg);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

#primaryNavigation .nc-navigation-profile .tab-icon,
#primaryNavigation .nc-navigation-home .tab-icon {
  overflow: hidden;
}

#primaryNavigation .is-activating .nc-tab-visual {
  will-change: transform;
}

#primaryNavigation .is-activating :is(
  .nc-home-emblem,
  .nc-logbook-page,
  .nc-center-emblem,
  .nc-quiz-tassel
) {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
}

#primaryNavigation .is-activating :is(.nc-tab-icon-shine, .nc-center-ripple) {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform, opacity;
}

#primaryNavigation .nc-bottom-navigation-item:not(.tab-main-menu).is-activating .nc-tab-visual {
  animation: ncNavigationActivate var(--nc-nav-animation-duration, var(--motion-navigation-duration, 520ms)) var(--motion-navigation-ease, cubic-bezier(0.2, 0.72, 0.22, 1)) var(--nc-nav-animation-delay, 0ms) both;
}

#primaryNavigation .nc-navigation-home.is-activating .nc-home-emblem {
  animation: ncHomeEmblemActivate var(--nc-nav-animation-duration, var(--motion-navigation-duration, 520ms)) var(--motion-navigation-ease, cubic-bezier(0.2, 0.72, 0.22, 1)) var(--nc-nav-animation-delay, 0ms) both;
}

#primaryNavigation .nc-navigation-home.is-activating .nc-tab-icon-shine,
#primaryNavigation .nc-navigation-profile.is-activating .nc-tab-icon-shine {
  animation: ncNavigationShine var(--nc-nav-animation-duration, var(--motion-navigation-duration, 520ms)) ease-in-out var(--nc-nav-animation-delay, 0ms) both;
}

#primaryNavigation .nc-navigation-logbook.is-activating .nc-logbook-page-left {
  animation: ncLogbookPageLeft var(--nc-nav-animation-duration, var(--motion-navigation-duration, 520ms)) ease-in-out var(--nc-nav-animation-delay, 0ms) both;
}

#primaryNavigation .nc-navigation-logbook.is-activating .nc-logbook-page-right {
  animation: ncLogbookPageRight var(--nc-nav-animation-duration, var(--motion-navigation-duration, 520ms)) ease-in-out var(--nc-nav-animation-delay, 0ms) both;
}

#primaryNavigation .tab-main-menu.is-activating .nc-center-emblem {
  animation: ncCenterEmblemActivate var(--nc-nav-animation-duration, var(--motion-navigation-duration, 520ms)) var(--motion-navigation-ease, cubic-bezier(0.2, 0.72, 0.22, 1)) var(--nc-nav-animation-delay, 0ms) both;
}

#primaryNavigation .tab-main-menu.is-activating .nc-center-ripple-gold {
  animation: ncCenterRipple var(--nc-nav-animation-duration, var(--motion-navigation-duration, 520ms)) ease-out var(--nc-nav-animation-delay, 0ms) both;
}

#primaryNavigation .nc-navigation-quiz.is-activating .nc-quiz-tassel {
  animation: ncQuizTassel var(--nc-nav-animation-duration, var(--motion-navigation-duration, 520ms)) ease-in-out var(--nc-nav-animation-delay, 0ms) both;
  transform-origin: top center;
}

@keyframes ncNavigationActivate {
  0% { transform: translate3d(0, 2px, 0) scale(0.94); }
  46% { transform: translate3d(0, -2px, 0) scale(1.035); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes ncHomeEmblemActivate {
  0%, 28% { transform: translate3d(0, 0, 0); }
  52% { transform: translate3d(0, -3px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

@keyframes ncNavigationShine {
  0%, 30% { opacity: 0; transform: translate3d(0, 0, 0) skewX(-14deg); }
  42% { opacity: 0.58; }
  72% { opacity: 0.18; transform: translate3d(380%, 0, 0) skewX(-14deg); }
  100% { opacity: 0; transform: translate3d(380%, 0, 0) skewX(-14deg); }
}

@keyframes ncLogbookPageLeft {
  0%, 30% { transform: rotate(0deg) translate3d(0, 0, 0); }
  48% { transform: rotate(5deg) translate3d(0, -1px, 0); }
  68% { transform: rotate(-3deg) translate3d(0, -1px, 0); }
  100% { transform: rotate(0deg) translate3d(0, 0, 0); }
}

@keyframes ncLogbookPageRight {
  0%, 34% { transform: rotate(0deg) translate3d(0, 0, 0); }
  52% { transform: rotate(-5deg) translate3d(0, -1px, 0); }
  72% { transform: rotate(2deg) translate3d(0, -1px, 0); }
  100% { transform: rotate(0deg) translate3d(0, 0, 0); }
}

@keyframes ncCenterEmblemActivate {
  0% { transform: translate3d(0, 1px, 0) scale(0.96); }
  52% { transform: translate3d(0, -1px, 0) scale(1.035); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes ncCenterRipple {
  0%, 28% { opacity: 0; transform: scale(0.96); }
  38% { opacity: 0.3; }
  78%, 100% { opacity: 0; transform: scale(1.35); }
}

@keyframes ncQuizTassel {
  0%, 30% { transform: rotate(0deg); }
  48% { transform: rotate(12deg); }
  66% { transform: rotate(-8deg); }
  84%, 100% { transform: rotate(0deg); }
}

@media (hover: hover) {
  #primaryNavigation .nc-bottom-navigation-item:not(.tab-main-menu):hover {
    background: color-mix(in srgb, var(--nc-bottom-nav-blue) 7%, transparent);
  }
}

@media (max-width: 360px) {
  #primaryNavigation.tabs {
    grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr);
    gap: 1px;
    width: calc(100% - 12px);
    padding-inline: 6px;
  }

  #primaryNavigation.tabs::before {
    top: -11px;
    width: 72px;
    height: 36px;
  }

  #primaryNavigation .navigation-main {
    width: 64px;
    min-width: 64px;
  }

  #primaryNavigation .tab-main-menu,
  #primaryNavigation .tab-main-menu.active {
    width: 64px;
    height: 64px;
    min-width: 64px;
    min-height: 64px;
  }

  #primaryNavigation .tab-main-menu .tab-icon,
  #primaryNavigation .tab-main-menu.active .tab-icon {
    width: 58px;
    height: 58px;
  }

  #primaryNavigation .nc-center-ring {
    width: 54px;
    height: 54px;
  }

  #primaryNavigation .tab-label {
    font-size: 0.625rem;
  }
}

@media (min-width: 760px) {
  #primaryNavigation.tabs {
    bottom: max(12px, var(--safe-bottom));
    width: min(calc(100% - 32px), 640px);
  }
}

.large-text #primaryNavigation.tabs {
  height: 82px;
  min-height: 82px;
}

.large-text #primaryNavigation.tabs::before {
  top: -12px;
}

@media (max-width: 360px) {
  .large-text #primaryNavigation.tabs::before {
    top: -9px;
  }
}

.large-text #primaryNavigation .tab-label {
  font-size: 0.72rem;
}

.native-reduce-transparency :is(.tabs, .home-weather-metrics) {
  background: var(--nc-canvas-deep);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.native-reduce-transparency #primaryNavigation.tabs {
  background: var(--nc-bottom-nav-canvas);
}

:is(.reduce-motion, .native-reduce-motion) #primaryNavigation .nc-bottom-navigation-item,
:is(.reduce-motion, .native-reduce-motion) #primaryNavigation .nc-tab-visual,
:is(.reduce-motion, .native-reduce-motion) #primaryNavigation .nc-tab-underglow {
  transition-duration: 140ms !important;
}

:is(.reduce-motion, .native-reduce-motion) #primaryNavigation .is-activating :is(
  .nc-tab-visual,
  .nc-home-emblem,
  .nc-tab-icon-shine,
  .nc-logbook-page,
  .nc-center-emblem,
  .nc-center-ripple,
  .nc-quiz-tassel
) {
  animation: none !important;
}

:is(.reduce-motion, .native-reduce-motion) #primaryNavigation .is-activating:not(.tab-main-menu) .nc-tab-visual {
  transform: scale(0.98);
}

:is(.reduce-motion, .native-reduce-motion) #primaryNavigation .nc-center-ripple,
:is(.reduce-motion, .native-reduce-motion) #primaryNavigation .nc-tab-icon-shine {
  display: none;
}

:is(.reduce-motion, .native-reduce-motion) .home-weather-card.is-loading :is(.home-weather-reading strong, .home-weather-metrics dd, .home-weather-report small) {
  animation: none;
}

:is(.reduce-motion, .native-reduce-motion) .home-weather-refresh.is-loading .button-icon {
  animation: none;
}

@media (min-width: 760px) {
  body:not(.quiz-active) .app-shell {
    padding-bottom: calc(112px + var(--safe-bottom));
  }

  body:not(.quiz-active) .tabs {
    position: fixed;
    top: auto;
    right: auto;
    bottom: max(10px, var(--safe-bottom));
    left: 50%;
    width: min(calc(100% - 32px), 650px);
    min-height: 72px;
    margin: 0;
    padding: 7px 12px;
    transform: translateX(-50%);
  }

  .home-dashboard {
    gap: 12px;
  }

  .home-weather-card {
    grid-template-columns: minmax(0, 1fr) 148px;
    min-height: 250px;
  }

  .home-snapshot-card,
  .home-fact-card {
    padding-inline: 16px;
  }

  .aviation-news-item {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .aviation-news-item > img {
    min-height: 150px;
  }

  .home-news-card,
  .home-news-copy {
    min-height: 172px;
  }
}

@media (max-width: 390px) {
  .home-dashboard {
    gap: 8px;
  }

  .home-hero-header h2 {
    font-size: 2.2rem;
  }

  .home-greeting {
    font-size: 1.25rem;
  }

  .home-subtitle {
    font-size: 0.76rem;
  }

  .home-weather-card {
    grid-template-columns: minmax(0, 1fr) 98px;
    min-height: 208px;
  }

  .home-weather-primary {
    padding: 12px;
  }

  .home-weather-actions {
    align-items: stretch;
  }

  .home-weather-location-controls,
  .home-weather-report-actions {
    width: 100%;
  }

  .home-weather-reading strong {
    font-size: 3rem;
  }

  .home-news-card,
  .home-news-copy {
    min-height: 138px;
  }

  .home-news-copy {
    width: 78%;
    padding: 12px;
  }

  .home-snapshot-card {
    align-items: flex-start;
  }

  .home-snapshot-card > strong {
    max-width: 52%;
  }

  .home-currency-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-currency-row > span {
    text-align: left;
  }

  .aviation-news-item {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .aviation-news-item > img {
    min-height: 116px;
  }

  .aviation-news-item-copy {
    padding: 10px;
  }

  .weather-detail-card {
    padding: 12px;
  }

  .weather-detail-card .fixed-top-bar {
    top: -12px;
    margin: -12px -12px 10px;
    padding: 12px;
  }

  .weather-detail-grid,
  .weather-forecast-group dl {
    grid-template-columns: minmax(0, 1fr);
  }

  .weather-forecast-group > header {
    display: grid;
  }

  .weather-forecast-group > header span {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .aviation-news-heading {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px var(--nc-space-3);
  }

  .aviation-news-heading > .back-to-main {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  .aviation-news-heading > #aviationNewsRefresh {
    grid-column: 2;
    grid-row: 1;
  }

  .aviation-news-heading > div {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .aviation-news-hero-caption {
    margin-bottom: 172px;
  }

  .aviation-news-feed-heading {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .aviation-news-day-navigation {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    width: 100%;
  }

  .aviation-news-day-navigation button {
    width: 100%;
    padding-inline: 8px;
  }
}

/* Accessibility and resilient fallbacks */

.large-text .home-snapshot-card,
.large-text .home-news-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.large-text .home-snapshot-card > strong {
  text-align: left;
}

.large-text .home-news-entry .home-news-action {
  justify-self: start;
}

.large-text .home-news-entry strong {
  white-space: normal;
}

.large-text .aviation-news-item {
  grid-template-columns: minmax(0, 1fr);
}

.large-text .aviation-news-item > img {
  max-height: 220px;
}

.large-text {
  --nc-type-caption: 0.8125rem;
  --nc-type-label: 0.875rem;
  --nc-type-body: 1rem;
  --nc-type-subtitle: 1.125rem;
  --nc-type-title: 1.375rem;
  --nc-type-display: 1.875rem;
  --nc-auth-type-title: 1.625rem;
  --nc-auth-type-subtitle: 1.0625rem;
  --nc-auth-type-label: 1rem;
  --nc-auth-type-input: 1.1875rem;
  --nc-auth-type-tab: 1.25rem;
  --nc-auth-type-action: 1.25rem;
  --nc-auth-type-secondary: 1.125rem;
}

.native-differentiate-without-color .tab.active,
.native-differentiate-without-color .segment.active,
.native-differentiate-without-color .logbook-navigation button.active {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .brief-button,
  .theme-toggle,
  .user-pill,
  .topbar-notifications,
  .tabs {
    background: var(--nc-canvas-deep);
  }
}

@media (max-width: 420px) {
  .workspace-heading,
  .module-heading,
  .panel-head {
    min-width: 0;
  }

  .status-chip,
  .module-card-badge,
  .points-pill {
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
  }
}

@media (forced-colors: active) {
  .panel,
  .quiz-card,
  .module-card,
  .tabs,
  .answer-option,
  .primary-action,
  .secondary-action {
    border: 1px solid CanvasText;
    box-shadow: none;
  }

  .tab.active,
  .segment.active,
  .answer-option.selected {
    outline: 2px solid Highlight;
  }

  .home-news-entry,
  .home-snapshot-card,
  .home-fact-card,
  .home-currency-section,
  .aviation-news-item,
  .weather-detail-card {
    border: 1px solid CanvasText;
    box-shadow: none;
  }

  #primaryNavigation .nc-bottom-navigation-item.active::after {
    background: Highlight;
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .module-card,
  .panel,
  .tabs,
  .primary-action,
  .secondary-action {
    transition-duration: 0.01ms !important;
  }

  #primaryNavigation .nc-bottom-navigation-item,
  #primaryNavigation .nc-tab-visual,
  #primaryNavigation .nc-tab-underglow {
    transition-duration: 140ms !important;
  }

  #primaryNavigation .is-activating :is(
    .nc-tab-visual,
    .nc-home-emblem,
    .nc-tab-icon-shine,
    .nc-logbook-page,
    .nc-center-emblem,
    .nc-center-ripple,
    .nc-quiz-tassel
  ) {
    animation: none !important;
  }

  #primaryNavigation .is-activating .nc-tab-visual {
    transform: scale(0.98);
  }

  #primaryNavigation :is(.nc-center-ripple, .nc-tab-icon-shine) {
    display: none;
  }

  .home-weather-card.is-loading :is(.home-weather-reading strong, .home-weather-metrics dd, .home-weather-report small) {
    animation: none;
  }

  .home-weather-refresh.is-loading .button-icon {
    animation: none;
  }
}

/* Reference-aligned Logbook entry workflow */

body.logbook-entry-active .topbar {
  display: none;
}

body.logbook-entry-active .app-shell {
  padding-top: max(12px, calc(var(--safe-top) + 8px));
  padding-bottom: calc(82px + var(--safe-bottom));
}

body.logbook-entry-active #primaryNavigation.tabs {
  display: none;
}

body.logbook-entry-active #logbookScreen .logbook-header-actions {
  display: none;
}

.nc-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

#logbookScreen {
  --nc-logbook-content-width: 920px;
  --nc-logbook-section-gap: 12px;
  --nc-logbook-field-gap: 8px;
  --nc-logbook-nav-clearance: calc(8px + var(--safe-bottom));
  min-width: 0;
}

#logbookScreen .logbook-module-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: var(--nc-space-2);
  width: min(100%, var(--nc-logbook-content-width));
  min-width: 0;
  min-height: 56px;
  margin: 0 auto var(--nc-space-3);
  border-bottom: 1px solid color-mix(in srgb, var(--nc-color-border) 84%, transparent);
  padding: 4px 0 10px;
  background: transparent;
}

#logbookScreen .logbook-module-heading > h2 {
  min-width: 0;
  margin: 0;
  color: var(--nc-color-text-primary);
  font-family: var(--nc-font-display);
  font-size: clamp(1.05rem, 3.6vw, 1.45rem);
  font-weight: var(--nc-weight-semibold);
  line-height: 1.15;
  text-align: center;
  overflow-wrap: anywhere;
}

#logbookScreen .logbook-module-heading .back-to-main {
  justify-self: start;
  min-width: 0;
  margin: 0;
}

#logbookScreen .logbook-module-heading .back-to-main:focus-visible,
#logbookScreen :is(.logbook-entry-density-switch, .logbook-entry-actions, .logbook-time-basis) button:focus-visible,
#logbookScreen .logbook-acars-capture-button:focus-visible,
#logbookScreen .logbook-toggle-fieldset label:has(input:focus-visible),
#logbookScreen .logbook-sticky-actions button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--nc-color-accent-blue) 48%, transparent);
  outline-offset: 2px;
}

#logbookScreen .logbook-header-actions {
  justify-self: end;
  min-width: 0;
  margin: 0;
}

#logbookScreen .logbook-header-actions .status-chip {
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#logbookScreen #logbookEntryDock {
  position: static;
  display: grid;
  gap: var(--nc-space-2);
  width: min(100%, var(--nc-logbook-content-width));
  margin: 0 auto var(--nc-space-3);
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

#logbookScreen #logbookEntryDock.hidden {
  display: none;
}

#logbookScreen .logbook-entry-density-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  border: 1px solid var(--nc-color-border);
  border-radius: var(--nc-radius-round);
  padding: 2px;
  background: color-mix(in srgb, var(--nc-color-surface) 92%, var(--nc-color-deep-navy));
}

#logbookScreen .logbook-entry-density-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: var(--nc-radius-round);
  padding: 7px 10px;
  background: transparent;
  color: var(--nc-color-text-secondary);
  font: inherit;
  font-size: 0.82rem;
}

#logbookScreen .logbook-entry-density-switch button.active {
  border-color: color-mix(in srgb, var(--nc-color-accent-blue) 76%, var(--nc-color-border));
  background: color-mix(in srgb, var(--nc-color-accent-blue) 15%, var(--nc-color-surface-elevated));
  color: var(--nc-color-accent-blue);
  box-shadow: inset 0 1px color-mix(in srgb, var(--nc-color-text-primary) 5%, transparent);
}

#logbookScreen .logbook-entry-density-switch .button-icon,
#logbookScreen .logbook-entry-density-switch .button-icon svg {
  width: 18px;
  height: 18px;
}

#logbookScreen .logbook-entry-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) 52px;
  align-items: stretch;
  gap: 2px;
  min-width: 0;
  border: 1px solid var(--nc-color-border);
  border-radius: var(--nc-radius-md);
  padding: 2px;
  background: color-mix(in srgb, var(--nc-color-surface) 94%, var(--nc-color-deep-navy));
}

#logbookScreen .logbook-entry-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 52px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: var(--nc-radius-sm);
  padding: 6px 5px;
  background: transparent;
  color: var(--nc-color-text-secondary);
  font: inherit;
}

#logbookScreen .logbook-entry-action:not(:last-child) {
  border-right-color: color-mix(in srgb, var(--nc-color-border) 66%, transparent);
}

#logbookScreen .logbook-entry-action.active {
  border-color: color-mix(in srgb, var(--nc-color-accent-blue) 68%, var(--nc-color-border));
  background: color-mix(in srgb, var(--nc-color-accent-blue) 13%, var(--nc-color-surface-elevated));
  color: var(--nc-color-text-primary);
  box-shadow: none;
}

#logbookScreen .logbook-entry-action strong {
  min-width: 0;
  color: inherit;
  font-size: 0.72rem;
  font-weight: var(--nc-weight-semibold);
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-align: center;
}

#logbookScreen .logbook-entry-action .button-icon,
#logbookScreen .logbook-entry-action .button-icon svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

#logbookScreen .logbook-settings-action {
  padding-inline: 0;
}

#logbookScreen .logbook-settings-action strong {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

#logbookScreen #logbookAddView.active {
  display: block;
  width: 100%;
  min-width: 0;
}

#logbookScreen #logbookFlightForm {
  display: grid;
  gap: var(--nc-logbook-section-gap);
  width: min(100%, var(--nc-logbook-content-width));
  min-width: 0;
  margin: 0 auto;
  border: 0;
  padding: 0;
  padding-bottom: 4px;
  background: transparent;
  box-shadow: none;
}

#logbookScreen .logbook-entry-stack {
  display: grid;
  gap: var(--nc-logbook-section-gap);
  min-width: 0;
}

#logbookScreen #logbookFlightForm .logbook-form-section,
#logbookScreen #logbookFlightForm .logbook-form-disclosure {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--nc-color-accent-blue) 42%, var(--nc-color-border));
  border-radius: var(--nc-radius-md);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--nc-color-accent-blue) 4%, transparent), transparent 54%),
    var(--nc-color-surface);
  box-shadow: inset 0 1px color-mix(in srgb, var(--nc-color-text-primary) 4%, transparent);
}

#logbookScreen #logbookFlightForm .logbook-form-section {
  display: grid;
  gap: var(--nc-logbook-field-gap);
  padding: 12px;
}

#logbookScreen .logbook-form-section-heading {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 32px;
}

#logbookScreen .logbook-form-section-heading > .button-icon,
#logbookScreen .logbook-form-section-heading > .button-icon svg {
  width: 22px;
  height: 22px;
  color: var(--nc-color-accent-blue);
}

#logbookScreen .logbook-form-section-heading h4 {
  min-width: 0;
  margin: 0;
  color: var(--nc-color-text-primary);
  font-family: var(--nc-font-display);
  font-size: 1rem;
  font-weight: var(--nc-weight-semibold);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

#logbookScreen .logbook-time-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

#logbookScreen .logbook-acars-capture-button {
  position: relative;
  display: inline-flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--nc-color-accent-blue) 58%, var(--nc-color-border));
  border-radius: var(--nc-radius-sm);
  padding: 0;
  background: color-mix(in srgb, var(--nc-color-accent-blue) 10%, var(--nc-color-surface-elevated));
  color: var(--nc-color-accent-blue);
  overflow: visible;
}

#logbookScreen .logbook-acars-capture-button .button-icon,
#logbookScreen .logbook-acars-capture-button .button-icon svg {
  width: 20px;
  height: 20px;
}

#logbookScreen .logbook-acars-capture-button:active {
  background: color-mix(in srgb, var(--nc-color-accent-blue) 18%, var(--nc-color-surface-elevated));
}

#logbookScreen .logbook-time-basis {
  display: grid;
  grid-template-columns: repeat(2, minmax(46px, 1fr));
  min-width: 104px;
  border: 1px solid var(--nc-color-border);
  border-radius: var(--nc-radius-sm);
  padding: 2px;
  background: var(--nc-color-deep-navy);
}

#logbookScreen .logbook-time-basis button {
  min-width: 0;
  min-height: 44px;
  margin: 0;
  border: 0;
  border-radius: var(--nc-radius-xs);
  padding: 6px 8px;
  background: transparent;
  color: var(--nc-color-text-secondary);
  font: inherit;
  font-size: 0.75rem;
  font-weight: var(--nc-weight-medium);
}

#logbookScreen .logbook-time-basis button.active {
  background: color-mix(in srgb, var(--nc-color-accent-blue) 22%, var(--nc-color-surface-elevated));
  color: var(--nc-color-text-primary);
}

#logbookScreen .logbook-required-marker {
  margin-inline-start: 2px;
  color: var(--nc-color-accent-gold);
  font-weight: var(--nc-weight-semibold);
}

#logbookScreen #logbookFlightForm :is(input, select)[aria-invalid="true"] {
  border-color: var(--nc-danger);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--nc-danger) 42%, transparent);
}

#logbookScreen #logbookFlightForm .logbook-form-grid {
  display: grid;
  gap: var(--nc-logbook-field-gap);
  min-width: 0;
  max-width: 100%;
}

#logbookScreen #logbookFlightForm .logbook-form-grid.two-column,
#logbookScreen #logbookFlightForm .logbook-core-primary-grid,
#logbookScreen #logbookFlightForm .logbook-core-route-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#logbookScreen #logbookFlightForm .logbook-core-route-grid {
  align-items: start;
}

#logbookScreen #logbookFlightForm .logbook-form-grid.three-column,
#logbookScreen #logbookFlightForm .logbook-aircraft-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#logbookScreen #logbookFlightForm .logbook-aircraft-grid > label:last-child {
  grid-column: auto;
}

#logbookScreen #logbookFlightForm .logbook-form-grid.four-column,
#logbookScreen #logbookFlightForm .logbook-core-time-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#logbookScreen #logbookFlightForm label,
#logbookScreen #logbookFlightForm input,
#logbookScreen #logbookFlightForm select,
#logbookScreen #logbookFlightForm textarea,
#logbookScreen #logbookFlightForm output {
  min-width: 0;
  max-width: 100%;
  font-family: var(--nc-font-text);
}

#logbookScreen #logbookFlightForm .logbook-inline-field {
  position: relative;
  display: block;
  min-width: 0;
  max-width: 100%;
}

#logbookScreen #logbookFlightForm .logbook-inline-field > .field-label,
#logbookScreen #logbookFlightForm .logbook-native-placeholder-field > .field-label,
#logbookScreen #logbookFlightForm .logbook-native-placeholder-field.has-value > .field-label,
#logbookScreen #logbookFlightForm .logbook-native-placeholder-field:focus-within > .field-label {
  position: absolute;
  top: 8px;
  right: 12px;
  left: 12px;
  z-index: 2;
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100% - 24px);
  margin: 0;
  padding: 0;
  color: var(--nc-color-text-secondary);
  font-size: 0.68rem;
  font-weight: var(--nc-weight-medium);
  line-height: 1.05;
  opacity: 1;
  visibility: visible;
  clip: auto;
  clip-path: none;
  pointer-events: none;
  transform: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#logbookScreen #logbookFlightForm .logbook-inline-field > :is(input, select),
#logbookScreen #logbookFlightForm .logbook-native-placeholder-field:not(.has-value):not(:focus-within) > :is(input[type="date"], input[type="time"]) {
  display: block;
  width: 100%;
  height: 58px;
  min-height: 58px;
  margin: 0;
  border: 1px solid var(--nc-color-border);
  border-radius: var(--nc-radius-sm);
  padding: 22px 12px 7px;
  background: color-mix(in srgb, var(--nc-color-surface-elevated) 92%, var(--nc-color-deep-navy));
  color: var(--nc-color-text-primary);
  font-size: 0.9rem;
  font-weight: var(--nc-weight-medium);
  line-height: 1.2;
  opacity: 1;
  -webkit-text-fill-color: currentColor;
  -webkit-appearance: none;
  appearance: none;
}

#logbookScreen #logbookFlightForm .logbook-inline-field > select {
  padding-right: 30px;
  -webkit-appearance: auto;
  appearance: auto;
}

#logbookScreen #logbookFlightForm .logbook-inline-field > :is(input, select):focus-visible,
#logbookScreen #logbookFlightForm :is(input, select, textarea):focus-visible {
  border-color: var(--nc-color-accent-blue);
  outline: 2px solid color-mix(in srgb, var(--nc-color-accent-blue) 24%, transparent);
  outline-offset: 1px;
}

#logbookScreen #logbookFlightForm .logbook-inline-field > :is(input, select)::placeholder {
  color: color-mix(in srgb, var(--nc-color-text-secondary) 76%, transparent);
  opacity: 1;
}

#logbookScreen #logbookFlightForm input:is([type="date"], [type="time"])::-webkit-date-and-time-value {
  display: flex;
  align-items: flex-end;
  min-width: 0;
  height: 100%;
  padding: 0;
  color: var(--nc-color-text-primary);
  font: inherit;
  text-align: left;
}

#logbookScreen #logbookFlightForm .logbook-route-field small {
  display: block;
  min-height: 0;
  margin: 3px 2px 0;
  color: var(--nc-color-text-secondary);
  font-size: 0.62rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

#logbookScreen #logbookFlightForm .logbook-route-field small:empty {
  display: none;
}

#logbookScreen .logbook-core-calculations {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--nc-logbook-field-gap);
  min-width: 0;
  padding-top: 2px;
}

#logbookScreen .logbook-core-calculations > div {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 48px;
  border: 1px solid color-mix(in srgb, var(--nc-color-accent-blue) 58%, var(--nc-color-border));
  border-radius: var(--nc-radius-sm);
  padding: 8px 11px;
  background: color-mix(in srgb, var(--nc-color-accent-blue) 7%, var(--nc-color-surface-elevated));
  color: var(--nc-color-text-secondary);
  font-size: 0.76rem;
}

#logbookScreen .logbook-core-calculations .button-icon,
#logbookScreen .logbook-core-calculations .button-icon svg {
  width: 18px;
  height: 18px;
  color: var(--nc-color-accent-gold);
}

#logbookScreen .logbook-core-calculations output {
  color: var(--nc-color-text-primary);
  font-size: 1rem;
  font-weight: var(--nc-weight-semibold);
  font-variant-numeric: tabular-nums;
}

#logbookScreen .logbook-captain-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

#logbookScreen .logbook-captain-suggestions:empty {
  display: none;
}

#logbookScreen #logbookFlightForm .logbook-toggle-fieldset {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--nc-logbook-field-gap);
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
  background: transparent;
}

#logbookScreen #logbookFlightForm .logbook-toggle-fieldset label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  border: 1px solid var(--nc-color-border);
  border-radius: var(--nc-radius-sm);
  padding: 8px 10px;
  background: color-mix(in srgb, var(--nc-color-surface-elevated) 92%, var(--nc-color-deep-navy));
  color: var(--nc-color-text-primary);
  font-size: 0.76rem;
  font-weight: var(--nc-weight-medium);
  line-height: 1.15;
}

#logbookScreen #logbookFlightForm .logbook-toggle-fieldset label:has(input:checked) {
  border-color: var(--nc-color-accent-blue);
  background: color-mix(in srgb, var(--nc-color-accent-blue) 10%, var(--nc-color-surface-elevated));
}

#logbookScreen #logbookFlightForm .logbook-toggle-fieldset input {
  flex: 0 0 20px;
  width: 20px;
  min-width: 20px;
  max-width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  accent-color: var(--nc-color-accent-blue);
}

#logbookScreen #logbookFlightForm .logbook-toggle-fieldset .button-icon,
#logbookScreen #logbookFlightForm .logbook-toggle-fieldset .button-icon svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: var(--nc-color-accent-gold);
}

#logbookScreen #logbookFlightForm .logbook-operation-duty-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--nc-logbook-field-gap);
  min-width: 0;
}

#logbookScreen #logbookFlightForm[data-entry-density="quick"] .logbook-full-entry-only {
  display: none !important;
}

#logbookScreen #logbookFlightForm[data-entry-density="full"] .logbook-full-entry-only {
  display: grid !important;
}

#logbookScreen .logbook-total-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--nc-logbook-field-gap);
  min-width: 0;
}

#logbookScreen #logbookFlightForm .logbook-total-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 54px;
  margin: 0;
  border: 1px solid var(--nc-color-border);
  border-radius: var(--nc-radius-sm);
  padding: 8px 11px;
  background: color-mix(in srgb, var(--nc-color-surface-elevated) 92%, var(--nc-color-deep-navy));
  color: var(--nc-color-text-secondary);
  font-size: 0.72rem;
  line-height: 1.15;
}

#logbookScreen #logbookFlightForm .logbook-total-row > output,
#logbookScreen #logbookFlightForm .logbook-total-row > input {
  color: var(--nc-color-accent-blue);
  font-size: 1rem;
  font-weight: var(--nc-weight-semibold);
  font-variant-numeric: tabular-nums;
}

#logbookScreen #logbookFlightForm .logbook-total-landing > input {
  width: 52px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  margin: -3px -4px -3px 0;
  border: 0;
  padding: 0 4px;
  background: transparent;
  text-align: right;
}

#logbookScreen .logbook-night-status {
  margin: 0;
  color: var(--nc-color-text-secondary);
  font-size: 0.66rem;
  line-height: 1.35;
}

#logbookScreen #logbookFlightForm .logbook-form-disclosure {
  padding: 0;
  overflow: clip;
}

#logbookScreen #logbookFlightForm .logbook-form-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 8px 12px;
  color: var(--nc-color-text-primary);
  cursor: pointer;
  list-style: none;
}

#logbookScreen #logbookFlightForm .logbook-form-disclosure > summary::-webkit-details-marker {
  display: none;
}

#logbookScreen #logbookFlightForm .logbook-form-disclosure > summary > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

#logbookScreen #logbookFlightForm .logbook-form-disclosure > summary .button-icon,
#logbookScreen #logbookFlightForm .logbook-form-disclosure > summary .button-icon svg {
  width: 20px;
  height: 20px;
  color: var(--nc-color-text-primary);
}

#logbookScreen #logbookFlightForm .logbook-form-disclosure > summary strong {
  font-size: 0.9rem;
  font-weight: var(--nc-weight-semibold);
}

#logbookScreen #logbookFlightForm .logbook-form-disclosure > summary .disclosure-chevron {
  flex: 0 0 auto;
  font-size: 1.4rem;
  transform: rotate(90deg);
  transition: transform var(--nc-motion-fast) var(--nc-motion-ease);
}

#logbookScreen #logbookFlightForm .logbook-form-disclosure[open] > summary {
  border-bottom: 1px solid var(--nc-color-border);
}

#logbookScreen #logbookFlightForm .logbook-form-disclosure[open] > summary .disclosure-chevron {
  transform: rotate(270deg);
}

#logbookScreen #logbookFlightForm .logbook-form-disclosure > :not(summary) {
  margin: 0;
}

#logbookScreen #logbookFlightForm .logbook-form-disclosure > .logbook-form-grid,
#logbookScreen #logbookFlightForm .logbook-form-disclosure > .logbook-track-tools {
  padding: 12px;
}

#logbookScreen #logbookFlightForm .logbook-form-disclosure > .logbook-form-grid + .logbook-track-tools {
  padding-top: 0;
}

#logbookScreen #logbookFlightForm .logbook-form-disclosure .logbook-form-grid > label,
#logbookScreen #logbookFlightForm .logbook-form-disclosure .logbook-track-tools > label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--nc-color-text-secondary);
  font-size: 0.7rem;
}

#logbookScreen #logbookFlightForm .logbook-form-disclosure :is(input, select, textarea) {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  margin: 0;
  border: 1px solid var(--nc-color-border);
  border-radius: var(--nc-radius-sm);
  padding: 8px 10px;
  background: var(--nc-color-surface-elevated);
  color: var(--nc-color-text-primary);
  font-size: 0.86rem;
  line-height: 1.25;
}

#logbookScreen #logbookFlightForm .logbook-form-disclosure textarea {
  height: auto;
  resize: vertical;
}

#logbookScreen .logbook-save-draft {
  min-height: 44px;
  margin: 0 12px 12px;
}

#logbookScreen .logbook-form-status:empty {
  display: none;
}

#logbookScreen .logbook-form-status:not(:empty) {
  min-height: 44px;
  margin: 0;
  border: 1px solid var(--nc-color-border);
  border-radius: var(--nc-radius-sm);
  padding: 10px 12px;
  background: var(--nc-color-surface);
}

#logbookScreen #logbookFlightForm > .logbook-sticky-actions {
  position: sticky;
  bottom: var(--nc-logbook-nav-clearance);
  z-index: 70;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 8px;
  width: 100%;
  min-width: 0;
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--nc-color-border) 78%, transparent);
  border-radius: var(--nc-radius-md);
  padding: 8px;
  background: color-mix(in srgb, var(--nc-color-deep-navy) 94%, transparent);
  box-shadow: 0 -10px 28px color-mix(in srgb, var(--nc-color-deep-navy) 56%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#logbookScreen #logbookFlightForm > .logbook-sticky-actions .logbook-save-draft {
  margin: 0;
}

#logbookScreen #logbookFlightForm > .logbook-sticky-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 50px;
  margin: 0;
  border-radius: var(--nc-radius-sm);
  padding: 8px 10px;
  font-size: 0.82rem;
  font-weight: var(--nc-weight-semibold);
  line-height: 1.15;
  white-space: normal;
}

#logbookScreen #saveLogbookFlight {
  border-color: var(--nc-color-accent-gold);
  background: color-mix(in srgb, var(--nc-color-accent-gold) 5%, var(--nc-color-deep-navy));
  color: var(--nc-color-accent-gold-text);
}

#logbookScreen #saveAndAddLogbookSector {
  border-color: var(--nc-color-accent-gold);
  background: var(--nc-color-accent-gold);
  color: var(--nc-color-deep-navy);
  box-shadow: 0 7px 18px color-mix(in srgb, var(--nc-color-accent-gold) 18%, transparent);
}

#logbookScreen .logbook-cancel-edit {
  justify-self: end;
  min-height: 44px;
}

@media (max-width: 520px) {
  #logbookScreen {
    --nc-logbook-section-gap: 10px;
    --nc-logbook-field-gap: 7px;
  }

  #logbookScreen .logbook-module-heading {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    min-height: 52px;
    margin-bottom: 10px;
    padding-bottom: 8px;
  }

  #logbookScreen .logbook-entry-density-switch button {
    gap: 6px;
    font-size: 0.76rem;
  }

  #logbookScreen .logbook-entry-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) 48px;
  }

  #logbookScreen .logbook-entry-action {
    flex-direction: column;
    gap: 3px;
    min-height: 56px;
    padding: 5px 3px;
  }

  #logbookScreen .logbook-entry-action strong {
    font-size: 0.62rem;
  }

  #logbookScreen #logbookFlightForm .logbook-form-section {
    padding: 10px;
  }

  #logbookScreen .logbook-form-section-heading {
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 7px;
  }

  #logbookScreen .logbook-form-section-heading h4 {
    font-size: 0.92rem;
  }

  #logbookScreen .logbook-time-basis {
    min-width: 98px;
  }

  #logbookScreen .logbook-time-basis button {
    min-height: 44px;
    padding-inline: 6px;
    font-size: 0.7rem;
  }

  #logbookScreen #logbookFlightForm .logbook-inline-field > .field-label,
  #logbookScreen #logbookFlightForm .logbook-native-placeholder-field > .field-label,
  #logbookScreen #logbookFlightForm .logbook-native-placeholder-field.has-value > .field-label,
  #logbookScreen #logbookFlightForm .logbook-native-placeholder-field:focus-within > .field-label {
    top: 7px;
    right: 9px;
    left: 9px;
    max-width: calc(100% - 18px);
    font-size: 0.62rem;
  }

  #logbookScreen #logbookFlightForm .logbook-inline-field > :is(input, select),
  #logbookScreen #logbookFlightForm .logbook-native-placeholder-field:not(.has-value):not(:focus-within) > :is(input[type="date"], input[type="time"]) {
    height: 56px;
    min-height: 56px;
    padding: 21px 9px 6px;
    font-size: 0.82rem;
  }

  #logbookScreen .logbook-core-calculations > div {
    grid-template-columns: 19px minmax(0, 1fr) auto;
    gap: 5px;
    padding-inline: 8px;
    font-size: 0.68rem;
  }

  #logbookScreen .logbook-core-calculations output {
    font-size: 0.9rem;
  }

  #logbookScreen #logbookFlightForm .logbook-toggle-fieldset label {
    justify-content: center;
    gap: 5px;
    padding: 7px 5px;
    font-size: 0.67rem;
    text-align: center;
  }

  #logbookScreen #logbookFlightForm .logbook-toggle-fieldset input {
    flex-basis: 18px;
    width: 18px;
    min-width: 18px;
    max-width: 18px;
    height: 18px;
  }

  #logbookScreen #logbookFlightForm .logbook-total-row {
    min-height: 52px;
    padding-inline: 8px;
    font-size: 0.64rem;
  }

  #logbookScreen #logbookFlightForm .logbook-total-row > output,
  #logbookScreen #logbookFlightForm .logbook-total-row > input {
    font-size: 0.9rem;
  }

  #logbookScreen #logbookFlightForm > .logbook-sticky-actions button {
    font-size: 0.74rem;
  }
}

@media (max-width: 359px) {
  #logbookScreen .logbook-module-heading > h2 {
    font-size: 0.95rem;
  }

  #logbookScreen #logbookFlightForm .logbook-core-time-grid,
  #logbookScreen #logbookFlightForm .logbook-aircraft-grid,
  #logbookScreen #logbookFlightForm .logbook-form-grid.three-column,
  #logbookScreen .logbook-total-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #logbookScreen .logbook-total-list > :last-child {
    grid-column: 1 / -1;
  }

  #logbookScreen #logbookFlightForm > .logbook-sticky-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #logbookScreen #logbookFlightForm > .logbook-sticky-actions .logbook-save-draft {
    grid-column: 1 / -1;
  }
}

@media (min-width: 760px) {
  #logbookScreen .logbook-module-heading,
  #logbookScreen #logbookEntryDock,
  #logbookScreen #logbookFlightForm {
    width: min(100%, var(--nc-logbook-content-width));
  }

  #logbookScreen #logbookFlightForm .logbook-form-section {
    padding: 14px;
  }
}

.large-text #logbookScreen #logbookFlightForm .logbook-core-time-grid,
.large-text #logbookScreen #logbookFlightForm .logbook-aircraft-grid,
.large-text #logbookScreen #logbookFlightForm .logbook-form-grid.three-column,
.large-text #logbookScreen .logbook-total-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.large-text #logbookScreen #logbookFlightForm .logbook-toggle-fieldset {
  grid-template-columns: minmax(0, 1fr);
}

.large-text #logbookScreen #logbookFlightForm .logbook-toggle-fieldset label {
  justify-content: flex-start;
  font-size: 1rem;
  text-align: left;
}

.large-text #logbookScreen .logbook-entry-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.large-text #logbookScreen .logbook-settings-action strong {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
}

.large-text #logbookScreen .logbook-total-list > :last-child {
  grid-column: 1 / -1;
}

@media (prefers-reduced-motion: reduce) {
  #logbookScreen #logbookFlightForm .logbook-form-disclosure > summary .disclosure-chevron {
    transition: none;
  }
}

/* Preflight Briefing */

#briefingScreen {
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
}

body.briefing-active #primaryNavigation.tabs {
  display: none;
}

.preflight-briefing-heading {
  align-items: start;
}

.preflight-briefing-shell {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
  width: min(100%, 960px);
  margin: 10px auto 0;
}

.preflight-briefing-form {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.preflight-briefing-section,
.preflight-briefing-report {
  min-width: 0;
  border: 1px solid var(--nc-color-border);
  border-radius: var(--nc-radius-md);
  background: var(--nc-color-surface);
  box-shadow: var(--nc-elevation-1);
}

.preflight-briefing-section {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
}

.preflight-section-heading,
.preflight-report-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--nc-space-3);
  min-width: 0;
}

.preflight-section-heading {
  justify-content: flex-start;
}

.preflight-section-heading > div,
.preflight-report-heading > div {
  min-width: 0;
}

.preflight-section-heading :is(p, h3),
.preflight-report-heading :is(p, h3),
.preflight-report-group h4,
.preflight-safety-note,
.preflight-form-status,
.preflight-report-disclaimer {
  margin: 0;
}

.preflight-section-heading h3,
.preflight-report-heading h3 {
  color: var(--nc-color-text-primary);
  font-family: var(--nc-font-display);
  font-size: var(--nc-type-subtitle);
  line-height: var(--nc-line-compact);
}

.preflight-section-icon {
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--nc-color-accent-blue) 34%, var(--nc-color-border));
  border-radius: var(--nc-radius-sm);
  background: color-mix(in srgb, var(--nc-color-accent-blue) 10%, var(--nc-color-surface-elevated));
  color: var(--nc-color-accent-blue);
}

.preflight-section-icon svg {
  width: 18px;
  height: 18px;
}

.preflight-form-grid {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.preflight-flight-grid,
.preflight-load-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.preflight-special-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.preflight-weather-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.preflight-field {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
}

.preflight-field > .field-label {
  display: flex;
  align-items: flex-end;
  min-width: 0;
  min-height: 1.25em;
  color: var(--nc-color-text-secondary);
  font-size: var(--nc-type-caption);
  font-weight: var(--nc-weight-semibold);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.preflight-load-grid > .preflight-field > .field-label {
  min-height: 2.3em;
}

.preflight-field :is(input, textarea) {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 9px 10px;
  font: inherit;
  font-size: var(--nc-type-body);
  font-weight: var(--nc-weight-medium);
  line-height: 1.35;
}

.preflight-field input {
  height: 44px;
  min-height: 44px;
}

.preflight-field textarea {
  min-height: 72px;
  resize: vertical;
}

.preflight-field :is(input, textarea)::placeholder {
  font: inherit;
  color: var(--nc-color-text-secondary);
  opacity: 0.78;
}

.required-mark {
  color: var(--nc-color-accent-gold-text);
}

.preflight-inline-help {
  margin: 0;
  color: var(--nc-color-text-secondary);
  font-size: var(--nc-type-caption);
  line-height: 1.3;
}

.preflight-special-grid > .preflight-field > .field-label {
  justify-content: center;
  min-height: 1.25em;
  color: var(--nc-color-text-primary);
  text-align: center;
}

.preflight-special-grid input {
  padding-inline: 6px;
  text-align: center;
}

.preflight-special-more {
  min-width: 0;
  border: 1px solid var(--nc-color-border);
  border-radius: var(--nc-radius-sm);
  background: var(--nc-color-surface-elevated);
}

.preflight-special-more > summary {
  min-height: 44px;
  padding: 11px 12px;
  color: var(--nc-color-text-primary);
  font-size: var(--nc-type-label);
  font-weight: var(--nc-weight-semibold);
  cursor: pointer;
}

.preflight-special-groups {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
}

.preflight-special-group {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--nc-color-border);
  border-radius: var(--nc-radius-sm);
}

.preflight-special-group legend {
  padding: 0 4px;
  color: var(--nc-color-accent-gold-text);
  font-size: var(--nc-type-caption);
  font-weight: var(--nc-weight-semibold);
}

.preflight-special-note {
  width: 100%;
}

.preflight-safety-note {
  display: flex;
  align-items: flex-start;
  gap: var(--nc-space-2);
  padding: 0 var(--nc-space-1);
  color: var(--nc-color-text-secondary);
  font-size: var(--nc-type-caption);
  line-height: var(--nc-line-body);
}

.preflight-safety-note .button-icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  color: var(--nc-color-accent-gold-text);
}

.preflight-form-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(0, 1fr);
  gap: 10px;
  justify-self: end;
  width: min(100%, 420px);
}

.preflight-form-actions button {
  min-height: 48px;
}

.preflight-form-status {
  min-height: 1.25em;
  color: var(--nc-color-text-secondary);
  font-size: var(--nc-type-caption);
  text-align: right;
}

.preflight-briefing-report {
  display: grid;
  gap: 10px;
  padding: 10px 12px;
  scroll-margin-top: var(--nc-space-4);
}

.preflight-briefing-report.hidden {
  display: none;
}

.preflight-report-content {
  display: grid;
  border-top: 1px solid var(--nc-color-border);
}

.preflight-report-group {
  display: grid;
  grid-template-columns: minmax(120px, 0.34fr) minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--nc-color-border);
}

.preflight-report-group h4 {
  color: var(--nc-color-accent-gold-text);
  font-size: var(--nc-type-label);
  font-weight: var(--nc-weight-semibold);
}

.preflight-report-group > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.preflight-report-row {
  display: grid;
  grid-template-columns: minmax(128px, 0.42fr) minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}

.preflight-report-row span {
  color: var(--nc-color-text-secondary);
  font-size: var(--nc-type-label);
}

.preflight-report-row strong {
  min-width: 0;
  color: var(--nc-color-text-primary);
  font-size: var(--nc-type-body);
  font-weight: var(--nc-weight-semibold);
  line-height: var(--nc-line-body);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.preflight-report-disclaimer {
  color: var(--nc-color-text-secondary);
  font-size: var(--nc-type-caption);
  line-height: var(--nc-line-body);
}

@media (max-width: 700px) {
  .preflight-flight-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .preflight-load-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .preflight-special-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .preflight-weather-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .preflight-briefing-section,
  .preflight-briefing-report {
    padding: 9px;
  }

  .preflight-flight-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .preflight-load-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .preflight-special-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .preflight-weather-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preflight-flight-grid > .preflight-field > .field-label {
    min-height: 2.4em;
    font-size: 11px;
  }

  .preflight-load-grid > .preflight-field > .field-label {
    min-height: 3.45em;
    font-size: 11px;
  }

  .preflight-special-grid > .preflight-field > .field-label {
    font-size: 11px;
  }

  .preflight-report-group {
    grid-template-columns: minmax(76px, 0.28fr) minmax(0, 1fr);
  }

  .preflight-report-row {
    grid-template-columns: minmax(92px, 0.38fr) minmax(0, 1fr);
  }

  .preflight-form-actions {
    grid-template-columns: minmax(0, 0.62fr) minmax(0, 1fr);
    justify-self: stretch;
    width: 100%;
  }

  .preflight-form-status {
    text-align: left;
  }
}

@media (max-width: 360px) {
  .preflight-special-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 350px) {
  .preflight-flight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preflight-stand-field {
    grid-column: 1 / -1;
  }
}

.large-text .preflight-flight-grid,
.large-text .preflight-load-grid,
.large-text .preflight-special-grid,
.large-text .preflight-weather-grid,
.large-text .preflight-report-group,
.large-text .preflight-report-row {
  grid-template-columns: minmax(0, 1fr);
}

.large-text .preflight-stand-field,
.large-text .preflight-load-grid > :last-child {
  grid-column: auto;
}

/* Compact module headers and direct-workflow refinements */
.compact-feature-heading,
#logbookScreen .logbook-module-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  justify-content: start;
  gap: 10px;
}

.compact-feature-heading > h2,
#logbookScreen .logbook-module-heading > h2 {
  justify-self: start;
  margin: 0;
  text-align: left;
}

.preflight-briefing-heading,
.leaderboard-heading {
  align-items: center;
}

.module-menu-heading.is-compact-logbook {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-content: start;
  gap: 10px;
}

.module-menu-heading.is-compact-logbook > div {
  display: block;
  min-width: 0;
}

.module-menu-heading.is-compact-logbook :is(.eyebrow, .module-menu-description),
.module-menu-heading.is-compact-logbook > .status-chip {
  display: none;
}

.module-menu-heading.is-compact-logbook h2 {
  margin: 0;
  text-align: left;
}

#logbookScreen .logbook-captain-suggestions.hidden {
  display: none;
}

#logbookScreen .logbook-capture-help {
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--nc-color-accent-blue) 34%, var(--nc-color-border));
  border-radius: 7px;
  background: color-mix(in srgb, var(--nc-color-accent-blue) 5%, var(--nc-color-surface-elevated));
  color: var(--nc-color-text-secondary);
}

#logbookScreen .logbook-capture-help > summary {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 44px;
  padding: 7px 10px;
  color: var(--nc-color-text-secondary);
  font-size: var(--nc-logbook-button-font, 0.76rem);
  font-weight: var(--nc-weight-semibold);
  line-height: 1.2;
  cursor: pointer;
  list-style: none;
}

#logbookScreen .logbook-capture-help > summary::-webkit-details-marker {
  display: none;
}

#logbookScreen .logbook-capture-help > summary::after {
  content: "+";
  margin-left: auto;
  color: var(--nc-color-accent-blue);
  font-size: 1rem;
  line-height: 1;
}

#logbookScreen .logbook-capture-help[open] > summary::after {
  content: "−";
}

#logbookScreen .logbook-capture-help > summary .button-icon,
#logbookScreen .logbook-capture-help > summary .button-icon svg {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  color: var(--nc-color-accent-blue);
}

#logbookScreen .logbook-capture-help > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 0 10px 10px;
}

#logbookScreen .logbook-capture-help p {
  min-width: 0;
  margin: 0;
  color: var(--nc-color-text-secondary);
  font-size: 0.7rem;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

#logbookScreen .logbook-capture-help strong {
  color: var(--nc-color-text-primary);
}

#logbookScreen .logbook-acars-capture-button.is-capturing {
  border-color: var(--nc-color-accent-gold);
  color: var(--nc-color-accent-gold-text);
  background: color-mix(in srgb, var(--nc-color-accent-gold) 12%, var(--nc-color-surface-elevated));
}

#logbookScreen .logbook-voice-entry-button.is-listening {
  border-color: var(--nc-color-accent-gold);
  color: var(--nc-color-accent-gold-text);
  background: color-mix(in srgb, var(--nc-color-accent-gold) 14%, var(--nc-color-surface-elevated));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--nc-color-accent-gold) 16%, transparent);
}

#logbookScreen .logbook-voice-entry-button .button-icon {
  position: relative;
  z-index: 1;
  transform: scale(1);
  transition: transform 220ms ease, color 220ms ease;
}

#logbookScreen .logbook-voice-entry-button.is-listening .button-icon {
  transform: scale(1.3);
}

#logbookScreen .logbook-voice-entry-button.is-listening::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 2px solid color-mix(in srgb, var(--nc-color-accent-gold) 76%, transparent);
  border-radius: calc(var(--nc-radius-sm) - 3px);
  pointer-events: none;
  animation: nc-logbook-listening-ring 1.35s ease-out infinite;
}

@keyframes nc-logbook-listening-ring {
  0% {
    opacity: 0.72;
    transform: scale(0.76);
  }
  72%,
  100% {
    opacity: 0;
    transform: scale(1.42);
  }
}

:is(.reduce-motion, .native-reduce-motion) #logbookScreen .logbook-voice-entry-button .button-icon {
  transition: none;
}

:is(.reduce-motion, .native-reduce-motion) #logbookScreen .logbook-voice-entry-button.is-listening::after {
  opacity: 0.58;
  transform: scale(1);
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  #logbookScreen .logbook-voice-entry-button .button-icon {
    transition: none;
  }

  #logbookScreen .logbook-voice-entry-button.is-listening::after {
    opacity: 0.58;
    transform: scale(1);
    animation: none;
  }
}

.logbook-flight-card {
  position: relative;
  touch-action: pan-y;
}

.logbook-flight-swipe-actions {
  position: absolute;
  inset: 0 0 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 88px);
  width: 176px;
  background: var(--nc-color-deep-navy);
}

.logbook-flight-swipe-actions button {
  min-width: 0;
  border: 0;
  border-left: 1px solid var(--nc-color-border);
  border-radius: 0;
  padding: 8px;
  background: color-mix(in srgb, var(--nc-color-accent-blue) 13%, var(--nc-color-surface-elevated));
  color: var(--nc-color-text-primary);
  font: inherit;
  font-size: 0.72rem;
  font-weight: var(--nc-weight-semibold);
  line-height: 1.2;
}

.logbook-flight-swipe-actions button:last-child {
  background: color-mix(in srgb, var(--nc-color-accent-gold) 12%, var(--nc-color-surface-elevated));
}

.logbook-flight-card-swipe-content {
  position: relative;
  z-index: 1;
  min-width: 0;
  background: var(--nc-color-surface-elevated);
  transform: translate3d(0, 0, 0);
  transition: transform 260ms cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.logbook-flight-card.is-swipe-open .logbook-flight-card-swipe-content {
  transform: translate3d(-176px, 0, 0);
}

.flight-card-follow-on-menu {
  border-top: 1px solid var(--nc-color-border);
}

.flight-card-follow-on-menu > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 8px 14px;
  color: var(--nc-color-text-secondary);
  font-size: 0.78rem;
  font-weight: var(--nc-weight-semibold);
  cursor: pointer;
}

.flight-card-follow-on-menu > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 12px 12px;
}

.flight-card-follow-on-menu button {
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--nc-color-border);
  border-radius: var(--nc-radius-control);
  background: var(--nc-color-surface);
  color: var(--nc-color-text-primary);
  font: inherit;
  font-size: 0.78rem;
  font-weight: var(--nc-weight-semibold);
}

.flight-card-follow-on-menu button:focus-visible {
  outline: 2px solid var(--nc-color-accent-blue);
  outline-offset: 2px;
}

.flight-card-times {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.flight-card-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

.license-document-card {
  width: 100%;
  padding: 0;
  color: var(--nc-color-text-primary);
  font: inherit;
  text-align: left;
  appearance: none;
}

.license-document-add-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 88px;
  padding: 14px;
  border-style: dashed;
  background: color-mix(in srgb, var(--nc-color-accent-blue) 5%, var(--nc-color-surface));
}

.license-document-add-card > span:last-child {
  display: grid;
  gap: 3px;
}

.license-document-add-card small {
  color: var(--nc-color-text-secondary);
}

.preflight-briefing-shell {
  margin-top: 0;
}

.preflight-flight-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.preflight-ground-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--nc-color-border);
  border-radius: var(--nc-radius-sm);
  padding: 7px 9px;
  background: var(--nc-color-surface-elevated);
  color: var(--nc-color-text-primary);
  font-size: var(--nc-type-caption);
  font-weight: var(--nc-weight-medium);
  line-height: 1.25;
}

.preflight-ground-option input {
  align-self: center;
  width: 20px;
  height: 20px;
  margin: 0;
}

.preflight-ground-option span {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 20px;
  overflow-wrap: anywhere;
}

.preflight-mel-field {
  grid-column: span 2;
}

.preflight-generate-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

@media (max-width: 560px) {
  .compact-feature-heading,
  #logbookScreen .logbook-module-heading {
    grid-template-columns: auto minmax(0, 1fr);
  }

  #logbookScreen .logbook-header-actions {
    display: none;
  }

  .compact-feature-heading > h2,
  #logbookScreen .logbook-module-heading > h2 {
    font-size: 1.05rem;
    white-space: normal;
  }

  .preflight-briefing-section,
  .preflight-briefing-report {
    padding: 8px;
  }

  .preflight-briefing-form,
  .preflight-briefing-shell {
    gap: 6px;
  }

  .preflight-flight-grid,
  .preflight-load-grid {
    gap: 6px;
  }

  .preflight-field > .field-label,
  .preflight-flight-grid > .preflight-field > .field-label,
  .preflight-load-grid > .preflight-field > .field-label {
    min-height: 2.25em;
    font-size: 10px;
  }

  .preflight-field :is(input, textarea) {
    padding: 7px 8px;
    font-size: 0.78rem;
  }

  .preflight-field input {
    min-height: 40px;
    height: 40px;
  }

  .preflight-ground-option {
    min-height: 40px;
    height: auto;
  }

  .preflight-section-heading {
    gap: 7px;
  }

  .preflight-section-icon {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .logbook-flight-card-swipe-content {
    transition: none;
  }
}

/* Logbook flight entry uses one reference hierarchy with viewport-derived density. */
body.logbook-flight-entry-active {
  min-height: 100dvh;
  overflow-x: hidden;
}

body.logbook-flight-entry-active .app-shell {
  min-height: 100dvh;
  padding:
    max(var(--safe-top), var(--nc-logbook-vertical-inset, 4px))
    var(--nc-logbook-screen-inset, 10px)
    max(var(--safe-bottom), var(--nc-logbook-vertical-inset, 4px));
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] {
  --nc-logbook-screen-inset: 10px;
  --nc-logbook-vertical-inset: 4px;
  --nc-logbook-section-gap: 5px;
  --nc-logbook-field-gap: 5px;
  --nc-logbook-card-padding: 8px;
  --nc-logbook-navigation-height: 48px;
  --nc-logbook-section-header-height: 27px;
  --nc-logbook-header-control-height: 48px;
  --nc-logbook-field-height: 44px;
  --nc-logbook-compact-field-height: 44px;
  --nc-logbook-calculation-height: 40px;
  --nc-logbook-toggle-height: 44px;
  --nc-logbook-total-height: 44px;
  --nc-logbook-accordion-height: 44px;
  --nc-logbook-status-height: 28px;
  --nc-logbook-action-height: 48px;
  --nc-logbook-icon-size: 19px;
  --nc-logbook-field-label-font: 10.5px;
  --nc-logbook-field-value-font: 13.5px;
  --nc-logbook-section-title-font: 15.5px;
  --nc-logbook-button-font: 13px;
  display: grid;
  align-content: start;
  gap: 0;
  width: 100%;
  min-width: 0;
  margin: 0;
  overflow: visible;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-module-heading {
  display: grid;
  grid-template-columns: var(--nc-logbook-navigation-height) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: min(100%, var(--nc-logbook-content-width));
  height: var(--nc-logbook-navigation-height);
  min-height: var(--nc-logbook-navigation-height);
  margin: 0 auto var(--nc-logbook-section-gap);
  border-bottom: 1px solid var(--nc-color-border);
  padding: 0 0 3px;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-module-heading .back-to-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(var(--nc-logbook-navigation-height) - 4px);
  min-width: calc(var(--nc-logbook-navigation-height) - 4px);
  height: calc(var(--nc-logbook-navigation-height) - 4px);
  min-height: calc(var(--nc-logbook-navigation-height) - 4px);
  margin: 0;
  border: 1px solid var(--nc-color-border);
  border-radius: 7px;
  padding: 0;
  color: var(--nc-color-accent-gold-text);
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-module-heading .back-to-main > span:first-child {
  font-size: 1.75rem;
  font-weight: var(--nc-weight-semibold);
  line-height: 1;
  transform: translateY(-1px);
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .back-to-main-label {
  display: none;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-module-heading > h2 {
  justify-self: start;
  margin: 0;
  font-size: clamp(19px, calc(var(--nc-logbook-section-title-font) + 4px), 21px);
  line-height: 1;
  text-align: left;
  white-space: nowrap;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFeatureTitle:focus {
  outline: none;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-header-actions {
  display: none;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookAddView.active,
body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm {
  width: min(100%, var(--nc-logbook-content-width));
  min-width: 0;
  margin-inline: auto;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm {
  display: grid;
  gap: var(--nc-logbook-section-gap);
  padding: 0;
  padding-bottom: 0;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-entry-stack {
  gap: var(--nc-logbook-section-gap);
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm :is(.logbook-form-section, .logbook-form-disclosure) {
  border-color: color-mix(in srgb, var(--nc-color-accent-blue) 48%, var(--nc-color-border));
  border-radius: 8px;
  background: var(--nc-color-surface);
  box-shadow: none;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-form-section {
  gap: var(--nc-logbook-field-gap);
  padding: var(--nc-logbook-card-padding);
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-form-section-heading {
  grid-template-columns: var(--nc-logbook-icon-size) minmax(0, 1fr) auto;
  gap: 6px;
  min-height: var(--nc-logbook-section-header-height);
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-form-section-heading > .button-icon,
body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-form-section-heading > .button-icon svg {
  width: var(--nc-logbook-icon-size);
  height: var(--nc-logbook-icon-size);
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-form-section-heading h4 {
  font-size: var(--nc-logbook-section-title-font);
  line-height: 1.05;
  overflow-wrap: normal;
  white-space: nowrap;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-time-controls {
  gap: 4px;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-acars-capture-button {
  flex-basis: var(--nc-logbook-header-control-height);
  width: var(--nc-logbook-header-control-height);
  min-width: var(--nc-logbook-header-control-height);
  height: var(--nc-logbook-header-control-height);
  min-height: var(--nc-logbook-header-control-height);
  border-radius: 7px;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-acars-capture-button .button-icon,
body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-acars-capture-button .button-icon svg {
  width: var(--nc-logbook-icon-size);
  height: var(--nc-logbook-icon-size);
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-time-basis {
  grid-template-columns: repeat(2, minmax(34px, 1fr));
  min-width: calc(var(--nc-logbook-header-control-height) * 2.05);
  border-radius: 7px;
  padding: 2px;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-time-basis button {
  min-height: max(44px, calc(var(--nc-logbook-header-control-height) - 4px));
  padding: 3px 5px;
  font-size: var(--nc-logbook-button-font);
  line-height: 1;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-form-grid {
  gap: var(--nc-logbook-field-gap);
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm :is(.logbook-core-primary-grid, .logbook-core-route-grid, .logbook-form-grid.two-column) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm :is(.logbook-core-time-grid, .logbook-form-grid.four-column) {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm :is(.logbook-aircraft-grid, .logbook-form-grid.three-column),
body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-toggle-fieldset,
body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-total-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-aircraft-grid > label:last-child,
body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-total-list > :last-child {
  grid-column: auto;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-inline-field > .field-label,
body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-native-placeholder-field > .field-label,
body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-native-placeholder-field.has-value > .field-label,
body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-native-placeholder-field:focus-within > .field-label {
  top: 4px;
  right: 7px;
  left: 7px;
  max-width: calc(100% - 14px);
  font-size: var(--nc-logbook-field-label-font);
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-core-time-grid .field-label {
  display: flex;
  align-items: center;
  right: 2px;
  left: 2px;
  min-height: 1em;
  max-width: calc(100% - 4px);
  font-size: max(8.75px, calc(var(--nc-logbook-field-label-font) - 2.8px));
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-core-time-grid .logbook-required-marker {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-inline-field > :is(input, select),
body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-native-placeholder-field:not(.has-value):not(:focus-within) > :is(input[type="date"], input[type="time"]) {
  height: var(--nc-logbook-field-height);
  min-height: var(--nc-logbook-field-height);
  border-radius: 7px;
  padding: 14px 7px 2px;
  font-size: var(--nc-logbook-field-value-font);
  line-height: 1;
  white-space: nowrap;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-core-time-grid .logbook-inline-field > :is(input, select),
body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-core-time-grid .logbook-native-placeholder-field:not(.has-value):not(:focus-within) > :is(input[type="date"], input[type="time"]) {
  height: var(--nc-logbook-compact-field-height);
  min-height: var(--nc-logbook-compact-field-height);
  padding-inline: 5px;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm input:is([type="date"], [type="time"])::-webkit-date-and-time-value {
  align-items: flex-end;
  min-width: 0;
  margin: 0;
  font: inherit;
  line-height: 1;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-core-calculations {
  gap: var(--nc-logbook-field-gap);
  padding-top: 0;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-core-calculations > div {
  grid-template-columns: var(--nc-logbook-icon-size) minmax(0, 1fr) auto;
  gap: 5px;
  min-height: var(--nc-logbook-calculation-height);
  border-radius: 7px;
  padding: 4px 7px;
  font-size: var(--nc-logbook-field-value-font);
  line-height: 1;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-core-calculations .button-icon,
body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-core-calculations .button-icon svg {
  width: var(--nc-logbook-icon-size);
  height: var(--nc-logbook-icon-size);
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-core-calculations output {
  font-size: calc(var(--nc-logbook-field-value-font) + 2px);
  line-height: 1;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-toggle-fieldset {
  gap: var(--nc-logbook-field-gap);
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-toggle-fieldset label {
  justify-content: center;
  gap: 5px;
  min-height: var(--nc-logbook-toggle-height);
  border-radius: 7px;
  padding: 3px 5px;
  font-size: var(--nc-logbook-button-font);
  line-height: 1.05;
  text-align: center;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-toggle-fieldset input {
  flex-basis: 18px;
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-toggle-fieldset .button-icon,
body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-toggle-fieldset .button-icon svg {
  width: calc(var(--nc-logbook-icon-size) - 2px);
  height: calc(var(--nc-logbook-icon-size) - 2px);
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-operation-duty-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--nc-logbook-field-gap);
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-operation-duty-grid > label {
  position: relative;
  display: block;
  min-width: 0;
  height: var(--nc-logbook-field-height);
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-operation-duty-grid .field-label {
  position: absolute;
  top: 4px;
  right: 7px;
  left: 7px;
  z-index: 1;
  min-width: 0;
  color: var(--nc-color-text-secondary);
  font-size: var(--nc-logbook-field-label-font);
  line-height: 1;
  pointer-events: none;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-operation-duty-grid select {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  border: 1px solid var(--nc-color-border);
  border-radius: 7px;
  padding: 14px 24px 2px 7px;
  background: var(--nc-color-surface-elevated);
  color: var(--nc-color-text-primary);
  font-size: var(--nc-logbook-field-value-font);
  line-height: 1;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-total-list {
  gap: var(--nc-logbook-field-gap);
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-total-row {
  min-height: var(--nc-logbook-total-height);
  border-radius: 7px;
  padding: 4px 7px;
  font-size: var(--nc-logbook-field-label-font);
  line-height: 1;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-total-row > :is(output, input) {
  font-size: calc(var(--nc-logbook-field-value-font) + 1px);
  line-height: 1;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-total-landing > input {
  width: 44px;
  min-width: 44px;
  height: max(44px, calc(var(--nc-logbook-total-height) - 6px));
  min-height: 44px;
  margin: 0;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-night-status {
  margin: 0;
  font-size: var(--nc-logbook-field-label-font);
  line-height: 1.18;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-form-disclosure {
  overflow: clip;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-form-disclosure > summary {
  min-height: var(--nc-logbook-accordion-height);
  padding: 3px 9px;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-form-disclosure > summary > span:first-child {
  gap: 7px;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-form-disclosure > summary .button-icon,
body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-form-disclosure > summary .button-icon svg {
  width: var(--nc-logbook-icon-size);
  height: var(--nc-logbook-icon-size);
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-form-disclosure > summary strong {
  font-size: var(--nc-logbook-section-title-font);
  line-height: 1;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-form-disclosure > summary .disclosure-chevron {
  font-size: 1.15rem;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-form-status:not(:empty) {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  height: var(--nc-logbook-status-height);
  min-height: var(--nc-logbook-status-height);
  margin: 0;
  border-radius: 7px;
  padding: 3px 8px;
  font-size: var(--nc-logbook-field-label-font);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm > .logbook-sticky-actions {
  position: static;
  z-index: auto;
  display: grid;
  grid-template-columns: minmax(0, 0.29fr) minmax(0, 0.31fr) minmax(0, 0.4fr);
  gap: var(--nc-logbook-field-gap);
  width: 100%;
  margin: 0;
  border: 1px solid var(--nc-color-border);
  border-radius: 8px;
  padding: 4px;
  background: var(--nc-color-deep-navy);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm > .logbook-sticky-actions button {
  gap: 5px;
  min-height: var(--nc-logbook-action-height);
  border-radius: 7px;
  padding: 3px 5px;
  font-size: var(--nc-logbook-button-font);
  line-height: 1.05;
  white-space: normal;
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm > .logbook-sticky-actions .button-icon,
body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm > .logbook-sticky-actions .button-icon svg {
  width: var(--nc-logbook-icon-size);
  height: var(--nc-logbook-icon-size);
}

body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #saveLogbookDraft {
  border-color: var(--nc-color-accent-blue);
  background: transparent;
  color: var(--nc-color-text-primary);
}

html.large-text body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm :is(.logbook-aircraft-grid, .logbook-form-grid.three-column),
html.large-text body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-total-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html.large-text body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-core-time-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html.large-text body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-toggle-fieldset {
  grid-template-columns: minmax(0, 1fr);
}

html.large-text body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-toggle-fieldset label {
  justify-content: flex-start;
  font-size: var(--nc-logbook-button-font);
  text-align: left;
}

html.large-text body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-total-list > :last-child,
html.large-text body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm > .logbook-sticky-actions .logbook-save-draft {
  grid-column: 1 / -1;
}

html.large-text body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm > .logbook-sticky-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 359px) {
  body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-core-time-grid .field-label {
    right: 0;
    left: 0;
    max-width: 100%;
    font-size: 8.5px;
  }

  body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm :is(.logbook-aircraft-grid, .logbook-form-grid.three-column),
  body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-toggle-fieldset,
  body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-total-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm .logbook-core-time-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm > .logbook-sticky-actions {
    grid-template-columns: minmax(0, 0.29fr) minmax(0, 0.31fr) minmax(0, 0.4fr);
  }

  body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] #logbookFlightForm > .logbook-sticky-actions .logbook-save-draft,
  body.logbook-flight-entry-active #logbookScreen[data-logbook-active-view="add"] .logbook-total-list > :last-child {
    grid-column: auto;
  }
}
