/*
 * Сайт демо-сети «Рассвет» — в каноне «Мастер медицины»: прямые углы
 * (кроме полей ввода), янтарь — единственный цвет действия, узкие подписи
 * капителью, таблицы с тонкими линиями, статус — полосой.
 * Текст на янтаре тёмный: белый на этом янтаре не проходит по контрасту.
 */
:root {
  --ink: #172029; --ink-2: #4e5c68; --ink-3: #7a8794; --ink-4: #98a4af;
  --amber: #f5a524; --amber-hover: #e0931a; --amber-text: #9a6208; --amber-bg: #fdf3e2; --amber-border: #f0dcb4;
  --surface: #fff; --panel: #f5f7f9; --rail: #fbfaf7; --rail-line: #ece6dc;
  --line: #e3e8ec; --line-3: #cbd3da; --hair: #eff2f5;
  --blue: #2f73c9; --green: #1e9e6a; --red: #a83a2d; --red-bg: #fceae7; --green-bg: #eaf7f1;
  --font: 'Barlow', 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --cond: 'IBM Plex Sans Condensed', 'Barlow', system-ui, sans-serif;
  --wrap: 1280px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 400 16px/1.5 var(--font); color: var(--ink); background: var(--surface); -webkit-font-smoothing: antialiased; }
a { color: var(--amber-text); }
a:hover { color: #6e4605; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; border-radius: 0; }
input, select, textarea { border-radius: 5px; }
input[type='checkbox'] { border-radius: 0; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.kicker { font: 600 12px/1.3 var(--cond); letter-spacing: .11em; text-transform: uppercase; color: var(--ink-3); }
.kicker.amber { color: var(--amber-text); }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.08; }
h1 { font-size: clamp(38px, 5.2vw, 62px); letter-spacing: -.015em; }
h2 { font-size: clamp(28px, 3.4vw, 40px); }
.lead { font-size: 19px; color: var(--ink-2); max-width: 580px; }
.muted { color: var(--ink-3); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px;
  font: 700 14px/1 var(--cond); letter-spacing: .11em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; background: var(--amber); color: var(--ink); }
.btn:hover { background: var(--amber-hover); color: var(--ink); }
.btn.ghost { background: var(--surface); border-color: var(--line-3); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.dark { background: var(--surface); border-color: var(--ink); }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn:focus-visible, .slot:focus-visible, .tab:focus-visible, a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.demo-bar { background: var(--ink); color: #e9eef2; font-size: 13px; text-align: center; padding: 8px 16px; }
.demo-bar a { color: var(--amber); }

/* шапка */
.top { border-bottom: 1px solid var(--line); background: var(--surface); }
.top .wrap { min-height: 64px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 32px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); padding: 10px 0; }
.brand b { display: block; font-weight: 700; font-size: 16px; letter-spacing: .14em; text-transform: uppercase; line-height: 1.05; }
.brand small { display: block; font: 500 11px/1.2 var(--cond); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.nav { display: flex; flex-wrap: wrap; gap: 0 26px; flex: 1 1 380px; font: 600 13px/1 var(--cond); letter-spacing: .11em; text-transform: uppercase; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 14px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--ink); border-bottom-color: var(--amber); }
.call { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); line-height: 1.15; }
.call b { font-size: 18px; font-variant-numeric: tabular-nums; }
.call small { font-size: 12px; color: var(--ink-3); }
.top-right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 8px 0; }

