/* Toscapartment — visual identity
   Palette drawn from the region itself rather than generic "elegant site"
   defaults: limewashed plaster walls, cypress green, terracotta roof tile,
   Chianti wine, ripe wheat gold. */

:root {
  --plaster: #F1E6D2;
  --plaster-deep: #E7D8BA;
  --ink: #2E271E;
  --ink-soft: #5B5040;
  --cypress: #33422E;
  --cypress-deep: #232E1F;
  --terracotta: #BD5B34;
  --terracotta-deep: #9A4527;
  --wine: #6E1F2A;
  --gold: #B4832E;
  --line: rgba(46, 39, 30, 0.14);

  --serif: "Fraunces", Georgia, serif;
  --sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--plaster);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
}

a { color: inherit; }

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

.hero {
  position: relative;
  min-height: 66vh;
  display: flex;
  align-items: flex-end;
  background-image: url("https://images.unsplash.com/photo-1759955392586-3ab03e4285ef?fm=jpg&q=70&w=2200&auto=format&fit=crop");
  background-size: cover;
  background-position: center 60%;
  padding: 3rem 1.5rem 2.75rem;
  animation: hero-reveal 1.1s ease-out;
}

@keyframes hero-reveal {
  from { opacity: 0; transform: scale(1.03); }
  to   { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .hero { animation: none; }
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(35, 46, 31, 0.25) 0%, rgba(35, 46, 31, 0.55) 55%, rgba(23, 30, 20, 0.88) 100%);
}

.hero__inner {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  color: var(--plaster);
  text-align: left;
}

.hero__kicker {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  margin: 0 0 0.6rem;
  color: #E9C77D;
}

.hero__title {
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(1.9rem, 4.4vw, 3.1rem);
  line-height: 1.12;
  margin: 0 0 1rem;
}

.hero__sub {
  font-size: 1.02rem;
  max-width: 46ch;
  color: rgba(241, 230, 210, 0.88);
  margin: 0 0 1.6rem;
}

.hero__ticker {
  font-size: 0.85rem;
  color: rgba(241, 230, 210, 0.75);
  border-top: 1px solid rgba(241, 230, 210, 0.3);
  padding-top: 0.8rem;
  display: inline-block;
}

#countdown { font-variant-numeric: tabular-nums; color: #E9C77D; }

/* ---------- Stats ---------- */

.stats {
  max-width: 980px;
  margin: -2.4rem auto 0;
  position: relative;
  background: var(--plaster);
  border: 1px solid var(--line);
  border-radius: 4px;
  display: flex;
  flex-wrap: wrap;
  padding: 1.4rem 1.8rem;
  gap: 2.4rem;
  box-shadow: 0 10px 30px rgba(35, 46, 31, 0.14);
}

.stats__item { display: flex; flex-direction: column; }

.stats__num {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--terracotta-deep);
}

.stats__label {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* ---------- About ---------- */

.about {
  max-width: 700px;
  margin: 1.8rem auto 0;
  padding: 0 1.5rem;
  color: var(--ink-soft);
  font-size: 0.94rem;
  text-align: center;
}

.about__note {
  margin-top: 0.7rem;
  font-size: 0.85rem;
}

/* ---------- Province map (real boundaries, see map_data.py) ---------- */

.province-map-wrap {
  max-width: 460px;
  margin: 1.6rem auto 0;
  padding: 0 1.5rem;
}

.province-map {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(35, 46, 31, 0.14));
}

/* Each province is a link: click it to filter the listings to it */
.province-map__item { cursor: pointer; }

.province-map__shape {
  fill: var(--plaster-deep);
  stroke: #fff;
  stroke-width: 1.2;
  stroke-linejoin: round;
  transition: fill 0.15s ease;
}

.province-map__item--active .province-map__shape {
  fill: var(--terracotta);
}

.province-map__item:hover .province-map__shape {
  fill: var(--gold);
}

.province-map__item--selected .province-map__shape {
  fill: var(--cypress);
  stroke: #E9C77D;
  stroke-width: 2;
}

