/*
 * Da Danang shared visual layer (v2)
 *
 * This file is deliberately compatible with the legacy inline page styles.
 * Keep it loaded after the page's embedded <style> block. !important is used
 * only where an inline declaration or an existing important rule must be
 * overridden (primarily responsive navigation and mobile spacing).
 */

:root {
  --dd-ink: #29231d;
  --dd-ink-soft: #5c5245;
  --dd-muted: #8a7e6e;
  --dd-paper: #fbf7f0;
  --dd-surface: #fffdf9;
  --dd-line: #e9decc;
  --dd-line-strong: #d9c9b2;
  --dd-accent: #c4562b;
  --dd-accent-hover: #a84621;
  --dd-accent-soft: #f0d9c8;
  --dd-green: #22403b;
  --dd-shadow-sm: 0 8px 24px rgba(60, 42, 24, 0.07);
  --dd-shadow-md: 0 18px 48px rgba(60, 42, 24, 0.12);
  --dd-focus: #176b87;
  --dd-radius-sm: 12px;
  --dd-radius-md: 18px;
  --dd-radius-lg: 24px;
  --dd-header-height: 76px;
  color-scheme: light;
}

html {
  overflow-x: clip;
  scroll-padding-top: calc(var(--dd-header-height) + 24px);
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  max-width: 100%;
  overflow-wrap: break-word;
  background:
    radial-gradient(circle at 8% 12%, rgba(240, 217, 200, 0.24), transparent 28rem),
    var(--dd-paper);
}

body.menu-open {
  overflow: hidden;
}

img,
svg,
video,
iframe {
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
summary,
a {
  -webkit-tap-highlight-color: rgba(196, 86, 43, 0.14);
}

a,
button,
summary,
input,
select,
textarea {
  scroll-margin-top: calc(var(--dd-header-height) + 20px);
}

:where(a, button, summary, input, select, textarea):focus-visible {
  outline: 3px solid var(--dd-focus);
  outline-offset: 3px;
}

:where(a, button, summary):focus-visible {
  border-radius: 8px;
}

h1,
h2,
h3 {
  color: var(--dd-ink);
  letter-spacing: -0.018em;
}

h1 {
  line-height: 1.08;
}

h2 {
  line-height: 1.16;
}

p,
li {
  text-wrap: pretty;
}

.wrap {
  width: 100%;
}

/* Sticky header and desktop navigation */
.skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--dd-ink);
  color: var(--dd-surface);
  text-decoration: none;
  transform: translateY(calc(-100% - 24px));
  transition: transform 160ms ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  color: var(--dd-surface);
  transform: translateY(0);
}

body > header {
  isolation: isolate;
  box-shadow: 0 1px 0 rgba(41, 35, 29, 0.03);
  transition: box-shadow 180ms ease;
}

@media (min-width: 1081px) {
  body > header > .wrap {
    max-width: 1440px !important;
    gap: 16px !important;
    padding-right: 24px !important;
    padding-left: 24px !important;
  }

  nav.desknav {
    min-width: 0;
    display: flex !important;
    align-items: center;
    justify-content: center !important;
  }

  nav.desknav > .navitem {
    flex: 0 0 auto;
  }

  nav.desknav .navlink {
    padding-right: 7px !important;
    padding-left: 7px !important;
    white-space: nowrap;
  }

  .mburger {
    display: none !important;
  }
}

@media (min-width: 1081px) and (max-width: 1400px) {
  body > header a.desknav[href^="tel:"] {
    display: none !important;
  }

  body > header > .wrap {
    gap: 10px !important;
    padding-right: 16px !important;
    padding-left: 16px !important;
  }

  nav.desknav {
    font-size: 13.5px !important;
  }
}

body > header.is-scrolled {
  box-shadow: 0 10px 32px rgba(60, 42, 24, 0.1);
}

.navlink,
.dd-inner a {
  text-underline-offset: 0.2em;
}

.navitem:focus-within > .dd {
  display: block;
}

