/* Wedding Harmony - hand-painted wedding stationery.
   Warm ivory paper, watercolor blush and sage, whisper-weight serif headlines, ink buttons.
   Blush/sage/champagne appear only in illustrations and hairlines; interactive elements are ink. */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --ivory: #FDFBF9;
  --wash: #F7F3F0;
  --wash-rose: #F8EFEC;
  --wash-sage: #F1F4EC;
  --ink: #2D2926;
  --ink-soft: #5C5854;
  --muted: #77716C;
  --rose: #D4A5A5;
  --gold: #C4A484;
  --hairline: #EAE2D8;

  --radius: 16px;
  --radius-sm: 12px;
  --shadow-soft: 0 12px 32px rgba(196, 164, 132, 0.16);

  --font-display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

html {
  scroll-padding-top: 5rem;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  overflow-x: clip;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--ivory);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--ink);
  text-decoration: none;
}

p a,
li a {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
}

p a:hover,
li a:hover {
  text-decoration-color: var(--ink);
}

::selection {
  background: var(--rose);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

ul {
  list-style: none;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  color: var(--ink);
}

.container {
  width: min(1140px, 100%);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.text-centered {
  text-align: center;
}

.section {
  padding-block: 4rem;
}

.section__heading {
  font-size: clamp(1.9rem, 5.5vw, 2.6rem);
  margin-bottom: 0.6em;
  letter-spacing: -0.01em;
}

.section__lede {
  color: var(--ink-soft);
  max-width: 46ch;
  margin: -0.5rem auto 0;
}

/* ---------- Scroll reveals ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Store buttons (App Store + Google Play) ---------- */

/* Both stores sit side by side and carry equal weight; they wrap on narrow screens. */
.store-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.app-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  padding: 0.75rem 1.6rem;
  line-height: 1.15;
  transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: var(--shadow-soft);
}

.app-store-btn:hover {
  background: #423c37;
  transform: translateY(-1px);
}

.app-store-btn:active {
  transform: translateY(0) scale(0.98);
}

.app-store-btn .btn-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.app-store-btn .btn-subtitle {
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  opacity: 0.8;
}

.app-store-btn .btn-title {
  font-size: 1.05rem;
  font-weight: 500;
}

.app-store-btn--nav {
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 500;
  gap: 0.5rem;
  box-shadow: none;
}

/* Two pills fit the header only once there is room for their labels;
   between 600px and 900px they collapse to the store marks alone. */
.nav .app-store-btn--nav .btn-label {
  display: none;
}

.nav .app-store-btn--nav {
  padding: 0.5rem 0.85rem;
}

@media (min-width: 900px) {
  .nav .app-store-btn--nav .btn-label {
    display: inline;
  }

  .nav .app-store-btn--nav {
    padding: 0.5rem 1.1rem;
  }
}

.footer__app-btns {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
}

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 251, 249, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}

.nav__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__logo-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.01em;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav__store-links {
  display: none;
  gap: 0.5rem;
}

@media (min-width: 600px) {
  .nav__store-links {
    display: flex;
  }
}

@media (min-width: 768px) {
  .nav__right {
    gap: 1.75rem;
  }
}

.nav__nav-desktop {
  display: none;
  align-items: center;
  gap: 1.75rem;
}

