/* Luxury Apartment Design — site stylesheet */
:root {
  --ink: #1c1a17;
  --ink-2: #3a362f;
  --muted: #6d665b;
  --gold: #b88a2e;
  --gold-2: #d4ae5e;
  --gold-soft: #f3e7cc;
  --cream: #f6f1e8;
  --paper: #fffdf9;
  --stone: #e6ddcd;
  --line: #e9e2d5;
  --ok: #2f6b4f;
  --err: #9b2c2c;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(28, 26, 23, .05), 0 8px 28px rgba(28, 26, 23, .07);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--gold-2); text-underline-offset: 3px; }
a:hover { color: var(--gold); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1.1em; }
button, input, select, textarea { font: inherit; color: inherit; }
.icon { width: 1.2em; height: 1.2em; flex: none; vertical-align: -.2em; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; border-radius: 6px; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.container { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.container--narrow { width: min(100% - 32px, 820px); }
.eyebrow { display: inline-block; font: 600 .78rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); text-decoration: none; margin-bottom: .8em; }
a.eyebrow:hover { color: var(--ink); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .85em 1.6em; border-radius: 999px; border: 1px solid transparent; font-weight: 500; letter-spacing: .02em; text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s; line-height: 1.2; }
.btn:hover { transform: translateY(-1px); }
.btn--gold { background: var(--ink); color: #fff; }
.btn--gold:hover { background: var(--gold); color: #fff; }
.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--light { background: #fff; color: var(--ink); }
.btn--small { padding: .55em 1.1em; font-size: .9rem; }
.link-btn { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; text-decoration-color: var(--gold-2); text-underline-offset: 3px; cursor: pointer; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; }
.icon-btn:hover { background: var(--cream); }
.link-arrow { display: inline-flex; gap: .4em; align-items: center; font-weight: 500; text-decoration: none; white-space: nowrap; }

/* Progress bar */
.progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
body:not(.is-article) .progress { display: none; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 253, 249, .94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.logo img { width: 170px; height: auto; }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav a { display: block; padding: 8px 12px; font-size: .95rem; font-weight: 500; text-decoration: none; border-radius: 999px; }
.main-nav a:hover, .main-nav a[aria-current] { background: var(--cream); color: var(--ink); }
.site-header__actions { display: flex; align-items: center; gap: 6px; }
.nav-toggle { display: none; }

@media (max-width: 1080px) {
  .nav-toggle { display: inline-grid; }
  .main-nav { position: fixed; inset: 76px 0 auto; background: var(--paper); border-bottom: 1px solid var(--line); padding: 12px 16px 20px; display: none; box-shadow: var(--shadow); }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav a { padding: 12px 14px; font-size: 1.05rem; }
  .site-header__actions { margin-left: auto; }
}
@media (max-width: 520px) {
  .header-cta { display: none; }
  .logo img { width: 140px; }
}

/* Search overlay */
.search-overlay { position: fixed; inset: 0; z-index: 80; background: rgba(28, 26, 23, .5); display: flex; justify-content: center; padding: 12vh 16px 16px; }
.search-overlay[hidden] { display: none; }
.search-overlay__panel { width: min(100%, 680px); background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; align-self: flex-start; }
.search-overlay__form { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--line); }
.search-overlay__form input { flex: 1; border: 0; background: transparent; font-size: 1.15rem; padding: 10px 0; outline: none; }
.search-overlay__results { list-style: none; margin: 0; padding: 6px; max-height: 60vh; overflow: auto; }
.search-overlay__results a { display: block; padding: 10px 14px; border-radius: var(--radius-sm); text-decoration: none; }
.search-overlay__results a:hover, .search-overlay__results a:focus { background: var(--cream); }
.search-overlay__results small { display: block; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }

/* Sections */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section--tint { background: var(--cream); }
.section--dark { background: var(--ink); color: #f4efe6; }
.section--dark .section__lead { color: #cfc6b6; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.section__title { margin-bottom: .35em; }
.section__lead { max-width: 640px; color: var(--muted); margin: 0; }
.grid { display: grid; gap: 28px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid--3, .grid--4 { grid-template-columns: 1fr; } .section__head { flex-direction: column; align-items: flex-start; } }

/* Hero */
.hero { padding: clamp(40px, 6vw, 80px) 0 clamp(56px, 7vw, 96px); background: linear-gradient(180deg, var(--cream), var(--paper)); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 5.6vw, 4.4rem); }
.hero__lead { font-size: 1.15rem; color: var(--ink-2); max-width: 580px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 32px; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 28px; list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: .95rem; }
.hero__stats strong { display: block; font: 600 2rem/1 var(--serif); color: var(--ink); }
.hero__media { position: relative; padding-bottom: 60px; }
.hero__img { border-radius: var(--radius); box-shadow: var(--shadow); object-fit: cover; }
.hero__img--main { width: 100%; aspect-ratio: 4 / 3.3; }
.hero__img--inset { position: absolute; width: 46%; left: -28px; bottom: 0; border: 6px solid var(--paper); aspect-ratio: 3 / 2; }
.hero__badge { position: absolute; right: -6px; bottom: 26px; max-width: 250px; background: var(--ink); color: #fff; padding: 14px 18px; border-radius: var(--radius-sm); font-size: .9rem; line-height: 1.4; box-shadow: var(--shadow); }
.hero__badge span { display: block; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 4px; }
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero__img--inset { left: 12px; }
  .hero__badge { right: 12px; }
}

/* Page hero */
.page-hero { padding: 40px 0 48px; background: var(--cream); border-bottom: 1px solid var(--line); }
.page-hero__lead { font-size: 1.12rem; color: var(--ink-2); max-width: 760px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 20px; padding: 0; font-size: .85rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--stone); }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs li[aria-current] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip { display: inline-block; padding: 7px 15px; border-radius: 999px; border: 1px solid var(--stone); background: var(--paper); font-size: .9rem; text-decoration: none; cursor: pointer; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.filter-bar input { width: 100%; max-width: 460px; padding: 12px 18px; border: 1px solid var(--stone); border-radius: 999px; background: var(--paper); margin-top: 8px; }
.empty-state { text-align: center; color: var(--muted); padding: 40px 0; }

/* Cards */
.card { display: flex; flex-direction: column; background: var(--paper); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); transition: transform .25s, box-shadow .25s; height: 100%; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card__media { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--stone); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.card:hover .card__media img { transform: scale(1.04); }
.card__body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.card .eyebrow { margin-bottom: .5em; font-size: .72rem; }
.card__title { font-size: 1.4rem; margin-bottom: .4em; }
.card__title a { text-decoration: none; }
.card__excerpt { color: var(--muted); font-size: .95rem; flex: 1; }
.card__meta { font-size: .82rem; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }

/* Tool cards */
.tool-card { display: flex; flex-direction: column; gap: 6px; padding: 26px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: transform .25s, box-shadow .25s, border-color .25s; height: 100%; }
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--gold-2); color: var(--ink); }
.tool-card__icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); margin-bottom: 10px; }
.tool-card__icon .icon { width: 26px; height: 26px; }
.tool-card__name { font: 600 1.35rem/1.2 var(--serif); }
.tool-card__short { color: var(--muted); font-size: .95rem; flex: 1; }
.tool-card__go { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 500; color: var(--gold); margin-top: 10px; }
.section--dark .tool-card { background: #26231f; border-color: #3a362f; color: #f4efe6; }
.section--dark .tool-card:hover { border-color: var(--gold); color: #fff; }
.section--dark .tool-card__icon { background: #3a3224; color: var(--gold-2); }
.section--dark .tool-card__short { color: #b9b0a0; }
.section--dark .eyebrow { color: var(--gold-2); }
.section--dark .link-arrow { color: #fff; }

/* Topics */
.topic { position: relative; display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 2; text-decoration: none; }
.topic img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.topic:hover img { transform: scale(1.05); }
.topic__body { position: absolute; inset: auto 0 0; padding: 60px 22px 20px; background: linear-gradient(transparent, rgba(20, 18, 15, .78)); color: #fff; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.topic__name { font: 600 1.55rem/1.15 var(--serif); }
.topic__count { font-size: .85rem; opacity: .85; white-space: nowrap; }
.topic:hover { color: #fff; }

/* Luxury score */
.score { display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; align-items: start; }
.score__form { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; background: var(--cream); padding: 28px; border-radius: var(--radius); }
.score__form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.score__form label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--paper); cursor: pointer; font-size: .95rem; line-height: 1.45; border: 1px solid transparent; }
.score__form label:has(input:checked) { border-color: var(--gold-2); background: #fffaf0; }
.score__form input[type=checkbox] { accent-color: var(--gold); width: 18px; height: 18px; margin-top: 2px; flex: none; }
.score__result { text-align: center; align-self: center; }
.score__dial { --p: 0; width: 170px; height: 170px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-content: center; background: radial-gradient(closest-side, var(--cream) 78%, transparent 79%), conic-gradient(var(--gold) calc(var(--p) * 1%), var(--stone) 0); font: 600 3rem/1 var(--serif); transition: --p .4s; }
.score__dial small { font: 400 .9rem var(--sans); color: var(--muted); }
.score__label { font: 600 1.35rem/1.25 var(--serif); }
.score__tip { font-size: .95rem; color: var(--ink-2); }
@media (max-width: 1000px) { .score { grid-template-columns: 1fr; gap: 24px; } }
@media (max-width: 640px) { .score__form { grid-template-columns: 1fr; padding: 16px; } }

/* Principles */
.principles { display: grid; grid-template-columns: 1fr 1.5fr; gap: 56px; }
.principles__intro { position: sticky; top: 110px; align-self: start; }
.principles__list { list-style: none; counter-reset: p; margin: 0; padding: 0; display: grid; gap: 18px; }
.principles__list li { counter-increment: p; position: relative; padding: 24px 24px 20px 84px; border: 1px solid var(--line); border-radius: var(--radius); }
.principles__list li::before { content: "0" counter(p); position: absolute; left: 24px; top: 20px; font: 600 2rem/1 var(--serif); color: var(--gold); }
.principles__list p { margin: 0; color: var(--ink-2); }
@media (max-width: 900px) { .principles { grid-template-columns: 1fr; gap: 24px; } .principles__intro { position: static; } }

/* Article */
.article-hero { padding: 36px 0 0; background: linear-gradient(180deg, var(--cream) 0, var(--cream) 62%, var(--paper) 62%); }
.article-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
.article-hero__dek { font-size: 1.18rem; color: var(--ink-2); }
.byline { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: .9rem; color: var(--muted); margin: 18px 0 32px; }
.byline a { color: var(--ink); }
.article-hero__figure { margin-block: 0; }
.article-hero__figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.article-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 64px; padding-top: 48px; padding-bottom: 72px; }
.article-aside { position: relative; }
.toc { position: sticky; top: 100px; font-size: .9rem; max-height: calc(100vh - 120px); overflow: auto; padding-right: 6px; }
.toc__title { font: 600 .75rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.toc ol { list-style: none; margin: 0 0 24px; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; text-decoration: none; color: var(--muted); line-height: 1.35; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); border-left-color: var(--gold); font-weight: 500; }
.aside-tool { margin-top: 8px; }
.article-aside .aside-tool { position: sticky; top: calc(100vh - 290px); }
.article-main { min-width: 0; max-width: 760px; }
@media (max-width: 1000px) {
  .article-layout { grid-template-columns: 1fr; gap: 24px; padding-top: 32px; }
  .toc { position: static; max-height: none; background: var(--cream); padding: 18px 20px 4px; border-radius: var(--radius); }
  .article-aside .aside-tool { display: none; }
}

.takeaways { background: var(--cream); border-left: 3px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0; padding: 22px 26px 12px; margin-bottom: 36px; }
.takeaways__title { font: 600 .78rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: .6em; }
.takeaways ul { margin: 0 0 10px; padding-left: 1.1em; }
.takeaways li { margin-bottom: .45em; }

/* Prose */
.prose { font-size: 1.06rem; }
.prose h2 { margin-top: 1.8em; padding-top: .2em; }
.prose h3 { margin-top: 1.5em; }
.prose h4 { font-family: var(--sans); font-size: 1.05rem; font-weight: 600; margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.3em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--gold); }
.prose a { text-decoration-thickness: 1px; font-weight: 500; }
.prose blockquote { margin: 1.6em 0; padding: 0 0 0 22px; border-left: 3px solid var(--gold); font-style: italic; color: var(--ink-2); }
.prose > :first-child { margin-top: 0; }
.callout { background: var(--gold-soft); border-radius: var(--radius); padding: 18px 22px 4px; margin: 1.6em 0; }
.callout--warn { background: #eef1ec; }
.callout--warn strong:first-child { color: var(--ok); }
.pull-quote { margin: 2em 0; padding: 8px 0 8px 26px; border-left: 3px solid var(--gold); font: 500 1.65rem/1.35 var(--serif); font-style: italic; }
.pull-quote p { margin: 0; }
.data-table { width: 100%; border-collapse: collapse; margin: 1.4em 0 1.8em; font-size: .95rem; }
.table-wrap { overflow-x: auto; margin: 1.4em 0 1.8em; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.table-wrap .data-table { margin: 0; }
.data-table th, .data-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table thead th { background: var(--cream); font-weight: 600; font-size: .85rem; letter-spacing: .03em; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.checklist { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 18px; margin: 1.4em 0; }
.checklist ul { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding: 9px 0 9px 36px; margin: 0; border-bottom: 1px dashed var(--line); cursor: pointer; user-select: none; }
.checklist li:last-child { border-bottom: 0; }
.checklist li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 20px; height: 20px; border: 1.5px solid var(--gold-2); border-radius: 5px; background: var(--paper); }
.checklist li.is-done { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--gold-2); }
.checklist li.is-done::before { background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 14px no-repeat; border-color: var(--gold); }
.checklist__progress { font-size: .85rem; color: var(--muted); margin: 6px 0 4px; }
.swatch { display: inline-block; width: 1em; height: 1em; border-radius: 4px; vertical-align: -.15em; margin-right: .35em; border: 1px solid rgba(0, 0, 0, .12); }

.tool-cta { display: flex; align-items: center; gap: 18px; padding: 22px 24px; margin: 40px 0; border-radius: var(--radius); background: var(--ink); color: #fff; }
.tool-cta__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #3a3224; color: var(--gold-2); flex: none; }
.tool-cta__icon .icon { width: 26px; height: 26px; }
.tool-cta div { flex: 1; }
.tool-cta p { margin: 0; }
.tool-cta__label { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); }
.tool-cta__name { font: 600 1.3rem/1.25 var(--serif); }
.tool-cta .btn--gold { background: var(--gold); }
.tool-cta .btn--gold:hover { background: #fff; color: var(--ink); }
@media (max-width: 640px) { .tool-cta { flex-direction: column; align-items: flex-start; } }

/* FAQ */
.faq { margin-top: 48px; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary { list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative; font: 600 1.25rem/1.35 var(--serif); }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font: 300 1.6rem var(--sans); color: var(--gold); transition: transform .2s; }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { margin: 0 0 20px; color: var(--ink-2); }

.share { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin: 40px 0 28px; font-size: .92rem; color: var(--muted); }
.share a, .share .link-btn { color: var(--ink); font-weight: 500; }
.author-box { display: flex; gap: 18px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); font-size: .95rem; }
.author-box img { border-radius: 50%; flex: none; width: 64px; height: 64px; }
.author-box p { margin: 0 0 .3em; }
.author-box__name { font: 600 1.2rem var(--serif); }

/* Newsletter */
.newsletter { background: var(--ink); color: #f4efe6; padding: 64px 0; }
.newsletter__inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.newsletter h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.newsletter p { color: #cfc6b6; margin: 0; }
.newsletter .eyebrow { color: var(--gold-2); }
.newsletter__form { display: flex; flex-wrap: wrap; gap: 10px; }
.newsletter__form input[type=email] { flex: 1 1 220px; padding: 14px 20px; border-radius: 999px; border: 1px solid #4a453d; background: #26231f; color: #fff; }
.newsletter__form .btn--gold { background: var(--gold); }
.newsletter__form .btn--gold:hover { background: #fff; color: var(--ink); }
.form-status { flex-basis: 100%; min-height: 1.4em; font-size: .92rem; }
@media (max-width: 800px) { .newsletter__inner { grid-template-columns: 1fr; } }

/* Forms */
.form { display: grid; gap: 18px; margin-bottom: 48px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: grid; gap: 6px; font-weight: 500; font-size: .95rem; }
.form input, .form select, .form textarea, .search-form input { width: 100%; padding: 12px 16px; border: 1px solid var(--stone); border-radius: var(--radius-sm); background: #fff; font-weight: 400; }
.form button { justify-self: start; }
.search-form { display: flex; gap: 10px; margin: 16px 0; }
.notice { padding: 16px 20px; border-radius: var(--radius-sm); margin-bottom: 24px; }
.notice ul { margin: 0; padding-left: 1.2em; }
.notice p { margin: 0; }
.notice--ok { background: #e7f1ea; color: var(--ok); }
.notice--err { background: #f6e6e6; color: var(--err); }
@media (max-width: 640px) { .form__row { grid-template-columns: 1fr; } }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; position: relative; padding: 14px 18px 14px 62px; background: var(--paper); border-radius: var(--radius-sm); }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 12px; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: .9rem; }
.sitemap-cols { columns: 3 280px; column-gap: 40px; }
.sitemap-cols > div { break-inside: avoid; margin-bottom: 32px; }
.sitemap-cols h2 { font-size: 1.5rem; }
.sitemap-cols ul { padding-left: 1.1em; margin: 0; }
.sitemap-cols li { margin-bottom: .35em; }

/* Footer */
.site-footer { background: #f1ebe0; padding: 64px 0 24px; font-size: .95rem; border-top: 1px solid var(--line); }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.site-footer__brand img { width: 180px; margin-bottom: 16px; }
.site-footer__brand p { color: var(--ink-2); max-width: 360px; }
.site-footer__title { font: 600 .78rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 1em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; }
.site-footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--stone); color: var(--muted); font-size: .88rem; }
.site-footer__bottom p { margin: 0; }
@media (max-width: 900px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer__grid { grid-template-columns: 1fr; } }

.to-top { position: fixed; right: 18px; bottom: 18px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 1.1rem; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 40; }
.to-top.is-visible { opacity: 1; pointer-events: auto; }

/* ---------------------------------------------------------------
   Tools
   --------------------------------------------------------------- */
.page-hero--tool { padding-bottom: 32px; }
.section--tool { padding-top: 40px; }
.tool-app { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: clamp(18px, 3vw, 36px); }
.tool-note { font-size: .85rem; color: var(--muted); text-align: center; margin: 16px auto 0; max-width: 720px; }
.tool-grid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 36px; align-items: start; }
@media (max-width: 860px) { .tool-grid { grid-template-columns: 1fr; } }
.tool-form { display: grid; gap: 16px; }
.tool-form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.tool-form legend, .field__label { font-weight: 600; font-size: .92rem; margin-bottom: 6px; padding: 0; }
.field { display: grid; gap: 6px; }
.field input, .field select { width: 100%; padding: 11px 14px; border: 1px solid var(--stone); border-radius: var(--radius-sm); background: #fff; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row--3 { grid-template-columns: 1fr 1fr 1fr; }
.field small { color: var(--muted); font-size: .8rem; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--stone); font-size: .9rem; background: #fff; transition: all .15s; }
.seg input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.seg input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.result { background: var(--cream); border-radius: var(--radius); padding: 24px; }
.result__big { font: 600 clamp(2.4rem, 5vw, 3.4rem)/1.05 var(--serif); margin: 4px 0 6px; }
.result__label { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin: 0; }
.result__sub { color: var(--ink-2); margin-bottom: 14px; }
.result ul { padding-left: 1.2em; margin: 0 0 12px; }
.result li { margin-bottom: .4em; }
.result-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 16px 0; }
.stat { background: var(--paper); border-radius: var(--radius-sm); padding: 14px 16px; }
.stat b { display: block; font: 600 1.6rem/1.1 var(--serif); }
.stat span { font-size: .82rem; color: var(--muted); }
.diagram { width: 100%; height: auto; background: #fff; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.warn-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; font-size: .9rem; }
.warn-list li { padding: 8px 12px; border-radius: var(--radius-sm); background: #fff; border-left: 3px solid var(--gold); }
.warn-list li.ok { border-left-color: var(--ok); }
.warn-list li.bad { border-left-color: var(--err); }

/* Quiz */
.quiz__progress { height: 6px; background: var(--stone); border-radius: 999px; overflow: hidden; margin-bottom: 24px; }
.quiz__progress span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .3s; }
.quiz__q { font: 600 clamp(1.6rem, 3vw, 2.1rem)/1.2 var(--serif); margin-bottom: 18px; }
.quiz__step { font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.quiz__opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.quiz__opt { text-align: left; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--stone); background: #fff; cursor: pointer; transition: all .15s; line-height: 1.4; display: flex; gap: 14px; align-items: center; }
.quiz__opt:hover { border-color: var(--gold); background: #fffaf0; }
.quiz__opt .dots { display: flex; flex: none; }
.quiz__opt .dots i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; margin-left: -6px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.quiz__opt .dots i:first-child { margin-left: 0; }
.quiz__nav { display: flex; justify-content: space-between; margin-top: 18px; }
.quiz__result h2 { margin-top: 4px; }
.quiz__bars { display: grid; gap: 8px; margin: 18px 0; }
.quiz__bar { display: grid; grid-template-columns: 170px 1fr 44px; gap: 10px; align-items: center; font-size: .9rem; }
.quiz__bar div { height: 8px; background: var(--stone); border-radius: 999px; overflow: hidden; }
.quiz__bar div span { display: block; height: 100%; background: var(--gold); }
.palette-strip { display: flex; height: 64px; border-radius: var(--radius-sm); overflow: hidden; margin: 14px 0; }
.palette-strip span { flex: 1; }
@media (max-width: 640px) { .quiz__opts { grid-template-columns: 1fr; } .quiz__bar { grid-template-columns: 120px 1fr 40px; } }

/* Palette generator */
.pal-swatches { display: grid; grid-template-columns: 6fr 3fr 1fr; gap: 8px; height: 150px; margin-bottom: 12px; }
.pal-sw { border-radius: var(--radius-sm); padding: 10px; display: flex; flex-direction: column; justify-content: flex-end; font-size: .8rem; cursor: pointer; border: 1px solid rgba(0,0,0,.06); position: relative; overflow: hidden; }
.pal-sw b { font-size: .95rem; }
.pal-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.pal-item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; background: var(--paper); border-radius: var(--radius-sm); font-size: .88rem; border: 0; cursor: pointer; text-align: left; }
.pal-item i { width: 34px; height: 34px; border-radius: 6px; flex: none; border: 1px solid rgba(0,0,0,.1); }
.pal-item small { display: block; color: var(--muted); }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.preset { display: flex; align-items: center; gap: 8px; border: 1px solid var(--stone); border-radius: 999px; padding: 5px 12px 5px 6px; background: #fff; cursor: pointer; font-size: .85rem; }
.preset i { display: flex; }
.preset i b { width: 16px; height: 16px; border-radius: 50%; margin-left: -4px; border: 1.5px solid #fff; }
.preset i b:first-child { margin-left: 0; }
input[type=color] { width: 56px; height: 44px; padding: 3px; border: 1px solid var(--stone); border-radius: var(--radius-sm); background: #fff; cursor: pointer; }

/* Layout planner */
.planner { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; }
@media (max-width: 900px) { .planner { grid-template-columns: 1fr; } }
.planner__palette { display: grid; gap: 6px; max-height: 560px; overflow: auto; align-content: start; }
.planner__palette button { display: flex; justify-content: space-between; gap: 8px; padding: 9px 12px; border: 1px solid var(--stone); border-radius: var(--radius-sm); background: #fff; cursor: pointer; font-size: .88rem; text-align: left; }
.planner__palette button:hover { border-color: var(--gold); }
.planner__palette small { color: var(--muted); white-space: nowrap; }
.planner__stage { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; touch-action: none; }
.planner__stage svg { display: block; width: 100%; height: auto; }
.planner__toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; align-items: center; }
.planner__hint { font-size: .85rem; color: var(--muted); margin: 0; }
.planner svg .item { cursor: grab; }
.planner svg .item.is-selected rect, .planner svg .item.is-selected ellipse { stroke: var(--gold); stroke-width: 3; }
.planner svg .item.is-clash rect, .planner svg .item.is-clash ellipse { fill: #f6dede; }
.planner svg text { font-family: var(--sans); font-weight: 500; fill: var(--ink-2); pointer-events: none; }

/* Budget planner */
.budget-bar { display: flex; height: 22px; border-radius: 999px; overflow: hidden; margin: 14px 0 18px; }
.budget-bar span { height: 100%; }
.budget-table td:last-child, .budget-table th:last-child { text-align: right; white-space: nowrap; }

@media print {
  .site-header, .site-footer, .newsletter, .toc, .share, .to-top, .progress, .tool-cta, .aside-tool { display: none !important; }
  .article-layout { display: block; }
}
@media (max-width: 520px) { .hero__badge { display: none; } .hero__media { padding-bottom: 40px; } }
