/* AB Solution — OET Academy. Builds on the theme's tokens (style.css). */

.oet-academy { background: var(--paper); }
.oet-academy .site-footer { margin-top: 0; }

/* ─────────── Shared ─────────── */
.oet-app [hidden], .oet-auth [hidden] { display: none !important; }
.oet-alert { padding: .8rem 1rem; border-radius: var(--r-sm); border-left: 4px solid var(--green); background: var(--mint); color: var(--pine); font-size: .95rem; margin: 0 0 1rem; }
.oet-alert.is-error { background: #fbeceb; color: var(--danger); border-left-color: var(--danger); }
.oet-alert.is-info { background: #eef3f8; color: #1d3c5c; border-left-color: #2563a8; }
.field-error { color: var(--danger); font-size: .88rem; margin: .4rem 0 0; }
.field[aria-invalid="true"] { border-color: var(--danger); }
.oet-loading { display: flex; align-items: center; gap: .7rem; padding: 2rem 0; color: var(--slate); }
.oet-spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--green); animation: oet-spin .8s linear infinite; flex-shrink: 0; }
@keyframes oet-spin { to { transform: rotate(360deg); } }
.oet-note, .oet-meta { color: var(--slate); font-size: .88rem; }
.oet-empty { color: var(--slate); }
.oet-hint { color: var(--slate); font-size: .82rem; text-align: center; }