.dd-inner {
  max-height: calc(100vh - var(--dd-header-height) - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.dd-inner a:focus-visible,
.dd-inner a:hover {
  background: #f2e8d8;
}

/* Buttons and calls to action */
.btn-p,
.btn-s {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  text-align: center;
  line-height: 1.2;
  box-shadow: 0 0 0 rgba(60, 42, 24, 0);
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.btn-p {
  box-shadow: 0 9px 22px rgba(196, 86, 43, 0.2);
}

body > header a[href*="wa.me"] {
  transition:
    background-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .btn-p:hover,
  .btn-s:hover,
  body > header a[href*="wa.me"]:hover {
    transform: translateY(-2px);
  }

  .btn-p:hover {
    box-shadow: 0 12px 28px rgba(196, 86, 43, 0.28);
  }
}

.btn-p:active,
.btn-s:active,
body > header a[href*="wa.me"]:active {
  transform: translateY(0) scale(0.985);
}

/* Shared card treatment for the existing inline card markup. */
:where(a, article, div)[style*="border-radius:16px"][style*="border"],
:where(a, article, div)[style*="border-radius:18px"][style*="border"],
:where(a, article, div)[style*="border-radius:20px"][style*="border"] {
  box-shadow: var(--dd-shadow-sm);
}

:where(a, article)[style*="border-radius:16px"],
:where(a, article)[style*="border-radius:18px"],
:where(a, article)[style*="border-radius:20px"] {
  transition:
    border-color 220ms ease,
    box-shadow 220ms ease,
    transform 220ms ease;
}

:where(a, article)[style*="border-radius:16px"] img,
:where(a, article)[style*="border-radius:18px"] img,
:where(a, article)[style*="border-radius:20px"] img {
  transition: transform 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) and (pointer: fine) {
  a[style*="border-radius:16px"]:hover,
  a[style*="border-radius:18px"]:hover,
  a[style*="border-radius:20px"]:hover {
    border-color: var(--dd-line-strong) !important;
    box-shadow: var(--dd-shadow-md);
    transform: translateY(-4px);
  }

  a[style*="border-radius:16px"]:hover img,
  a[style*="border-radius:18px"]:hover img,
  a[style*="border-radius:20px"]:hover img {
    transform: scale(1.035);
  }
}

.grid2,
.grid3,
.grid4,
.grid-foot,
.hero-grid,
.grid2 > *,
.grid3 > *,
.grid4 > *,
.grid-foot > *,
.hero-grid > * {
  min-width: 0;
}

/* Native FAQ/details polish. */
details > summary {
  transition: color 180ms ease;
}

details > summary::-webkit-details-marker {
  display: none;
}

details > summary > span:last-child {
  flex: 0 0 auto;
  transition: transform 180ms ease;
}

details[open] > summary {
  color: var(--dd-accent);
}

details[open] > summary > span:last-child {
  transform: rotate(45deg);
}

/* Forms are intentionally generic so a future brief/quiz inherits the UI. */
:where(input, select, textarea) {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--dd-line-strong);
  border-radius: var(--dd-radius-sm);
  background: var(--dd-surface);
  color: var(--dd-ink);
  padding: 11px 14px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

textarea {
  min-height: 132px;
  resize: vertical;
}

:where(input, select, textarea):focus {
  border-color: var(--dd-accent);
  box-shadow: 0 0 0 4px rgba(196, 86, 43, 0.12);
}

/*
 * Language switcher.
 * Supported wrappers: .lang-switcher, .language-switcher or
 * [data-language-switcher]. Plain link rows and optional dropdown markup are
 * both supported.
 */
:where(.lang-switcher, .language-switcher, [data-language-switcher]) {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--dd-line);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.84);
  color: var(--dd-ink);
  box-shadow: 0 5px 18px rgba(60, 42, 24, 0.06);
}

:where(.lang-switcher, .language-switcher, [data-language-switcher]) > a,
:where(.lang-switcher__toggle, .language-switcher__toggle, [data-language-toggle]) {
  min-width: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--dd-ink-soft);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    color 160ms ease,
    background-color 160ms ease;
}

:where(.lang-switcher, .language-switcher, [data-language-switcher]) > a:hover,
:where(.lang-switcher__toggle, .language-switcher__toggle, [data-language-toggle]):hover {
  background: #f2e8d8;
  color: var(--dd-ink);
}

