/* site.css — the website around the tool: landing, account and legal pages.
   Kept apart from styles.css, whose global button and select rules are built for the
   tool's panels. Same colours, same type. */

:root {
  color-scheme: light;
  --bg: #f4f7f2;
  --panel: #ffffff;
  --ink: #18251e;
  --muted: #5f6b62;
  --line: #dde5dc;
  --green: #2f7c4f;
  --green-dark: #1f5f3a;
  --green-soft: #e6f1e8;
  --amber: #b7791f;
  --red: #b3261e;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(38, 62, 44, 0.12);
  --page: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
a { color: var(--green-dark); }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--page); margin: 0 auto; padding: 0 20px; }

/* --- header ------------------------------------------------------------- */
.site-head { position: sticky; top: 0; z-index: 10; background: rgba(244, 247, 242, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 22px; height: 64px; }
.site-brand img { height: 34px; width: auto; }
.site-nav { display: flex; gap: 18px; margin-left: auto; align-items: center; font-size: 0.92rem; }
.site-nav a { color: var(--ink); text-decoration: none; }
.site-nav a:hover { color: var(--green-dark); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 650; font-size: 0.95rem; text-decoration: none; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: #b7c7b8; }
.btn-danger { background: #fff; color: var(--red); border-color: #efc9c6; }
.btn-danger:hover { background: #fdf2f1; }
.btn[disabled] { opacity: 0.6; cursor: default; }
.site-account { font-weight: 650; }
@media (max-width: 720px) {
  .site-nav .hide-sm { display: none; }
  .site-head .wrap { gap: 12px; }
}

/* --- hero --------------------------------------------------------------- */
.hero { padding: 64px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: center; }
.eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green); margin: 0 0 12px; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 16px; }
.hero p.lead { font-size: 1.12rem; color: var(--muted); margin: 0 0 26px; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { font-size: 0.82rem; color: var(--muted); margin-top: 14px; }
.hero-art { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 14px; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } .hero { padding-top: 36px; } }

/* --- sections ------------------------------------------------------------ */
.section { padding: 56px 0; }
.section h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); letter-spacing: -0.015em; margin: 0 0 10px; }
.section .sub { color: var(--muted); max-width: 44em; margin: 0 0 30px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card h3 { font-size: 1.05rem; margin: 10px 0 6px; }
.card p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.card-art { background: #f7faf6; border-radius: 10px; padding: 6px; }
.card-art .big { font-size: 2.4rem; font-weight: 750; color: var(--green-dark); line-height: 1.1; padding: 22px 10px 6px; }
.card-art .big small { font-size: 0.9rem; color: var(--muted); font-weight: 600; margin-left: 6px; }
.card-art .cap { font-size: 0.78rem; color: var(--muted); padding: 0 10px 16px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; counter-reset: step; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: relative; }
.step::before { counter-increment: step; content: counter(step); display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 50%; background: var(--green-soft); color: var(--green-dark); font-weight: 750; margin-bottom: 10px; }
.step h3 { margin: 0 0 6px; font-size: 1.02rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.band { background: var(--green-dark); color: #eaf4ec; border-radius: 20px; padding: 36px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; }
.band h2 { color: #fff; margin: 0 0 6px; }
.band p { margin: 0; color: #cfe3d4; }
.band .btn-primary { background: #fff; color: var(--green-dark); }
.band .btn-primary:hover { background: #eaf4ec; }
@media (max-width: 720px) { .band { grid-template-columns: 1fr; padding: 26px; } }

/* --- footer ------------------------------------------------------------- */
.site-foot { border-top: 1px solid var(--line); padding: 26px 0 40px; margin-top: 30px; font-size: 0.86rem; color: var(--muted); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.site-foot nav { display: flex; gap: 16px; margin-left: auto; }
.site-foot a { color: var(--muted); }

/* --- account page -------------------------------------------------------- */
.acct { padding-top: 40px; padding-bottom: 20px; }
.auth-box { max-width: 420px; margin: 20px auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 26px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #eef3ed; padding: 4px; border-radius: 10px; margin-bottom: 20px; }
.auth-tabs button { border: 0; background: none; padding: 8px; border-radius: 8px; font: inherit; font-weight: 650; color: var(--muted); cursor: pointer; }
.auth-tabs button.is-on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 5px; }
.field input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font: inherit; background: #fbfdfb; }
.field input:focus { outline: 2px solid #a9cdb4; outline-offset: 0; border-color: #a9cdb4; }
.field small { display: block; color: var(--muted); font-size: 0.76rem; margin-top: 4px; }
.form-error { color: var(--red); background: #fdf2f1; border-radius: 8px; padding: 8px 10px; font-size: 0.86rem; margin: 0 0 12px; }
.form-ok { color: var(--green-dark); background: var(--green-soft); border-radius: 8px; padding: 8px 10px; font-size: 0.86rem; margin: 0 0 12px; }
.auth-box .btn { width: 100%; }
.fine { font-size: 0.78rem; color: var(--muted); margin-top: 14px; text-align: center; }
.acct-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
.acct-head h1 { margin: 0; font-size: 1.6rem; }
.acct-head .who { color: var(--muted); }
.acct-head .actions { margin-left: auto; display: flex; gap: 10px; }
.acct-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .acct-grid { grid-template-columns: 1fr; } }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel h2 { font-size: 1.05rem; margin: 0 0 12px; }
.panel + .panel { margin-top: 18px; }
.designs { display: grid; gap: 10px; }
.design { display: grid; grid-template-columns: 116px minmax(0, 1fr) auto; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.design-thumb { background: #f7faf6; border-radius: 8px; padding: 2px; }
.design h3 { margin: 0 0 3px; font-size: 1rem; }
.design .meta { color: var(--muted); font-size: 0.8rem; }
.design .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { font-size: 0.72rem; padding: 2px 8px; border-radius: 10px; background: #eef1ee; color: #44544a; }
.chip.ok { background: var(--green-soft); color: var(--green-dark); }
.chip.warn { background: #faeed6; color: #8a5b12; }
.chip.bad { background: #fbe3e1; color: #8e1d17; }
.design .row-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.design .row-actions .btn { padding: 6px 10px; font-size: 0.82rem; }
@media (max-width: 640px) { .design { grid-template-columns: 80px minmax(0, 1fr); } .design .row-actions { grid-column: 1 / -1; justify-content: flex-start; } }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.stack > * + * { margin-top: 10px; }
.danger-zone { border-color: #efc9c6; }

/* --- legal pages ------------------------------------------------------------ */
.legal { max-width: 760px; padding: 40px 20px 20px; }
.legal h1 { font-size: 1.9rem; margin: 0 0 4px; }
.legal .updated { color: var(--muted); font-size: 0.85rem; margin: 0 0 24px; }
.legal h2 { font-size: 1.15rem; margin: 26px 0 8px; }
.legal li { margin-bottom: 6px; }

/* --- the house drawing (houseMap.js), as the website uses it ------------------- */
.hm { display: block; width: 100%; height: auto; }
.hm .hm-ground { fill: #f1f4ef; stroke: #e2e8e0; stroke-width: 1; }
.hm .hm-skin { fill: #cfe3d6; fill-opacity: 0.14; stroke: #b9cfc0; stroke-width: 0.8; }
.hm .hm-part { fill: none; stroke: #8d9b91; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.hm .hm-thin { stroke-width: 0.9; }
.hm .hm-thick { stroke-width: 2.4; }
.hm .hm-joint { fill: #8d9b91; stroke: none; }
.hm .hm-block { fill: #ddd6c6; stroke: #b8b09c; stroke-width: 0.8; }
.hm .hm-part.hm-dim { stroke: #d6ddd7; }
.hm .hm-joint.hm-dim { fill: #d6ddd7; }
.hm .hm-block.hm-dim { fill: #efece4; stroke: #e0dccf; }
.hm .hm-skin.hm-dim { fill-opacity: 0.06; stroke: #e1e8e3; }
.hm .hm-ok { --t: #1f7a4a; }
.hm .hm-near { --t: #c98a1a; }
.hm .hm-over { --t: #c0392b; }
.hm .hm-lit.hm-part { stroke: var(--t); stroke-width: 3; }
.hm .hm-lit.hm-thin { stroke-width: 2.4; }
.hm .hm-lit.hm-joint { fill: var(--t); }
.hm .hm-lit.hm-block { fill: var(--t); fill-opacity: 0.75; stroke: var(--t); }
.hm .hm-skin.hm-lit { fill: var(--t); fill-opacity: 0.16; stroke: var(--t); stroke-width: 1.4; }
.hm .hm-grip { stroke: var(--t, #1f7a4a); stroke-width: 3.6; }
.hm .hm-part.hm-ok:not(.hm-lit) { stroke: #57a376; }
.hm .hm-part.hm-near:not(.hm-lit) { stroke: #dca23a; stroke-width: 2.2; }
.hm .hm-part.hm-over:not(.hm-lit) { stroke: #c9453a; stroke-width: 2.8; }
.hm .hm-joint.hm-ok:not(.hm-lit) { fill: #57a376; }
.hm .hm-block.hm-ok:not(.hm-lit) { fill: #bfdcc8; stroke: #57a376; }
.hm .hm-skin.hm-ok:not(.hm-lit) { fill: #57a376; fill-opacity: 0.08; }
.hm text.hm-tag { font-size: 14px; font-weight: 700; fill: var(--t); paint-order: stroke; stroke: #fff; stroke-width: 4px; }
.hm .hm-leader { stroke: var(--t); stroke-width: 1.2; stroke-dasharray: 3 3; fill: none; }
.hm .hm-sun-disc { fill: #f4c542; }
.hm .hm-sun { stroke: #f4c542; stroke-width: 2; }
.hm .hm-cloud { fill: #dbe4ea; stroke: #b9c6cf; stroke-width: 1; }
.hm .hm-rain { stroke: #5b9bd5; stroke-width: 1.6; }
.hm .hm-wind, .hm .hm-wind-head { fill: none; stroke: #7aa6c8; stroke-width: 1.8; stroke-linecap: round; }