/* ─────────── Auth screens ─────────── */
.oet-auth { padding: clamp(2rem, 6vw, 4.5rem) var(--gutter); display: flex; justify-content: center; }
.oet-auth-card { width: 100%; max-width: 460px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.4rem, 4vw, 2.2rem); box-shadow: 0 20px 50px -30px rgba(15,69,38,.35); }
.oet-auth-card h1 { font-size: clamp(1.6rem, 4vw, 2rem); color: var(--pine); margin-bottom: .6rem; }
.oet-auth-sub { color: var(--slate); }
.oet-auth-back { display: inline-block; font-size: .9rem; margin-bottom: 1.25rem; text-decoration: none; font-weight: 600; }
.oet-form { margin-top: 1.25rem; }
.oet-auth-links { margin-top: 1.25rem; font-size: .95rem; color: var(--slate); text-align: center; }
.oet-inline-form { margin-top: .75rem; }
.pw-meter { font-size: .85rem; margin: .3rem 0 0; font-weight: 600; }
.pw-meter.s0, .pw-meter.s1 { color: var(--danger); }
.pw-meter.s2 { color: #8a5a00; }
.pw-meter.s3, .pw-meter.s4 { color: var(--green); }

/* ─────────── Public intro ─────────── */
.oet-hero h1 { max-width: 12ch; }
.oet-preview { display: grid; gap: .85rem; }
.oet-preview-row { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
.oet-preview-row strong { font: 600 1.6rem/1 var(--serif); color: var(--pine); }
.oet-preview-bar { display: grid; grid-template-columns: 5.5rem 1fr 2.5rem; gap: .6rem; align-items: center; font-size: .9rem; }
.oet-preview-track { position: relative; height: 10px; background: var(--paper); border-radius: 999px; }
.oet-preview-track span { position: absolute; inset: 0 auto 0 0; background: var(--green); border-radius: 999px; }
.oet-preview-track i { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
.oet-preview-num { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.oet-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.oet-feature { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.5rem; }
.oet-feature h3 { margin: .8rem 0 .4rem; }
.oet-feature p { color: var(--slate); font-size: .96rem; }
.oet-feature-num { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--pine); color: #fff; font: 600 1rem/1 var(--serif); }
@media (max-width: 900px) { .oet-feature-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .oet-feature-grid { grid-template-columns: 1fr; } }

/* ─────────── App layout ─────────── */
.oet-shell { min-height: 60vh; }
.oet-app > .oet-loading { justify-content: center; padding: 4rem 1rem; }
.oet-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); max-width: 1320px; margin: 0 auto; min-height: 70vh; }
.oet-side { position: sticky; top: var(--header-h); align-self: start; max-height: calc(100vh - var(--header-h)); overflow-y: auto; padding: 1.5rem 1rem 2rem var(--gutter); }
.admin-bar .oet-side { top: calc(var(--header-h) + 32px); }
.oet-side-title { font: 600 1.15rem/1.2 var(--serif); color: var(--pine); margin: 0 0 1rem .6rem; }
.oet-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.oet-side a { display: flex; align-items: center; gap: .65rem; padding: .55rem .7rem; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-size: .94rem; font-weight: 500; }
.oet-side a svg { color: var(--slate); flex-shrink: 0; }
.oet-side a:hover { background: #fff; color: var(--green); }
.oet-side a[aria-current="page"] { background: #fff; color: var(--pine); font-weight: 650; box-shadow: inset 3px 0 0 var(--green); }
.oet-side a[aria-current="page"] svg { color: var(--green); }
.oet-side-foot { margin: 1.5rem 0 0 .7rem; font-size: .9rem; }
.oet-main { padding: 1.75rem var(--gutter) 4rem; min-width: 0; }
.oet-page { max-width: 1040px; }
.oet-page-head { margin-bottom: 1.5rem; }
.oet-h1 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); color: var(--pine); outline: none; }
.oet-sub { color: var(--slate); margin-top: .45rem; max-width: 70ch; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.oet-h2 { display: flex; align-items: center; gap: .55rem; font: 650 1.15rem/1.3 var(--sans); letter-spacing: 0; margin: 0 0 .8rem; color: var(--ink); }
.oet-h3 { font: 650 1.02rem/1.3 var(--sans); margin: 1rem 0 .5rem; color: var(--ink); display: flex; gap: .5rem; align-items: center; }
.oet-crumb { font-size: .92rem; margin-bottom: .75rem; }
.oet-crumb a { text-decoration: none; font-weight: 600; }

/* Mobile tab bar */
.oet-tabs { display: none; }
.oet-more { position: fixed; z-index: 120; right: .75rem; bottom: calc(70px + env(safe-area-inset-bottom)); width: min(300px, calc(100vw - 1.5rem)); background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 20px 40px rgba(15,69,38,.2); padding: .5rem; }
.oet-more ul { list-style: none; margin: 0; padding: 0; }
.oet-more a { display: flex; align-items: center; gap: .7rem; padding: .75rem .8rem; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); font-weight: 500; }
.oet-more a[aria-current="page"] { background: var(--mint); color: var(--pine); }

@media (max-width: 1023px) {
  .oet-layout { grid-template-columns: 1fr; }
  .oet-side { display: none; }
  .oet-main { padding: 1.25rem var(--gutter) calc(90px + env(safe-area-inset-bottom)); }
  .oet-tabs { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 110; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,.98); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .oet-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px; padding: .35rem .2rem; font: 600 .72rem/1.1 var(--sans); color: var(--slate); text-decoration: none; background: none; border: 0; cursor: pointer; }
  .oet-tab[aria-current="page"], .oet-tab[aria-expanded="true"] { color: var(--pine); }
  .oet-tab[aria-current="page"] svg { stroke-width: 2.4; }
  .oet-academy .site-footer { padding-bottom: 5.5rem; }
  .oet-focus-mode .oet-tabs { display: none; }
  .oet-focus-mode .oet-main { padding-bottom: 2rem; }
}

/* ─────────── Cards & grid ─────────── */
.oet-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.oet-grid > .span-6 { grid-column: span 6; }
.oet-grid > .span-12 { grid-column: span 12; }
@media (max-width: 860px) { .oet-grid > .span-6 { grid-column: span 12; } }
.oet-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1rem, 2.5vw, 1.4rem); margin-bottom: 1rem; min-width: 0; }
.oet-grid > .oet-card { margin-bottom: 0; }
.oet-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .9rem; }
.oet-card-head h2 { font: 650 1.05rem/1.3 var(--sans); letter-spacing: 0; color: var(--ink); }
.oet-card-link { font-size: .9rem; font-weight: 600; white-space: nowrap; }
.oet-center { text-align: center; }
.oet-center .oet-actions { justify-content: center; }
.oet-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 1.25rem; }
.oet-btn-icon svg { margin-right: .1rem; }
.oet-icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--green); cursor: pointer; flex-shrink: 0; }
.oet-icon-btn:hover { border-color: var(--green); }
.oet-danger { color: var(--danger); border-color: #e6c3bf; }
.oet-danger:hover { color: #fff; background: var(--danger); border-color: var(--danger); }

/* Stats */
.oet-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.oet-stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1rem 1.15rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .4rem; }
.oet-stat-label { flex-basis: 100%; display: flex; align-items: center; gap: .35rem; font-size: .85rem; color: var(--slate); font-weight: 600; }
.oet-stat-label svg { width: 16px; height: 16px; color: var(--green); }
.oet-stat-num { font: 600 2.1rem/1.1 var(--serif); color: var(--pine); font-variant-numeric: tabular-nums; }
.oet-stat-foot { flex-basis: 100%; font-size: .82rem; color: var(--slate); }
.oet-stat-cta { font-weight: 650; margin-top: .3rem; }
.oet-stat.is-hero { background: var(--pine); border-color: var(--pine); color: #d6eadd; }
.oet-stat.is-hero .oet-stat-label, .oet-stat.is-hero .oet-stat-foot { color: #b9dcc6; }
.oet-stat.is-hero .oet-stat-num { color: #fff; }
@media (max-width: 860px) { .oet-stats { grid-template-columns: 1fr 1fr; } }

/* Bars and chips */
.oet-bar { height: 8px; background: var(--paper); border-radius: 999px; overflow: hidden; margin-top: .35rem; }
.oet-bar > span { display: block; height: 100%; background: var(--green); border-radius: 999px; transition: width .4s; }
.oet-chip { display: inline-flex; align-items: center; padding: .12rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 650; background: var(--paper); color: var(--slate); border: 1px solid var(--line); white-space: nowrap; }
.oet-chip.is-new { background: var(--mint); color: var(--pine); border-color: #c6e2d0; }
.oet-chip.is-learning { background: #fdf3e1; color: #7a4f05; border-color: #f0dcb6; }
.oet-chip.is-mastered { background: var(--pine); color: #fff; border-color: var(--pine); }
.oet-chip.is-prof { background: #eef3f8; color: #1d3c5c; border-color: #d4e0ec; }
.oet-count { margin-left: auto; font-size: .82rem; color: var(--slate); font-weight: 600; font-variant-numeric: tabular-nums; }
.oet-score-pill { font-size: .8rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; background: var(--mint); color: var(--pine); white-space: nowrap; }

/* Checklists */
.oet-checklist { list-style: none; margin: 0; padding: 0; }
.oet-checklist li { display: grid; grid-template-columns: 26px 1fr auto; gap: .65rem; align-items: start; padding: .6rem 0; border-top: 1px solid var(--line); }
.oet-checklist li:first-child { border-top: 0; }
.oet-checklist a { font-weight: 600; text-decoration: none; }
.oet-checklist a:hover { text-decoration: underline; }
.oet-checklist .oet-meta { display: block; margin-top: .1rem; }
.oet-tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; margin-top: 1px; }
.oet-tick svg { width: 14px; height: 14px; stroke-width: 3; }
.done > .oet-tick { background: var(--green); border-color: var(--green); color: #fff; }
.todo > .oet-tick { border-color: #e6c3bf; color: var(--danger); }
.oet-checklist li.done a { color: var(--slate); }

.oet-recs { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.oet-recs a { display: block; padding: .75rem .9rem; border-radius: var(--r-md); background: var(--paper); color: var(--ink); text-decoration: none; border-left: 3px solid var(--green); font-size: .95rem; }
.oet-recs a:hover { background: var(--mint); }

.oet-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.oet-mini a, .oet-mini-row { display: flex; justify-content: space-between; gap: 1rem; color: var(--ink); text-decoration: none; font-size: .95rem; }
.oet-mini a > span:first-child, .oet-mini-row > span:first-child { display: inline-flex; align-items: center; gap: .45rem; }

.oet-weak { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.oet-weak-top { display: flex; justify-content: space-between; gap: 1rem; font-size: .95rem; }
.oet-weak-top > span { display: inline-flex; align-items: center; gap: .45rem; }
.oet-weak p { font-size: .9rem; color: var(--slate); margin-top: .35rem; }

/* Target bars */
.oet-tbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.05rem; }
.oet-tbar-top { display: flex; justify-content: space-between; align-items: baseline; }
.oet-tbar-name { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; }
.oet-tbar-val { font-variant-numeric: tabular-nums; color: var(--slate); font-size: .92rem; }
.oet-tbar-val strong { color: var(--ink); font-size: 1.05rem; }
.oet-tbar-track { position: relative; height: 12px; background: var(--paper); border-radius: 4px; margin: .35rem 0 .3rem; }
.oet-tbar-track .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; }
.oet-tbar-track .target { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; background: var(--ink); border: 1px solid #fff; border-radius: 2px; box-sizing: content-box; }
.oet-tbar-meta { display: flex; justify-content: space-between; gap: 1rem; font-size: .8rem; color: var(--slate); }
.oet-tbar-meta .good { color: var(--green); font-weight: 650; }

/* Charts */
.oet-chart { margin: 0; }
.oet-plot { position: relative; }
.oet-svg { width: 100%; height: auto; display: block; overflow: visible; }
.oet-svg .grid { stroke: #e3ebe6; stroke-width: 1; }
.oet-svg .grid.ref { stroke: #8fa79a; stroke-dasharray: 4 4; }
.oet-svg .axis { fill: var(--slate); font: 500 11px var(--sans); }
.oet-svg .lbl { fill: var(--ink); font: 600 11px var(--sans); }
.oet-svg .cross { stroke: #9fb3a7; stroke-width: 1; }
.oet-tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; padding: .45rem .6rem; border-radius: var(--r-sm); font-size: .8rem; display: grid; gap: .1rem; min-width: 140px; box-shadow: 0 8px 20px rgba(0,0,0,.2); }
.oet-tip span { color: #c9d6cf; }
.oet-legend { list-style: none; margin: 0 0 .6rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .85rem; color: var(--slate); }
.oet-legend li { display: inline-flex; align-items: center; gap: .4rem; }
.oet-legend strong { color: var(--ink); }
.oet-legend .sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.oet-table-toggle { margin-top: .6rem; font-size: .9rem; }
.oet-table-toggle summary { cursor: pointer; color: var(--green); font-weight: 600; }
.oet-stack { display: flex; gap: 2px; height: 14px; margin-bottom: .6rem; }
.oet-stack span { border-radius: 4px; min-width: 4px; }
.oet-heat-wrap { overflow-x: auto; }
.oet-heat { width: 100%; max-width: 560px; height: auto; display: block; }
.oet-heat-legend { display: flex; align-items: center; gap: 3px; font-size: .78rem; color: var(--slate); margin-top: .4rem; }
.oet-heat-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* Tables */
.oet-table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); margin-top: .75rem; }
.oet-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.oet-table th, .oet-table td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.oet-table th { font-size: .8rem; color: var(--slate); font-weight: 650; background: var(--paper); white-space: nowrap; }
.oet-table tr:last-child td { border-bottom: 0; }
.oet-table td svg { vertical-align: middle; }

/* Badges */
.oet-badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem; }
.oet-badge { background: #fff; border: 1px dashed var(--line); border-radius: var(--r-lg); padding: 1rem; display: grid; gap: .2rem; opacity: .7; }
.oet-badge.earned { border-style: solid; opacity: 1; }
.oet-badge-icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); color: var(--slate); margin-bottom: .3rem; }
.oet-badge.earned .oet-badge-icon { background: #fdf3e1; color: #9a6500; }
.oet-badge span { font-size: .88rem; color: var(--slate); }
.oet-badge small { font-size: .78rem; color: var(--slate); }
.oet-badges.small { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

/* Toasts */
.oet-toasts { position: fixed; z-index: 200; right: 1rem; bottom: 1rem; display: grid; gap: .5rem; max-width: min(360px, calc(100vw - 2rem)); }
.oet-toast { background: var(--pine); color: #fff; border-radius: var(--r-md); padding: .8rem 1rem; display: grid; gap: .15rem; box-shadow: 0 16px 40px rgba(0,0,0,.25); animation: oet-in .25s ease-out; font-size: .92rem; }
.oet-toast span { color: #cfe6d7; }
.oet-toast.out { opacity: 0; transform: translateY(8px); transition: .35s; }
@keyframes oet-in { from { opacity: 0; transform: translateY(10px); } }
@media (max-width: 1023px) { .oet-toasts { bottom: calc(76px + env(safe-area-inset-bottom)); } }

/* Lists */
.oet-seg { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.oet-seg a { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .35rem .9rem; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; }
.oet-seg a[aria-current="page"] { background: var(--pine); color: #fff; border-color: var(--pine); }
.oet-seg a[aria-current="page"] svg line { stroke: #fff; }
@media (max-width: 640px) { .oet-seg { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) .3rem; } .oet-seg a { flex-shrink: 0; } }
.oet-group { margin-bottom: 1.75rem; }
.oet-list { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.oet-list li + li { border-top: 1px solid var(--line); }
.oet-row { display: flex; align-items: center; gap: .9rem; padding: .9rem 1.1rem; text-decoration: none; color: var(--ink); min-height: 64px; }
.oet-row:hover { background: var(--paper); }
.oet-row-main { display: grid; gap: .1rem; flex: 1; min-width: 0; }
.oet-row-main span { color: var(--slate); font-size: .88rem; }
.oet-row-side { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.oet-row.done strong { color: var(--slate); }
.oet-part { display: grid; place-items: center; min-width: 46px; height: 32px; padding: 0 .4rem; border-radius: var(--r-sm); background: var(--mint); color: var(--pine); font-weight: 700; font-size: .8rem; }
@media (max-width: 560px) { .oet-row { flex-wrap: wrap; } .oet-row-side { margin-left: calc(46px + .9rem); } }

/* Lesson body */
.oet-lesson { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.1rem, 3vw, 2rem); max-width: 760px; }
.oet-lesson h3 { font: 650 1.12rem/1.3 var(--sans); color: var(--pine); margin: 1.6rem 0 .6rem; }
.oet-lesson table, .oet-text table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .94rem; display: block; overflow-x: auto; }
.oet-lesson th, .oet-lesson td, .oet-text th, .oet-text td { border: 1px solid var(--line); padding: .5rem .65rem; text-align: left; vertical-align: top; }
.oet-lesson th, .oet-text th { background: var(--paper); }
.oet-lesson .tip { background: var(--mint); border-left: 4px solid var(--green); padding: .8rem 1rem; border-radius: var(--r-sm); }
.oet-lesson pre { background: var(--paper); padding: 1rem; border-radius: var(--r-md); font: .9rem/1.5 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; }

/* Forms in app */
.oet-onboard { max-width: 680px; margin: 0 auto; }
.oet-step-count { font-size: .85rem; color: var(--slate); font-weight: 600; }
.oet-onboard .oet-bar { margin-bottom: 1.5rem; }
.oet-choices { border: 0; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem; }
.oet-choices legend { font-weight: 650; margin-bottom: .5rem; padding: 0; }
.oet-choices.compact { grid-template-columns: 1fr; }
.oet-choice { display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: var(--r-md); background: #fff; cursor: pointer; min-height: 52px; font-weight: 500; }
.oet-choice:hover { border-color: var(--green); }
.oet-choice input { width: 20px; height: 20px; accent-color: var(--green); flex-shrink: 0; margin: 0; }
.oet-choice:has(input:checked) { border-color: var(--green); background: var(--mint); }
.oet-choice:has(input:focus-visible) { outline: 3px solid var(--amber); outline-offset: 2px; }
.oet-days { border: 0; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.oet-days legend { font-weight: 600; font-size: .93rem; margin-bottom: .45rem; padding: 0; width: 100%; }
.oet-day { position: relative; }
.oet-day input { position: absolute; opacity: 0; }
.oet-day span { display: grid; place-items: center; min-width: 52px; min-height: 44px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #fff; font-weight: 600; font-size: .9rem; cursor: pointer; }
.oet-day input:checked + span { background: var(--pine); color: #fff; border-color: var(--pine); }
.oet-day input:focus-visible + span { outline: 3px solid var(--amber); outline-offset: 2px; }
.oet-custom-targets { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
@media (max-width: 560px) { .oet-custom-targets { grid-template-columns: 1fr 1fr; } }
.oet-onboard-form input[type="range"] { width: 100%; accent-color: var(--green); }
.oet-onboard-form output { font-weight: 650; color: var(--pine); }
.oet-form-grid { display: grid; gap: .2rem; }
.oet-form-grid > .fg, .oet-form-grid > fieldset { max-width: 560px; }
.oet-form-status { margin: 0; font-size: .92rem; }
.oet-form-status.ok { color: var(--green); font-weight: 600; }
.oet-form-status.err { color: var(--danger); }
.oet-inline { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .5rem 0 1rem; }
.oet-inline .field { max-width: 260px; }
.oet-reminders { margin-top: 1rem; }
.oet-filters { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .oet-filters { grid-template-columns: 1fr; } }

/* Vocabulary */
.oet-vocab-summary { margin-bottom: 1rem; color: var(--slate); }
.oet-words { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .8rem; }
.oet-word { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1rem 1.1rem; }
.oet-word-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .4rem; }
.oet-word-head strong { font-size: 1.08rem; }
.oet-word-head .oet-chip { margin-left: auto; }
.oet-word p { margin: .25rem 0; font-size: .95rem; }
.oet-pron { color: #1d3c5c; font-size: .88rem; font-variant-ligatures: none; }
.oet-example { color: var(--slate); font-style: italic; }

/* Flashcards */
.oet-fc-stage { max-width: 620px; margin: 0 auto; }
.oet-fc-progress { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .8rem; font-size: .85rem; color: var(--slate); margin-bottom: .8rem; }
.oet-fc-progress .oet-bar { margin: 0; }
.oet-fc-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.5rem, 5vw, 2.5rem); text-align: center; min-height: 260px; display: grid; align-content: center; gap: 1rem; box-shadow: 0 18px 40px -28px rgba(15,69,38,.4); margin-bottom: 1rem; }
.oet-fc-front { display: grid; justify-items: center; gap: .45rem; }
.oet-fc-term { font: 600 clamp(1.7rem, 5vw, 2.3rem)/1.15 var(--serif); color: var(--pine); margin: 0; }
.oet-fc-back { border-top: 1px dashed var(--line); padding-top: 1rem; }
.oet-fc-def { font-size: 1.08rem; }
.oet-fc-rate { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.oet-fc-rate .btn { flex-direction: column; gap: 0; min-height: 60px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); }
.oet-fc-rate .btn small { font-weight: 500; color: var(--slate); }
.oet-rate-0 { border-color: #e6c3bf !important; }
.oet-rate-0:hover { background: #fbeceb !important; }
.oet-rate-2 { border-color: var(--green) !important; }
.oet-rate-2:hover, .oet-rate-3:hover, .oet-rate-1:hover { background: var(--mint) !important; }

/* Pronunciation */
.oet-pron-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 860px) { .oet-pron-layout { grid-template-columns: 1fr; } }
.oet-pron-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.1rem, 3vw, 1.75rem); position: sticky; top: calc(var(--header-h) + 1rem); }
@media (max-width: 860px) { .oet-pron-panel { position: static; } }
.oet-pron-target { font: 600 clamp(1.3rem, 3.5vw, 1.7rem)/1.3 var(--serif); color: var(--pine); outline: none; margin: .3rem 0 .5rem; }
.oet-pron-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; max-height: 70vh; overflow-y: auto; }
.oet-pron-item { width: 100%; text-align: left; display: grid; grid-template-columns: 1fr auto; gap: .1rem .5rem; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; font: 500 .92rem/1.35 var(--sans); color: var(--ink); cursor: pointer; }
.oet-pron-item .oet-meta { grid-column: 1 / -1; font-size: .75rem; }
.oet-pron-item:hover { border-color: var(--green); }
.oet-pron-result { margin-top: 1rem; }
.oet-pron-score { display: flex; align-items: baseline; gap: .7rem; }
.oet-pron-score strong { font: 600 2rem/1 var(--serif); color: var(--pine); }
.oet-diff span { padding: .05rem .15rem; border-radius: 3px; }
.oet-diff .ok { background: var(--mint); }
.oet-diff .miss { background: #fbeceb; text-decoration: underline wavy var(--danger); text-underline-offset: 4px; }
.oet-rec { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); display: grid; gap: .5rem; justify-items: start; }
.oet-rec audio { width: 100%; max-width: 360px; }

/* Tutor chat */
.oet-chat { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1rem; min-height: 280px; max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: .75rem; }
.oet-msg { max-width: 85%; padding: .7rem .9rem; border-radius: 14px; font-size: .96rem; line-height: 1.55; }
.oet-msg.user { align-self: flex-end; background: var(--pine); color: #fff; border-bottom-right-radius: 4px; }
.oet-msg.assistant { align-self: flex-start; background: var(--paper); border-bottom-left-radius: 4px; }
.oet-msg.system { align-self: center; background: none; color: var(--slate); font-size: .88rem; text-align: center; }
.oet-msg.typing { display: flex; gap: .5rem; align-items: center; color: var(--slate); }
.oet-msg p { margin: 0 0 .5em; }
.oet-msg p:last-child { margin: 0; }
.oet-md ul, .oet-md ol { margin: .3em 0 .6em; padding-left: 1.2rem; }
.oet-chat-form { display: grid; gap: .6rem; margin-top: .8rem; }
.oet-chat-form .field { min-height: 72px; }
.oet-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.oet-chips .chip { min-height: 38px; font-size: .85rem; }
.oet-interim { min-height: 1.2em; margin: 0; font-style: italic; }

/* Plan */
.oet-week { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .8rem; }
.oet-day-col { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1rem 1.1rem; }
.oet-day-col.today { border-color: var(--green); box-shadow: inset 0 3px 0 var(--green); }
.oet-day-col .oet-h3 { margin-top: 0; }

/* ─────────── Test players ─────────── */
.oet-intro { max-width: 720px; }
.oet-facts { list-style: none; margin: .5rem 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; color: var(--slate); }
.oet-facts strong { color: var(--ink); font-size: 1.05rem; }
.oet-test-head { position: sticky; top: var(--header-h); z-index: 50; display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: rgba(244,247,245,.96); backdrop-filter: blur(6px); padding: .6rem 0; margin-bottom: 1rem; border-bottom: 1px solid var(--line); }
.admin-bar .oet-test-head { top: calc(var(--header-h) + 32px); }
.oet-test-head-side { display: flex; align-items: center; gap: 1rem; }
.oet-timer { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .8rem; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); font-weight: 650; font-variant-numeric: tabular-nums; }
.oet-timer-label { font-size: .8rem; color: var(--slate); font-weight: 600; }
.oet-timer.low { border-color: var(--amber); }
.oet-timer.critical { border-color: var(--danger); color: var(--danger); }
@media (max-width: 640px) { .oet-timer-label, .oet-answered { display: none; } .oet-test-head strong { font-size: .92rem; } }
.oet-group-label { font-weight: 650; color: var(--pine); }
.oet-sec { margin-bottom: 2rem; }
.oet-instr { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: var(--r-sm); padding: .75rem 1rem; color: var(--slate); font-size: .94rem; }
.oet-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.oet-pane-texts { position: sticky; top: calc(var(--header-h) + 64px); max-height: calc(100vh - var(--header-h) - 80px); overflow-y: auto; }
@media (max-width: 960px) { .oet-split { grid-template-columns: 1fr; } .oet-pane-texts { position: static; max-height: none; } }
.oet-text { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1rem, 2.5vw, 1.4rem); margin-bottom: .8rem; line-height: 1.65; font-size: .98rem; }
.oet-text h3 { font: 650 1.05rem/1.3 var(--sans); color: var(--pine); margin-bottom: .6rem; }
.oet-text h4 { font-size: .98rem; margin: 1rem 0 .3rem; }
.oet-text ul, .oet-text ol { padding-left: 1.2rem; }
.oet-tabs-row { display: flex; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 4px; margin-bottom: .6rem; }
.oet-tab-btn { flex: 1; min-height: 42px; border: 0; border-radius: 7px; background: transparent; font: 650 .92rem var(--sans); color: var(--slate); cursor: pointer; }
.oet-tab-btn[aria-selected="true"] { background: var(--pine); color: #fff; }
.oet-pair { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1rem; align-items: start; margin-bottom: 1rem; }
@media (max-width: 860px) { .oet-pair { grid-template-columns: 1fr; } }
.oet-qlist { display: grid; gap: .7rem; }
.oet-qgroup { font-weight: 650; font-size: .93rem; color: var(--pine); margin: .6rem 0 0; }
.oet-q { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: .85rem 1rem; margin: 0; min-width: 0; }
fieldset.oet-q legend { display: flex; gap: .6rem; font-weight: 600; padding: 0; margin-bottom: .55rem; float: left; width: 100%; }
fieldset.oet-q legend + * { clear: both; }
.oet-q > label { display: flex; gap: .6rem; font-weight: 600; margin-bottom: .45rem; }
.oet-qn { display: inline-grid; place-items: center; min-width: 26px; height: 26px; border-radius: 50%; background: var(--paper); font-size: .78rem; font-weight: 700; color: var(--pine); flex-shrink: 0; }
.oet-opt { display: flex; align-items: flex-start; gap: .6rem; padding: .5rem .55rem; border-radius: var(--r-sm); cursor: pointer; }
.oet-opt:hover { background: var(--paper); }
.oet-opt:has(input:checked) { background: var(--mint); }
.oet-opt input { margin: .25rem 0 0; width: 18px; height: 18px; accent-color: var(--green); flex-shrink: 0; }
.oet-opt-letter { font-weight: 700; color: var(--slate); min-width: 1rem; }
.oet-gap { min-height: 42px; }
.oet-note-line { display: flex; gap: .6rem; align-items: center; line-height: 2.1; padding: .55rem .9rem; }
.oet-note-line .oet-gap { display: inline-block; width: min(220px, 60vw); min-height: 36px; padding: .3rem .55rem; margin: 0 .3rem; }
.oet-notes-title { font-weight: 700; margin: 1rem 0 .3rem; }
.oet-notes-head { font: 650 .92rem var(--sans); color: var(--pine); margin: .8rem 0 0; border-bottom: 1px solid var(--line); padding-bottom: .3rem; }
.oet-submit-row { border-top: 1px solid var(--line); padding-top: 1.25rem; }
.oet-sec-nav { display: flex; gap: .35rem; overflow-x: auto; padding-bottom: .4rem; margin-bottom: 1rem; }
.oet-sec-pill { flex-shrink: 0; min-height: 36px; padding: .3rem .75rem; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font: 600 .8rem var(--sans); color: var(--slate); cursor: pointer; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.oet-sec-pill.current { background: var(--pine); border-color: var(--pine); color: #fff; }
.oet-sec-pill.done { border-color: var(--green); color: var(--green); }
.oet-sec-pill[disabled] { cursor: default; }
.oet-audio { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1rem; margin: 1rem 0; }
.oet-audio-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.oet-audio-status { margin: 0; color: var(--slate); font-size: .9rem; }
.oet-audio audio { width: 100%; margin-top: .6rem; }
.oet-transcript { margin-top: .8rem; font-size: .93rem; }
.oet-transcript summary { cursor: pointer; color: var(--green); font-weight: 600; }
.oet-transcript p { margin: .4rem 0; }

/* Writing */
.oet-write-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.oet-casenotes { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.1rem; position: sticky; top: calc(var(--header-h) + 64px); max-height: calc(100vh - var(--header-h) - 80px); overflow-y: auto; }
@media (max-width: 960px) { .oet-casenotes { position: static; max-height: 50vh; } .oet-write-split { grid-template-columns: 1fr; } }
.oet-casenotes .oet-h3:first-child { margin-top: 0; }
.oet-notes-pre { white-space: pre-wrap; font: .9rem/1.55 var(--sans); margin: 0; background: var(--paper); padding: .8rem; border-radius: var(--r-sm); }
.oet-task { font-size: .94rem; background: #fdf8ec; border-left: 3px solid var(--amber); padding: .6rem .8rem; border-radius: var(--r-sm); }
.oet-editor { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.1rem; }
.oet-editor-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .6rem; }
.oet-editor-head .oet-h3 { margin: 0; }
.oet-editor-head .btn { min-height: 38px; padding: .4rem .8rem; font-size: .88rem; }
.oet-letter { min-height: 52vh; font: 1rem/1.6 var(--sans); resize: vertical; }
.oet-letter:disabled { background: var(--paper); cursor: not-allowed; }
.oet-wc { font-size: .88rem; color: var(--slate); margin: .45rem 0; font-variant-numeric: tabular-nums; }
.oet-wc.ok { color: var(--green); font-weight: 600; }
.oet-wc.over { color: #8a5a00; font-weight: 600; }
.oet-skip { margin: 0 0 1rem; }
.oet-letter-view { white-space: pre-wrap; font: .95rem/1.6 var(--sans); background: var(--paper); padding: 1rem; border-radius: var(--r-md); margin: 0; overflow-x: auto; }

/* Speaking */
.oet-rolecard { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--pine); border-radius: var(--r-md); padding: 1rem 1.15rem; margin-bottom: 1rem; }
.oet-rolecard ul { padding-left: 1.2rem; margin: 0; }
.oet-rolecard li { margin-bottom: .3rem; }
.oet-rp-split { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.oet-rp-split details { margin-bottom: .8rem; }
.oet-rp-split summary { cursor: pointer; font-weight: 650; margin-bottom: .5rem; }
.oet-rp-log { min-height: 320px; }
button[aria-pressed="true"] { background: var(--danger); color: #fff; border-color: var(--danger); }

/* Results */
.oet-result-hero { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: center; background: var(--pine); color: #d6eadd; border-radius: var(--r-lg); padding: clamp(1.2rem, 3vw, 1.75rem); margin-bottom: 1rem; }
.oet-result-score { display: grid; justify-items: center; text-align: center; padding-right: 1.5rem; border-right: 1px solid rgba(255,255,255,.18); }
.oet-result-score strong { font: 600 3.2rem/1 var(--serif); color: #fff; }
.oet-result-score .oet-meta { color: #b9dcc6; }
.oet-result-side p { margin: .2rem 0; }
.oet-result-side strong { color: #fff; }
.oet-result-side .good { color: #9fe0b7; font-weight: 650; }
.oet-result-side .oet-note { color: #b9dcc6; }
@media (max-width: 560px) { .oet-result-hero { grid-template-columns: 1fr; } .oet-result-score { border-right: 0; padding-right: 0; border-bottom: 1px solid rgba(255,255,255,.18); padding-bottom: 1rem; } }
.oet-review { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .7rem; }
.oet-review-item { border: 1px solid var(--line); border-radius: var(--r-md); padding: .85rem 1rem; border-left: 4px solid var(--green); }
.oet-review-item.wrong { border-left-color: var(--danger); }
.oet-review-head { display: flex; gap: .55rem; align-items: flex-start; font-weight: 600; }
.oet-review-mark svg { width: 18px; height: 18px; stroke-width: 3; }
.right .oet-review-mark { color: var(--green); }
.wrong .oet-review-mark { color: var(--danger); }
.oet-review-dl { margin: .5rem 0 0; display: grid; gap: .25rem; font-size: .93rem; }
.oet-review-dl div { display: grid; grid-template-columns: 9rem 1fr; gap: .5rem; }
.oet-review-dl dt { color: var(--slate); }
.oet-review-dl dd { margin: 0; font-weight: 600; }
@media (max-width: 560px) { .oet-review-dl div { grid-template-columns: 1fr; gap: 0; } }
.oet-explain { font-size: .9rem; color: var(--slate); margin: .45rem 0 0; }
.oet-criteria { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.oet-criteria p { font-size: .92rem; color: var(--slate); margin: .35rem 0 0; }
.oet-bullets { margin: 0; padding-left: 1.2rem; }
.oet-bullets li { margin-bottom: .4rem; }
.oet-corrections { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.oet-corrections li { border: 1px solid var(--line); border-radius: var(--r-md); padding: .7rem .9rem; }
.oet-corrections p { margin: .15rem 0; }
.oet-corrections del { color: var(--danger); }
.oet-corrections ins { color: var(--green); text-decoration: none; font-weight: 600; }

@media print {
  .oet-side, .oet-tabs, .oet-toasts, .oet-actions { display: none !important; }
  .oet-layout { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .oet-spinner { animation-duration: 2s; }
}
@media (max-width: 960px) {
  /* Part A on small screens: keep the texts in a scrollable panel so questions stay close. */
  .layout-reference .oet-pane-texts { max-height: 55vh; overflow-y: auto; border-radius: var(--r-lg); }
}

/* Full mock */
.oet-fm-card { border-left: 4px solid var(--pine); }
.oet-fm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
@media (max-width: 760px) { .oet-fm-grid { grid-template-columns: 1fr; } }
.oet-fm-steps { list-style: none; margin: 0; padding: 0; }
.oet-fm-step { display: grid; grid-template-columns: 26px 1fr auto; gap: .65rem; align-items: center; padding: .75rem 0; border-top: 1px solid var(--line); }
.oet-fm-step:first-child { border-top: 0; }
.oet-fm-step.current { font-weight: 600; }
.oet-fm-step.current .oet-tick { border-color: var(--green); }
.oet-fm-step > div { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.oet-fm-step strong { display: inline-flex; align-items: center; gap: .4rem; }
.oet-ok { color: var(--green); font-weight: 650; }
.oet-bad { color: var(--danger); font-weight: 650; }
