/* Dark theme: an overlay, not a rewrite.
   The revamp sheets are built on repeated near-white surfaces and one navy ink, so re-pointing those
   dozen values covers the interface without touching 137 individual declarations. Loaded last. */

html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .nv-site,
html[data-theme="dark"] .section,
html[data-theme="dark"] main {
  background: #0a1422;
  color: #d3dfec;
}

html[data-theme="dark"] .nv-header,
html[data-theme="dark"] .nv-nav {
  background: #0d1929;
  border-color: #1d3149;
}

html[data-theme="dark"] .nv-nav a,
html[data-theme="dark"] .nv-nav a:visited {
  color: #cfdcea;
}

html[data-theme="dark"] .nv-menu-toggle span {
  background: #cfdcea;
}

/* cards and panels */
html[data-theme="dark"] .note-panel,
html[data-theme="dark"] .card,
html[data-theme="dark"] fieldset,
html[data-theme="dark"] .deadline-quote {
  background: #111f33;
  border-color: #22374f;
  color: #e7eef7;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] strong {
  color: #e0e9f3 !important;
}

html[data-theme="dark"] label,
html[data-theme="dark"] legend,
html[data-theme="dark"] .deadline-field label,
html[data-theme="dark"] dt,
html[data-theme="dark"] .eyebrow {
  color: #e8f0f9 !important;
}

html[data-theme="dark"] p,
html[data-theme="dark"] li,
html[data-theme="dark"] .deadline-help,
html[data-theme="dark"] .flight-table-note {
  color: #a9bccf;
}

html[data-theme="dark"] .deadline-summary {
  background: #14263c;
  border-color: #22374f;
  color: #dbe7f4;
}

html[data-theme="dark"] .deadline-warning {
  background: #3a1d1a;
  border-color: #7a3a30;
  color: #ffd9cf;
}

/* inputs. These carry !important because the revamp sheets set form controls with
   .nv-site .deadline-field scoping, which outranks a plain html[data-theme] prefix. */
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #0e1c2e !important;
  border-color: #2a4463 !important;
  color: #d8e3ef !important;
}

html[data-theme="dark"] .deadline-checkbox,
html[data-theme="dark"] .deadline-checkbox span,
html[data-theme="dark"] .app2-check,
html[data-theme="dark"] .app2-checklist {
  background: #14263c !important;
  border-color: #22374f !important;
  color: #dbe7f4 !important;
}

html[data-theme="dark"] select option {
  background: #0e1c2e;
  color: #e7eef7;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #7d93a9;
}

html[data-theme="dark"] .deadline-check {
  color: #cfdcea;
}

/* calendars */
html[data-theme="dark"] .travel-calendar {
  background: #111f33;
  border-color: #22374f;
}

html[data-theme="dark"] .travel-weekdays span {
  color: #8fa6bc;
}

html[data-theme="dark"] .travel-days button {
  background: transparent;
  color: #cddbeb;
  border-color: transparent;
}

html[data-theme="dark"] .travel-days button:hover:not(:disabled) {
  background: #1b3049;
}

html[data-theme="dark"] .travel-days button:disabled {
  color: #5d7389;
}

html[data-theme="dark"] .travel-days button.is-weekend {
  color: #f0b45c;
}

html[data-theme="dark"] .travel-days button[aria-pressed="true"],
html[data-theme="dark"] .travel-days button.is-selected {
  background: #2f6fb5;
  color: #ffffff;
}

html[data-theme="dark"] .travel-calendar-nav button {
  background: #16293f;
  border-color: #22374f;
  color: #cfdcea;
}

/* speed table */
html[data-theme="dark"] table.flight-table {
  background: #111f33 !important;
}

html[data-theme="dark"] .flight-table tbody td {
  background: transparent !important;
}

html[data-theme="dark"] .flight-table thead th {
  color: #8fa6bc;
  border-color: #22374f;
}

html[data-theme="dark"] .flight-table tbody td {
  border-color: #1b2f47;
  color: #dbe7f4;
}

html[data-theme="dark"] .flight-table tbody tr:nth-child(even),
html[data-theme="dark"] .flight-table tbody tr:nth-child(even) td {
  background: #14263c !important;
}

html[data-theme="dark"] .flight-table tbody tr.is-closed td {
  color: #6d849b;
}

html[data-theme="dark"] .flight-ok {
  color: #7ee0a6;
}

html[data-theme="dark"] .flight-no {
  color: #ff9d84;
}

html[data-theme="dark"] .deadline-quote,
html[data-theme="dark"] .deadline-quote p,
html[data-theme="dark"] .deadline-quote-label,
html[data-theme="dark"] #quote-tier,
html[data-theme="dark"] #quote-price {
  color: #e8f0f9 !important;
}

