/* Layout: brand header, then a two-column working area (controls left, sticky estimate slip right),
   then the cost guide in one reading column. Tokens copied from esenov.pro styles.css.
   Single light theme on purpose: the page must look like the live site. */
:root {
  --chalk: #F1F2EF;      /* page ground */
  --paper: #FAFAF8;      /* panels */
  --concrete: #C6C4BF;   /* quiet rules, inactive */
  --graphite: #232624;   /* text, primary buttons */
  --stone: #62605A;      /* secondary text */
  --brass: #9C7437;      /* brand accent */
  --brass-text: #7A5A28; /* accent text on light */
  --blueprint: #2D4B70;  /* plan drawing */
  --plan-fill: #E3E9F0;  /* plan wash */
  --line: #D6D5D0;       /* borders */
  --white: #FFFFFF;
  --display: "Tenor Sans", "Avenir Next", "Segoe UI", Arial, sans-serif;
  --text: "Onest", "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: min(1200px, 100% - 2rem);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  background: var(--chalk);
  color: var(--graphite);
  font: 400 17px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brass-text); }
:focus-visible { outline: 2px solid var(--blueprint); outline-offset: 2px; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: -0.005em; text-wrap: balance; margin: 0; }
h3 { font-weight: 600; font-size: 1.05rem; margin: 0; }
p { margin: 0; }
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border: 1px solid var(--graphite);
  background: var(--graphite); color: var(--chalk); font: 500 0.95rem/1 var(--text);
  text-decoration: none; cursor: pointer; border-radius: 0;
}
.btn:hover { background: #3a3e3b; color: var(--chalk); }
.btn--ghost { background: transparent; color: var(--graphite); }
.btn--ghost:hover { background: var(--paper); color: var(--graphite); }

/* Hero */
.hero { padding-block: 48px 28px; }
.hero h1 { font-size: clamp(2.05rem, 1.1rem + 3.4vw, 3.5rem); line-height: 1.08; max-width: 19ch; }
.hero p { margin-top: 18px; max-width: 62ch; color: var(--stone); font-size: 1.08rem; }
.hero p strong { color: var(--graphite); font-weight: 600; }

/* Calculator grid */
.calc { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 28px; align-items: start; padding-bottom: 72px; }
@media (max-width: 900px) { .calc { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--paper); border: 1px solid var(--line); padding: clamp(18px, 3vw, 32px); display: grid; gap: 30px; min-width: 0; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 12px; }
legend { font-weight: 600; font-size: 1rem; padding: 0; margin-bottom: 12px; }
.hint { color: var(--stone); font-size: 0.88rem; }

/* Choice tiles (radio) */
.tiles { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tiles--wide { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
#materials { grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); }
.tile { position: relative; display: block; cursor: pointer; }
.tile input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tile > span {
  display: grid; gap: 4px; height: 100%;
  padding: 12px 14px; border: 1px solid var(--line); background: var(--white);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.tile:hover > span { border-color: var(--concrete); }
.tile input:checked + span { border-color: var(--graphite); box-shadow: inset 0 0 0 1px var(--graphite); background: var(--white); }
.tile input:focus-visible + span { outline: 2px solid var(--blueprint); outline-offset: 2px; }
.tile .t-name { font-weight: 500; line-height: 1.3; }
.tile .t-sub { color: var(--stone); font-size: 0.85rem; line-height: 1.4; }
.tile .t-rate { font-family: var(--display); font-size: 1.35rem; line-height: 1.1; }
.tile .t-rate small { font-family: var(--text); font-size: 0.8rem; color: var(--stone); }
.tile input:checked + span .t-rate { color: var(--brass-text); }

/* Area */
.area-row { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.area-input { display: flex; align-items: center; border: 1px solid var(--line); background: var(--white); flex: 1 1 180px; min-width: 0; }
.area-input input {
  border: 0; background: transparent; font: 400 1.5rem/1 var(--display); padding: 10px 14px;
  width: 100%; min-width: 0; color: var(--graphite); font-variant-numeric: tabular-nums;
}
.area-input input:focus { outline: none; }
.area-input:focus-within { border-color: var(--graphite); }
.area-input span { padding-right: 14px; color: var(--stone); white-space: nowrap; }
.seg { display: inline-flex; border: 1px solid var(--line); background: var(--white); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; height: 100%; min-height: 46px; padding: 0 16px; cursor: pointer; color: var(--stone); }
.seg input:checked + span { background: var(--graphite); color: var(--chalk); }
.seg input:focus-visible + span { outline: 2px solid var(--blueprint); outline-offset: -2px; }
input[type="range"] { width: 100%; accent-color: var(--graphite); height: 28px; margin: 0; }
.range-ends { display: flex; justify-content: space-between; color: var(--stone); font-size: 0.8rem; }

/* Stepper */
.stepper { justify-self: start; display: inline-flex; align-items: center; border: 1px solid var(--line); background: var(--white); }
.stepper button { width: 46px; height: 46px; border: 0; background: transparent; font-size: 1.3rem; cursor: pointer; color: var(--graphite); }
.stepper button:disabled { color: var(--concrete); cursor: default; }
.stepper output { min-width: 40px; text-align: center; font: 400 1.3rem/1 var(--display); }

/* Checkbox rows */
.checks { display: grid; gap: 0; border-top: 1px solid var(--line); }
.check { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--graphite); flex: none; margin: 0; }
.check .c-name { flex: 1; min-width: 0; }
.check .c-price { color: var(--stone); font-size: 0.9rem; white-space: nowrap; }
.ex {
  display: inline-block; font-size: 0.72rem; line-height: 1; padding: 3px 6px; margin-left: 6px;
  border: 1px solid var(--brass); color: var(--brass-text); vertical-align: 2px; white-space: nowrap;
}

/* Estimate slip */
.slip {
  position: sticky; top: 16px; background: var(--white); border: 1px solid var(--graphite);
  padding: clamp(18px, 2.6vw, 28px); display: grid; gap: 18px; min-width: 0;
}
@media (max-width: 900px) { .slip { position: static; } }
.slip-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.slip-head h2 { font-size: 1.25rem; }
.slip-head span { color: var(--stone); font-size: 0.85rem; text-align: right; }
.summary { color: var(--stone); font-size: 0.92rem; }
.total-label { font-size: 0.9rem; color: var(--stone); }
.total { font-family: var(--display); font-size: clamp(2.1rem, 1.4rem + 2.2vw, 2.9rem); line-height: 1.05; font-variant-numeric: tabular-nums; }
.total small { font-size: 0.45em; color: var(--stone); font-family: var(--text); }
.total small:empty { display: none; }
.facts { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px 18px; }
@media (max-width: 420px) { .facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .facts > div:first-child { grid-column: 1 / -1; } }
.facts div { display: grid; gap: 2px; }
.facts dt { font-size: 0.8rem; color: var(--stone); }
.facts dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }

/* Floor plan: the one memorable element. A typical layout for the chosen type and size,
   built room by room, with true dimensions and a scale bar. */
.plan-title { font-size: 0.9rem; font-weight: 500; margin-bottom: 8px; }
.plan-box {
  position: relative; width: 100%; max-width: 100%; aspect-ratio: 1.45 / 1;
  background-color: var(--paper);
  background-image: radial-gradient(var(--line) 1px, transparent 1.3px);
  background-size: 14px 14px;
  border: 1px solid var(--line); overflow: hidden;
}
.pl {
  position: absolute; box-sizing: border-box;
  transition: left .45s cubic-bezier(.2, .7, .2, 1), top .45s cubic-bezier(.2, .7, .2, 1),
              width .45s cubic-bezier(.2, .7, .2, 1), height .45s cubic-bezier(.2, .7, .2, 1), opacity .35s ease;
}
.pl.is-out { opacity: 0; }
.room {
  border: 1px solid var(--graphite); background: var(--white);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  text-align: center; overflow: hidden; padding: 2px 3px;
  font-size: 0.66rem; line-height: 1.15; color: var(--graphite);
}
.room.wet { background: var(--plan-fill); }
.room .r-area { color: var(--stone); font-size: 0.6rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.room span { white-space: nowrap; }
.wall { border: 3px solid var(--graphite); pointer-events: none; }
.garden { border: 1.5px dashed var(--brass); }
.terrace {
  border: 1.5px dashed var(--brass);
  background: repeating-linear-gradient(45deg, transparent 0 6px, rgba(156, 116, 55, .16) 6px 7px);
  display: flex; align-items: center; justify-content: center;
}
.tag { font-size: 0.64rem; color: var(--brass-text); white-space: nowrap; line-height: 1; }
.flabel { font-size: 0.64rem; color: var(--stone); white-space: nowrap; line-height: 1; }
.dim-h { border-top: 1px solid var(--blueprint); }
.dim-h::before, .dim-h::after { content: ""; position: absolute; top: -4px; width: 1px; height: 7px; background: var(--blueprint); }
.dim-h::before { left: 0; }
.dim-h::after { right: 0; }
.dim-v { border-left: 1px solid var(--blueprint); }
.dim-v::before, .dim-v::after { content: ""; position: absolute; left: -4px; height: 1px; width: 7px; background: var(--blueprint); }
.dim-v::before { top: 0; }
.dim-v::after { bottom: 0; }
.dim-t {
  position: absolute; font-size: 0.62rem; color: var(--blueprint); white-space: nowrap;
  font-variant-numeric: tabular-nums; background: var(--paper); padding: 0 3px; line-height: 1.2;
}
.dim-h .dim-t { left: 50%; top: -8px; transform: translateX(-50%); }
.dim-v .dim-t { left: 0; top: 50%; transform: translate(-50%, -50%) rotate(-90deg); }
.scalebar { height: 6px; border: 1px solid var(--graphite); background: linear-gradient(90deg, var(--graphite) 50%, var(--white) 50%); }
.scalebar span { position: absolute; top: -14px; font-size: 0.6rem; color: var(--graphite); white-space: nowrap; line-height: 1; }
.scalebar .s0 { left: -2px; }
.scalebar .s1 { right: -2px; }
.plan-note { color: var(--stone); font-size: 0.78rem; margin-top: 6px; }
.case-line { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--concrete); font-size: 0.88rem; }
.case-line b { font-weight: 600; }

.lines { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; font-size: 0.92rem; }
.lines .l-amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lines .bar { grid-column: 1 / -1; height: 4px; background: var(--chalk); }
.lines .bar i { display: block; height: 100%; background: var(--graphite); width: 0; transition: width .4s cubic-bezier(.2, .7, .2, 1); }
.lines li.is-ex .bar i { background: var(--brass); }
.materials { border-top: 1px dashed var(--concrete); padding-top: 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; font-size: 0.92rem; }
.materials .note { grid-column: 1 / -1; color: var(--stone); font-size: 0.82rem; }
.disclaimer { color: var(--stone); font-size: 0.8rem; line-height: 1.5; }
.actions { display: grid; gap: 8px; }
.actions .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.empty { color: var(--stone); }

/* Mobile sticky bar */
.mbar { display: none; }
@media (max-width: 900px) {
  .mbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; align-items: center; gap: 12px;
    background: var(--graphite); color: var(--chalk);
    padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  }
  .mbar .m-total { flex: 1; min-width: 0; font-family: var(--display); font-size: 1.25rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
  .mbar .m-total small { display: block; font-family: var(--text); font-size: 0.75rem; color: var(--concrete); }
  .mbar .btn { background: var(--chalk); color: var(--graphite); border-color: var(--chalk); }
  body { padding-bottom: 76px; }
}

/* Guide */
.guide { background: var(--paper); border-top: 1px solid var(--line); }
.guide .wrap { padding-block: 64px 80px; display: grid; gap: 56px; }
.sec { display: grid; gap: 16px; max-width: 760px; }
.sec h2 { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.1rem); line-height: 1.15; }
.sec p { max-width: 66ch; }
.sec p + p { margin-top: 2px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); background: var(--white); }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 0.95rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; background: var(--chalk); }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.factors { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.factors div { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.factors p { color: var(--stone); font-size: 0.95rem; }
.stages { list-style: none; margin: 0; padding: 0; counter-reset: st; border-top: 1px solid var(--line); }
.stages li { counter-increment: st; display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.stages li::before { content: counter(st); font-family: var(--display); color: var(--brass-text); font-size: 1.2rem; line-height: 1.3; }
.stages b { font-weight: 600; }
.stages p { grid-column: 2; color: var(--stone); font-size: 0.93rem; }
.stages .dur { grid-column: 3; grid-row: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; padding: 16px 0; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--display); font-size: 1.3rem; line-height: 1; color: var(--brass-text); }
details[open] summary::after { content: "−"; }
details p { padding-bottom: 16px; color: var(--stone); }

/* Request form */
.request { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; max-width: none; }
@media (max-width: 820px) { .request { grid-template-columns: minmax(0, 1fr); } }
.request form { display: grid; gap: 14px; background: var(--white); border: 1px solid var(--line); padding: clamp(18px, 3vw, 28px); min-width: 0; }
.field { display: grid; gap: 6px; }
.field label { font-size: 0.9rem; font-weight: 500; }
.field input, .field textarea {
  font: 400 1rem/1.5 var(--text); color: var(--graphite); border: 1px solid var(--line); background: var(--paper);
  padding: 11px 12px; width: 100%; min-width: 0; border-radius: 0;
}
.field textarea { min-height: 150px; resize: vertical; font-size: 0.9rem; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--graphite); }
.status { font-size: 0.9rem; color: var(--stone); min-height: 1.4em; }
.status.err { color: #9B2C2C; }
.status.ok { color: var(--blueprint); }
.contact-list { display: grid; gap: 14px; align-content: start; }
.contact-list div { display: grid; gap: 2px; }
.contact-list dt { color: var(--stone); font-size: 0.85rem; }
.contact-list dd { margin: 0; font-size: 1.1rem; }
.copy-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.linkbtn { background: none; border: 0; padding: 0; font: 500 0.88rem var(--text); color: var(--brass-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 32px; }


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

.consent { color: var(--stone); font-size: 0.8rem; line-height: 1.5; }
.form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- site header and footer, copied from styles.css ---------- */
.skip{position:absolute;left:-999px;top:0;background:var(--graphite);color:var(--chalk);padding:.6rem 1rem;z-index:100}
.skip:focus{left:1rem}
.site-head{position:sticky;top:0;z-index:50;background:rgba(241,242,239,.94);backdrop-filter:blur(8px);border-bottom:1px solid var(--line);padding-top:env(safe-area-inset-top,0px)}
.site-head__row{display:flex;align-items:center;gap:1.5rem;min-height:4.5rem}
/* wordmark: mark | ESENOV over a small brass descriptor, split by a drawing-style rule */
.logo{display:flex;align-items:center;gap:.85rem;color:var(--graphite);text-decoration:none;white-space:nowrap}
.logo__mark{width:36px;height:36px;flex:none}
.logo__text{display:flex;flex-direction:column;align-items:flex-start;padding-left:.85rem;border-left:1px solid var(--concrete);line-height:1}
.logo__name{font-family:var(--display);font-size:1.4rem;letter-spacing:.3em;margin-right:-.3em;text-transform:uppercase}
.logo__tag{margin-top:.4rem;font:500 .6rem/1 var(--text);letter-spacing:.28em;text-transform:uppercase;color:var(--brass-text)}
.nav{margin-left:auto}
.nav ul{display:flex;gap:1.4rem;list-style:none;margin:0;padding:0}
.nav a{color:var(--graphite);text-decoration:none;font-size:.97rem;padding:.3rem 0;border-bottom:1px solid transparent}
.nav a:hover{border-bottom-color:var(--brass)}
.head-phones{display:flex;flex-direction:column;font-size:.85rem;line-height:1.35;text-align:right}
.head-phones a{color:var(--graphite);text-decoration:none}
.head-phones small{color:var(--stone)}
.burger{display:none;flex:none;margin-left:auto;background:none;border:1.5px solid var(--graphite);width:2.9rem;height:2.9rem;cursor:pointer;color:var(--graphite)}
.burger svg{width:22px;height:22px}
@media (max-width:1080px){.head-phones{display:none}}
@media (max-width:860px){
  .burger{display:inline-flex;align-items:center;justify-content:center}
  .site-head .btn{display:none}
  .nav{position:absolute;left:0;right:0;top:100%;background:var(--chalk);border-bottom:1px solid var(--line);display:none;margin:0}
  .nav.is-open{display:block}
  .nav ul{flex-direction:column;gap:0;width:var(--wrap);margin:0 auto;padding:.5rem 0 1rem}
  .nav a{display:block;padding:.8rem 0;border-bottom:1px solid var(--line)}
}
.nap{font-style:normal;display:flex;flex-direction:column;gap:.25rem}
.nap__name{font-weight:500}
.nap a{color:var(--graphite);font-size:1.15rem;font-weight:500}
.site-foot{background:var(--graphite);color:#CFCEC8;padding:3.5rem 0 calc(2rem + env(safe-area-inset-bottom,0px));font-size:.95rem}
.site-foot a{color:#E6E6E2}
.site-foot .logo{color:#F3F3F0}
.site-foot .logo__text{border-left-color:#4A4E4B}
.site-foot .logo__tag{color:#C29B5C}
.foot__grid{display:grid;grid-template-columns:1.2fr 1fr 1fr 1fr;gap:2rem}
.foot__links{list-style:none;margin:0;padding:0;display:grid;gap:.35rem}
.foot__links a{text-decoration:none}
.foot__links a:hover{text-decoration:underline}
.nap--footer a{color:#F3F3F0;font-size:1rem}
.foot__copy{margin-top:3rem;padding-top:1.5rem;border-top:1px solid #3B3F3C;color:#9E9D97;font-size:.87rem;max-width:none}
@media (max-width:860px){.foot__grid{grid-template-columns:1fr 1fr}}
@media (max-width:460px){.foot__grid{grid-template-columns:1fr}}
.lang{display:inline-flex;align-items:center;justify-content:center;min-width:2.9rem;height:2.9rem;border:1.5px solid var(--graphite);
  color:var(--graphite);text-decoration:none;font-weight:500;font-size:.9rem}
.lang:hover{background:var(--graphite);color:var(--chalk)}
.lang{flex:none}
@media (max-width:860px){.burger{margin-left:auto}}
@media (max-width:400px){.site-head__row{gap:.6rem}.logo{gap:.6rem}.logo__mark{width:30px;height:30px}.logo__text{padding-left:.6rem}.logo__name{font-size:1.15rem;letter-spacing:.24em;margin-right:-.24em}.logo__tag{font-size:.52rem;letter-spacing:.22em}}
.foot__h{color:#F3F3F0;font-weight:500;margin-bottom:.6rem}
.foot__lic{font-size:.85rem;color:#9E9D97}
.site-foot .nap{margin-bottom:1.2rem}
.calc-more{margin-top:1rem}
