/* Page CSS for the Resta templates. Only what sits inside a visual (the live HTML mocks of iiko screens,
   the map, the diagram band) plus the parts the brief asks for that the kit leaves out: the quiz, the
   accordion FAQ and the consent lock on forms (brief v3 wins over the kit there). Tokens only. */

/* ---------- the brand band: the one warm transition between the two accents (brief) */
.band-warm { background: linear-gradient(115deg, #ff8562 0%, #f8713f 55%, #f15427 100%); --ink: #1d1f25; --muted: #1d1f25; color: #1d1f25; }
.band-warm .card { background: #fff; border-color: transparent; }

/* ---------- cards with a price at the foot */
.svc { display: grid; grid-template-rows: auto 1fr auto; gap: var(--s-3); height: 100%; }
.svc__price { font-weight: 500; font-variant-numeric: tabular-nums; }
.svc__price--ask { color: var(--muted); font-weight: 400; }
.sit { display: grid; gap: var(--s-4); align-content: start; height: 100%; }
.sit img { width: 64px; height: 64px; }
.sit--lead img { width: 112px; height: 112px; }
.sit--lead h3 { font-size: var(--t-h3); line-height: 1.2; }
.metric { font: var(--display-weight) clamp(40px, 3vw + 12px, 56px)/1 var(--font-display); letter-spacing: var(--display-tracking); }

/* ---------- live mocks of iiko screens (role="img", aria-label): drawn in the page's tokens */
.mk { --mk-line: color-mix(in oklab, var(--p-ink) 12%, transparent); font: 400 13px/1.4 var(--font-text); color: var(--p-ink); }
.mk-card { background: #fff; border: 1px solid var(--mk-line); border-radius: 14px; box-shadow: 0 1px 2px rgba(29,31,37,.06), 0 12px 32px rgba(29,31,37,.10); }
.mk-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--mk-line); font-weight: 500; }
.mk-head .mk-sp { flex: 1; }
.mk-meta { color: var(--p-muted); font-size: 12px; }
.mk-chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 500; background: color-mix(in oklab, var(--p-ink) 7%, #fff); }
.mk-chip--ok { background: #e3f4e8; color: #1c6b3a; }
.mk-chip--acc { background: #ffe9e1; color: #9e2f10; }
.mk-chip--ok::before, .mk-chip--acc::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.mk-rows { display: grid; }
.mk-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--mk-line); }
.mk-row:last-child { border-bottom: 0; }
.mk-row b { font-weight: 500; }
.mk-row .mk-num { font-variant-numeric: tabular-nums; }
.mk-total { display: flex; justify-content: space-between; padding: 12px 14px; font-weight: 500; font-size: 15px; border-top: 1px solid var(--mk-line); }
.mk-btn { display: flex; align-items: center; justify-content: center; height: 40px; margin: 0 14px 14px; border-radius: 10px; background: var(--p-action); color: var(--p-action-ink); font-weight: 500; }

/* phone: the owner's dashboard */
.mk-phone { width: 260px; padding: 10px; border-radius: 36px; background: var(--p-ink); box-shadow: 0 24px 60px rgba(29,31,37,.28); }
.mk-phone__screen { border-radius: 28px; background: var(--p-bg); padding: 18px 14px 16px; display: grid; gap: 12px; }
.mk-phone__bar { width: 70px; height: 5px; border-radius: 3px; background: var(--mk-line); margin: 0 auto 2px; }
.mk-kpi { display: grid; gap: 2px; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid var(--mk-line); }
.mk-kpi__v { font: 500 22px/1.1 var(--font-text); font-variant-numeric: tabular-nums; }
.mk-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mk-bars { display: grid; grid-template-columns: repeat(12, 1fr); align-items: end; gap: 4px; height: 70px; padding: 10px 12px 6px; border-radius: 14px; background: #fff; border: 1px solid var(--mk-line); }
.mk-bars i { display: block; border-radius: 3px 3px 1px 1px; background: color-mix(in oklab, var(--p-ink) 18%, #fff); }
.mk-bars i.is-peak { background: var(--p-accent); }
.mk-axis { display: flex; justify-content: space-between; color: var(--p-muted); font-size: 11px; padding: 0 4px; }

/* POS: an iikoFront-like order screen (no iiko logo) */
.mk-pos { display: grid; grid-template-columns: 1.1fr 1fr; width: 100%; max-width: 560px; overflow: hidden; }
.mk-pos__order { border-right: 1px solid var(--mk-line); display: grid; grid-template-rows: auto 1fr auto auto; }
.mk-pos__menu { padding: 12px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; align-content: start; }
.mk-pos__tile { padding: 12px 10px; border-radius: 10px; background: color-mix(in oklab, var(--p-ink) 5%, #fff); font-weight: 500; min-height: 58px; display: grid; align-content: space-between; }
.mk-pos__tile span { color: var(--p-muted); font-weight: 400; font-size: 12px; }
.mk-pos__tile.is-on { background: #ffe9e1; }

/* EGAIS: an incoming invoice card */
.mk-doc { width: 100%; max-width: 420px; }
.mk-doc__grid { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; padding: 14px; border-bottom: 1px solid var(--mk-line); }
.mk-doc__grid dt { color: var(--p-muted); }
.mk-doc__grid dd { margin: 0; font-weight: 500; }

/* the map of Russia and the hub band */
.ru-map { width: 100%; height: auto; display: block; }
.ru-map text { font: 500 13px var(--font-text); fill: var(--p-ink); }
.ru-legend { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); margin-top: var(--s-4); }
.ru-legend span { display: inline-flex; align-items: center; gap: var(--s-2); }
.ru-legend i { width: 14px; height: 14px; border-radius: 4px; background: var(--p-accent); }
.ru-legend i.dot { border-radius: 50%; background: var(--p-ink); width: 10px; height: 10px; }

/* the brief's accordion FAQ (the kit opens every answer; the brief asks for a list that opens) */
.acc { display: grid; }
.acc details { border-bottom: 1px solid var(--line); }
.acc summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); min-height: 64px; padding: var(--s-4) 0; font: 500 var(--t-lead)/1.4 var(--font-text); }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); transition: transform var(--dur, 200ms) var(--ease, ease); }
.acc details[open] summary::after { transform: translateY(3px) rotate(225deg); }
.acc details p { margin: 0 0 var(--s-5); max-width: 64ch; }

/* forms: the button waits for the consent box (brief) */
.form button[type="submit"]:disabled { opacity: .45; cursor: not-allowed; }
.consent { display: flex; gap: var(--s-3); align-items: flex-start; font-size: var(--t-small); line-height: 1.5; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--p-ink); }
.panel-form { background: var(--surface); border-radius: var(--r-lg); padding: var(--s-7); }
@media (max-width: 639px) { .panel-form { padding: var(--s-5); } }
.write { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); margin-top: var(--s-5); }
.write a { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; font-weight: 500; }
.write img { width: 24px; height: 24px; }

/* the quiz: three steps, one at a time once the script runs */
.quiz fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: var(--s-4); }
.quiz legend { font: 500 var(--t-lead)/1.4 var(--font-text); padding: 0; margin-bottom: var(--s-4); }
.quiz__opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s-3); }
.quiz__opt { position: relative; display: flex; align-items: center; gap: var(--s-3); min-height: 56px; padding: var(--s-3) var(--s-4); border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--bg); cursor: pointer; }
.quiz__opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.quiz__opt:has(input:checked) { border-color: var(--p-ink); box-shadow: inset 0 0 0 1px var(--p-ink); }
.quiz__opt:has(input:focus-visible) { outline: 2px solid var(--action); outline-offset: 2px; }
.quiz__opt img { width: 24px; height: 24px; flex: none; }
.quiz__bar { height: 4px; border-radius: 2px; background: var(--line); margin-bottom: var(--s-6); overflow: hidden; }
.quiz__bar i { display: block; height: 100%; width: var(--q, 25%); background: var(--p-accent); transition: width 300ms var(--ease, ease); }
.quiz__count { margin-bottom: var(--s-3); }
.quiz.is-stepped fieldset:not(.is-on) { display: none; }
.quiz:not(.is-stepped) fieldset + fieldset { margin-top: var(--s-6); }
.quiz__nav { display: flex; gap: var(--s-4); align-items: center; margin-top: var(--s-5); }

