:root {
  color-scheme: dark;
  --bg: #101211;
  --panel: #181c19;
  --ink: #f2f4ef;
  --muted: #aab4a9;
  --line: #343e35;
  --accent: #b7f35b;
  font: 16px/1.55 system-ui, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; padding-block: clamp(28px, 5vw, 64px); }
a { color: inherit; text-underline-offset: 4px; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 4px;
}
.skip-link { position: absolute; z-index: 10; top: 12px; left: 16px; padding: 10px 16px; background: var(--panel); color: var(--ink); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
header, footer { border-color: var(--line); background: #141715; }
header { border-bottom: 1px solid var(--line); }
footer { border-top: 1px solid var(--line); }
.wrap { width: calc(100% - clamp(32px, 5vw, 112px)); margin-inline: auto; }
.nav, .footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 72px; }
.nav nav, .brand { display: flex; align-items: center; gap: 12px; }
.nav nav { gap: clamp(12px, 3vw, 32px); }
.nav a, .footer a { text-decoration: none; }
.brand { font-size: 1.15rem; font-weight: 800; }
.brand-icon { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 8px; background: var(--accent); color: #111; flex: none; }
.brand-icon img { max-width: 100%; max-height: 100%; }
.nav nav, .footer { font-size: .9rem; color: var(--muted); }
.top-contacts { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 24px; padding-block: 10px 13px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--muted); }
.top-contacts a { overflow-wrap: anywhere; }
.top-contacts a:first-child { color: var(--accent); }
.top-contacts strong { margin-right: 5px; }
.hero { display: grid; grid-template-columns: 1.25fr 1fr; align-items: stretch; gap: 28px; }
.hero-content { padding-block: clamp(5px, 2vw, 25px) 0; }
.eyebrow { color: var(--accent); font: 700 .75rem/1.4 ui-monospace, Consolas, monospace; letter-spacing: .11em; text-transform: uppercase; margin: 0 0 14px; }
i { display: inline-block; height: 7px; width: 7px; border-radius: 50%; background: var(--accent); margin-right: 5px; vertical-align: .07em; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.05; letter-spacing: -.055em; overflow-wrap: anywhere; }
.hero h1 { font-size: clamp(3rem, 6.8vw, 6.3rem); }
h1 em { font-style: normal; color: var(--accent); }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.12; letter-spacing: -.035em; }
h3 { font-size: 1rem; }
p { overflow-wrap: anywhere; }
.lead { color: var(--muted); font-size: clamp(1rem, 2vw, 1.2rem); margin: 16px 0 23px; max-width: 45ch; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: 45px; padding: 10px 16px; border: 1px solid transparent; border-radius: 8px; text-decoration: none; cursor: pointer; font: inherit; font-size: .94rem; font-weight: 700; max-width: 100%; }
.primary { color: #121711; background: var(--accent); }
.primary:hover { color: #121711; filter: brightness(1.08); }
.secondary { background: #232a24; color: var(--ink); border-color: var(--line); }
.ghost { padding-inline: 8px; color: var(--ink); }
.secondary:hover, .ghost:hover { color: var(--accent); }
.button:disabled { opacity: .6; cursor: wait; }
.hero-media { min-width: 0; }
.branch-directory, .consultation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.branch-directory { margin-top: 14px; }
.branch-card { display: grid; align-content: start; justify-items: start; gap: 12px; }
.branch-card h3 { font-size: 1.25rem; }
.branch-card-heading p { margin-top: 4px; }
.rating-badge { width: 150px; height: 50px; border: 0; border-radius: 8px; }
.branch-details { width: 100%; border-top: 1px solid var(--line); padding-top: 8px; }
.branch-details iframe { margin-top: 10px; }
.branch-map { display: block; width: 100%; height: 360px; border: 0; border-radius: 8px; }
.consultation .actions { margin-top: 14px; }
@media (max-width: 800px) {
  .branch-directory, .consultation { grid-template-columns: minmax(0, 1fr); }
}
.install-app { margin-top: 14px; max-width: 48ch; }
.install-app summary { color: var(--accent); font-size: .9rem; width: fit-content; }
.install-app p { color: var(--muted); font-size: .88rem; margin-top: 8px; }
.install-app button { margin-top: 10px; }
[hidden] { display: none !important; }
@media (display-mode: standalone) {
  .install-app { display: none; }
}
.gallery { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.gallery-heading { margin-bottom: 10px; }
.gallery-heading h2 { font-size: 1rem; }
.gallery figcaption { margin-top: 8px; font-size: .9rem; color: var(--muted); overflow-wrap: anywhere; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 12px; }
.gallery-grid figure { min-width: 0; margin: 0; }
.gallery img { width: 100%; display: block; background: var(--bg); border-radius: 7px; }
.gallery-grid img { aspect-ratio: 4 / 3; object-fit: cover; }
.album-pending-row { min-width: 0; overflow-wrap: anywhere; }
.album-pending-row .button { margin-top: 8px; }
.hero-art {
  color: var(--accent); display: flex; flex-direction: column; justify-content: space-between; min-width: 0;
  border: 1px solid var(--line); border-radius: 16px; padding: 18px;
  background-color: #171d18;
  background-image: linear-gradient(#b7f35b0b 1px, transparent 1px), linear-gradient(90deg, #b7f35b0b 1px, transparent 1px);
  background-size: 24px 24px;
}
.hero-art svg { width: 100%; max-height: 360px; }
.art-label { display: flex; justify-content: space-between; font: .68rem/1.5 ui-monospace, Consolas, monospace; letter-spacing: .08em; }
.art-label.bottom { opacity: .75; }
.services { margin-top: clamp(40px, 7vw, 78px); }
.section-heading { display: flex; gap: 14px; align-items: end; justify-content: space-between; flex-wrap: wrap; }
.section-heading p:not(.eyebrow), small, .subtle { color: var(--muted); }
.service-list { margin-top: 18px; border-block: 1px solid var(--line); }
.service { border: 0; padding: 0; }
.service-summary { display: grid; align-items: center; grid-template-columns: 38px minmax(0, 1fr) auto 26px; gap: 10px; min-height: 61px; padding: 10px 6px; list-style: none; }
.service-summary::-webkit-details-marker { display: none; }
.service-summary:hover, .service[open] .service-summary { background: var(--panel); }
.service-toggle { color: var(--accent); text-align: center; font-size: 1.2rem; }
.service-toggle::before { content: '+'; }
.service[open] .service-toggle::before { content: '−'; }
.service-details { padding: 8px 16px 18px 54px; background: var(--panel); }
.service-details p { margin-bottom: 12px; color: var(--muted); }
.service + .service { border-top: 1px solid var(--line); }
.service-index { color: var(--muted); font: .78rem ui-monospace, Consolas, monospace; }
.price { font-weight: 750; color: var(--accent); text-align: right; }
.narrow { max-width: 690px; margin-inline: auto; }
.compact { max-width: 460px; }
.compact h1 { margin-bottom: 20px; }
.card { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: clamp(16px, 3vw, 28px); }
.card h2 + *, .card h3 + *, .card p + .button { margin-top: 14px; }
.card .facts + h3 { margin-top: 17px; }
.card p + p { margin-top: 12px; }
.back { display: inline-block; color: var(--muted); margin-bottom: 18px; }
.form, .stack { display: grid; gap: 18px; align-content: start; min-width: 0; }
.form .button, .stack > .button { justify-self: start; }
.grid, .dashboard { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
label { display: block; min-width: 0; font-weight: 650; }
label small { font-weight: 400; }
input, select, textarea { display: block; margin-top: 6px; border: 1px solid #495449; border-radius: 7px; color: var(--ink); background: #111512; font: inherit; font-weight: 400; min-width: 0; width: 100%; min-height: 44px; padding: 8px 10px; }
input[type=file] { padding: 7px; }
textarea { resize: vertical; }
.alert { padding: 12px 14px; border-radius: 8px; border: 1px solid #a46559; background: #392722; }
.success { border-color: #617e4e; background: #263421; }
.badge { display: inline-block; width: fit-content; padding: 4px 9px; border-radius: 6px; font-size: .82rem; font-weight: 700; background: #313b32; color: #e0e6dd; }
.badge.green { background: #2c4527; color: #d6f4c9; }
.badge.amber { background: #493a20; color: #ffe1a6; }
.badge.blue { background: #253c46; color: #c9edf9; }
.facts { display: grid; grid-template-columns: minmax(110px, .75fr) minmax(0, 1fr); gap: 8px 14px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.offer { border-top: 1px solid var(--line); padding-top: 18px; }
.offer .actions { margin-top: 15px; }
.preserve { white-space: pre-wrap; }
.filters { display: grid; align-items: end; grid-template-columns: 1fr 1fr auto; gap: 12px; }
.order-list, .history { padding: 0; margin: 0; list-style: none; }
.order-list { border-block: 1px solid var(--line); }
.order-list li + li, .history li + li { border-top: 1px solid var(--line); }
.order-row { display: grid; grid-template-columns: .6fr .8fr 1.2fr 1fr 1fr; gap: 10px; align-items: center; padding: 13px 8px; text-decoration: none; }
.order-row:hover { background: var(--panel); }
.history li { padding-block: 10px; }
.photos { display: flex; flex-wrap: wrap; gap: 8px; }
.photos img { display: block; width: 84px; height: 84px; object-fit: cover; border-radius: 8px; }
.photos:not(:empty) { margin-top: 12px; }
details { border-top: 1px solid var(--line); padding-block: 8px; }
summary { cursor: pointer; overflow-wrap: anywhere; }
.actions + h3 { margin-top: 18px; }

@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr .8fr; gap: 15px; }
  .hero h1 { font-size: clamp(2.7rem, 7.9vw, 5rem); }
}
@media (max-width: 650px) {
  .wrap { width: calc(100% - 32px); }
  .nav, .footer { min-height: 62px; }
  .nav nav { text-align: right; }
  .hero, .dashboard { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .hero .actions { align-items: start; flex-direction: column; }
  .service-summary { grid-template-columns: 25px minmax(0, 1fr) auto 22px; font-size: .88rem; }
  .service-details { padding-left: 41px; }
  .order-row { grid-template-columns: .65fr 1fr 1.4fr; font-size: .88rem; }
  .order-row span:nth-child(4) { grid-column: span 2; }
  .filters { grid-template-columns: 1fr; }
  .filters .button { justify-self: start; }
}

.location-grid { display: grid; gap: 18px; }
.location-grid.has-map { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
.review-card, .map-card { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.widget-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.widget-heading a { color: var(--accent); font-size: .9rem; }
.yandex-reviews { width: 100%; max-width: 760px; margin-inline: auto; }
.yandex-reviews + .content-grid { margin-top: 12px; }
.yandex-reviews iframe, .map-card iframe { display: block; width: 100%; height: 550px; border: 0; border-radius: 8px; background: #fff; }
@media (max-width: 760px) {
  .location-grid.has-map { grid-template-columns: minmax(0, 1fr); }
  .map-card iframe { height: 360px; }
}
@media (max-width: 440px) {
  .review-card, .map-card { padding: 8px; }
  .widget-heading { padding-inline: 4px; }
}
@media (max-width: 360px) {
  .review-card, .map-card { margin-inline: -16px; border-radius: 0; }
}
.content-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.content-grid blockquote { margin: 0; }
.content-grid cite { display: block; margin-top: 10px; color: var(--accent); font-style: normal; overflow-wrap: anywhere; }
.repair-steps { padding: 0; margin: 0; list-style: none; counter-reset: repair; }
.repair-steps li { counter-increment: repair; }
.repair-steps li::before { display: block; margin-bottom: 6px; content: counter(repair, decimal-leading-zero); color: var(--accent); font-weight: 750; }
.benefits { margin: 0; padding-left: 1.25rem; }
.benefits li + li { margin-top: 8px; }
.benefits li::marker { color: var(--accent); }
.edit-toolbar { position: sticky; z-index: 1; top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.edit-panel { margin: 16px 0; min-width: 0; }
.edit-panel legend { color: var(--accent); padding-inline: 5px; font-weight: 750; }
.edit-save { margin-top: 10px; }
.album-edit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 12px; }
.album-edit-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.album-edit-photo .checkbox { font-size: .82rem; }
.extra-details { padding-block: 10px; border-bottom: 1px solid var(--line); }
.request-details { margin-top: 12px; }
.consent-box { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #202620; }
.consent-box a { color: var(--muted); width: fit-content; margin-left: 27px; font-size: .9rem; }
@media (max-width: 430px) {
  .grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; font-size: .9rem; }
  .service-summary { grid-template-columns: 19px minmax(0, 1fr) 22px; gap: 3px 8px; }
  .price { grid-column: 2; text-align: left; }
  .service-toggle { grid-column: 3; grid-row: 1 / span 2; }
  .service-details { padding-left: 33px; }
}

.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.tracking-code { max-width: 16ch; letter-spacing: .16em; font-variant-numeric: tabular-nums; }
.code { font-family: ui-monospace, Consolas, monospace; letter-spacing: .08em; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 10px; margin-block: 16px; }
.metric { display: grid; align-content: start; gap: 3px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #171d18; }
.metric strong { color: var(--accent); font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.1; overflow-wrap: anywhere; }
.metric span { color: var(--muted); font-size: .88rem; }
.checkbox { display: flex; align-items: center; gap: 9px; }
.checkbox input { flex: none; margin: 0; width: 18px; min-height: 18px; accent-color: var(--accent); }
input[type=color] { padding: 4px; }
.logo-preview { width: 84px; height: 64px; object-fit: contain; object-position: left; }
.hero-photo-preview { display: block; width: min(100%, 280px); aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.work-editor { min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.work-editor legend { padding-inline: 6px; font-weight: 700; }
.work-editor p { font-size: .9rem; }
.work-editor > div, .work-editor > button { margin-top: 12px; }
.work-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(6rem, .55fr) auto; gap: 8px; align-items: end; }
.work-row button { padding-inline: 10px; }
.work-summary { padding: 0; list-style: none; }
.work-summary li { display: flex; justify-content: space-between; gap: 12px; padding-block: 9px; border-bottom: 1px solid var(--line); }
.work-summary li span { min-width: 0; overflow-wrap: anywhere; }
.work-summary li strong:last-child { white-space: nowrap; }
.work-summary li:last-child { color: var(--accent); border: 0; }
@media (max-width: 430px) {
  .footer-links { flex-direction: column; padding-block: 10px; text-align: right; }
  .work-row { grid-template-columns: minmax(0, 1fr) auto; }
  .work-row label:first-child { grid-column: 1 / -1; }
}

.avesta-theme {
  color-scheme: light;
  --bg: #f2f5f9;
  --panel: #fff;
  --ink: #152640;
  --muted: #52647a;
  --line: #d9e2ed;
  --blue: color-mix(in srgb, var(--accent) 27%, #063b74);
  --brand-red: #b91f30;
  --brand-red-tint: #fff1f1;
  --tint: color-mix(in srgb, var(--accent) 13%, #fff);
}
.avesta-theme header, .avesta-theme footer { background: var(--panel); }
.avesta-home {
  --bg: #e8eef6;
  --panel: #f5f8fc;
  background: linear-gradient(155deg, #e8edf7 0, #edf2f8 38rem, var(--bg) 72rem);
}
.avesta-home header, .avesta-home footer { background: var(--panel); }
.avesta-home header { border-top: 3px solid transparent; border-image: linear-gradient(90deg, #a3293e, var(--blue)) 1; }
.avesta-home .wrap { max-width: 1320px; }
.avesta-home main { padding-block: clamp(20px, 3vw, 48px) 64px; }
.avesta-home .nav { min-height: 64px; }
.avesta-theme .brand-icon {
  width: clamp(54px, 6vw, 80px);
  height: clamp(54px, 6vw, 80px);
  overflow: hidden;
  background: var(--panel);
}
.avesta-theme .brand-icon img { width: 100%; height: 100%; object-fit: contain; }
.avesta-theme .brand { font-size: clamp(1.15rem, 2vw, 1.55rem); }
.avesta-theme .nav { min-height: 88px; }
.avesta-theme .top-contacts a:first-child, .avesta-theme .eyebrow,
.avesta-home .install-app summary, .avesta-home .service-toggle,
.avesta-home .metric strong, .avesta-home .repair-steps li::before,
.avesta-theme a:hover { color: var(--blue); }
.avesta-home .hero {
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  padding: clamp(20px, 4vw, 60px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(120deg, #fbf3f4, var(--panel) 43%, var(--tint));
}
.avesta-home .hero .eyebrow i { background: var(--brand-red); }
.avesta-home .hero .actions > a[href$="#consultation"] { color: var(--brand-red); border-color: #e8b6bb; }
.avesta-home .hero .actions > a[href$="#consultation"]:hover { background: var(--brand-red-tint); }
.avesta-home .hero-content { padding: 0; }
.avesta-home .hero h1 { font-size: clamp(2.15rem, 4.35vw, 4.55rem); line-height: 1.04; text-wrap: balance; }
.avesta-home .lead { max-width: 48ch; }
.avesta-theme .primary { background: var(--blue); color: #fff; }
.avesta-theme .primary:hover { filter: brightness(1.14); color: #fff; }
.avesta-theme .secondary { background: var(--panel); color: var(--blue); }
.avesta-home .gallery { padding: 10px; box-shadow: 0 12px 35px #163b6718; }
.avesta-home .service-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; border: 0; align-items: start; }
.avesta-home .service { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.avesta-home .service-summary { padding: 12px; }
.avesta-home .service-summary:hover, .avesta-home .service[open] .service-summary { background: #eaf2fb; border-radius: 11px; }
.avesta-home .service-details { border-radius: 0 0 11px 11px; }
.avesta-home .price { color: var(--blue); font-size: .85rem; }
.avesta-home .home-metrics { padding: clamp(16px, 3vw, 32px); border-radius: 18px; background: var(--tint); }
.avesta-home .metric { background: var(--panel); }
.avesta-home .branch-card, .avesta-home .consultation { border-radius: 18px; }
.avesta-home .branch-card { padding: clamp(16px, 2.5vw, 32px); }
.avesta-theme input:not([type="checkbox"]), .avesta-theme select, .avesta-theme textarea {
  background: #f7f9fc;
  border-color: #bbc9da;
  color: var(--ink);
}
.avesta-theme .alert { background: #fff0ec; color: #702c22; border-color: #dfa49a; }
.avesta-theme .alert.success { background: #e9f6ed; color: #174e32; border-color: #95c5a7; }
.password-field { display: grid; gap: 6px; }
.password-field button { justify-self: start; }
.avesta-home .benefits { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(225px, 100%), 1fr)); gap: 12px; }
.avesta-home .benefits li { margin: 0; padding: 18px; border: 1px solid var(--line); border-top: 3px solid var(--blue); border-radius: 12px; background: var(--panel); font-weight: 700; box-shadow: 0 4px 14px #163b6712; }
.avesta-home .benefits li:nth-child(even) { border-top-color: var(--brand-red); }
.avesta-home .edit-panel legend { color: var(--blue); }
.avesta-home .edit-toolbar { position: static; }
.avesta-home #homepage-edit > .edit-toolbar { position: sticky; }
@media (max-width: 800px) {
  .avesta-home .hero, .avesta-home .service-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 440px) {
  .avesta-home .nav { flex-wrap: wrap; gap: 6px 14px; padding-block: 10px; }
  .avesta-home .nav nav { flex-wrap: wrap; }
  .avesta-home .hero { padding: 16px; }
}

.nav nav { flex-wrap: wrap; }
.nav .cabinet-nav { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font-weight: 700; }
.tracking-code { max-width: 100%; }
.social-link svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.social-telegram svg { color: #0879ad; }
.social-vk svg { color: #0673df; }
.social-max svg { color: #6747d7; }
@media (prefers-reduced-motion: no-preference) {
  .avesta-home .hero-content, .avesta-home .hero-media { animation: avesta-enter 460ms ease-out both; }
  .avesta-home .hero-media { animation-delay: 80ms; }
  .avesta-home .button, .avesta-home .benefits li { transition: transform 180ms ease, box-shadow 180ms ease; }
  .avesta-home .button:hover, .avesta-home .benefits li:hover { transform: translateY(-2px); box-shadow: 0 5px 12px #163b6720; }
  @keyframes avesta-enter {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

.hero.hero-wide-gallery { grid-template-columns: minmax(0, 1fr); }
.hero-wide-gallery + .gallery { margin-top: 18px; }
.hero-social { margin-top: 12px; }
.social-link img { object-fit: contain; flex: none; }
.gallery-photo { display: block; width: 100%; padding: 0; border: 0; border-radius: 7px; background: transparent; cursor: zoom-in; }
.gallery-dialog { width: min(94vw, 1080px); padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.gallery-dialog::backdrop { background: #0b1423c9; }
.gallery-dialog .button { display: flex; margin: 0 0 8px auto; }
.gallery .gallery-dialog img { height: auto; max-height: 78dvh; object-fit: contain; }

.home-hero-layout { display: grid; gap: 14px; }
.home-hero-layout .hero { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); }
.workshop-photo { overflow: hidden; border-radius: 10px; }
.workshop-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.home-side { display: flex; flex-wrap: wrap; align-content: start; align-items: baseline; gap: 4px 20px; padding: 18px 24px; border-radius: 12px; }
.home-side h2 { flex-basis: 100%; font-size: 1.15rem; margin-bottom: 4px; }
.home-side a { display: inline-flex; align-items: center; min-height: 44px; font-size: .95rem; }
.home-side .home-phone { font-weight: 800; font-size: 1rem; }
.avesta-home .home-contact {
  background: linear-gradient(115deg, #17355c, var(--blue));
  border-color: var(--blue);
}
.avesta-home .home-side,
.avesta-home .home-side :is(a, a:hover, .subtle) { color: #fff; }
.avesta-home .home-side a:hover { text-decoration: underline; }
.avesta-home .home-side a:focus-visible { outline-color: #fff; }
.home-contact .hero-social { margin: 2px 0 0 auto; }
.home-contact .social-link { padding: 6px 9px; background: #ffffff17; border-color: #ffffff5c; }
.avesta-theme .nav nav a { display: inline-flex; align-items: center; min-height: 44px; }
.avesta-theme .nav nav { flex-wrap: wrap; }
.avesta-home .branch-details summary { min-height: 44px; align-content: center; font-weight: 650; }
.avesta-home .gallery-photo img { transition: transform 180ms ease; }
.avesta-home .gallery-photo { overflow: hidden; }
.avesta-home .about-copy { max-width: 74ch; color: var(--muted); }
.avesta-home .footer-contacts {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: clamp(18px, 4vw, 56px);
  padding-block: clamp(28px, 5vw, 56px);
}
.avesta-home footer { background: linear-gradient(130deg, #f3f6fb, #e1ebf7); }
.avesta-home .footer-contacts p { margin-block: 8px; color: var(--muted); }
.avesta-home .footer-contacts a { overflow-wrap: anywhere; }
.avesta-home footer .footer { border-top: 1px solid var(--line); }
.avesta-home .nav nav a:not(.cabinet-nav) {
  background: linear-gradient(90deg, var(--brand-red), var(--blue)) no-repeat left bottom 5px / 0 2px;
}
.avesta-home .nav nav a:is(:hover, :focus-visible) { background-size: 100% 2px; }
@media (prefers-reduced-motion: no-preference) {
  .avesta-home .nav nav a { transition: background-size 180ms ease, color 180ms ease; }
  .avesta-home .workshop-photo img { transition: transform 420ms ease; }
  .avesta-home .workshop-photo:hover img { transform: scale(1.035); }
  .avesta-home .gallery-photo:hover img { transform: scale(1.025); }
  .avesta-home .button:active { transform: translateY(1px); }
}
.avesta-home .service-availability { margin: 0 0 18px; color: var(--blue); font-weight: 650; }
.avesta-home .gallery { margin-top: clamp(32px, 5vw, 64px); }
.avesta-home .gallery { padding: 0; overflow: hidden; }
.avesta-home .gallery-heading { padding: 14px 16px; margin: 0; }
.avesta-home .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.avesta-home .gallery-grid:has(figure:only-child) { grid-template-columns: minmax(0, 1fr); }
.avesta-home .gallery-grid img { aspect-ratio: 3 / 2; border-radius: 0; }
.avesta-home .gallery-grid figcaption { padding: 0 12px 8px; }
@media (max-width: 800px) {
  .home-hero-layout .hero { grid-template-columns: minmax(0, 1fr); }
  .workshop-photo img { aspect-ratio: 16 / 9; }
  .avesta-theme .nav { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .home-hero-layout, .avesta-home .gallery-grid { grid-template-columns: minmax(0, 1fr); }
  .home-hero-layout .hero .actions > .button { width: 100%; }
  .home-side { padding-inline: 16px; }
  .home-contact .hero-social { flex-basis: 100%; margin-left: 0; }
  .avesta-theme .nav nav { column-gap: 16px; row-gap: 0; }
  .avesta-home .footer-contacts { grid-template-columns: minmax(0, 1fr); }
  .avesta-home .footer-location { border-top: 1px solid var(--line); padding-top: 16px; }
}