html[data-theme="dark"] .deadline-quote-label {
  color: #9fb3c8 !important;
}

/* footer and CTA band */
html[data-theme="dark"] .nv-footer,
html[data-theme="dark"] footer {
  background: #08111d;
  border-color: #1d3149;
  color: #a9bccf;
}

html[data-theme="dark"] .nv-footer a,
html[data-theme="dark"] footer a {
  color: #b9cde0;
}

html[data-theme="dark"] img {
  color-scheme: only light;
}

/* the wordmark is navy and blue, so the header swaps to the white version instead of carrying a plate */
.nv-logo-image.nv-logo-white { display: none; }
html[data-theme="dark"] .nv-logo-image.nv-logo-color { display: none; }
html[data-theme="dark"] .nv-logo-image.nv-logo-white {
  display: inline-block;
  opacity: 0.86; /* full white glares on a near-black bar; sit it back a step */
}

html[data-theme="dark"] .travel-days button:disabled {
  color: #6b8299;
}

/* the toggle itself */
.nv-theme-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #33506b;
  background: #ffffff;
  border: 1px solid #dbe7f3;
  border-radius: 999px;
  cursor: pointer;
}

.nv-theme-toggle:hover {
  border-color: #b9cfe6;
}

.nv-theme-toggle svg {
  width: 15px;
  height: 15px;
}

html[data-theme="dark"] .nv-theme-toggle {
  color: #cfdcea;
  background: #16293f;
  border-color: #2a4463;
}

/* ---------------------------------------------------------------- homepage bands
   The homepage builds its own sections in home.css; these are the surfaces that stayed
   white when the generic rules ran. */
html[data-theme="dark"] .hero {
  background: #0d1b2c !important;
}

html[data-theme="dark"] .promo-wide,
html[data-theme="dark"] .promo-urgent,
html[data-theme="dark"] .promo-vietnam {
  background: #101f33 !important;
}

html[data-theme="dark"] .nv-resources,
html[data-theme="dark"] .home-price-details,
html[data-theme="dark"] .video-section,
html[data-theme="dark"] .faq-section {
  background: #0e1b2c !important;
}

html[data-theme="dark"] .price-card {
  background: #14263c !important;
  border-color: #22374f !important;
}

html[data-theme="dark"] .price-card.featured {
  background: #1a3350 !important;
}

html[data-theme="dark"] .promo-image,
html[data-theme="dark"] .resource-note-panel {
  background: #14263c !important;
}

html[data-theme="dark"] .urgent-strip {
  background: #2f2609 !important;
  color: #f0c464 !important;
}

html[data-theme="dark"] .urgent-strip a,
html[data-theme="dark"] .urgent-strip strong,
html[data-theme="dark"] .urgent-strip b {
  color: #ffd479 !important;
}

html[data-theme="dark"] .hero h1,
html[data-theme="dark"] .hero h2,
html[data-theme="dark"] .hero p,
html[data-theme="dark"] .hero li,
html[data-theme="dark"] .promo-wide h2,
html[data-theme="dark"] .promo-wide h3,
html[data-theme="dark"] .promo-wide p,
html[data-theme="dark"] .promo-wide li,
html[data-theme="dark"] .promo-wide strong,
html[data-theme="dark"] .price-card h3,
html[data-theme="dark"] .price-card p,
html[data-theme="dark"] .price-card li,
html[data-theme="dark"] .price-card span,
html[data-theme="dark"] .nv-resources h2,
html[data-theme="dark"] .nv-resources h3,
html[data-theme="dark"] .nv-resources p,
html[data-theme="dark"] .nv-resources li,
html[data-theme="dark"] .home-price-details h2,
html[data-theme="dark"] .home-price-details h3,
html[data-theme="dark"] .home-price-details p,
html[data-theme="dark"] .home-price-details li,
html[data-theme="dark"] .faq-section h2,
html[data-theme="dark"] .faq-section h3,
html[data-theme="dark"] .faq-section p,
html[data-theme="dark"] .faq-section li,
html[data-theme="dark"] .video-section h2,
html[data-theme="dark"] .video-section p {
  color: #dbe6f2 !important;
}

html[data-theme="dark"] .price-card .price-amount,
html[data-theme="dark"] .price-card .price {
  color: #eef4fa !important;
}

/* ------------------------------------------------------------ inner-page surfaces
   Price and cutoff tables, service cards, timeline cards and FAQ rows are declared per
   page rather than in the shell, so they need naming here. */
