:root {
  --ink: #172126;
  --muted: #627077;
  --line: #dce4e7;
  --paper: #f6f8f8;
  --white: #fff;
  --brand: #008acb;
  --brand-dark: #036996;
  --green: #11835e;
  --amber: #9a6200;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 50% -10%, #e8f5fa 0, transparent 40%), var(--paper); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.test-ribbon { padding: 8px 20px; text-align: center; color: #fff; background: #182329; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.site-header { min-height: 82px; padding: 12px clamp(18px, 4vw, 64px); display: flex; align-items: center; justify-content: space-between; gap: 28px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.brand img { display: block; width: 180px; height: auto; }
.site-header nav { display: flex; align-items: center; gap: 6px; }
.nav-link { border: 0; border-radius: 999px; padding: 10px 14px; color: var(--muted); background: transparent; text-decoration: none; cursor: pointer; font-weight: 700; }
.nav-link:hover, .nav-link:focus-visible, .nav-link.is-active { color: var(--brand-dark); background: #eaf6fb; outline: none; }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 3px; padding: 0 6px; color: #fff; background: var(--brand); border-radius: 999px; font-size: 12px; }

main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.chooser { padding: clamp(56px, 9vw, 112px) 0 72px; text-align: center; }
.eyebrow { margin-bottom: 14px; color: var(--brand-dark); font-size: 12px; font-weight: 900; letter-spacing: .16em; }
h1 { margin: 0; font-size: clamp(36px, 6vw, 64px); line-height: 1.02; letter-spacing: -.045em; }
.lead { max-width: 680px; margin: 20px auto 0; color: var(--muted); font-size: clamp(17px, 2vw, 20px); line-height: 1.55; }
.type-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 48px; text-align: left; }
.type-card { min-height: 350px; padding: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); color: inherit; background: rgba(255,255,255,.96); box-shadow: 0 12px 40px rgba(23,33,38,.08); cursor: pointer; text-decoration: none; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.type-card:hover, .type-card:focus-visible { transform: translateY(-4px); border-color: #75bfe0; box-shadow: 0 18px 45px rgba(0,90,130,.13); outline: none; }
.type-visual { position: relative; height: 205px; display: block; overflow: hidden; background: #e7eef0; }
.type-visual::after { content: ""; position: absolute; inset: auto 0 0; height: 38%; background: linear-gradient(transparent, rgba(11,28,36,.16)); pointer-events: none; }
.type-visual img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.type-card:hover .type-visual img, .type-card:focus-visible .type-visual img { transform: scale(1.035); }
.curve-mark { position: absolute; right: 18px; bottom: 16px; z-index: 1; padding: 7px 12px; color: #fff; background: rgba(16,11,112,.88); border-radius: 999px; font-size: 12px; font-weight: 900; letter-spacing: .12em; }
.card-copy { display: flex; flex-direction: column; gap: 7px; margin-top: 0; padding: 20px 24px 0; }
.card-copy strong { font-size: 22px; letter-spacing: -.02em; }
.card-copy small { color: var(--muted); font-size: 14px; line-height: 1.45; }
.arrow { align-self: flex-end; margin: auto 24px 20px 0; color: var(--brand); font-size: 26px; font-weight: 600; }
.info-strip { max-width: 830px; margin: 28px auto 0; padding: 16px 20px; display: flex; align-items: center; gap: 14px; text-align: left; border: 1px solid #cfe5ef; border-radius: 14px; background: #eff9fd; }
.info-strip p { margin: 0; color: #36515c; font-size: 14px; line-height: 1.5; }
.info-icon { flex: 0 0 30px; width: 30px; height: 30px; display: grid; place-items: center; color: #fff; background: var(--brand); border-radius: 50%; font-weight: 900; }
.seo-content { max-width: 960px; margin: 64px auto 0; padding: clamp(28px, 5vw, 52px); text-align: left; border-top: 1px solid var(--line); background: rgba(255,255,255,.72); border-radius: var(--radius); }
.seo-content h2 { margin: 0 0 16px; font-size: clamp(25px, 3vw, 34px); line-height: 1.2; letter-spacing: -.025em; }
.seo-content h2:not(:first-child) { margin-top: 38px; }
.seo-content h3 { margin: 0 0 10px; font-size: 20px; }
.seo-content p, .seo-content li { color: #43535a; font-size: 16px; line-height: 1.75; }
.seo-content a { color: var(--brand-dark); font-weight: 750; }
.seo-content ol { margin: 14px 0 0; padding-left: 24px; }
.seo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 30px; }
.seo-note { padding: 16px 18px; border-left: 4px solid var(--brand); background: #edf8fc; }

.calculator-view { width: 100vw; margin-left: calc(50% - 50vw); background: #fff; }
.calculator-toolbar { min-height: 64px; padding: 10px clamp(16px, 4vw, 56px); display: flex; align-items: center; gap: 24px; border-bottom: 1px solid var(--line); background: #f8fafb; }
.back-button { padding: 9px 13px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font-weight: 700; cursor: pointer; }
.back-button:hover, .back-button:focus-visible { border-color: var(--brand); color: var(--brand-dark); outline: none; }
.calculator-toolbar > div { display: flex; flex-direction: column; }
.toolbar-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.prototype-note { margin-left: auto; padding: 7px 10px; border-radius: 999px; color: #6c4c00; background: #fff2c7; font-size: 12px; font-weight: 800; }
#calculatorFrame { display: block; width: 100%; height: calc(100vh - 145px); min-height: 760px; border: 0; background: #fff; }

.catalog-page { padding: 54px 0 80px; }
.catalog-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.catalog-heading h1 { font-size: clamp(38px, 5vw, 60px); }
.catalog-heading .lead { margin-left: 0; }
.catalog-total { min-width: 150px; padding: 18px 22px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.catalog-total strong { font-size: 32px; color: var(--brand-dark); }
.catalog-total span { color: var(--muted); font-size: 13px; }
.filters { margin-top: 36px; padding: 18px; display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 12px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.filters label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 800; }
.filters input, .filters select { width: 100%; height: 44px; padding: 0 12px; border: 1px solid #cad5d9; border-radius: 9px; color: var(--ink); background: #fff; }
.filters input:focus, .filters select:focus { border-color: var(--brand); outline: 3px solid rgba(0,138,203,.12); }
.results-bar { min-height: 56px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 14px; }
.results-bar button { padding: 6px 0; border: 0; color: var(--brand-dark); background: none; cursor: pointer; font-weight: 800; }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.product-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 8px 30px rgba(23,33,38,.05); }
.product-image { height: 210px; display: grid; place-items: center; padding: 18px; background: linear-gradient(#f7f9fa, #eef3f5); }
.product-image img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.product-body { padding: 18px; }
.badges { min-height: 25px; display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; padding: 5px 8px; border-radius: 999px; color: #4b5b62; background: #edf2f4; font-size: 10px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.availability.in-stock { color: var(--green); background: #e7f7f1; }
.availability.out-of-stock { color: var(--amber); background: #fff2d7; }
.restriction { color: #6b4796; background: #f1eafb; }
.product-card h2 { min-height: 50px; margin: 12px 0 8px; font-size: 17px; line-height: 1.45; }
.product-card h2 a { color: inherit; text-decoration: none; }
.product-card h2 a:hover { color: var(--brand-dark); }
.product-meta { min-height: 40px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.product-footer { margin-top: 16px; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); }
.price { font-size: 18px; font-weight: 900; }
.product-link { color: var(--brand-dark); font-size: 12px; font-weight: 800; text-decoration: none; }
.empty-state { padding: 64px 20px; text-align: center; color: var(--muted); }

@media (max-width: 900px) {
  .type-grid, .product-grid { grid-template-columns: 1fr 1fr; }
  .filters { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .test-ribbon { font-size: 9px; }
  .site-header { align-items: flex-start; flex-direction: column; gap: 10px; }
  .brand img { width: 150px; }
  .site-header nav { width: 100%; }
  .nav-link { flex: 1; text-align: center; font-size: 13px; }
  .chooser { padding-top: 44px; }
  .type-grid, .product-grid, .filters, .seo-grid { grid-template-columns: 1fr; }
  .type-card, .type-card:last-child { min-height: 330px; grid-column: auto; }
  .type-visual { height: 190px; }
  .catalog-heading { align-items: stretch; flex-direction: column; }
  .catalog-total { min-width: 0; align-self: flex-start; }
  .calculator-toolbar { align-items: flex-start; flex-wrap: wrap; gap: 10px; }
  .prototype-note { width: 100%; margin-left: 0; }
  #calculatorFrame { height: calc(100vh - 210px); }
}
