/* bl-account.css - the signed-in account page (includes/account/dash.php). Theme tokens only, so light and dark both
   follow brainlag.css. A left section nav from 900px; below that a stacked page with a jump menu. No cards inside
   cards: each section is one surface, and what sits inside it is grouped by spacing and tinted panels, never rules. */
.acd{display:grid;grid-template-columns:200px minmax(0,1fr);gap:36px;align-items:start}
.acd[hidden]{display:none}
.acd-nav{position:sticky;top:84px}
.acd-nav ul,.acd-jump ul{list-style:none;margin:0;padding:0}
.acd-nav a{display:flex;align-items:center;min-height:44px;padding:0 14px;border-radius:var(--r1);color:var(--ink-2);font-weight:600;font-size:15.5px;text-decoration:none}
.acd-nav a:hover{color:var(--ink);background:var(--blue-tint)}
.acd-nav a[aria-current="true"]{color:var(--study-ink);background:var(--study-tint)}
.acd-nav.is-going a:not([aria-current]):hover{color:var(--ink-2);background:none}
.acd-main{min-width:0}

/* Header: who is signed in, sync and sign out */
.acd-head{display:grid;grid-template-columns:56px minmax(0,1fr) auto;gap:6px 16px;align-items:center;margin:0 0 22px}
.acd-who{display:flex;flex-direction:column;gap:2px;min-width:0}
.acd-head .avatar{width:56px;height:56px;margin:0;border-radius:50%;display:grid;place-items:center;background:var(--blue);color:#fff;font:700 24px/1 var(--f-display);text-transform:uppercase}
.acd-head .acd-title{font:800 28px/1.15 var(--f-display);margin:0;text-align:start;color:var(--ink)}
.acd-head .email{margin:0;font-weight:700;color:var(--text)}
.acd-head .syncline{margin:0;color:var(--muted);font-size:13.5px}
.acd-act{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end;align-self:start}
/* Sign out: a quiet ghost button with a door-and-arrow, top right on every width. Not destructive, so never red. */
.acd-out{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 14px 0 12px;margin:0 -6px 0 0;border:0;border-radius:var(--pill);
  background:transparent;color:var(--ink-2);font:600 15px/1 var(--f-body);cursor:pointer;white-space:nowrap;
  transition:background-color var(--dur-hover) var(--ease-out),color var(--dur-hover) var(--ease-out)}
.acd-out:hover{background:var(--seg-track);color:var(--ink)}
.acd-out:focus-visible{outline:2px solid var(--study-ink);outline-offset:2px}
.acd-out:disabled{opacity:.6;cursor:progress}
.acd-out svg{flex:none}
.ac .acd-act .go{width:auto;margin:0;padding:10px 20px;min-height:44px}
.acd-head .msg{grid-column:1 / -1;margin:6px 0 0}

/* Jump menu (phones) */
.acd-jump{display:none;position:sticky;top:64px;z-index:20;margin:0 0 16px;background:var(--surface);border-radius:var(--r2);box-shadow:var(--shadow)}
.acd-jump summary{display:flex;align-items:center;gap:8px;min-height:48px;padding:0 16px;cursor:pointer;list-style:none;font-size:15px;color:var(--ink-3)}
.acd-jump summary::-webkit-details-marker{display:none}
.acd-jump summary b{color:var(--ink);font-weight:700}
.acd-jump summary::after{content:'';margin-inline-start:auto;width:9px;height:9px;border-inline-end:2px solid var(--ink-3);border-bottom:2px solid var(--ink-3);transform:rotate(45deg) translateY(-3px)}
.acd-jump[open] summary::after{transform:rotate(-135deg) translateY(-2px)}
.acd-jump ul{padding:0 8px 8px}
.acd-jump a{display:flex;align-items:center;min-height:44px;padding:0 10px;border-radius:var(--r1);color:var(--ink);font-weight:600;text-decoration:none}
.acd-jump a[aria-current="true"]{color:var(--study-ink);background:var(--study-tint)}

/* Sections */
.acd-sec{background:var(--surface);border-radius:var(--r3);box-shadow:var(--shadow);padding:28px 30px;margin:0 0 22px;scroll-margin-top:84px;text-align:start}
.acd-sec:focus{outline:none}
.ac .acd-sec h2{font-size:22px;margin:0 0 8px}
.acd-sec h3{font-size:16.5px;margin:30px 0 10px}
.acd-sec h2 + h3,.acd-sec h2 + .sub + h3{margin-top:12px}
.acd-sec .sub{margin:0 0 12px}
.acd-sec p{margin:0 0 10px}
.acd-sec .msg{margin:10px 0 0}
.tlink{color:var(--study-ink);font-weight:700}
.acd-links{display:flex;flex-wrap:wrap;gap:6px 22px}
.acd-links a,.acd-sec .tlink{display:inline-flex;align-items:center;min-height:44px}
.vh{position:absolute !important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}

/* Figures: a row of numbers, each on its own tinted panel (no rules) */
.acd-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px;margin:14px 0 0;padding:0}
.acd-stats-sm{grid-template-columns:repeat(3,minmax(0,1fr))}
.acd-stat{padding:14px 16px;background:var(--seg-track);border-radius:var(--r2);min-width:0}
.acd-stat dt{font-size:13.5px;color:var(--ink-3);font-weight:600;margin:0 0 6px}
.acd-stat dd{margin:0}
.acd-big{display:flex;align-items:center;gap:8px;font:800 30px/1.1 var(--f-display);color:var(--ink);font-variant-numeric:tabular-nums}
.acd-stat small{display:block;margin-top:4px;font-size:13px;color:var(--ink-3);line-height:1.4}
.acd-stat small a{min-height:0}
.acd-flame{font-size:30px;line-height:0}
.acd-flame:empty{display:none}