.province-map__label {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  fill: var(--ink-soft);
  pointer-events: none;                 /* clicks fall through to the shape */
  paint-order: stroke fill;            /* white halo keeps text legible on any fill */
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.province-map__label--active {
  fill: var(--ink);
}

.province-map__count {
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 560;
}

/* ---------- Filters ---------- */

.filters {
  max-width: 980px;
  margin: 1.8rem auto 0.5rem;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.filters__group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filters__pill {
  text-decoration: none;
  font-size: 0.88rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--cypress);
  border-radius: 999px;
  color: var(--cypress);
}

.filters__pill.is-active {
  background: var(--cypress);
  color: var(--plaster);
}

.filters__pill--ghost {
  border-color: var(--gold);
  color: var(--gold);
  font-size: 0.82rem;
}

.filters__pill--ghost.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

.filters__pill--empty {
  opacity: 0.45;
}

.filters__pill--type {
  border-color: var(--wine);
  color: var(--wine);
  font-size: 0.82rem;
}

.filters__pill--type.is-active {
  background: var(--wine);
  border-color: var(--wine);
  color: #fff;
}

.filters__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.3rem;
}

.filters__sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.filters__sort-label {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.filters__sort-select {
  font-family: var(--sans);
  font-size: 0.85rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--cypress);
  border-radius: 999px;
  background: var(--plaster);
  color: var(--cypress);
  cursor: pointer;
}

/* ---------- Listings ---------- */

.listings {
  max-width: 980px;
  margin: 1.5rem auto 3rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--terracotta);
  border-radius: 3px;
  padding: 1.1rem 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: border-left-color 0.15s ease;
  overflow: hidden;
}

.card__img {
  height: 120px;
  margin: -1.1rem -1.2rem 0.6rem;   /* bleed to card edges, above the padding */
  background-size: cover;
  background-position: center;
  position: relative;
}

.card__img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(35,46,31,0) 40%, rgba(35,46,31,0.55) 100%);
}

.card__img-label {
  position: absolute;
  left: 0.7rem;
  bottom: 0.5rem;
  z-index: 1;
  color: #fff;
  font-family: var(--serif);
  font-size: 0.95rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.card:hover {
  border-left-color: var(--wine);
}

.card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card__price {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--gold);
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.card__price-eur {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.card__badge {
  font-size: 0.72rem;
  background: var(--wine);
  color: var(--plaster);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}

.card__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.1rem;
  margin: 0.1rem 0 0;
}

.card__meta {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0;
}

.card__desc {
  font-size: 0.92rem;
  margin: 0.3rem 0 0.4rem;
}

.card__link {
  margin-top: auto;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--cypress);
  border-top: 1px solid var(--line);
  padding-top: 0.6rem;
}

.card__link:hover { color: var(--terracotta-deep); }

.empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--ink-soft);
  padding: 2rem 0;
}

/* ---------- Weather footer ---------- */

.weather {
  background: var(--cypress-deep);
  color: var(--plaster);
  padding: 2.4rem 1.5rem 1.8rem;
}

.weather__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.3rem;
  max-width: 980px;
  margin: 0 auto 1.2rem;
}

.weather__row {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  border-top: 1px solid rgba(241, 230, 210, 0.18);
  padding-top: 1.2rem;
}

.weather__city {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.weather__name {
  font-size: 0.85rem;
  color: #E9C77D;
}

.weather__temp {
  font-family: var(--serif);
  font-size: 1.6rem;
}

.weather__desc { font-size: 0.85rem; color: rgba(241, 230, 210, 0.85); }
.weather__range { font-size: 0.78rem; color: rgba(241, 230, 210, 0.6); }

/* ---------- Taste of Tuscany (food & wine) ---------- */

.taste {
  background: var(--plaster-deep);
  border-top: 1px solid var(--line);
  padding: 2.6rem 1.5rem 2.8rem;
}

.taste__title {
  font-family: var(--serif);
  font-weight: 560;
  font-size: 1.5rem;
  max-width: 980px;
  margin: 0 auto 0.4rem;
  color: var(--terracotta-deep);
}

.taste__intro {
  max-width: 980px;
  margin: 0 auto 1.8rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.taste__grid {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.2rem;
}

.taste__col-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.05rem;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold);
  display: inline-block;
}

