:root {
  --ink: #20352a;
  --green: #2f684c;
  --green-dark: #204c37;
  --cream: #fbf7ed;
  --white: #fffdfa;
  --gold: #d59a38;
  --muted: #66756d;
  --line: #d8ddd5;
  --shadow: 0 18px 50px rgba(32, 53, 42, 0.1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: "DM Sans", sans-serif;
  line-height: 1.65;
}

a { color: var(--green-dark); }

.site-header,
.site-footer,
.article-shell,
.related-guides {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
}

.brand {
  color: var(--ink);
  font-family: "Fraunces", serif;
  font-size: 27px;
  font-weight: 700;
  text-decoration: none;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  font-weight: 700;
}

.header-nav a { text-decoration: none; }

.resource-menu { position: relative; }

.resource-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

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

.resource-menu summary::after {
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(45deg);
}

.resource-menu[open] summary,
.resource-menu summary:hover { background: rgba(47, 104, 76, 0.08); }

.resource-menu[open] summary::after { margin-top: 3px; transform: rotate(225deg); }

.resource-menu-panel {
  position: absolute;
  z-index: 100;
  top: calc(100% + 10px);
  right: 0;
  left: auto;
  display: block;
  width: min(760px, calc(100vw - 48px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.resource-menu-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: #f2f5ee;
}

.resource-menu-overview span,
.resource-menu-overview strong,
.resource-menu-overview small { display: block; }
.resource-menu-overview strong { color: var(--green-dark); }
.resource-menu-overview small { margin-top: 3px; color: var(--muted); }
.resource-menu-overview b { flex: 0 0 auto; color: var(--green-dark); font-size: 13px; }
.resource-menu-overview:hover { background: #dce6d8; }

.resource-menu-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 32px;
  padding: 20px;
}

.resource-menu-group { display: grid; align-content: start; gap: 3px; }
.resource-menu-group p {
  margin: 0 0 7px;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.resource-menu-group a {
  padding: 7px 9px;
  border-radius: 9px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}
.resource-menu-group a:hover { color: var(--green-dark); background: #dce6d8; }

.resource-menu-featured,
.resource-menu-links { display: grid; gap: 6px; }
.resource-menu-featured { align-content: start; }
.resource-menu-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.resource-menu-featured a,
.resource-menu-links a {
  border-radius: 12px;
  color: var(--ink);
}

.resource-menu-featured a { display: grid; gap: 3px; padding: 14px; background: #f2f5ee; }
.resource-menu-featured strong { color: var(--green-dark); }
.resource-menu-featured span { color: var(--muted); font-size: 12px; line-height: 1.4; }
.resource-menu-links a { display: flex; align-items: center; min-height: 43px; padding: 9px 11px; font-size: 13px; font-weight: 700; }
.resource-menu-featured a:hover,
.resource-menu-links a:hover { background: #dce6d8; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  color: white;
  background: var(--green);
  font-weight: 700;
  text-decoration: none;
}

.button:hover { background: var(--green-dark); }

.article-hero {
  padding: 76px 0 64px;
  background:
    radial-gradient(circle at 88% 20%, rgba(213, 154, 56, 0.2), transparent 28%),
    linear-gradient(135deg, #fffdf8, #f3ead7);
  border-block: 1px solid var(--line);
}

.article-hero-inner {
  width: min(900px, calc(100% - 40px));
  margin-inline: auto;
}

.city-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  align-items: center;
  gap: 48px;
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.city-hero-photo {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(32, 53, 42, 0.12);
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.city-hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.city-hero-photo figcaption {
  padding: 10px 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.eyebrow {
  margin: 0 0 14px;
  color: #a86c15;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: "Fraunces", serif;
  line-height: 1.13;
}

h1 {
  max-width: 850px;
  margin: 0 0 20px;
  font-size: clamp(42px, 7vw, 68px);
}

h2 {
  margin: 44px 0 14px;
  font-size: clamp(30px, 4vw, 40px);
}

h3 {
  margin: 28px 0 8px;
  font-size: 24px;
}

.article-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 0 0 28px;
  color: #52655b;
  font-size: 20px;
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 56px;
  padding: 58px 0;
}

.article-content {
  min-width: 0;
  padding: 38px 48px 50px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.article-content > :first-child { margin-top: 0; }

.article-intro {
  color: var(--ink) !important;
  font-size: 18px;
  line-height: 1.75;
}

.city-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 34px;
}

.city-facts div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8f4e9;
}

.city-facts span,
.city-facts strong { display: block; }
.city-facts span {
  margin-bottom: 6px;
  color: #a86c15;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.city-facts strong { font-size: 14px; line-height: 1.45; }
.source-note { margin-bottom: 0; font-size: 13px; }
.timeline-list { padding-left: 24px; }
.timeline-list li { padding-left: 5px; }

.city-place-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px 18px;
}

.place-photo-link {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  text-decoration: none;
}

.place-photo-link:hover { text-decoration: underline; }

.article-content p,
.article-content li { color: #4f6158; }

.article-content li + li { margin-top: 9px; }

.article-content ol,
.article-content ul { padding-left: 24px; }

.callout,
.checklist-block {
  margin: 30px 0;
  padding: 24px 26px;
  border-left: 5px solid var(--gold);
  border-radius: 14px;
  background: #f8f1e2;
}

.callout strong,
.checklist-block strong { color: var(--ink); }

.checklist-block ul {
  margin-bottom: 0;
  list-style: "✓  ";
}

.copy-template {
  margin: 22px 0 30px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8f4e9;
}

.copy-template p {
  margin: 0;
  color: #3f5348;
  font-size: 17px;
  line-height: 1.75;
}

.side-card {
  position: sticky;
  top: 24px;
  padding: 28px;
  border-radius: 20px;
  color: white;
  background: var(--green-dark);
  box-shadow: var(--shadow);
}

.side-card h2 {
  margin: 0 0 12px;
  font-size: 29px;
}

.side-card p { color: #dce8e1; }

.side-card .button {
  width: 100%;
  color: var(--ink);
  background: white;
}

.related-guides { padding: 0 0 64px; }

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.related-grid a {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  font-weight: 700;
  text-decoration: none;
}

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

.resource-card {
  display: flex;
  flex-direction: column;
  min-height: 230px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(32, 53, 42, 0.06);
  text-decoration: none;
}

.resource-card span {
  color: #a86c15;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.resource-card h2 {
  margin: 12px 0 10px;
  font-size: 27px;
}

.resource-card p { margin: 0; color: var(--muted); }
.resource-card strong { margin-top: auto; padding-top: 20px; }

.city-resource-card { overflow: hidden; }

.city-card-image {
  display: block;
  width: calc(100% + 52px);
  height: auto;
  margin: -26px -26px 20px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 220ms ease;
}

.city-resource-card:hover .city-card-image { transform: scale(1.025); }

.resource-section {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 58px 0 72px;
}

.calculator {
  display: grid;
  min-width: 0;
  gap: 26px;
}

.calculator-fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.calculator-fields .field-full { grid-column: 1 / -1; }
.optional-copy { color: var(--muted); font-size: 12px; font-weight: 500; }

.calculator-assumptions {
  margin: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8f4e9;
}

.calculator-assumptions legend {
  padding: 0 8px;
  color: var(--ink);
  font-family: "Fraunces", serif;
  font-size: 23px;
  font-weight: 700;
}

.calculator-assumptions > p { margin: 0 0 18px; font-size: 14px; }

.money-input { position: relative; display: block; }
.money-input > span { position: absolute; z-index: 1; top: 11px; left: 14px; color: var(--muted); }
.money-input input { padding-left: 30px; }

.calculator label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

.calculator input,
.calculator select {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: white;
  font: inherit;
}

.calculator .money-input input { padding-left: 34px; }

.calculator-results {
  min-width: 0;
  padding: 28px;
  border-radius: 18px;
  color: white;
  background: var(--green-dark);
}

.result-total {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.result-total span { color: #dce8e1; }
.result-total strong { font-family: "Fraunces", serif; font-size: 42px; }
.result-breakdown { width: 100%; margin-top: 16px; border-collapse: collapse; }
.result-breakdown th { padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.28); color: #dce8e1; font-size: 12px; text-align: left; text-transform: uppercase; letter-spacing: 0.06em; }
.result-breakdown th:last-child { text-align: right; }
.result-breakdown td { padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.result-breakdown td:last-child { text-align: right; font-weight: 700; }
.result-note { margin-bottom: 0; color: #dce8e1; font-size: 14px; }

.calculator-table-wrap { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; }
.editable-breakdown { min-width: 610px; }
.editable-breakdown th:nth-child(n+2),
.editable-breakdown td:nth-child(n+2) { padding-left: 16px; text-align: right; }
.editable-breakdown input {
  width: 105px;
  min-height: 38px;
  padding: 0 9px;
  border-color: rgba(255, 255, 255, 0.36);
  color: var(--ink);
  text-align: right;
}
.fee-models { min-width: 620px; }
.fee-models td:nth-child(2) { max-width: 280px; text-align: left; font-weight: 700; }

.generator-output {
  padding: 26px;
  border-radius: 18px;
  color: white;
  background: var(--green-dark);
}

.generator-output-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.generator-output-heading span,
.generator-output-heading small { display: block; }
.generator-output-heading span { font-family: "Fraunces", serif; font-size: 25px; font-weight: 700; }
.generator-output-heading small { color: #dce8e1; }
.generator-output textarea {
  width: 100%;
  min-height: 360px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  color: var(--ink);
  background: white;
  font: inherit;
  line-height: 1.6;
  resize: vertical;
}
.generator-output .button-light { min-height: 42px; color: var(--ink); background: white; }
.copy-status { min-height: 24px; margin: 12px 0 0; color: #dce8e1; font-size: 14px; }

.role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0 34px;
}

.role-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8f4e9;
}

.role-card h3 { margin: 0 0 10px; font-size: 23px; }
.role-card p { margin: 0 0 12px; }
.role-card strong,
.role-card span { display: block; }
.role-card span { color: var(--muted); font-size: 14px; }

@media print {
  .site-header, .site-footer, .side-card, .related-guides, .button { display: none !important; }
  body { background: white; }
  .article-shell { display: block; padding: 0; }
  .article-content { border: 0; box-shadow: none; }
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.site-footer nav { display: flex; gap: 16px; }

@media (max-width: 820px) {
  .header-nav > a:not(.button) { display: none; }
  .header-nav { flex: 1; justify-content: flex-end; }
  .resource-menu-panel { right: 0; left: auto; }
  .article-hero { padding: 54px 0 46px; }
  .city-hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .article-shell { grid-template-columns: 1fr; gap: 28px; }
  .article-content { padding: 28px 24px 36px; }
  .side-card { position: static; }
  .related-grid { grid-template-columns: 1fr; }
  .resource-grid,
  .calculator-fields { grid-template-columns: 1fr; }
  .city-facts { grid-template-columns: 1fr; }
  .city-place-list li { grid-template-columns: 1fr; }
  .place-photo-link { white-space: normal; }
  .role-grid { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; }
}

@media (max-width: 560px) {
  .site-header { flex-wrap: wrap; gap: 10px; }
  .header-nav { order: 3; width: 100%; flex-basis: 100%; }
  .resource-menu,
  .resource-menu summary { width: 100%; }
  .resource-menu summary { justify-content: space-between; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.55); }
  .resource-menu-panel { right: 0; left: 0; grid-template-columns: 1fr; width: 100%; max-height: min(68vh, 560px); overflow-y: auto; }
  .resource-menu-groups { grid-template-columns: 1fr; gap: 20px; }
  .resource-menu-overview { align-items: flex-start; flex-direction: column; gap: 10px; }
  .resource-menu-links { grid-template-columns: 1fr; }
  .result-total { align-items: flex-start; flex-direction: column; }
  .generator-output-heading { align-items: stretch; flex-direction: column; }
}
