:root {
  color-scheme: light;
  --ink: #20342d;
  --ink-soft: #4b5d54;
  --paper: #faf8f2;
  --paper-deep: #f0ece1;
  --white: #fffefa;
  --green: #1c4b3b;
  --green-light: #e6eee6;
  --terracotta: #a44f35;
  --ochre: #d0a04a;
  --line: #d9d8ca;
  --alert: #f7e9df;
  --max: 1160px;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 1rem; line-height: 1.7; }
a { color: var(--green); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--terracotta); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 3px; }
button, input, select { font: inherit; }
img, svg { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.16; letter-spacing: -.025em; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
h1 { max-width: 15ch; font-size: clamp(2.6rem, 6vw, 5.2rem); }
h2 { max-width: 23ch; margin-bottom: 1rem; font-size: clamp(1.85rem, 3.4vw, 3rem); }
h3 { margin-bottom: .55rem; font-size: 1.23rem; }
p { max-width: 72ch; }
::selection { color: var(--white); background: var(--green); }

.skip-link { position: absolute; z-index: 5; top: .5rem; left: .5rem; padding: .6rem .9rem; transform: translateY(-160%); color: var(--white); background: var(--green); }
.skip-link:focus { transform: translateY(0); }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 2rem; width: min(var(--max), calc(100% - 3rem)); min-height: 92px; margin: auto; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: 1.02rem; font-weight: 700; line-height: 1.05; text-decoration: none; }
.brand-mark { display: grid; width: 2.55rem; height: 2.55rem; place-items: center; border: 1px solid var(--green); border-radius: 50%; color: var(--green); font: 700 .73rem/1 "Segoe UI", sans-serif; letter-spacing: .07em; }
.site-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem 1.65rem; }
.site-nav a { color: var(--ink-soft); font-size: .94rem; text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--green); font-weight: 700; text-decoration: underline; text-underline-offset: .45rem; }