.taste__item {
  margin-bottom: 1.2rem;
}

.taste__item-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 3px;
  margin-bottom: 0.6rem;
  display: block;
}

.taste__item h4 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1rem;
  margin: 0 0 0.3rem;
  color: var(--cypress);
}

.taste__item p {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.taste__item-link {
  font-size: 0.8rem;
  color: var(--terracotta-deep);
  text-decoration: none;
  font-weight: 600;
}

.taste__item-link:hover {
  color: var(--wine);
}

/* ---------- Site footer ---------- */

.site-footer {
  background: var(--cypress-deep);
  padding: 1.2rem 1.5rem;
}

.site-footer__credit {
  max-width: 980px;
  margin: 0 auto;
  font-size: 0.72rem;
  color: rgba(241, 230, 210, 0.5);
}



/* ---------- Top nav ---------- */

.topnav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.5rem;
  background: var(--cypress-deep);
  color: var(--plaster);
}

.topnav__brand {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: #E9C77D;
  text-decoration: none;
}

.topnav__links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-size: 0.85rem;
}

.topnav__links a {
  color: var(--plaster);
  text-decoration: none;
}

.topnav__links a:hover { color: #E9C77D; }

.topnav__cta {
  border: 1px solid #E9C77D;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  color: #E9C77D !important;
}

.topnav__email {
  color: rgba(241, 230, 210, 0.7);
}

.site-footer__lang {
  max-width: 980px;
  margin: 0.8rem auto 0;
  display: flex;
  gap: 1.2rem;
}

.site-footer__lang-link {
  font-size: 0.85rem;
  color: rgba(241, 230, 210, 0.55);
  text-decoration: none;
}

.site-footer__lang-link--active {
  color: #E9C77D;
  font-weight: 600;
}

/* ---------- Auth pages (login / register / profile) ---------- */

.auth-body {
  margin: 0;
  background: var(--plaster);
  font-family: var(--sans);
  color: var(--ink);
  min-height: 100vh;
}

.auth-page {
  display: flex;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.auth-card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--terracotta);
  border-radius: 4px;
  padding: 2rem 2rem 2.2rem;
  max-width: 420px;
  width: 100%;
}

.auth-card__title {
  font-family: var(--serif);
  font-weight: 560;
  font-size: 1.6rem;
  margin: 0 0 0.5rem;
}

.auth-card__sub {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0 0 1.4rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.auth-form input,
.auth-form select {
  font-family: var(--sans);
  font-size: 0.95rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink);
  background: var(--plaster);
}

.auth-checkbox {
  flex-direction: row !important;
  align-items: center;
  gap: 0.6rem !important;
  font-size: 0.9rem !important;
  color: var(--ink) !important;
}

.auth-checkbox input { width: auto; }

.auth-submit {
  margin-top: 0.4rem;
  background: var(--cypress);
  color: var(--plaster);
  border: none;
  border-radius: 3px;
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
  font-family: var(--sans);
  font-weight: 600;
  cursor: pointer;
}

.auth-submit:hover { background: var(--cypress-deep); }

.auth-alt {
  margin-top: 1.3rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: center;
}

.auth-error {
  background: rgba(110, 31, 42, 0.08);
  color: var(--wine);
  border: 1px solid rgba(110, 31, 42, 0.25);
  border-radius: 3px;
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  margin: 0 0 1rem;
}

.auth-success {
  background: rgba(51, 66, 46, 0.08);
  color: var(--cypress);
  border: 1px solid rgba(51, 66, 46, 0.25);
  border-radius: 3px;
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  margin: 0 0 1rem;
}

/* ==========================================================================
   Mobile — a deliberate pass over every section, not just a few tweaks.
   Same URL, same content; the layout re-flows for a ~375–430px phone.
   ========================================================================== */