/* Rows (carry on, courses, subjects, share links): tinted panels with space between, no rules */
.acd-rows{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.acd-rows:empty{display:none}
.acd-rows > li{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 16px;align-items:center;padding:12px 16px;background:var(--seg-track);border-radius:var(--r2)}
.acd-rows .acd-bar{background:var(--surface)}
.acd-rows .t{font-weight:700;color:var(--ink)}
.acd-rows .d{display:block;font-size:14px;color:var(--ink-3);margin-top:2px}
.acd-rows .tag{font-size:12.5px;font-weight:700;color:var(--ink-3);margin-inline-start:8px}
.acd-rows .acts{display:flex;gap:8px 14px;flex-wrap:wrap;justify-content:flex-end;align-items:center}
.acd-rows .links{grid-column:1 / -1;display:flex;flex-wrap:wrap;gap:0 18px;font-size:14.5px}
.acd-bar{position:relative;height:8px;border-radius:8px;background:var(--sunk);overflow:hidden;margin:8px 0 0;grid-column:1 / -1}
.acd-bar > span{position:absolute;inset:0 auto 0 0;width:0;background:var(--study);border-radius:8px;transition:width .4s cubic-bezier(.22,1,.36,1)}

/* Forms */
.acd-row2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.acd-sec label > span{display:block;font-size:13px;font-weight:700;color:var(--text);margin:0 0 6px}
.acd-sec .select,.acd-sec .input{width:100%;min-height:46px;box-sizing:border-box;font-size:16px}
.acd-subjects{border:0;margin:18px 0 0;padding:0;min-width:0}
.acd-subjects legend{font-size:13px;font-weight:700;color:var(--text);padding:0;margin:0 0 8px}
.acd-checks{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:4px 18px}
.acd-checks li{min-width:0}
.acd-check{display:flex;align-items:center;gap:10px;min-height:44px;cursor:pointer;font-size:15px;color:var(--ink)}
.acd-check input,.acd-tog input{width:20px;height:20px;margin:0;flex:none;accent-color:var(--study)}
.acd-checks .acd-sb{margin:0 0 8px 30px;width:calc(100% - 30px);min-height:40px;font-size:14.5px;padding:6px 10px}
.acd-btns{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;margin-top:16px}
.ac .acd-btns .go{width:auto;margin:0;padding:10px 22px}
.acd-btns .msg{margin:0}
.acd-inline{display:block;max-width:280px}
/* Goals: label to control 8, helper to the next heading 24, sentence to its button 8 */
.ac #goals .acd-inline{display:grid;gap:8px}
#goals .acd-goal-src{margin:8px 0 0}
#goals h3{margin:24px 0 8px}
#goals #examLine{margin:0 0 8px}
#goals .acd-exam-go{margin:0}
.acd-goal{margin:14px 0 6px;max-width:520px}
.acd-goal .acd-bar{height:12px}
.acd-goal-line{margin:8px 0 0;font-weight:700;color:var(--ink)}
.acd-timer{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.acd-timer .acd-btns{grid-column:1 / -1;margin-top:4px}
.acd-pw{max-width:420px}
.acd-pw input[type=password]{padding-inline-end:14px}
.acd-copy{display:flex;gap:8px;max-width:560px}
.acd-copy .input{flex:1 1 auto;min-width:0}
.ac .acd-copy .go,.ac .acd-copy .quiet{width:auto;margin:0;flex:none}
.acd-toggles{list-style:none;margin:0;padding:0}
.acd-tog{display:flex;align-items:center;gap:12px;min-height:44px;cursor:pointer;color:var(--ink);font-size:15px}
.acd-toggles .sub{margin:0 0 6px 32px;font-size:13.5px}
.acd-langs{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px 22px}
.acd-langs a{display:inline-flex;align-items:center;min-height:44px;color:var(--ink-2);font-weight:600}
.acd-langs a[aria-current="true"]{color:var(--study-ink);font-weight:800;text-decoration:underline;text-underline-offset:4px}
.acd-split{display:grid;grid-template-columns:1fr 1fr;gap:0 28px}

/* Key and value list */
.acd-kv{margin:8px 0 0;padding:4px 16px;background:var(--seg-track);border-radius:var(--r2)}
/* one label column for the whole list, as wide as its longest label */
.acd-kv{display:grid;grid-template-columns:max-content minmax(0,1fr);column-gap:28px}
.acd-kv > div{display:contents}
.acd-kv dt,.acd-kv dd{padding:10px 0}
.acd-kv dt{color:var(--ink-3);font-weight:600;font-size:14.5px}
.acd-kv dd{margin:0;color:var(--ink)}
.acd-kv dd ul{margin:0;padding-inline-start:18px}

/* Tables */
.acd-tablewrap{overflow-x:auto;margin:6px 0 0;padding:6px 16px 8px;background:var(--seg-track);border-radius:var(--r2)}
.acd-table{width:100%;border-collapse:collapse;font-size:14.5px}
.acd-table th{text-align:start;font-size:13px;color:var(--ink-3);font-weight:700;padding:8px 10px 4px 0}
.acd-table td{padding:7px 10px 7px 0;vertical-align:middle;color:var(--ink)}
.acd-table .n{text-align:end;font-variant-numeric:tabular-nums;white-space:nowrap}
.acd-table .w{white-space:nowrap;color:var(--ink-3)}
.acd-table td:last-child{text-align:end;padding-inline-end:0}
.acd-table tfoot td{font-weight:700;padding-top:10px;text-align:start}
.acd-table a{color:var(--ink);font-weight:600}
.acd-table .linkdel{border:0;background:none;font:inherit;font-size:14px;font-weight:700;color:color-mix(in srgb,#d93025 78%,var(--text));min-height:44px;padding:0 4px;cursor:pointer}
.acd-table .linkdel:hover{text-decoration:underline}
.acd-table .linkdel:disabled{opacity:.5;cursor:progress}

/* Your data: three action cards (rounded tinted panels), the delete form under them, and one disclosure for the list.
   No rules between rows: spacing only. */
.acd-acts3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0 0}
.acd-card{display:flex;flex-direction:column;align-items:flex-start;background:var(--seg-track);border-radius:var(--r2);padding:18px 18px 16px;min-width:0}
.acd-sec .acd-card h3{border-top:0;padding-top:0;margin:0 0 4px;font-size:16px}
.acd-card .sub{font-size:14px;margin:0 0 14px}
.acd-card button{margin-top:auto}
.ac .acd-card .quiet{background:var(--surface);border-color:transparent}
.ac .acd-card .quiet:hover{border-color:var(--blue)}
.ac .acd-card-danger .quiet{color:color-mix(in srgb,#d93025 78%,var(--text))}
.ac .acd-card-danger .quiet:hover,.ac .acd-card-danger .quiet[aria-expanded="true"]{border-color:color-mix(in srgb,#d93025 45%,transparent)}
.ac .acd-delform{margin:12px 0 0;padding:18px;border-radius:var(--r2);background:color-mix(in srgb,#d93025 7%,var(--surface));max-width:none}
.acd-delform .sub{margin:0 0 4px;max-width:60ch}
.acd-delform input[type=password]{max-width:420px}
.ac .acd-delform button.go{display:block;width:auto;padding:10px 22px;margin-top:14px;background:color-mix(in srgb,#d93025 85%,#000);color:#fff}
:root[data-theme="dark"] .ac .acd-delform button.go{background:#c93c34;color:#fff}
.ac .acd-delform button.go:hover{background:color-mix(in srgb,#d93025 70%,#000)}
.acd-disc{margin:14px 0 0;background:var(--seg-track);border-radius:var(--r2)}
.acd-disc[hidden]{display:none}
.acd-disc > summary{position:relative;display:flex;flex-wrap:wrap;align-items:center;gap:2px 16px;min-height:56px;box-sizing:border-box;padding:12px 50px 12px 18px;
  cursor:pointer;list-style:none;border-radius:var(--r2)}
.acd-disc > summary::-webkit-details-marker{display:none}
.acd-disc > summary::after{content:'';position:absolute;inset-inline-end:22px;top:50%;width:9px;height:9px;border-inline-end:2px solid var(--ink-3);border-bottom:2px solid var(--ink-3);transform:translateY(-70%) rotate(45deg)}
.acd-disc[open] > summary::after{transform:translateY(-25%) rotate(-135deg)}
.acd-disc > summary:hover .acd-disc-t{color:var(--study-ink)}
.acd-disc > summary:focus-visible{outline:2px solid var(--study-ink);outline-offset:2px}
.acd-disc-t{font-weight:700;font-size:16px;color:var(--ink)}
.acd-disc-s{margin-inline-start:auto;font-size:14px;color:var(--ink-3);font-variant-numeric:tabular-nums}
.acd-disc-b{padding:0 18px 14px}
.acd-grp + .acd-grp{margin-top:12px}
.acd-sec .acd-grp h3{border-top:0;padding-top:0;margin:4px 0 2px;font-size:13.5px;color:var(--ink-3)}
.acd-items{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 28px}
.acd-items > li{display:flex;align-items:center;gap:12px;min-height:48px;min-width:0}
.acd-item{min-width:0;flex:1 1 auto}
.acd-item .t{display:block;font-weight:600;color:var(--ink)}
.acd-item a.t{text-decoration:none}
.acd-item a.t:hover{color:var(--study-ink);text-decoration:underline}
.acd-item .d{display:block;font-size:13px;color:var(--ink-3)}
.acd-items .linkdel{flex:none;border:0;background:none;font:inherit;font-size:14px;font-weight:700;color:color-mix(in srgb,#d93025 78%,var(--text));min-height:44px;padding:0 4px;cursor:pointer}
.acd-items .linkdel:hover{text-decoration:underline}
.acd-items .linkdel:disabled{opacity:.5;cursor:progress}
/* Preferences: the language dropdown, its heading the label */
.acd-lang{max-width:280px}

/* Coming up inside Overview: no rules (brainlag.css rules the list elsewhere); each item a tinted row */
.acd-sec .cu.cu-acc{margin-top:30px;padding-top:0;border-top:0}
.acd-sec .cu.cu-acc .cu-list{display:grid;gap:8px}
.acd-sec .cu.cu-acc .cu-list a,.acd-sec .cu.cu-acc .cu-list li:last-child a{border-bottom:0;padding:12px 16px;background:var(--seg-track);border-radius:var(--r2)}
.acd-sec .cu.cu-acc h2{font-size:16.5px;margin:0 0 6px}

@media (max-width:900px){
  .acd{grid-template-columns:minmax(0,1fr);gap:0}
  .acd-nav{display:none}
  .acd-jump{display:block}
  .acd-sec{scroll-margin-top:124px}
}
@media (max-width:700px){
  .acd-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .acd-stats > .acd-stat:last-child:nth-child(odd){grid-column:1 / -1}   /* an odd count: the last figure takes the full row */
  .acd-stats-sm{grid-template-columns:repeat(2,minmax(0,1fr))}
  .acd-timer{grid-template-columns:1fr 1fr}
  .acd-split,.acd-row2{grid-template-columns:minmax(0,1fr)}
  .acd-kv{grid-template-columns:minmax(0,1fr)}
  .acd-kv dd{padding-top:0}
  .acd-items,.acd-acts3{grid-template-columns:minmax(0,1fr)}
  .acd-disc-s{margin-inline-start:0;flex-basis:100%}
}
@media (max-width:560px){
  .acd-sec{padding:22px 18px;border-radius:var(--r2)}
  .acd-head{grid-template-columns:48px minmax(0,1fr) auto;column-gap:12px}
  .acd-head .avatar{width:48px;height:48px;font-size:21px}
  .acd-out{width:44px;padding:0;margin:0 -8px 0 0;justify-content:center}   /* icon only; the label stays for screen readers */
  .acd-out-t{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .acd-head .acd-title{font-size:24px}
  .acd-big{font-size:26px}
  .acd-table .w{display:none}
}
@media (prefers-reduced-motion:reduce){.acd-bar > span{transition:none}}
/* account.php styles every .ac label as a block with a top margin; the dashboard's own controls lay out themselves */
.ac .acd-check,.ac .acd-tog{display:flex;margin:0;font-weight:500;font-size:15px}
.ac .acd-sec label:not(.acd-check):not(.acd-tog){margin:0}
.ac .acd-pw label{margin:14px 0 6px !important}

/* Profile picture: the drawn defaults, the uploaded photo and the in-page crop */
.acd-head .avatar{overflow:hidden}
.acd-head .avatar img{width:100%;height:100%;display:block;object-fit:cover}
.acd-pics{display:grid;grid-template-columns:repeat(var(--pc,4),var(--ps,64px));gap:8px 6px;margin:4px 0 0}   /* 28 pictures: 4, 7 or 14 a row, so no row is left half empty */
@media (min-width:560px){.acd-pics{--pc:7}}@media (min-width:1280px){.acd-pics{--pc:14;--ps:55px;column-gap:4px}.acd-pics .acd-pic{width:55px;height:55px}.acd-pics .acd-pic img,.acd-pics .acd-pic-ini{width:47px;height:47px}}
.acd-pic{width:64px;height:64px;padding:0;border:3px solid transparent;border-radius:50%;background:none;cursor:pointer;display:grid;place-items:center;overflow:hidden}
.acd-pic[hidden]{display:none}
.acd-pic img{width:56px;height:56px;border-radius:50%;display:block;object-fit:cover}
.acd-pic:hover{border-color:var(--rule-2)}
.acd-pic[aria-checked="true"]{border-color:var(--study)}
.acd-pic:focus-visible{outline:2px solid var(--study-ink);outline-offset:2px}
.acd-pic-ini{width:56px;height:56px;border-radius:50%;display:grid;place-items:center;background:var(--blue);color:#fff;font:700 24px/1 var(--f-display);text-transform:uppercase}
.acd-crop{display:flex;flex-wrap:wrap;gap:18px;align-items:center;margin:16px 0 0}
.acd-crop[hidden]{display:none}
.acd-crop-box{width:240px;height:240px;border-radius:50%;overflow:hidden;background:var(--sunk);touch-action:none;cursor:grab;box-shadow:0 0 0 3px var(--study)}
.acd-crop-box:active{cursor:grabbing}
.acd-crop-box:focus-visible{outline:3px solid var(--study-ink);outline-offset:4px}
.acd-crop-box canvas{width:100%;height:100%;display:block}
.acd-crop-side{flex:1 1 200px;min-width:0}
.acd-crop-side input[type=range]{width:100%;accent-color:var(--study);min-height:44px}
.ac .acd-sec h3 > label{display:inline;font:inherit;color:inherit;margin:0}
/* Overview: the streak and Sparks side by side, compact; flashcards due only as a short action */
/* Overview stats: a strip of compact stats, each icon and number then its label, on one tinted row (bl-sparks.js adds
   Sparks with the same dt/dd markup, so it takes the same shape without a change to that file) */
.acd-stats.acd-stats-ov{display:flex;flex-wrap:wrap;gap:8px}
.acd-stats-ov > .acd-stat{flex:0 0 auto;display:grid;grid-template-columns:auto auto;align-items:center;column-gap:10px;padding:8px 16px 8px 12px;min-height:56px;box-sizing:border-box}
.acd-stats-ov > .acd-stat > dd{display:contents}
.acd-stats-ov .acd-big{grid-column:1;grid-row:1 / span 2;font-size:24px;gap:6px}
.acd-stats-ov .acd-big img{width:22px;height:22px}
.acd-stats-ov .acd-flame{font-size:24px}
.acd-stats-ov dt{grid-column:2;grid-row:1;margin:0;font-size:14px;color:var(--ink);font-weight:700;align-self:end;white-space:nowrap}
.acd-stats-ov small{grid-column:2;grid-row:2;margin:0;font-size:12.5px;align-self:start;white-space:nowrap}
.acd-stats-ov > .acd-stat:not(:has(small)) > dt{grid-row:1 / span 2;align-self:center}
.acd-due{margin:12px 0 0;display:flex;align-items:center;gap:4px 12px;flex-wrap:wrap;color:var(--ink)}
.acd-sec .acd-due .tlink{min-height:44px}
.acd-sec .acd-due[hidden]{display:none}
/* Header: sync is quiet, a status and a small refresh button; Sign out is the only button */
.acd-head .syncline{display:flex;align-items:center;gap:6px}
.acd-sync{display:inline-grid;place-items:center;width:32px;height:32px;margin:-6px 0;padding:0;border:0;border-radius:50%;background:none;color:var(--ink-3);cursor:pointer}
.acd-sync:hover{color:var(--study-ink);background:var(--seg-track)}
.acd-sync:focus-visible{outline:2px solid var(--study-ink);outline-offset:1px}
.acd-sync[aria-busy="true"] svg{animation:acd-spin .8s linear infinite}
@keyframes acd-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.acd-sync[aria-busy="true"] svg{animation:none}.acd-sync[aria-busy="true"]{opacity:.5}}
@media (pointer:coarse){.acd-sync{width:44px;height:44px;margin:-12px -6px}}
/* Classes and teachers: a quiet row at the foot of the page */
.acd-foot{margin:4px 0 0;padding:0 4px}
/* Course rows: compact (title, lessons and bar on the left), a real button on the right; two columns on wide screens */
.acd-rows > li .acd-bar{grid-column:auto;margin:8px 0 0;height:6px}
.acd-rows > li{padding:12px 14px 12px 16px;min-height:0}
@media (min-width:1100px){#progCourses{grid-template-columns:repeat(2,minmax(0,1fr))}
  #progCourses > li:last-child:nth-child(odd){grid-column:1 / -1}}   /* an odd last card takes the full row, never alone */
.acd-sec .acd-btn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 18px;border-radius:10px;
  font-weight:700;font-size:15px;text-decoration:none;white-space:nowrap;background:#0a7f8a;color:#fff;border:2px solid #0a7f8a;box-sizing:border-box}
.acd-sec .acd-btn:hover{background:#086b75;border-color:#086b75;color:#fff}
.acd-sec .acd-btn:focus-visible{outline:2px solid var(--study-ink);outline-offset:2px}
.acd-sec .acd-btn-alt{background:transparent;color:var(--study-ink);border-color:color-mix(in srgb,#0a7f8a 55%,transparent)}
.acd-sec .acd-btn-alt:hover{background:color-mix(in srgb,#0a7f8a 10%,transparent);color:var(--study-ink);border-color:#0a7f8a}
:root[data-theme="dark"] .acd-sec .acd-btn-alt{border-color:color-mix(in srgb,var(--study) 60%,transparent)}
.acd-chip{display:inline-block;margin-inline-start:8px;padding:2px 7px;border-radius:var(--chip);background:var(--surface);color:var(--ink-3);font-size:12px;font-weight:700;vertical-align:2px}
/* Goals: the select is as wide as its content needs */
.acd-sec .acd-inline .select{width:auto;min-width:200px;max-width:100%}
/* Plan: the top plan, its source once, the rest folded */
.acd-plan-top{font-weight:700;color:var(--ink)}
.acd-plan-note{display:block;color:var(--ink-3);font-size:14px;margin-top:1px}
.acd-incl{margin-top:6px}
.acd-incl > summary{display:inline-flex;align-items:center;min-height:36px;cursor:pointer;color:var(--study-ink);font-weight:700;font-size:14px}
.acd-incl > summary:focus-visible{outline:2px solid var(--study-ink);outline-offset:2px;border-radius:6px}
.acd-incl ul{margin:4px 0 0;padding-inline-start:18px;color:var(--ink-2);font-size:14.5px;line-height:1.6}
.ac .acd-manage{margin-top:10px;display:block}
/* Redeem: the button matches the input's height, with room inside */
.ac #redeemForm .go{min-height:46px;height:46px;padding:0 22px;margin:0;white-space:nowrap}
/* Your data: two action cards; the restore preview and its destructive button */
.acd-acts2{grid-template-columns:repeat(2,minmax(0,1fr))}
.acd-rsprev{margin:14px 0 0;padding:14px 16px;border-radius:var(--r2);background:var(--surface)}
.acd-rsprev-h{font-weight:700;color:var(--ink);margin:0 0 6px}
.acd-rslist{list-style:none;margin:0 0 10px;padding:0;display:grid;gap:4px}
.acd-rslist li{display:flex;flex-wrap:wrap;gap:2px 10px;align-items:baseline}
.acd-rslist .t{font-weight:600;color:var(--ink)}
.acd-rslist .d{font-size:13.5px;color:var(--ink-3)}
.acd-rslist li.over .d{color:color-mix(in srgb,#d93025 78%,var(--text));font-weight:600}
.acd-sec .acd-btn-danger{background:color-mix(in srgb,#d93025 85%,#000);border-color:color-mix(in srgb,#d93025 85%,#000)}
.acd-sec .acd-btn-danger:hover{background:color-mix(in srgb,#d93025 70%,#000);border-color:color-mix(in srgb,#d93025 70%,#000)}
:root[data-theme="dark"] .acd-sec .acd-btn-danger{background:#c93c34;border-color:#c93c34}
.acd-rsprev .acd-btns{margin-top:10px}
.acd-undo{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin:12px 0 0;color:var(--ink-2)}
#dataRestore .acd-disc-b > .quiet{margin-top:2px}
@media (max-width:700px){.acd-acts2{grid-template-columns:minmax(0,1fr)}.acd-stats-ov > .acd-stat{flex:1 1 140px}
  .acd-rows .t{font-size:15.5px;text-wrap:balance}.acd-sec .acd-btn{padding:0 14px}}
/* Flashcards: decks as one line each, under the stat strip */
.acd-decks{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:4px}
.acd-decks[hidden]{display:none}
.acd-decks li{display:flex;flex-wrap:wrap;gap:2px 12px;align-items:baseline;padding:2px 0}
.acd-decks .t{font-weight:700;color:var(--ink)}
.acd-decks .d{color:var(--ink-3);font-size:14px}
/* Revision topics on a phone: the course name gets the room, the count headings wrap */
@media (max-width:560px){#ragTable th{white-space:normal;font-size:12px;line-height:1.25}#ragTable td:first-child{min-width:9.5em}#ragTable th,#ragTable td{padding-inline-end:8px}}
.acd-stats > .acd-stat[hidden]{display:none}
/* Your free study pack: the pack's cover beside a short line, the choice and one button. A tinted panel, no rules. */
.acd-freepack{display:grid;grid-template-columns:120px minmax(0,1fr);gap:20px;align-items:start;margin:4px 0 18px;padding:18px 20px;border-radius:var(--r2);background:var(--study-tint)}
.acd-freepack[hidden]{display:none}
.acd-freepack:focus{outline:none}
/* The cover and the text are one height: the cover's top meets the heading's cap height, its foot the last button's
   (the text column is held at the cover's height and its controls sit at the bottom). A taller column (asking for
   the confirmation link) keeps both tops aligned. Below 480 px: the cover centred above, the text under it. */
.fp-art{padding-top:5px}
.fp-art img{display:block;width:120px;height:170px;object-fit:cover;border-radius:8px;box-shadow:0 4px 14px rgba(var(--ink-rgb),.14)}
.fp-body{display:flex;flex-direction:column;min-height:175px;min-width:0}
.acd-sec .acd-freepack h3{margin:0 0 4px;font-size:17px;color:var(--ink)}
.acd-freepack .sub{margin:0 0 auto;padding-bottom:12px;color:var(--ink-2);text-wrap:balance}
/* select, then the main button, then (when asked) the confirmation link: one width, 12 px apart */
.fp-form,.fp-confirm{width:100%;max-width:420px}
.fp-form{display:grid;gap:12px}
.fp-form[hidden],.fp-confirm[hidden]{display:none}
.acd-sec .fp-form .select{width:100%;min-width:0;background:var(--surface)}
.fp-form button,.fp-confirm button{width:100%;justify-content:center;margin:0}
.fp-form button[disabled]{opacity:.55;cursor:not-allowed}
.acd-freepack .fp-confirm{margin:12px 0 0}
.fp-confirm #fpDev:empty{display:none}
.acd-freepack .acd-links{margin:12px 0 0}
.acd-freepack .msg{margin:12px 0 0}
@media (max-width:479px){
  .acd-freepack{grid-template-columns:minmax(0,1fr);gap:16px;padding:18px 16px}
  .fp-art{justify-self:center;padding-top:0}
  .fp-art:empty{display:none}
  .fp-body{min-height:0}
  .fp-form,.fp-confirm{max-width:none}
}
.fp-confirm{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin:10px 0 0}
.ac .fp-confirm .quiet{background:var(--surface)}
/* An email address breaks at the <wbr> after @ and . (bl-account.js, account.php); mid-word only if one part alone
   cannot fit the line, rather than running off the page */
.acd-head .email,#secEmail,.ac .sub strong{overflow-wrap:break-word;min-width:0}
.acd-head .email.em-long,#secEmail.em-long{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.acd-head .syncline > span{text-wrap:balance}   /* "Not synced on this device yet" never leaves one word alone */
/* Weekly summary for a parent (dash.php #ppBox, bl-parent.js): the state line, the invite row, what is shared */
.acd-pp #ppState{margin:12px 0 0;padding:12px 16px;background:var(--seg-track);border-radius:var(--r2);color:var(--ink);overflow-wrap:anywhere}
.acd-pp #ppForm{margin-top:12px}
.ac .acd-pp .acd-copy .go{padding:10px 20px}
.acd-pp .acd-btns{margin-top:10px}
.acd-pp .msg{margin-top:10px}
.acd-pp-list{margin:0 0 10px;padding-inline-start:20px;color:var(--ink-2);line-height:1.6}
.acd-pp .acd-disc-b p{margin:0 0 8px}
@media (max-width:480px){.acd-pp .acd-copy{flex-wrap:wrap}.acd-pp .acd-copy .go{width:100%}}
