/* ============================================================
 * Interior Design Studio — design system
 * Warm, calm, editorial. Mobile-first, no external assets.
 * ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg: #faf7f2;
  --bg-warm: #f4efe7;
  --surface: #ffffff;
  --ink: #2c2823;
  --ink-soft: #4d463d;
  --muted: #7b7268;
  --line: #e9e2d6;
  --accent: #b35c3f;
  --accent-dark: #974c33;
  --accent-soft: #f5ebe5;
  --green: #43564b;
  --green-soft: #e9efea;
  --gold: #bd9150;
  --white: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow: 0 12px 34px rgba(74, 56, 36, .10);
  --shadow-sm: 0 4px 14px rgba(74, 56, 36, .08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --maxw: 1180px;
  --header-h: 66px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* The off-canvas mobile nav must never create horizontal page scroll. */
html { overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
h1, h2, h3, h4 { line-height: 1.25; color: var(--ink); margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid rgba(179, 92, 63, .45); outline-offset: 2px; border-radius: 4px; }
body.drawer-open { overflow: hidden; }

.container { width: min(var(--maxw), calc(100% - 40px)); margin-inline: auto; }
main { display: block; min-height: 55vh; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px;
  border: 1.5px solid transparent; border-radius: var(--radius-pill);
  font-size: 15px; font-weight: 600; white-space: nowrap;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(179, 92, 63, .28); }
.btn--primary:hover { background: var(--accent-dark); color: #fff; }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: #f4efe7; color: var(--ink); }
.btn--ghost { background: transparent; color: var(--accent); border-color: currentColor; }
.btn--ghost:hover { background: var(--accent-soft); color: var(--accent-dark); }
.btn--dark-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.55); }
.btn--dark-ghost:hover { background: rgba(255,255,255,.22); color: #fff; }
.btn--sm { min-height: 38px; padding: 0 16px; font-size: 13.5px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(250, 247, 242, .88);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 18px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 17px; }
.brand:hover { color: var(--ink); }
.brand__mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--green); color: #fff; flex: 0 0 auto;
}
.brand__name b { color: var(--accent); font-weight: 800; }
.nav-links { display: none; align-items: center; gap: 4px; margin-left: auto; }
.nav-link {
  position: relative; padding: 8px 12px; border-radius: var(--radius-pill);
  color: var(--ink-soft); font-size: 14.5px; font-weight: 600; white-space: nowrap;
}
.nav-link:hover { color: var(--accent); background: var(--accent-soft); }
.nav-link.is-active { color: var(--accent); }
.nav-link.is-active::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 2px;
  height: 2px; border-radius: 2px; background: var(--accent);
}
.fav-badge {
  display: inline-grid; place-items: center;
  min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
}
.fav-badge:not(.is-visible) { display: none; }
.lang-btn {
  margin-left: auto; min-height: 38px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: var(--radius-pill);
  background: #fff; color: var(--ink); font-weight: 700; font-size: 13.5px;
}
.lang-btn:hover { border-color: var(--accent); color: var(--accent); }
.nav-toggle {
  margin-left: auto; display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px;
  background: transparent; border: 0;
}
.nav-toggle span { display: block; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-drawer {
  position: fixed; inset: var(--header-h) 0 0 auto; z-index: 55;
  width: min(320px, 86vw);
  background: var(--surface); border-left: 1px solid var(--line);
  transform: translateX(100%); transition: transform .25s ease;
  box-shadow: -12px 0 40px rgba(40, 30, 20, .12);
  padding: 18px 16px 30px; overflow-y: auto;
}
.nav-drawer.is-open { transform: translateX(0); }
.nav-drawer .nav-link { display: block; padding: 14px 14px; font-size: 16px; border-radius: 12px; }
.nav-drawer .lang-btn { margin: 14px 0 0 14px; }
.beta-pill {
  display: inline-block; padding: 5px 13px; border-radius: var(--radius-pill);
  background: var(--green-soft); color: var(--green); font-size: 12.5px; font-weight: 700;
}

@media (min-width: 1024px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
  .nav-drawer { display: none; }
  .lang-btn { margin-left: 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff;
  background: linear-gradient(120deg, #8d9b8d, #c9b092);
  overflow: hidden;
}
.hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .95; transform: scale(1.09);
}
.hero__img.is-failed { display: none; }
.hero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(24,20,16,.42) 0%, rgba(24,20,16,.30) 38%, rgba(24,20,16,.72) 100%),
    linear-gradient(90deg, rgba(24,20,16,.55), rgba(24,20,16,.05));
}
.hero__inner {
  position: relative;
  padding: clamp(72px, 12vw, 130px) 0 clamp(64px, 9vw, 110px);
  max-width: 720px;
}
.hero__eyebrow {
  display: inline-block; margin-bottom: 18px;
  padding: 7px 15px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35);
  font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.hero h1 { color: #fff; font-size: clamp(2.1rem, 5.2vw, 3.5rem); margin-bottom: 18px; text-wrap: balance; }
.hero__sub { font-size: clamp(1rem, 2vw, 1.17rem); color: rgba(255,255,255,.92); max-width: 580px; margin-bottom: 28px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 0; padding: 0; list-style: none; }
.hero__trust li { position: relative; font-size: 13.5px; font-weight: 600; color: rgba(255,255,255,.92); }
.hero__trust li::before {
  content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 8px;
  border-radius: 50%; background: #e8c39e; vertical-align: 1px;
}

/* Page hero (inner pages) */
.page-hero {
  position: relative; color: #fff; overflow: hidden;
  background: linear-gradient(120deg, #6f8278, #a78b74);
}
.page-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.09); }
.page-hero__img.is-failed { display: none; }
.page-hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(24,20,16,.5), rgba(24,20,16,.7)); }
.page-hero__inner { position: relative; padding: 54px 0 46px; }
.page-hero h1 { color: #fff; font-size: clamp(1.7rem, 4vw, 2.5rem); margin-bottom: 8px; }
.page-hero__sub { color: rgba(255,255,255,.9); max-width: 680px; margin: 0; }
.breadcrumb { font-size: 13px; color: rgba(255,255,255,.82); margin-bottom: 12px; }
.breadcrumb a { color: rgba(255,255,255,.92); }
.breadcrumb span { margin: 0 8px; opacity: .6; }

/* ---------- Sections ---------- */
.section { padding: clamp(46px, 7vw, 78px) 0; }
.section--warm { background: var(--bg-warm); }
.section--white { background: var(--surface); }
.section-head { max-width: 680px; margin: 0 auto 34px; text-align: center; }
.section-head--left { margin-inline: 0; text-align: left; }
.section-head h2 { font-size: clamp(1.45rem, 3vw, 2rem); margin-bottom: 8px; }
.section-head p { color: var(--muted); margin: 0; }
.section-cta { margin-top: 34px; text-align: center; }
.eyebrow {
  display: inline-block; margin-bottom: 10px;
  font-size: 12.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Photo cards ---------- */
.cards-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.cards-grid--2 { grid-template-columns: 1fr; }
.cards-grid--3 { grid-template-columns: 1fr; }
.cards-grid--4 { grid-template-columns: 1fr; }
@media (min-width: 600px) {
  .cards-grid, .cards-grid--3, .cards-grid--4 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 980px) {
  .cards-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .cards-grid--4 { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1200px) {
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
}

.photo-card {
  position: relative; display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius); overflow: hidden;
  background-image: linear-gradient(135deg, #cbb9a1, #8d9b8d);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
  isolation: isolate;
}
.photo-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: inherit; }
.photo-card__link { position: absolute; inset: 0; z-index: 2; display: block; }
.photo-card__img {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.11);
  transition: transform .5s ease;
}
.photo-card:hover .photo-card__img { transform: scale(1.16); }
.photo-card__img.is-failed { opacity: 0; }
.photo-card__shade {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(22,18,14,.08) 0%, rgba(22,18,14,.14) 40%, rgba(22,18,14,.82) 100%);
}
.photo-card__body {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  padding: 44px 18px 16px; color: #fff;
}
.photo-card__title { color: #fff; font-size: 1.08rem; margin-bottom: 4px; }
.photo-card__text { color: rgba(255,255,255,.86); font-size: 13.5px; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.photo-card__meta {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; font-size: 12px; font-weight: 600; color: rgba(255,255,255,.8);
}
.photo-card__dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,.7); }
.photo-card__tag {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  padding: 5px 11px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,.9); color: var(--ink);
  font-size: 11.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
}
.photo-card__tag--soft { background: rgba(22,18,14,.55); color: #fff; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); text-transform: none; letter-spacing: 0; }

/* Heart / favorite button */
.heart {
  position: absolute; top: 10px; right: 10px; z-index: 5;
  display: inline-grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.92); color: #8d7e6d;
  box-shadow: 0 3px 10px rgba(30,22,14,.22);
  transition: transform .15s, color .15s, background .15s;
}
.heart:hover { transform: scale(1.08); color: var(--accent); }
.heart svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; transition: fill .15s; }
.heart.is-active { background: var(--accent); color: #fff; }
.heart.is-active svg { fill: currentColor; }
.heart--inline { position: static; box-shadow: none; border: 1.5px solid var(--line); background: #fff; }
.heart--inline.is-active { background: var(--accent); border-color: var(--accent); }

/* Category feature cards (taller) */
.feature-card { aspect-ratio: 1 / 1; }
@media (min-width: 980px) { .feature-card { aspect-ratio: 4 / 4.6; } }
.feature-card .photo-card__title { font-size: 1.25rem; }
.flagship-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 900px) { .flagship-grid { grid-template-columns: repeat(3, 1fr); } }
.flagship-card { aspect-ratio: 3 / 3.6; }
@media (min-width: 900px) { .flagship-card { aspect-ratio: 3 / 3.9; } }
.flagship-card .photo-card__title { font-size: 1.3rem; }
.flagship-badge {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; padding: 6px 12px; border-radius: var(--radius-pill);
}

/* How-it-works steps */
.steps-row { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 760px) { .steps-row { grid-template-columns: repeat(3, 1fr); } }
.step {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; position: relative;
}
.step__num {
  display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 14px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  font-weight: 800; font-size: 18px;
}
.step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 14px; margin: 0; }

