:root {
  color-scheme: light; --paper: #ffffff; --canvas: #fffdfa; --ink: #111111;
  --ink-soft: #625f5b; --accent: #ff5b3d; --orange: #ff5b3d; --sage: #f8f1eb; --line: #ded9d4;
  --error: #9f2f27; --display: Georgia, "Times New Roman", serif; --body: Arial, Helvetica, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); font: 16px/1.55 var(--body); }
button, input { font: inherit; }
a { color: inherit; }
h1, h2 { font-family: var(--display); letter-spacing: -1.3px; }

.site-header { min-height: 76px; padding: 8px clamp(22px, 5vw, 72px); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 36px; position: sticky; top: 0; z-index: 20; background: rgba(255,253,250,.95); border-bottom: 1px solid rgba(17,17,17,.08); backdrop-filter: blur(14px); }
.brand { display: inline-flex; flex-direction: column; align-items: flex-start; text-decoration: none; font: 900 21px/.9 var(--body); letter-spacing: .05em; }
.brand i { color: var(--accent); font-style: normal; }
.brand small { margin-top: 5px; font-size: 10px; letter-spacing: .16em; }
.brand__mark { width: 38px; height: 38px; display: grid; place-items: center; border: 2px solid currentColor; border-radius: 8px; font: 700 25px/1 var(--body); }
.site-header nav { display: flex; gap: 36px; }
.site-header nav a { text-decoration: none; font-weight: 700; }
.site-header nav a:hover { color: var(--orange); }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 18px; }
.language-switch { display: flex; align-items: center; gap: 5px; color: #aaa29b; }
.language-switch button { min-width: 28px; height: 36px; border: 0; padding: 0; color: #aaa29b; background: transparent; font-weight: 850; cursor: pointer; }
.language-switch button[aria-pressed="true"] { color: var(--ink); }
.all-tools { padding: 11px 17px; border: 0; border-radius: 5px; color: white; background: var(--accent); text-decoration: none; font-weight: 800; transition: .2s ease; }
.all-tools:hover { color: white; background: #e9482d; transform: translateY(-2px); }

.page-hero { padding: 64px clamp(22px, 5vw, 72px) 76px; display: grid; grid-template-columns: minmax(320px,.78fr) minmax(600px,1.22fr); align-items: center; gap: clamp(36px, 6vw, 92px); background: linear-gradient(90deg, rgba(255,253,250,.98), rgba(255,253,250,.72)), url("../assets/reno-kitchen-hero.png") center/cover; }
.hero-copy { max-width: 620px; }
.breadcrumb { margin: 0 0 24px; color: #58665f; font-size: 14px; }
.breadcrumb a { color: var(--orange); font-weight: 800; }
h1 { margin: 0; font-size: clamp(48px, 5.2vw, 76px); line-height: .98; }
.hero-copy > p:not(.breadcrumb) { margin: 26px 0; max-width: 58ch; color: #253c34; font-size: 20px; line-height: 1.55; }
.benefits { margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; list-style: none; }
.benefits li { padding: 7px 11px; border: 1px solid rgba(16,47,37,.22); border-radius: 999px; background: rgba(251,250,246,.75); font-size: 13px; font-weight: 800; }

.calculator-card { padding: 28px; background: rgba(255,255,255,.98); border: 1px solid #e6e0da; border-radius: 10px; box-shadow: 0 24px 60px rgba(38,29,24,.16); }
.calculator-heading { margin-bottom: 22px; display: flex; align-items: center; gap: 14px; }
.tool-icon { width: 48px; height: 48px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 10px; font-size: 29px; }
.calculator-heading small { color: var(--orange); font-size: 12px; font-weight: 900; letter-spacing: .08em; }
.calculator-heading h2 { margin: 2px 0 0; font-size: 31px; line-height: 1; }
.calculator-layout { display: grid; grid-template-columns: minmax(360px,1fr) 245px; gap: 22px; }
.fields { padding-right: 22px; border-right: 1px solid var(--line); }
.fields label { min-height: 58px; display: grid; grid-template-columns: 1fr 178px; align-items: center; gap: 12px; position: relative; font-weight: 700; }
.input-wrap { height: 40px; display: grid; grid-template-columns: 1fr 48px; align-items: center; border: 1px solid #bfc4be; border-radius: 7px; color: #505b56; text-align: center; font-weight: 400; }
.input-wrap input { width: 100%; height: 100%; border: 0; outline: 0; padding: 0 10px; background: transparent; color: #101814; font-weight: 800; }
.fields em { position: absolute; left: calc(100% - 178px); top: 47px; color: var(--error); font-size: 11px; font-style: normal; font-weight: 600; }
.fields [aria-invalid="true"] { outline: 2px solid rgba(159,47,39,.4); border-radius: 4px; }
.fields button { width: 100%; min-height: 51px; margin-top: 14px; border: 0; border-radius: 8px; color: white; background: var(--orange); font-weight: 900; cursor: pointer; box-shadow: 0 5px 13px rgba(157,54,10,.22); }
.fields button:hover { background: #b83e0c; }
.result-panel { min-height: 100%; padding: 24px 18px; display: flex; flex-direction: column; justify-content: center; align-items: center; border-radius: 6px; background: #f8f1eb; text-align: center; }
.result-panel > span { color: var(--ink-soft); font-size: 14px; font-weight: 800; }
.result-panel > strong { margin: 7px 0; font: 700 34px/1 var(--display); letter-spacing: -1.2px; }
.result-panel strong b, .result-panel strong i { font: inherit; }
.result-panel p { margin: 0; color: var(--ink-soft); font-size: 13px; }
.result-panel hr { width: 100%; height: 1px; margin: 22px 0; border: 0; background: rgba(16,47,37,.24); }

.ad-slot { position: relative; min-width: 0; margin: 32px clamp(22px, 5vw, 72px) 46px; padding-top: 18px; color: #85807b; }
.ad-slot__label { position: absolute; top: 0; left: 50%; transform: translateX(-50%); font-size: 9px; font-weight: 750; letter-spacing: .22em; text-transform: uppercase; }
.ad-slot__frame { min-height: clamp(88px, 8vw, 118px); padding: 16px; display: grid; place-content: center; gap: 3px; overflow: hidden; border: 1px solid #e4dfda; background: repeating-linear-gradient(135deg,#faf8f5 0,#faf8f5 10px,#f6f3ef 10px,#f6f3ef 20px); text-align: center; }
.ad-slot__frame span { color: #77716b; font-size: 12px; font-weight: 750; letter-spacing: .04em; }
.ad-slot__frame small { color: #aaa39d; font-size: 10px; }
.content-block, .faq-block { padding: 84px clamp(22px, 9vw, 142px); }
.section-label { margin: 0; color: var(--orange); font-size: 13px; font-weight: 900; letter-spacing: .1em; }
.content-block h2, .example-block h2, .faq-block h2, .related h2 { margin: 8px 0 30px; font-size: clamp(36px,4.1vw,58px); line-height: 1; }
.content-block > p:not(.section-label) { max-width: 780px; color: var(--ink-soft); font-size: 18px; }
.formula-grid { display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.formula-grid article { min-height: 165px; padding: 26px; border-right: 1px solid var(--line); background: var(--paper); }
.formula-grid article:last-child { border-right: 0; }
.formula-grid b { color: var(--orange); font: 700 23px/1 var(--display); }
.formula-grid p { margin: 32px 0 0; color: var(--ink-soft); font-weight: 700; }
.example-block { padding: 76px clamp(22px, 9vw, 142px); display: grid; grid-template-columns: 1fr 330px; gap: 80px; align-items: center; background: var(--ink); color: white; }
.example-block > p:not(.section-label) { max-width: 68ch; color: #dce6df; font-size: 18px; }
.example-result { grid-column: 2; grid-row: 1 / span 3; min-height: 230px; padding: 28px; display: flex; flex-direction: column; justify-content: center; border: 1px solid rgba(255,255,255,.35); border-radius: 12px; background: #21493c; }
.example-result span, .example-result small { color: #c7d8d0; }
.example-result strong { margin: 14px 0; font: 700 42px/1 var(--display); }
table { width: 100%; max-width: 1000px; margin-top: 30px; border-collapse: collapse; border-top: 2px solid var(--ink); text-align: left; }
caption { padding: 0 0 12px; text-align: left; font-weight: 800; }
th, td { padding: 14px 10px; border-bottom: 1px solid #c9c7c0; }
th { font-size: 14px; }
.faq-block { max-width: 1180px; margin: auto; }
.faq-block details { border-top: 1px solid var(--line); }
.faq-block details:last-child { border-bottom: 1px solid var(--line); }
.faq-block summary { padding: 22px 4px; font: 700 21px/1.3 var(--display); cursor: pointer; }
.faq-block details p { max-width: 74ch; margin: -5px 0 24px 4px; color: var(--ink-soft); }
.faq-block details[open] p { animation: details-open .28s ease both; }
@keyframes details-open { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.related { padding: 68px clamp(22px, 9vw, 142px); background: var(--sage); }
.related h2 { font-size: 38px; }
.related div { display: flex; flex-wrap: wrap; gap: 12px; }
.related a { padding: 11px 15px; border: 1px solid var(--ink); border-radius: 7px; text-decoration: none; font-weight: 800; }
.related a:hover { color: white; background: var(--ink); }
footer { padding: 48px clamp(22px, 5vw, 72px); display: flex; align-items: center; justify-content: space-between; background: #111; color: white; }
.brand--footer { font-size: 27px; }
footer p { color: #c8d5d0; }
:focus-visible { outline: 3px solid rgba(214,79,18,.5); outline-offset: 3px; }
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .65s ease, transform .65s cubic-bezier(.2,.8,.2,1); }
[data-reveal].is-visible { opacity: 1; transform: none; }

@media (max-width: 1050px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-header nav { display: none; }
  .page-hero { grid-template-columns: 1fr; }
  .hero-copy { max-width: 760px; }
  .calculator-card { max-width: 820px; width: 100%; }
}
@media (max-width: 760px) {
  .site-header { min-height: 76px; padding-inline: 16px; gap: 12px; }
  .brand { font-size: 24px; }
  .brand__mark { width: 31px; height: 31px; font-size: 20px; }
  .all-tools { padding: 8px 10px; font-size: 13px; }
  .page-hero { padding: 42px 16px 50px; gap: 28px; }
  h1 { font-size: 45px; }
  .hero-copy > p:not(.breadcrumb) { font-size: 18px; }
  .calculator-card { padding: 22px 18px; }
  .calculator-layout { grid-template-columns: 1fr; }
  .fields { padding: 0 0 22px; border-right: 0; border-bottom: 1px solid var(--line); }
  .fields label { min-height: 88px; grid-template-columns: 1fr; gap: 5px; }
  .input-wrap { width: 100%; }
  .fields em { left: 0; top: 73px; }
  .result-panel { min-height: 250px; }
  .content-block, .faq-block { padding: 58px 20px; }
  .formula-grid { grid-template-columns: 1fr; }
  .formula-grid article { min-height: 135px; border-right: 0; border-bottom: 1px solid var(--line); }
  .example-block { padding: 56px 20px; grid-template-columns: 1fr; gap: 26px; }
  .example-result { grid-column: 1; grid-row: auto; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; left: -9999px; }
  td { padding: 10px 4px; }
  td + td { padding-top: 0; }
  .related { padding: 52px 20px; }
  footer { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