.hero { width: min(var(--max), calc(100% - 3rem)); margin: 0 auto; }
.hero-home { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(240px, .75fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; min-height: 510px; padding: 5.5rem 0 5rem; }
.hero-copy { max-width: 720px; }
.hero-copy h1 { margin-bottom: 1.35rem; }
.lede { max-width: 65ch; color: var(--ink-soft); font-size: clamp(1.1rem, 1.6vw, 1.33rem); line-height: 1.65; }
.eyebrow, .card-index, .note-kicker { color: var(--terracotta); font-size: .76rem; font-weight: 750; letter-spacing: .12em; line-height: 1.4; text-transform: uppercase; }
.eyebrow { margin-bottom: .9rem; }
.button-row, .form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin-top: 1.8rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .75rem 1.15rem; border: 1px solid transparent; border-radius: 3px; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer; }
.button-primary { color: var(--white); background: var(--green); }
.button-primary:hover { color: var(--white); background: #143a2d; }
.button-secondary { color: var(--green); border-color: var(--green); background: transparent; }
.button-secondary:hover { color: var(--white); background: var(--green); }
.button-quiet { color: var(--ink-soft); border-color: var(--line); background: transparent; }
.button-quiet:hover { background: var(--paper-deep); }
.hero-note { position: relative; padding: 2rem 1.8rem 1.3rem; border-top: 3px solid var(--ochre); background: var(--paper-deep); }
.hero-note p { margin: .75rem 0 1.2rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.34rem; line-height: 1.35; }
.note-rule { display: block; width: 3rem; height: 1px; margin: 1.5rem 0; background: var(--terracotta); }

.section { padding: 5rem max(1.5rem, calc((100% - var(--max)) / 2)); }
.section-narrow { padding-right: max(1.5rem, calc((100% - 900px) / 2)); padding-left: max(1.5rem, calc((100% - 900px) / 2)); }
.section-first { padding-top: 1rem; }
.section-tinted { background: var(--paper-deep); }
.section-heading { margin: 0 auto 2rem; }
.section-heading > p:not(.eyebrow) { color: var(--ink-soft); }
.decision-list { margin-top: 2.4rem; border-top: 1px solid var(--line); }
.decision-item { display: grid; grid-template-columns: 4.5rem 1fr; gap: 1rem; padding: 1.45rem 0; border-bottom: 1px solid var(--line); }
.decision-number { padding-top: .2rem; color: var(--terracotta); font-family: Georgia, "Times New Roman", serif; font-size: 1.55rem; }
.decision-item h3 { margin-bottom: .35rem; }
.decision-item p { margin-bottom: 0; color: var(--ink-soft); }
.link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.link-card { display: flex; min-height: 250px; flex-direction: column; align-items: flex-start; padding: 1.8rem; color: var(--ink); background: var(--paper); text-decoration: none; }
.link-card:hover { color: var(--ink); background: var(--white); }
.link-card h3 { margin-top: 1rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.55rem; font-weight: 500; }
.link-card p { color: var(--ink-soft); }
.text-link { margin-top: auto; color: var(--green); font-weight: 700; }
.callout { padding: 1.6rem 1.8rem; border-left: 4px solid var(--green); background: var(--green-light); }
.callout h2 { font-size: clamp(1.5rem, 2.5vw, 2.15rem); }
.callout p:last-child { margin-bottom: 0; }
.callout-green { padding: 2rem; }
.callout-ochre { margin-top: 2rem; border-color: var(--ochre); background: #f4efdf; }
.callout-alert { margin: 2rem 0; border-color: var(--terracotta); background: var(--alert); }
.callout-compact { margin: 1.5rem 0; padding: 1.2rem 1.35rem; }
.small-note, .page-date, .footer-meta { color: #59675f; font-size: .88rem; }
.small-note { margin-top: .85rem; }

.article-shell { width: min(1080px, calc(100% - 3rem)); margin: auto; }
.article-shell-wide { width: min(1200px, calc(100% - 3rem)); }
.article-shell-narrow { width: min(850px, calc(100% - 3rem)); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1.5rem 0 2.4rem; color: var(--ink-soft); font-size: .88rem; }
.breadcrumbs a { color: var(--ink-soft); }
.breadcrumbs [aria-current="page"] { color: var(--ink); }
.page-heading { max-width: 850px; padding-bottom: 2.5rem; border-bottom: 1px solid var(--line); }
.page-heading h1 { max-width: 18ch; font-size: clamp(2.45rem, 5.5vw, 4.35rem); }
.page-date { margin: 1rem 0 0; }
.article-layout { display: grid; grid-template-columns: minmax(0, 720px) minmax(180px, 1fr); gap: clamp(2.2rem, 6vw, 5rem); padding: 2.8rem 0 5rem; }
.article-layout > * { min-width: 0; }
.prose section { margin-bottom: 3rem; }
.prose h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); }
.prose h3 { margin-top: 1.2rem; }
.prose p, .prose li { color: #35473e; }
.prose ul, .prose ol { padding-left: 1.35rem; }
.prose li { margin-bottom: .55rem; }
.article-rail { align-self: start; position: sticky; top: 1.5rem; padding-top: .3rem; }
.article-rail ol { padding-left: 1.1rem; }
.article-rail li { margin: .5rem 0; color: var(--ink-soft); font-size: .93rem; }
.article-rail a { color: var(--ink-soft); }
.rail-card { margin-top: 2rem; padding: 1.2rem; border-top: 2px solid var(--ochre); background: var(--paper-deep); }
.rail-card p { margin: .7rem 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.12rem; line-height: 1.35; }
.rail-card a { font-size: .92rem; font-weight: 700; }
.source-list { padding-top: 1.5rem; border-top: 1px solid var(--line); }
.source-list h2 { font-size: 1.65rem; }
.editorial-photo { margin: 1.5rem 0 2rem; }
.editorial-photo img { display: block; width: 100%; max-height: 570px; object-fit: cover; background: var(--paper-deep); }
.editorial-photo figcaption { padding: .55rem 0; color: var(--ink-soft); font-size: .84rem; line-height: 1.45; }
.editorial-photo-inline { max-width: 720px; margin-right: auto; margin-left: auto; }
.editorial-photo-inline img { max-height: 360px; }
.city-index { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.4rem 0 2.4rem; }
.city-index a { padding: .35rem .7rem; border: 1px solid var(--line); color: var(--ink); background: var(--white); font-size: .9rem; text-decoration: none; }
.city-index a:hover { border-color: var(--green); background: var(--green-light); }
.destination-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 1.2rem; }
.destination-card { min-width: 0; overflow: hidden; scroll-margin-top: 1rem; border: 1px solid var(--line); background: var(--paper); }
.destination-photo { margin: 0; }
.destination-photo img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--paper-deep); }
.destination-card#valencia .destination-photo img { object-position: 50% 42%; }
.destination-card#cadiz .destination-photo img { object-position: 50% 55%; }
.destination-photo figcaption { padding: .5rem 1.25rem; color: var(--ink-soft); font-size: .78rem; line-height: 1.4; }
.destination-top { padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.destination-card .destination-top { padding: .65rem 1.25rem 1.1rem; }
.destination-top h3 { margin: .55rem 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 500; }
.destination-fit { margin-bottom: 0; color: var(--ink-soft); font-size: 1.05rem; }
.destination-facts { display: flex; flex-wrap: wrap; gap: .45rem; margin: .9rem 0 0; padding: 0; list-style: none; }
.destination-facts li { max-width: 100%; padding: .3rem .55rem; border: 1px solid var(--line); color: var(--ink-soft); background: var(--white); font-size: .82rem; line-height: 1.4; }
.destination-facts a { color: inherit; text-underline-offset: .15em; }
.destination-details { border-top: 1px solid var(--line); }
.destination-details summary { padding: .9rem 1.25rem; color: var(--green); font-weight: 700; cursor: pointer; }
.destination-details summary:focus-visible { outline: 3px solid var(--terracotta); outline-offset: -3px; }
.destination-details[open] summary { border-bottom: 1px solid var(--line); }
.destination-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.2rem, 3vw, 2.5rem); padding-top: .35rem; }
.destination-card .destination-columns { grid-template-columns: 1fr; gap: .25rem; padding: .2rem 1.25rem 1.25rem; }
.destination-columns h4 { margin: 1rem 0 .5rem; color: var(--green); font-size: 1rem; }
.destination-columns p { margin-bottom: .7rem; color: #35473e; }
.destination-columns p:last-child { margin-bottom: 0; }
.climate-stations { display: grid; gap: .65rem; margin-top: 1.4rem; }
.climate-station { border: 1px solid var(--line); background: var(--white); }
.climate-station summary { padding: .9rem 1rem; color: var(--green); font-weight: 700; cursor: pointer; }
.climate-station summary:focus-visible { outline: 3px solid var(--terracotta); outline-offset: -3px; }
.climate-station .table-wrap { margin: 0; border: 0; border-top: 1px solid var(--line); }
.climate-station table, .winter-summary td { font-variant-numeric: tabular-nums; }
.field-help { color: var(--ink-soft); font-size: .85rem; font-weight: 400; line-height: 1.45; }
.form-error { padding: .8rem 1rem; border-left: 4px solid var(--terracotta); color: var(--ink); background: var(--alert); }
.table-wrap { overflow-x: auto; margin: 1.5rem 0 1rem; border: 1px solid var(--line); background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
caption { padding: 1rem; color: var(--ink-soft); font-size: .9rem; text-align: left; }
th, td { min-width: 128px; padding: .9rem 1rem; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { color: var(--green); background: var(--green-light); font-size: .84rem; }
tbody th { font-weight: 700; }
.comparison-grid, .check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.comparison-column, .check-grid article { padding: 1.5rem; border: 1px solid var(--line); background: var(--paper); }
.comparison-column p, .check-grid p { margin-bottom: 0; color: var(--ink-soft); }
.numbered-list { padding-left: 1.4rem; }
.numbered-list li { margin: .9rem 0; padding-left: .25rem; }
.checklist { list-style: none; padding-left: 0 !important; }
.checklist li { position: relative; padding: .6rem 0 .6rem 2rem; border-bottom: 1px solid var(--line); }
.checklist li::before { position: absolute; left: .1rem; color: var(--terracotta); content: "□"; font-size: 1.2rem; line-height: 1.35; }

.budget-form { margin: 2.5rem 0 4rem; }
.budget-intro { display: grid; grid-template-columns: 1fr minmax(170px, 240px); gap: .5rem 1.5rem; align-items: center; margin-bottom: 1.5rem; padding: 1.4rem 1.6rem; background: var(--paper-deep); }
.budget-intro label { font-weight: 750; }
.budget-intro .small-note { grid-column: 1 / -1; margin: 0; }
.select-wrap select { width: 100%; min-height: 46px; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 2px; color: var(--ink); background: var(--white); }
.cost-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem 1.5rem; margin: 1.2rem 0; padding: 1.5rem; border: 1px solid var(--line); }
.cost-group legend { padding: 0 .55rem; color: var(--green); font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; }
.group-help { grid-column: 1 / -1; margin: -.45rem 0 0; color: var(--ink-soft); font-size: .93rem; }
.cost-group label { display: flex; flex-direction: column; gap: .45rem; font-weight: 650; }
.cost-group input { width: 100%; min-height: 48px; padding: .6rem .75rem; border: 1px solid #aeb8ae; border-radius: 2px; color: var(--ink); background: var(--white); }
.form-actions { margin: 1.5rem 0; }
.budget-result { margin-top: 2rem; padding: 2rem; border-top: 4px solid var(--ochre); background: var(--green-light); }
.budget-result[hidden] { display: none; }
.budget-result h2 { font-size: 1.8rem; }
.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.result-grid > div { padding: 1rem; background: var(--white); }
.result-grid dt { color: var(--ink-soft); font-size: .9rem; }
.result-grid dd { margin: .35rem 0 0; color: var(--green); font-family: Georgia, "Times New Roman", serif; font-size: 1.6rem; font-weight: 700; }
.result-grid .result-total { border: 1px solid var(--green); }
.error-page { min-height: 58vh; padding-top: 9vh; }

.site-footer { padding: 3rem max(1.5rem, calc((100% - var(--max)) / 2)); border-top: 1px solid var(--line); background: #f1eee5; }
.footer-brand { color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; font-weight: 700; text-decoration: none; }
.site-footer p { color: var(--ink-soft); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; margin: 1.3rem 0; }
.site-footer nav a { color: var(--ink-soft); font-size: .93rem; }
.footer-meta { margin: 1rem 0 0; }

@media (max-width: 760px) {
  .site-header { width: min(100% - 2rem, var(--max)); min-height: 0; align-items: flex-start; flex-direction: column; gap: .9rem; padding: 1rem 0 .85rem; }
  .site-nav { width: 100%; justify-content: flex-start; gap: .55rem 1.1rem; }
  .site-nav a { padding: .2rem 0; font-size: .9rem; }
  .hero { width: min(100% - 2rem, var(--max)); }
  .hero-home { grid-template-columns: 1fr; gap: 2rem; min-height: auto; padding: 3.6rem 0; }
  .hero-home h1 { font-size: clamp(2.55rem, 11vw, 4rem); }
  .hero-note { max-width: 500px; }
  .section { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  .section-narrow { padding-right: 1rem; padding-left: 1rem; }
  .link-grid, .comparison-grid, .check-grid, .destination-columns { grid-template-columns: 1fr; }
  .link-card { min-height: 205px; }
  .article-shell, .article-shell-narrow, .article-shell-wide { width: min(100% - 2rem, 1080px); }
  .breadcrumbs { margin-top: 1.2rem; margin-bottom: 1.7rem; }
  .article-layout { grid-template-columns: 1fr; gap: 0; padding-top: 2rem; }
  .article-rail { position: static; order: -1; margin-bottom: 2rem; padding: 1.2rem; border-left: 3px solid var(--ochre); background: var(--paper-deep); }
  .article-rail ol { display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; padding-left: 1.2rem; }
  .article-rail li { margin: .2rem 0; }
  .rail-card { display: none; }
  .budget-intro { grid-template-columns: 1fr; }
  .budget-intro .small-note { grid-column: auto; }
  .cost-group { grid-template-columns: 1fr; gap: 1rem; padding: 1.1rem; }
  .group-help { grid-column: auto; }
  .result-grid { grid-template-columns: 1fr; }
  .site-footer { padding: 2.5rem 1rem; }
  .editorial-photo img { max-height: 360px; }
  .destination-list { grid-template-columns: 1fr; }
  .destination-card { padding: 0; }
  .destination-columns { gap: .25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
