/* Swedish for Foreigners, look B (the study notebook). Implemented from design/design-spec.md and design/mockup-src/mockup.css.
   Fonts: Noto Serif and Noto Sans Mono, self-hosted in /fonts/ when the files are present (see fonts.css); otherwise the fallbacks. */
:root{
  --paper:#FAF7F0; --sheet:#FFFFFF; --pen:#1F3C88; --graph:#2A2A2A; --margin:#D2553F; --margin-text:#B4432E;
  --marker:#FCE58A; --rule:#CFDBEA; --muted:#6B6B66; --line:#E3E0D6;
  --step:1.75rem; --gutter:2.5rem; --margin-x:1.75rem;
  --f-text:"Noto Serif",Georgia,serif; --f-label:"Noto Sans Mono",Consolas,monospace;
  --focus:3px solid var(--pen);
  --sun:none; --moon:block;
  color-scheme:light;
}
/* 2026-11-30 (hers: a dark mode; direction approved on design/dark-mode/sample.html): the same notebook at night, warm dark
   paper, the red margin, faint ruled lines, a lighter pen, the marker still yellow. The two blocks below hold the same values:
   the first follows the device, the second the reader's own choice. Screen only, so printing stays light. check.mjs compares
   them and measures the contrast. */
@media screen and (prefers-color-scheme:dark){
  :root:not([data-theme=light]){
    --paper:#1C1B18; --sheet:#262420; --pen:#A3BCF7; --graph:#EAE6DB; --margin:#C25B49; --margin-text:#F2977F;
    --marker:#806200; --rule:#2C384C; --muted:#ABA89D; --line:#3B382F;
    --sun:block; --moon:none; --hw-gap:var(--graph);
    color-scheme:dark;
  }
}
@media screen{
  :root[data-theme=dark]{
    --paper:#1C1B18; --sheet:#262420; --pen:#A3BCF7; --graph:#EAE6DB; --margin:#C25B49; --margin-text:#F2977F;
    --marker:#806200; --rule:#2C384C; --muted:#ABA89D; --line:#3B382F;
    --sun:block; --moon:none; --hw-gap:var(--graph);
    color-scheme:dark;
  }
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{margin:0;background:var(--paper);color:var(--graph)}
body.teacher{background:var(--sheet)}
[hidden]{display:none!important}

.site{background:var(--paper);color:var(--graph);font:1rem/var(--step) var(--f-text);position:relative;min-height:100vh;display:flex;flex-direction:column}
.site.teacher{background:var(--sheet)}
.site .wrap{flex:1}
.site a{color:var(--pen)}
.site a:focus-visible,.site summary:focus-visible,.site input:focus-visible,.site textarea:focus-visible,.site button:focus-visible{outline:var(--focus);outline-offset:2px;border-radius:2px}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
/* hidden by its own height, so a wrapped skip link at large text leaves no strip at the top (probe R6) */
.skip{position:absolute;inset-inline-start:.5rem;top:0;transform:translateY(calc(-100% - 2px));background:var(--pen);color:var(--paper)!important;padding:.25rem .75rem;z-index:5;font:600 .875rem/1.5 var(--f-label)}
.skip:focus{top:.5rem;transform:none}
/* a missing interface word: visible on purpose, so it can never pass unnoticed */
.missing-label{font:600 .75rem/1 var(--f-label);color:#6B4E00;background:repeating-linear-gradient(135deg,#FFF6CC 0 6px,#FBEFB8 6px 12px);border:1px dashed #A8892A;padding:.15rem .35rem;border-radius:3px;white-space:nowrap}

/* header */
.bar{display:flex;flex-wrap:wrap;gap:.25rem 1rem;align-items:center;justify-content:space-between;padding:.625rem 1rem;border-bottom:2px solid var(--graph);background:inherit;position:relative;z-index:1}
.brand{display:flex;gap:.5rem;align-items:center;text-decoration:none;color:var(--graph)!important;min-width:0;max-width:100%}
.brand svg{flex:none}
.brand .ic{width:60px;height:60px} /* in px: the mark stays this size when the text is enlarged */
.wm{font:600 1.875rem/1.2 var(--f-text);position:relative;display:inline-block;color:var(--graph);min-width:0;overflow-wrap:break-word} /* wraps at large text sizes (probe H1) */
.wm .u{position:absolute;inset-inline-start:-2%;width:104%;bottom:-.3em;height:.35em}
.wm .u path{stroke:var(--pen)}
/* the light / dark button, beside the language menu; in px, so enlarged text does not make it crowd the header */
.themebtn{display:none;align-items:center;justify-content:center;flex:none;width:44px;height:44px;margin:-6px -8px;padding:0;background:none;border:0;color:var(--pen);cursor:pointer}
:root[data-switch] .themebtn{display:inline-flex}
.site .themebtn:focus-visible{outline-offset:-4px}
.themebtn .sun{display:var(--sun)}
.themebtn .moon{display:var(--moon)}
body.door .themebtn{margin-inline-start:auto}
body.door .brand{flex:1 1 0}
/* the language menu shows the short code (PT, EN) below a wide computer screen, so the button has its room (probe dark B1, M3) */
.langs .short{display:none}
@media (max-width:66em){.langs .cur{display:none}.langs .short{display:inline}.langs summary:hover .short{text-decoration:underline}}
.bar nav{display:flex;gap:0 1rem;flex-wrap:wrap}
.bar nav a{font:600 .8125rem/2rem var(--f-label);text-decoration:none;min-height:2rem;display:inline-block}
.bar nav a[aria-current=page]{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:5px}
.bar nav a:hover{text-decoration:underline}
.bar nav .off{font:600 .8125rem/2rem var(--f-label);min-height:2rem;display:inline-block;color:var(--muted);cursor:default} /* a page switched off for now */
.tlink.off{color:var(--muted)}
.ways .off{display:block;border:2px dashed var(--line);border-radius:4px;padding:.75rem 1rem;color:var(--muted);line-height:1.4;cursor:default}
/* the language menu */
.langs{position:relative}
.langs summary{display:inline-flex;align-items:center;gap:.375rem;min-height:2rem;cursor:pointer;list-style:none;color:var(--pen);font:600 .8125rem/1.5 var(--f-label)}
.langs summary::-webkit-details-marker{display:none}
.langs summary:hover .cur{text-decoration:underline}
.langs .chev{width:.4rem;height:.4rem;border:solid currentColor;border-width:0 2px 2px 0;transform:translateY(-.1rem) rotate(45deg)}
.langs[open] .chev{transform:translateY(.1rem) rotate(225deg)}
.langs ul{position:absolute;inset-inline-end:0;top:100%;z-index:5;min-width:13rem;margin:.25rem 0 0;padding:.25rem 0;list-style:none;background:var(--sheet);border:2px solid var(--graph);border-radius:4px}
.langs li>*{display:block;padding:.375rem .75rem;font:600 .8125rem/1.5 var(--f-label)}
.langs li a{min-height:2rem;text-decoration:none}
.langs li a:hover{text-decoration:underline}
.langs li a[aria-current=true]{box-shadow:inset .25rem 0 0 var(--pen)}
.langs .soon{color:var(--muted)}
.bar nav{margin-inline-start:auto} /* the links and the menu sit together at the end */
/* anything pushed onto a second line goes to the end too, so the language menu always opens inside the screen (probe dark R1) */
header.bar{justify-content:flex-end} /* the header only: the practice progress bar is also called .bar, and must fill from the start */
.brand{margin-inline-end:auto}
@media (min-width:40.01em) and (max-width:66em){.bar{column-gap:.75rem}}
/* narrow screens: the menu sits beside the name, and the links take the line under it */
@media (max-width:40rem){.brand .ic{width:52px;height:52px}.wm{font-size:1.375rem;line-height:1.15;max-width:6.1em}body.student .brand{flex:1 1 0}body.student .bar nav{order:2;flex-basis:100%}.langs{order:1;position:static;margin-inline-start:auto}.langs ul{inset-inline:.5rem;min-width:0}body.student .themebtn{order:1;margin-inline-start:auto}:root[data-switch] body.student .themebtn+.langs{margin-inline-start:0}body.student .bar{column-gap:.5rem}}
/* large text on a phone: the name takes the whole first line, the button and the menu the next (probe dark B1) */
@media (max-width:15.9em){body.student .brand,body.door .brand{flex-basis:100%}.brand .wm{max-width:none}}

/* the margin line: inline-start, so it mirrors in right-to-left */
.wrap{position:relative}
.col{position:relative;padding-inline:var(--gutter) 1rem;padding-block:0 var(--step)}
.col::before{content:"";position:absolute;inset-block:0;inset-inline-start:var(--margin-x);width:1.5px;background:var(--margin);opacity:.85}
.teacher .col::before{display:none}
.teacher .col{padding-inline:1rem}
.side{padding-inline:var(--gutter) 1rem;padding-bottom:var(--step);position:relative}
.side::before{content:"";position:absolute;inset-block:0;inset-inline-start:var(--margin-x);width:1.5px;background:var(--margin);opacity:.85}
.teacher .side::before{display:none}

/* ruled blocks: each block draws its own lines from its own top */
.ruled{background-image:linear-gradient(to bottom,transparent calc(var(--step) - 1px),var(--rule) calc(var(--step) - 1px));background-size:100% var(--step);background-origin:padding-box}
.blk{padding-top:var(--step);margin:0}
.ruled *{line-height:var(--step)}
.ruled b,.ruled span,.ruled a,.ruled mark,.ruled s{line-height:1}
.ruled .ex{display:block;line-height:var(--step)}
/* 2026-11-29 (hers: "everything in the letters page is badly aligned in the lines"): inside a ruled block every row is a whole
   number of steps, so the letter row and what follows it sit between the lines; a page heading has no line struck through it */
.ruled .azjump{margin:0}
.ruled .azrow{row-gap:0}
.ruled .azrow a,.ruled .azrow .off{min-height:var(--step);line-height:var(--step)}
.ruled .azl{margin-top:var(--step)}
.ruled .azpn{margin-top:var(--step)!important}
.ruled .azpn a{min-height:var(--step);line-height:var(--step)}
.site:not(.teacher) .ruled h1{background:linear-gradient(var(--paper) calc(100% - 1px),transparent 0)}
.site p,.site h1,.site h2,.site h3,.site ul,.site ol,.site dl,.site dd,.site figure{margin:0}
.site ul,.site ol{padding:0;list-style:none}

.tags,.k,.lbl,.relk,.forms,.st,.tag,.n,.count{font-family:var(--f-label)}
.tags{font-size:.75rem;color:var(--margin-text)}
.tags a{color:var(--margin-text);display:inline-block;min-height:1.5rem;line-height:1.5rem;min-width:1.5rem} /* 24 px target (probe L8) */
.lbl{font-size:.75rem;font-weight:600;color:var(--margin-text)}
h1{font:700 2.125rem/calc(var(--step)*2) var(--f-text);color:var(--graph);overflow-wrap:break-word;hyphens:auto}
.ruled h1{line-height:calc(var(--step)*2)}
.hw{background:linear-gradient(transparent 58%,var(--marker) 58%,var(--marker) 90%,transparent 90%);-webkit-box-decoration-break:clone;box-decoration-break:clone;line-height:inherit!important}
.forms{font-size:.75rem;color:var(--muted)}
.forms b{color:var(--graph);font-weight:600}
.k{font-size:.75rem;color:var(--muted);margin-inline-end:.35rem}
.eqline{font-size:1.125rem;font-weight:700;color:var(--pen)}
.expl{font-size:.9375rem}
.sense{position:relative}
.sense+.sense{padding-top:var(--step)}
.teacher .sense{padding-inline-start:1.5rem}.teacher .num{inset-inline-start:0} /* the teacher sheet has no margin column: the number sits inside the page (probe R3) */
.num{position:absolute;inset-inline-start:calc(-1 * var(--gutter) + .25rem);width:1.25rem;text-align:center;font:400 .8125rem/var(--step) var(--f-label);color:var(--margin-text)}
.eq{font:700 1.125rem/var(--step) var(--f-text);color:var(--pen)}
.st{font-size:.75rem;color:var(--muted)}
.st b{color:var(--graph)}
.svs{font-size:1rem}
/* Swedish inside a Portuguese line: bold, as look B sets Swedish inside other lines (spec section 3c) */
.svin{font-weight:600}
.prompt .svin{font-weight:700} /* the prompt is already 600 */
.site mark{background:none;color:inherit;text-decoration:underline;text-decoration-color:var(--pen);text-decoration-thickness:2px;text-underline-offset:4px;text-decoration-skip-ink:none}
.pts{font-size:.9375rem;font-style:italic;color:var(--pen)}
details.var summary{font:.75rem/var(--step) var(--f-label);color:var(--muted);cursor:pointer;list-style:none}
details.var summary::before{content:"+ "}
details.var[open] summary::before{content:"\2212  "}
details.var summary::-webkit-details-marker{display:none}
.fam li,.rl li{font-size:1rem}
.g{font-size:.875rem;color:var(--muted);font-style:italic}
.fam b{font-weight:600}
/* a collocation's partners: the fixed word, then the words that swap in, side by side with slashes */
.swap{font-size:1rem}
.swap b{font-weight:600;margin-inline-end:.35rem}
.site .swap ul,.swap li{display:inline}
.swap li+li::before{content:"/ ";color:var(--muted)}
[dir=rtl] .swap{text-align:right}
.usage{font-size:.875rem}
.usage s{color:var(--muted);text-decoration-thickness:1px;margin-inline-start:.4rem}
.note p{font-size:.9375rem}
details.nb{padding-top:var(--step)}
details.nb summary{cursor:pointer;list-style:none}
details.nb summary::before{content:"+ "}
details.nb[open] summary::before{content:"\2212  "}
details.nb summary::-webkit-details-marker{display:none}
details.nb .page p{font:.8125rem/var(--step) var(--f-label);color:var(--graph)}
.actions{padding-bottom:0}
.btn{display:inline-flex;align-items:center;gap:.5rem;min-height:2.75rem;padding:0 1rem;font:600 .875rem/1 var(--f-label);color:var(--paper)!important;background:var(--pen);border-radius:3px;text-decoration:none;border:2px solid var(--pen);cursor:pointer}
.btn .n{font-weight:400;opacity:.85}
.btn.ghost{background:transparent;color:var(--pen)!important}
.relk{font-size:.75rem;color:var(--muted);padding-top:0}
.rl a{font-weight:600;text-decoration:none}
.rl a::before{content:"\2192  ";font-weight:400}
[dir=rtl] .rl a::before{content:"\2190  "}
.rl a:hover{text-decoration:underline}
.rl.big li{padding-bottom:var(--step)}
.ex{display:block;font-size:.9375rem}
.pend{color:var(--muted);font-weight:600}
.tag{font-size:.6875rem;color:var(--margin-text);border:1px solid currentColor;border-radius:2px;padding:0 .25rem}
.chips{display:flex;flex-wrap:wrap;gap:0 .5rem}
.chips a{font-weight:600;text-decoration:underline;text-decoration-color:var(--rule);text-decoration-thickness:2px;text-underline-offset:4px}
.chips .n,.sits .n,.th .n,.lbl .n{font-size:.6875rem;color:var(--muted);font-weight:400}
.tlink{font:600 .8125rem/var(--step) var(--f-label)}
.gap{color:var(--muted);font-weight:400;text-decoration:underline dashed var(--muted) 2px;text-underline-offset:6px}
.hw .gap{color:var(--hw-gap,var(--muted));text-decoration-color:currentColor} /* on the marker at night the gap needs the full ink (probe dark M1) */

/* search */
.search input{width:100%;font:1rem/1.5 var(--f-text);color:var(--graph);background:var(--sheet);border:0;border-bottom:2px solid var(--graph);border-radius:3px 3px 0 0;padding:.6rem .5rem;min-height:2.75rem}
.search input::placeholder{color:var(--muted);opacity:1}
.search.big input{min-height:3.25rem}
.tagline{font-size:1.0625rem;margin-bottom:.75rem!important}
h1.tagline{font:400 1.0625rem/var(--step) var(--f-text);hyphens:manual}
.count{font-size:.75rem;color:var(--muted);padding-top:var(--step)}
.results li{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 .75rem;border-bottom:1px solid var(--rule);padding:.5rem 0}
.results a{font-size:1.0625rem;text-decoration:none}
.results a,.results .g{overflow-wrap:break-word} /* only a word longer than the whole line may break (probe R1, H1) */
.results .g{grid-column:1}
.results .tags{grid-column:2;grid-row:1}
.empty p{margin-bottom:.5rem!important}
.pendhit .tag{margin-inline:.25rem}
.az li{border-bottom:1px solid var(--rule);padding:.375rem 0;line-height:1.5}
.az a{font-weight:600;text-decoration:none;font-size:1.0625rem}
/* a long list split A to Ö (builder, 2026-11-28; look to be confirmed by prisma): the letter line uses the tag style, each letter a 24 px target */
/* 2026-11-29, one letter per page: the same tag style; the row wraps (no sideways scroll at 320 px and 200 % text), each letter
   at least 28 px square, a letter with no entries greyed and no link, the current one on the marker */
.azjump{margin:.5rem 0}
.azrow{display:flex;flex-wrap:wrap;gap:.25rem;font-size:.875rem}
.azrow a,.azrow .off{display:inline-flex;align-items:center;justify-content:center;min-width:1.75rem;min-height:1.75rem;padding:0 .25rem;margin:0;line-height:1.2}
.azrow a{font-weight:600}
.azrow .off{color:var(--muted);font-weight:400}
.azrow a[aria-current]{background:var(--marker);color:var(--graph);text-decoration:none}
.azrow a[aria-current=page]{box-shadow:inset 0 -2px 0 var(--graph)}
.azsub .azrow{font-size:.8125rem}
.azpn{display:flex;flex-wrap:wrap;justify-content:space-between;gap:.5rem 1rem;margin-top:1rem!important}
.azpn a{font-size:.875rem;font-weight:600;min-height:1.75rem;line-height:1.75rem}
.azl{margin-top:1rem}
.az .g{display:block}

/* start page */
.th{font:700 1.375rem/var(--step) var(--f-text);margin-bottom:.25rem}
.sits li{display:block;border-top:1px solid var(--rule);padding:.375rem 0}
.sit{font:600 .875rem/1.5 var(--f-label);text-decoration:none}
/* 2026-11-29 (hers: more than the three examples must be clear): each category closes with a link to all of it */
.seeall{border-top:1px solid var(--rule)}
/* 2026-11-29 (QA): the trail, and targets of at least 28 px */
.crumbs{padding-top:.75rem;font:600 .75rem/1.75rem var(--f-label)}
.crumbs ol{display:flex;flex-wrap:wrap;gap:0 .5rem}
.crumbs li{min-width:0;overflow-wrap:anywhere}
.crumbs li:not(:last-child)::after{content:"\203A";margin-inline-start:.5rem;color:var(--muted)}
.crumbs a{display:inline-block;min-width:1.5rem;min-height:1.75rem}
.crumbs [aria-current]{color:var(--muted);font-weight:400}
.ruled .rl a{display:inline-block;line-height:var(--step)}
.sits .sit{display:inline-block;min-height:1.75rem;line-height:1.75rem}
.say a{display:inline-block;min-width:1.5rem;min-height:1.75rem;line-height:1.75rem}
.skip2 a,.toentry a{display:inline-block;min-height:1.75rem;line-height:1.75rem}
.az a,.chips a,.ruled .chips a,p#browse a{display:inline-block;min-height:1.75rem;line-height:1.75rem}
.btn>span{line-height:1.4;padding-block:.4rem}
.btn span span{font-weight:inherit}
.drill h1.lbl{line-height:var(--step)}
.alltags{border-top:0}
.doors{display:grid;gap:0 2rem}
@media (min-width:34rem){.doors{grid-template-columns:1fr 1fr}}
.door .th a{display:block;border:2px solid var(--graph);border-radius:4px;padding:.75rem 1rem;text-decoration:none;background:var(--sheet)}
.door .tl a{display:inline-block;min-height:1.75rem;line-height:1.75rem}
body.door .brand{cursor:default}
.taghit{padding:.375rem 0}
.soonmark{font:400 .6875rem/1.5 var(--f-label);color:var(--muted);font-style:normal}
.bar nav .soonmark{align-self:center;margin-inline-start:-.5rem}
@media (max-width:21.9em){.brand .wm{font-size:min(1.2rem,10.5vw)}} /* on the narrowest phones the name breaks between words, not inside one */
em.soonmark{display:block;margin-top:.25rem}
@media (max-width:40rem){body.student .bar nav .soonmark{display:none}}
@media (max-width:40rem){body.student .bar nav{column-gap:.625rem}}
.seeall a{display:inline-block;padding:.625rem 0;min-height:2.75rem;font:600 .875rem/1.5 var(--f-label);text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px}
.say{display:flex;flex-wrap:wrap;gap:.125rem 1rem;margin-top:.125rem}
.say a{font-size:1rem;text-decoration:underline;text-decoration-color:var(--pen);text-decoration-thickness:2px;text-underline-offset:4px;color:var(--graph)}
.ways{display:grid;gap:.75rem}
.ways a{display:block;border:2px solid var(--graph);border-radius:4px;padding:.75rem 1rem;text-decoration:none;background:var(--sheet);line-height:1.4}
.ways b{display:block;font:600 1rem/1.5 var(--f-label)}
.ways span{color:var(--muted);font-size:.875rem}
.side-ways{padding-top:var(--step)}
.foot{border-top:1px solid var(--line);padding:1rem;font-size:.8125rem;color:var(--muted);background:inherit;position:relative;line-height:1.5}
.foot .ai{display:block}

/* study page */
.study .prose{max-width:36rem}
.study h2{font:700 1.1875rem/1.4 var(--f-text);margin:1.75rem 0 .5rem}
.study p{font-size:1rem;line-height:1.7;margin:0 0 .75rem}
.study .text{background-color:var(--sheet);border:1px solid var(--line);padding:0 1rem var(--step);margin:1rem 0 1.25rem;border-radius:2px}
.study .text.ruled{background-image:linear-gradient(to bottom,transparent calc(var(--step) - 1px),var(--rule) calc(var(--step) - 1px))}
.study .text p,.study .text figcaption{line-height:var(--step);margin:0}
.study .text figcaption{padding-top:0;font:.75rem/var(--step) var(--f-label);color:var(--margin-text)}
.study .ttl{font-weight:700;padding-top:var(--step)}
.ul{color:var(--graph)!important;text-decoration:underline;text-decoration-color:var(--pen);text-decoration-thickness:2px;text-underline-offset:4px}

/* drill */
.drill{padding-top:1rem}
.dtop{display:flex;align-items:center;gap:.75rem;margin-bottom:1rem}
.drill>h1{margin-bottom:.5rem}
.prog,.cardprog{font:.75rem var(--f-label);color:var(--muted)}
.dtop .bar{flex:1;height:4px;background:var(--rule);border:0;padding:0;border-radius:2px}
.dtop .bar i{display:block;height:4px;background:var(--pen);border-radius:2px;width:0}
.card{background:var(--sheet);border:1px solid var(--line);border-radius:4px;padding:1rem;line-height:1.5;margin-bottom:1.25rem}
.drill.js .card{margin-bottom:0}
.card .k{display:block;margin-bottom:.25rem}
.prompt{font-size:1.25rem;line-height:1.4;font-weight:600;margin-bottom:.75rem!important;overflow-wrap:break-word} /* a long word at 200 % text breaks rather than leaving the screen (spec 5, long words) */
.cue{margin-bottom:.75rem!important}
.cue b{font-family:var(--f-text)}
.card textarea{width:100%;font:1.0625rem/1.5 var(--f-text);border:0;border-bottom:2px solid var(--graph);background:var(--paper);padding:.5rem .75rem;resize:vertical;margin-bottom:.75rem;color:var(--graph)}
.reveal>summary{list-style:none}
.reveal>summary::-webkit-details-marker{display:none}
.reveal[open]>summary{display:none}
.ans{border-top:2px solid var(--graph);padding-top:.75rem}
.ans .svs{font-size:1.125rem;line-height:1.8}
.ans .alt{font-size:1rem}
.marks{display:flex;gap:.75rem;flex-wrap:wrap;margin:1rem 0 .5rem!important}
.marks .btn{flex:1;justify-content:center}
.toentry{font:.8125rem var(--f-label)}
.skip2{margin-top:.75rem!important;font:.8125rem var(--f-label)}
.card .big{font-size:1.25rem;font-weight:600;margin-bottom:.5rem!important}
.score{font:.875rem var(--f-label);margin-bottom:1rem!important}
.endbtns{display:flex;gap:.75rem;flex-wrap:wrap}

/* teacher side: white sheet, no ruling, no margin line */
.teacher .tags{color:var(--margin-text)}
.tl li{border-top:1px solid var(--line);padding:.6rem 0;line-height:1.5}
.tl a{font-weight:700;font-size:1.0625rem;text-decoration:none}
.tl .g{display:block;font-style:normal}
.tparts{display:grid;grid-template-columns:1fr;gap:.25rem 1.5rem;border-top:2px solid var(--graph);padding-top:.75rem;margin-top:.5rem}
.tpart{display:contents}
.tparts .tlabel{font:600 .75rem/1.5 var(--f-label);color:var(--margin-text);padding-top:.5rem;margin:0}
.tparts .tbody{font-size:1rem;line-height:1.65;margin:0}
.tbody .src{margin:0 0 .5rem}
.dlg{font:1rem/1.75 var(--f-text);white-space:pre-wrap;margin:0;background:var(--paper);padding:.5rem .75rem;border-inline-start:3px solid var(--rule)}
.teacher article .head{padding-top:1.25rem}
.teacher h1{line-height:1.2;margin:.25rem 0 .5rem}

/* Swedish inside a right-to-left page keeps its own direction and aligns to the margin side */
[dir=rtl] [lang=sv][dir=ltr]:is(p,h1,h2,h3,li){text-align:right}

/* computer width: entry column plus a side column */
@media (min-width:64rem){
  .wrap{display:grid;grid-template-columns:minmax(0,40rem) minmax(0,20rem);gap:0 2.5rem;max-width:66rem;margin:0 auto;width:100%}
  .bar{padding-inline:max(1rem,calc((100% - 66rem)/2))}
  .foot{padding-inline:max(1rem,calc((100% - 66rem)/2))}
  .side::before{display:none}
  .side{padding-inline:0;border-inline-start:1px solid var(--line);padding-inline-start:1.5rem}
  h1{font-size:2.5rem}
  .site .ways{grid-template-columns:1fr}
  .teacher .wrap{grid-template-columns:minmax(0,46rem)}
  .teacher .tparts{grid-template-columns:13rem 1fr}
  .teacher .tparts .tlabel{padding-top:.2rem}
}

/* Large text on a phone, or a page zoomed to 200 % (probe R6). An em inside a media query follows the reader's text size,
   so these apply when the screen holds fewer than 20 or 22 lines' worth of letters; phones at normal text keep the layout above.
   Space is given back (margin column, header, top padding) so the search box stays on the first screen; no text is made smaller. */
@media (min-width:20em){h1,.th,.prompt,.cue,.ans .svs,.tbody,.eq{hyphens:none}} /* the break points (&shy;) in headings, drill prompts, teacher texts and sense headings are only for large text */
@media (max-width:11.9em){.head h1{font-size:min(2.125rem,18vw)}} /* the one exception to the rule below: on the narrowest screen at 200 % a page heading stops at the width of a short word (Friends) */
@media (max-width:19.9em){
  .site{--gutter:1.5rem;--margin-x:1.125rem}
  .col,.side{padding-inline-end:.5rem}
  .teacher .col{padding-inline:.5rem}
  .tparts{grid-template-columns:minmax(0,1fr)}
  .tparts .tbody{overflow-wrap:break-word} /* a very long word no longer widens the whole column on a 320 px screen */
  .num{inset-inline-start:calc(-1 * var(--gutter) + .0625rem);width:1rem}
  .bar{padding:.25rem .5rem;gap:.5rem 1rem} /* the row gap keeps the pen underline clear of the links */
  .bar nav a{line-height:1.5;min-height:24px}
  .blk.intro,.blk.idx{padding-top:.25rem}
  .blk.idx h1{line-height:1.2}
  h1.tagline{line-height:1.25;margin-bottom:.25rem!important}
  /* the box is as tall as its text needs, never under a 44 px touch target */
  .search input,.search.big input{min-height:44px;padding-block:.25rem}
  /* a search result: the name takes the whole line and the type goes under the meaning, so no word is squeezed (probe H1) */
  .results li{grid-template-columns:minmax(0,1fr)}
  .results .tags{grid-column:1;grid-row:auto}
  .card{padding-inline:.375rem}
}
/* where the search box is too narrow for its placeholder, the same words show above it as a label that wraps */
@media (max-width:21.9em){
  .search label.vh{position:static;display:block;width:auto;height:auto;overflow:visible;clip-path:none;white-space:normal;font:.75rem/1.25 var(--f-label);color:var(--muted);margin-bottom:.25rem}
  .search input::placeholder{color:transparent}
}

/* forced colours: the rules and the marker drop away, nothing is lost */
@media (forced-colors:active){
  .ruled,.study .text.ruled{background-image:none}
  .hw{background:none}
  .site mark{color:CanvasText;text-decoration-color:CanvasText} /* without this the marked word was black on black (probe dark H1) */
  .azrow a[aria-current],.langs li a[aria-current=true]{outline:2px solid CanvasText;outline-offset:-2px}
}
@media print{:root[data-switch] .themebtn{display:none}}