/* Final CTA band */
.cta-band {
  position: relative; overflow: hidden; border-radius: clamp(18px, 3vw, 28px);
  background: linear-gradient(120deg, #43564b, #6d5b46);
  color: #fff; padding: clamp(40px, 6vw, 64px) clamp(22px, 5vw, 56px);
  text-align: center;
}
.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 3.4vw, 2.2rem); }
.cta-band p { color: rgba(255,255,255,.88); max-width: 560px; margin: 0 auto 24px; }

/* FAQ */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  margin-bottom: 12px; overflow: hidden;
}
.faq-item summary {
  cursor: pointer; list-style: none; padding: 18px 20px; font-weight: 700;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; font-size: 22px; line-height: 1; color: var(--accent); font-weight: 400;
}
.faq-item[open] summary::after { content: '–'; }
.faq-item > div { padding: 0 20px 18px; color: var(--muted); }

/* ---------- Forms / inputs ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: clamp(18px, 3vw, 28px);
}
.panel + .panel { margin-top: 20px; }
.panel__title { font-size: 1.12rem; margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 620px) { .form-grid--2 { grid-template-columns: 1fr 1fr; } }
.calc-row { display: grid; grid-template-columns: 1fr 1fr 38px; gap: 8px; align-items: center; margin-bottom: 8px; }
.calc-row .input--num { min-width: 0; }
.calc-row .btn--sm { min-height: 42px; padding: 0; }
.subhead { font-size: 13.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; font-weight: 800; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field__label { font-size: 13.5px; font-weight: 700; color: var(--ink-soft); }
.field__hint { font-size: 12.5px; color: var(--muted); margin: 0; }
.input {
  width: 100%; min-height: 46px; padding: 10px 14px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); font-size: 15.5px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(179,92,63,.14); }
textarea.input { min-height: 140px; resize: vertical; }
.input--num { font-variant-numeric: tabular-nums; }
.input--wrap { position: relative; }
.input__suffix {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 13px; font-weight: 600; pointer-events: none;
}
.input.is-invalid { border-color: #c0492e; box-shadow: 0 0 0 3px rgba(192,73,46,.12); }
.field-error { color: #c0492e; font-size: 12.5px; margin: 2px 0 0; min-height: 0; }

.segmented {
  display: inline-flex; padding: 4px; gap: 2px;
  background: var(--bg-warm); border-radius: var(--radius-pill); flex-wrap: wrap;
}
.segmented__btn {
  border: 0; background: transparent; color: var(--muted);
  padding: 8px 16px; min-height: 38px; border-radius: var(--radius-pill);
  font-size: 13.5px; font-weight: 700;
}
.segmented__btn.is-active { background: #fff; color: var(--accent); box-shadow: var(--shadow-sm); }

.range { width: 100%; accent-color: var(--accent); height: 40px; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 22px; }
.toolbar .searchbar { flex: 1 1 240px; position: relative; }
.searchbar input { padding-left: 42px; }
.searchbar::before {
  content: ''; position: absolute; left: 15px; top: 50%; width: 16px; height: 16px;
  transform: translateY(-50%);
  border: 2px solid var(--muted); border-radius: 50%;
}
.searchbar::after {
  content: ''; position: absolute; left: 27px; top: 56%; width: 8px; height: 2px;
  background: var(--muted); transform: rotate(45deg);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink-soft);
  border-radius: var(--radius-pill); padding: 8px 16px; min-height: 38px;
  font-size: 13.5px; font-weight: 700;
}
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.result-count { color: var(--muted); font-size: 13.5px; margin: 14px 2px 0; }

/* Notes & results */
.note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 13px 16px; border-radius: var(--radius-sm);
  font-size: 14px; line-height: 1.55; margin: 14px 0;
}
.note__dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; }
.note--info { background: #eef2ef; color: #38453d; }
.note--info .note__dot { background: var(--green); }
.note--warn { background: #faf0e4; color: #7a531d; }
.note--warn .note__dot { background: var(--gold); }
.note--success { background: var(--green-soft); color: var(--green); }
.note--success .note__dot { background: var(--green); }
.note--error { background: #f9e9e4; color: #a23d26; }
.note--error .note__dot { background: #c0492e; }

.result-card {
  background: linear-gradient(160deg, #fff, #fbf5ef);
  border: 1px solid #efe3d6; border-radius: var(--radius);
  padding: clamp(18px, 3vw, 26px);
}
.result-card__title { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; margin-bottom: 14px; }
.result-card__title::before {
  content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--accent);
}
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 560px) { .stat-grid--3 { grid-template-columns: repeat(3, 1fr); } .stat-grid--4 { grid-template-columns: repeat(4, 1fr); } }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.stat__label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stat__value { font-size: 1.45rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2; margin: 3px 0; }
.stat__note { font-size: 12.5px; color: var(--muted); }
.result-narrative { margin-top: 14px; font-size: 14.5px; color: var(--ink-soft); }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
  position: relative; border: 0; border-radius: var(--radius-sm);
  min-width: 108px; min-height: 96px; padding: 12px;
  display: flex; align-items: flex-end;
  font-weight: 700; font-size: 13px; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
  transition: transform .15s;
}
.swatch:hover { transform: translateY(-2px); }
.swatch__name { font-variant-numeric: tabular-nums; }
.swatch-row { display: flex; height: 52px; border-radius: var(--radius-sm); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.swatch-row span { flex: 1; }

/* ---------- Tool page ---------- */
.tool-layout { display: grid; grid-template-columns: 1fr; gap: 24px; padding: 30px 0 50px; }
@media (min-width: 980px) { .tool-layout { grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr); } }
.tool-mount { min-height: 220px; }
.tool-mount .panel + .panel { margin-top: 18px; }
.side-list { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.side-list li {
  position: relative; padding: 0 0 14px 34px; margin-bottom: 14px;
  color: var(--ink-soft); font-size: 14px; border-left: 0;
  counter-increment: step;
}
.side-list li::before {
  content: counter(step);
  position: absolute; left: 0; top: 1px;
  width: 23px; height: 23px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  font-size: 12px; font-weight: 800;
  display: grid; place-items: center;
}
.tool-head-row { display: flex; align-items: flex-start; gap: 14px; justify-content: space-between; margin-bottom: 18px; }
.tool-head-row h2 { margin: 0; font-size: 1.3rem; }
.tool-hero-actions { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; }
.page-hero .heart--inline {
  background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .45); color: #fff;
  min-height: 42px; padding: 0 18px;
}
.page-hero .heart--inline.is-active { background: var(--accent); border-color: var(--accent); }
.tip-list { margin: 0; padding: 0; list-style: none; }
.tip-list li { position: relative; padding-left: 22px; margin-bottom: 10px; font-size: 14px; color: var(--ink-soft); }
.tip-list li::before { content: ''; position: absolute; left: 2px; top: 9px; width: 7px; height: 7px; border-radius: 2px; background: var(--gold); transform: rotate(45deg); }

/* ---------- Quiz ---------- */
.quiz-progress { display: flex; gap: 5px; margin-bottom: 22px; }
.quiz-progress i { height: 5px; flex: 1; border-radius: 5px; background: var(--line); transition: background .25s; }
.quiz-progress i.is-done { background: var(--accent); }
.quiz-q { font-size: 1.25rem; margin-bottom: 18px; }
.quiz-options { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .quiz-options--grid2 { grid-template-columns: 1fr 1fr; } }
.quiz-option {
  text-align: left; padding: 16px 18px; min-height: 58px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; font-size: 15px; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; gap: 13px;
  transition: border-color .15s, background .15s, transform .1s;
}
.quiz-option:hover { border-color: var(--accent); }
.quiz-option.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.quiz-option__chip {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.1);
}
.quiz-nav { display: flex; justify-content: space-between; margin-top: 22px; gap: 10px; }
.result-hero { text-align: center; margin-bottom: 18px; }
.result-hero .match {
  display: inline-block; padding: 6px 14px; border-radius: var(--radius-pill);
  background: var(--green-soft); color: var(--green); font-weight: 800; font-size: 13px; margin-bottom: 10px;
}
.result-hero h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 4px; }
.duo-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 720px) { .duo-grid { grid-template-columns: 1fr 1fr; } }
.do-card, .dont-card { border-radius: var(--radius-sm); padding: 18px; }
.do-card { background: var(--green-soft); }
.dont-card { background: #f7e9e3; }
.do-card h4 { color: var(--green); margin-bottom: 8px; }
.dont-card h4 { color: #b0533a; margin-bottom: 8px; }
.do-card li, .dont-card li { margin-bottom: 7px; font-size: 14px; padding-left: 20px; position: relative; }
.do-card li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.dont-card li::before { content: '✕'; position: absolute; left: 0; color: #b0533a; font-weight: 700; }

/* ---------- Planner ---------- */
.planner-wrap { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 900px) { .planner-wrap { grid-template-columns: minmax(0,1fr) 280px; } }
.planner-stage {
  position: relative; width: 100%; overflow: auto;
  background: repeating-linear-gradient(45deg,#f6f2eb,#f6f2eb 10px,#f1ebe1 10px,#f1ebe1 20px);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px;
  -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y;
}
.planner-room {
  position: relative; margin: 0 auto; transform-origin: top center;
  background: #fff; border: 2px solid var(--green);
  box-shadow: var(--shadow-sm); touch-action: none;
}
.planner-item {
  position: absolute; display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 700; text-align: center; line-height: 1.15;
  border: 1.5px solid rgba(40,50,42,.55); cursor: grab; user-select: none;
  padding: 2px; color: #23302a; touch-action: none;
}
.planner-item.is-selected { outline: 2.5px solid var(--accent); outline-offset: 1px; z-index: 4; }
.planner-item:active { cursor: grabbing; }
.furn-library { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.furn-library button {
  padding: 11px 10px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; font-size: 13px; font-weight: 600; min-height: 44px; text-align: left;
}
.furn-library button:hover { border-color: var(--accent); color: var(--accent); }
.planner-selected-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.planner-scale { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* ---------- Mood board ---------- */
.mood-stage {
  position: relative; height: 460px; overflow: hidden;
  background: #fffdf9; border: 1.5px dashed #d8cdbd; border-radius: var(--radius-sm);
}
.mood-note {
  position: absolute; min-width: 120px; max-width: 200px; padding: 10px 12px;
  border-radius: 8px; font-size: 13px; cursor: grab; touch-action: none;
  box-shadow: var(--shadow-sm);
}
.mood-note.is-selected { outline: 2.5px solid var(--accent); }

/* ---------- Budget ---------- */
.budget-row { display: grid; grid-template-columns: 1fr 130px; gap: 10px; align-items: center; margin-bottom: 10px; }
.budget-bar { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; }
.budget-bar i { display: block; height: 100%; background: var(--green); border-radius: 8px; }
.budget-bar i.is-over { background: #c0492e; }

/* ---------- Articles / prose ---------- */
.guide-layout { display: grid; grid-template-columns: 1fr; gap: 30px; padding: 34px 0 60px; }
@media (min-width: 1040px) { .guide-layout { grid-template-columns: minmax(0,720px) minmax(220px,260px); } }
.prose { font-size: 16.5px; color: var(--ink-soft); max-width: 720px; }
.prose > h2 { font-size: 1.5rem; color: var(--ink); margin: 1.9em 0 .55em; scroll-margin-top: 90px; }
.prose > h3 { font-size: 1.18rem; margin: 1.6em 0 .5em; color: var(--ink); scroll-margin-top: 90px; }
.prose p { margin-bottom: 1.15em; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.prose ul li, .prose ol li { margin-bottom: .55em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote {
  margin: 1.4em 0; padding: 14px 20px;
  border-left: 4px solid var(--accent); background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink); font-style: normal;
}
.prose strong { color: var(--ink); }
.guide-meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 13.5px; margin-bottom: 8px; }
.toc { position: static; }
@media (min-width: 1040px) {
  .toc { position: sticky; top: calc(var(--header-h) + 20px); align-self: start; }
}
.toc__inner { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.toc h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.toc a { display: block; padding: 7px 0; color: var(--ink-soft); font-size: 14px; border-bottom: 1px dashed var(--line); }
.toc a:last-child { border-bottom: 0; }
.toc a.is-active, .toc a:hover { color: var(--accent); }
.prev-next { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 30px; }
@media (min-width: 640px) { .prev-next { grid-template-columns: 1fr 1fr; } }
.prev-next a {
  display: block; padding: 16px 18px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #fff; color: var(--ink);
}
.prev-next a:hover { border-color: var(--accent); }
.prev-next small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.prev-next .next-col { text-align: right; }
.guide-tools { margin-top: 26px; }

/* ---------- Favorites ---------- */
.fav-section { margin-bottom: 34px; }
.fav-section > h2 { font-size: 1.15rem; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.fav-section > h2 .count-pill {
  font-size: 12px; background: var(--accent-soft); color: var(--accent);
  padding: 2px 10px; border-radius: var(--radius-pill);
}
.fav-item {
  display: flex; gap: 14px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 10px;
}
.fav-item__main { flex: 1; min-width: 0; }
.fav-item__title { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.fav-item__sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav-item__time { font-size: 12px; color: #a99e90; margin-top: 3px; }
.fav-thumb {
  flex: 0 0 auto; width: 88px; height: 60px; border-radius: 8px;
  background-size: cover; background-position: center; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.fav-stripes { display: flex; width: 88px; height: 60px; border-radius: 8px; overflow: hidden; flex: 0 0 auto; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.fav-stripes i { flex: 1; }
.fav-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line);
  background: #fff; display: grid; place-items: center; color: var(--muted);
}
.icon-btn:hover { color: #c0492e; border-color: #e2bdb1; background: #fdf3f0; }
.empty-state {
  text-align: center; padding: 50px 20px;
  border: 1.5px dashed var(--line); border-radius: var(--radius); background: #fff;
}
.empty-state h3 { margin: 14px 0 6px; }
.empty-state p { color: var(--muted); margin-bottom: 18px; }

/* ---------- Static content pages ---------- */
.prose-page { max-width: 820px; padding: 40px 0 70px; }
.prose-page h2 { font-size: 1.45rem; margin: 1.8em 0 .5em; }
.prose-page h3 { font-size: 1.15rem; margin: 1.4em 0 .4em; }
.prose-page ul { list-style: disc; padding-left: 1.3em; margin-bottom: 1.1em; }
.prose-page li { margin-bottom: .5em; }
.prose-page .updated { color: var(--muted); font-size: 13.5px; }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1.1fr .9fr; } }
.value-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.value-pill { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 8px 16px; font-size: 13.5px; font-weight: 600; }

/* Ad slots */
.ad-slot { margin: 26px 0; }
.ad-slot.is-live {
  min-height: 280px; display: grid; place-items: center;
  background: #fff; border: 1px dashed var(--line); border-radius: var(--radius-sm);
}

/* Toast */
.toast-box { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(92vw, 420px); }
.toast {
  background: rgba(34,29,24,.95); color: #fff; padding: 12px 20px;
  border-radius: var(--radius-pill); font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow); opacity: 0; transform: translateY(10px);
  transition: opacity .25s, transform .25s; pointer-events: none; text-align: center;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast--success { background: var(--green); }

/* ---------- Footer ---------- */
.site-footer { background: #241f1a; color: rgba(255,255,255,.78); margin-top: 0; }
.footer-grid {
  display: grid; grid-template-columns: 1fr; gap: 30px;
  padding: 52px 0 36px;
}
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.1fr; } }
.site-footer h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.site-footer ul li { margin-bottom: 9px; }
.site-footer a { color: rgba(255,255,255,.78); font-size: 14.5px; }
.site-footer a:hover { color: #fff; }
.brand--footer { color: #fff; margin-bottom: 14px; }
.brand--footer:hover { color: #fff; }
.footer-tagline { font-size: 14px; color: rgba(255,255,255,.68); max-width: 300px; }
.footer-email { display: inline-block; margin-bottom: 14px; font-weight: 700; color: #f0d9c9 !important; word-break: break-all; }
.footer-small { font-size: 13.5px; color: rgba(255,255,255,.62); }
.footer-bar { border-top: 1px solid rgba(255,255,255,.1); }
.footer-bar__inner {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 0; font-size: 13px; color: rgba(255,255,255,.55);
}
@media (min-width: 760px) { .footer-bar__inner { flex-direction: row; justify-content: space-between; align-items: center; } }

/* Cookie bar */
.cookie-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  background: #241f1a; color: rgba(255,255,255,.85);
  box-shadow: 0 -10px 30px rgba(0,0,0,.2);
  transition: opacity .3s, transform .3s;
}
.cookie-bar.is-hidden { opacity: 0; transform: translateY(20px); pointer-events: none; }
.cookie-bar__inner { display: flex; flex-direction: column; gap: 12px; padding: 16px 20px; align-items: stretch; }
@media (min-width: 760px) { .cookie-bar__inner { flex-direction: row; align-items: center; justify-content: space-between; } }
.cookie-bar__text { margin: 0; font-size: 13.5px; }
.cookie-bar__text a { color: #f0d9c9; text-decoration: underline; }
.cookie-bar__actions { display: flex; gap: 10px; flex: 0 0 auto; }
.cookie-bar .btn--ghost { color: #fff; }
.cookie-bar .btn--ghost:hover { background: rgba(255,255,255,.12); }

/* ---------- Color palette generator ---------- */
.palette-controls { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 8px; }
@media (min-width: 680px) { .palette-controls { grid-template-columns: auto 1fr; align-items: end; } }
.color-pick { display: flex; align-items: center; gap: 12px; }
.color-pick input[type='color'] {
  width: 58px; height: 48px; padding: 3px; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); background: #fff; cursor: pointer; flex: 0 0 auto;
}
.palette-swatches { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 20px 0 6px; }
@media (min-width: 720px) { .palette-swatches { grid-template-columns: repeat(5, 1fr); } }
.palette-sw {
  position: relative; border: 0; border-radius: var(--radius-sm); min-height: 122px;
  padding: 11px 12px; display: flex; flex-direction: column; justify-content: space-between;
  text-align: left; cursor: pointer; font: inherit;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .09); transition: transform .15s;
}
.palette-sw:hover { transform: translateY(-2px); }
.palette-sw.is-locked { box-shadow: inset 0 0 0 2.5px var(--accent); }
.palette-sw__hex { font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.palette-sw__role { font-size: 11.5px; opacity: .88; line-height: 1.3; }
.palette-sw__tools { position: absolute; top: 7px; right: 7px; display: flex; gap: 5px; }
.palette-sw__tools button {
  border: 0; border-radius: 20px; min-width: 30px; height: 22px; padding: 0 8px;
  font-size: 11px; font-weight: 800; background: rgba(255, 255, 255, .88); color: #5b5148;
}
.palette-sw__tools button.is-on { background: var(--accent); color: #fff; }
.palette-sw__edit { width: 100%; border: 0; border-radius: 6px; padding: 5px 7px; font: inherit; font-size: 12px; font-weight: 700; }
/* Stylized room preview */
.room-mock { border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); margin: 8px 0 4px; }
.room-mock__scene { position: relative; height: 212px; overflow: hidden; transition: background .25s; }
.room-mock__window {
  position: absolute; top: 26px; left: 8%; width: 78px; height: 96px;
  border-radius: 7px; background: rgba(255, 255, 255, .78);
  border: 5px solid rgba(30, 24, 18, .14);
}
.room-mock__window::after {
  content: ''; position: absolute; inset: 0; border-left: 2.5px solid rgba(30, 24, 18, .14);
  border-top: 2.5px solid rgba(30, 24, 18, .14);
}
.room-mock__floor { position: absolute; left: 0; right: 0; bottom: 0; height: 62px; transition: background .25s; }
.room-mock__rug { position: absolute; left: 50%; transform: translateX(-50%); bottom: 12px; width: 58%; height: 26px; border-radius: 7px; opacity: .95; }
.room-mock__sofa {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 32px;
  width: 158px; height: 48px; border-radius: 16px 16px 9px 9px; transition: background .25s;
}
.room-mock__sofa::before {
  content: ''; position: absolute; left: 16px; right: 16px; top: -16px; height: 22px;
  border-radius: 13px 13px 0 0; background: inherit;
}
.room-mock__pillow { position: absolute; bottom: 72px; width: 27px; height: 20px; border-radius: 6px; }
.room-mock__plant { position: absolute; right: 7%; bottom: 62px; width: 34px; }
.room-mock__leaves { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); width: 30px; height: 26px; border-radius: 70% 30% 70% 30%; background: #6f8260; }
.room-mock__pot { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 22px; height: 18px; border-radius: 3px 3px 7px 7px; }
.css-export { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; min-height: 150px; }

/* ---------- Contrast / converter ---------- */
.a11y-badge { display: inline-block; padding: 4px 11px; border-radius: 20px; font-size: 12px; font-weight: 800; }
.a11y-badge--pass { background: var(--green-soft); color: var(--green); }
.a11y-badge--fail { background: #f7e4dd; color: #a23d26; }
.a11y-preview { border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 20px; margin-top: 10px; }
.a11y-preview .preview-lg { font-size: 23px; font-weight: 800; margin-bottom: 6px; }
.a11y-preview .preview-sm { font-size: 14.5px; line-height: 1.5; }

/* ---------- Color-blind simulator ---------- */
.sim-head { display: grid; grid-template-columns: 96px repeat(4, 1fr); gap: 6px; margin-bottom: 6px; }
.sim-head span { font-size: 10.5px; font-weight: 700; text-align: center; color: var(--muted); }
.sim-row { display: grid; grid-template-columns: 96px repeat(4, 1fr); gap: 6px; align-items: stretch; margin-bottom: 8px; }
.sim-row__src { display: flex; flex-direction: column; gap: 4px; }
.sim-row__src input[type='color'] { width: 100%; height: 34px; padding: 2px; border: 1.5px solid var(--line); border-radius: 7px; background: #fff; }
.sim-row__src input[type='text'] { width: 100%; border: 1.5px solid var(--line); border-radius: 7px; padding: 5px 7px; font-size: 12px; font-weight: 700; }
.sim-chip { min-height: 56px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .09); display: flex; align-items: flex-end; padding: 6px; font-size: 10px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sim-warn { border-left: 3px solid #c0492e; }
@media (max-width: 520px) {
  .sim-head, .sim-row { grid-template-columns: 76px repeat(4, 1fr); }
  .sim-chip { min-height: 46px; font-size: 9px; padding: 4px; }
  .sim-head span { font-size: 9.5px; }
}

/* Misc layout helpers */
.page-wrap { padding: 36px 0 60px; }
.page-wrap-narrow { max-width: 760px; margin-inline: auto; }
.grid-2col { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 800px) { .grid-2col { grid-template-columns: 1fr 1fr; } }
.mt-2 { margin-top: 22px; }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
