/* ============================================================
   The six designs (Settings → My look → Design). Unlike the styles in styles-look.css they change the whole
   interface: paper, type, the shape of every box and, for three of them, a menu across the top instead of
   down the side. Everything stays in the same place inside the page. Set on <html data-style="…">.
     desk       Study desk      warm paper, thin top menu, serif headings, hairlines (the default)
     exercise   Exercise book   squared vở ô ly paper, red margin, handwriting, index tabs on the right
     editorial  Editorial       a printed class magazine: masthead menu, Fraunces headlines, rules, no rounded boxes
     riso       Riso poster     two inks (pink + navy) on cream, halftone dots, offset outlines
     timetable  Timetable       black Swiss grid, numbered top menu, huge type, one signal red
     postcards  Postcards       paper cards laid slightly turned on a dark green desk
   A student's own main colour (Settings) still replaces the design's accent.
   ============================================================ */

/* ---------- shared: a menu across the top (desk, editorial, timetable) on screens ≥ 900px ---------- */
@media (min-width: 900px) {
  :is([data-style="desk"], [data-style="editorial"], [data-style="timetable"]) .shell:not(.focus-mode) { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  :is([data-style="desk"], [data-style="editorial"], [data-style="timetable"]) .shell:not(.focus-mode) .sidebar {
    position: sticky; top: 0; z-index: 25; height: auto; flex-direction: row; align-items: center; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
    gap: 2px 20px; padding: 10px 36px; border-right: 0; scrollbar-width: none; }
  :is([data-style="desk"], [data-style="editorial"], [data-style="timetable"]) .shell:not(.focus-mode) .sidebar .brand { padding: 0; margin-right: 14px; flex: none; }
  :is([data-style="desk"], [data-style="editorial"], [data-style="timetable"]) .shell:not(.focus-mode) .sidebar .brand .avatar { width: 30px; height: 30px; font-size: .75rem; box-shadow: none; }
  :is([data-style="desk"], [data-style="editorial"], [data-style="timetable"]) .shell:not(.focus-mode) .sidebar .brand .me-name { font-size: .95rem; white-space: nowrap; }
  :is([data-style="desk"], [data-style="editorial"], [data-style="timetable"]) .shell:not(.focus-mode) .sidebar .brand small { display: none; }
  :is([data-style="desk"], [data-style="editorial"], [data-style="timetable"]) .shell:not(.focus-mode) .sidebar .brand-mark { width: 30px; height: 30px; border-radius: 6px; font-size: .8rem; }
  :is([data-style="desk"], [data-style="editorial"], [data-style="timetable"]) .shell:not(.focus-mode) .nav-sep { display: none; }
  :is([data-style="desk"], [data-style="editorial"], [data-style="timetable"]) .shell:not(.focus-mode) .sidebar .grow { flex: 1 0 8px; }
  :is([data-style="desk"], [data-style="editorial"], [data-style="timetable"]) .shell:not(.focus-mode) .nav-link { white-space: nowrap; flex: none; padding: 6px 2px; border-radius: 0; background: none; box-shadow: none; }
  :is([data-style="desk"], [data-style="editorial"], [data-style="timetable"]) .shell:not(.focus-mode) .nav-link .ico { display: none; }
  :is([data-style="desk"], [data-style="editorial"], [data-style="timetable"]) .shell:not(.focus-mode) .topbar { position: relative; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 0; padding: 14px 36px 0; }
  :is([data-style="desk"], [data-style="editorial"], [data-style="timetable"]) .shell:not(.focus-mode) .topbar .title { font-weight: 400; font-size: .85rem; color: var(--muted); }
  /* homework due soon: the top bar keeps its warning colours */
  :is([data-style="desk"], [data-style="editorial"], [data-style="timetable"]) body.hw-alert .shell:not(.focus-mode) .topbar { background: linear-gradient(90deg, var(--bar1), var(--bar2) 55%, var(--bar3)); color: var(--bar-ink); padding: 10px 36px; }
  :is([data-style="desk"], [data-style="editorial"], [data-style="timetable"]) body.hw-alert .shell:not(.focus-mode) .topbar .title { color: var(--bar-ink); font-weight: 600; }
}
/* every design draws its own page: no default glow on the page or menu */
:is([data-style="desk"], [data-style="exercise"], [data-style="editorial"], [data-style="riso"], [data-style="timetable"], [data-style="postcards"]) body:not(.has-bg) { background-image: none; }
:is([data-style="desk"], [data-style="exercise"], [data-style="editorial"], [data-style="riso"], [data-style="timetable"], [data-style="postcards"]) .sidebar { background: var(--bg); }
:is([data-style="desk"], [data-style="exercise"], [data-style="editorial"], [data-style="riso"], [data-style="timetable"], [data-style="postcards"]) .topbar { border-bottom-width: 1px; border-bottom-color: var(--border); }
:is([data-style="desk"], [data-style="exercise"], [data-style="editorial"], [data-style="riso"], [data-style="timetable"], [data-style="postcards"]) :is(.brand-mark, .avatar, .focus-hello) { background: var(--primary); }

/* ============================================================ 1. STUDY DESK */
:root[data-style="desk"] { --bg: #F3EEE6; --surface: #FBF8F3; --surface-2: #ECE5D9; --text: #3A342D; --muted: #6B6255; --border: #DDD4C6;
  --primary: #B86B4B; --primary-ink: #FFFFFF; --primary-soft: #F2E2D8; --accent: #6F8A6B; --radius: 6px; --radius-sm: 4px; --shadow: none;
  --font-head: "Lora", Georgia, serif; color-scheme: light; }
:root[data-style="desk"][data-theme="dark"] { --bg: #1E1B17; --surface: #26221D; --surface-2: #2F2A24; --text: #E9E2D6; --muted: #A69B8B; --border: #3B352D; --primary: #D9906E; --primary-ink: #1E1B17; --primary-soft: #3A2A21; color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root[data-style="desk"]:not([data-theme="light"]) { --bg: #1E1B17; --surface: #26221D; --surface-2: #2F2A24; --text: #E9E2D6; --muted: #A69B8B; --border: #3B352D; --primary: #D9906E; --primary-ink: #1E1B17; --primary-soft: #3A2A21; color-scheme: dark; } }
[data-style="desk"] body { background: var(--bg); color: var(--text); }
[data-style="desk"] :is(h1, h2, h3) { font-family: var(--font-head); font-weight: 500; letter-spacing: 0; }
[data-style="desk"] h1 { font-weight: 400; font-size: 2.1rem; }
[data-style="desk"] .content { padding-top: 30px; line-height: 1.65; }
[data-style="desk"] .page-head { padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
[data-style="desk"] .page-head p { font-weight: 300; }
[data-style="desk"] .sidebar { border-bottom: 1px solid var(--border); }
[data-style="desk"] .nav-link { color: color-mix(in srgb, var(--text) 78%, var(--muted)); font-size: 1.1rem; font-weight: 400; }
[data-style="desk"] .nav-link:hover { background: transparent; color: var(--text); box-shadow: inset 0 -2px 0 var(--border); }
[data-style="desk"] .nav-link.active, [data-style="desk"] .shell:not(.focus-mode) .nav-link.active { background: transparent; color: var(--text); box-shadow: inset 0 -2.5px 0 var(--primary); font-weight: 600; }
@media (max-width: 899px) { [data-style="desk"] .nav-link.active { box-shadow: inset 2px 0 0 var(--primary); } }
[data-style="desk"] :is(.card, .big-tile) { box-shadow: none; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
[data-style="desk"] .task-card:hover { border-color: var(--primary); }
[data-style="desk"] .skill-bar { width: 2px; }
[data-style="desk"] .btn { box-shadow: none; font-weight: 500; border-color: var(--border); }
[data-style="desk"] .btn.primary { border-color: transparent; }
[data-style="desk"] .pill { background: transparent !important; border: 1px solid color-mix(in srgb, currentColor 45%, transparent); border-radius: 3px; font-weight: 500; }
[data-style="desk"] .tabs a.active, [data-style="desk"] .tabs .active { border-bottom-width: 1.5px; }
[data-style="desk"] .tabs a { font-weight: 500; }
[data-style="desk"] .progress { height: 3px; border-radius: 0; } [data-style="desk"] .progress > i { border-radius: 0; }
[data-style="desk"] .stat .v { font-family: var(--font-head); font-weight: 500; }
[data-style="desk"] .bank-h { font-family: var(--font-head); font-weight: 500; }

/* ============================================================ 2. EXERCISE BOOK (vở ô ly) */
:root[data-style="exercise"] { --bg: #FBFAF4; --surface: #FFFEF8; --surface-2: #EEF2F9; --text: #23305E; --muted: #5E6A92; --border: #C9D6EA;
  --primary: #2B48A8; --primary-ink: #FFFFFF; --primary-soft: #E2E9F8; --accent: #C0392B; --radius: 4px; --radius-sm: 4px; --grid: #DCE6F4; --margin: #E8A3A3;
  --shadow: 2px 3px 0 rgba(35, 48, 94, .07); --font-head: "Patrick Hand", "Comic Sans MS", var(--font); color-scheme: light; }
:root[data-style="exercise"][data-theme="dark"] { --bg: #1E2B26; --surface: #24342E; --surface-2: #2C3E37; --text: #EEF1E6; --muted: #B4C2B8; --border: #3E544A; --grid: #2A3B34; --margin: #8A5A5A; --primary: #F2D16B; --primary-ink: #1E2B26; --primary-soft: #3A3A26; --accent: #FF8E7E; color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root[data-style="exercise"]:not([data-theme="light"]) { --bg: #1E2B26; --surface: #24342E; --surface-2: #2C3E37; --text: #EEF1E6; --muted: #B4C2B8; --border: #3E544A; --grid: #2A3B34; --margin: #8A5A5A; --primary: #F2D16B; --primary-ink: #1E2B26; --primary-soft: #3A3A26; --accent: #FF8E7E; color-scheme: dark; } }
[data-style="exercise"] body { background-color: var(--bg); color: var(--text);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px) !important; background-size: 22px 22px; background-attachment: fixed; }
[data-style="exercise"] .content { position: relative; padding-left: 58px; }
[data-style="exercise"] .content::before { content: ""; position: absolute; left: 34px; top: 0; bottom: 0; width: 2px; background: var(--margin); pointer-events: none; }
@media (max-width: 899px) { [data-style="exercise"] .content { padding-left: 30px; } [data-style="exercise"] .content::before { left: 14px; } }
[data-style="exercise"] :is(h1, h2, h3, .bank-h, .stat .v) { font-family: var(--font-head); font-weight: 400; letter-spacing: .01em; }
[data-style="exercise"] h1 { font-size: 2.3rem; }
[data-style="exercise"] h2 { font-size: 1.5rem; text-decoration: underline wavy var(--margin) 1.5px; text-underline-offset: 6px; }
[data-style="exercise"] .card h2, [data-style="exercise"] .card h3 { text-decoration: none; }
[data-style="exercise"] :is(.card, .big-tile) { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
[data-style="exercise"] .grid > :is(.card, .task-card):nth-child(3n+1) { transform: rotate(-.35deg); } [data-style="exercise"] .grid > :is(.card, .task-card):nth-child(3n+2) { transform: rotate(.3deg); }
[data-style="exercise"] .btn { font-family: var(--font-head); font-size: 1.05rem; font-weight: 400; border: 2px solid currentColor; border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px; }
[data-style="exercise"] .btn.primary { border-color: transparent; } [data-style="exercise"] .btn.ghost { border-color: transparent; }
[data-style="exercise"] .pill { font-family: var(--font-head); font-size: .92rem; font-weight: 400; background: transparent !important; border: 1.5px solid currentColor; border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px; }
[data-style="exercise"] .pill.ok { color: var(--accent); }
[data-style="exercise"] .input { border: 0; border-bottom: 2px solid var(--border); border-radius: 0; background: transparent; font-family: var(--font-head); font-size: 1.12rem; }
[data-style="exercise"] textarea.input { border: 1px solid var(--border); background: repeating-linear-gradient(transparent 0 27px, var(--grid) 27px 28px), var(--surface); line-height: 28px; }
[data-style="exercise"] .tabs { border-bottom: 2px solid var(--margin); gap: 4px; }
[data-style="exercise"] .tabs a { font-family: var(--font-head); font-size: 1.1rem; font-weight: 400; border-radius: 10px 10px 0 0; background: color-mix(in srgb, #FBE3A1 55%, var(--surface)); color: var(--text); }
[data-style="exercise"] .tabs a.active { background: var(--surface); box-shadow: inset 0 3px 0 var(--accent); }
[data-style="exercise"] .progress { border-radius: 0; height: 9px; border: 1.5px solid var(--text); background: transparent; }
[data-style="exercise"] .progress > i { border-radius: 0; background: repeating-linear-gradient(-45deg, var(--primary) 0 4px, transparent 4px 7px); }
/* the menu: coloured index tabs stuck to the right edge of the book */
@media (min-width: 900px) {
  [data-style="exercise"] .shell:not(.focus-mode) { grid-template-columns: 1fr 200px; }
  [data-style="exercise"] .shell:not(.focus-mode) .sidebar { order: 2; background: transparent; border: 0; padding: 22px 0 18px; }
  [data-style="exercise"] .shell:not(.focus-mode) .main { order: 1; }
}
[data-style="exercise"] .sidebar { background: transparent; border-right: 0; }
[data-style="exercise"] .brand { font-family: var(--font-head); font-weight: 400; font-size: 1.15rem; padding-left: 14px; }
[data-style="exercise"] .nav-link { font-family: var(--font-head); font-size: 1.12rem; font-weight: 400; color: #23305E; border-radius: 0 12px 12px 0; margin-right: 18px; padding: 7px 12px; background: var(--tab, #E4DED0); box-shadow: 2px 2px 0 rgba(0,0,0,.06); }
[data-style="exercise"] .nav-link .ico { opacity: .75; }
[data-style="exercise"] .nav-link:nth-of-type(8n+1) { --tab: #F7C9B8; } [data-style="exercise"] .nav-link:nth-of-type(8n+2) { --tab: #FBE3A1; }
[data-style="exercise"] .nav-link:nth-of-type(8n+3) { --tab: #C9E4C5; } [data-style="exercise"] .nav-link:nth-of-type(8n+4) { --tab: #BFD9EF; }
[data-style="exercise"] .nav-link:nth-of-type(8n+5) { --tab: #DCCDEB; } [data-style="exercise"] .nav-link:nth-of-type(8n+6) { --tab: #F3D0E0; }
[data-style="exercise"] .nav-link:nth-of-type(8n+7) { --tab: #E4DED0; } [data-style="exercise"] .nav-link:nth-of-type(8n+8) { --tab: #D2E8E6; }
[data-style="exercise"] .nav-link:hover { background: var(--tab, #E4DED0); filter: brightness(1.04); }
[data-style="exercise"] .nav-link.active { background: var(--tab, #E4DED0); color: #23305E; margin-right: 0; margin-left: -10px; font-size: 1.22rem; box-shadow: 3px 3px 0 rgba(0,0,0,.1); }
[data-style="exercise"] .nav-sep { font-family: var(--font-head); font-size: .95rem; text-transform: none; letter-spacing: 0; }

/* ============================================================ 3. EDITORIAL */
:root[data-style="editorial"] { --bg: #F4EFE6; --surface: #FBF8F1; --surface-2: #EBE4D6; --text: #1A1714; --muted: #6B6257; --border: #CFC5B4;
  --primary: #B4441E; --primary-ink: #FFFFFF; --primary-soft: #F3DED3; --accent: #1A1714; --radius: 0px; --radius-sm: 0px; --shadow: none;
  --font-head: "Fraunces", Georgia, serif; color-scheme: light; }
:root[data-style="editorial"][data-theme="dark"] { --bg: #171512; --surface: #1F1C18; --surface-2: #2A2620; --text: #EFE8DA; --muted: #A89E8E; --border: #3A342C; --primary: #E8784F; --primary-ink: #171512; --primary-soft: #3A2419; --accent: #EFE8DA; color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root[data-style="editorial"]:not([data-theme="light"]) { --bg: #171512; --surface: #1F1C18; --surface-2: #2A2620; --text: #EFE8DA; --muted: #A89E8E; --border: #3A342C; --primary: #E8784F; --primary-ink: #171512; --primary-soft: #3A2419; --accent: #EFE8DA; color-scheme: dark; } }
[data-style="editorial"] body { background: var(--bg); color: var(--text); }
[data-style="editorial"] :is(h1, h2, h3, .bank-h, .stat .v) { font-family: var(--font-head); letter-spacing: -.01em; }
[data-style="editorial"] h1 { font-size: 2.7rem; font-weight: 600; line-height: 1.02; letter-spacing: -.025em; }
[data-style="editorial"] h2 { font-weight: 600; font-size: 1.45rem; }
[data-style="editorial"] h3 { font-weight: 600; }
[data-style="editorial"] .page-head { border-bottom: 1px solid var(--text); padding-bottom: 14px; margin-bottom: 22px; }
[data-style="editorial"] .page-head p { font-family: var(--font-head); font-style: italic; font-size: 1.08rem; }
[data-style="editorial"] .sidebar { border-bottom: 3px double var(--text); }
[data-style="editorial"] .sidebar .brand { font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
[data-style="editorial"] .nav-link { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: var(--text); }
[data-style="editorial"] .nav-link:hover { background: transparent; color: var(--primary); }
[data-style="editorial"] .nav-link.active { background: transparent; color: var(--text); box-shadow: inset 0 -2px 0 var(--primary); }
@media (max-width: 899px) { [data-style="editorial"] .nav-link.active { box-shadow: inset 3px 0 0 var(--primary); } }
[data-style="editorial"] :is(.card, .big-tile) { box-shadow: none; border: 0; border-top: 2px solid var(--text); background: var(--surface); padding-top: 16px; }
[data-style="editorial"] .task-card:hover { border-top-color: var(--primary); background: var(--surface-2); }
[data-style="editorial"] .bank-group summary b { font-family: var(--font-head); font-size: 1.1rem; }
[data-style="editorial"] .btn { border-radius: 0; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; border: 1px solid var(--text); box-shadow: none; }
[data-style="editorial"] .btn.ghost { border-color: transparent; }
[data-style="editorial"] .btn.primary { background: var(--text); color: var(--bg); }
[data-style="editorial"] .pill { border-radius: 0; background: transparent !important; text-transform: uppercase; letter-spacing: .08em; font-size: .66rem; font-weight: 700; padding: 1px 0; border-bottom: 1px solid currentColor; }
[data-style="editorial"] .tabs { border-bottom: 1px solid var(--text); }
[data-style="editorial"] .tabs a { text-transform: uppercase; letter-spacing: .08em; font-size: .76rem; color: var(--muted); }
[data-style="editorial"] .tabs a.active { color: var(--text); border-bottom: 3px solid var(--primary); }
[data-style="editorial"] .input { border-radius: 0; border: 0; border-bottom: 1px solid var(--text); background: transparent; }
[data-style="editorial"] textarea.input { border: 1px solid var(--border); font-family: var(--font-head); font-size: 1.05rem; }
[data-style="editorial"] .progress { height: 2px; border-radius: 0; } [data-style="editorial"] .progress > i { border-radius: 0; background: var(--primary); }
[data-style="editorial"] .stat .v { font-weight: 800; font-size: 2.2rem; }
[data-style="editorial"] .skill-bar { display: none; }

/* ============================================================ 4. RISO POSTER */
:root[data-style="riso"] { --bg: #F6F1E7; --surface: #FBF7EF; --surface-2: #EFE6D6; --text: #1F2A6B; --muted: #4C5794; --border: #1F2A6B;
  --primary: #D42F66; --primary-ink: #FFFFFF; --primary-soft: #FFE0EA; --accent: #3A5BFF; --radius: 0px; --radius-sm: 0px; --ink2: #D42F66;
  --shadow: none; --font-head: "Space Grotesk", var(--font); color-scheme: light; }
:root[data-style="riso"][data-theme="dark"] { --bg: #141A45; --surface: #1A2257; --surface-2: #232C6A; --text: #F6F1E7; --muted: #C3C2E6; --border: #F6F1E7; --primary-soft: #3A2350; color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root[data-style="riso"]:not([data-theme="light"]) { --bg: #141A45; --surface: #1A2257; --surface-2: #232C6A; --text: #F6F1E7; --muted: #C3C2E6; --border: #F6F1E7; --primary-soft: #3A2350; color-scheme: dark; } }
[data-style="riso"] body { background-color: var(--bg); color: var(--text); font-family: var(--font-head);
  background-image: radial-gradient(color-mix(in srgb, var(--ink2) 28%, transparent) 1.2px, transparent 1.5px) !important; background-size: 9px 9px; background-attachment: fixed; }
[data-style="riso"] :is(h1, h2, h3) { font-family: var(--font-head); font-weight: 700; letter-spacing: -.02em; }
[data-style="riso"] h1 { font-size: 2.6rem; line-height: .98; text-shadow: 3px 3px 0 color-mix(in srgb, var(--ink2) 70%, transparent); }
[data-style="riso"] .sidebar { background: #1F2A6B; color: #F6F1E7; border-right: 0; }
[data-style="riso"] .sidebar .brand, [data-style="riso"] .sidebar .me-name { color: #F6F1E7; } [data-style="riso"] .sidebar .brand small { color: #FFB3C9; }
[data-style="riso"] .nav-link { color: #F6F1E7; border-radius: 0; border-bottom: 1px dashed rgba(246,241,231,.28); font-weight: 500; }
[data-style="riso"] .nav-link:hover { background: rgba(255,92,138,.18); }
[data-style="riso"] .nav-link.active { background: transparent; color: #FF8DAF; font-weight: 700; box-shadow: inset 4px 0 0 #FF5C8A; }
[data-style="riso"] .nav-sep { color: #FFB3C9; }
[data-style="riso"] .topbar { background: color-mix(in srgb, var(--bg) 92%, transparent); border-bottom: 2.5px solid var(--text); }
[data-style="riso"] :is(.card, .big-tile) { background: var(--surface); border: 2.5px solid var(--text); box-shadow: 7px 7px 0 color-mix(in srgb, var(--ink2) 80%, transparent); }
[data-style="riso"] .grid > :is(.card, .task-card):nth-child(even) { box-shadow: 7px 7px 0 color-mix(in srgb, var(--accent) 70%, transparent); }
[data-style="riso"] .task-card:hover { transform: translate(-2px, -2px); box-shadow: 10px 10px 0 var(--ink2); }
[data-style="riso"] .btn { border: 2px solid var(--text); border-radius: 0; font-weight: 700; box-shadow: 3px 3px 0 var(--text); }
[data-style="riso"] .btn:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--text); }
[data-style="riso"] .btn.ghost { border-color: transparent; box-shadow: none; }
[data-style="riso"] .btn.primary { background: var(--primary); color: var(--primary-ink); border-color: var(--text); }
[data-style="riso"] .pill { border-radius: 0; font-weight: 700; background: var(--primary) !important; color: var(--primary-ink) !important; }
[data-style="riso"] .pill:is(.listening, .reading, .writing, .speaking, .grammar, .vocabulary, .info) { background: var(--accent) !important; }
[data-style="riso"] .tabs { border-bottom: 2.5px solid var(--text); gap: 6px; }
[data-style="riso"] .tabs a { font-weight: 700; color: var(--text); border: 2px solid var(--text); border-bottom: 0; }
[data-style="riso"] .tabs a.active { background: var(--primary); color: var(--primary-ink); }
[data-style="riso"] .input { border: 2px solid var(--text); border-radius: 0; background: var(--surface); }
[data-style="riso"] .progress { border: 2px solid var(--text); border-radius: 0; height: 12px; background: var(--surface); }
[data-style="riso"] .progress > i { border-radius: 0; background: var(--accent); }
[data-style="riso"] .stat .v { font-family: var(--font-head); color: var(--accent); font-size: 2rem; }

/* ============================================================ 5. TIMETABLE (Swiss grid) */
:root[data-style="timetable"] { --bg: #FFFFFF; --surface: #FFFFFF; --surface-2: #F1F1F1; --text: #111111; --muted: #6E6E6E; --border: #111111;
  --primary: #E5322D; --primary-ink: #FFFFFF; --primary-soft: #FDE3E2; --accent: #111111; --radius: 0px; --radius-sm: 0px; --shadow: none;
  --font-head: "Archivo", var(--font); color-scheme: light; }
:root[data-style="timetable"][data-theme="dark"] { --bg: #0D0D0D; --surface: #0D0D0D; --surface-2: #1D1D1D; --text: #F2F2F2; --muted: #A0A0A0; --border: #F2F2F2; --primary: #FF4A44; --primary-ink: #0D0D0D; --primary-soft: #3A1312; --accent: #F2F2F2; color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root[data-style="timetable"]:not([data-theme="light"]) { --bg: #0D0D0D; --surface: #0D0D0D; --surface-2: #1D1D1D; --text: #F2F2F2; --muted: #A0A0A0; --border: #F2F2F2; --primary: #FF4A44; --primary-ink: #0D0D0D; --primary-soft: #3A1312; --accent: #F2F2F2; color-scheme: dark; } }
[data-style="timetable"] body { background: var(--bg); color: var(--text); font-family: var(--font-head); }
[data-style="timetable"] :is(h1, h2, h3, .stat .v, .bank-h) { font-family: var(--font-head); }
[data-style="timetable"] h1 { font-size: 3rem; font-weight: 900; letter-spacing: -.035em; line-height: .95; }
[data-style="timetable"] h2 { font-weight: 800; letter-spacing: -.01em; }
[data-style="timetable"] .page-head { border-bottom: 2px solid var(--text); padding-bottom: 14px; margin-bottom: 0; }
[data-style="timetable"] .page-head + * { margin-top: 18px; }
[data-style="timetable"] .sidebar { counter-reset: navno; border-bottom: 2px solid var(--text); border-right-width: 2px; border-right-color: var(--text); }
[data-style="timetable"] .sidebar .brand { font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; }
[data-style="timetable"] .nav-link { counter-increment: navno; font-weight: 600; font-size: .85rem; color: var(--text); border-radius: 0; }
[data-style="timetable"] .nav-link::before { content: counter(navno, decimal-leading-zero); font-size: .66rem; color: var(--muted); font-weight: 400; margin-right: 2px; }
[data-style="timetable"] .nav-link:last-child::before { content: none; }
[data-style="timetable"] .nav-link:hover { background: var(--surface-2); }
[data-style="timetable"] .nav-link.active, [data-style="timetable"] .shell:not(.focus-mode) .nav-link.active { background: var(--primary); color: var(--primary-ink); box-shadow: none; }
[data-style="timetable"] .nav-link.active::before { color: #FFD1CF; }
@media (min-width: 900px) { [data-style="timetable"] .shell:not(.focus-mode) .nav-link { padding: 8px 10px; } [data-style="timetable"] .shell:not(.focus-mode) .sidebar { gap: 0; padding: 0 0 0 24px; } [data-style="timetable"] .shell:not(.focus-mode) .nav-link { border-left: 1px solid var(--surface-2); } }
[data-style="timetable"] :is(.card, .big-tile) { border: 2px solid var(--text); box-shadow: none; }
[data-style="timetable"] .task-card:hover { background: var(--surface-2); border-color: var(--text); }
[data-style="timetable"] .btn { border: 2px solid var(--text); font-weight: 800; box-shadow: none; }
[data-style="timetable"] .btn.ghost { border-color: transparent; }
[data-style="timetable"] .btn.primary { border-color: var(--primary); }
[data-style="timetable"] .pill { border-radius: 0; background: transparent !important; border: 1.5px solid currentColor; text-transform: uppercase; font-size: .66rem; letter-spacing: .06em; font-weight: 800; }
[data-style="timetable"] .tabs { border-bottom: 2px solid var(--text); gap: 0; }
[data-style="timetable"] .tabs a { color: var(--text); border-right: 1px solid var(--surface-2); font-weight: 700; }
[data-style="timetable"] .tabs a.active { background: var(--text); color: var(--bg); border-bottom-color: var(--text); }
[data-style="timetable"] .input { border: 2px solid var(--text); }
[data-style="timetable"] .progress { height: 6px; border-radius: 0; background: var(--surface-2); } [data-style="timetable"] .progress > i { border-radius: 0; background: var(--primary); }
[data-style="timetable"] .stat .v { font-weight: 900; font-size: 2.6rem; letter-spacing: -.04em; }
[data-style="timetable"] .stat .l { text-transform: uppercase; letter-spacing: .08em; font-size: .68rem; color: var(--primary); }
[data-style="timetable"] .skill-bar { border-radius: 0; width: 6px; }

/* ============================================================ 6. POSTCARDS (always a green desk) */
:root[data-style="postcards"] { --bg: #2E4A3F; --surface: #FBF7EC; --surface-2: #EFE7D3; --text: #2B2A27; --muted: #6E675B; --border: #D9CFB8;
  --primary: #B4441E; --primary-ink: #FFFFFF; --primary-soft: #F4DCCB; --accent: #2E4A3F; --radius: 3px; --radius-sm: 3px;
  --shadow: 0 10px 24px rgba(0, 0, 0, .28); --font-head: "Fraunces", Georgia, serif; --desk-ink: #EDE6D3; --desk-muted: #B9CABF; color-scheme: light; }
[data-style="postcards"] body { background: var(--bg); color: var(--text); }
[data-style="postcards"] .sidebar { background: transparent; border-right: 1px solid rgba(237,230,211,.15); }
[data-style="postcards"] .sidebar :is(.brand, .me-name) { color: var(--desk-ink); font-family: var(--font-head); font-weight: 600; } [data-style="postcards"] .sidebar .brand small { color: var(--desk-muted); }
[data-style="postcards"] .nav-link { color: var(--desk-ink); border-radius: 6px; }
[data-style="postcards"] .nav-link:hover { background: rgba(237,230,211,.1); }
[data-style="postcards"] .nav-link.active { background: var(--desk-ink); color: var(--bg); box-shadow: none; }
[data-style="postcards"] .nav-sep { color: var(--desk-muted); }
[data-style="postcards"] .topbar { background: color-mix(in srgb, var(--bg) 90%, transparent); color: var(--desk-ink); border-bottom-color: rgba(237,230,211,.15); }
[data-style="postcards"] .bottom-nav { background: #24392F; } [data-style="postcards"] .bottom-nav a { color: var(--desk-muted); } [data-style="postcards"] .bottom-nav a.active { color: var(--desk-ink); }
/* the page is a sheet of writing paper lying on the desk; the boxes on it are postcards */
[data-style="postcards"] .content { background: #F1E9D6; box-shadow: 0 18px 40px rgba(0, 0, 0, .35); margin: 22px auto 34px; border-radius: 2px; width: calc(100% - 48px);
  background-image: repeating-linear-gradient(transparent 0 31px, rgba(46, 74, 63, .07) 31px 32px); }
@media (max-width: 899px) { [data-style="postcards"] .content { width: calc(100% - 16px); margin: 8px auto 90px; } }
[data-style="postcards"] .page-head { border-bottom: 1px dashed #B8AE97; padding-bottom: 12px; }
[data-style="postcards"] :is(h1, h2, h3, .bank-h) { font-family: var(--font-head); font-weight: 600; }
[data-style="postcards"] h1 { font-family: "Patrick Hand", var(--font-head); font-weight: 400; font-size: 2.4rem; }
[data-style="postcards"] :is(.card, .big-tile) { border: 0; box-shadow: var(--shadow); background: var(--surface); }
[data-style="postcards"] .grid > :is(.card, .task-card):nth-child(4n+1) { transform: rotate(-.8deg); }
[data-style="postcards"] .grid > :is(.card, .task-card):nth-child(4n+2) { transform: rotate(.9deg); background: #F4E3D3; }
[data-style="postcards"] .grid > :is(.card, .task-card):nth-child(4n+3) { transform: rotate(.4deg); background: #E2EBDD; }
[data-style="postcards"] .grid > :is(.card, .task-card):nth-child(4n+4) { transform: rotate(-.5deg); }
[data-style="postcards"] .task-card { transition: transform .15s; } [data-style="postcards"] .grid > .task-card:hover { transform: rotate(0) translateY(-3px); }
[data-style="postcards"] .btn { border-radius: 4px; }
[data-style="postcards"] .pill { border-radius: 3px; border: 1px dashed currentColor; background: transparent !important; }
[data-style="postcards"] .tabs { border-bottom: 1px dashed #B8AE97; }
[data-style="postcards"] .tabs a.active { color: var(--primary); }
[data-style="postcards"] .progress { background: rgba(0,0,0,.1); }

/* ---------- the "hello" banner on the home page, per design ---------- */
[data-style="desk"] .focus-hello { background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: none; border-radius: var(--radius); }
[data-style="desk"] .focus-hello h1, [data-style="desk"] .focus-hello h2 { color: var(--text); }
[data-style="desk"] .focus-hello .chip { background: transparent; border: 1px solid var(--border); color: var(--muted); }
[data-style="editorial"] .focus-hello { background: transparent; color: var(--text); box-shadow: none; border-radius: 0; border-top: 3px solid var(--text); border-bottom: 1px solid var(--text); padding: 14px 0; }
[data-style="editorial"] .focus-hello .chip { background: transparent; color: var(--text); border: 1px solid var(--text); border-radius: 0; }
[data-style="timetable"] .focus-hello { background: var(--text); color: var(--bg); box-shadow: none; border-radius: 0; }
[data-style="timetable"] .focus-hello .chip { border-radius: 0; }
[data-style="riso"] .focus-hello { border-radius: 0; box-shadow: 7px 7px 0 var(--accent); border: 2.5px solid var(--text); }
[data-style="exercise"] .focus-hello { border-radius: 4px; box-shadow: var(--shadow); transform: rotate(-.4deg); }
[data-style="exercise"] .focus-hello h1 { font-size: 2.2rem; }
[data-style="postcards"] .focus-hello { border-radius: 2px; box-shadow: var(--shadow); transform: rotate(-.6deg); background: var(--accent); }
/* the coloured tiles of the base look give way to each design's own boxes */
:is([data-style="desk"], [data-style="editorial"], [data-style="timetable"], [data-style="exercise"], [data-style="riso"], [data-style="postcards"]) .big-tile { background: var(--surface) !important; }

/* ---------- picker thumbnails ---------- */
.style-tile.design .style-demo { height: 54px; }
.sd-desk { background: #F3EEE6; } .sd-desk i { width: 50px; height: 3px; background: #B86B4B; } .sd-desk em { width: 34px; height: 22px; background: #FBF8F3; border: 1px solid #DDD4C6; }
.sd-exercise { background: linear-gradient(#DCE6F4 1px, transparent 1px) 0 0 / 9px 9px, linear-gradient(90deg, #DCE6F4 1px, transparent 1px) 0 0 / 9px 9px, #FBFAF4; }
.sd-exercise i { width: 34px; height: 18px; background: #F7C9B8; border-radius: 0 8px 8px 0; } .sd-exercise em { width: 34px; height: 18px; background: #BFD9EF; border-radius: 0 8px 8px 0; }
.sd-editorial { background: #F4EFE6; border-bottom: 3px double #1A1714; } .sd-editorial i { width: 54px; height: 6px; background: #1A1714; } .sd-editorial em { width: 18px; height: 18px; background: #B4441E; }
.sd-riso { background: radial-gradient(#FF5C8A 1px, transparent 1.3px) 0 0 / 6px 6px, #F6F1E7; } .sd-riso i { background: #FF5C8A; border: 2px solid #1F2A6B; box-shadow: 3px 3px 0 #3A5BFF; } .sd-riso em { border-radius: 50%; background: #3A5BFF; mix-blend-mode: multiply; }
.sd-timetable { background: #fff; border: 2px solid #111; } .sd-timetable i { width: 22px; height: 22px; background: #E5322D; } .sd-timetable em { width: 50px; height: 22px; background: #111; }
.sd-postcards { background: #2E4A3F; } .sd-postcards i { background: #FBF7EC; transform: rotate(-6deg); box-shadow: 0 3px 6px rgba(0,0,0,.35); } .sd-postcards em { background: #F4D9C6; transform: rotate(5deg); box-shadow: 0 3px 6px rgba(0,0,0,.35); }

/* ============================================================
   CHROME to match the mock-ups: no emoji in the menus, the hub's name as the logo, a slim top bar
   ============================================================ */
:is([data-style="desk"], [data-style="exercise"], [data-style="editorial"], [data-style="riso"], [data-style="timetable"], [data-style="postcards"]) .sidebar .nav-link .ico { display: none; }
:is([data-style="desk"], [data-style="editorial"], [data-style="riso"], [data-style="timetable"], [data-style="postcards"]) .sidebar .me-brand :is(.avatar, .me-name) { display: none; }
:is([data-style="desk"], [data-style="editorial"], [data-style="riso"], [data-style="timetable"], [data-style="postcards"]) .sidebar .brand .brand-mark { display: none; }
:is([data-style="desk"], [data-style="editorial"], [data-style="riso"], [data-style="timetable"], [data-style="postcards"]) .sidebar .me-brand small { display: block !important; font-size: inherit; color: inherit; font-weight: inherit; }
:is([data-style="desk"], [data-style="editorial"], [data-style="riso"], [data-style="timetable"], [data-style="postcards"]) .sidebar .me-brand:hover { background: transparent; }
:is([data-style="desk"], [data-style="exercise"], [data-style="editorial"], [data-style="riso"], [data-style="timetable"], [data-style="postcards"]) .shell:not(.focus-mode) .topbar { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 0; }
:is([data-style="desk"], [data-style="exercise"], [data-style="editorial"], [data-style="riso"], [data-style="timetable"], [data-style="postcards"]) .shell:not(.focus-mode) .topbar .title { visibility: hidden; }
:is([data-style="desk"], [data-style="exercise"], [data-style="editorial"], [data-style="riso"], [data-style="timetable"], [data-style="postcards"]) .shell:not(.focus-mode) .topbar .btn { min-height: 30px; padding: 3px 10px; font-size: .8rem; box-shadow: none; }
/* homework due soon: a thin coloured line instead of a red bar */
:is([data-style="desk"], [data-style="exercise"], [data-style="editorial"], [data-style="riso"], [data-style="timetable"], [data-style="postcards"]) body.hw-alert .shell:not(.focus-mode) .topbar { background: transparent !important; animation: none; color: var(--text); box-shadow: inset 0 3px 0 var(--bar2); }
:is([data-style="desk"], [data-style="exercise"], [data-style="editorial"], [data-style="riso"], [data-style="timetable"], [data-style="postcards"]) body.hw-alert .shell:not(.focus-mode) .topbar::before { display: none; }
:is([data-style="desk"], [data-style="exercise"], [data-style="editorial"], [data-style="riso"], [data-style="timetable"], [data-style="postcards"]) body.hw-alert .shell:not(.focus-mode) .topbar .btn:not(.bell) { background: var(--surface); color: var(--text); border-color: var(--border); }
[data-style="postcards"] body.hw-alert .shell:not(.focus-mode) .topbar .btn:not(.bell) { background: transparent; color: var(--desk-ink); border-color: rgba(237,230,211,.3); }

/* Study desk: serif name on the left, quiet links */
[data-style="desk"] .sidebar .brand { font-family: var(--font-head); font-weight: 500; font-size: 1.3rem; color: var(--text); }
/* bigger menu words: they wrap onto a second line instead of scrolling out of sight */
@media (min-width: 900px) { [data-style="desk"] .shell:not(.focus-mode) .sidebar { padding: 16px 46px 10px; gap: 4px 26px; flex-wrap: wrap; overflow: visible; }
  [data-style="desk"] .shell:not(.focus-mode) .sidebar .brand { margin-right: auto; } [data-style="desk"] .shell:not(.focus-mode) .nav-link { padding: 8px 2px; } }
[data-style="desk"] .shell:not(.focus-mode) .sidebar { border-bottom: 0; }
/* Exercise book: no logo, just the tabs */
@media (min-width: 900px) { [data-style="exercise"] .shell:not(.focus-mode) .sidebar .brand { display: none; } [data-style="exercise"] .shell:not(.focus-mode) .sidebar { padding-top: 30px; } }
/* Editorial: a masthead (the name on its own line, rules above and below the links) */
@media (min-width: 900px) {
  [data-style="editorial"] .shell:not(.focus-mode) .sidebar { flex-wrap: wrap; padding: 0 34px; gap: 0 22px; border-bottom: 1px solid var(--text); overflow: visible; }
  [data-style="editorial"] .shell:not(.focus-mode) .sidebar .brand { flex: 1 0 100%; font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; padding: 16px 0 10px; margin: 0; border-bottom: 3px double var(--text); }
  [data-style="editorial"] .shell:not(.focus-mode) .nav-link { padding: 9px 0; }
}
[data-style="editorial"] .sidebar .brand { font-family: var(--font-head); font-weight: 800; color: var(--text); }
/* Riso: big two-line logo */
[data-style="riso"] .sidebar .brand { font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; line-height: 1.05; color: #F6F1E7; padding-bottom: 22px; }
[data-style="riso"] .sidebar .brand::after { content: ""; display: block; width: 46px; height: 5px; background: #FF5C8A; margin-top: 8px; }
[data-style="riso"] .sidebar .brand { flex-direction: column; align-items: flex-start; }
/* Timetable: the name in its own black-ruled cell, numbers above each link */
@media (min-width: 900px) {
  [data-style="timetable"] .shell:not(.focus-mode) .sidebar { padding: 0; align-items: stretch; }
  [data-style="timetable"] .shell:not(.focus-mode) .sidebar .brand { width: 240px; margin: 0; padding: 14px 18px; border-right: 2px solid var(--text); align-items: center; }
  [data-style="timetable"] .shell:not(.focus-mode) .nav-link { flex-direction: column; align-items: flex-start; gap: 0; padding: 10px 12px; min-width: 92px; }
  [data-style="timetable"] .shell:not(.focus-mode) .nav-link::before { display: block; }
}
[data-style="timetable"] .sidebar .brand { font-weight: 900; font-size: .95rem; line-height: 1.05; text-transform: uppercase; color: var(--text); }
/* Postcards: a serif logo and small diamonds instead of icons */
[data-style="postcards"] .sidebar .brand { font-family: var(--font-head); font-size: 1.35rem; font-weight: 600; line-height: 1.1; color: var(--desk-ink); padding-bottom: 20px; }
[data-style="postcards"] .sidebar .nav-link::before { content: ""; width: 8px; height: 8px; border: 1.5px solid currentColor; border-radius: 2px; transform: rotate(45deg); flex: none; }
[data-style="postcards"] .content:has(.hd-pc), [data-style="postcards"] .content:has(.pd-postcards) { background: transparent; box-shadow: none; background-image: none; }
[data-style="postcards"] .pd-postcards :is(.pd-head, .pd-head h1, .pd-dek, .pd-kicker, .pd-tabs a, .pd-modes, .pd-modes button) { color: var(--desk-ink); }
[data-style="postcards"] .pd-postcards :is(.pd-dek, .pd-modes, .pd-modes button, .pd-tabs a:not(.on)) { color: var(--desk-muted); }
[data-style="postcards"] .pd-postcards .pd-kicker { color: #F4C9A8; }
[data-style="postcards"] .pd.pd-postcards .pd-tabs a.on, [data-style="postcards"] .pd.pd-postcards .pd-modes button.on { color: var(--desk-ink); box-shadow: inset 0 -2px 0 var(--desk-ink); }
[data-style="postcards"] .pd-postcards .pd-act { background: var(--desk-ink); color: #2B2A27; }

/* ============================================================
   HOME PAGES (home-designs.js) — the layouts of the mock-ups
   ============================================================ */
.hd a { color: inherit; text-decoration: none; }
.hd a:hover { text-decoration: underline; text-underline-offset: 3px; }
/* 1 · desk */
.hd-desk .cd-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 60px; padding: 18px 10px 30px; }
.hd-desk h1 { font-family: var(--font-head); font-size: 2.3rem; font-weight: 400; margin: 0 0 4px; border: 0; }
.hd-desk .sub { font-weight: 300; color: var(--muted); font-size: .95rem; margin-bottom: 36px; }
.hd-desk .cd-label { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 26px 0 8px; }
.hd-desk .cd-row { display: flex; align-items: baseline; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--border); font-family: var(--font-head); font-size: 1.12rem; }
.hd-desk .cd-row .cd-t { min-width: 0; } .hd-desk .cd-row .d { margin-left: auto; font-family: var(--font); font-size: .85rem; color: var(--muted); font-weight: 300; white-space: nowrap; }
.hd-desk .cd-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); flex: none; transform: translateY(-2px); }
.hd-desk .cd-dot.done { background: transparent; border: 1px solid var(--muted); }
.hd-desk .cd-aside { border-left: 1px solid var(--border); padding-left: 34px; }
.hd-desk .cd-word { font-family: var(--font-head); font-size: 1.8rem; font-style: italic; margin: 0; }
.hd-desk .cd-meter { height: 2px; background: var(--border); margin: 8px 0 4px; } .hd-desk .cd-meter i { display: block; height: 100%; background: var(--primary); }
.hd-desk .cd-small { display: block; font-weight: 300; font-size: .85rem; color: var(--muted); }
.hd-desk .cd-xp { font-family: var(--font-head); font-size: 1.45rem; }
@media (max-width: 760px) { .hd-desk .cd-body { grid-template-columns: 1fr; gap: 24px; } .hd-desk .cd-aside { border-left: 0; padding-left: 0; border-top: 1px solid var(--border); } }
/* 2 · exercise book */
.hd-nb { position: relative; font-family: var(--font-head); font-size: 1.2rem; color: var(--text); padding: 6px 0 40px; min-height: 540px; }
.hd-nb .nb-holes { position: absolute; left: -46px; top: 30px; display: grid; gap: 120px; }
.hd-nb .nb-holes i { width: 18px; height: 18px; border-radius: 50%; background: var(--bg); box-shadow: inset 1px 1px 3px rgba(0,0,0,.3); display: block; }
@media (max-width: 899px) { .hd-nb .nb-holes { display: none; } }
.hd-nb h1 { font-size: 2.6rem; font-weight: 400; margin: 0; }
.hd-nb .date { color: var(--accent); font-size: 1.1rem; }
.hd-nb h3 { font-size: 1.5rem; font-weight: 400; margin: 20px 0 4px; text-decoration: underline wavy var(--margin) 2px; text-underline-offset: 6px; }
.hd-nb .nb-row { display: flex; gap: 12px; align-items: baseline; padding: 4px 0; max-width: 640px; }
.hd-nb .nb-row .due { margin-left: auto; color: var(--accent); white-space: nowrap; }
.hd-nb .nb-tick { color: var(--accent); font-size: 1.5rem; transform: rotate(-8deg); display: inline-block; }
.hd-nb .nb-note { position: absolute; right: 20px; top: 110px; width: 230px; background: #FFF3A6; color: #23305E; padding: 14px 16px; transform: rotate(2.5deg); box-shadow: 2px 4px 0 rgba(0,0,0,.08); font-size: 1.12rem; }
.hd-nb .nb-note b { font-size: 1.5rem; font-weight: 400; }
.hd-nb .nb-note::before { content: ""; position: absolute; top: -10px; left: 70px; width: 80px; height: 22px; background: rgba(206, 214, 196, .8); transform: rotate(-3deg); }
.hd-nb .nb-test { margin-top: 14px; border: 2px dashed var(--text); padding: 10px 14px; display: inline-flex; flex-wrap: wrap; gap: 8px 22px; border-radius: 4px 14px 6px 12px; }
.hd-nb .nb-stamp { position: absolute; right: 50px; bottom: 10px; border: 3px solid var(--accent); color: var(--accent); padding: 6px 14px; transform: rotate(-12deg); font-size: 1.35rem; border-radius: 8px; opacity: .85; }
@media (max-width: 1100px) { .hd-nb .nb-note { position: relative; right: auto; top: auto; margin: 22px 0 0 10px; } .hd-nb .nb-stamp { position: relative; right: auto; bottom: auto; display: inline-block; margin: 26px 0 0 30px; } }
/* 3 · editorial */
.hd-ed .ed-body { display: grid; grid-template-columns: minmax(0, 1.45fr) 1px minmax(0, 1fr); gap: 26px; padding: 6px 0 30px; }
.hd-ed .ed-rule { background: var(--text); }
.hd-ed h1 { font-family: var(--font-head); font-size: 3rem; line-height: 1.02; margin: 4px 0 8px; font-weight: 600; letter-spacing: -.025em; }
.hd-ed .kicker { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--primary); font-weight: 600; }
.hd-ed .dek { font-family: var(--font-head); font-size: 1.15rem; font-style: italic; color: var(--muted); margin: 0 0 18px; }
.hd-ed .ed-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; padding: 11px 0; border-top: 1px solid var(--border); align-items: baseline; }
.hd-ed .ed-item .no { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.hd-ed .ed-item .t { font-family: var(--font-head); font-size: 1.15rem; } .hd-ed .ed-item .m { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.hd-ed .ed-side h4 { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 8px; }
.hd-ed .ed-big { font-family: var(--font-head); font-size: 4rem; font-weight: 800; line-height: 1; }
.hd-ed .ed-small { font-size: .82rem; }
.hd-ed .ed-quote { font-family: var(--font-head); font-size: 1.4rem; line-height: 1.3; margin: 18px 0; padding: 12px 0; border-top: 1px solid var(--text); border-bottom: 1px solid var(--text); }
.hd-ed .ed-quote em { color: var(--primary); }
.hd-ed .ed-score { display: flex; gap: 18px; font-size: .82rem; } .hd-ed .ed-score b { display: block; font-family: var(--font-head); font-size: 1.8rem; }
@media (max-width: 760px) { .hd-ed .ed-body { grid-template-columns: 1fr; } .hd-ed .ed-rule { height: 1px; } }
/* 4 · riso */
.hd-ri { position: relative; padding: 8px 0 30px; }
.hd-ri h1 { font-family: var(--font-head); font-size: 4rem; line-height: .92; margin: 0; font-weight: 700; letter-spacing: -.03em; position: relative; z-index: 1; text-shadow: none; }
.hd-ri h1 .pk { color: var(--ink2); }
.hd-ri .ri-blob { position: absolute; right: -20px; top: -30px; width: 300px; height: 300px; border-radius: 50%; background: var(--ink2); mix-blend-mode: multiply; opacity: .85; }
.hd-ri .ri-blob2 { position: absolute; right: 160px; top: 130px; width: 160px; height: 160px; background: var(--accent); mix-blend-mode: multiply; opacity: .75; transform: rotate(18deg); }
.hd-ri .ri-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 22px; margin-top: 26px; position: relative; z-index: 1; }
.hd-ri .ri-stack { display: grid; gap: 22px; align-content: start; }
.hd-ri .ri-card { display: block; border: 2.5px solid var(--text); padding: 14px 16px; background: var(--bg); position: relative; }
.hd-ri .ri-card::after { content: ""; position: absolute; inset: 6px -9px -9px 6px; border: 2.5px solid var(--ink2); z-index: -1; }
.hd-ri .ri-card h4 { margin: 0 0 8px; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
.hd-ri .ri-hw { display: flex; justify-content: space-between; padding: 7px 0; border-top: 2px solid var(--text); gap: 10px; }
.hd-ri .ri-tag { background: var(--ink2); color: #fff; padding: 0 6px; font-size: .82rem; white-space: nowrap; align-self: center; }
.hd-ri .ri-nums { display: flex; gap: 16px; } .hd-ri .ri-num { font-size: 3rem; font-weight: 700; line-height: 1; color: var(--accent); }
.hd-ri .ri-xp { font-size: 1.6rem; }
@media (max-width: 760px) { .hd-ri .ri-grid { grid-template-columns: 1fr; } .hd-ri h1 { font-size: 2.8rem; } .hd-ri .ri-blob { width: 180px; height: 180px; } .hd-ri .ri-blob2 { display: none; } }
/* 5 · timetable */
.hd-sw { display: grid; grid-template-columns: 240px minmax(0, 1fr) minmax(0, 1fr); border: 2px solid var(--text); margin-top: 6px; }
.hd-sw .sw-col { border-right: 2px solid var(--text); padding: 22px 18px; } .hd-sw .sw-col:last-child { border-right: 0; }
.hd-sw h1 { font-size: clamp(2.2rem, 3vw, 3.2rem); overflow-wrap: anywhere; line-height: .9; font-weight: 900; margin: 0; letter-spacing: -.035em; }
.hd-sw .lab { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 10px; color: var(--primary); }
.hd-sw .sw-tt { display: grid; grid-template-columns: 54px 1fr; border-top: 2px solid var(--text); }
.hd-sw .sw-tt > a { padding: 10px 0; border-bottom: 1px solid var(--surface-2); }
.hd-sw .sw-day { font-weight: 900; font-size: .9rem; } .hd-sw .sw-what { font-size: 1rem; }
.hd-sw .meta { display: block; font-size: .78rem; color: var(--muted); margin-top: 2px; }
.hd-sw .sw-band { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--text); }
.hd-sw .sw-band div { padding: 10px 8px 12px 0; } .hd-sw .sw-band b { display: block; font-size: 2.6rem; font-weight: 900; letter-spacing: -.03em; }
.hd-sw .sw-stat { font-size: 5.6rem; font-weight: 900; letter-spacing: -.05em; line-height: .85; } .hd-sw .sw-sub { font-weight: 600; }
.hd-sw .sw-word { font-size: 2rem; font-weight: 900; letter-spacing: -.02em; }
.hd-sw .sw-red { color: var(--primary); }
@media (max-width: 900px) { .hd-sw { grid-template-columns: 1fr; } .hd-sw .sw-col { border-right: 0; border-bottom: 2px solid var(--text); } }
/* 6 · postcards */
.hd-pc { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 34px 30px; padding: 10px 6px 30px; align-items: start; }
.hd-pc .pc-card { position: relative; background: #FBF7EC; color: #2B2A27; padding: 18px 20px; box-shadow: 0 10px 24px rgba(0,0,0,.3); }
.hd-pc .pc-card h4 { font-family: var(--font-head); margin: 0 0 8px; font-size: 1.25rem; font-weight: 600; }
.hd-pc .pc-a { transform: rotate(-1.2deg); } .hd-pc .pc-b { transform: rotate(1.8deg); background: #F4D9C6; margin-top: 20px; }
.hd-pc .pc-c { transform: rotate(.8deg); background: #DCE7D8; margin-left: 6%; } .hd-pc .pc-d { transform: rotate(-2deg); margin-top: 30px; }
.hd-pc .pc-stamp { position: absolute; top: 12px; right: 14px; width: 66px; height: 78px; border: 3px dotted var(--primary); display: grid; place-items: center; align-content: center; font-family: var(--font-head); font-weight: 800; color: var(--primary); font-size: 1.3rem; text-align: center; line-height: 1; }
.hd-pc .pc-stamp small { font-size: .7rem; display: block; }
.hd-pc .pc-line { display: flex; justify-content: space-between; border-bottom: 1px dashed #B8AE97; padding: 7px 0; font-size: .9rem; gap: 10px; }
.hd-pc .pc-hello { font-family: "Patrick Hand", var(--font-head); font-size: 2.2rem; color: #2E4A3F; margin: 0 0 4px; }
.hd-pc .pc-word { font-family: "Patrick Hand", var(--font-head); font-size: 1.9rem; } .hd-pc .pc-small { font-size: .88rem; max-width: 70%; }
@media (max-width: 760px) { .hd-pc { grid-template-columns: 1fr; } .hd-pc .pc-c { margin-left: 0; } }

/* ============================================================
   LIST PAGES (page-designs.js): Homework and Practice in each design
   ============================================================ */
.pd a { color: inherit; text-decoration: none; }
.pd .pd-head { position: relative; margin: 6px 0 18px; }
.pd .pd-head h1 { margin: 0; }
.pd .pd-act { position: absolute; right: 0; top: 0; }
.pd .pd-kicker { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--primary); font-weight: 600; margin-bottom: 4px; }
.pd .pd-dek { margin: 4px 0 0; color: var(--muted); }
.pd .pd-tabs { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 0 10px; }
.pd .pd-tabs a { color: var(--muted); padding: 4px 0; } .pd .pd-tabs a.on { color: var(--text); box-shadow: inset 0 -2px 0 var(--primary); }
.pd .pd-modes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 22px; font-size: .82rem; color: var(--muted); }
.pd .pd-modes button { background: none; border: 0; padding: 2px 0; cursor: pointer; color: var(--muted); font: inherit; }
.pd .pd-modes button.on { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--primary); }
.pd .pd-fold > summary { list-style: none; cursor: pointer; position: relative; padding-right: 22px; }
.pd .pd-fold > summary::-webkit-details-marker { display: none; }
.pd .pd-fold > summary::after { content: "▸"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.pd .pd-fold[open] > summary::after { content: "▾"; }
.pd .pd-t { min-width: 0; } .pd .pd-t small { display: block; font-size: .78rem; color: var(--muted); font-family: var(--font); font-weight: 400; margin-top: 2px; }
.pd .pd-empty { color: var(--muted); }
.pd a.pd-row:hover .pd-t, .pd a.pc-line:hover span:first-child, .pd a.pd-what:hover { text-decoration: underline; text-underline-offset: 3px; }

/* desk */
.pd-desk { max-width: 980px; padding: 10px 10px 40px; }
.pd-desk .pd-head h1 { font-family: var(--font-head); font-weight: 400; font-size: 2.3rem; border: 0; padding: 0; }
.pd-desk .pd-kicker { color: var(--muted); font-weight: 400; }
.pd-desk .pd-dek { font-weight: 300; }
.pd-desk .pd-tabs a { font-size: .9rem; }
.pd-desk .pd-sec { margin-bottom: 8px; }
.pd-desk .pd-label { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 26px 0 6px; }
.pd-desk .pd-label span { color: var(--primary); margin-left: 4px; }
.pd-desk .pd-fold > summary .pd-label { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--border); font-size: .74rem; color: var(--text); }
.pd-desk .pd-row { display: flex; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); font-family: var(--font-head); font-size: 1.08rem; }
.pd-desk .pd-m { margin-left: auto; font-family: var(--font); font-size: .82rem; color: var(--muted); font-weight: 300; white-space: nowrap; }
.pd-desk .pd-m.over { color: var(--danger); }
.pd-desk .cd-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); flex: none; transform: translateY(-2px); }
.pd-desk .cd-dot.done { background: transparent; border: 1px solid var(--muted); }

/* exercise book */
.pd-exercise { font-family: var(--font-head); font-size: 1.15rem; padding: 0 0 40px; max-width: 980px; }
.pd-exercise .pd-head h1 { font-size: 2.6rem; font-weight: 400; }
.pd-exercise .pd-kicker { font-family: var(--font-head); text-transform: none; letter-spacing: 0; font-size: 1.1rem; color: var(--accent); font-weight: 400; }
.pd-exercise .pd-tabs a { font-size: 1.1rem; padding: 3px 12px; border-radius: 10px 10px 0 0; background: color-mix(in srgb, #FBE3A1 60%, var(--surface)); color: #23305E; }
.pd-exercise .pd-tabs a:nth-child(3n+2) { background: color-mix(in srgb, #C9E4C5 70%, var(--surface)); } .pd-exercise .pd-tabs a:nth-child(3n+3) { background: color-mix(in srgb, #BFD9EF 70%, var(--surface)); }
.pd-exercise .pd-tabs { gap: 4px; border-bottom: 2px solid var(--margin); } .pd-exercise .pd-tabs a.on { box-shadow: inset 0 3px 0 var(--accent); background: var(--surface); }
.pd-exercise .pd-modes { font-size: 1.05rem; } .pd-exercise .pd-modes button.on { text-decoration: none; border: 1.5px solid var(--accent); border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px; padding: 0 8px; color: var(--accent); font-weight: 400; }
.pd-exercise .pd-h { font-size: 1.5rem; font-weight: 400; margin: 20px 0 4px; text-decoration: underline wavy var(--margin) 2px; text-underline-offset: 6px; display: inline-block; }
.pd-exercise .pd-n { color: var(--muted); font-size: 1.1rem; }
.pd-exercise .pd-fold > summary .pd-h { margin: 8px 0; }
.pd-exercise .pd-row { display: flex; align-items: baseline; gap: 12px; padding: 4px 0; }
.pd-exercise .pd-t small { font-family: var(--font-head); font-size: .98rem; }
.pd-exercise .pd-m { margin-left: auto; white-space: nowrap; } .pd-exercise .pd-m.red { color: var(--accent); }
.pd-exercise .nb-tick { color: var(--accent); font-size: 1.4rem; transform: rotate(-8deg); display: inline-block; }

/* editorial */
.pd-editorial { padding: 6px 0 40px; }
.pd-editorial .pd-head { border-bottom: 1px solid var(--text); padding-bottom: 14px; }
.pd-editorial .pd-head h1 { font-family: var(--font-head); font-size: 3.2rem; font-weight: 600; letter-spacing: -.025em; line-height: 1; }
.pd-editorial .pd-dek { font-family: var(--font-head); font-style: italic; font-size: 1.15rem; }
.pd-editorial .pd-tabs a, .pd-editorial .pd-modes { text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; font-weight: 600; }
.pd-editorial .pd-modes button { text-transform: uppercase; letter-spacing: .1em; }
.pd-editorial .pd-body { column-count: 2; column-gap: 34px; column-rule: 1px solid var(--text); }
.pd-editorial .pd-sec { break-inside: avoid; margin-bottom: 22px; }
.pd-editorial .pd-edh { display: flex; align-items: baseline; gap: 10px; border-top: 3px solid var(--text); padding-top: 6px; margin-bottom: 4px; }
.pd-editorial .pd-edno { font-family: var(--font-head); font-weight: 800; color: var(--primary); font-size: 1.1rem; }
.pd-editorial .pd-edh h2 { font-family: var(--font-head); font-size: 1.35rem; font-weight: 600; margin: 0; }
.pd-editorial .pd-edh .pd-n { margin-left: auto; font-size: .72rem; letter-spacing: .1em; color: var(--muted); }
.pd-editorial .pd-row { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); align-items: baseline; }
.pd-editorial .pd-row .no { font-family: var(--font-head); font-size: 1.3rem; font-weight: 800; color: var(--primary); }
.pd-editorial .pd-t { font-family: var(--font-head); font-size: 1.05rem; } .pd-editorial .pd-m { font-size: .78rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 900px) { .pd-editorial .pd-body { column-count: 1; } }

/* riso */
.pd-riso { padding: 6px 0 40px; }
.pd-riso .pd-head h1 { font-family: var(--font-head); font-size: 3.4rem; font-weight: 700; letter-spacing: -.03em; line-height: .95; text-shadow: 3px 3px 0 color-mix(in srgb, var(--ink2) 70%, transparent); }
.pd-riso .pd-kicker { color: var(--ink2); }
.pd-riso .pd-tabs a { border: 2px solid var(--text); padding: 3px 10px; color: var(--text); font-weight: 700; } .pd-riso .pd-tabs { gap: 6px; } .pd-riso .pd-tabs a.on { background: var(--ink2); color: #fff; box-shadow: none; }
.pd-riso .pd-modes button.on { background: color-mix(in srgb, var(--accent) 80%, #000); color: #fff; text-decoration: none; padding: 1px 8px; }
.pd-riso .pd-body { column-width: 400px; column-gap: 34px; padding-right: 10px; }
.pd-riso .pd-body > .pd-sec { break-inside: avoid; display: inline-block; width: calc(100% - 10px); margin: 0 0 30px; vertical-align: top; }
.pd-riso .pd-sec { position: relative; border: 2.5px solid var(--text); background: var(--bg); padding: 12px 14px; box-shadow: 7px 7px 0 color-mix(in srgb, var(--ink2) 80%, transparent); }
.pd-riso .pd-sec:nth-child(even) { box-shadow: 7px 7px 0 color-mix(in srgb, var(--accent) 70%, transparent); }
.pd-riso .pd-rih { margin: 0; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; padding: 2px 0 8px; }
.pd-riso .pd-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 2px solid var(--text); }
.pd-riso .ri-tag { background: var(--ink2); color: #fff; padding: 0 6px; font-size: .78rem; white-space: nowrap; align-self: center; }
.pd-riso .pd-m { font-size: .82rem; white-space: nowrap; }

/* timetable */
.pd-timetable { padding: 6px 0 40px; }
.pd-timetable .pd-head { border-bottom: 2px solid var(--text); padding-bottom: 12px; }
.pd-timetable .pd-head h1 { font-size: 3.4rem; font-weight: 900; letter-spacing: -.035em; line-height: .95; }
.pd-timetable .pd-tabs { gap: 0; border: 2px solid var(--text); display: inline-flex; } .pd-timetable .pd-tabs a { padding: 6px 12px; color: var(--text); font-weight: 700; border-right: 1px solid var(--surface-2); } .pd-timetable .pd-tabs a.on { background: var(--primary); color: var(--primary-ink); box-shadow: none; }
.pd-timetable .pd-modes button.on { text-decoration-color: var(--primary); text-decoration-thickness: 2px; }
.pd-timetable .pd-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); border-top: 2px solid var(--text); border-left: 2px solid var(--text); }
.pd-timetable .pd-sec { border-right: 2px solid var(--text); border-bottom: 2px solid var(--text); padding: 14px 16px; }
.pd-timetable .pd-swh { display: flex; justify-content: space-between; align-items: baseline; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); margin-bottom: 8px; }
.pd-timetable .pd-swh b { font-size: 1.6rem; color: var(--text); letter-spacing: -.03em; }
.pd-timetable .pd-fold > summary .pd-swh { margin: 0; }
.pd-timetable .pd-fold > summary::after { top: 14px; transform: none; }
.pd-timetable .pd-fold[open] > summary { margin-bottom: 8px; }
.pd-timetable .pd-tt { display: grid; grid-template-columns: 54px 1fr; border-top: 2px solid var(--text); }
.pd-timetable .pd-tt > a { padding: 9px 0; border-bottom: 1px solid var(--surface-2); }
.pd-timetable .pd-code { font-weight: 900; font-size: .8rem; } .pd-timetable .meta { display: block; font-size: .76rem; color: var(--muted); margin-top: 2px; }
.pd-timetable .sw-red { color: var(--primary); }

/* postcards */
.pd-postcards { padding: 6px 4px 40px; }
.pd-postcards .pd-head h1 { font-family: "Patrick Hand", var(--font-head); font-weight: 400; font-size: 2.6rem; }
.pd-postcards .pd-tabs a.on { box-shadow: inset 0 -2px 0 var(--primary); }
.pd-postcards .pd-body { column-width: 360px; column-gap: 34px; padding: 4px 8px; }
.pd-postcards .pd-body > .pd-sec { break-inside: avoid; display: inline-block; width: calc(100% - 8px); margin: 0 0 30px; vertical-align: top; }
.pd-postcards .pd-sec { background: #FBF7EC; color: #2B2A27; padding: 16px 18px; box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.pd-postcards .pd-sec:nth-child(4n+1) { transform: rotate(-.9deg); } .pd-postcards .pd-sec:nth-child(4n+2) { transform: rotate(1.1deg); background: #F4E3D3; }
.pd-postcards .pd-sec:nth-child(4n+3) { transform: rotate(.5deg); background: #E2EBDD; } .pd-postcards .pd-sec:nth-child(4n+4) { transform: rotate(-.6deg); }
.pd-postcards .pd-pch { font-family: var(--font-head); font-size: 1.2rem; font-weight: 600; margin: 0 0 6px; } .pd-postcards .pd-pch span { font-family: var(--font); font-size: .8rem; color: #6E675B; }
.pd-postcards .pc-line { display: flex; justify-content: space-between; border-bottom: 1px dashed #B8AE97; padding: 7px 0; font-size: .9rem; gap: 10px; }
.pd-postcards .pc-line small { display: block; font-size: .76rem; color: #6E675B; }
.pd-postcards .pc-line > span:last-child { white-space: nowrap; }

/* ---------- Word of the day (all six designs): word + CEFR level, form, meaning, example ---------- */
.wotd .wotd-top { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.wotd .wotd-lv { font-family: var(--font); font-size: .72rem; font-weight: 700; letter-spacing: .06em; line-height: 1; padding: 4px 7px; border: 1.5px solid currentColor; border-radius: 4px; color: var(--primary); align-self: center; }
.wotd .wotd-f { margin-top: 4px; line-height: 1.4; }
.wotd .wotd-f i { font-style: italic; opacity: .8; }
.wotd .wotd-ex { margin-top: 6px; font-style: italic; line-height: 1.45; opacity: .9; }
.hd-desk .wotd .cd-word { margin: 0; }
.hd-desk .wotd :is(.wotd-f, .wotd-ex) { font-size: .92rem; }
.hd-desk .wotd .wotd-ex { color: var(--muted); padding-left: 10px; border-left: 2px solid var(--primary); }
.hd-nb .nb-note { width: 260px; }
.hd-nb .wotd .nb-w { font-size: 1.7rem; }
.hd-nb .wotd .wotd-lv { color: #C0392B; font-family: var(--font-head); font-size: 1rem; border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px; }
.hd-ed .wotd .ed-w { font-family: var(--font-head); font-style: italic; font-size: 1.6rem; }
.hd-ri .wotd .ri-w { font-weight: 800; font-size: 1.4rem; }
.hd-ri .wotd .wotd-lv { background: var(--ink2); color: #fff; border-color: var(--ink2); }
.hd-sw .wotd .wotd-lv { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); border-radius: 0; }
.hd-pc .wotd .wotd-lv { color: #B4532A; }
.hd-pc .wotd :is(.wotd-f, .wotd-ex) { font-size: .9rem; }

/* ---------- Exercise book: bigger handwriting, roomier rows, easier to tap ---------- */
[data-style="exercise"] .nav-link { font-size: 1.3rem; padding: 9px 14px; }
[data-style="exercise"] .nav-link.active { font-size: 1.4rem; }
[data-style="exercise"] .nav-sep { font-size: 1.1rem; }
[data-style="exercise"] .tabs a { font-size: 1.3rem; padding: 8px 16px; }
[data-style="exercise"] .btn { font-size: 1.2rem; }
.hd-nb { font-size: 1.38rem; }
.hd-nb h3 { font-size: 1.8rem; }
.hd-nb .nb-row { padding: 9px 0; border-bottom: 1px dashed var(--border); max-width: 680px; }
.pd-exercise { font-size: 1.38rem; }
.pd-exercise .pd-head h1 { font-size: 3rem; }
.pd-exercise .pd-dek { font-size: 1.25rem; }
.pd-exercise .pd-tabs { margin-bottom: 14px; }
.pd-exercise .pd-tabs a { font-size: 1.35rem; padding: 8px 18px; }
.pd-exercise .pd-modes { font-size: 1.25rem; gap: 8px 14px; margin-bottom: 26px; }
.pd-exercise .pd-modes button { padding: 4px 12px; border: 1.5px dashed var(--border); border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px; }
.pd-exercise .pd-modes button.on { padding: 4px 12px; }
.pd-exercise .pd-h { font-size: 1.85rem; }
.pd-exercise .pd-n { font-size: 1.3rem; }
.pd-exercise .pd-fold > summary { padding: 6px 30px 6px 0; }
.pd-exercise .pd-fold > summary::after { font-size: 1.4rem; }
.pd-exercise .pd-row { padding: 11px 4px; border-bottom: 1px dashed var(--border); min-height: 48px; align-items: center; }
.pd-exercise .pd-row:hover { background: color-mix(in srgb, var(--primary) 10%, transparent); }
.pd-exercise .pd-box { font-size: 1.5rem; line-height: 1; }
.pd-exercise .pd-t small { font-size: 1.1rem; margin-top: 3px; }
.pd-exercise .pd-m { font-size: 1.2rem; }
/* ---------- Colours that stay readable in every design, in light and dark mode ----------
   The base stylesheet switches the tone colours and their soft backgrounds to dark versions when the device is in
   dark mode. Postcards is always a light design, so it keeps the light tones; and in every design the soft
   backgrounds and the highlighter are mixed from the design's own paper colour, so text on them always shows. */
:root[data-style="postcards"] { --accent-soft: #F3E1D6; --success: #1E7A55; --warn: #9A6412; --danger: #B3262C; --info: #1F5FA8;
  --listening: #2373B8; --reading: #1E7A55; --writing: #6A3FC9; --speaking: #C2492A; --vocabulary: #9A6A08; --grammar: #B32F73; }
:root:is([data-style="desk"], [data-style="exercise"], [data-style="editorial"], [data-style="riso"], [data-style="timetable"], [data-style="postcards"]) {
  --success-soft: color-mix(in srgb, var(--success) 14%, var(--surface));
  --warn-soft: color-mix(in srgb, var(--warn) 16%, var(--surface));
  --danger-soft: color-mix(in srgb, var(--danger) 13%, var(--surface));
  --info-soft: color-mix(in srgb, var(--info) 13%, var(--surface));
  --accent-soft: color-mix(in srgb, var(--accent) 14%, var(--surface));
  --grammar-soft: color-mix(in srgb, var(--grammar) 13%, var(--surface));
  --mark: color-mix(in srgb, #F5C518 34%, var(--surface));
}
/* ---------- Readable coloured text on phones and small screens ----------
   A student's own colour choice (accent) can be a bright pink or orange; as TEXT it is mixed towards the ink colour
   so dates, due labels and kickers stay readable on the paper in every design. */
:root:is([data-style="desk"], [data-style="exercise"], [data-style="editorial"], [data-style="riso"], [data-style="timetable"], [data-style="postcards"]) {
  --accent-ink: color-mix(in srgb, var(--accent) 68%, var(--text));
  --primary-ink-text: color-mix(in srgb, var(--primary) 78%, var(--text));
}
.hd-nb :is(.date, .due, .nb-tick, .nb-stamp), .pd-exercise :is(.pd-kicker, .pd-m.red, .nb-tick, .pd-modes button.on) { color: var(--accent-ink) !important; }
.pd-exercise .pd-modes button.on { border-color: var(--accent-ink); }
.pd-desk .pd-tabs a, .pd .pd-modes, .pd .pd-modes button { color: var(--muted); }
.demo-banner { color: color-mix(in srgb, var(--warn) 55%, var(--text)); }/* white numbers / initials stay readable on the badges in every mode */
.bell .dot { background: color-mix(in srgb, var(--danger) 78%, #000); }
.avatar:not(.has-photo) { color: var(--primary-ink); }
.pd-desk .pd-m.over { color: color-mix(in srgb, var(--danger) 80%, var(--text)); }
/* Menu links inside pop-ups (phone "More" sheet) use the sheet's text colour, not the sidebar's */
.modal .nav-link, [data-style] .modal .nav-link { color: var(--text) !important; background: transparent; border-bottom-color: var(--border); }
.modal .nav-link:hover, [data-style] .modal .nav-link:hover { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--text) !important; }