html[data-theme="dark"] .price-table,
html[data-theme="dark"] .cutoff-table,
html[data-theme="dark"] .evisa-price-table,
html[data-theme="dark"] .resource-price-table {
  background: #111f33 !important;
  border-color: #22374f !important;
}

html[data-theme="dark"] .price-table th,
html[data-theme="dark"] .cutoff-table th,
html[data-theme="dark"] .evisa-price-table th,
html[data-theme="dark"] .resource-price-table th {
  background: #16293f !important;
  color: #cfdcea !important;
  border-color: #22374f !important;
}

html[data-theme="dark"] .price-table td,
html[data-theme="dark"] .cutoff-table td,
html[data-theme="dark"] .evisa-price-table td,
html[data-theme="dark"] .resource-price-table td {
  background: transparent !important;
  color: #dbe6f2 !important;
  border-color: #1b2f47 !important;
}

html[data-theme="dark"] .price-table tbody tr:nth-child(even),
html[data-theme="dark"] .price-table tbody tr:nth-child(even) td,
html[data-theme="dark"] .cutoff-table tbody tr:nth-child(even),
html[data-theme="dark"] .cutoff-table tbody tr:nth-child(even) td,
html[data-theme="dark"] .evisa-price-table tbody tr:nth-child(even),
html[data-theme="dark"] .evisa-price-table tbody tr:nth-child(even) td,
html[data-theme="dark"] .resource-price-table tbody tr:nth-child(even),
html[data-theme="dark"] .resource-price-table tbody tr:nth-child(even) td {
  background: #16293f !important;
}

html[data-theme="dark"] .service-card,
html[data-theme="dark"] .timeline-card,
html[data-theme="dark"] .faq-item,
html[data-theme="dark"] .resource-service-card,
html[data-theme="dark"] .resource-hero-panel,
html[data-theme="dark"] .contact {
  background: #14263c !important;
  border-color: #22374f !important;
  color: #dbe6f2 !important;
}

html[data-theme="dark"] .service-card *,
html[data-theme="dark"] .timeline-card *,
html[data-theme="dark"] .faq-item *,
html[data-theme="dark"] .resource-service-card *,
html[data-theme="dark"] .resource-hero-panel *,
html[data-theme="dark"] .contact * {
  color: #dbe6f2 !important;
  border-color: #22374f !important;
}

/* leftovers: the promo step strip on the homepage and the unclassed price table on pricing */
html[data-theme="dark"] .promo-speeds,
html[data-theme="dark"] .promo-steps,
html[data-theme="dark"] .promo-steps > div {
  background: #14263c !important;
  color: #dbe6f2 !important;
  border-color: #22374f !important;
}

html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] .wrap > table {
  background: #111f33 !important;
  border-color: #22374f !important;
  color: #dbe6f2 !important;
}

html[data-theme="dark"] .wrap > table td,
html[data-theme="dark"] .wrap > table th {
  background: transparent !important;
  border-color: #1b2f47 !important;
  color: #dbe6f2 !important;
}

/* ---------------------------------------------------------- containers the sweep found
   These stayed white while the text inside had already been made light, which is the
   white-on-white case: darken the box, then the text works. */
html[data-theme="dark"] .case,
html[data-theme="dark"] .app-card,
html[data-theme="dark"] .timeline-card,
html[data-theme="dark"] .resource-faq-list,
html[data-theme="dark"] .disclaimer-box,
html[data-theme="dark"] .note {
  background: #14263c !important;
  border-color: #22374f !important;
  color: #dbe6f2 !important;
}

html[data-theme="dark"] .case p,
html[data-theme="dark"] .case h2,
html[data-theme="dark"] .case h3,
html[data-theme="dark"] .case strong,
html[data-theme="dark"] .case li,
html[data-theme="dark"] .case span,
html[data-theme="dark"] .app-card p,
html[data-theme="dark"] .app-card h2,
html[data-theme="dark"] .app-card h3,
html[data-theme="dark"] .app-card li,
html[data-theme="dark"] .app-card strong,
html[data-theme="dark"] .timeline-card p,
html[data-theme="dark"] .timeline-card h3,
html[data-theme="dark"] .timeline-card li,
html[data-theme="dark"] .resource-faq-list *,
html[data-theme="dark"] .disclaimer-box *,
html[data-theme="dark"] .note * {
  color: #dbe6f2 !important;
}

/* dark boxes whose text was still navy */
html[data-theme="dark"] .resource-mini-links,
html[data-theme="dark"] .resource-mini-links a,
html[data-theme="dark"] .resource-container,
html[data-theme="dark"] .resource-section-heading,
html[data-theme="dark"] .resource-intro,
html[data-theme="dark"] .resource-intro * {
  color: #cfdcea !important;
}