@media (max-width: 600px) {

  /* Prevent iOS from inflating text sizes on orientation change */
  html { -webkit-text-size-adjust: 100%; }

  /* --- Top nav: compact, sticky so "Registrer deg" is always reachable --- */
  .topnav {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 0.7rem 1rem;
  }
  .topnav__brand { font-size: 0.95rem; }
  .topnav__links { gap: 0.8rem; font-size: 0.8rem; }
  .topnav__cta { padding: 0.45rem 0.8rem; }

  /* --- Hero: shorter, tighter --- */
  .hero {
    min-height: 52vh;
    padding: 2rem 1.2rem 1.8rem;
    background-position: center 55%;
  }
  .hero__title { font-size: 1.75rem; line-height: 1.15; }
  .hero__sub { font-size: 0.95rem; }
  .hero__ticker { font-size: 0.78rem; }

  /* --- Stats: three compact columns in one row instead of wrapping --- */
  .stats {
    margin: -1.4rem 1rem 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    padding: 0.9rem 0.8rem;
    text-align: center;
  }
  .stats__num { font-size: 1.5rem; }
  .stats__label { font-size: 0.7rem; line-height: 1.25; }

  /* --- About: left-aligned reads better than centered on narrow screens --- */
  .about {
    margin-top: 1.4rem;
    padding: 0 1.2rem;
    text-align: left;
    font-size: 0.92rem;
  }
  .about__note { font-size: 0.84rem; }

  /* --- Province map: a touch smaller, with breathing room --- */
  .province-map-wrap {
    max-width: 320px;
    margin: 1.2rem auto 0;
    padding: 0 1.2rem;
  }

  /* --- Filters: horizontally swipeable chip rows instead of a tall wrapped block --- */
  .filters {
    margin: 1.4rem 0 0.4rem;
    padding: 0;
    gap: 0.5rem;
  }
  .filters__group {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.2rem 1.2rem;
    gap: 0.45rem;
  }
  .filters__group::-webkit-scrollbar { display: none; }
  .filters__pill {
    flex: 0 0 auto;          /* never shrink, never wrap — they scroll */
    white-space: nowrap;
    padding: 0.55rem 0.95rem; /* ~44px tall: comfortable thumb target */
    font-size: 0.86rem;
  }

  /* --- Listings: single column, tighter card padding --- */
  .listings {
    margin: 1.2rem auto 2.4rem;
    padding: 0 1.2rem;
    gap: 0.9rem;
  }
  .card { padding: 1rem 1rem 1.1rem; }
  .card__price { font-size: 1.2rem; }
  .card__title { font-size: 1.05rem; }
  .card__link { padding: 0.75rem 0 0.1rem; } /* bigger tap area */

  /* --- Weather: three per row, compact --- */
  .weather { padding: 1.8rem 1.2rem 1.4rem; }
  .weather__title { font-size: 1.15rem; }
  .weather__row {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem 0.6rem;
  }
  .weather__temp { font-size: 1.35rem; }
  .weather__desc { font-size: 0.78rem; }
  .weather__range { font-size: 0.72rem; }

  /* --- Food & wine: single column, shorter images --- */
  .taste { padding: 1.8rem 1.2rem 2rem; }
  .taste__title { font-size: 1.3rem; }
  .taste__intro { font-size: 0.88rem; margin-bottom: 1.2rem; }
  .taste__grid { gap: 1.6rem; }
  .taste__item-img { height: 150px; }

  /* --- Footer --- */
  .site-footer { padding: 1rem 1.2rem 1.4rem; }
  .site-footer__credit { font-size: 0.68rem; line-height: 1.5; }
  .site-footer__lang { gap: 1rem; }
  .site-footer__lang-link { font-size: 0.9rem; padding: 0.3rem 0; } /* tappable */

  /* --- Auth pages --- */
  .auth-page { padding: 1.5rem 1rem; }
  .auth-card { padding: 1.5rem 1.2rem 1.7rem; }
  .auth-card__title { font-size: 1.4rem; }
  /* 16px minimum stops iOS Safari from auto-zooming into form fields */
  .auth-form input,
  .auth-form select { font-size: 16px; padding: 0.7rem 0.75rem; }
  .auth-submit { padding: 0.85rem 1rem; font-size: 1rem; }
}

