/* UX/UI English — слой редизайна поверх Raxon для внутренних страниц (главы, тест, словарь, English basics, документы).
   Подключается последним. Токены Raxon (css/tokens.css) не правятся: здесь только переопределения.
   Что меняется: заголовки набраны Onest вместо Unbounded, фон страницы белый, подписи без капса, контейнер той же ширины, что на главной. */

:root {
  --font-display: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --text-display-xl: 800 58px/1.06 var(--font-display);
  --text-display-xl-tracking: -0.025em;
  --text-display-l: 700 38px/1.12 var(--font-display);
  --text-display-l-tracking: -0.02em;
  --text-display-m: 700 28px/1.18 var(--font-display);
  --text-display-m-tracking: -0.015em;
  --text-heading-xl: 700 32px/1.18 var(--font-display);
  --text-heading-xl-tracking: -0.02em;
  --text-heading-l: 700 24px/1.22 var(--font-display);
  --text-heading-l-tracking: -0.015em;
  --color-bg-page: #FFFFFF;
  --color-bg-subtle: #F3F4F9;
  --radius-3xl: 28px;
}

body { -webkit-font-smoothing: antialiased; }
h1, h2, h3 { letter-spacing: -0.02em; }

/* Крупные заголовки страниц: тот же вес и плотность, что на главной */
.ch-hero h1, .g-hero h1, .b-hero h1, .v-hero h1, .doc-card h1, .hello-hero h1 { font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }
.ch-hero, .g-hero, .b-hero, .v-hero { border-radius: 28px; }

/* Подписи и заголовки таблиц — без капса */
.side-title, .rx-nav-group, .rx-table th, .rx-alert__title, .rx-card__eyebrow, .rx-goal-card__chapter,
.match-head, .rd-step__n, .rd-sec, .su-sub, .b-tense h4, .v-match-head, .hello-eyebrow, .eyebrow,
.chm-opts__label, .chm-fb__t, .glm-group span:first-child, .vt th {
  text-transform: none; letter-spacing: 0; font-size: 13px;
}
.sec-num { font-family: var(--font-body); font-weight: 600; font-size: 16px; position: relative; top: -0.35em; }

/* Шапка на внутренних страницах: без кнопки справа, бургер прижат к правому краю */
@media (max-width: 1180px) { .top .burger { margin-left: auto; } }

/* Якоря не прячутся под липкой шапкой */
html { scroll-padding-top: 84px; }

/* Подвал: отступ от содержимого страницы */
.foot { margin-top: 64px; }

/* Шапка и подвал берут цвета из токенов Raxon (в том числе в тёмной теме) и стоят по той же сетке, что и страница */
:root {
  --paper: var(--color-bg-page);
  --line: var(--color-border-default);
  --text: var(--color-text-primary);
  --muted: var(--color-text-secondary);
  --mist: var(--color-bg-subtle);
}
/* Та же сетка, что на главной: контейнер 1160px, поля 20px по краям */
.wrap, .top .wrap, .foot .wrap { width: min(1160px, 100% - 40px); max-width: none; margin-inline: auto; padding-inline: 0; }

