/* No weight above 500 on the exam page (timeui round 4); explicit rules below may go lighter. */
.exam-page :is(strong,b,h1,h2,h3,h4,h5,h6,th,dt,legend,button,label,a){font-weight:500}
/* Exam dates: day cards, the personal timeline and month tiles. Dashboard tokens only. */
.exam-page{--exam-amber:#efb05c;width:100%;max-width:1600px;margin:0 auto;padding:24px 24px 48px;color:var(--dash-ink);font-family:var(--ps-ui-font,inherit);font-variant-numeric:tabular-nums}
html[data-ps-theme=light] .exam-page{--exam-amber:#9a4b00}
.exam-page *{box-sizing:border-box}.exam-page button,.exam-page input,.exam-page select,.exam-page textarea{font:inherit}
.exam-page button,.exam-page select,.exam-page input{min-height:44px}.exam-page button{cursor:pointer}.exam-page button:disabled{cursor:wait;opacity:.6}
.exam-page svg{width:18px;height:18px;flex-shrink:0}.exam-page :focus-visible{outline:2px solid var(--dash-accent);outline-offset:3px}.exam-page ::selection{background:var(--dash-accent-soft)}
.exam-page input,.exam-page textarea{caret-color:var(--dash-accent)}.exam-muted{color:var(--dash-muted);margin:0;line-height:1.6}
.exam-page .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.exam-page .primary,.exam-page .secondary,.exam-saved{display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap}
.exam-saved{border:0;background:var(--dash-accent-soft);color:var(--dash-accent);border-radius:8px;padding:8px 12px;font-weight:500}
.exam-remove{border:0;background:none;color:var(--dash-muted);text-decoration:underline;text-underline-offset:4px;padding:8px 4px}

/* ---- header, scope and filters ---- */
.exam-topline{display:flex;align-items:center;justify-content:space-between;gap:16px}
.exam-topline{border-bottom:1px solid var(--dash-line-strong);margin-bottom:20px}
.exam-tabs{display:flex;align-items:stretch;gap:4px;min-width:0;overflow-x:auto;scrollbar-width:none}.exam-tabs::-webkit-scrollbar{display:none}
.exam-tabs button{position:relative;padding:12px 14px;border:0;border-radius:0;background:transparent;color:var(--dash-muted);font-weight:500;font-size:15px;white-space:nowrap}
.exam-tabs button::after{content:"";position:absolute;left:10px;right:10px;bottom:0;height:2px;border-radius:2px;background:transparent}
.exam-tabs button[aria-pressed=true]{color:var(--dash-ink);font-weight:500}.exam-tabs button[aria-pressed=true]::after{background:var(--dash-accent)}
.exam-tabs span{font-size:12px;margin-left:2px;color:var(--dash-muted);font-weight:400}
.exam-tab-mine{margin-left:10px}.exam-tab-mine::before{content:"";position:absolute;left:-7px;top:14px;bottom:14px;width:1px;background:var(--dash-line-strong)}
.exam-workspace{display:grid;grid-template-columns:168px minmax(0,1fr);gap:28px;align-items:start}.exam-content{min-width:0}
.exam-directory{min-width:0;position:sticky;top:16px}.exam-directory-mobile{display:none}.exam-directory-desktop{display:flex;flex-direction:column;gap:2px}
.exam-directory-desktop button{text-align:left;width:100%;padding:10px 12px;border:0;background:transparent;color:var(--dash-muted);border-radius:8px;font-weight:500;font-size:14px}
.exam-directory-desktop button[aria-pressed=true]{background:var(--dash-accent-soft);color:var(--dash-accent);font-weight:500}
.exam-levels{display:flex;gap:4px;flex-wrap:wrap;margin-bottom:16px;border-bottom:1px solid var(--dash-line-strong)}
.exam-levels button{padding:8px 12px;background:transparent;border:0;border-radius:0;color:var(--dash-muted);border-bottom:2px solid transparent;font-size:14px;font-weight:500}
.exam-levels button[aria-pressed=true]{border-bottom-color:var(--dash-accent);color:var(--dash-accent);font-weight:500}
.exam-tools{display:flex;align-items:start;gap:16px}
.exam-filters{display:grid;grid-template-columns:minmax(160px,1fr) minmax(120px,.65fr) minmax(120px,.65fr);gap:8px;min-width:0;flex:1}.exam-filters>label{min-width:0}
.exam-filters.exam-filters--compact{grid-template-columns:minmax(160px,1fr) minmax(120px,.7fr)}
.exam-filters select,.exam-search,.exam-directory select,.exam-editor input,.exam-editor textarea{background:var(--dash-bg-2);border:1px solid var(--dash-line-strong);border-radius:8px;color:var(--dash-ink);width:100%}
.exam-filters select,.exam-directory select{padding:10px 28px 10px 12px;font-size:13px}
.exam-search{display:flex;align-items:center;gap:8px;padding:0 12px}.exam-search svg{color:var(--dash-muted)}
.exam-search input{padding:10px 0;min-width:0;width:100%;border:0;background:transparent;color:var(--dash-ink);outline:none;font-size:13px}.exam-search input::placeholder{color:var(--dash-muted)}
.dash-app .exam-page .exam-search input{padding:10px 0!important;border:0!important;box-shadow:none!important;background:transparent!important;border-radius:0!important}
.exam-search:focus-within{outline:2px solid var(--dash-accent);outline-offset:2px}
.exam-mode{display:flex;gap:2px;padding:3px;background:var(--dash-bg-3);border-radius:8px;flex-shrink:0}
.exam-mode button{display:flex;align-items:center;justify-content:center;gap:6px;min-height:36px;padding:6px 10px;border:0;border-radius:6px;background:transparent;color:var(--dash-muted);font-size:12px;white-space:nowrap}
.exam-mode button[aria-pressed=true]{background:var(--dash-bg-2);color:var(--dash-ink)}.exam-mode svg{width:16px;height:16px}
.exam-resultbar{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:52px;color:var(--dash-muted);font-size:12px}.exam-resultbar p{margin:0}
.exam-resultbar>div{display:flex;align-items:center;gap:16px}.exam-resultbar label{display:flex;align-items:center;gap:8px;cursor:pointer;white-space:nowrap}
.exam-resultbar input{accent-color:var(--dash-accent);width:16px;min-height:16px}

/* ---- selected subject ---- */
.exam-subject-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:12px;padding:12px 12px 12px 18px;background:var(--dash-bg-2);border:1px solid var(--dash-line-strong);border-radius:12px}
.exam-subject-bar>div{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;min-width:0}
.exam-subject-bar strong{font-size:15px;font-weight:500}.exam-subject-bar span{font-size:13px;color:var(--dash-muted)}
.exam-subject-bar button{padding:8px 14px;font-size:13px}

/* ---- countdown and registration ---- */
.exam-countdown{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:4px 8px;border-radius:6px;font-size:12px;font-weight:500;line-height:1.5;white-space:nowrap}
.exam-countdown--urgent{color:var(--dash-danger);background:color-mix(in srgb,var(--dash-danger) 12%,var(--dash-bg-2))}
.exam-countdown--near{color:var(--exam-amber);background:color-mix(in srgb,var(--exam-amber) 12%,var(--dash-bg-2))}
.exam-countdown--later{color:var(--dash-accent);background:var(--dash-accent-soft)}
.exam-countdown--past{color:var(--dash-muted);background:var(--dash-bg-3)}
.exam-registration{font-size:12px;font-weight:500;color:var(--dash-muted);margin:2px 0 0;line-height:1.5}
.exam-registration--urgent{color:var(--dash-danger)}.exam-registration--closed{color:var(--dash-muted);font-weight:400}

/* ---- day cards: date once, then each paper ---- */
.exam-day-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:stretch}
.exam-month-label{grid-column:1/-1;margin:16px 0 -4px;font-size:13px;font-weight:500;color:var(--dash-muted);letter-spacing:.02em}.exam-month-label:first-child{margin-top:0}
.exam-day-card{display:flex;flex-direction:column;min-width:0;background:var(--dash-bg-2);border:1px solid var(--dash-line-strong);border-radius:12px;overflow:hidden}
.exam-day-card>header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:16px 20px 12px}
.exam-day-card>header time{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;min-width:0}
.exam-day-card>header strong{font-size:22px;font-weight:500;letter-spacing:-.01em;line-height:1.25}
.exam-day-card>header span{font-size:13px;color:var(--dash-muted)}
.exam-slots{list-style:none;margin:0;padding:0}
.exam-slot{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:16px;align-items:center;padding:14px 20px;border-top:1px solid var(--dash-line);position:relative}
.exam-slot--saved::before,.exam-slot--clash::before{content:"";position:absolute;left:0;top:10px;bottom:10px;width:3px;border-radius:0 3px 3px 0;background:var(--dash-accent)}
.exam-slot--clash::before{background:var(--dash-danger)}
.exam-slot-main{display:flex;flex-direction:column;gap:2px;min-width:0}
.exam-slot-main>strong{font-size:15px;font-weight:500;line-height:1.45;overflow-wrap:anywhere}
.exam-slot-main>span{font-size:12px;color:var(--dash-muted);line-height:1.5;overflow-wrap:anywhere}
.exam-slot-main>.exam-slot-note{color:var(--dash-ink);opacity:.8;white-space:pre-wrap;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.exam-day-card--undated>header strong{font-size:18px;color:var(--dash-muted)}
.exam-slot-time{display:flex;flex-direction:column;align-items:flex-end;gap:2px;text-align:right;min-width:0}
.exam-slot-time>strong{font-size:15px;font-weight:500;line-height:1.35;white-space:nowrap}
.exam-slot-time--clock>strong{font-size:17px;font-weight:500;letter-spacing:0}
.exam-slot-time>span{font-size:12px;color:var(--dash-muted);white-space:nowrap}
.exam-clash-tag{display:inline-flex;align-items:center;gap:4px;width:fit-content;margin-top:4px;padding:2px 8px;border-radius:6px;font-size:12px;font-style:normal;font-weight:500;color:var(--dash-danger);background:color-mix(in srgb,var(--dash-danger) 12%,var(--dash-bg-2))}
.exam-clash-tag svg{width:14px;height:14px}
.exam-row-actions{display:flex;align-items:center;gap:6px}
.exam-row-actions button{min-height:40px;padding:8px 12px;font-size:13px;border-radius:8px}.exam-row-actions svg{width:16px;height:16px}
.exam-row-actions .exam-remove{padding:8px 4px}

/* ---- my exams ---- */
.exam-mine{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:28px;align-items:start}.exam-mine--empty{grid-template-columns:minmax(0,1fr)}
.exam-mine-side{grid-column:2;grid-row:1;position:sticky;top:16px;display:flex;flex-direction:column;gap:12px;min-width:0}
.exam-mine>.exam-content{grid-column:1;grid-row:1}
.exam-next,.exam-summary,.exam-clashes{background:var(--dash-bg-2);border:1px solid var(--dash-line-strong);border-radius:12px;padding:18px 20px}
.exam-next h2,.exam-summary h2,.exam-clashes h2{display:flex;align-items:center;gap:6px;margin:0 0 10px;font-size:13px;font-weight:500;color:var(--dash-muted)}
.exam-next-count{display:flex;align-items:baseline;gap:6px;color:var(--dash-accent)}
.exam-next-count>strong{font-size:48px;line-height:1;font-weight:500;letter-spacing:-.03em}.exam-next-count>span{font-size:15px;font-weight:500}
.exam-next-count>.exam-next-word{font-size:34px;letter-spacing:-.01em}
.exam-next--urgent .exam-next-count{color:var(--dash-danger)}.exam-next--near .exam-next-count{color:var(--exam-amber)}
.exam-next-title{margin:12px 0 4px;font-size:17px;font-weight:500;line-height:1.4;overflow-wrap:anywhere}
.exam-next-when{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 4px;font-size:14px;font-weight:500}.exam-next-when span{color:var(--dash-muted);font-weight:400}
.exam-next .exam-muted{font-size:12px}
.exam-summary dl{margin:0;display:flex;flex-direction:column;gap:10px}.exam-summary dl>div{display:flex;flex-direction:column;gap:2px}
.exam-summary dt{font-size:15px;font-weight:500}.exam-summary dd{margin:0;font-size:12px;color:var(--dash-muted)}
.exam-export{width:100%;margin-top:14px;font-size:13px}
.exam-clashes{border-color:color-mix(in srgb,var(--dash-danger) 40%,var(--dash-line-strong))}.exam-clashes h2{color:var(--dash-danger)}
.exam-clashes ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}.exam-clashes li{display:flex;flex-direction:column;gap:2px;font-size:13px;line-height:1.5}
.exam-clashes time{font-weight:500}.exam-clashes p{margin:10px 0 0;font-size:12px;color:var(--dash-muted);line-height:1.6}
.exam-timeline{display:flex;flex-direction:column;gap:12px}
.exam-timeline .exam-month-label{margin:12px 0 0}.exam-timeline .exam-month-label:first-child{margin-top:0}
.exam-timeline .exam-day-card{display:grid;grid-template-columns:176px minmax(0,1fr)}
.exam-timeline .exam-day-card>header{flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:10px;padding:16px 18px;border-right:1px solid var(--dash-line)}
.exam-timeline .exam-day-card>header time{flex-direction:column;align-items:flex-start;gap:2px}
.exam-timeline .exam-slot:first-child{border-top:0}
.exam-gap{display:flex;align-items:center;gap:10px;margin:-2px 0;padding:0 0 0 18px;font-size:12px;color:var(--dash-muted)}
.exam-gap::before{content:"";width:2px;height:18px;border-radius:2px;background:repeating-linear-gradient(to bottom,var(--dash-line-strong) 0 3px,transparent 3px 6px)}

