/* Kiebi — site styles. Self-hosted Public Sans (SIL OFL), no external requests. */
@font-face { font-family: "Public Sans"; src: url("/fonts/public-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("/fonts/public-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("/fonts/public-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("/fonts/public-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ink: #14213D;
  --body: #46506A;
  --muted: #6B7590;
  --line: #E2E5EC;
  --line-strong: #CBD1DC;
  --bg: #F4F6FA;
  --white: #FFFFFF;
  --accent: #2F5BEA;
  --accent-dark: #2449C4;
  --accent-soft: #EEF2FE;
  --red: #C2410C; --red-bg: #FFF1EA;
  --amber: #A16207; --amber-bg: #FFF8E5;
  --green: #15803D;

  --font: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --r-s: 8px; --r-m: 12px; --r-l: 16px;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; font: 400 16px/1.6 var(--font); color: var(--body); background: var(--white); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { color: var(--ink); margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.wrap { width: min(100% - 48px, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }
.muted { color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 11px 18px; border: 0; border-radius: var(--r-s); background: var(--accent); color: #fff; font: 600 15px/1.2 var(--font); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-ghost:hover { background: var(--bg); color: var(--ink); }
.btn-small { padding: 9px 15px; font-size: 14px; }
.btn-large { padding: 14px 22px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .65; cursor: progress; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid transparent; }
.header-inner { display: flex; align-items: center; gap: 36px; height: 68px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 20px; letter-spacing: -0.03em; color: var(--ink); text-decoration: none; }
.logo-mark { width: 24px; height: 24px; border-radius: 7px; background: var(--accent); position: relative; flex-shrink: 0; }
.logo-mark::after { content: ""; position: absolute; left: 7px; top: 6px; width: 8px; height: 5px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg); }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { color: var(--body); font-size: 15px; font-weight: 500; text-decoration: none; }
.nav a:hover { color: var(--ink); }

/* Hero */
.hero { background: linear-gradient(var(--white) 30%, var(--bg)); padding-top: 64px; }
.hero h1 { font-size: clamp(2.4rem, 1.5rem + 3vw, 3.5rem); line-height: 1.06; font-weight: 700; max-width: 17ch; }
.lede { font-size: 19px; margin-top: 20px; max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 30px; }
.hero-note { color: var(--muted); font-size: 14px; margin-left: 6px; }

/* Report UI mock */
.app { margin-top: 56px; display: grid; grid-template-columns: 230px minmax(0, 1fr) 320px; min-height: 360px; background: #fff; border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r-l) var(--r-l) 0 0; overflow: hidden; font-size: 14px; box-shadow: 0 -1px 0 rgba(20,33,61,.02), 0 24px 48px -32px rgba(20,33,61,.25); }
.app-side { background: #FAFBFD; border-right: 1px solid var(--line); padding: 18px 12px; display: grid; align-content: start; gap: 2px; }
.app-side-title { font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 10px 8px; }
.app-side span { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 7px; }
.app-side span.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.app-side b { font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.app-side span.on b { color: var(--accent); }
.app-list { border-right: 1px solid var(--line); }
.app-filters { display: flex; gap: 8px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.chip { font-size: 12.5px; padding: 3px 11px; border-radius: 999px; border: 1px solid var(--line); }
.chip.on { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.app-row { display: grid; grid-template-columns: 62px minmax(0, 1fr) 72px; gap: 12px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.app-row.sel { background: #F7F9FF; box-shadow: inset 3px 0 0 var(--accent); }
.app-row code { font: 500 12.5px var(--font); color: var(--muted); }
.app-row b { font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; text-align: center; }
.tag-high { background: var(--red-bg); color: var(--red); }
.tag-med { background: var(--amber-bg); color: var(--amber); }
.tag-low { background: #F1F3F7; color: var(--muted); }
.app-detail { padding: 20px 22px; }
.app-detail-title { font-weight: 600; color: var(--ink); font-size: 15.5px; line-height: 1.35; }
.app-detail dl { display: grid; grid-template-columns: 76px 1fr; gap: 7px 12px; margin: 16px 0 0; font-size: 13.5px; }
.app-detail dt { color: var(--muted); }
.app-detail dd { margin: 0; color: var(--ink); }
.app-shot { margin-top: 16px; height: 86px; border: 1px solid var(--line); border-radius: var(--r-s); display: grid; place-items: center; color: var(--muted); font-size: 12.5px; background: repeating-linear-gradient(135deg, #F6F7FA 0 10px, #EFF1F5 10px 20px); }

/* Sections */
.section { padding: 96px 0; }
.section-alt { background: var(--bg); }
.section h2 { font-size: clamp(1.8rem, 1.4rem + 1.2vw, 2.2rem); line-height: 1.15; font-weight: 700; max-width: 24ch; }
.lead { font-size: 18px; margin-top: 14px; max-width: 58ch; }

.panels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); padding: 26px; }
.panel-kicker { font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 10px; }
.panel h3 { font-size: 18px; }
.panel p:last-child { margin-top: 8px; font-size: 15px; }
.more { margin-top: 28px; color: var(--muted); font-size: 15px; }

.flow { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.flow li { padding: 26px 24px; border-right: 1px solid var(--line); }
.flow li:last-child { border-right: 0; }
.flow-num { font-weight: 700; color: var(--accent); font-size: 14px; }
.flow h3 { font-size: 17px; margin-top: 6px; }
.flow p { font-size: 14.5px; margin-top: 6px; }

.reports-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 64px; align-items: start; }
.checklist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.checklist li { padding: 18px 0 18px 34px; border-bottom: 1px solid var(--line); position: relative; font-size: 15px; }
.checklist li::before { content: ""; position: absolute; left: 2px; top: 22px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft); }
.checklist li::after { content: ""; position: absolute; left: 7px; top: 27px; width: 7px; height: 4px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.checklist strong { display: block; color: var(--ink); font-weight: 600; font-size: 16px; margin-bottom: 2px; }

/* Quote: estimator + request */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); }
.form { padding: clamp(22px, 3vw, 32px); display: grid; gap: 22px; }
.form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.form legend { padding: 0; }
.estimator { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 40px; }
.step-title { display: flex; align-items: center; gap: 10px; font-size: 20px; }
.step-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 700; }
.step-intro { color: var(--muted); margin-top: -10px; }
.group { display: grid; gap: 22px; }

.choice-group legend, .field > span, .field > legend { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.field em, legend em, .check em { font-style: normal; font-weight: 400; color: var(--muted); margin-left: 4px; }
.choices { display: grid; gap: 10px; }
.choices-3 { grid-template-columns: repeat(3, 1fr); }
.choices-5 { grid-template-columns: repeat(3, 1fr); }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice span { display: grid; gap: 3px; height: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-s); background: #fff; }
.choice strong { font-size: 14.5px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.choice small { font-size: 13px; color: var(--muted); line-height: 1.35; }
.choice:hover span { border-color: #AEB7C7; }
.choice input:checked + span { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.choice input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.seg { display: inline-flex; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-s); gap: 2px; flex-wrap: wrap; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 7px 14px; border-radius: 6px; font-size: 14px; font-weight: 500; color: var(--body); }
.seg input:checked + span { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(20,33,61,.12), 0 0 0 1px var(--line); }
.seg input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 1px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; align-items: start; }
.field { display: grid; min-width: 0; }
.field input, .field select, .field textarea { width: 100%; font: 400 15px/1.4 var(--font); color: var(--ink); background: #fff; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-s); }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,91,234,.18); }
.field [aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 3px rgba(194,65,12,.12); }
.field-narrow { max-width: 280px; }
.checks { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
.checks > legend { grid-column: 1 / -1; }
.checks label, .check { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; padding: 5px 0; cursor: pointer; }
.consents { display: grid; gap: 2px; }
input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; margin: 3px 0 0; flex-shrink: 0; }
.notice { font-size: 14px; background: var(--accent-soft); color: var(--ink); padding: 12px 14px; border-radius: var(--r-s); }
.form-error { color: var(--red); font-weight: 600; font-size: 14.5px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.estimate, .estimate-empty { position: sticky; top: 88px; border-radius: var(--r-m); padding: 28px; }
.estimate-empty { background: #fff; border: 1px dashed var(--line-strong); display: grid; gap: 8px; }
.estimate-kicker { font-size: 13px; font-weight: 600; color: var(--accent); }
.empty-lead { font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.empty-sub { margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.estimate-includes, .estimate-addons { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 14.5px; }
.estimate-includes li { padding-left: 24px; position: relative; }
.estimate-includes li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 9px; height: 5px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }

.estimate { background: var(--ink); color: #C9D1E2; display: grid; gap: 6px; transition: opacity .2s; }
.estimate:focus { outline: none; }
.estimate.is-stale { opacity: .55; }
.estimate .estimate-kicker { color: #9DB4FF; }
.estimate-name { color: #fff; font-size: 20px; }
.estimate-price { color: #fff; font-size: 44px; font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.estimate-price small { font-size: 17px; font-weight: 500; color: #C9D1E2; letter-spacing: 0; }
.estimate-vat { font-size: 13.5px; }
.estimate .estimate-includes { margin-top: 14px; color: #E6EAF3; }
.estimate .estimate-includes li::before { border-color: #9DB4FF; }
.estimate-addons { margin-top: 12px; padding-top: 12px; border-top: 1px solid #2C3A5C; font-size: 14px; }
.estimate-addons .addons-title { color: #fff; font-weight: 600; }
.estimate-meta { margin-top: 12px; color: #fff; font-weight: 600; font-size: 14.5px; }
.estimate-note { font-size: 13.5px; }
.estimate-alt { font-size: 13.5px; color: #9DB4FF; }
.estimate-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.estimate-actions .btn { background: #fff; color: var(--ink); }
.estimate-actions .btn:hover { background: var(--accent-soft); }
.estimate-actions .btn-ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px #3B4A70; }
.estimate-actions .btn-ghost:hover { background: rgba(255,255,255,.06); }

.step-2 { margin-top: 20px; max-width: calc((100% - 20px) * 1.55 / 2.55); }
.success { margin-top: 20px; padding: 28px; max-width: 640px; display: grid; gap: 8px; border-color: #B7E1C4; }
.success h3 { color: var(--green); font-size: 20px; }
.success strong { color: var(--ink); background: var(--accent-soft); padding: 1px 6px; border-radius: 4px; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: 1fr 1.8fr; gap: 64px; align-items: start; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; font-weight: 600; color: var(--ink); font-size: 16.5px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 9px; height: 9px; margin-top: 6px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; flex-shrink: 0; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 10px; }
.faq details p { padding: 0 0 20px; max-width: 64ch; }

/* Legal and simple pages */
.doc { padding: 56px 0 80px; max-width: 760px; }
.doc-narrow { max-width: 620px; min-height: 50vh; }
.doc h1 { font-size: clamp(2rem, 1.6rem + 1.4vw, 2.6rem); line-height: 1.1; font-weight: 700; }
.doc h2 { font-size: 20px; margin: 36px 0 10px; }
.doc p, .doc li { font-size: 16px; }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 20px; display: grid; gap: 8px; margin: 10px 0 0; }
.doc .lead { margin: 16px 0 20px; }
.doc .btn + .btn { margin-left: 8px; }
.doc-meta { color: var(--muted); font-size: 14px; margin-top: 10px; }
.placeholder { background: #FFF8E5; color: var(--amber); padding: 0 4px; border-radius: 4px; }
.check a { color: var(--accent); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 44px; font-size: 14px; color: var(--muted); }
.footer-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.logo-footer { font-size: 17px; }
.footer-links { display: flex; gap: 18px; margin-left: auto; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }
.company-line { width: 100%; font-size: 13px; }

/* Responsive */
@media (max-width: 1080px) {
  .app { grid-template-columns: minmax(0, 1fr) 300px; }
  .app-side { display: none; }
  .panels { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .flow li:nth-child(2) { border-right: 0; }
  .flow li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 900px) {
  .nav { display: none; }
  .header-inner { justify-content: space-between; }
  .estimator, .reports-grid, .faq-grid { grid-template-columns: 1fr; gap: 28px; }
  .estimate, .estimate-empty { position: static; }
  .estimate-empty { display: none; }
  .step-2 { max-width: none; }
}
@media (max-width: 720px) {
  .wrap { width: min(100% - 32px, var(--wrap)); }
  .section { padding: 72px 0; }
  .app { grid-template-columns: 1fr; min-height: 0; }
  .app-detail { display: none; }
  .app-row { grid-template-columns: 56px minmax(0, 1fr) 64px; padding: 12px 14px; }
  .panels, .flow, .grid-2, .checks, .choices-3 { grid-template-columns: 1fr; }
  .flow li { border-right: 0; border-bottom: 1px solid var(--line); }
  .flow li:last-child { border-bottom: 0; }
  .choices-5 { grid-template-columns: 1fr 1fr; }
  .hero-note { margin-left: 0; width: 100%; }
  .footer-links { margin-left: 0; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .faq summary::after { transition: none; } }