/* contrast pass 2: resource notes, section links, FAQ summaries, revealed timeline cards */
html[data-theme="dark"] .resource-table-note,
html[data-theme="dark"] .resource-note,
html[data-theme="dark"] .resource-section-heading,
html[data-theme="dark"] .resource-section-heading a,
html[data-theme="dark"] .resource-container a,
html[data-theme="dark"] .resource-intro a {
  color: #a9c4e0 !important;
}

html[data-theme="dark"] .resource-faq summary,
html[data-theme="dark"] details.resource-faq summary,
html[data-theme="dark"] details summary {
  color: #dbe6f2 !important;
}

html[data-theme="dark"] .resource-faq p,
html[data-theme="dark"] .resource-faq li,
html[data-theme="dark"] details p,
html[data-theme="dark"] details li {
  color: #c3d3e3 !important;
}

html[data-theme="dark"] .timeline-card.reveal,
html[data-theme="dark"] .app-card.reveal,
html[data-theme="dark"] .case.reveal {
  background: #14263c !important;
  color: #dbe6f2 !important;
}

html[data-theme="dark"] .timeline-card.reveal *,
html[data-theme="dark"] .app-card.reveal *,
html[data-theme="dark"] .case.reveal * {
  color: #dbe6f2 !important;
}

/* ----------------------------------------------------- homepage FAQ on mobile
   <details><summary> rows carry a muted blue that reads as nothing on navy. */
html[data-theme="dark"] .faq-list summary,
html[data-theme="dark"] .faq-list summary span,
html[data-theme="dark"] .faq-layout summary,
html[data-theme="dark"] .faq-layout summary span {
  color: #e3ecf6 !important;
}

html[data-theme="dark"] .faq-list p,
html[data-theme="dark"] .faq-layout p {
  color: #c3d3e3 !important;
}

html[data-theme="dark"] .text-link,
html[data-theme="dark"] .text-link svg,
html[data-theme="dark"] .faq-layout .text-link {
  color: #8fbdf0 !important;
  stroke: currentColor;
}

html[data-theme="dark"] .faq-list details,
html[data-theme="dark"] .faq-layout details {
  border-color: #22374f !important;
}

html[data-theme="dark"] .faq-list details[open] summary {
  color: #ffffff !important;
}

/* the fine-print panel and white buttons: light boxes must keep dark text */
html[data-theme="dark"] .promo-fineprint,
html[data-theme="dark"] .fineprint,
html[data-theme="dark"] .disclaimer {
  background: #14263c !important;
  color: #b9cbdd !important;
  border-color: #22374f !important;
}

html[data-theme="dark"] .promo-fineprint *,
html[data-theme="dark"] .fineprint *,
html[data-theme="dark"] .disclaimer * {
  color: #b9cbdd !important;
}

html[data-theme="dark"] .button-white,
html[data-theme="dark"] .button-white *,
html[data-theme="dark"] a.button-white {
  background: #eef4fa !important;
  color: #0a223d !important;
}

/* buttons and cards that carry their own light surfaces */
html[data-theme="dark"] .nv-site .resource-button-secondary {
  background: #eef4fa !important;
  color: #0a223d !important;
  border-color: #cfe0f0 !important;
}

html[data-theme="dark"] .nv-site .resource-button-primary {
  background: #c81925 !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .library-card {
  background: #14263c !important;
  border-color: #22374f !important;
}

html[data-theme="dark"] .library-card summary,
html[data-theme="dark"] .library-card p,
html[data-theme="dark"] .library-card li,
html[data-theme="dark"] .library-card span {
  color: #dbe6f2 !important;
}

html[data-theme="dark"] .nv-site .promo-fineprint {
  background: #14263c !important;
  color: #b9cbdd !important;
}

html[data-theme="dark"] .nv-site .promo-fineprint * {
  color: #b9cbdd !important;
}

/* ======================================================================== STEP 6
   Surfaces are dark now (two exceptions below: the hero photo box and the swipable
   price table). With that true, a broad text rule is safe and removes the
   dark-on-dark cases one selector at a time produced. */
