/* Ordinary actions share the plan toolbar's shape. Links, toggles, and icon
   controls keep their own affordances. Loaded only on screen, never in print. */
:root { --action-height:34px; --action-ink:#202536; --action-paper:#fff; --action-line:#b6bdcd; --action-hover:#f0f1fa }
:is(.actions>:is(button,a), .form-actions button, .wz-form :is(.wz-next,.wz-back,.wz-mode,.wz-extras button),
    .date-shortcut, .dialog-actions button, .feature-dialog>button, .welcome-actions button, .feedback-actions button,
    .desk-add-plan, .desk-location-actions button, #plans-page .saved-open, #plans-edit, #learning-day-reset,
    .day-tools button, .chazarah-action, .chazarah-entry button, button:is([data-focus=catchup],[data-focus=more]),
    .sync-bar :is(button,a), .header-sign-ins a, #usage-preferences button,
    .stats :is(.range,#filter-form,.page-nav,#active-filters) button):not([hidden]) {
  display:inline-flex; align-items:center; justify-content:center; gap:.35em;
  box-sizing:border-box; min-height:var(--action-height); min-block-size:var(--action-height); max-inline-size:100%;
  padding:6px 10px; border:1px solid var(--btn-line,var(--action-line)); border-radius:8px;
  background:var(--btn-bg,var(--action-paper)); color:var(--btn-ink,var(--action-ink));
  font-family:inherit; font-size:var(--font-meta,.875rem); font-weight:600; line-height:1.25;
  text-align:center; text-decoration:none; white-space:normal; cursor:pointer;
  &:is(.primary,.secondary,.wz-next,.saved-open,.desk-add-plan) {
    --btn-bg:#4741a6; --btn-line:#4741a6; --btn-ink:white; --btn-hover:#37318d;
  }
  &:is(.save-copy,.save-schedule) {
    --btn-bg:#efedff; --btn-line:#cbc6e7; --btn-ink:#37318d; --btn-hover:#e4e0fb;
  }
  &#desk-remove {--btn-ink:var(--danger)}
  &.item-checklist {--btn-ink:var(--link);--btn-line:transparent;--btn-bg:transparent;white-space:nowrap;font-variant-numeric:tabular-nums;min-inline-size:calc(var(--count-width) + 1.35em + 20px)}
  &#desk-remove-yes {--btn-bg:var(--danger);--btn-line:var(--danger);--btn-ink:white;--btn-hover:#902237}
  &:hover:not(:disabled) {background:var(--btn-hover,var(--action-hover))}
  &:focus-visible {outline:3px solid var(--focus,#574bbd);outline-offset:2px}
  &:disabled {opacity:.55;cursor:default}
}
.dialog-actions,.welcome-actions,.feedback-actions {display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.dialog-actions,.feature-dialog>button {margin:12px 0 0}
.actions,.desk-location-actions {gap:8px}
.copy-link .action-icon {width:18px;height:18px;stroke-width:2}
.header-sign-ins {display:flex;flex-wrap:wrap;align-items:stretch;gap:6px;max-inline-size:100%}
.header-sign-ins:not(:has(a:not([hidden]))) {display:none}
.header-sign-ins img {flex:none}
.language-switcher abbr {display:none}
/* Keep a short page's footer at the bottom, not directly below a loading message. */
body[data-desk-view] {display:flex;flex-direction:column;min-block-size:100svh}
body[data-desk-view] #workspace {flex:1 0 auto}
body:is([data-desk-view=build],[data-desk-view=schedule]) #workspace {min-block-size:100svh}
html {scrollbar-gutter:stable}
@media(min-width:1101px) {
  .hero.desk-header,html[dir=rtl] .hero.desk-header {display:grid;grid-template-columns:auto auto minmax(min-content,1fr)}
}
.hero.desk-header .header-controls {justify-self:stretch;width:100%;margin:0}
.desk-header .header-account-tools {width:100%}
.desk-header .header-account-tools>:is(.language-switcher,#welcome-help) {align-self:stretch}
@media(max-width:1100px) {
  .hero.desk-header,html[dir=rtl] .hero.desk-header {
    display:grid;grid-template-areas:"brand tools" "nav nav";grid-template-columns:auto minmax(0,1fr);
    align-items:center;row-gap:3px;
  }
  .desk-header .desk-brand {grid-area:brand;justify-self:start}
  .desk-header .desk-nav {grid-area:nav;justify-self:center;margin:0}
  .hero.desk-header .header-controls {grid-area:tools;justify-content:flex-end}
}
@media(max-width:700px) {
  .hero.desk-header,html[dir=rtl] .hero.desk-header {padding-inline:8px;column-gap:4px;grid-template-columns:minmax(44px,1fr) auto}
  .desk-header .desk-brand {justify-self:stretch;container:brand / inline-size}
  @container brand (max-width:8.5rem) {.desk-brand span {display:none}}
  .desk-header .desk-brand {font-size:1.1rem;gap:2px;white-space:nowrap;min-height:44px}
  .desk-brand img {width:28px;height:28px}
  .desk-header .header-account-tools,.header-sign-ins {flex-wrap:nowrap;gap:2px}
  .desk-header .language-switcher {padding:1px;gap:0}
  .desk-header .language-switcher button,.desk-header #welcome-help {padding-inline:0;inline-size:44px}
  .desk-header .language-switcher span {display:none}
  .desk-header .language-switcher abbr {display:inline}
  .desk-header #header-account-name {max-inline-size:clamp(5ch,18vw,15ch)}
  .header-sign-ins a {inline-size:44px;position:relative}
  .header-sign-ins a span {position:absolute;inline-size:1px;block-size:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
}
@media(max-width:380px) {
  .desk-brand span {display:none}
  .desk-header .desk-brand {min-inline-size:44px;justify-content:center}
  .desk-brand img {width:32px;height:32px}
}
.day-navigation {--action-height:44px}
.desk-location-actions:has(>#desk-edit:not([hidden])) {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:stretch}
.desk-location-actions:has(>#desk-remove[hidden]) {grid-template-columns:repeat(3,minmax(0,1fr))}
#desk-remove-confirm {grid-column:1/-1}
@media(max-width:700px) {
  .desk-location-actions:has(>#desk-edit:not([hidden])) {inline-size:100%;gap:6px}
  #desk-location .desk-location-actions:has(>#desk-edit:not([hidden]))>button:not([hidden]) {
    flex-direction:column;gap:3px;padding:5px 3px;min-height:48px;
    --btn-bg:var(--action-paper);--btn-line:var(--action-line);--btn-hover:var(--action-hover);
  }
  #desk-location .desk-location-actions:has(>#desk-edit:not([hidden]))>.secondary {--btn-ink:#4741a6}
}
#desk-review:not([hidden]) {display:grid;flex:1 0 100%;gap:12px;padding:16px;background:#eff8f1;border:2px solid #a47d25;border-radius:8px;box-sizing:border-box}
#desk-review h2 {text-align:center;margin:0;font-family:inherit;font-size:clamp(1.6rem,3vw,2rem);font-weight:700;line-height:1.15;color:#19352b}
#desk-review {container:preview / inline-size}
#desk-review-heading {display:flex;align-items:center;justify-content:center;gap:.35em}
#desk-review #desk-review-heading svg {width:.85em;height:.85em;color:#76601f;stroke-width:1.8}
#desk-review .dialog-actions {justify-content:center;margin:0;flex-wrap:nowrap;gap:6px}
#desk-review .dialog-actions button span {font:inherit;white-space:nowrap}
@media(max-width:380px) {#desk-review:not([hidden]) {padding-inline:10px}}
@container preview (max-width:21rem) {
  #desk-review .dialog-actions button:not([hidden]) {padding-inline:5px!important;gap:4px}
}
@container preview (max-width:17rem) {
  #desk-review .dialog-actions button {min-width:44px}
  #desk-review :is(#desk-review-edit,#desk-review-cancel) span {position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}
}
@container preview (max-width:12rem) {
  #desk-review #desk-review-save span {position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}
}
#desk-review .dialog-actions button:not([hidden]) {min-block-size:44px;min-height:44px;font-family:inherit;font-size:.93rem;font-weight:600;gap:.4em;padding-inline:10px}
#desk-review .dialog-actions svg {inline-size:1.12rem;block-size:1.12rem}
#desk-review #desk-review-save {--btn-bg:#19573d;--btn-line:#19573d;--btn-hover:#11472f;color:white;background:var(--btn-bg);border-color:var(--btn-line)}
#desk-review #desk-review-save:hover {background:var(--btn-hover)}
#desk-review-save svg {color:#8aefaf}
#desk-review-cancel svg {color:#b52838}
#desk-review svg {flex:none;width:1.1em;height:1.1em;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linejoin:round;stroke-linecap:round}
#desk-location:has(#desk-review:not([hidden])) .desk-location-actions {display:flex}
.desk-location-actions button svg {width:1.1em;height:1.1em;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.wz-form .form-commit {align-items:stretch;flex-wrap:wrap}
.wz-form .form-commit button {min-height:44px}
body[data-review-draft] .results :is(.actions button:not(.jump-today),.day-tools button,.day-tools .chazarah-scheduled) {display:none!important}
body[data-plan-preview] .results :is(.day-tools button,.chazarah-scheduled,[id$="clear-checks"]) {display:none!important}
#desk-review-note {margin:0;text-align:center;font-size:.9rem;color:#46584d}
body[data-plan-preview] .results .day {cursor:default}
.results .day input[type=checkbox]:disabled {cursor:not-allowed;opacity:.55;border-style:dashed;background-color:#d9dee3;border-color:#78828a}
.results .day input[type=checkbox]:disabled:checked {background-color:#646f76;border-style:solid}
.compact-action-label {display:none}
.recovery-preview {margin-block-start:1rem}
.preview-pace {margin:1rem 0;color:var(--ink)}
.preview-pace>div {display:grid;grid-template-columns:minmax(6rem,30%) 1fr;gap:.75rem;padding:.24rem .65rem}
.preview-pace dt {color:var(--muted)}
.preview-pace dd {margin:0;font-weight:600}
.assignment-preview {inline-size:100%;border-collapse:collapse;font-size:1rem;text-align:start}
.assignment-preview :is(th,td) {padding:.48rem .65rem;border-block-end:1px solid var(--line);text-align:start}
.assignment-preview thead th {font-size:.875rem;color:var(--muted);background:var(--surface-soft);border-block-start:1px solid var(--line)}
.assignment-preview tbody th {inline-size:30%;font-size:.875rem;font-weight:600;color:var(--muted)}
.assignment-preview td {font-weight:600;overflow-wrap:anywhere}
.assignment-preview tbody tr:nth-child(even) {background:var(--surface-soft)}
.dialog-actions .clear-confirm {--btn-ink:white;--btn-bg:var(--danger);--btn-line:var(--danger);--btn-hover:#902237}
@media(max-width:700px) {
  #desk-location:has(#desk-review:not([hidden])) {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 4px}
  #desk-location :is(#desk-texts-back,#desk-review) {grid-column:1/-1}
  #desk-location:has(#desk-review:not([hidden])) .desk-location-actions {flex-wrap:nowrap;gap:4px}
  #desk-location:has(#desk-review:not([hidden])) .desk-title-row {gap:2px}
  #desk-location:has(#desk-review:not([hidden])) h1 {font-size:clamp(1.05rem,5vw,1.5rem)}
  #desk-location .desk-title-row .edit-title {width:44px;height:44px;flex-basis:44px}
  #desk-location:has(#desk-review:not([hidden])) .desk-location-actions :is(.secondary,.copy-link):not([hidden]) {inline-size:44px;min-height:44px;padding:0}
  #desk-location:has(#desk-review:not([hidden])) .desk-location-actions :is(.secondary,.copy-link)>span {
    position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;
  }
  body[data-desk-view=schedule] .results .actions {display:flex;align-items:center;flex-wrap:wrap;gap:4px}
  body[data-desk-view=schedule] .results .actions>button:not([hidden]) {min-inline-size:44px;min-height:44px;width:auto;padding-inline:6px;white-space:nowrap}
  .actions :is(.save-schedule,.save-copy) {order:1}
  .actions .compact-action-label {display:inline}
  .actions .full-action-label {display:none}
}
@media(max-width:380px) {
  body[data-desk-view=schedule] .results {padding-inline:9px}
  body[data-desk-view=schedule] .results .actions {gap:3px}
  body[data-desk-view=schedule] #workspace .results .actions>button:not([hidden]) {padding-inline:2px;gap:2px}
  body[data-desk-view=schedule] #workspace .results .actions>[id$="clear-checks"]:not([hidden]) {flex-direction:column;gap:0;padding-block:2px}
}
.desk-title-row {display:flex;align-items:center;gap:8px;max-inline-size:100%;min-inline-size:0}
.desk-title-row h1 {min-inline-size:0;overflow-wrap:anywhere}
.desk-title-row h1.editing {outline:2px solid var(--focus);border-radius:4px;background:var(--desk-selected)}
.desk-title-row .edit-title {flex:none}
body[data-desk-view=schedule] .results .editable-kicker {display:none}
#desk-texts-back {display:inline-flex;align-items:center;gap:.5em}
#desk-texts-back::before {content:"";inline-size:.45em;block-size:.45em;border:solid currentColor;border-width:0 0 2px 2px;transform:rotate(45deg)}
#desk-texts-back:dir(rtl)::before {transform:rotate(225deg)}
.feature-dialog .progress-items {margin:1rem 0 0;padding:0;border:0;min-inline-size:0}
.progress-items legend {font-weight:600;margin-block-end:.45rem}
.feature-dialog .progress-items label {display:flex;flex-direction:row;align-items:center;gap:.75rem;min-height:44px;margin:0;padding:.3rem .6rem;border-bottom:1px solid var(--line)}
.feature-dialog .progress-items label:has(input:checked) {background:var(--desk-selected)}
.feature-dialog .progress-items input {appearance:auto;width:1.2rem;height:1.2rem;min-height:0;flex:none;margin:0;accent-color:#4741a6}
@media(max-width:700px),(pointer:coarse) { :root {--action-height:44px} }
@media(prefers-color-scheme:dark) {body.stats {--action-ink:#e0eaf2;--action-paper:#213447;--action-line:#7389a0;--action-hover:#32485f}}