:where(.lang-switcher, .language-switcher, [data-language-switcher]) > a[aria-current="page"],
:where(.lang-switcher, .language-switcher, [data-language-switcher]) > a.is-active,
:where(.lang-switcher, .language-switcher, [data-language-switcher]) > a.active {
  background: var(--dd-ink);
  color: var(--dd-paper);
}

:where(.lang-switcher__menu, .language-switcher__menu, [data-language-menu]) {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 120;
  min-width: 156px;
  padding: 7px;
  border: 1px solid var(--dd-line);
  border-radius: 14px;
  background: var(--dd-surface);
  box-shadow: var(--dd-shadow-md);
}

:where(.lang-switcher__menu, .language-switcher__menu, [data-language-menu]) a {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 9px 11px;
  border-radius: 9px;
  color: var(--dd-ink);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

:where(.lang-switcher__menu, .language-switcher__menu, [data-language-menu]) a:hover,
:where(.lang-switcher__menu, .language-switcher__menu, [data-language-menu]) a[aria-current="page"] {
  background: #f2e8d8;
}

/* Footer links gain a clear interaction state without changing the palette. */
footer a {
  text-underline-offset: 0.22em;
  transition: color 160ms ease;
}

footer a:hover {
  color: var(--dd-surface) !important;
}

/* Tablet and mobile navigation. */
@media (max-width: 1080px) {
  :root {
    --dd-header-height: 68px;
  }

  body > header > .wrap {
    height: var(--dd-header-height) !important;
    gap: 12px !important;
  }

  /* Required because the legacy nav has inline display:flex. */
  .desknav {
    display: none !important;
  }

  .mburger {
    width: 44px;
    height: 44px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    padding: 10px !important;
    border: 1px solid var(--dd-line) !important;
    border-radius: 50%;
    background: rgba(255, 253, 249, 0.72) !important;
  }

  .mburger > span {
    transform-origin: center;
    transition:
      opacity 180ms ease,
      transform 180ms ease;
  }

  .mburger[aria-expanded="true"] > span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .mburger[aria-expanded="true"] > span:nth-child(2) {
    opacity: 0;
  }

  .mburger[aria-expanded="true"] > span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  #mmenu {
    padding:
      max(18px, env(safe-area-inset-top))
      max(18px, env(safe-area-inset-right))
      max(28px, env(safe-area-inset-bottom))
      max(18px, env(safe-area-inset-left)) !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  /* The class is added only by site-v2.js, retaining the old inline fallback. */
  html.site-v2-ready #mmenu {
    display: block !important;
    visibility: hidden;
    opacity: 0;
    transform: translate3d(100%, 0, 0);
    pointer-events: none;
    transition:
      transform 300ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity 220ms ease,
      visibility 0s linear 300ms;
  }

  html.site-v2-ready #mmenu.is-open {
    visibility: visible;
    opacity: 1;
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
    transition-delay: 0s;
  }

  #mmenu > div {
    width: min(100%, 760px);
    margin-right: auto;
    margin-left: auto;
  }

  #mmenu > div:first-child {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 4px 0 12px;
    background: rgba(251, 247, 240, 0.96);
    backdrop-filter: blur(12px);
  }

  #mmenu > div:first-child button {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--dd-line) !important;
    border-radius: 50%;
    background: var(--dd-surface) !important;
  }

  #mmenu a {
    min-height: 44px;
    display: flex !important;
    align-items: center;
    border-radius: 9px;
    transition:
      color 160ms ease,
      background-color 160ms ease;
  }

  #mmenu a:hover,
  #mmenu a:focus-visible,
  #mmenu a[aria-current="page"] {
    background: #f2e8d8;
    color: var(--dd-ink) !important;
  }
}