/* Tablets: keep the desktop layout but ease the horizontal padding */
@media (min-width: 601px) and (max-width: 900px) {
  .listings { grid-template-columns: repeat(2, 1fr); }
  .hero__title { font-size: 2.4rem; }
}

/* ---------- Cookie consent banner (GA4) ---------- */

.consent-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.8rem 1.2rem;
  padding: 0.9rem 1.4rem;
  background: var(--cypress-deep);
  color: var(--plaster);
  font-size: 0.86rem;
  box-shadow: 0 -4px 16px rgba(35, 46, 31, 0.25);
}

.consent-banner__text { max-width: 60ch; }

.consent-banner__buttons { display: flex; gap: 0.6rem; }

.consent-banner__btn {
  font-family: var(--sans);
  font-size: 0.85rem;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(241, 230, 210, 0.5);
  background: transparent;
  color: var(--plaster);
  cursor: pointer;
}

.consent-banner__btn--yes {
  background: #E9C77D;
  border-color: #E9C77D;
  color: var(--ink);
  font-weight: 600;
}

.consent-banner__btn:hover { border-color: #E9C77D; }

/* ---------- Pagination ---------- */

.pagination {
  max-width: 980px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
}

.pagination__link {
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--cypress);
  border: 1px solid var(--cypress);
  border-radius: 999px;
  padding: 0.5rem 1.2rem;
  white-space: nowrap;
}

.pagination__link:hover { background: var(--cypress); color: var(--plaster); }

.pagination__link--disabled {
  color: var(--line);
  border-color: var(--line);
  cursor: default;
}

.pagination__link--disabled:hover { background: none; color: var(--line); }

.pagination__status {
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.pagination__numbers {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.pagination__num {
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--cypress);
  border: 1px solid transparent;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}

.pagination__num:hover { border-color: var(--cypress); }

.pagination__num--current {
  background: var(--cypress);
  color: var(--plaster);
  font-weight: 600;
}

.pagination__ellipsis {
  color: var(--ink-soft);
  padding: 0 0.2rem;
}

/* ---------- Buying guide page ---------- */

.guide {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

.guide__back {
  font-size: 0.85rem;
  color: var(--cypress);
  text-decoration: none;
}

.guide__title {
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--terracotta-deep);
  margin: 0.8rem 0 0.6rem;
}

.guide__intro {
  font-size: 1rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0 0 1rem;
}

.guide__section { margin-top: 2.4rem; }

.guide__h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.4rem;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 0.4rem;
  display: inline-block;
  margin: 0 0 1.2rem;
}

.guide__steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
}

.guide__step {
  counter-increment: step;
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.4rem;
}

.guide__step::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--cypress);
  color: var(--plaster);
  font-family: var(--serif);
  display: flex;
  align-items: center;
  justify-content: center;
}

.guide__step-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.08rem;
  margin: 0.2rem 0 0.3rem;
}

.guide__step-desc {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.guide__docs {
  padding-left: 1.2rem;
  color: var(--ink-soft);
  line-height: 1.8;
}

/* Calculator */

.calc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
  background: var(--plaster-deep);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.4rem;
}

.calc__controls { display: flex; flex-direction: column; gap: 0.9rem; }

.calc__field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.calc__field input,
.calc__field select {
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
}

.calc__check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.calc__note {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin: 0.2rem 0 0;
  line-height: 1.4;
}

.calc__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  align-self: start;
}

.calc__table td { padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.calc__num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.calc__total-row td {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--terracotta-deep);
  padding-top: 0.7rem;
  border-bottom: none;
}

.calc__extra-row td {
  font-size: 0.82rem;
  color: var(--ink-soft);
  border-bottom: none;
  padding-top: 0.1rem;
}

.calc__disclaimer {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 0.9rem;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .calc { grid-template-columns: 1fr; gap: 1.2rem; }
  .calc__field input, .calc__field select { font-size: 16px; }
}
