/* the hidden attribute must win over display rules of tabs, choosers and rows */
[hidden] { display: none !important; }

/* Implant City · service pages (implantatsiya, viniry, ortodontiya, ortopediya, terapiya)
   Built on styles.css: same tokens, type, buttons and section rhythm as the home page. */

/* header: "Услуги" sub-menu and booking button */
.has-sub { position: relative; display: flex; align-items: center; gap: 2px; }
.sub-toggle { width: 26px; height: 26px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; border-radius: 6px; }
.sub-toggle::before { content: ""; width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 0.25s; }
.has-sub.open .sub-toggle::before { transform: translateY(1px) rotate(225deg); }
.sub-menu { position: absolute; top: calc(100% + 12px); left: -18px; min-width: 250px; padding: 10px; border-radius: 18px; background: #fffdf9; border: 1px solid var(--line); box-shadow: 0 24px 50px rgba(14, 37, 54, 0.14); display: grid; gap: 2px; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity 0.2s, transform 0.2s, visibility 0.2s; z-index: 5; }
.sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.has-sub:hover .sub-menu, .has-sub:focus-within .sub-menu, .has-sub.open .sub-menu { opacity: 1; visibility: visible; transform: none; }
.sub-menu a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-radius: 12px; font-size: 0.95rem; }
.sub-menu a::after { display: none; }
.sub-menu a:hover, .sub-menu a[aria-current="page"] { background: var(--paper); color: var(--primary); }
.sub-menu a[aria-current="page"]::before { content: ""; order: 2; width: 7px; height: 7px; border-radius: 50%; background: var(--sky); }
/* service-page picture cut out of its background (veneers): whole picture shown on the navy, room left for the caption */
.page-figure.fig-product img { object-fit: contain; object-position: 50% 50%; padding: 9% 7% 22%; background: radial-gradient(90% 70% at 50% 42%, #2a5f86 0%, #163a56 45%, #0c2133 100%); }
/* phone with the working hours under it */
.nav-phone { display: inline-flex; flex-direction: column; line-height: 1.2; font-weight: 600; font-size: 0.95rem; text-decoration: none; color: var(--primary); white-space: nowrap; font-variant-numeric: tabular-nums; }
.nav-phone[aria-disabled="true"], [data-phone][aria-disabled="true"] { cursor: default; }
.ph-placeholder { letter-spacing: 0.02em; }
@media (max-width: 1240px) { .nav-phone { display: none; } }
@media (max-width: 900px) {
  .has-sub { flex-wrap: wrap; }
  .has-sub > a { flex: 1; }
  .sub-toggle { width: 44px; height: 44px; }
  .sub-menu { position: static; min-width: 0; width: 100%; padding: 0 0 8px 12px; border: 0; box-shadow: none; background: none; opacity: 1; visibility: visible; transform: none; display: none; }
  .has-sub.open .sub-menu { display: grid; }
  .sub-menu a { font: 500 1.05rem/1.2 var(--f-body); padding: 12px 0; border-bottom: 0; color: rgba(255, 255, 255, 0.85); }
  .sub-menu a:hover, .sub-menu a[aria-current="page"] { background: none; color: var(--sky); }
}

/* page hero */
.page-hero { min-height: auto; }
.page-hero .hero-inner.hero-inner--text { grid-template-columns: minmax(0, 1fr); }
.page-hero .hero-inner { padding-block: clamp(36px, 5vw, 64px) clamp(48px, 6vw, 80px); align-items: center; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--on-navy-muted); margin-bottom: 22px; }
.crumbs a { color: var(--on-navy); text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.3); }
.crumbs a:hover { color: var(--sky); border-color: var(--sky); }
.crumbs span[aria-current] { color: var(--sky); }
.page-hero .hero-title { font-size: clamp(2rem, 5vw, 4rem); margin-bottom: 20px; }
.page-lead { font-size: clamp(1.02rem, 1.6vw, 1.2rem); line-height: 1.65; color: rgba(255, 255, 255, 0.86); max-width: 58ch; margin-bottom: 24px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.hero-chips li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: 0.9rem; font-weight: 500; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.16); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hero-chips li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sky); }
.page-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.page-stats .stat-item h3 { font-size: clamp(1.1rem, 2.2vw, 1.6rem); white-space: normal; }
.page-figure img { aspect-ratio: 4 / 4.6; }
@media (max-width: 700px) {
  .page-stats { grid-template-columns: minmax(0, 1fr); }
  .page-stats .stat-item + .stat-item { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.14); }
}