/* ---- language test months ---- */
.exam-tile-months{display:flex;flex-direction:column;gap:24px}
.exam-tile-month>h3{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin:0 0 12px;font-size:16px;font-weight:500}.exam-tile-month>h3 span{font-size:12px;font-weight:400;color:var(--dash-muted)}
.exam-tile-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(164px,1fr));gap:12px}
.exam-tile{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:0;padding:14px;background:var(--dash-bg-2);border:1px solid var(--dash-line-strong);border-radius:12px}
.exam-tile--saved{border-color:var(--dash-accent);box-shadow:inset 0 0 0 1px var(--dash-accent)}
.exam-tile time{display:flex;align-items:baseline;gap:8px}.exam-tile time strong{font-size:26px;font-weight:500;line-height:1;letter-spacing:-.02em}.exam-tile time span{font-size:13px;color:var(--dash-muted)}
.exam-tile-note{margin:0;font-size:12px;color:var(--dash-muted);line-height:1.5}
.exam-tile .exam-row-actions{margin-top:auto;width:100%;padding-top:4px}.exam-tile .exam-row-actions button{width:100%}

/* ---- empty and loading ---- */
.exam-empty{padding:56px 24px;text-align:center;background:var(--dash-bg-2);border-radius:12px}.exam-empty>svg{width:32px;height:32px;color:var(--dash-muted)}
.exam-empty h2{font-size:20px;font-weight:500;margin:18px 0 10px}.exam-empty p{font-size:14px;color:var(--dash-muted);margin:0 0 22px;line-height:1.6}
.exam-loading{padding:64px 24px;text-align:center;color:var(--dash-muted)}.exam-error{color:var(--dash-danger);margin:0}

