/* Bungalow 10 × 9 — light site for the owner and the builders.
   One accent (Rishtan ceramic blue), Golos Text for everything, Unbounded only for page and section titles. */
:root{
  --paper:#f3f5f3; --surface:#ffffff; --ink:#1c2528; --muted:#58656a; --line:#d6dcda;
  --accent:#0d6a86; --accent-ink:#ffffff; --accent-soft:#dfecf0; --desk:#cdd4d6; --sky:#cfdde6;
  --body:'Golos Text',system-ui,-apple-system,'Segoe UI',sans-serif;
  --display:'Unbounded','Golos Text',system-ui,sans-serif;
  --r-s:6px; --r-l:14px; --wrap:1240px;
}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){
  --paper:#121819; --surface:#1a2225; --ink:#e6ecec; --muted:#9aa8ab; --line:#2b3639;
  --accent:#5bb6d1; --accent-ink:#0b1a1f; --accent-soft:#17323a; --desk:#0d1214; color-scheme:dark}}
:root[data-theme="dark"]{
  --paper:#121819; --surface:#1a2225; --ink:#e6ecec; --muted:#9aa8ab; --line:#2b3639;
  --accent:#5bb6d1; --accent-ink:#0b1a1f; --accent-soft:#17323a; --desk:#0d1214; color-scheme:dark}

*,*::before,*::after{box-sizing:border-box}
[hidden]{display:none!important}
html{background:var(--paper)}
body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--body);font-size:16px;line-height:1.55;-webkit-text-size-adjust:100%}
a{color:var(--accent)}
a:focus-visible,button:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}
.wrap{max-width:var(--wrap);margin:0 auto;padding-inline:16px}
h1,h2{font-family:var(--display);font-weight:600;letter-spacing:-.01em;line-height:1.12;margin:0;text-wrap:balance}
h2{font-size:clamp(22px,2.6vw,30px)}
h3{font-size:18px;font-weight:600;margin:0}
p{margin:0}

/* header */
.site{border-bottom:1px solid var(--line);background:var(--surface)}
.site .wrap{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:60px;flex-wrap:wrap}
.brand{font-family:var(--display);font-weight:600;font-size:17px;color:var(--ink);text-decoration:none;white-space:nowrap}
.site nav{display:flex;gap:4px}
.site nav a{color:var(--ink);text-decoration:none;font-weight:500;padding:18px 12px 16px;border-bottom:3px solid transparent}
.site nav a:hover{color:var(--accent)}
.site nav a[aria-current="page"]{border-bottom-color:var(--accent);color:var(--accent)}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:0 20px;border-radius:var(--r-s);font:inherit;font-weight:600;text-decoration:none;cursor:pointer;border:1px solid var(--accent);transition:background-color .15s,color .15s}
.btn-main{background:var(--accent);color:var(--accent-ink)}
.btn-main:hover{background:color-mix(in srgb,var(--accent) 86%,#000)}
.btn-quiet{background:transparent;color:var(--accent)}
.btn-quiet:hover{background:var(--accent-soft)}
.btn:active{transform:scale(.98)}

/* overview: hero */
.hero{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:40px;align-items:center;padding-block:48px 40px}
.hero h1{font-size:clamp(30px,3.7vw,52px)}
.hero .lead{font-size:19px;color:var(--muted);margin-top:18px;max-width:38ch}
.hero .actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:28px}
.hero picture img{display:block;width:100%;height:auto;border-radius:var(--r-l)}
.facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));margin:0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.facts div{padding:18px 18px 18px 0}
.facts dt{color:var(--muted);font-size:14px}
.facts dd{margin:2px 0 0;font-size:22px;font-weight:600;font-variant-numeric:tabular-nums}