/* generic section head with a side action */
.sec-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: clamp(28px, 4vw, 44px); }
.sec-head-row .section-header { margin-bottom: 0; }

/* "Кому подходит": cards that open */
.reveal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.reveal-card { display: flex; flex-direction: column; gap: 12px; padding: 26px; border-radius: var(--radius); background: #fffdf9; border: 1px solid var(--line); transition: box-shadow 0.3s, transform 0.3s; }
.reveal-card:hover { box-shadow: 0 20px 44px rgba(60, 45, 25, 0.08); transform: translateY(-3px); }
.reveal-card .rc-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: #e3f4fd; color: var(--sky-deep); font: 500 1rem/1 var(--f-display); }
.reveal-card h3 { font: 500 1.15rem/1.3 var(--f-display); letter-spacing: -0.02em; }
.reveal-card p { color: var(--muted); font-size: 0.98rem; line-height: 1.6; }
.rc-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s ease; }
.rc-more > div { overflow: hidden; }
.rc-more p { padding-top: 4px; color: var(--text); }
.reveal-card.open .rc-more { grid-template-rows: 1fr; }
.rc-btn { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: var(--primary); font-weight: 600; font-size: 0.93rem; cursor: pointer; }
.rc-btn::after { content: "+"; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--sand); color: #5d4630; font-size: 1rem; transition: transform 0.3s; }
.reveal-card.open .rc-btn::after { transform: rotate(45deg); }