/* ---- calendar ---- */
.exam-calendar{background:var(--dash-bg-2);border:1px solid var(--dash-line-strong);border-radius:12px;overflow:hidden}
.exam-month-nav{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 20px}.exam-month-nav h2{font-size:20px;margin:0;font-weight:500;letter-spacing:-.01em}.exam-month-nav>div{display:flex;gap:8px}
.exam-icon-button{display:inline-flex;align-items:center;justify-content:center;background:transparent;color:var(--dash-ink);border:1px solid var(--dash-line-strong);border-radius:8px;min-width:44px;min-height:44px}
.exam-weekdays,.exam-month-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.exam-weekdays>span{padding:10px;text-align:center;font-size:12px;color:var(--dash-muted)}
.exam-day{padding:10px;min-width:0;min-height:112px!important;border:0;border-top:1px solid var(--dash-line-strong);border-right:1px solid var(--dash-line-strong);background:transparent;color:var(--dash-ink);text-align:left;display:flex;flex-direction:column;gap:6px;align-items:flex-start;justify-content:flex-start}
.exam-day:nth-child(7n){border-right:0}.exam-day--blank{background:var(--dash-bg-1)}
.exam-day time{font-size:14px;min-width:26px;line-height:26px;text-align:center;border-radius:6px}.exam-day--busy time{font-weight:500}
.exam-day--today time{background:var(--dash-accent);color:var(--dash-accent-ink)}.exam-day--selected{background:var(--dash-accent-soft)}
.exam-day-events{font-size:11px;line-height:1.4;display:flex;flex-direction:column;gap:4px;max-width:100%}
.exam-day-events>span{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;padding:1px 6px;border-radius:4px;background:var(--dash-accent-soft);color:var(--dash-accent)}
.exam-day-events small{color:var(--dash-muted)}.exam-day-count{display:none}
.exam-day-agenda{border-top:1px solid var(--dash-line-strong)}.exam-day-agenda>h2{font-size:16px;font-weight:500;margin:0;padding:16px 20px}.exam-day-agenda>.exam-muted{padding:0 20px 20px}