/* блоки */
.band { background: var(--rail); border-top: 1px solid var(--rail-line); border-bottom: 1px solid var(--rail-line); }
.dark-band { background: var(--ink); color: #fff; }
.dark-band .lead, .dark-band label { color: #cbd3da; }
.sec { padding: 64px 0; }
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 28px; }
.sec-head h2 { margin-top: 8px; }

.hero { display: flex; flex-wrap: wrap; gap: 48px; align-items: stretch; padding: 56px 0; }
.hero-text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.panel { border: 1px solid var(--line); background: var(--surface); }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.panel-body { padding: 16px 20px; }
.panel.accent { border-top: 4px solid var(--amber); }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--ink-2); }
.field input, .field select, .field textarea, select.inline { font-size: 15px; padding: 10px 12px; border: 1px solid var(--line-3); background: #fff; min-height: 44px; width: 100%; }
.field textarea { min-height: 72px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; flex: 0 0 auto; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }
.form { display: flex; flex-direction: column; gap: 12px; }
.note { font-size: 12px; color: var(--ink-3); }
.err { background: var(--red-bg); color: var(--red); padding: 10px 12px; font-size: 14px; }
.ok { background: var(--green-bg); border-left: 3px solid var(--green); padding: 14px 16px; }

/* дни и окна */
.days { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.day { border: 0; border-bottom: 3px solid transparent; background: #fff; padding: 9px 0; text-align: center; cursor: pointer; min-height: 56px; }
.day small { display: block; font: 600 11px/1.2 var(--cond); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.day b { font-size: 19px; font-variant-numeric: tabular-nums; }
.day[aria-pressed='true'] { border-bottom-color: var(--amber); background: var(--amber-bg); }
.slot { min-height: 42px; min-width: 60px; padding: 0 10px; border: 1px solid var(--line-3); background: #fff; font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; cursor: pointer; }
.slot:hover { border-color: var(--ink); }
.slot[aria-pressed='true'] { background: var(--amber); border-color: var(--amber); }
.slots { display: flex; flex-wrap: wrap; gap: 6px; }
.doc { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 20px; border-bottom: 1px solid var(--hair); border-left: 3px solid var(--amber); }
.ava { width: 40px; height: 40px; flex: 0 0 40px; background: var(--amber-bg); color: var(--amber-text); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.doc-name { flex: 1 1 180px; min-width: 0; }
.doc-name b { display: block; font-weight: 600; }
.doc-name small { display: block; font-size: 13px; color: var(--ink-3); }
.empty { padding: 20px; color: var(--ink-2); font-size: 14px; }
.loading { padding: 20px; color: var(--ink-3); font-size: 14px; }

/* направления, цены, карточки */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 20px; min-height: 140px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.tile:hover { background: var(--amber-bg); color: var(--ink); }
.tile b { font-size: 19px; }
.tile span { font-size: 14px; color: var(--ink-2); flex: 1 1 auto; }
.tile em { font: 600 13px/1.2 var(--cond); font-style: normal; letter-spacing: .06em; color: var(--amber-text); }
.table-box { overflow-x: auto; border: 1px solid var(--line); }
table.t { width: 100%; border-collapse: collapse; min-width: 620px; }
.t th { text-align: left; padding: 12px 16px; background: var(--panel); border-bottom: 1px solid var(--line); font: 600 12px/1.2 var(--cond); letter-spacing: .11em; text-transform: uppercase; color: var(--ink-3); }
.t td { padding: 13px 16px; border-bottom: 1px solid var(--hair); vertical-align: top; }
.t .r { text-align: right; }
.t tr.total td { background: var(--amber-bg); font-weight: 700; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 24px; border: 1px solid var(--line); background: #fff; }
.card.offer { border-top: 4px solid var(--amber); min-height: 290px; }
.card .price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.card .price b { font-size: 32px; font-weight: 800; }
.card .price s { color: var(--ink-3); }
.code { font: 700 13px/1 var(--cond); letter-spacing: .1em; background: var(--amber-bg); border: 1px dashed var(--amber-border); color: #6e4605; padding: 7px 10px; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.clinic { border-left: 3px solid var(--c, var(--amber)); }
.doctor-card { padding: 0; gap: 0; }
.doctor-card .ph { height: 140px; background: var(--panel); display: flex; align-items: center; justify-content: center; color: var(--ink-4); font-size: 40px; font-weight: 700; }
.doctor-card .in { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; }
.doctor-card .btn { width: 100%; }
.list { border: 1px solid var(--line); background: #fff; }
.list > div { padding: 14px 16px; border-bottom: 1px solid var(--hair); }
.list.marked > div { border-left: 3px solid var(--amber); }
details.faq { border-bottom: 1px solid var(--line); padding: 16px 4px; }
details.faq summary { font-weight: 600; font-size: 17px; cursor: pointer; }
details.faq p { color: var(--ink-2); margin: 8px 0 0; }

.foot { background: var(--rail); border-top: 1px solid var(--rail-line); color: var(--ink-2); font-size: 13px; }
.foot .wrap { padding: 28px 24px; display: flex; flex-wrap: wrap; gap: 12px 40px; }
.foot .wrap > div { flex: 1 1 280px; }

/* запись как в приложении */
.shell { display: flex; flex-wrap: wrap; min-height: calc(100vh - 36px); }
.rail { flex: 1 1 216px; background: var(--rail); border-right: 1px solid var(--rail-line); display: flex; flex-direction: column; }
.rail .brand { padding: 18px 20px; }
.rail nav { display: flex; flex-direction: column; padding: 8px 0; font: 600 13px/1 var(--cond); letter-spacing: .11em; text-transform: uppercase; }
.rail nav a { display: flex; align-items: center; gap: 14px; padding: 0 20px 0 23px; min-height: 46px; color: var(--ink-2); text-decoration: none; }
.rail nav a:hover { background: #f5f1ea; color: var(--ink); }
.rail nav a[aria-current='page'] { background: var(--amber-bg); color: var(--ink); border-left: 3px solid var(--amber); padding-left: 20px; }
.rail-foot { margin-top: auto; padding: 18px 20px; border-top: 1px solid var(--rail-line); }
.main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding: 8px 24px; min-height: 52px; border-bottom: 1px solid var(--line); }
.toolbar label { display: flex; align-items: center; gap: 8px; }
select.inline { width: auto; min-height: 40px; padding: 7px 10px; font: 600 13px/1 var(--cond); letter-spacing: .08em; text-transform: uppercase; }
.tabs { display: flex; flex-wrap: wrap; gap: 0 22px; font: 600 13px/1 var(--cond); letter-spacing: .11em; text-transform: uppercase; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--ink-2); padding: 12px 0; min-height: 44px; cursor: pointer; letter-spacing: inherit; text-transform: inherit; font: inherit; }
.tab[aria-selected='true'] { color: var(--ink); border-bottom-color: var(--amber); }
.page-head { padding: 22px 24px 0; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 40px; }
.page-head h1 { font-size: 44px; margin: 6px 0 4px; }
.work { display: flex; flex-wrap: wrap; gap: 24px; padding: 18px 24px 28px; align-items: flex-start; }
.grid-box { flex: 999 1 520px; min-width: 0; overflow-x: auto; border: 1px solid var(--line); }
.sched { min-width: 760px; }
.sched-row { display: grid; grid-template-columns: 250px repeat(var(--n, 4), minmax(0, 1fr)); border-bottom: 1px solid var(--hair); }
.sched-row.head { background: var(--panel); border-bottom: 1px solid var(--line); }
.sched-row.head > div { padding: 10px 12px; }
.sched-row.head > div + div { border-left: 1px solid var(--line); }
.sched-row.head .today { border-bottom: 3px solid var(--amber); }
.sched-cell { padding: 12px; border-left: 1px solid var(--hair); display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.sched-cell .none { font-size: 12px; color: var(--ink-4); padding: 10px 0; }
.sched-doc { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; }
.side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.pager { display: flex; align-items: center; gap: 8px; }
.pager button { min-height: 40px; min-width: 40px; border: 1px solid var(--line-3); background: #fff; cursor: pointer; font-weight: 700; }
.status { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding: 6px 24px; border-top: 1px solid var(--line); background: #f8fafb; font-size: 12px; color: var(--ink-3); }

/* Телефон: рельс превращается в строку сверху, как вкладки, — иначе он занимает весь первый экран. */
@media (max-width: 860px) {
  .rail { flex: 1 1 100%; border-right: 0; border-bottom: 1px solid var(--rail-line); flex-direction: row; flex-wrap: wrap; align-items: center; }
  .rail .brand { padding: 10px 16px; }
  .rail nav { flex-direction: row; overflow-x: auto; padding: 0; flex: 1 1 100%; border-top: 1px solid var(--rail-line); }
  .rail nav a, .rail nav a[aria-current='page'] { padding: 0 14px; border-left: 0; white-space: nowrap; }
  .rail nav a[aria-current='page'] { border-bottom: 2px solid var(--amber); }
  .rail nav svg { display: none; }
  .rail-foot { display: none; }
  .toolbar, .page-head, .work { padding-left: 16px; padding-right: 16px; }
  .page-head h1 { font-size: 34px; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; max-width: 100%; }
  .tab { white-space: nowrap; }
}