.nav__desktop-link {
  font-size: 0.95rem;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.nav__desktop-link:hover {
  color: var(--ink);
}

.nav__hamburger {
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.nav__hamburger span,
.nav__hamburger span::before,
.nav__hamburger span::after {
  content: "";
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav__hamburger span {
  position: relative;
}

.nav__hamburger span::before {
  position: absolute;
  top: -7px;
}

.nav__hamburger span::after {
  position: absolute;
  top: 7px;
}

.mobile-nav-open .nav__hamburger span {
  transform: rotate(45deg);
}

.mobile-nav-open .nav__hamburger span::before {
  transform: rotate(-90deg) translateX(-7px);
}

.mobile-nav-open .nav__hamburger span::after {
  opacity: 0;
}

.nav__mobile-nav {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
  background: var(--ivory);
}

.mobile-nav-open .nav__mobile-nav {
  grid-template-rows: 1fr;
  border-bottom: 1px solid var(--hairline);
}

.nav__mobile-links {
  min-height: 0;
  overflow: hidden;
}

.mobile-nav-open .nav__mobile-links {
  padding-block: 0.75rem 1.25rem;
}

.nav__mobile-link {
  display: block;
  padding: 0.6rem 0;
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.nav__mobile-link:hover {
  color: var(--ink);
}

@media (min-width: 768px) {
  .nav__nav-desktop {
    display: flex;
  }

  .nav__hamburger,
  .nav__mobile-nav {
    display: none;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-block: 3.5rem 1.5rem;
  overflow: hidden;
}

.hero__container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}

.hero__text {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__heading {
  font-size: clamp(2.4rem, 9vw, 3.6rem);
  letter-spacing: -0.015em;
  max-width: 17ch;
  margin-bottom: 0.4em;
}

.hero__heading em {
  font-style: italic;
  line-height: 1.15;
}

.hero__sub {
  color: var(--ink-soft);
  max-width: 38ch;
  margin-bottom: 1.75rem;
}

.hero__art {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero__petals {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.petal {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: min(var(--w), 16vw);
  opacity: 0.72;
  transform: translate3d(0, calc(var(--sy, 0px) * var(--p, -0.2)), 0);
  will-change: transform;
}

.petal img {
  width: 100%;
  transform: rotate(var(--r, 0deg));
}

@media (prefers-reduced-motion: no-preference) {
  .petal img {
    animation: petal-sway 9s ease-in-out infinite alternate;
  }

  .petal:nth-child(even) img {
    animation-duration: 13s;
    animation-delay: -6s;
  }
}

@keyframes petal-sway {
  from {
    transform: translateX(-4px) rotate(var(--r, 0deg));
  }

  to {
    transform: translateX(5px) rotate(calc(var(--r, 0deg) + 12deg));
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero__accent {
    animation: petal-drift 11s ease-in-out infinite alternate;
  }

  .hero__accent--petal {
    animation-duration: 14s;
    animation-delay: -5s;
  }

  .hero__accent--petals {
    animation-duration: 17s;
    animation-delay: -9s;
  }
}

@keyframes petal-drift {
  from {
    transform: translateY(-7px) rotate(var(--r, 0deg));
  }

  to {
    transform: translateY(9px) rotate(calc(var(--r, 0deg) + 8deg));
  }
}

.hero__arch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(135vw, 600px);
  max-width: none;
  height: auto;
  z-index: 1;
  pointer-events: none;
}

.hero__phone {
  position: relative;
  z-index: 0;
  width: min(205px, 53vw);
  margin-top: clamp(4rem, 19vw, 6.5rem);
  border-radius: 28px;
  border: 1px solid var(--hairline);
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 88%);
  mask-image: linear-gradient(to bottom, #000 62%, transparent 88%);
}

@media (min-width: 900px) {
  .hero {
    padding-block: 4.5rem 4rem;
  }

  .hero__container {
    flex-direction: row;
    justify-content: space-between;
    gap: 2rem;
  }

  .hero__text {
    text-align: left;
    align-items: flex-start;
    max-width: 32rem;
  }

  .hero__art {
    flex: 0 0 auto;
    width: 620px;
    max-width: 50%;
  }

  .hero__arch {
    width: 620px;
  }

  .hero__phone {
    width: 215px;
    margin-top: 6.5rem;
  }
}

/* ---------- Social proof strip ---------- */

.proof {
  background: var(--wash);
  border-block: 1px solid var(--hairline);
}

.proof__row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding-block: 1.5rem;
  text-align: center;
}

.proof__item {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.proof__number {
  font-weight: 500;
  color: var(--ink);
}

.proof__rule {
  display: none;
}

@media (min-width: 600px) {
  .proof__row {
    flex-direction: row;
    justify-content: center;
    gap: 2.5rem;
  }

  .proof__rule {
    display: block;
    width: 1px;
    align-self: stretch;
    background: var(--hairline);
  }
}

/* ---------- Split feature stories ---------- */

.story__container {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.story__figure {
  display: flex;
  justify-content: center;
}

.story__figure img {
  max-width: 340px;
}

.story__figure--wide img {
  max-width: 520px;
  width: 100%;
}

.story__text {
  max-width: 34rem;
  margin-inline: auto;
  text-align: center;
}

.story__text p {
  color: var(--ink-soft);
}

@media (min-width: 820px) {
  .section.story {
    padding-block: 5.5rem;
  }

  .story__container {
    flex-direction: row;
    align-items: center;
    gap: 4.5rem;
  }

  .story__figure {
    flex: 1 1 52%;
  }

  .story__text {
    flex: 1 1 48%;
    text-align: left;
    margin-inline: 0;
  }

  .story--reverse .story__figure {
    order: 2;
  }

  .story--reverse .story__text {
    order: 1;
  }
}

/* ---------- Bento ---------- */

.bento {
  border-top: 1px solid var(--hairline);
}

.bento__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  margin-top: 2.25rem;
}

.bento__cell {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 1.75rem;
  background: var(--ivory);
}

.bento__cell img {
  max-height: 130px;
  width: auto;
  margin-bottom: 1.1rem;
}

.bento__cell h3 {
  font-size: 1.4rem;
  margin-bottom: 0.35em;
}

.bento__cell p {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.bento__cell--rose {
  background: var(--wash-rose);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bento__cell--sage {
  background: var(--wash-sage);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bento__cell--wide img {
  max-height: 220px;
}

@media (min-width: 700px) {
  .bento__grid {
    grid-template-columns: 1fr 1fr;
  }

  .bento__cell--wide {
    grid-column: span 2;
    display: flex;
    align-items: center;
    gap: 2.5rem;
  }

  .bento__cell--wide img {
    flex: 0 0 auto;
    max-height: 240px;
    margin-bottom: 0;
  }

  .bento__cell-text {
    flex: 1;
    min-width: 0;
  }
}

/* ---------- Theme gallery ---------- */

.gallery {
  background: var(--wash);
  border-block: 1px solid var(--hairline);
}

.gallery__strip {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 2.25rem max(1.25rem, calc((100vw - 1140px) / 2)) 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
}

.gallery__card {
  flex: 0 0 auto;
  width: 160px;
  scroll-snap-align: start;
  background: var(--ivory);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 1.1rem 0.9rem 0.9rem;
  text-align: center;
  transition: transform 0.3s ease;
}

.gallery__card:hover {
  transform: translateY(-4px);
}

.gallery__card img {
  height: 118px;
  width: 100%;
  object-fit: contain;
  margin-bottom: 0.7rem;
}

.gallery__card figcaption {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
}

/* ---------- Assistant band ---------- */

.band__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
}

.band__portrait {
  width: 220px;
}

.band__text {
  max-width: 34rem;
}

.band__text p {
  color: var(--ink-soft);
}

@media (min-width: 768px) {
  .band__container {
    flex-direction: row;
    justify-content: center;
    gap: 4rem;
    text-align: left;
  }
}

/* ---------- Collaboration ---------- */

.duet {
  background: var(--wash);
  border-block: 1px solid var(--hairline);
}

.duet__art {
  width: min(320px, 70vw);
  margin: 0 auto 1.5rem;
}

.duet__text {
  color: var(--ink-soft);
  max-width: 40ch;
  margin-inline: auto;
}

/* ---------- Wedding Report teaser ---------- */

.report__text {
  color: var(--ink-soft);
  max-width: 52ch;
  margin-inline: auto;
}

.report__link {
  margin-top: 1.25rem;
  font-weight: 500;
}

.report__link a::after {
  content: " \2192";
}

/* ---------- FAQ ---------- */

.faq__container {
  max-width: 720px;
}

.faq .section__heading {
  margin-bottom: 1.25em;
}

.faq__item {
  border-bottom: 1px solid var(--hairline);
}

.faq__item:first-of-type {
  border-top: 1px solid var(--hairline);
}

.faq__item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0;
  font-weight: 500;
  font-size: 1.05rem;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary::after {
  content: "+";
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold);
  line-height: 1;
  transition: transform 0.3s ease;
}

.faq__item[open] summary::after {
  transform: rotate(45deg);
}

.faq__item p {
  color: var(--ink-soft);
  padding-bottom: 1.25rem;
  max-width: 62ch;
}

/* ---------- Final CTA ---------- */

.cta {
  background: var(--wash-rose);
  border-top: 1px solid var(--hairline);
  padding-block: 5rem;
}

.cta__rings {
  width: 140px;
  margin: 0 auto 0.75rem;
}

.cta__heading {
  font-size: clamp(2.2rem, 7vw, 3rem);
  margin-bottom: 0.3em;
}

.cta p {
  color: var(--ink-soft);
  margin-bottom: 1.75rem;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--hairline);
  padding-block: 3.5rem 2.5rem;
  background: var(--ivory);
}

.footer__content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.25rem;
}

.footer__heading {
  font-size: 1.5rem;
  margin-bottom: 0.5em;
}

.footer__subheading {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.9em;
}

.footer__description {
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 34ch;
}

.footer__links li {
  margin-bottom: 0.5rem;
}

.footer__link {
  color: var(--ink-soft);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.footer__link:hover {
  color: var(--ink);
}

.footer__bottom {
  border-top: 1px solid var(--hairline);
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  display: grid;
  gap: 1.25rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.footer__copyright {
  color: var(--muted);
}

/* Entity details live on the legal pages; here they stay collapsed and muted */
.footer__legal {
  margin-top: 0.6rem;
}

.footer__legal summary {
  cursor: pointer;
  width: fit-content;
  color: var(--muted);
  font-size: 0.8rem;
}

.footer__legal summary:hover {
  color: var(--ink-soft);
}

.footer__legal p {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .footer__content {
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  }

  .footer__bottom {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Legal pages (privacy, terms, delete-account) ---------- */

.legal-page {
  max-width: 820px;
  margin-inline: auto;
  padding: 3rem 1.25rem 4.5rem;
}

.legal-page h1 {
  font-size: clamp(2rem, 6vw, 2.6rem);
  margin-bottom: 0.4em;
}

.legal-page h2 {
  font-size: 1.5rem;
  margin: 1.6em 0 0.5em;
}

.legal-page h3 {
  font-size: 1.2rem;
  margin: 1.2em 0 0.4em;
}

.legal-page p,
.legal-page li {
  color: var(--ink-soft);
  margin-bottom: 0.75em;
}

.legal-page ul {
  list-style: disc;
  padding-left: 1.4rem;
  margin-bottom: 1em;
}

.last-updated {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.legal-section {
  margin-bottom: 1.5rem;
}

.contact-info {
  background: var(--wash);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 2rem;
}

/* Developer docs (/developers/): code, tables and an in-page nav on the legal-page shell */
.docs-page {
  max-width: 900px;
}

.docs-page code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: var(--wash);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 0.1em 0.4em;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.docs-page pre {
  background: var(--wash);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  margin: 0.75em 0 1.25em;
  overflow-x: auto;
  line-height: 1.5;
}

.docs-page pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
  white-space: pre;
  overflow-wrap: normal;
}

.docs-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
  margin: 1.5rem 0 0.5rem;
}

.docs-toc a {
  font-size: 0.85rem;
  color: var(--ink-soft);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.docs-toc a:hover {
  color: var(--ink);
  border-color: var(--gold);
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75em 0 1.25em;
  font-size: 0.93rem;
}

.docs-table th,
.docs-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink-soft);
}

.docs-table thead th {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--hairline);
}

.docs-table tbody th {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  width: 11rem;
}

.docs-table td:first-child code {
  white-space: nowrap;
}

.docs-note {
  font-size: 0.88rem;
  color: var(--muted);
}

@media (max-width: 640px) {
  .docs-table tbody th {
    width: auto;
    white-space: normal;
  }
  .docs-table th,
  .docs-table td {
    padding: 0.5rem 0.4rem;
  }
}

@media (min-width: 820px) {
  .section {
    padding-block: 5.5rem;
  }
}

/* Footer language links: one crawlable link per language version of the landing page */
.lang-switcher {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1rem;
  font-size: 0.85rem;
}

.lang-switcher__label {
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.lang-switcher__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.lang-switcher a {
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.lang-switcher a:hover {
  color: var(--ink);
}

.lang-switcher a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* ---------- Tools and guides (pages built by scripts/build-content.mjs) ---------- */

.container--narrow {
  width: min(760px, 100%);
}

.draft-banner {
  background: var(--wash-rose);
  border-bottom: 1px solid var(--rose);
  color: var(--ink);
  font-size: 0.9rem;
  text-align: center;
  padding: 0.55rem 1rem;
}

.nav__desktop-link[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 6px;
}

.page-head {
  padding-top: 2.5rem;
  padding-bottom: 1.5rem;
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.crumbs li + li::before {
  content: "/";
  margin-right: 0.35rem;
  color: var(--hairline);
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--ink);
}

.page-head__title {
  font-size: clamp(2.1rem, 7vw, 3.1rem);
  letter-spacing: -0.01em;
  margin-bottom: 0.4em;
}

.page-head__lede {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 56ch;
}

.page-head__meta {
  margin-top: 0.9rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.prose {
  padding-bottom: 3rem;
}

.prose > h2 {
  font-size: clamp(1.6rem, 4.5vw, 2rem);
  margin: 2.2em 0 0.5em;
}

.prose > h3 {
  font-size: 1.3rem;
  margin: 1.6em 0 0.4em;
}

.prose > p,
.prose > ul,
.prose > ol,
.prose > blockquote {
  color: var(--ink-soft);
  margin-bottom: 1em;
  max-width: 68ch;
}

.prose > ul {
  list-style: disc;
  padding-left: 1.3rem;
}

.prose > ol {
  padding-left: 1.4rem;
}

.prose li {
  margin-bottom: 0.45em;
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

.prose blockquote {
  border-left: 2px solid var(--gold);
  padding: 0.2rem 0 0.2rem 1.1rem;
  font-style: italic;
}

.table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0 1.5rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.table-wrap th,
.table-wrap td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--hairline);
}

.table-wrap th {
  background: var(--wash);
  font-weight: 600;
  color: var(--ink);
}

.table-wrap tr:last-child td {
  border-bottom: 0;
}

.table-wrap td {
  color: var(--ink-soft);
}

/* Tool widgets */
.tool {
  background: var(--wash);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 1.4rem;
  margin: 0.5rem 0 2rem;
}

.tool__form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.9rem 1rem;
}

.tool__field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1 1 12rem;
}

.tool__label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
}

/* Inputs and selects share one height, border and radius. Safari draws native selects and date
   fields at its own size and ignores min-height, so both drop the native look (appearance: none)
   and the select gets its own chevron. */
.tool__field input,
.tool__field select {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  font: inherit;
  line-height: 1.25;
  color: var(--ink);
  background-color: var(--ivory);
  border: 1px solid #D9CFC3;
  border-radius: var(--radius-sm);
  padding: 0 0.9rem;
  height: 3rem;
  width: 100%;
  margin: 0;
}

.tool__field select {
  padding-right: 2.6rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235C5854' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px 8px;
}

/* Safari: keep the date text left-aligned and vertically centred inside the fixed height. */
.tool__field input[type="date"]::-webkit-date-and-time-value {
  text-align: left;
  margin: 0;
}

.tool__field input[type="date"]::-webkit-datetime-edit {
  padding: 0;
}

.tool__field input:focus-visible,
.tool__field select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.tool__error {
  flex-basis: 100%;
  color: #9B3B3B;
  font-size: 0.9rem;
}

.btn-ink,
.btn-line {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 999px;
  padding: 0 1.4rem;
  height: 3rem;
  box-sizing: border-box;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-ink {
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
}

.btn-ink:hover {
  background: #423c37;
}

.btn-line {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.btn-line:hover {
  background: var(--ivory);
}

.tool__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

.tool__actions[hidden] {
  display: none;
}

/* Checklist */
.checklist__result {
  margin-top: 1.4rem;
}

.checklist__summary {
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}

.checklist__period {
  margin-top: 1.4rem;
}

.checklist__period h3 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.6rem;
}

.checklist__due {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}

.checklist__period--catchup {
  background: var(--wash-rose);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem 0.6rem;
}

.checklist__hint {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 0.6rem;
}

.checklist__tasks li {
  display: flex;
  gap: 0.7rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--hairline);
}

.checklist__tasks li:last-child {
  border-bottom: 0;
}

/* A dot on screen (ticking things off is the app's job); an empty box on paper. */
.checklist__box {
  flex: none;
  width: 0.45rem;
  height: 0.45rem;
  margin-top: 0.62rem;
  background: var(--gold);
  border-radius: 50%;
}

.checklist__task {
  color: var(--ink);
}

.checklist__only {
  font-size: 0.85rem;
  color: var(--muted);
}

.checklist__note {
  display: block;
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-top: 0.15rem;
}

/* Hubs and related links */
.hub {
  display: grid;
  gap: 0.9rem;
  margin: 0.5rem 0 1.5rem;
}

.hub__item a {
  display: block;
  background: var(--wash);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 1.15rem 1.3rem;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.hub__item a:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.hub__title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 0.3rem;
}

.hub__desc {
  display: block;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.hub__group h2 {
  font-size: 1.6rem;
  margin: 1.5em 0 0.4em;
}

.related {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
}

.related h2 {
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
}

.related ul {
  list-style: none;
}

.related li {
  margin-bottom: 0.4rem;
}

/* App box at the end of every tool and guide */
.app-box {
  text-align: center;
  background: var(--wash-sage);
  border-radius: var(--radius);
  padding: 2.2rem 1.4rem;
  width: auto;
  max-width: 720px;
  margin: 0 1.25rem 4rem;
}

@media (min-width: 770px) {
  .app-box {
    margin-inline: auto;
  }
}

.app-box__title {
  font-size: clamp(1.6rem, 4.5vw, 2rem);
  margin-bottom: 0.4em;
}

.app-box p {
  color: var(--ink-soft);
  max-width: 48ch;
  margin: 0 auto 1.2rem;
}

@media (min-width: 700px) {
  .tool {
    padding: 1.8rem 2rem;
  }

  .app-box {
    padding: 2.6rem 3rem;
  }
}

/* Cost estimator */
.cost__result h3 {
  font-size: 1.5rem;
  margin: 1.4rem 0 0.4rem;
}

.cost__note {
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}

.cost__basis {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
}

.cost__total td {
  font-weight: 600;
  color: var(--ink);
  background: var(--wash);
}

.cost__sources {
  margin-top: 1.4rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* Sources are collapsed by default; the summary carries a chevron that turns when opened. */
.cost__sources summary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink);
  padding: 0.25rem 0;
}

.cost__sources summary::-webkit-details-marker {
  display: none;
}

.cost__sources summary::after {
  content: "";
  width: 12px;
  height: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235C5854' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
  transition: transform 0.2s ease;
}

.cost__sources[open] summary::after {
  transform: rotate(180deg);
}

.cost__sources summary:hover {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
}

.cost__sources-body {
  padding-top: 0.3rem;
}

.cost__sources ul {
  list-style: disc;
  padding-left: 1.2rem;
}

.cost__sources-country {
  font-weight: 600;
  margin-top: 0.5rem;
}

/* Printing a tool page gives the result only: no navigation, form, app box or footer. */
@media print {
  .nav,
  .footer,
  .app-box,
  .draft-banner,
  .crumbs,
  .tool__form,
  .tool__actions,
  .related,
  .page-head__meta {
    display: none !important;
  }

  body {
    background: #fff;
    font-size: 11pt;
  }

  .content-page .prose > :not(.tool) {
    display: none;
  }

  .tool {
    border: 0;
    background: none;
    padding: 0;
    margin: 0;
  }

  .page-head {
    padding: 0 0 0.5rem;
  }

  .page-head__lede {
    display: none;
  }

  .checklist__period {
    break-inside: avoid-page;
  }

  .checklist__period--catchup {
    background: none;
    border: 1px solid #999;
  }

  .checklist__tasks li {
    break-inside: avoid;
    padding: 0.25rem 0;
  }

  .checklist__box {
    width: 0.9rem;
    height: 0.9rem;
    margin-top: 0.2rem;
    background: none;
    border: 1px solid #555;
    border-radius: 2px;
  }
}