/* overview: sections */
.section{padding-block:56px 8px}
.section > p.intro{color:var(--muted);margin-top:10px;max-width:60ch}
.rooms-grid{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:32px;align-items:start;margin-top:28px}
.plan-box{background:#fbfbf8;border:1px solid var(--line);border-radius:var(--r-l);padding:12px}
.plan-box svg{display:block;width:100%;height:auto}
.plan-box svg text{font-family:var(--body)}
.plan-box svg text:not([fill]){fill:#1c1c1a}
.room-hit{fill:#0d6a86;fill-opacity:0;cursor:pointer;transition:fill-opacity .15s}
.room-hit:hover,.room-hit.on{fill-opacity:.16}
.room-list{list-style:none;margin:0;padding:0;border-top:1px solid var(--line)}
.room-list li{border-bottom:1px solid var(--line)}
.room-list a{display:grid;grid-template-columns:30px 1fr auto;gap:0 12px;align-items:center;padding:12px 6px;color:var(--ink);text-decoration:none}
.room-list a:hover,.room-list a.on{background:var(--accent-soft)}
.room-list .n{grid-row:span 2;width:26px;height:26px;border-radius:50%;border:1.5px solid currentColor;display:grid;place-items:center;font-size:13px;font-weight:600}
.room-list .name{font-weight:600}
.room-list .area{font-weight:600;font-variant-numeric:tabular-nums;text-align:right}
.room-list .floor{color:var(--muted);font-size:14px}
.room-list .go{color:var(--accent);font-size:14px;text-align:right}
.room-total{display:flex;justify-content:space-between;padding:12px 6px;font-weight:600}
.room-total span:last-child{font-variant-numeric:tabular-nums}
.sheets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px;margin-top:28px}
.sheets a{color:var(--ink);text-decoration:none;display:block}
.sheets img{display:block;width:100%;height:auto;border:1px solid var(--line);border-radius:var(--r-s);background:#fbfbf8}
.sheets a:hover img{border-color:var(--accent)}
.sheets h3{margin-top:14px}
.sheets a:hover h3{color:var(--accent)}
.sheets p{color:var(--muted);margin-top:4px;font-size:15px}
.docs{list-style:none;margin:20px 0 0;padding:0;border-top:1px solid var(--line);max-width:760px}
.docs li{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 0;border-bottom:1px solid var(--line)}
.docs span{color:var(--muted);font-size:14px;white-space:nowrap}
.foot{color:var(--muted);font-size:14px;padding-block:56px 40px}

/* 3D page */
.page-3d{padding-block:16px 32px}
.page-3d h1{font-size:22px;margin-bottom:12px}
.stage{position:relative;height:clamp(420px,calc(100svh - 250px),860px);border-radius:var(--r-l);overflow:hidden;background:var(--sky)}
.stage canvas{display:block;width:100%;height:100%;touch-action:none}
.labels{position:absolute;inset:0;pointer-events:none}
.lbl{position:absolute;transform:translate(-50%,-50%);background:rgba(255,255,255,.94);color:#1b2327;border-radius:4px;padding:3px 8px;font-size:13px;line-height:1.25;text-align:center;white-space:nowrap;box-shadow:0 1px 3px rgba(0,0,0,.18)}
.lbl b{display:block;font-weight:600;color:#0d6a86;font-variant-numeric:tabular-nums}
.hint{position:absolute;left:12px;bottom:12px;background:rgba(18,26,30,.75);color:#f1f5f6;font-size:14px;padding:7px 12px;border-radius:var(--r-s);max-width:calc(100% - 24px)}
.stage.walk .hint{bottom:auto;top:12px}
.pad{position:absolute;right:12px;bottom:12px;display:grid;grid-template-columns:repeat(3,46px);gap:5px}
.pad button{width:46px;height:46px;border-radius:10px;border:0;background:rgba(18,26,30,.72);color:#fff;font-size:18px;cursor:pointer;user-select:none;-webkit-user-select:none;touch-action:none}
.pad .sp{visibility:hidden}
.toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:12px 24px;padding-block:14px 0}
.seg{display:inline-flex;flex-wrap:wrap;gap:3px;background:var(--surface);border:1px solid var(--line);padding:3px;border-radius:10px}
.seg button,.seg a{font:inherit;font-weight:500;display:inline-flex;align-items:center;min-height:42px;padding:0 16px;border:0;border-radius:7px;background:transparent;color:var(--ink);cursor:pointer;text-decoration:none}
.seg button:hover,.seg a:hover{background:var(--accent-soft)}
.seg button[aria-pressed="true"],.seg a[aria-current="page"]{background:var(--accent);color:var(--accent-ink)}
.opts{display:flex;flex-wrap:wrap;align-items:center;gap:6px 20px}
.tog{display:inline-flex;align-items:center;gap:8px;cursor:pointer;user-select:none;min-height:42px}
.tog input{accent-color:var(--accent);width:18px;height:18px}
.range{display:inline-flex;align-items:center;gap:10px}
.range input{width:160px;accent-color:var(--accent)}
.range output{min-width:52px;font-variant-numeric:tabular-nums;font-weight:600}
.rooms{display:flex;flex-wrap:wrap;gap:8px}
.rooms button{font:inherit;font-size:15px;min-height:40px;border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:999px;padding:0 14px;cursor:pointer}
.rooms button:hover{border-color:var(--accent);color:var(--accent)}
.opts .lab{color:var(--muted)}

/* drawing pages */
.page-sheet{padding-block:16px 32px}
.subnav{margin-bottom:16px}
.sheet-grid{display:grid;grid-template-columns:300px minmax(0,1fr);gap:24px;align-items:start}
.sheet-info h1{font-size:26px}
.sheet-info .lead{color:var(--muted);margin-top:10px}
.sheet-info dl{margin:20px 0 0;border-top:1px solid var(--line)}
.sheet-info dl div{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}
.sheet-info dt{color:var(--muted)}
.sheet-info dd{margin:0;font-weight:600;text-align:right;font-variant-numeric:tabular-nums}
.sheet-info .actions{display:flex;flex-direction:column;gap:10px;margin-top:22px}
.sheet-info .tip{color:var(--muted);font-size:14px;margin-top:18px}
.viewer{position:relative;height:clamp(460px,calc(100svh - 150px),980px);background:var(--desk);border-radius:var(--r-l);overflow:hidden;touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none}
.viewer.dragging{cursor:grabbing}
.viewer .canvas{position:absolute;left:0;top:0;transform-origin:0 0}
.viewer .canvas svg{display:block;background:#fbfbf8;box-shadow:0 4px 18px rgba(0,0,0,.22)}
.viewer svg text{font-family:var(--body)}
.viewer svg text:not([fill]){fill:#1c1c1a}
.viewer svg .mono{font-variant-numeric:tabular-nums}
.viewer-wrap{position:relative;min-width:0}
.zoomctl{position:absolute;right:12px;top:12px;display:flex;gap:4px;z-index:2}
.zoomctl button{font:inherit;font-weight:600;min-width:44px;height:44px;padding:0 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);cursor:pointer}
.zoomctl button:hover{border-color:var(--accent);color:var(--accent)}

@media (max-width:900px){
  .hero{grid-template-columns:1fr;gap:24px;padding-block:24px 28px}
  .hero picture{order:-1}
  .rooms-grid{grid-template-columns:1fr}
  .sheets{grid-template-columns:1fr;gap:24px}
  .sheet-grid{grid-template-columns:1fr}
  .sheet-info{order:2}
  .viewer{height:auto;aspect-ratio:1682/1189}
  .zoomctl{position:static;justify-content:flex-end;margin-bottom:8px}
}
@media (max-width:520px){
  .site .wrap{min-height:0;padding-top:10px;gap:0}
  .site nav{width:100%;justify-content:space-between}
  .site nav a{padding:12px 6px 10px}
  .hero .lead{font-size:17px}
  .facts dd{font-size:19px}
  .stage{height:62svh}
  .lbl{font-size:10.5px;padding:2px 5px}
  .pad{grid-template-columns:repeat(3,40px)}.pad button{width:40px;height:40px}
  .seg button,.seg a{padding:0 9px;font-size:15px}
  .subnav{display:flex;flex-wrap:nowrap;overflow-x:auto;width:100%}
  .subnav a{white-space:nowrap}
  .page-3d h1{font-size:18px;margin-bottom:8px}
  .range input{width:120px}
}
@media (prefers-reduced-motion: reduce){*{transition:none!important}}