/* ---- editor ---- */
.exam-editor{padding:28px;border:0;border-radius:12px;width:min(640px,calc(100% - 32px));max-height:calc(100dvh - 40px);overflow:auto;background:var(--dash-bg-2);color:var(--dash-ink);box-shadow:0 16px 48px #0003}
.exam-editor::backdrop{background:#0007}.exam-editor header,.exam-editor footer{display:flex;justify-content:space-between;align-items:center;gap:16px}.exam-editor h2{font-size:21px;font-weight:500;margin:0;letter-spacing:-.01em}.exam-editor .exam-muted{font-size:13px;margin:14px 0 20px}
.exam-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.exam-form-grid label{display:flex;flex-direction:column;gap:8px;min-width:0}.exam-form-grid label>span{font-size:13px}
.exam-form-grid input,.exam-form-grid textarea{padding:10px 12px;font-size:16px;min-height:44px}.exam-form-wide{grid-column:1/-1}.exam-editor footer{justify-content:flex-end;margin-top:22px}.exam-editor footer button{min-height:44px}

@media(hover:hover){.exam-page button:not(:disabled):not([aria-pressed=true]):hover{filter:brightness(.96)}.exam-day:not(.exam-day--blank):hover{background:var(--dash-accent-soft)}}
@media(min-width:1500px){.exam-mine{grid-template-columns:minmax(0,1fr) 340px}}
@media(max-width:1180px){.exam-workspace{grid-template-columns:140px minmax(0,1fr);gap:20px}.exam-mine{grid-template-columns:minmax(0,1fr) 260px;gap:20px}.exam-slot{gap:12px;padding:14px 16px}.exam-day-card>header{padding:14px 16px 10px}}
@media(max-width:1100px){
  .exam-workspace{grid-template-columns:minmax(0,1fr);gap:12px}.exam-directory{position:static}.exam-directory-desktop{display:none}.exam-directory-mobile{display:flex}.exam-directory select{width:100%;font-size:16px}
  .exam-mine{grid-template-columns:minmax(0,1fr)}.exam-mine-side{grid-column:1;grid-row:auto;position:static;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.exam-mine>.exam-content{grid-row:auto}.exam-clashes{grid-column:1/-1}
}
@media(max-width:860px){.exam-day-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:720px){
  .exam-page{padding:12px 16px 32px}.exam-topline{gap:8px;margin-bottom:16px}.exam-tabs{flex:1;gap:0}
  .exam-tabs button{flex:1 1 auto;padding:12px 4px;font-size:14px}.exam-tabs button::after{left:4px;right:4px}.exam-tab-mine{margin-left:6px}.exam-tab-mine::before{left:-3px}
  .exam-add{min-width:44px;padding:0 10px}.exam-add>span{display:none}
  html.lang-en .exam-tabs button{font-size:13px;padding:12px 6px}
  .exam-levels{flex-wrap:nowrap;overflow-x:auto}.exam-levels button{white-space:nowrap;font-size:13px;flex-shrink:0}
  .exam-tools{display:block}.exam-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.exam-search{grid-column:1/-1}
  .exam-filters.exam-filters--compact{grid-template-columns:minmax(0,1fr) minmax(110px,.65fr)}.exam-filters--compact .exam-search{grid-column:auto}
  .exam-filters input,.exam-filters select{font-size:16px}
  .exam-resultbar{flex-wrap:wrap;gap:8px;padding:8px 0;font-size:11px}.exam-resultbar>div{margin-left:auto;gap:10px}.exam-resultbar label{gap:4px}.exam-mode button{padding:6px 8px;font-size:11px}
  .exam-subject-bar{flex-direction:column;align-items:stretch;gap:10px;padding:14px}.exam-subject-bar button{width:100%;min-height:44px}
  .exam-day-card>header{padding:14px 16px 10px}.exam-day-card>header strong{font-size:20px}
  .exam-slot{grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;padding:14px 16px}
  .exam-slot-main{grid-column:1;grid-row:1}.exam-slot-time{grid-column:1;grid-row:2;flex-direction:row;align-items:baseline;gap:10px;text-align:left}
  .exam-slot .exam-row-actions{grid-column:2;grid-row:1/3;align-self:center;flex-direction:column;align-items:stretch;gap:2px}
  .exam-mine-side{grid-template-columns:minmax(0,1fr);gap:10px}.exam-next,.exam-summary,.exam-clashes{padding:14px 16px}
  .exam-next-count>strong{font-size:40px}.exam-next-count>.exam-next-word{font-size:28px}.exam-next-title{margin-top:8px;font-size:16px}
  .exam-summary h2{display:none}.exam-summary dl{flex-direction:row;gap:16px}.exam-summary dl>div{flex:1;min-width:0}.exam-summary dt{font-size:14px}.exam-export{margin-top:12px}
  .exam-timeline .exam-day-card{display:flex}.exam-timeline .exam-day-card>header{flex-direction:row;justify-content:space-between;border-right:0;padding:14px 16px 10px}
  .exam-timeline .exam-day-card>header time{flex-direction:row;align-items:baseline;gap:10px}.exam-timeline .exam-slot:first-child{border-top:1px solid var(--dash-line)}
  .exam-tile-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.exam-tile{padding:12px}
  .exam-month-nav{padding:14px 12px}.exam-month-nav h2{font-size:18px}.exam-month-nav>div{gap:4px}.exam-month-nav .secondary{padding:8px 10px;font-size:12px}
  .exam-day{min-height:64px!important;padding:6px 4px;align-items:center;gap:3px}.exam-day-events{display:none}.exam-day-count{display:block;font-size:11px;color:var(--dash-accent);line-height:1.3;font-weight:500}
  .exam-weekdays>span{padding:8px 4px}.exam-day-agenda>h2{padding:14px 16px}
  .exam-editor{padding:22px 18px;max-height:calc(100dvh - 24px)}.exam-editor h2{font-size:21px}.exam-form-grid{gap:14px}.exam-form-grid label:nth-child(1),.exam-form-grid label:nth-child(2),.exam-form-grid label:nth-child(7){grid-column:1/-1}
}
@media(prefers-reduced-motion:reduce){.exam-page *{scroll-behavior:auto!important;transition:none!important}}

/* Exam-time display (timeui 2026-10-14): one clock column, start strong, end lighter,
   duration as a quiet chip; weekday before year in day headers. */
.exam-day-card>header time>span{display:inline-flex;align-items:baseline;gap:6px}
.exam-day-card>header time>span>b{font-weight:500;color:var(--dash-ink);font-size:14px}
.exam-day-card>header strong,.exam-clock,.exam-tile-month time strong{font-variant-numeric:tabular-nums lining-nums;font-feature-settings:"tnum" 1,"lnum" 1}
.exam-slot-time--clock{min-width:132px;gap:4px}
.exam-clock{display:inline-flex;align-items:baseline;gap:3px;white-space:nowrap;line-height:1.2}
.exam-slot-time--clock>.exam-clock{font-size:18px;font-weight:500;letter-spacing:.01em}
.exam-clock-from{color:var(--dash-ink)}
.exam-clock-sep{color:var(--dash-muted);font-weight:400;padding:0 1px}
.exam-clock-to{color:var(--dash-muted);font-weight:500;font-size:.88em}
.exam-slot-time>.exam-slot-meta{display:inline-block;padding:1px 7px;border-radius:999px;background:var(--dash-bg-3);color:var(--dash-muted);font-size:11.5px;line-height:1.6}
@media(max-width:1180px){.exam-slot-time--clock{min-width:118px}}
@media(max-width:720px){.exam-slot-time--clock{min-width:0;gap:8px;align-items:center}.exam-slot-time--clock>.exam-clock{font-size:17px}}

/* Layout (timeui 2026-10-14): public schedule reads as an agenda, one row per exam day:
   date + countdown on the left, papers on the right, so times line up down the page. */
.dash-app .exam-page .exam-search input{-webkit-appearance:none;appearance:none}
.exam-search input::-webkit-search-decoration,.exam-search input::-webkit-search-cancel-button{-webkit-appearance:none}
.exam-day-grid{grid-template-columns:minmax(0,1fr);gap:10px}
.exam-month-label{margin:18px 0 0;padding-bottom:6px;border-bottom:1px solid var(--dash-line);font-size:12px;font-weight:500;text-transform:uppercase;letter-spacing:.06em}
.exam-day-grid>.exam-day-card{display:grid;grid-template-columns:200px minmax(0,1fr)}
.exam-day-grid>.exam-day-card>header{flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:10px;padding:16px 18px;border-right:1px solid var(--dash-line);background:color-mix(in srgb,var(--dash-bg-3) 45%,var(--dash-bg-2))}
.exam-day-grid>.exam-day-card>header time{flex-direction:column;align-items:flex-start;gap:4px}
.exam-day-grid>.exam-day-card .exam-slot:first-child{border-top:0}
.exam-day-grid>.exam-day-card .exam-slots{display:flex;flex-direction:column;justify-content:center}
@media(max-width:1180px){.exam-day-grid>.exam-day-card{grid-template-columns:168px minmax(0,1fr)}}
@media(max-width:720px){
  .exam-day-grid>.exam-day-card{display:flex}
  .exam-day-grid>.exam-day-card>header{flex-direction:row;justify-content:space-between;align-items:center;border-right:0;padding:14px 16px 10px;background:none}
  .exam-day-grid>.exam-day-card>header time{flex-direction:row;align-items:baseline;gap:10px}
  .exam-day-grid>.exam-day-card .exam-slot:first-child{border-top:1px solid var(--dash-line)}
}

/* Weights and search field (timeui round 2, 2026-10-14).
   Search: dashboard-theme.css paints every .dash-app input/select with --dash-bg-0 !important,
   so the selects are bg-0 but the .exam-search label was bg-2 (white) around a bg-0 input,
   which read as a box inside a box. Give the label the select surface and keep the input flush. */
html .dash-app .exam-page label.exam-search{box-sizing:border-box;min-height:40px;height:40px;padding:0 12px;gap:8px;background:var(--dash-bg-0)!important;border:1px solid var(--dash-line-strong)!important;border-radius:var(--dash-radius-sm,8px)!important}
html .dash-app .exam-page label.exam-search input#exam-search{background:var(--dash-bg-0)!important;background-color:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;min-height:0!important;height:100%!important;padding:0!important;font-size:14px;line-height:1.4}
html .dash-app .exam-page label.exam-search input#exam-search:-webkit-autofill{-webkit-box-shadow:0 0 0 40px var(--dash-bg-0) inset!important;-webkit-text-fill-color:var(--dash-ink)}
html .dash-app .exam-page label.exam-search svg{width:16px;height:16px;flex:none}
html .dash-app .exam-page label.exam-search:focus-within{outline:0;border-color:var(--dash-accent)!important;box-shadow:0 0 0 3px var(--dash-accent-soft)}
@media(max-width:720px){html .dash-app .exam-page label.exam-search{height:44px;min-height:44px}}
/* No bold: hierarchy by size and colour. */
.exam-day-card>header strong{font-weight:500}
.exam-day-card>header time>span>b{font-weight:500;color:var(--dash-ink)}
.exam-slot-main>strong{font-weight:500}
.exam-slot-time>strong,.exam-slot-time--clock>.exam-clock{font-weight:400}
.exam-clock-from{color:var(--dash-ink);font-weight:500}
.exam-clock-to{color:var(--dash-muted);font-weight:400;font-size:1em}

/* Type unified with the rest of the app (timeui round 3, 2026-10-14).
   Family, base size and colours come from dashboard-theme.css (body.dash-app: --ps-ui-font,
   14px/1.5, --dash-ink / --dash-muted). This page follows the same scale as 真题库:
   12px meta, 13px secondary, 14px body, 15px item titles, 16px card headings, 20-24px figures;
   weights 400 body, 500 emphasis, 600 headings only. No custom tracking or uppercase. */
.exam-page{font-family:inherit;font-size:14px;line-height:1.5}
.exam-page *{letter-spacing:normal}
.exam-month-label{text-transform:none;font-size:13px;font-weight:500;color:var(--dash-muted)}
.exam-day-card>header strong{font-size:16px;font-weight:500;line-height:1.35}
.exam-day-card>header time>span,.exam-day-card>header span{font-size:12px}
.exam-day-card>header time>span>b{font-size:12px;font-weight:500;color:var(--dash-ink)}
.exam-day-card--undated>header strong{font-size:16px}
.exam-slot-main>strong{font-size:14px;font-weight:500;line-height:1.5}
.exam-slot-main>span{font-size:12px}
.exam-countdown{font-size:12px;font-weight:500}
/* Clock: start and end identical, neutral dash. */
.exam-slot-time--clock>.exam-clock,.exam-slot-time>strong{font-size:15px;font-weight:500;line-height:1.4}
.exam-clock-from,.exam-clock-to{color:var(--dash-ink);font-weight:500;font-size:1em}
.exam-clock-sep{color:var(--dash-muted);font-weight:400}
.exam-slot-time>.exam-slot-meta{font-size:12px;line-height:1.5}
.exam-subject-bar strong{font-size:15px;font-weight:500}
.exam-subject-bar span{font-size:12px}
.exam-next-count>strong{font-size:24px;font-weight:500}
.exam-next-count>.exam-next-word{font-size:20px}
.exam-next-count>span{font-size:14px;font-weight:500}
.exam-tile time strong{font-size:20px;font-weight:500}
.exam-month-nav h2{font-size:16px;font-weight:500}
@media(max-width:720px){.exam-day-card>header strong{font-size:16px}.exam-slot-time--clock>.exam-clock{font-size:15px}}
.exam-editor h2{font-size:18px;font-weight:500}
/* Phone EN: four tabs do not fit one row at 390px; wrap them into two even rows. */
@media(max-width:720px){
  html.lang-en .exam-page .exam-tabs{flex-wrap:wrap;overflow:visible;row-gap:2px}
  html.lang-en .exam-page .exam-tabs button{flex:1 1 calc(50% - 4px);padding:10px 6px;font-size:13px}
  html.lang-en .exam-page .exam-tab-mine{margin-left:0}
  html.lang-en .exam-page .exam-tab-mine::before{display:none}
}
html .dash-app .exam-page :is(button,button *){font-weight:500!important}
html .dash-app .exam-page :is(button,button *){font-weight:500!important}

/* Course / competition papers as small cards (timeui round 5): same .exam-tile shell as language tests. */
.exam-tile-grid--paper{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}
.exam-tile-body{display:flex;flex-direction:column;gap:2px;min-width:0;width:100%}
.exam-tile-title{margin:0;font-size:14px;font-weight:500;line-height:1.45;color:var(--dash-ink);overflow-wrap:anywhere}
.exam-tile-time{display:flex;align-items:center;flex-wrap:wrap;gap:6px 8px;width:100%}
.exam-tile-time>.exam-clock,.exam-tile-time>strong{font-size:15px;font-weight:500;line-height:1.4}
.exam-tile-time>.exam-slot-meta{display:inline-block;padding:1px 7px;border-radius:999px;background:var(--dash-bg-3);color:var(--dash-muted);font-size:12px;line-height:1.5}
.exam-tile--paper .exam-registration{margin:0;font-size:12px}
@media(max-width:720px){
  .exam-tile-grid--paper{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .exam-tile-time>.exam-clock{font-size:14px}
}

/* Filter row without the search box (timeui round 6): selects share the row evenly;
   a single select (language month / competition) stays a comfortable width. */
.exam-filters{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
.exam-filters.exam-filters--compact{grid-template-columns:minmax(0,1fr);max-width:360px}
@media(max-width:720px){
  .exam-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
  .exam-filters.exam-filters--compact{grid-template-columns:minmax(0,1fr);max-width:none}
}
/* Phone EN: English subject names do not fit half a row; stack the two selects. */
@media(max-width:720px){html.lang-en .exam-page .exam-filters:not(.exam-filters--compact){grid-template-columns:minmax(0,1fr)}}

/* Paper cards v2 (timeui round 7): subject · code, paper name, date + time, tags, button at the
   bottom. Cards in a row share height (grid stretch + margin-top:auto on the action). */
.exam-tile-grid--paper{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;align-items:stretch}
.exam-tile--paper{gap:10px;padding:14px 14px 12px}
.exam-tile--paper .exam-tile-body{gap:2px}
.exam-tile--paper .exam-tile-title{font-size:14px;font-weight:500;line-height:1.4}
.exam-tile--paper .exam-tile-note{font-size:12px;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.exam-tile-when{display:flex;flex-direction:column;gap:2px;width:100%;padding-top:10px;border-top:1px solid var(--dash-line)}
.exam-tile-when time{font-size:13px;color:var(--dash-muted);font-weight:400}
.exam-tile-clock .exam-clock{font-size:15px;font-weight:500;line-height:1.4}
.exam-tile-tags{display:flex;flex-wrap:wrap;gap:6px;width:100%}
.exam-tile-tags .exam-countdown{padding:2px 8px;font-size:12px;line-height:1.5}
.exam-tag{display:inline-flex;align-items:center;padding:2px 8px;border-radius:6px;background:var(--dash-bg-3);color:var(--dash-muted);font-size:12px;line-height:1.5;white-space:nowrap}
.exam-tile--paper .exam-registration{margin:0;font-size:12px}
.exam-tile--paper .exam-row-actions{margin-top:auto;padding-top:2px}
.exam-tile--paper .exam-row-actions button{min-height:34px;font-size:13px}
/* Above the cards: count left, view toggle and past-exams switch right, on one tidy line. */
.exam-resultbar{min-height:44px;margin-top:8px}
.exam-resultbar p{font-size:13px;color:var(--dash-muted)}
.exam-subject-bar{padding:10px 12px 10px 16px}
@media(max-width:720px){
  .exam-tile-grid--paper{grid-template-columns:minmax(0,1fr);gap:10px}
  .exam-tile--paper{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;row-gap:8px;align-items:start}
  .exam-tile--paper>*{grid-column:1}
  .exam-tile--paper .exam-row-actions{grid-column:2;grid-row:1/span 2;margin:0;padding:0;width:auto;align-self:start}
  .exam-tile--paper .exam-row-actions button{width:auto;min-height:36px;padding:6px 14px}
  .exam-tile-when{flex-direction:row;align-items:baseline;justify-content:space-between;gap:8px;grid-column:1/-1}
  .exam-tile-tags,.exam-tile--paper .exam-registration{grid-column:1/-1}
  .exam-resultbar{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:8px 10px;padding:4px 0}
  .exam-resultbar>div{margin-left:0;justify-content:flex-end;flex-wrap:wrap;gap:8px 12px}
  .exam-resultbar p{font-size:12px}
}