@media (min-width: 1081px) {
  #mmenu {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .grid-foot {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 34px 28px !important;
  }

  .grid-foot > :first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .wrap {
    padding-right: 16px !important;
    padding-left: 16px !important;
  }

  .grid2,
  .grid3,
  .grid4,
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2.05rem, 10vw, 3.05rem) !important;
    line-height: 1.08 !important;
  }

  h2.serif {
    font-size: clamp(1.8rem, 8vw, 2.35rem) !important;
    line-height: 1.16 !important;
  }

  h3.serif {
    line-height: 1.22 !important;
  }

  section.wrap[style*="padding:96px"],
  section.wrap[style*="padding: 96px"] {
    padding-top: 64px !important;
  }

  section[style*="background:#22403B"],
  section[style*="background: #22403B"] {
    padding: 42px 20px !important;
    border-radius: 20px !important;
  }

  footer {
    margin-top: 72px !important;
  }

  footer > .wrap {
    padding-top: 48px !important;
    padding-bottom: 32px !important;
  }

  table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  body > a[href*="wa.me"][style*="position:fixed"] {
    right: max(16px, env(safe-area-inset-right)) !important;
    bottom: max(16px, env(safe-area-inset-bottom)) !important;
    width: 54px !important;
    height: 54px !important;
  }
}

@media (max-width: 600px) {
  .grid-foot {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 28px !important;
  }

  .grid-foot > :first-child {
    grid-column: auto;
  }

  body > header > .wrap > div:last-child > a[href*="wa.me"] {
    display: none !important;
  }

  #mmenu > div:not(:first-child) {
    padding-top: 16px !important;
    padding-bottom: 16px !important;
  }
}

@media (max-width: 480px) {
  .btn-p,
  .btn-s {
    width: 100%;
    padding-right: 22px;
    padding-left: 22px;
  }

  :where(.lang-switcher, .language-switcher, [data-language-switcher]) > a,
  :where(.lang-switcher__toggle, .language-switcher__toggle, [data-language-toggle]) {
    min-width: 34px;
    min-height: 34px;
    padding-right: 8px;
    padding-left: 8px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .btn-p,
  .btn-s,
  .mburger,
  :where(.lang-switcher, .language-switcher, [data-language-switcher]) {
    border: 1px solid ButtonText;
  }
}

@font-face {
  font-family: "DD Sans Devanagari";
  src: url("/assets/fonts/noto-sans-devanagari.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}

@font-face {
  font-family: "DD Serif Devanagari";
  src: url("/assets/fonts/noto-serif-devanagari.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}

body.locale-zh {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
}

body.locale-zh .serif {
  font-family: "Prata", "Noto Serif SC", "Songti SC", SimSun, serif;
}

body.locale-hi {
  font-family: "DD Sans Devanagari", "Noto Sans Devanagari", "Nirmala UI", "Kohinoor Devanagari", Mangal, sans-serif;
}

body.locale-hi .serif {
  font-family: "DD Serif Devanagari", "Noto Serif Devanagari", "Nirmala UI", "Kohinoor Devanagari", serif;
}

body.locale-hi :is(h1, h2, h3).serif {
  line-height: 1.24 !important;
}

body.locale-hi .eyebrow {
  letter-spacing: 0.04em !important;
  text-transform: none !important;
}

body.locale-hi > header > .wrap > a:first-child span:last-child {
  letter-spacing: 0.04em !important;
  text-transform: none !important;
}

body.locale-hi .dd-lang-switcher a[lang="hi"] {
  letter-spacing: 0 !important;
}

/* Content directories and contextual internal-link blocks. */
.site-directory {
  padding-top: 96px;
}

.site-directory > .eyebrow {
  margin-bottom: 14px;
}

.site-directory > h2 {
  max-width: 760px;
  margin: 0 0 36px;
  font-size: clamp(2rem, 3.4vw, 2.65rem);
  line-height: 1.16;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.resource-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--dd-line);
  border-radius: var(--dd-radius-md);
  background: var(--dd-surface);
  box-shadow: var(--dd-shadow-sm);
  transition:
    border-color 220ms ease,
    box-shadow 220ms ease,
    transform 220ms ease;
}

.resource-card__media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #eadfce;
}

.resource-card__media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(41, 35, 29, 0.12), transparent 45%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.resource-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

.resource-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
  padding: 21px 22px 24px;
}

.resource-card h3 {
  margin: 0;
  font-family: "Prata", serif;
  font-size: 19px;
  font-weight: 400;
  line-height: 1.34;
}

.resource-card h3 a {
  color: var(--dd-ink);
  text-decoration: none;
}

.resource-card p {
  flex: 1;
  margin: 0;
  color: var(--dd-ink-soft);
  font-size: 14.5px;
  line-height: 1.62;
}

.resource-card__link {
  margin-top: 2px;
  color: var(--dd-accent);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  text-underline-offset: 0.2em;
}

.resource-card__link:hover {
  text-decoration: underline;
}

@media (hover: hover) and (pointer: fine) {
  .resource-card:hover {
    border-color: var(--dd-line-strong);
    box-shadow: var(--dd-shadow-md);
    transform: translateY(-4px);
  }

  .resource-card:hover .resource-card__media::after {
    opacity: 1;
  }

  .resource-card:hover .resource-card__media img {
    transform: scale(1.04);
  }
}

.related-pages {
  margin-top: 64px;
  padding: 32px;
  border: 1px solid var(--dd-line);
  border-radius: var(--dd-radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 253, 249, 0.82), rgba(242, 232, 216, 0.72)),
    var(--dd-surface);
}

.related-pages > :first-child {
  margin-top: 0;
}

.related-pages > h2,
.related-pages > h3 {
  margin-bottom: 20px;
  font-family: "Prata", serif;
  font-weight: 400;
}

.related-pages > ul,
.related-pages__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.related-pages > ul > li {
  min-width: 0;
}

.related-pages > ul > li > a,
.related-pages__link {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 100%;
  padding: 12px 15px;
  border: 1px solid var(--dd-line);
  border-radius: var(--dd-radius-sm);
  background: rgba(255, 253, 249, 0.86);
  color: var(--dd-ink);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
}

.related-pages > ul > li > a::after,
.related-pages__link::after {
  flex: 0 0 auto;
  color: var(--dd-accent);
  content: "→";
}

.related-pages > ul > li > a:hover,
.related-pages__link:hover {
  border-color: var(--dd-line-strong);
  background: var(--dd-surface);
  transform: translateY(-1px);
}

/* Four-step, privacy-friendly estimate quiz injected by site-v2.js. */
#quiz {
  scroll-margin-top: calc(var(--dd-header-height) + 24px);
}

