:root {
  color-scheme: light;
  --ink: #252022;
  --body: #483f43;
  --muted: #6c5f64;
  --red: #a21c35;
  --red-dark: #751225;
  --red-pale: #fae9eb;
  --gold: #946d48;
  --line: #e9ded9;
  --paper: #f8f5f2;
  --white: #fff;
  font-family: "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", "Source Sans 3", system-ui, sans-serif;
  font-size: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.55; }
a { color: inherit; }
button, select { font: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; z-index: 8; top: 12px; left: 12px; transform: translateY(-150%);
  padding: .7rem 1rem; color: var(--white); background: var(--red-dark); border-radius: .5rem;
}
.skip-link:focus { transform: none; }
.container { width: min(1240px, calc(100% - 64px)); margin-inline: auto; }

.site-header { border-top: 4px solid var(--red-dark); background: var(--white); }
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; }
.brand { display: inline-flex; flex: 0 0 auto; }
.brand img { width: 177px; height: auto; }
.site-nav { display: flex; align-items: center; gap: clamp(.8rem, 2.3vw, 1.8rem); }
.site-nav a { color: var(--body); font-size: .9rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.site-nav a:hover { color: var(--red); }
.site-nav .contact-link {
  border-radius: 999px; color: var(--white); background: var(--red-dark);
  padding: .58rem .95rem; border: 1px solid transparent;
}
.site-nav .contact-link:hover { color: var(--white); background: var(--red); }
.contact-link span { margin-left: .22rem; }

.hero { overflow: hidden; border-block: 1px solid #ebdfda; background: linear-gradient(105deg, #fffdfa 12%, #f6eae3); }
.hero-inner { position: relative; isolation: isolate; display: flex; align-items: center; min-height: 233px; }
.hero-copy { padding: 43px 0 46px; }
.hero-copy::before { content: ""; display: block; width: 45px; height: 3px; margin-bottom: 16px; background: #bf8b64; }
.hero h1 { font-size: clamp(2.16rem, 4.25vw, 3.65rem); font-weight: 800; line-height: 1.17; letter-spacing: -.045em; }
.hero h1 span { color: var(--red-dark); white-space: nowrap; }
.hero p { margin-top: .9rem; color: var(--body); font-size: clamp(.91rem, 1.3vw, 1.05rem); }
.hero-art {
  z-index: -1; position: absolute; top: -5%; right: -7%;
  width: min(62vw, 790px); height: auto; pointer-events: none; opacity: .88;
}

.quote-layout {
  display: grid; grid-template-columns: 268px minmax(0, 1fr);
  gap: 27px; align-items: start; padding-block: 32px 58px;
}
.catalog, .product-panel {
  min-width: 0; border: 1px solid var(--line); border-radius: 16px;
  background: var(--white); box-shadow: 0 5px 22px #4a222407;
}
.catalog { position: sticky; top: 18px; padding: 17px 13px 13px; }
.catalog h2 { margin: 0 10px 11px; color: var(--muted); font-size: .83rem; font-weight: 700; }
.catalog-links { display: grid; gap: 3px; }
.catalog-links a {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 7px;
  min-height: 47px; border-radius: 9px; padding: 10px 11px;
  color: var(--body); font-size: .88rem; font-weight: 560; line-height: 1.4; text-decoration: none;
}
.catalog-links a:hover { color: var(--red-dark); background: #faf4f2; }
.catalog-links a[aria-current="location"] { color: var(--red-dark); background: var(--red-pale); font-weight: 750; }
.catalog-links a[aria-current="location"]::before {
  content: ""; position: absolute; inset: 11px auto 11px 0; width: 3px; border-radius: 2px; background: var(--red);
}
.nav-arrow { color: var(--red); font-size: 1.3rem; line-height: 1; }
#product-select { display: none; }
.quote-panels { min-width: 0; display: grid; gap: 22px; }
.product-panel { scroll-margin-top: 21px; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 15px;
  padding: 21px 23px; border-bottom: 1px solid var(--line);
}
.panel-head h2 { font-size: clamp(1.16rem, 2.05vw, 1.55rem); font-weight: 760; line-height: 1.34; }
.panel-head h2:focus { outline: none; }
.download {
  display: inline-flex; flex: 0 0 auto; align-items: center; gap: .38rem; min-height: 40px;
  padding: .43rem .79rem; border: 1px solid #e9c5cb; border-radius: 8px;
  color: var(--red-dark); background: #fff6f6; font-size: .83rem; font-weight: 700;
  text-decoration: none; white-space: nowrap;
}
.download:hover { background: var(--red-pale); border-color: #cc8b98; }
.download span { font-size: 1rem; line-height: 1; }
.panel-content { padding: 21px 23px 24px; }
.plan-group + .plan-group { margin-top: 23px; }
.plan-group-title {
  display: flex; align-items: center; gap: .55rem; margin-bottom: 10px;
  color: var(--red-dark); font-size: .95rem; font-weight: 760;
}
.plan-group-title::before { content: ""; width: 3px; height: 1rem; border-radius: 3px; background: #b48358; }

.price-table, .matrix-table { width: 100%; border-spacing: 0; border-collapse: separate; }
.price-table { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; table-layout: fixed; }
.price-table .tier-width { width: 15%; }
.price-table .number-width { width: 14%; }
.price-table .offer-width { width: 17%; }
.price-table th, .price-table td { padding: 12px 10px; text-align: left; vertical-align: middle; }
.price-table thead th { color: #50464a; background: #f5efec; font-size: .78rem; line-height: 1.35; }
.price-table thead th:nth-child(4) { color: var(--red-dark); }
.price-table tr + tr > *, .price-table tbody tr:first-child > * { border-top: 1px solid var(--line); }
.price-table tbody tr:nth-child(even) > * { background: #fdfbf9; }
.price-table .quote-tier { font-size: .86rem; line-height: 1.45; font-weight: 730; }
.price-table .quote-price { color: var(--body); }
.price-table .cooperation, .price-table tbody tr:nth-child(even) .cooperation { background: #fff1f2; color: var(--red-dark); }
.money { display: inline-flex; align-items: baseline; gap: .14rem; flex-wrap: wrap; }
.amount, .matrix-number, .telephone { font-variant-numeric: tabular-nums; }
.amount { font-size: 1rem; font-weight: 700; line-height: 1.17; white-space: nowrap; }
.unit { font-size: .67rem; font-weight: 500; white-space: nowrap; }
.cooperation .amount { font-size: 1.19rem; font-weight: 780; }
.quote-details { color: var(--body); font-size: .79rem; line-height: 1.55; }
.dash { color: var(--muted); }
.mobile-label { display: none; }

.matrix-controls { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; margin-bottom: 12px; }
.matrix-controls label { color: var(--body); font-size: .84rem; font-weight: 700; }
.matrix-controls select, #product-select {
  border: 1px solid #d9c8c6; border-radius: 8px; min-height: 41px;
  padding: .42rem .6rem; color: var(--ink); background: #fff; font-weight: 560;
}
.matrix-controls select { max-width: 100%; font-size: .88rem; }
.scroll-note { color: var(--muted); font-size: .8rem; }
.matrix-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; }
.matrix-table { table-layout: fixed; min-width: 655px; font-size: .82rem; line-height: 1.44; }
.matrix-table[data-view="single"] { min-width: 0; }
.matrix-table th, .matrix-table td { padding: 9px 10px; text-align: center; vertical-align: middle; }
.matrix-table thead th { color: var(--white); background: var(--red-dark); font-size: .82rem; font-weight: 740; }
.matrix-table thead th:first-child { width: 32%; text-align: left; }
.matrix-table[data-view="single"] thead th:first-child { width: 53%; }
.matrix-table tr > * + * { border-left: 1px solid var(--line); }
.matrix-table thead tr > * + * { border-left-color: #ffffff31; }
.matrix-table tbody td, .matrix-table th[scope="row"] { border-top: 1px solid var(--line); color: var(--body); }
.matrix-table th[scope="row"] { text-align: left; font-weight: 610; background: #fff; }
.matrix-table tbody tr:nth-child(odd) > * { background: #fdfbf9; }
.matrix-table tbody tr.matrix-group th {
  background: #f3eae4; color: #694829; text-align: left; font-size: .8rem; font-weight: 750;
}
.matrix-table .key-rate .matrix-value {
  color: var(--red-dark); background: var(--red-pale); font-size: 1rem; font-weight: 780;
}

.site-footer { border-top: 1px solid var(--line); color: var(--muted); background: #fff; font-size: .84rem; }
.footer-inner { display: flex; justify-content: space-between; gap: .7rem 1.5rem; flex-wrap: wrap; padding-block: 20px; }
.footer-inner a { text-decoration-color: #bd939a; text-underline-offset: 3px; }
.telephone { color: var(--red-dark); font-weight: 720; }

@media (max-width: 960px) {
  .container { width: calc(100% - 36px); }
  .quote-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 21px; }
  .catalog { position: static; }
  .catalog-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .enhanced .catalog {
    position: sticky; z-index: 2; top: 0; display: grid; grid-template-columns: auto minmax(0, 1fr);
    align-items: center; gap: 12px; padding: 10px 13px; border-radius: 12px;
  }
  .enhanced .catalog h2 { margin: 0; white-space: nowrap; }
  .enhanced .catalog-links { display: none; }
  .enhanced #product-select { display: block; width: 100%; min-width: 0; font-size: .9rem; }
  .product-panel { scroll-margin-top: 76px; }
  .hero-inner { min-height: 194px; }
  .hero-art { width: min(68vw, 660px); right: -10%; top: -2%; opacity: .68; }
}

@media (max-width: 640px) {
  .container { width: calc(100% - 28px); }
  .header-inner { min-height: 58px; gap: .45rem; }
  .brand img { width: clamp(103px, 31vw, 139px); }
  .site-nav { gap: .55rem; }
  .site-nav .nav-home { display: none; }
  .site-nav a { font-size: .76rem; }
  .site-nav .contact-link { padding: .42rem .6rem; }
  .contact-link span { display: none; }
  .hero-inner { min-height: 154px; }
  .hero-copy { padding: 28px 0 32px; }
  .hero-copy::before { width: 30px; margin-bottom: 10px; }
  .hero h1 { font-size: clamp(1.5rem, 6.15vw, 2.3rem); }
  .hero p { margin-top: .58rem; font-size: .8rem; }
  .hero-art { width: 86vw; right: -20%; top: -4%; opacity: .28; }
  .panel-head { align-items: flex-start; flex-wrap: wrap; padding: 15px 14px; gap: 9px; }
  .panel-head h2 { flex-basis: 100%; font-size: 1.13rem; }
  .download { min-height: 38px; font-size: .81rem; }
  .panel-content { padding: 14px; }
  .plan-group + .plan-group { margin-top: 18px; }
  .plan-group-title { font-size: .9rem; }
  .price-table { display: block; border: 0; overflow: visible; }
  .price-table colgroup { display: none; }
  .price-table thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap;
  }
  .price-table tbody { display: grid; gap: 10px; }
  .price-table tbody tr {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 7px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  }
  .price-table tbody tr > * { padding: 0; border: 0 !important; }
  .price-table tbody tr:nth-child(even) > * { background: transparent; }
  .price-table .quote-tier, .price-table .quote-details { grid-column: 1 / -1; }
  .price-table .quote-tier { font-size: .9rem; }
  .price-table .quote-price, .price-table tbody tr:nth-child(even) .quote-price {
    padding: 7px 6px; border-radius: 6px; background: #f7f1ee;
  }
  .price-table .cooperation, .price-table tbody tr:nth-child(even) .cooperation { background: var(--red-pale); }
  .mobile-label { display: block; margin-bottom: 4px; color: var(--muted); font-size: .67rem; font-weight: 650; }
  .cooperation .mobile-label { color: var(--red-dark); }
  .money { display: flex; flex-direction: column; align-items: flex-start; flex-wrap: nowrap; }
  .amount { font-size: clamp(.83rem, 4vw, 1.12rem); }
  .cooperation .amount { font-size: clamp(.94rem, 4.55vw, 1.2rem); }
  .unit { font-size: .64rem; }
  .price-table .quote-details { padding-top: 1px; font-size: .78rem; }
  .price-table .empty-details { display: none; }
  .matrix-controls { gap: .42rem .58rem; }
  .matrix-controls label { font-size: .79rem; }
  .matrix-controls select { font-size: .81rem; }
  .matrix-table th, .matrix-table td { padding: 8px 7px; }
  .matrix-table[data-view="all"] thead th:first-child, .matrix-table[data-view="all"] th[scope="row"] {
    position: sticky; left: 0; z-index: 1; box-shadow: 1px 0 var(--line);
  }
  .quote-layout { padding-bottom: 31px; }
  .footer-inner { flex-direction: column; }
}