/* breadcrumbs above a service hero */
.crumbs { display: flex; flex-wrap: wrap; gap: var(--s-2); font-size: var(--t-small); color: var(--muted); margin-bottom: var(--s-4); }
.crumbs a { text-decoration: underline; text-underline-offset: 3px; }
/* a template title over 45 characters (the 78 pages hold some) is set at the statement size */
.hero h1.is-long { font-size: clamp(34px, 2.6vw + 14px, 56px); }
/* the comparison table */
.ctable { display: grid; }
.ctable__row { display: grid; grid-template-columns: 1fr 1.5fr 1.5fr; gap: var(--gutter); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.ctable__row--head { font-weight: 500; border-bottom-color: var(--line-strong); }
@media (max-width: 639px) { .ctable__row { grid-template-columns: 1fr; gap: var(--s-2); } .ctable__row--head { display: none; } .ctable__row [data-col]::before { content: attr(data-col) ": "; font-weight: 500; } }
.mk-wrap { display: grid; place-items: center; padding: var(--s-6); background: var(--surface); border-radius: var(--r-lg); height: 100%; }

/* ---------- fixes after the first look */
.hero__facts > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: var(--s-1); }
.hero__facts dd { font-size: var(--t-lead); }
.sit { grid-template-columns: 48px 1fr; column-gap: var(--s-4); align-items: start; }
.sit img { width: 48px; height: 48px; }
.sit__text { display: grid; gap: var(--s-2); }
.sit--lead { grid-template-columns: 112px 1fr; column-gap: var(--s-6); align-items: center; }
.sit--lead img { width: 112px; height: 112px; }
@media (max-width: 1023px) { .sit, .sit--lead { grid-template-columns: 1fr; row-gap: var(--s-3); } .sit--lead img { width: 72px; height: 72px; } }
.hub-frame { height: min(520px, 56vw); }
.hub-frame > .dg { height: 100%; }
.ru-frame .ru-map { max-height: 560px; }
.ru-legend { display: grid; gap: var(--s-3); }
.ru-legend span { display: flex; gap: var(--s-3); align-items: baseline; }
.ru-legend i { flex: none; transform: translateY(2px); }
[data-moment="pinned-chapters"] .mo-pc__visual.mo-pc__visual--lit { background: var(--p-surface); }
.mk-chip { white-space: nowrap; }
.ui-chat .ui-chat__online { white-space: nowrap; }
.form > :is(.consent, .field:has(textarea)) { grid-column: 1 / -1; }
.form.quiz { display: block; }
.form.quiz .btn-row { margin-top: var(--s-4); }
.ly-float .form, form.ly-float { display: grid; grid-template-columns: 1fr; }
.ru-frame { display: grid; place-items: center; }
.ru-frame .ru-map { max-height: 500px; width: auto; max-width: 100%; }
.case { display: grid; gap: var(--s-3); align-content: start; }
.case .mk-mini { margin-top: var(--s-3); box-shadow: none; }
.quiz__peek .mk-doc { max-width: none; box-shadow: none; }
@media (max-width: 639px) {
  .hero__facts { display: none; }
  .nav__actions > .nav__link { display: none; }
  .ui-chat .ui-head { flex-wrap: wrap; }
  .sit, .sit--lead { grid-template-columns: 40px 1fr; column-gap: var(--s-3); }
  .sit img, .sit--lead img { width: 40px; height: 40px; }
  #services .svc > p, #modules .rows__value { display: none; }
  #modules .rows li:first-child .rows__value { display: inline; }
  .quiz__peek, .case .mk-mini { display: none; }
}
.ru-frame .ru-map { width: 100%; height: 500px; max-height: none; }
@media (max-width: 1023px) { .ru-frame .ru-map { height: auto; } }
@media (max-width: 639px) {
  .hub-frame { height: 440px; }
  [data-moment="pinned-chapters"]:not(.is-live) .mo-pc__step:not(:first-child) .mo-pc__visual { display: none; }
}
.card .metric { font: var(--display-weight) clamp(40px, 2.4vw + 16px, 56px)/1.05 var(--font-display); letter-spacing: var(--display-tracking); color: var(--p-ink); margin: 0; }
.sit--lead { grid-template-columns: 160px 1fr; }
.sit--lead img { width: 160px; height: 160px; }
.quiz__opt { min-height: 72px; }
.ru-frame .ru-map { height: 440px; }
.ru-cities { display: none; margin-top: var(--s-4); }
@media (max-width: 1279px) { .sit--lead { grid-template-columns: 96px 1fr; } .sit--lead img { width: 96px; height: 96px; } }
@media (max-width: 1023px) {
  .case .mk-mini { display: none; }
  .ru-frame .ru-map { height: auto; }
  .ru-cities { display: block; }
  .band-warm .section-head p { display: none; }
}
@media (min-width: 640px) and (max-width: 1023px) {
  #formats { --h: 1; }
  #formats .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #formats .grid > .tile { grid-column: auto; }
}
.ru-frame .ru-map { height: 420px; }
@media (max-width: 1279px) { .band-warm .section-head p { display: none; } }
@media (max-width: 1023px) { .ru-frame .ru-map { height: auto; } }
.hero-price { font: 500 var(--t-h3)/1.2 var(--font-text); margin: 0 0 var(--s-5); }
.pic-43 { aspect-ratio: 4 / 3; border-radius: var(--r-lg); overflow: hidden; }
.pain { display: grid; gap: var(--s-4); align-content: start; }
.sla { margin-top: var(--s-7); row-gap: var(--s-5); }
.sla .metric { font: var(--display-weight) clamp(32px, 1.6vw + 18px, 44px)/1.05 var(--font-display); letter-spacing: var(--display-tracking); margin: 0 0 var(--s-2); }
.inc { display: flex; gap: var(--s-3); align-items: flex-start; }
.inc img { margin-top: 3px; flex: none; }
.stack-cards { display: grid; gap: var(--gutter); }
.more-card .svc { min-height: 280px; }
.more-card .svc img { width: 56px; height: 56px; }
.city-services .svc p { display: block; }
@media (max-width: 1279px) { .city-services .svc > p { display: none; } }
@media (max-width: 639px) {
  .hero-mock { max-height: 220px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); align-items: start; }
  .more-card .svc { min-height: 0; }
  .more-card .svc img { display: none; }
}
@media (min-width: 1024px) and (max-width: 1279px) { .band-warm#situations { --h: 2; } }
@media (max-width: 639px) {
  .crumbs { margin-bottom: var(--s-2); }
  .hero-price { font-size: var(--t-lead); margin-bottom: var(--s-4); }
  .hero-mock { max-height: 170px; }
  main > [data-moment="pinned-chapters"][data-moment]:not(.is-live) { min-height: calc(var(--hm, 1) * 100lvh); }
}
@media (max-width: 639px) {
  .hero .btn-row .btn--secondary { display: none; }
  #choose .mo-pc__visual, #diff .mo-pc__visual { display: none; }
}
.svc > img { width: 56px; height: 56px; }
.pic-43 > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ru-frame .ru-map { height: 400px; }
@media (max-width: 1023px) { .ru-frame .ru-map { height: auto; } }
@media (max-width: 639px) {
  .card .metric, .sla .metric { font-size: 28px; }
  .mk-pos { grid-template-columns: 1fr; }
  .mk-pos__menu { display: none; }
  .hero__media > .ly-float { display: none; }
  .panel-form .form { grid-template-columns: 1fr; }
  .quiz__peek, .case .mk-mini { display: block; }
  .svc > img { width: 40px; height: 40px; }
}
.rows .rows__name small { display: block; font-weight: 400; color: var(--muted); font-size: var(--t-small); margin-top: 2px; }
@media (max-width: 639px) { #services .svc > img { display: none; } }
.sit--lead h3, main .card h3.t-card { font-size: var(--t-card); }
.band-warm .card { padding: var(--s-5); }
.band-warm .sit p { line-height: 1.45; }
.svc { grid-template-columns: 40px 1fr; grid-template-rows: auto 1fr auto; column-gap: var(--s-3); }
.svc > img { width: 40px; height: 40px; grid-row: 1; grid-column: 1; }
.svc > h3 { grid-column: 2; align-self: center; }
.svc > img + h3 { grid-column: 2; }
.svc > :not(img):not(h3) { grid-column: 1 / -1; }
.svc:not(:has(> img)) > h3 { grid-column: 1 / -1; }
.ru-frame .ru-map { height: 360px; }
@media (max-width: 1023px) { .ru-frame .ru-map { height: auto; } }
.panel-form.card { background: var(--surface); border: 0; }
@media (max-width: 639px) {
  .band-warm .sit p { line-height: 1.4; }
  .band-warm .sit__text { gap: var(--s-1); }
  .band-warm .section-head { margin-bottom: var(--s-5); }
}
.pain { min-height: 200px; }
@media (max-width: 639px) {
  .band-warm .sit:not(.sit--lead) { grid-template-columns: 1fr; }
  .band-warm .sit:not(.sit--lead) > img { display: none; }
  .pain { min-height: 0; }
}
@media (min-width: 640px) and (max-width: 1023px) { #lead { --h: 2; } }
@media (min-width: 640px) and (max-width: 1023px) { #lead { --h: 1; } }
@media (min-width: 640px) and (max-width: 799px) { #lead { --h: 2; } }
/* round 2 */
.svc-rows li { min-height: 0; }
#modules .mk-pos, #compare .mk-doc { max-width: none; width: 100%; font-size: 14px; }
#modules .mk-row, #compare .mk-row { padding: 12px 16px; }
#modules .mk-pos__tile { min-height: 76px; }
#compare .mk-doc .mk-row { padding: 16px; }
.ru-frame .ru-map { height: 330px; }
@media (max-width: 1023px) { .ru-frame .ru-map { height: auto; } }
.quiz__peek .mk-row { padding: 12px 14px; }
/* quiz options as ruled rows: the words on the column line, the icon at the right */
.quiz__opts { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 0; }
.quiz__opt { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: var(--s-3) 0; background: none; justify-content: space-between; flex-direction: row-reverse; min-height: 64px; }
.quiz__opt:has(input:checked) { box-shadow: inset 0 -2px 0 var(--p-accent); font-weight: 500; border-bottom-color: transparent; }
@media (max-width: 639px) {
  .quiz__opts { grid-template-columns: 1fr; }
  .panel-form.card { padding: 0; background: none; }
  .band-warm .sit:not(.sit--lead) { grid-template-columns: 32px 1fr; }
  .band-warm .sit:not(.sit--lead) > img { display: block; width: 32px; height: 32px; }
  #modules .rows__value { display: inline; }
}
@media (min-width: 640px) and (max-width: 1023px) { #formats .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 639px) {
  #modules .rows li { display: grid; grid-template-columns: 1fr; gap: 2px; }
  #modules .rows .rows__value { white-space: normal; text-align: left; color: var(--muted); }
}
@media (max-width: 639px) {
  .svc-rows li, #compare .rows li { display: grid; grid-template-columns: 1fr; gap: 2px; }
  .svc-rows .rows__value, #compare .rows .rows__value { white-space: normal; text-align: left; }
}
@media (max-width: 639px) { #modules .rows li > *, .svc-rows li > *, #compare .rows li > * { white-space: normal; min-width: 0; overflow-wrap: anywhere; } #modules .span-5 { min-width: 0; } }
@media (max-width: 639px) { #modules .rows li:not(:first-child) .rows__value { display: none; } }
/* round 3 */
.mk-wrap { padding: var(--s-6); align-content: stretch; }
.mk-wrap > .mk-card, .mk-wrap > .mk-pos { width: 100%; max-width: none; height: 100%; display: grid; grid-template-rows: auto 1fr auto; font-size: 14px; }
.mk-wrap > .mk-pos { grid-template-rows: none; grid-template-columns: 1.1fr 1fr; }
.mk-wrap > .mk-card .mk-rows { align-content: space-evenly; }
.mk-wrap .mk-row { padding: 14px 18px; }
.hero-mock.mk-wrap > .mk-card { height: auto; }
.quiz__opts { grid-template-columns: 1fr; }
@media (max-width: 639px) {
  .rows.svc-rows > li { display: grid; grid-template-columns: 1fr; }
  .rows.svc-rows > li > .rows__value { justify-self: start; }
  #compare .rows > li > .rows__value { display: none; }
  .mk-wrap { padding: var(--s-4); }
  .mk-wrap > .mk-card { height: auto; }
}
.mk-wrap { place-items: stretch; }
.mk-wrap > .mk-card .mk-rows { display: grid; grid-auto-rows: 1fr; align-content: stretch; }
.mk-wrap > .mk-card .mk-row { align-items: center; }
.hero-mock.mk-wrap { place-items: center; }
.ui-chat .ui-head { flex-wrap: wrap; row-gap: 6px; }
/* the kit's .frame is a flex row with a ratio strut: let the mock take the whole frame */
.mk-wrap.frame { display: flex; align-items: stretch; justify-content: center; }
.mk-wrap.frame::before { display: none; }
.mk-wrap.frame > .mk-card { flex: 1 1 auto; width: auto; }
.hero-mock.mk-wrap.frame { align-items: center; }
.hero-mock.mk-wrap.frame > .mk-card { flex: 0 1 460px; }
.mk-wrap > .mk-card .mk-row { font-size: 15px; }
.mk-wrap > .mk-card .mk-num { font-size: 18px; font-weight: 500; }
.mk-wrap > .mk-card .mk-head { padding: 16px 18px; font-size: 15px; }