#quiz.quiz-enhanced > .grid2,
#quiz.quiz-enhanced > div.grid2 {
  align-items: stretch !important;
}

.quiz-form {
  min-width: 0;
  min-height: 390px;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--dd-line);
  border-radius: var(--dd-radius-md);
  background: var(--dd-surface);
  color: var(--dd-ink);
  box-shadow: var(--dd-shadow-sm);
}

.quiz-form__header {
  margin-bottom: 22px;
}

.quiz-form__status {
  margin-bottom: 9px;
  color: var(--dd-accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-transform: uppercase;
}

.quiz-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.quiz-progress__segment {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--dd-line);
  transition: background-color 180ms ease;
}

.quiz-progress__segment.is-complete,
.quiz-progress__segment.is-current {
  background: var(--dd-accent);
}

.quiz-step {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.quiz-step__title {
  width: 100%;
  margin: 0 0 17px;
  padding: 0;
  color: var(--dd-ink);
  font-family: "Prata", serif;
  font-size: clamp(1.35rem, 2.4vw, 1.65rem);
  font-weight: 400;
  line-height: 1.28;
}

.quiz-step__title:focus {
  outline: none;
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quiz-option {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.quiz-option__input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.quiz-option__label {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border: 1px solid var(--dd-line-strong);
  border-radius: 12px;
  background: var(--dd-paper);
  color: var(--dd-ink-soft);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.quiz-option:hover .quiz-option__label {
  border-color: var(--dd-accent);
  color: var(--dd-ink);
}

.quiz-option.is-selected .quiz-option__label {
  border-color: var(--dd-accent);
  background: var(--dd-accent-soft);
  color: var(--dd-ink);
  box-shadow: 0 0 0 1px var(--dd-accent);
}

.quiz-option__input:focus-visible + .quiz-option__label {
  outline: 3px solid var(--dd-focus);
  outline-offset: 3px;
}

.quiz-month {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.quiz-month__input {
  min-width: 0;
  min-height: 50px;
  color-scheme: light;
}

.quiz-month__flexible {
  min-height: 50px;
  padding: 10px 14px;
  border: 1px solid var(--dd-line-strong);
  border-radius: 12px;
  background: var(--dd-paper);
  color: var(--dd-ink-soft);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.25;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.quiz-month__flexible:hover,
.quiz-month__flexible[aria-pressed="true"] {
  border-color: var(--dd-accent);
  background: var(--dd-accent-soft);
  color: var(--dd-ink);
}

.quiz-form__error {
  min-height: 21px;
  margin: 12px 0 4px;
  color: #9e351c;
  font-size: 13px;
  line-height: 1.45;
}

.quiz-step.is-invalid .quiz-option__label,
.quiz-step.is-invalid .quiz-month__input,
.quiz-step.is-invalid .quiz-month__flexible {
  border-color: #b84025;
}

.quiz-form__actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.quiz-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.quiz-button--back {
  border: 1px solid var(--dd-line-strong);
  background: transparent;
  color: var(--dd-ink);
}

.quiz-button--next {
  min-width: 142px;
  margin-left: auto;
  border: 1px solid var(--dd-accent);
  background: var(--dd-accent);
  color: var(--dd-paper);
}

.quiz-button:hover {
  transform: translateY(-1px);
}

.quiz-button--back:hover {
  background: #f2e8d8;
}

.quiz-button--next:hover {
  border-color: var(--dd-accent-hover);
  background: var(--dd-accent-hover);
}

.quiz-form__privacy {
  margin: 13px 0 0;
  color: var(--dd-muted);
  font-size: 11.5px;
  line-height: 1.45;
  text-align: center;
}

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

  .related-pages > ul,
  .related-pages__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-directory {
    padding-top: 64px !important;
  }

  .site-directory > h2 {
    margin-bottom: 26px;
  }

  .resource-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .related-pages {
    margin-top: 48px;
    padding: 24px 18px;
    border-radius: 18px;
  }

  .related-pages > ul,
  .related-pages__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #quiz {
    padding: 34px 18px !important;
    border-radius: 20px !important;
  }

  #quiz.quiz-enhanced > .grid2,
  #quiz.quiz-enhanced > div.grid2 {
    gap: 30px !important;
  }

  .quiz-form {
    min-height: 370px;
    padding: 24px 20px;
  }
}

@media (max-width: 420px) {
  .resource-card__body {
    padding: 19px 18px 21px;
  }

  .quiz-form {
    min-height: 390px;
    padding: 22px 16px;
  }

  .quiz-options {
    gap: 8px;
  }

  .quiz-option__label {
    min-height: 50px;
    padding: 8px;
    font-size: 13px;
  }

  .quiz-month {
    grid-template-columns: minmax(0, 1fr);
  }

  .quiz-button {
    min-width: 0;
    padding-right: 16px;
    padding-left: 16px;
  }

  .quiz-button--next {
    flex: 1;
  }
}

/* Keep a three-language header usable on the narrowest supported viewport. */
@media (max-width: 360px) {
  :root {
    --dd-header-height: 64px;
  }

  body > header > .wrap {
    height: var(--dd-header-height) !important;
    gap: 6px !important;
    padding-right: 10px !important;
    padding-left: 10px !important;
  }

  body > header > .wrap > a:first-child {
    min-width: 0;
    flex-shrink: 1 !important;
  }

  body > header > .wrap > a:first-child .serif {
    font-size: 18px !important;
    white-space: nowrap;
  }

  body > header > .wrap > a:first-child span:last-child {
    overflow: hidden;
    max-width: 102px;
    font-size: 8px !important;
    letter-spacing: 0.12em !important;
    white-space: nowrap;
  }

  body > header > .wrap > div:last-child {
    min-width: 0;
    gap: 5px !important;
  }

  body > header :where(.lang-switcher, .language-switcher, [data-language-switcher]) {
    gap: 1px;
    padding: 2px;
  }

  body > header :where(.lang-switcher, .language-switcher, [data-language-switcher]) > a,
  body > header :where(.lang-switcher__toggle, .language-switcher__toggle, [data-language-toggle]) {
    min-width: 29px;
    min-height: 30px;
    padding: 5px 6px;
    font-size: 10.5px;
    letter-spacing: 0;
  }

  .mburger {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    padding: 8px !important;
  }
}

@media (forced-colors: active) {
  .resource-card,
  .related-pages,
  .quiz-form,
  .quiz-option__label,
  .quiz-month__flexible,
  .quiz-button {
    border: 1px solid ButtonText;
  }
}