/* Главы: строка «Что делать» под заголовком раздела и тип задания в оглавлении (по итогам юзабилити-теста) */
.sec-do { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: baseline; margin: -2px 0 4px; padding: 12px 14px; border-radius: 12px; background: var(--color-bg-subtle); font-size: 15px; line-height: 1.45; color: var(--color-text-primary); max-width: none !important; }
.sec-do b { font-size: 13px; font-weight: 600; color: var(--part); white-space: nowrap; }
@media (max-width: 560px) { .sec-do { grid-template-columns: 1fr; } }
@media (min-width: 901px) {
  .side .rx-nav-item[data-sub] { display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 10px; row-gap: 0; }
  .side .rx-nav-item[data-sub]::after { content: attr(data-sub); grid-column: 2; font-size: 12.5px; font-weight: 400; line-height: 1.3; color: var(--color-text-secondary); opacity: .85; }
}
/* chapter end: navigation on an accent panel, the hint sits below it */
.pager:has(+ .ch-ask) { margin-top: 24px; padding: 24px; border-radius: 20px; background: var(--color-bg-brand-soft, #EEF1FF); }
.ch-ask { margin-top: -6px; padding: 0 4px; font-size: 15px; line-height: 1.55; color: var(--color-text-secondary); }
.pager:has(+ .ch-ask) .rx-button--secondary { background: var(--color-bg-surface, #fff); }
@media (max-width: 600px) { .pager:has(+ .ch-ask) { padding: 16px; } }
.ch-ask a { color: var(--color-text-brand); font-weight: 600; }

/* Финальный тест: пояснение, когда его проходить, и блок «Что дальше» */
.test-when { font-size: 15px; padding: 10px 14px; border-radius: 12px; background: var(--color-bg-surface); max-width: 70ch; }
.test-when a { color: var(--color-text-brand); font-weight: 600; white-space: nowrap; }
.next-full { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; padding: clamp(18px, 3vw, 26px); border-radius: 20px; background: #0D1233; color: #fff; }
.next-full > div { flex: 1 1 320px; }
.next-full b { font-size: 18px; }
.next-full p { margin-top: 6px; font-size: 15px; color: #B9C0E4; max-width: 60ch; }
.next-full .rx-button { background: #fff; color: #1B2FB0; border-color: #fff; }

/* Телефон, режим «один раздел на экране» (chapter-m.js / test-m.js): шапка и подвал сайта скрыты, как раньше */
.chm-sec .top, .chm-sec .foot, .chm-sec .skip, .chm-sec .ch-ask, .chm-sec .next-full { display: none; }

/* English basics, телефон: длинная формула времени переносится, а не растягивает страницу вбок */
.b-tense > *, .b-tense__head > * { min-width: 0; }
.b-formula { max-width: 100%; overflow-wrap: anywhere; }
.b-more { max-width: 100%; white-space: normal; text-align: center; height: auto; }

/* «Язык заданий»: accent plate */
.tl-switch { background: #EEF1FF; border-radius: 14px; padding: 8px 8px 8px 14px; justify-content: space-between; }
.tl-switch--side { margin: 0 0 16px 0; }
.tl-switch--sheet { margin: 16px 0 4px; padding: 8px 8px 8px 14px; }
.tl-switch__label { color: #3355FF; }
.tl-switch .rx-segmented { background: #fff; border-color: transparent; }
.tl-switch .rx-segmented__item[aria-pressed="true"] { background: #3355FF; color: #fff; box-shadow: none; }
html[data-theme="dark"] .tl-switch { background: rgba(51,85,255,.16); } html[data-theme="dark"] .tl-switch__label { color: #9DB0FF; } html[data-theme="dark"] .tl-switch .rx-segmented { background: transparent; }
.ch-hero .tl-switch { background: #fff; }
.ch-hero .tl-switch .rx-segmented { background: #EEF1FF; }
html[data-theme="dark"] .ch-hero .tl-switch { background: rgba(255,255,255,.08); }

/* accordions in chapters: chevron shows that the block opens */
.content .rx-accordion__summary { align-items: center; }
.content .rx-accordion__summary::after {
  content: ""; display: block !important; flex: none; width: 20px; height: 20px; font-size: 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .2s ease;
}
.content .rx-accordion[open] > .rx-accordion__summary::after { content: ""; transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .content .rx-accordion__summary::after { transition: none; } }

/* card hint under the buttons: aligned to the left edge */
.vc-hint { text-align: left; }

/* Say it right: thinner strike, the wrong phrase stays readable */
.colloc-wrong { text-decoration-thickness: 1.5px; }
/* Say it right on phones: the header row is hidden, so each value gets its own small label */
@media (max-width:560px){
  .colloc-table td:nth-child(2)::before,.colloc-table td:nth-child(3)::before{display:block;font-size:12px;font-weight:600;color:var(--color-text-secondary);text-decoration:none}
  .colloc-table td:nth-child(2)::before{content:"✓ Natural"}
  .colloc-table td:nth-child(3)::before{content:"✗ Not natural"}
}

/* Say it right: the natural column is the one to remember, so it gets an outlined green band.
   The frame is drawn by ::after above the row lines (it overlaps each cell's bottom border by 1px). */
.colloc-table { border-collapse: separate; border-spacing: 0; }
.colloc-table th:nth-child(2), .colloc-table td:nth-child(2) { position: relative; background: #EDF8F1; }
.colloc-table th:nth-child(2) { color: #1F7A45; border-radius: 14px 14px 0 0; }
.colloc-table tbody tr:last-child td:nth-child(2) { border-radius: 0 0 14px 14px; }
.colloc-table th:nth-child(2)::after, .colloc-table td:nth-child(2)::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; bottom: -1px; z-index: 1; pointer-events: none;
  border-left: 2px solid #2E9E5B; border-right: 2px solid #2E9E5B;
}
.colloc-table th:nth-child(2)::after { border-top: 2px solid #2E9E5B; border-radius: 14px 14px 0 0; }
.colloc-table tbody tr:last-child td:nth-child(2)::after { bottom: 0; border-bottom: 2px solid #2E9E5B; border-radius: 0 0 14px 14px; }
html[data-theme="dark"] .colloc-table th:nth-child(2), html[data-theme="dark"] .colloc-table td:nth-child(2) { background: rgba(46,158,91,.14); } html[data-theme="dark"] .colloc-table th:nth-child(2) { color: #7FD6A2; }
@media (max-width:560px){
  .colloc-table th:nth-child(2), .colloc-table td:nth-child(2),
  .colloc-table tbody tr:last-child td:nth-child(2) { border-radius: 10px; padding: 6px 10px !important; }
  .colloc-table td:nth-child(2)::after, .colloc-table tbody tr:last-child td:nth-child(2)::after { bottom: 0; border: 1.5px solid #2E9E5B; border-radius: 10px; }
}

/* Say it right: why the phrase is not natural — tooltip on the «?» hint (hover, or focus by tap / Tab) */
.rx-table:has(.colloc-table){overflow:visible}
.colloc-hint{position:relative;display:inline-grid;vertical-align:middle;margin-left:8px;outline:none}
.colloc-hint__i{display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#EEF0F5;color:var(--color-text-secondary);font:700 12px/1 var(--font-body);cursor:help;transition:background .15s,color .15s}
.colloc-hint:hover .colloc-hint__i,.colloc-hint:focus-visible .colloc-hint__i,.colloc-hint:focus .colloc-hint__i{background:#3355FF;color:#fff}
.colloc-hint:focus-visible .colloc-hint__i{outline:3px solid var(--color-border-focus,#3355FF);outline-offset:2px}
.colloc-why{position:absolute;z-index:20;top:calc(100% + 8px);right:-10px;width:max-content;max-width:min(360px,82vw);padding:10px 12px;border-radius:12px;background:#1B2033;color:#fff;font-size:13px;line-height:1.45;font-weight:400;text-align:left;white-space:normal;box-shadow:0 8px 24px rgba(20,30,60,.18);opacity:0;visibility:hidden;transform:translateY(-4px);transition:opacity .15s,transform .15s,visibility .15s;pointer-events:none}
.colloc-why::before{content:"";position:absolute;top:-5px;right:16px;width:10px;height:10px;background:#1B2033;transform:rotate(45deg)}
.colloc-why i{font-style:normal;font-weight:600;color:#BFEFD4}
.colloc-hint:hover .colloc-why,.colloc-hint:focus .colloc-why,.colloc-hint:focus-within .colloc-why{opacity:1;visibility:visible;transform:none}
@media (prefers-reduced-motion:reduce){.colloc-why,.colloc-hint__i{transition:none}}
/* tooltip: dark card, accent words in light blue (#3355FF itself is too dark to read on it) */
.colloc-why{background:#1B2033;color:#fff;border:0;box-shadow:0 10px 28px rgba(20,30,60,.22)}
.colloc-why::before{background:#1B2033;border:0;top:-5px}
.colloc-why i{color:#9DB0FF}
html[data-theme="dark"] .colloc-why,html[data-theme="dark"] .colloc-why::before{background:#2A3052}
html[data-theme="dark"] .colloc-hint__i{background:rgba(255,255,255,.1);color:#C7CCE0}

/* exercise instructions: regular weight, like the other task texts */
.instr strong { font-weight: 400; }

/* Designer Thinking: translation under the weak / strong phrase */
.compare .compare__ru { margin-top: 6px; font-size: 14px; line-height: 1.45; color: var(--color-text-secondary); }
.compare .rx-alert { align-content: start; justify-content: start; }

/* Designer Thinking: interactive pattern over the red / green cards */
.dt { display: grid; gap: var(--spacing-sm, 12px); }
.dt .compare { margin-top: 4px; }
.dt-seg { border-radius: 6px; transition: opacity .15s, background .15s, box-shadow .15s; }
.dt-seg[data-i] { cursor: pointer; }
.dt-seg .rx-badge { vertical-align: 2px; }
.rx-alert--danger .dt-seg .rx-badge { background: var(--color-text-danger, #D63B3B); }
.rx-alert--success .dt-seg .rx-badge { background: var(--color-text-success, #1F8A4C); }
.dt.has-focus .dt-seg:not(.is-on) { opacity: .35; }
.dt-seg.is-on { background: rgba(255,255,255,.8); box-shadow: 0 0 0 3px rgba(255,255,255,.8); }
html[data-theme="dark"] .dt-seg.is-on { background: rgba(255,255,255,.12); box-shadow: 0 0 0 3px rgba(255,255,255,.12); }

/* Designer Thinking practice: Raxon Match, «Too basic» on the left (red), «More professional» on the right (green) */
.dt-match{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);align-items:start;column-gap:64px;row-gap:16px;margin-top:4px}
.dt-match__terms{order:1}.dt-match__defs{order:2}
.dt-match__head{margin:0 0 8px;font-size:13px;font-weight:600}
.dt-match__head--basic{color:var(--color-text-danger)}
.dt-match__head--pro{color:var(--color-text-success)}
.dt-match__list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.dt-match .rx-match__term>span:first-child{font-weight:500}
.dt-match .mark{display:none}
@media (max-width:700px){.dt-match{grid-template-columns:1fr}}

/* Say It Like a Designer: translation under the phrase */
.say__ru { margin-top: -4px; font-size: 15px; line-height: 1.5; color: var(--color-text-secondary); }
.say:has(+ .say__ru) { min-height: 0; margin-bottom: 8px; }
.say__ru { min-height: 3em; margin-top: 0; }
.dt .compare + .dt-steps { margin-top: 6px; }

/* Chapter Test (js/chapter-test.js) */
.ct .ct-block{margin-bottom:8px}
.ct-who{font-weight:600;color:var(--color-text-secondary)}
.ct-result{display:grid;gap:12px;padding:18px 20px;border-radius:var(--radius-xl,16px);background:var(--part-soft);margin-top:4px}
.ct-result[hidden]{display:none}
.ct-result__head{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}
.ct-result__score{font-family:var(--font-display);font-size:22px}
.ct-result__pct{font-weight:700;color:var(--part)}
.ct-result__msg{margin:0;color:var(--color-text-secondary)}
.ct-parts,.ct-review{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.ct-part{display:grid;grid-template-columns:minmax(140px,220px) 1fr 52px;align-items:center;gap:12px;font-size:15px}
.ct-part__bar{height:8px;border-radius:99px;background:rgba(255,255,255,.8);overflow:hidden}
.ct-part__bar span{display:block;height:100%;border-radius:inherit;background:var(--color-text-danger,#D63B3B)}
.ct-part.is-full .ct-part__bar span,.ct-part__bar span[style*="width:7"],.ct-part__bar span[style*="width:8"],.ct-part__bar span[style*="width:9"]{background:var(--color-text-success,#1F8A4C)}
.ct-part__n{font-weight:600;font-variant-numeric:tabular-nums;text-align:right}
.ct-result__h{margin:4px 0 0;font-size:16px}
.ct-rev{display:grid;gap:6px;padding:10px 12px;border-radius:12px;background:var(--color-bg-surface,#fff)}
.ct-rev__sec{font-weight:600;color:var(--part);text-decoration:none}
.ct-rev__sec:hover{text-decoration:underline}
.ct-rev__words{display:flex;flex-wrap:wrap;gap:6px}
.ct-chip{font-size:13.5px;padding:3px 10px;border-radius:99px;background:var(--color-bg-subtle,#EEF0F5);color:var(--color-text-primary)}
.ct-optional{margin-top:12px;padding-top:20px;border-top:1px dashed var(--color-border-default)}
.ct-optional h3:first-child{margin-top:0}
.ct-opt{display:inline-block;margin-left:8px;padding:2px 10px;border-radius:99px;font-size:12.5px;font-weight:600;vertical-align:3px;background:var(--color-bg-subtle,#EEF0F5);color:var(--color-text-secondary)}
html[data-theme="dark"] .ct-part__bar{background:rgba(255,255,255,.12)}
@media (max-width:560px){.ct-part{grid-template-columns:1fr auto}.ct-part__bar{grid-column:1/-1;grid-row:2}}
/* «✗» after a wrong answer clears it (js/chapter-test.js) */
.ex .mark.is-clear{cursor:pointer;display:inline-grid;place-items:center;min-width:24px;height:24px;border-radius:50%;transition:background .15s,color .15s}
.ex .mark.is-clear:hover{background:var(--color-bg-subtle,#EEF0F5);color:var(--color-text-primary)}
.ex .mark.is-clear:focus-visible{outline:2px solid var(--part);outline-offset:1px}
/* Chapter Test: optional part — the same rhythm as the rest of the section */
.ct-optional{display:grid;gap:14px}
.ct-optional>*{margin:0}
.ct-optional>h3{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:20px}
.ct-optional>h3:first-child{margin-top:0}
.ct-optional>h3 .ct-opt{margin-left:0;vertical-align:0}
.ct-optional>h3+.note,.ct-optional>h3+.instr{margin-top:-6px}
.ct-optional>h4{margin-top:8px;font-size:16px}
.ct-optional>h4+p{margin-top:-6px}
.ct-optional .free-sent{line-height:2.4}
.ct-optional .rx-field__counter{margin-top:-8px}
/* Say It Like a Designer: «make it stronger» practice (js/designer-thinking.js) */
.sp{display:grid;gap:14px;margin-top:8px}
.sp>*{margin:0}
.sp-item{display:grid;gap:8px;padding:16px 18px;border:1px solid var(--color-border-default);border-radius:var(--radius-xl,16px)}
.sp-item.is-done{border-color:var(--color-text-success,#1F8A4C);background:var(--color-bg-success-soft,#E7F6EE)}
.sp-row{display:grid;grid-template-columns:84px 1fr;align-items:center;gap:12px;margin:0}
.sp-lvl{font-size:13px;font-weight:600;color:var(--color-text-secondary)}
.sp-row--basic .sp-text{font-size:17px}
.sp-slot{font:inherit;font-size:15px;text-align:left;min-height:42px;padding:8px 12px;border:1.5px dashed var(--color-border-default);border-radius:var(--radius-m,10px);background:transparent;color:var(--color-text-secondary);cursor:pointer}
.sp-slot.is-filled{border-style:solid;border-color:var(--part);background:var(--part-soft);color:var(--color-text-primary)}
.sp-slot.is-wrong{border-color:var(--color-text-danger);background:var(--color-bg-danger-soft,#FBECEC);animation:dp-miss .35s}
.sp-item.is-done .sp-slot{border-color:transparent;background:rgba(255,255,255,.7);cursor:default}
.sp-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
.sp-chip{font-family:var(--font-body);font-size:15px}
.sp-chip[hidden],.sp-item.is-done .sp-chips{display:none}
.sp-fb{margin:0}.sp-fb:empty{display:none}
.sp-fb[data-s="ok"]{color:var(--color-text-success,#1F8A4C);font-weight:600}
.sp-fb[data-s="miss"]{color:var(--color-text-danger)}
.sp-again{justify-self:start}
html[data-theme="dark"] .sp-item.is-done .sp-slot{background:rgba(255,255,255,.08)}
@media (max-width:560px){.sp-row{grid-template-columns:1fr;gap:4px}}
/* Explain the Term: «explain a term» practice (js/explain-practice.js) */
.ep{display:grid;gap:12px;margin-top:8px}
.ep>*{margin:0}
.ep-pick{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.ep-pick__l{font-size:14px;font-weight:600;color:var(--color-text-secondary)}
.ep-out p{margin:0;font-size:17px;line-height:1.55}
.ep-end{background:rgba(255,255,255,.7);border-radius:6px;padding:0 3px}
html[data-theme="dark"] .ep-end{background:rgba(255,255,255,.1)}
.ep-chips{display:grid;gap:8px;justify-items:start}
.ep-chip{font-family:var(--font-body);font-size:15px}
.ep-chip__ph{color:var(--color-text-secondary)}
.ep-chip.is-miss{animation:dp-miss .35s;border-color:var(--color-text-danger)}
.ep-note[data-s="miss"]{color:var(--color-text-danger)}
.ep-note[data-s="done"]{color:var(--color-text-success,#1F8A4C);font-weight:600}
.ep-next{justify-self:start}
.ep [hidden]{display:none!important}

/* Chapter card: «How to take this chapter» (js/chapter-plan.js) */
.cp{display:grid;gap:10px;margin-top:6px;padding-top:16px;border-top:1px solid rgba(51,85,255,.15)}
.cp>*{margin:0}
.cp-title{font-weight:700;font-size:16px;color:var(--color-text-primary)}
.cp-days{list-style:none;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:8px}
.cp-day{display:grid;gap:6px;align-content:start;padding:12px 14px;border-radius:14px;background:rgba(255,255,255,.7)}
.cp-day.is-current{background:#fff;box-shadow:0 0 0 2px var(--part)}
.cp-day.is-done{opacity:.75}
.cp-day__h{display:flex;align-items:baseline;gap:6px;font-size:14px;color:var(--color-text-secondary)}
.cp-day__h b{color:var(--color-text-primary)}
.cp-day__n{margin-left:auto;font-weight:600;font-variant-numeric:tabular-nums}
.cp-day.is-done .cp-day__n{color:var(--color-text-success,#1F8A4C)}
.cp-day__secs{display:flex;flex-wrap:wrap;gap:4px 10px}
.cp-sec{font-size:14px;color:var(--color-text-primary);text-decoration:none}
.cp-sec:hover{color:var(--part);text-decoration:underline}
.cp-sec.is-done{color:var(--color-text-secondary);text-decoration:line-through;text-decoration-color:rgba(0,0,0,.25)}
.cp-opt-line,.cp-tip{font-size:14px;color:var(--color-text-secondary)}
.cp-opt-line a{color:inherit}
.cp-go{justify-self:start;text-decoration:none}
.cp-done{font-weight:600;color:var(--color-text-success,#1F8A4C)}
.side .rx-nav-item.is-optional{opacity:.85}
.nav-star{font-size:12px;color:var(--color-text-secondary)}
html[data-theme="dark"] .cp-day{background:rgba(255,255,255,.06)}
html[data-theme="dark"] .cp-day.is-current{background:rgba(255,255,255,.1)}
.cp-det{display:grid;gap:10px}
.cp-det[open]{padding-bottom:2px}
.cp-det>*+*{margin-top:10px}
.cp-sum{display:flex;align-items:center;gap:10px;cursor:pointer;list-style:none}
.cp-sum::-webkit-details-marker{display:none}
.cp-sum::after{content:"";width:18px;height:18px;flex:none;background:currentColor;color:var(--color-text-secondary);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat;transition:transform .2s}
.cp-det[open] .cp-sum::after{transform:rotate(180deg)}
.cp-status{font-size:13.5px;font-weight:600;color:var(--part);padding:2px 10px;border-radius:99px;background:rgba(255,255,255,.7)}
.cp-det>p{margin-bottom:0}

/* «Продолжить с места» (js/resume.js) */
.rs-bar{position:fixed;z-index:60;left:50%;bottom:24px;transform:translate(-50%,16px);opacity:0;transition:opacity .2s,transform .2s;
  display:flex;align-items:center;gap:12px;max-width:min(640px,calc(100vw - 32px));padding:10px 10px 10px 18px;
  background:var(--color-bg-surface,#fff);border:1px solid rgba(51,85,255,.25);border-radius:14px;box-shadow:0 18px 40px -16px rgba(20,26,46,.35);font-size:15px;line-height:1.35}
.rs-bar.is-on{opacity:1;transform:translate(-50%,0)}
.rs-bar__txt{min-width:0;color:var(--color-text-secondary,#4a5068)}
.rs-bar__txt b{color:var(--color-text-primary,#141a2e);font-weight:600}
.rs-bar__go{flex:none}
.rs-bar__x{flex:none;width:32px;height:32px;border:0;border-radius:8px;background:none;color:var(--color-text-secondary,#4a5068);font-size:20px;line-height:1;cursor:pointer}
.rs-bar__x:hover{background:rgba(51,85,255,.08)}
.rs-bar__x:focus-visible,.rs-bar__go:focus-visible{outline:2px solid #3355ff;outline-offset:2px}
html[data-theme="dark"] .rs-bar{border-color:rgba(157,176,255,.3)}
html[data-theme="dark"] .rs-bar__x:hover{background:rgba(255,255,255,.08)}
@keyframes rs-flash{0%,60%{background-color:rgba(51,85,255,.14);box-shadow:0 0 0 6px rgba(51,85,255,.14)}100%{background-color:transparent;box-shadow:0 0 0 6px transparent}}
.rs-flash{animation:rs-flash 2.2s ease-out;border-radius:6px}
@media (prefers-reduced-motion:reduce){.rs-bar{transition:none}.rs-flash{animation:none;outline:2px solid rgba(51,85,255,.4)}}
@media (max-width:600px){.rs-bar{left:12px;right:12px;bottom:12px;transform:translateY(16px);max-width:none}.rs-bar.is-on{transform:none}}

/* «Clear answers» under the exercise, at the end of its Check row */
.ex-actions .clear-btn{margin-left:auto}
.ex-actions.clear-row{justify-content:flex-end;margin-top:4px}
.ct-optional .ex-actions.clear-row{margin:-4px 0 8px}

/* exercise row: Check (main) · Show answers (quiet) · ↺ clear (icon, only when there are answers) */
.ex-actions .reveal.rx-button--secondary,.ex-actions .ct-reveal.rx-button--secondary{border-color:transparent;padding-inline:12px}
.ex-actions .reveal.rx-button--secondary:hover,.ex-actions .ct-reveal.rx-button--secondary:hover{border-color:transparent;color:var(--color-text-brand)}
.clear-btn[hidden]{display:none!important}
.clear-btn{position:relative}
.clear-btn--icon{display:inline-flex;align-items:center;gap:6px;padding:0 10px!important;color:var(--color-text-secondary);border-radius:10px}
.clear-btn--icon:hover{color:var(--color-text-primary);background:var(--color-bg-pressed,rgba(20,26,46,.06))}
.clear-btn--icon svg{flex:none;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.clear-btn--icon:focus-visible{outline:2px solid var(--color-text-brand,#3355ff);outline-offset:2px}
/* section footer: «Done — next section» */
.sec-foot{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:4px 8px;margin-top:6px;padding-top:16px;border-top:1px solid var(--color-border-default)}
.sec-done{max-width:100%;white-space:normal;height:auto!important;min-height:40px;padding-block:8px!important;text-align:left;gap:6px}
.sec-done b{font-weight:600}
.sec-done.is-done{color:var(--color-text-secondary)}
.sec-done.is-done>span:first-child{color:var(--color-text-success,#1F8A4C)}
.sec-done.is-done:hover{color:var(--color-text-brand)}
.sec-undo{color:var(--color-text-secondary)!important;gap:6px}
.sec-undo:hover{color:var(--color-text-brand)!important}
.sec-undo[hidden]{display:none!important}
.chm .sec-done{display:none!important}
.chm .sec-foot:not(:has(.sec-undo:not([hidden]))){display:none}
.chm .sec-foot{justify-content:flex-start}
.side .rx-nav-item__tick{cursor:pointer}
.side .rx-nav-item__tick:hover{border-color:var(--part)}

/* «Язык заданий»: в карточке главы (на всех экранах) и маленький EN | RU в блоке «What to do» */
.tl-area { position: relative; }
.tl-area .sec-do { padding-right: 92px; }
.tl-mini { position: absolute; top: 8px; right: 8px; display: inline-flex; padding: 2px; border-radius: 9px; background: var(--color-bg-surface, #fff); box-shadow: inset 0 0 0 1px var(--color-border-default, #E0E3EE); opacity: .0; transition: opacity .15s; }
.tl-area:hover .tl-mini, .tl-area:has(:focus-visible) .tl-mini { opacity: 1; }
@media (hover: none) { .tl-mini { opacity: 1; } }
.tl-mini button { font: 600 12px/1 var(--font-body, inherit); padding: 5px 8px; border: 0; border-radius: 7px; background: none; color: var(--color-text-secondary, #5A6079); cursor: pointer; }
.tl-mini button[aria-pressed="true"] { background: #3355FF; color: #fff; }
.tl-mini button:focus-visible { outline: 2px solid #3355FF; outline-offset: 1px; }
html[data-theme="dark"] .tl-mini { background: rgba(255,255,255,.06); }
@media (max-width: 560px) { .tl-area .sec-do { padding-right: 14px; padding-top: 40px; } }

/* Reading: полный перевод (js/reading-ru.js) */
.rd-tr { display: flex; justify-content: flex-start; margin: 2px 0 4px; }
.rd-tr__btn { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px 6px 8px; border: 1px solid var(--color-border-default, #E0E3EE); border-radius: 999px; background: var(--color-bg-surface, #fff); font: 600 14px/1.2 var(--font-body, inherit); color: var(--color-text-primary, #14182B); cursor: pointer; }
.rd-tr__btn:hover { border-color: #3355FF; }
.rd-tr__btn:focus-visible { outline: 2px solid #3355FF; outline-offset: 2px; }
.rd-tr__sw { position: relative; width: 30px; height: 18px; border-radius: 9px; background: var(--color-border-default, #D5D9E6); transition: background .15s; }
.rd-tr__sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.rd-tr__btn[aria-pressed="true"] .rd-tr__sw { background: #3355FF; }
.rd-tr__btn[aria-pressed="true"] .rd-tr__sw::after { transform: translateX(12px); }
.rd-ru { display: none; margin: 6px 0 4px; padding-left: 12px; border-left: 2px solid var(--color-border-default, #E0E3EE); color: var(--color-text-secondary, #5A6079); font-size: .92em; line-height: 1.55; }
.rd-on .rd-ru { display: block; }
.rd-ru--head { margin-top: -2px; font-weight: 500; font-size: 15px; }
li .rd-ru { margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .rd-tr__sw, .rd-tr__sw::after { transition: none; } }
/* шаги «What it is → Why we use it → Example»: выбранный шаг не становится жирнее, чтобы карточки не разъезжались */
.xt-steps .rx-chip .rx-chip__label, .xt-steps .rx-chip[aria-pressed="true"] .rx-chip__label { font-weight: 500; }
.xt-steps .rx-chip[aria-pressed="true"] .xt-t > span[lang] { text-shadow: 0 0 .5px currentColor; }

/* more air between the collocations table and the practice heading */
.colloc-sub{margin-top:32px!important}

/* Chapter Test: optional tasks in one accordion */
.ct-more{margin-top:20px;border:1px solid var(--color-border-default);border-radius:16px;background:var(--color-bg-surface,transparent)}
.ct-more__sum{display:flex;align-items:center;gap:12px;padding:16px 20px;cursor:pointer;list-style:none;border-radius:16px}
.ct-more__sum::-webkit-details-marker{display:none}
.ct-more__sum:hover{background:var(--color-bg-subtle)}
.ct-more__sum:focus-visible{outline:2px solid var(--color-text-brand);outline-offset:2px}
.ct-more__star{color:var(--color-text-brand);font-size:18px}
.ct-more__t{display:grid;gap:2px;flex:1;min-width:0}
.ct-more__h{display:flex;align-items:center;gap:8px;font-size:16px}
.ct-more__t small{font-size:14px;color:var(--color-text-secondary)}
.ct-more__chev{flex:none;color:var(--color-text-secondary);transition:transform .2s}
.ct-more[open] .ct-more__chev{transform:rotate(180deg)}
.ct-more[open] .ct-more__sum{border-radius:16px 16px 0 0}
.ct-more>.ct-optional{margin:0;padding:16px 20px 20px;border-top:0}
@media (prefers-reduced-motion: reduce){.ct-more__chev{transition:none}}

/* Reading по частям */
.rd-step-hidden{display:none!important}
.rd-more{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;margin:12px 0 4px;padding-top:16px;border-top:1px dashed var(--color-border-default)}
.rd-more__n{font-size:14px;color:var(--color-text-secondary);font-variant-numeric:tabular-nums}
.rd-more__all{margin-left:auto}
.rd-step-in{animation:rd-in .35s ease-out backwards}
@keyframes rd-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion: reduce){.rd-step-in{animation:none}}
.sec-foot[hidden]{display:none!important}
/* Reading по частям: прочитанное — приглушено, текущая часть — чёрная */
.sec .rd-read{opacity:.5;transition:opacity .3s ease}
@media (prefers-reduced-motion: reduce){.sec .rd-read{transition:none}}
/* Explain It Yourself: translation of the example */
.ex-ru{margin-top:10px;padding-top:8px;border-top:1px solid rgba(31,138,76,.18)}
.ex-ru>summary{display:inline-flex;align-items:center;gap:6px;cursor:pointer;list-style:none;font-size:14px;font-weight:600;color:var(--color-text-success,#1F8A4C)}
.ex-ru>summary::-webkit-details-marker{display:none}
.ex-ru>summary::after{content:"";width:7px;height:7px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg) translateY(-2px);transition:transform .2s}
.ex-ru[open]>summary::after{transform:rotate(-135deg) translate(-2px,0)}
.ex-ru>summary:hover{text-decoration:underline;text-underline-offset:3px}
.ex-ru>p{margin:6px 0 0!important;font-size:14.5px;line-height:1.5;color:var(--color-text-secondary)}
.ex-ru b{font-weight:600}
/* Say It Like a Designer: drag & drop */
.sp-chip,.sp-slot.is-filled{touch-action:none;cursor:grab}
.sp-chip.sp-dragging{opacity:.35}
.sp-ghost{cursor:grabbing;box-shadow:0 8px 24px rgba(20,30,60,.18);transform:rotate(-1deg)}
.sp-is-dragging .sp-slot:not(.is-filled){border-color:var(--part)}
.sp-slot.is-over{border-style:solid;border-color:var(--part);background:var(--part-soft);box-shadow:0 0 0 3px var(--part-soft)}
.sp-item.is-done .sp-slot{cursor:default}
/* Designer Thinking matching: the pair already has its own × (remove) — hide the generic «clear the answer» mark */
.rx-match .mark{display:none!important}
/* Optional: three levels */
.lv{display:grid;gap:12px;margin-top:8px;padding:18px 20px;border:1px solid var(--color-border-default);border-radius:16px}
.lv>h3{margin:0}
.lv>h4{margin:6px 0 -4px;font-size:15px}
.lv-hint{margin:-4px 0 0;font-size:14px;color:var(--color-text-secondary)}
.lv-item{display:grid;gap:10px;padding:14px 0 0;border-top:1px dashed var(--color-border-default)}
.lv-hint+.lv-item{border-top:0;padding-top:4px}
.lv-task,.lv-sit{margin:0}
.lv-n{display:inline-grid;place-items:center;width:22px;height:22px;margin-right:8px;border-radius:50%;background:var(--part-soft);color:var(--part);font-size:12.5px;font-weight:700;vertical-align:1px}
.lv-rec{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px}
.lv-rec__btn{gap:8px}
.lv-rec__dot{width:10px;height:10px;border-radius:50%;background:#E5484D}
.lv-rec__btn.is-rec .lv-rec__dot{border-radius:2px;animation:lv-pulse 1s infinite}
@keyframes lv-pulse{50%{opacity:.35}}
.lv-rec__time{font-size:13.5px;color:var(--color-text-secondary);font-variant-numeric:tabular-nums}
.lv-rec__audio{height:36px;max-width:100%}
.lv-rec__err{margin:0}
.lv .offline-note{margin:0}
.lv .checks{margin:0}
@media (max-width:560px){.lv{padding:14px}}
@media (prefers-reduced-motion: reduce){.lv-rec__btn.is-rec .lv-rec__dot{animation:none}}
.lv-rec__del{gap:6px;color:var(--color-text-secondary)!important}
.lv-rec__del:hover{color:var(--color-text-danger,#C8323A)!important}
.lv-rec [hidden]{display:none!important}
/* levels as chips */
.lv-tabs{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
.lv-tab{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:6px 16px 6px 12px;border:0;border-radius:999px;background:var(--color-bg-subtle,#F1F3F8);color:var(--color-text-primary);font:600 15px/1.2 var(--font-body);cursor:pointer;transition:background .15s,color .15s}
.lv-tab:hover{background:var(--color-bg-pressed,#E6E9F0)}
.lv-tab[aria-selected="true"]{background:var(--part);color:#fff}
.lv-tab[aria-selected="true"] .lv-cup{filter:drop-shadow(0 0 1px rgba(0,0,0,.35))}
.lv-tab:focus-visible{outline:3px solid var(--part);outline-offset:2px}
.lv-cup{flex:none}
.lv[hidden]{display:none!important}
.lv>.lv-h{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@media (max-width:480px){.lv-tabs{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}.lv-tabs::-webkit-scrollbar{display:none}.lv-tab{flex:none;font-size:14px}}
/* gold: a triple cup */
.lv-cups{display:inline-flex;align-items:flex-end}
.lv-cups .lv-cup{width:14px;height:14px}
.lv-cups .lv-cup:nth-child(2){width:19px;height:19px;margin:0 -3px;position:relative;z-index:1}