html[data-theme="dark"] .nv-site p,
html[data-theme="dark"] .nv-site li,
html[data-theme="dark"] .nv-site span,
html[data-theme="dark"] .nv-site td,
html[data-theme="dark"] .nv-site th,
html[data-theme="dark"] .nv-site label,
html[data-theme="dark"] .nv-site strong,
html[data-theme="dark"] .nv-site small,
html[data-theme="dark"] .nv-site dd,
html[data-theme="dark"] .nv-site dt,
html[data-theme="dark"] .nv-site h1,
html[data-theme="dark"] .nv-site h2,
html[data-theme="dark"] .nv-site h3,
html[data-theme="dark"] .nv-site h4,
html[data-theme="dark"] .nv-site a,
html[data-theme="dark"] .nv-site summary,
html[data-theme="dark"] .nv-site legend {
  color: #d3dfec !important;
}

/* the swipable price table on the pricing page */
html[data-theme="dark"] .table-wrap table,
html[data-theme="dark"] .nv-table,
html[data-theme="dark"] .nv-table td,
html[data-theme="dark"] .nv-table th {
  background: #111f33 !important;
  border-color: #22374f !important;
}

html[data-theme="dark"] .table-wrap table tr:nth-child(even) td,
html[data-theme="dark"] .nv-table tr:nth-child(even) td {
  background: #16293f !important;
}

/* exceptions that must survive the broad rule */
html[data-theme="dark"] .nv-site .resource-button-secondary,
html[data-theme="dark"] .nv-site .button-white,
html[data-theme="dark"] .nv-site a.button-white {
  color: #0a223d !important;
}

html[data-theme="dark"] .nv-site .resource-button-primary,
html[data-theme="dark"] .nv-site .button-red,
html[data-theme="dark"] .nv-site .button-primary {
  color: #ffffff !important;
}

html[data-theme="dark"] .nv-site .promo-fineprint,
html[data-theme="dark"] .nv-site .promo-fineprint * {
  color: #b9cbdd !important;
}

html[data-theme="dark"] .nv-site .flight-ok { color: #7ee0a6 !important; }
html[data-theme="dark"] .nv-site .flight-no { color: #ff9d84 !important; }

/* ====================================================================== STEP 6b
   <details> carries its own pale panel on the homepage, which is what kept the FAQ
   rows and the video panel white after the surrounds went dark. */
html[data-theme="dark"] .nv-site details,
html[data-theme="dark"] .nv-site .resource-faq,
html[data-theme="dark"] .nv-site .video-details {
  background: #14263c !important;
  border-color: #22374f !important;
}

html[data-theme="dark"] .nv-site .resource-jump,
html[data-theme="dark"] .nv-site .resource-jump-links {
  background: transparent !important;
}

html[data-theme="dark"] .nv-site .resource-jump-links a,
html[data-theme="dark"] .nv-site .resource-steps *,
html[data-theme="dark"] .nv-site .resource-steps strong {
  color: #bcd0e4 !important;
}

html[data-theme="dark"] .nv-site .nv-skip {
  background: #14263c !important;
  color: #dbe6f2 !important;
}

/* ====================================================================== STEP 6c
   The last bright areas were not colours but gradients: a pale wash laid over the
   hero photo, the promo photo, and the whole service band. Replace the wash with a
   dark scrim so the photo still reads and the light text sits on something. */
html[data-theme="dark"] .hero-wash {
  background-image: linear-gradient(180deg, rgba(10, 20, 34, 0.94), rgba(13, 27, 44, 0.88)) !important;
  background-color: transparent !important;
}

html[data-theme="dark"] .promo-wash {
  background-image: linear-gradient(180deg, rgba(10, 20, 34, 0.93), rgba(13, 27, 44, 0.9)) !important;
  background-color: transparent !important;
}

html[data-theme="dark"] .resource-block,
html[data-theme="dark"] .nv-site .resource-block {
  background-image: none !important;
  background-color: #0e1b2c !important;
}

html[data-theme="dark"] .hero-image {
  background-color: #0d1b2c !important;
}

/* ====================================================================== STEP 6d
   The jump-link chips under the intro are light cards, so their labels were pale on
   pale. Give them the raised surface and lift the label. */
html[data-theme="dark"] .resource-jump-links a,
html[data-theme="dark"] .resource-jump-links button {
  background: #14263c !important;
  border-color: #22374f !important;
  color: #cfe0f0 !important;
}

html[data-theme="dark"] .resource-jump-links a svg,
html[data-theme="dark"] .resource-jump-links a svg * {
  color: #8fbdf0 !important;
  stroke: currentColor !important;
}

/* ====================================================================== STEP 6e
   Unclassed inner divs inside the timeline cards still carry a white panel. */
html[data-theme="dark"] .timeline-card > div,
html[data-theme="dark"] .timeline-card.reveal > div,
html[data-theme="dark"] .app-card > div,
html[data-theme="dark"] .app-card.reveal > div {
  background: transparent !important;
  border-color: #22374f !important;
}