/* full service list: tabs + search */
.svc-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 4px; border-radius: 999px; background: #fffdf9; border: 1px solid var(--line); max-width: 100%; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: 500 0.93rem/1 var(--f-body); cursor: pointer; white-space: nowrap; transition: background 0.25s, color 0.25s; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--primary); color: var(--white); }
.tab .n { font: 500 0.72rem/1 var(--f-mono); padding: 4px 6px; border-radius: 999px; background: rgba(15, 29, 39, 0.08); }
.tab[aria-selected="true"] .n { background: rgba(255, 255, 255, 0.18); }
.svc-search { position: relative; flex: 1 1 260px; max-width: 360px; }
.svc-search input { width: 100%; font: inherit; font-size: 0.95rem; padding: 12px 16px 12px 42px; border-radius: 999px; border: 1px solid var(--line); background: #fffdf9; color: var(--text); }
.svc-search input:focus { outline: none; border-color: var(--sky-deep); box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.25); }
.svc-search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.svc-panel { border-radius: var(--radius); background: #fffdf9; border: 1px solid var(--line); overflow: hidden; }
.svc-panel[hidden] { display: none; }
.svc-panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px; padding: 22px 26px; border-bottom: 1px solid var(--line); }
.svc-panel-head h3 { font: 500 1.2rem/1.3 var(--f-display); letter-spacing: -0.02em; }
.svc-panel-head p { color: var(--muted); font-size: 0.95rem; max-width: 60ch; }
.svc-rows { list-style: none; }
.svc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; align-items: center; padding: 16px 26px; border-bottom: 1px solid var(--line); transition: background 0.2s; }
.svc-row:last-child { border-bottom: 0; }
.svc-row:hover { background: var(--paper); }
.svc-row .nm { font-size: 0.98rem; line-height: 1.45; }
.svc-row .nm small { display: block; margin-top: 3px; color: var(--muted); font-size: 0.82rem; }
.price-ph { font-size: 0.92rem; color: var(--muted); white-space: nowrap; } /* «по запросу»: a service without a price yet */
.price-v { font-weight: 600; color: var(--primary); white-space: nowrap; font-variant-numeric: tabular-nums; }
.svc-empty { padding: 26px; color: var(--muted); }
.svc-note { margin-top: 14px; font-size: 0.88rem; color: var(--muted); }
.svc-hit mark { background: #fde9b8; color: inherit; border-radius: 3px; padding: 0 2px; }
@media (max-width: 640px) {
  .svc-row { grid-template-columns: minmax(0, 1fr); padding: 14px 18px; }
  .svc-row .price-ph, .svc-row .price-v { justify-self: start; }
  .svc-panel-head { padding: 18px; }
  .svc-search { max-width: none; }
}

/* stages + durations */
.stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; counter-reset: st; }
@media (min-width: 1100px) { .stages { grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); } }
.stage { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: var(--radius); background: #fffdf9; border: 1px solid var(--line); counter-increment: st; }
.stage::before { content: counter(st, decimal-leading-zero); font: 500 0.78rem/1 var(--f-mono); letter-spacing: 0.1em; color: var(--bronze); }
.stage h3 { font: 500 1.08rem/1.3 var(--f-display); letter-spacing: -0.02em; }
.stage p { color: var(--muted); font-size: 0.95rem; line-height: 1.55; }
.stage .dur { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; font: 500 0.8rem/1 var(--f-mono); padding: 8px 11px; border-radius: 999px; background: #e3f4fd; color: var(--sky-deep); }
.stage .dur::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 1.6px solid currentColor; box-shadow: inset 0 0 0 2px #e3f4fd; background: linear-gradient(currentColor, currentColor) 50% 30% / 1.6px 40% no-repeat; }
.dur-table-wrap { margin-top: 28px; border-radius: var(--radius); border: 1px solid var(--line); background: #fffdf9; overflow-x: auto; }
.dur-table { width: 100%; border-collapse: collapse; font-size: 0.96rem; min-width: 520px; }
.dur-table caption { text-align: left; padding: 20px 24px 6px; font: 500 1.1rem/1.3 var(--f-display); letter-spacing: -0.02em; }
.dur-table th, .dur-table td { text-align: left; padding: 14px 24px; border-bottom: 1px solid var(--line); vertical-align: top; }
.dur-table thead th { font: 500 0.74rem/1.3 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.dur-table tbody tr:last-child td { border-bottom: 0; }
.dur-table td:nth-child(2), .dur-table td:nth-child(3) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.fine { margin-top: 12px; font-size: 0.86rem; color: var(--muted); }

/* useful facts */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.fact { display: flex; flex-direction: column; gap: 12px; padding: 28px; border-radius: var(--radius); background: var(--navy); color: var(--on-navy); position: relative; overflow: hidden; }
.fact::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(79, 195, 247, 0.28), transparent 70%); }
.fact b { font: 500 clamp(1.4rem, 1.9vw, 1.85rem)/1.1 var(--f-display); letter-spacing: -0.03em; color: var(--white); overflow-wrap: anywhere; position: relative; z-index: 1; }
.fact b.long { font-size: clamp(1.2rem, 1.6vw, 1.5rem); }
.fact p { color: var(--on-navy-muted); font-size: 0.97rem; line-height: 1.6; }
.fact:nth-child(even) { background: #fffdf9; color: var(--text); border: 1px solid var(--line); }
.fact:nth-child(even) b { color: var(--primary); }
.fact:nth-child(even) p { color: var(--muted); }

/* compare / chooser widgets */
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line-navy); margin-bottom: 22px; }
.section-light .seg, .section-enamel .seg { background: #fffdf9; border-color: var(--line); }
.seg button { border: 0; background: none; padding: 11px 18px; border-radius: 999px; font: 500 0.95rem/1 var(--f-body); color: inherit; opacity: 0.75; cursor: pointer; transition: background 0.25s, color 0.25s, opacity 0.25s; }
.seg button[aria-pressed="true"] { background: var(--primary); color: var(--white); opacity: 1; }
.choice { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 0; border-radius: 26px; overflow: hidden; border: 1px solid var(--line); background: #fffdf9; }
.choice-side { padding: clamp(24px, 4vw, 40px); background: var(--navy); color: var(--on-navy); display: flex; flex-direction: column; gap: 14px; }
.choice-side .eyebrow { color: var(--sky); }
.choice-side h3 { font: 500 clamp(1.4rem, 2.4vw, 1.9rem)/1.15 var(--f-display); letter-spacing: -0.03em; color: var(--white); }
.choice-side p { color: var(--on-navy-muted); line-height: 1.65; }
.choice-rows { margin: 0; display: grid; }
.choice-rows > div { display: grid; grid-template-columns: minmax(120px, 0.6fr) minmax(0, 1fr); gap: 16px; padding: 16px clamp(20px, 3vw, 32px); border-bottom: 1px solid var(--line); }
.choice-rows > div:last-child { border-bottom: 0; }
.choice-rows dt { font: 500 0.74rem/1.5 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.choice-rows dd { margin: 0; font-size: 0.98rem; line-height: 1.55; }
.meter { display: inline-flex; gap: 4px; vertical-align: middle; margin-right: 8px; }
.meter i { width: 18px; height: 6px; border-radius: 3px; background: var(--line); }
.meter i.on { background: var(--sky-deep); }
.choice-panel { transition: opacity 0.25s; }
.choice-panel.swap { opacity: 0; }
@media (max-width: 820px) { .choice { grid-template-columns: minmax(0, 1fr); } .choice-rows > div { grid-template-columns: minmax(0, 1fr); gap: 4px; } .choice-side h3 { overflow-wrap: anywhere; } }

.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.plan { text-align: left; display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: 20px; border: 1.5px solid var(--line); background: #fffdf9; color: var(--text); font: inherit; cursor: pointer; transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s; }
.plan:hover { transform: translateY(-3px); }
.plan[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 18px 40px rgba(14, 37, 54, 0.12); }
.plan b { font: 500 1.2rem/1.2 var(--f-display); letter-spacing: -0.02em; }
.plan span { color: var(--muted); font-size: 0.92rem; }
.plan-out { margin-top: 16px; padding: 20px 24px; border-radius: 18px; background: var(--navy); color: var(--on-navy); display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: baseline; }
.plan-out b { font: 500 1.4rem/1.2 var(--f-display); color: var(--white); letter-spacing: -0.02em; }
.plan-out span { color: var(--on-navy-muted); }
@media (max-width: 900px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.symptoms { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 22px; align-items: start; }
.sym-list { display: grid; gap: 10px; }
.sym { display: flex; align-items: center; justify-content: space-between; gap: 14px; text-align: left; padding: 18px 20px; border-radius: 18px; border: 1.5px solid var(--line); background: #fffdf9; color: var(--text); font: 500 1rem/1.35 var(--f-body); cursor: pointer; transition: border-color 0.25s, background 0.25s; }
.sym::after { content: ""; flex: none; width: 9px; height: 9px; border-right: 2px solid currentColor; border-top: 2px solid currentColor; transform: rotate(45deg); opacity: 0.5; }
.sym[aria-pressed="true"] { border-color: var(--primary); background: var(--white); }
.sym[aria-pressed="true"]::after { opacity: 1; color: var(--sky-deep); }
.sym-out { position: sticky; top: calc(var(--header-space) + 8px); padding: clamp(24px, 3.5vw, 36px); border-radius: 26px; background: var(--navy); color: var(--on-navy); display: flex; flex-direction: column; gap: 14px; }
.sym-out h3 { font: 500 clamp(1.3rem, 2.2vw, 1.7rem)/1.2 var(--f-display); color: var(--white); letter-spacing: -0.03em; }
.sym-out p { color: var(--on-navy-muted); line-height: 1.65; }
.sym-out ul { display: grid; gap: 8px; }
.sym-out li { padding-left: 20px; position: relative; color: var(--on-navy); }
.sym-out li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 10px; height: 2px; background: var(--sky); }
.sym-out .btn { align-self: flex-start; margin-top: 6px; }
.sym-out .fine { color: var(--on-navy-muted); }
@media (max-width: 820px) { .symptoms { grid-template-columns: minmax(0, 1fr); } .sym-out { position: static; } }

/* full-size photo view (the home-page gallery, js/main.js initGallery) */
.lightbox { margin: auto; padding: 0; border: 0; background: transparent; width: min(1100px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); overflow: visible; }
.lightbox::backdrop { background: rgba(8, 24, 37, 0.86); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lb-stage { position: relative; display: flex; flex-direction: column; gap: 12px; touch-action: pan-y; }
.lb-stage img { width: 100%; max-height: calc(100dvh - 140px); object-fit: contain; border-radius: 18px; background: #0a1b28; transition: opacity 0.25s, transform 0.25s; -webkit-user-select: none; user-select: none; }
.lb-stage img.out { opacity: 0; transform: scale(0.98); }
.lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--on-navy); }
.lb-cap { font-size: 0.95rem; }
.lb-count { font: 500 0.8rem/1 var(--f-mono); color: var(--on-navy-muted); }
.lb-nav { display: flex; gap: 8px; }
.lb-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 253, 249, 0.92); color: var(--primary); cursor: pointer; display: grid; place-items: center; }

/* doctors of the direction */

/* FAQ */
.faq-wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.faq-aside { position: sticky; top: calc(var(--header-space) + 10px); display: flex; flex-direction: column; gap: 16px; }
.faq-card { padding: 26px; border-radius: var(--radius); background: var(--navy); color: var(--on-navy); display: flex; flex-direction: column; gap: 12px; }
.faq-card b { font: 500 1.2rem/1.3 var(--f-display); color: var(--white); letter-spacing: -0.02em; }
.faq-card p { color: var(--on-navy-muted); font-size: 0.95rem; }
.faq-card .btn { align-self: flex-start; }
.faq { display: grid; gap: 10px; }
.faq details { border-radius: 18px; background: #fffdf9; border: 1px solid var(--line); transition: border-color 0.25s, box-shadow 0.25s; }
.faq details[open] { border-color: #cfdde6; box-shadow: 0 14px 34px rgba(14, 37, 54, 0.07); }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px; cursor: pointer; font: 500 1.02rem/1.4 var(--f-body); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--paper) linear-gradient(var(--primary), var(--primary)) center / 12px 2px no-repeat; box-shadow: inset 0 0 0 1px var(--line); transition: transform 0.3s; }
.faq details:not([open]) summary::after { background-image: linear-gradient(var(--primary), var(--primary)), linear-gradient(var(--primary), var(--primary)); background-size: 12px 2px, 2px 12px; background-position: center, center; background-repeat: no-repeat; }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq .ans { padding: 0 22px 22px; color: var(--muted); line-height: 1.7; }
.faq .ans p + p { margin-top: 10px; }
@media (max-width: 900px) { .faq-wrap { grid-template-columns: minmax(0, 1fr); } .faq-aside { position: static; } }

/* booking band */
.book-band { position: relative; color: var(--on-navy); }
.book-band > .container { position: relative; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.book-band h2 { color: var(--white); font-size: clamp(1.8rem, 4vw, 3rem); }
.book-band .section-sub { color: var(--on-navy-muted); margin-top: 14px; }
.book-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.book-card { padding: 26px; border-radius: var(--radius); background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); display: grid; gap: 14px; }
.book-card div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.book-card dt { font: 500 0.74rem/1.5 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-navy-muted); }
.book-card dd { margin: 0; color: var(--white); overflow-wrap: anywhere; }
.book-card a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(79, 195, 247, 0.5); }
@media (max-width: 900px) { .book-band > .container { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .book-card div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* link back to the 3D comparison */
.cross { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.cross a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: #fffdf9; border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: 0.92rem; color: var(--primary); transition: border-color 0.25s, transform 0.25s; }
.cross a:hover { border-color: var(--primary); transform: translateY(-2px); }

/* Uzbek note on Russian-only pages */
.ru-note { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 950; padding: 12px 18px; border-radius: 14px; background: var(--navy); color: var(--on-navy); font-size: 0.9rem; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.25); max-width: calc(100vw - 32px); }
@media (max-width: 700px) { .ru-note { bottom: 86px; } }

/* home page: "Подробнее" link on each service card */
.service-more { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.93rem; color: var(--primary); text-decoration: none; }
.service-card--lead .service-more { color: var(--white); }
.service-more svg { transition: transform 0.25s; }
.service-more:hover svg { transform: translateX(4px); }
.service-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* home: strip with the five service pages under the cards */
.dir-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 34px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.dir-strip > span { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--sky-deep); font-weight: 600; margin-right: 6px; }
.dir-strip a { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); color: var(--primary); font-weight: 600; font-size: 0.95rem; text-decoration: none; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.dir-strip a:hover { background: var(--primary); border-color: var(--primary); color: var(--white); }
@media (max-width: 700px) { .dir-strip { padding: 14px; } .dir-strip > span { width: 100%; } .dir-strip a { padding: 8px 13px; font-size: 0.9rem; } }

/* durations table → stacked rows on phones */
@media (max-width: 600px) {
  .dur-table { min-width: 0; }
  .dur-table caption { padding: 18px 18px 8px; }
  .dur-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .dur-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
  .dur-table tbody tr:last-child { border-bottom: 0; }
  .dur-table td { display: block; padding: 0; border: 0; }
  .dur-table td:first-child { grid-column: 1 / -1; font-weight: 600; color: var(--primary); }
  .dur-table td[data-label] { white-space: normal; font-size: 0.92rem; }
  .dur-table td[data-label]::before { content: attr(data-label); display: block; font: 500 0.68rem/1.4 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
}

/* phones: the option switch becomes a rounded block of buttons instead of one long pill */
@media (max-width: 600px) {
  .seg { display: flex; width: 100%; border-radius: 20px; }
  .seg button { flex: 1 1 auto; border-radius: 14px; text-align: center; }
}
@media (max-width: 480px) {
  .faq-card .btn, .sym-out .btn, .book-card .btn { width: 100%; justify-content: center; white-space: normal; text-align: center; }
}

/* ---------- compact phone layout for the service pages ---------- */
@media (max-width: 640px) {
  .reveal-grid, .stages, .facts { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding-right: var(--gutter-r); scrollbar-width: none; }
  .reveal-grid::-webkit-scrollbar, .stages::-webkit-scrollbar, .facts::-webkit-scrollbar { display: none; }
  .reveal-grid > *, .stages > *, .facts > * { flex: 0 0 82%; scroll-snap-align: start; }
}

/* ---------- legal pages: a narrow reading column, numbered sections, highlighted blanks ---------- */
.legal-wrap { max-width: 760px; }
.legal h1 { font: 500 clamp(1.8rem, 4vw, 2.6rem)/1.12 var(--f-display); letter-spacing: -0.03em; color: var(--primary); }
.legal-edition { margin-top: 10px; color: var(--muted); font-size: 0.95rem; }
.legal-toc { margin-top: 28px; padding: 18px 22px; border-radius: 18px; background: var(--white); border: 1px solid var(--line); }
.legal-toc summary { cursor: pointer; font: 500 1rem/1.3 var(--f-display); color: var(--primary); }
.legal-toc ol { margin-top: 12px; padding-left: 22px; list-style: decimal; display: flex; flex-direction: column; gap: 6px; }
.legal-toc a { color: var(--sky-deep); text-decoration: none; }
.legal-toc a:hover { text-decoration: underline; }
.legal-body { margin-top: 12px; }
.legal-sec { padding-top: 40px; scroll-margin-top: calc(var(--header-space) - 24px); font-size: 1.0625rem; line-height: 1.7; }
.legal-sec h2 { font: 500 clamp(1.15rem, 2.4vw, 1.4rem)/1.3 var(--f-display); letter-spacing: -0.02em; color: var(--primary); margin-bottom: 12px; }
.legal-sec h2 span { color: var(--bronze); }
.legal-sec p + p, .legal-sec ul + p, .legal-sec p + ul { margin-top: 10px; }
.legal-sec ul { list-style: disc; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; }
.legal-sec a { color: var(--sky-deep); }
.legal-sec code { font: 0.9em var(--f-mono); background: var(--enamel); padding: 1px 6px; border-radius: 6px; }
.legal-fill { background: rgba(242, 179, 61, 0.18); border-radius: 4px; padding: 0 4px; font-weight: 500; white-space: nowrap; }
.legal-end { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.legal-end p { color: var(--muted); }
.legal-end a:not(.btn) { color: var(--sky-deep); }
@media (max-width: 480px) { .legal h1 { font-size: 1.4rem; overflow-wrap: anywhere; } }

/* 404 */
.nf { min-height: 70vh; display: grid; align-items: center; padding-top: 140px; }
.nf-wrap { max-width: 640px; text-align: center; }
.nf-code { margin: 0; font: 600 clamp(4rem, 14vw, 7.5rem)/1 "Unbounded", system-ui, sans-serif; color: #f2b33d; letter-spacing: -0.04em; }
.nf h1 { margin: 12px 0; }
.nf p { color: #3d5466; }
.nf-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
