/* feetinchescalculator */
:root {
    --bg: #f7f6f2;
    --bg-2: #efede6;
    --panel: #ffffff;
    --line: #e2dfd5;
    --text: #27313b;
    --muted: #66717d;
    --head: #14191f;
    --brand: #1f2933;
    --brand-2: #f5b400;
    --brand-soft: #fff4cc;
    --good: #2f7d32;
    --bad: #b42318;
    --warn: #b45309;
    --warn-soft: #fff7e6;
    --radius: 16px;
    --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
    margin: 0; background: var(--bg); color: var(--text);
    font: 17px/1.7 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: #8a5a00; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #000; }
h1, h2, h3, h4 { color: var(--head); line-height: 1.2; margin: 0 0 .6em; text-wrap: balance; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 5.6vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3.4vw, 1.8rem); font-weight: 750; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1.1em; }
:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 3px; border-radius: 6px; }
[hidden], .hidden { display: none !important; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(780px, 100% - 32px); }
.muted { color: var(--muted); font-size: .9rem; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: #000; color: #fff; padding: 8px 14px; border-radius: 8px; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .75em 1.35em; border: 0; border-radius: 12px; cursor: pointer;
    background: var(--brand); color: #fff; font: inherit; font-weight: 700; text-decoration: none;
    box-shadow: 0 6px 18px -8px rgba(31, 41, 51, .6); transition: transform .2s var(--ease), background .2s, box-shadow .2s;
}
.btn:hover { background: #000; color: #fff; transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-sm { padding: .5em 1em; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--brand); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--head); text-decoration: none; font-weight: 800; font-size: 1.06rem; letter-spacing: -.02em; line-height: 1.05; }
.logo svg { color: var(--brand-2); flex: none; }
.logo b { color: #c98f00; font-weight: 800; margin: 0 1px; }
.logo small { display: block; color: var(--muted); font-size: .72em; font-weight: 600; letter-spacing: .02em; }
.logo span { display: inline-block; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav > a:not(.btn), .has-sub > button { background: none; border: 0; cursor: pointer; font: inherit; font-size: .93rem; font-weight: 600; color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 10px; transition: color .2s, background .2s; }
.nav > a:not(.btn):hover, .has-sub > button:hover, .nav [aria-current] { color: var(--head); background: var(--bg-2); }
.has-sub { position: relative; }
.has-sub > button::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-3px) rotate(45deg); }
.sub { position: absolute; top: 100%; left: 0; min-width: 270px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 50px -24px rgba(11, 31, 44, .35); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .2s, transform .25s var(--ease), visibility .2s; }
.sub a { display: block; padding: 8px 12px; border-radius: 9px; color: var(--text); text-decoration: none; font-size: .92rem; }
.sub a:hover, .sub a[aria-current] { background: var(--brand-soft); color: var(--brand); }
.has-sub:hover .sub, .has-sub:focus-within .sub, .has-sub.open .sub { opacity: 1; visibility: visible; transform: none; }
.nav .btn { margin-left: 8px; }
.nav-toggle { display: none; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; padding: 11px; }
.nav-toggle span { display: block; height: 2px; margin: 5px 0; background: var(--head); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 960px) {
    .nav-toggle { display: block; }
    .nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; max-height: calc(100vh - 64px); overflow-y: auto; padding: 8px 16px 20px; background: #fff; border-bottom: 1px solid var(--line); display: none; }
    .nav.open { display: flex; }
    .nav > a:not(.btn), .has-sub > button { text-align: left; width: 100%; padding: 12px 8px; font-size: 1rem; }
    .sub { position: static; display: none; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 6px 12px; }
    .has-sub.open .sub { display: block; }
    .nav .btn { margin: 12px 0 0; }
}

/* Hero */
.hero { position: relative; padding: 30px 0 30px; text-align: center; background: linear-gradient(180deg, #ffffff, var(--bg)); border-bottom: 1px solid var(--line); }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, var(--brand-2) 62%); padding: 0 .08em; }
.lede { color: var(--muted); font-size: 1.04rem; max-width: 640px; margin: 0 auto 22px; }
.badge { display: inline-block; margin-bottom: 14px; padding: 4px 12px; border-radius: 999px; background: var(--brand-soft); color: #7a5200; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.crumbs { font-size: .82rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs span { margin: 0 8px; opacity: .5; }

/* Tools */
.tool { max-width: 1000px; margin: 0 auto; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 30px 70px -40px rgba(20, 25, 31, .4); overflow: hidden; }
.tool-main { display: grid; grid-template-columns: 1.15fr 1fr; }
.tool-inputs { padding: 22px 24px 20px; display: grid; gap: 14px; align-content: start; }
.meas { border: 0; margin: 0; padding: 0; min-width: 0; }
.meas legend { padding: 0; margin-bottom: 6px; font-weight: 700; font-size: .9rem; color: var(--head); }
.meas-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.meas-row label, .big-input, .inline, .room-dims label, .quick { display: flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.meas-row label:focus-within, .big-input:focus-within, .inline:focus-within, .room-dims label:focus-within, .quick:focus-within { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(245, 180, 0, .25); }
.meas-row input, .meas-row select, .big-input input, .inline input, .room-dims input, .quick input { flex: 1; min-width: 0; width: 100%; padding: 10px 12px; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1.15rem; font-weight: 700; color: var(--head); font-variant-numeric: tabular-nums; }
.meas-row select { cursor: pointer; appearance: none; -webkit-appearance: none; }
.meas-row label span, .big-input span, .inline span, .room-dims label span, .quick span { flex: none; display: flex; align-items: center; padding: 0 11px; background: var(--bg-2); border-left: 1.5px solid var(--line); color: var(--muted); font-weight: 700; font-size: .88rem; }
.meas-row .wide { grid-column: 1 / -1; }
.ops { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ops-2 { grid-template-columns: repeat(2, 1fr); }
.ops button { padding: 8px 0; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font: 800 1.45rem/1.1 system-ui, sans-serif; color: var(--head); transition: background .15s, border-color .15s, transform .1s; }
.ops button:hover { border-color: var(--brand-2); }
.ops button:active { transform: scale(.96); }
.ops button[aria-checked="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-2); }
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.seg2 button { padding: 8px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font: inherit; font-size: .88rem; font-weight: 700; color: var(--muted); }
.seg2 button[aria-checked="true"] { border-color: var(--brand); color: var(--head); background: var(--brand-soft); }
.tool-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .88rem; color: var(--muted); }
.round select { margin-left: 6px; padding: 5px 8px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-weight: 700; color: var(--head); }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-size: .86rem; font-weight: 700; color: #8a5a00; text-decoration: underline; text-underline-offset: 3px; }
.quick-wrap summary { cursor: pointer; font-size: .88rem; font-weight: 700; color: #8a5a00; }
.quick { margin-top: 8px; }
.quick input { font-size: 1rem; }
.quick-msg { margin: 6px 0 0; font-size: .82rem; color: var(--warn); min-height: 1em; }
.tool-result { padding: 22px 24px; background: linear-gradient(180deg, #fffbea, #ffffff); border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.r-kicker { margin: 0; font-size: .82rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8a5a00; }
.r-big { margin: 4px 0 0; font-size: clamp(2.2rem, 6.5vw, 3.4rem); font-weight: 850; line-height: 1.05; letter-spacing: -.02em; color: var(--head); font-variant-numeric: tabular-nums; word-break: break-word; }
.r-sub { margin: 6px 0 0; color: var(--muted); font-size: .92rem; min-height: 1.5em; }
.r-eq { margin: 4px 0 8px; font-size: .86rem; color: var(--muted); font-family: ui-monospace, Menlo, monospace; }
.r-list { margin: 8px 0 0; }
.r-list div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px dashed var(--line); font-size: .92rem; }
.r-list dt { color: var(--muted); }
.r-list dd { margin: 0; font-weight: 700; color: var(--head); text-align: right; font-variant-numeric: tabular-nums; }
.r-actions { margin-top: auto; padding-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.tape-box { border-top: 1px solid var(--line); padding: 14px 24px 18px; background: var(--bg-2); }
.tape-head { display: flex; justify-content: space-between; align-items: center; }
.tape-head h3 { margin: 0; font-size: .95rem; }
.tape-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-family: ui-monospace, Menlo, monospace; font-size: .86rem; }
.tape-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.tape-list li.empty { font-family: inherit; color: var(--muted); background: transparent; border-style: dashed; }
.tape-list li.total { background: var(--brand); color: #fff; border-color: var(--brand); }
.tape-list li.total b { color: var(--brand-2); }
.tape-list button { border: 0; background: none; cursor: pointer; font-size: 1.1rem; color: var(--muted); line-height: 1; }
.field-label { font-weight: 700; font-size: .9rem; color: var(--head); margin-bottom: -6px; }
.big-select { width: 100%; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font: inherit; font-weight: 700; color: var(--head); }
.big-input input { font-size: 1.6rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.chips button:hover { border-color: var(--brand-2); color: var(--head); background: var(--brand-soft); }
.rooms { display: grid; gap: 10px; }
.room { padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.room-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.room-name { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-weight: 800; color: var(--head); padding: 2px 0; }
.room-area { font-weight: 800; color: #8a5a00; font-variant-numeric: tabular-nums; white-space: nowrap; }
.room-dims { display: grid; grid-template-columns: auto 1fr 1fr; gap: 6px 8px; align-items: center; }
.dim-label { font-size: .82rem; color: var(--muted); font-weight: 700; }
.dim-x { display: none; }
.room-dims input { font-size: 1.05rem; padding: 8px 10px; }
.extras { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: .86rem; color: var(--muted); font-weight: 700; }
.extras label { display: grid; gap: 4px; }
.inline input { font-size: 1rem; padding: 8px 10px; }
.inline span:first-child { border-left: 0; border-right: 1.5px solid var(--line); }
.tape { margin: 10px 0 4px; }
.tape svg { width: 100%; height: auto; display: block; }
.tape .blade { fill: #ffd84d; stroke: #c99a00; }
.tape .tk { stroke: #2b2b2b; stroke-width: 1; }
.tape .tk-in { stroke-width: 1.8; }
.tape .tn { font: 800 12px system-ui, sans-serif; fill: #b3261e; text-anchor: middle; }
.tape .mark { stroke: #d92d20; stroke-width: 2.5; }
.tape .mark-dot { fill: #d92d20; }
@media (max-width: 860px) {
    .tool-main { grid-template-columns: 1fr; }
    .tool-result { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 520px) {
    .tool-inputs, .tool-result, .tape-box { padding-left: 16px; padding-right: 16px; }
    .meas-row input, .meas-row select { font-size: 1.05rem; padding: 9px 8px; }
    .meas-row label span { padding: 0 7px; }
    .extras { grid-template-columns: 1fr; }
}

/* Sections */
.section { padding: 48px 0; }
.section-alt { background: #fff; border-block: 1px solid var(--line); }
.section > .wrap > h2 { text-align: center; }
.section-intro { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 30px; }
.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin: 18px auto 0; padding: 0; list-style: none; font-size: .86rem; color: var(--muted); }
.trust li::before { content: "✓"; color: var(--good); margin-right: 7px; font-weight: 800; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.card { padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.card h3 { margin-bottom: .4em; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card-link { position: relative; display: flex; flex-direction: column; gap: 4px; color: var(--muted); text-decoration: none; font-size: .92rem; line-height: 1.5; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; }
.card-link strong { color: var(--head); font-size: 1rem; padding-right: 24px; }
.card-link i { position: absolute; top: 18px; right: 18px; font-style: normal; color: var(--brand); transition: transform .25s var(--ease); }
.card-link:hover { transform: translateY(-3px); border-color: var(--brand-2); box-shadow: 0 16px 34px -22px rgba(31, 41, 51, .5); color: var(--text); }
.card-link:hover i { transform: translateX(4px); }
.card.warn { border-color: #f5d7a1; background: var(--warn-soft); }
.card.warn h3 { color: var(--warn); }
.card.do { border-color: #bfe3c8; } .card.do h3 { color: var(--good); }
.card.dont { border-color: #f3c2bd; } .card.dont h3 { color: var(--bad); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 1.5em 0; }
.icon-dot { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 12px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); font-weight: 800; }

/* Prose */
.prose { padding: 40px 0 16px; }
.prose h2 { margin-top: 1.8em; }
.prose > h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; }
.prose .card h3 { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: #c98f00; font-weight: 700; }
.prose strong { color: var(--head); }
.prose code { background: var(--bg-2); padding: .1em .4em; border-radius: 6px; font-size: .9em; }
.table-wrap { overflow-x: auto; margin: 1.3em 0; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
th { background: var(--bg-2); color: var(--head); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.formula-box { margin: 1.2em 0; padding: 16px 18px; border-radius: 14px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand); font-size: .98rem; }
.formula-box p:last-child { margin: 0; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.faq details[open] { border-color: var(--brand-2); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 15px 18px; cursor: pointer; list-style: none; color: var(--head); font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: 1.2rem; line-height: 1; transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 18px 16px; }
.faq details > div p:last-child { margin: 0; }

/* CTA */
.cta { margin: 32px 0 48px; padding: 28px 24px; text-align: center; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(180deg, #ffffff, var(--brand-soft)); }
.cta h2 { margin: 0 0 .3em; font-size: 1.35rem; }
.cta p { color: var(--muted); margin-bottom: 16px; }

/* Forms (contact) */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: .88rem; color: var(--muted); }
.form input, .form textarea { width: 100%; padding: 12px 14px; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; color: var(--head); font: inherit; }
.form input:focus, .form textarea:focus { outline: 0; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(245, 180, 0, .25); }

/* Ads */
.ad { margin: 28px auto; min-height: 280px; text-align: center; overflow: hidden; }
.ad-label { display: block; margin-bottom: 6px; font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: #8aa0ae; }

/* Footer */
.site-footer { margin-top: 24px; padding: 46px 0 24px; background: #14191f; color: #a9bcc8; font-size: .92rem; }
.site-footer .logo { color: #fff; margin-bottom: 12px; }
.site-footer .logo b { color: var(--brand-2); }
.site-footer .logo small { color: #8aa0ae; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h2 { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin: 0 0 12px; }
.site-footer nav a { display: block; padding: 4px 0; color: #a9bcc8; text-decoration: none; }
.site-footer nav a:hover { color: #fff; }
.site-footer .muted { color: #8aa0ae; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 34px; padding-top: 20px; border-top: 1px solid #2a323b; font-size: .84rem; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > div { grid-column: 1 / -1; } }

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 860px) {
    .calc-grid { grid-template-columns: 1fr; }
    .calc-result { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 520px) {
    body { font-size: 16px; }
    .tabs button { font-size: .82rem; padding: 12px 4px; }
    .calc-inputs, .calc-result { padding: 18px 16px; }
    .formula summary, .formula > div, .safety { padding-left: 16px; padding-right: 16px; }
    .logo small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transform: none; }
}
