@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,700;0,800;0,900;1,500;1,700&family=Inter:wght@400;500;600;700&display=swap');
@import url('/gha-magazine.css?v=28');   /* the Nectale Magazine look (owner 2026-11-27); built by scripts/magazine_css.py */
/* Nectale Apple-style feel (owner 2026-10-22: "apply the apple design thing to all pages, starting with the
   workbook pages"). Based on the apple-design skill (Apple WWDC "Designing Fluid Interfaces"):
   1 response   — a control answers the instant it is pressed (press feedback), no 300 ms tap delay
   2 motion     — one no-bounce (critically damped) curve for every small movement; no sticky hover on touch
   3 material   — the top bar is glass the page scrolls under; a soft edge shadow appears once content is beneath
   4 space      — the ☰ menu grows from its button and returns the same way; dialogs arrive as a material
   5 access     — reduced motion / reduced transparency / more contrast are honoured
   6 touch      — no zoom when a blank gets focus, no autocorrect in answer boxes, stable text size,
                  jumps stop below the bar, no pull-to-refresh mid-test, keyboard focus ring
   Full list for the owner: docs/NECTALE_UI_UX.md
   Linked by scripts/site_nav.py (site + book landing pages) and scripts/inject_watermark.py (workbook Parts).
   The homepage keeps its own card rules in <style id="apple-feel">. Nothing here changes layout or colour. */
:root{--af-ease:cubic-bezier(.25,1,.5,1)}

/* 1. Response */
a,button,summary,label,[role="button"],[onclick]{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
button:not(:disabled),[role="button"],a.nbtn,.ni,.chrow,.crs-opt,.mb,.tfb,.tdopt,.tdit,.fi-btn,.sbtn,.fib-check,.va-lb,
.nav-pill,.pp-cta,.cat-gbtn,nav.gn .gn-pill,nav.gn .gn-t,nav.gn .gn-burger,nav.gn .gn-av{
  transition-property:transform,box-shadow,background-color,border-color,color,opacity,filter,scale;
  transition-duration:.28s;transition-timing-function:var(--af-ease)}
button:not(:disabled):active,[role="button"]:active,a.nbtn:active,.sbtn:active,.fib-check:active,.va-lb:active,.nav-pill:active,
.pp-cta:active,.cat-gbtn:active,.tfb:active,.fi-btn:active,.tdopt:active,.tdit:active,
nav.gn .gn-pill:active,nav.gn .gn-t:active,nav.gn .gn-burger:active,nav.gn .gn-av:active{scale:.97;transition-duration:.1s;transition-timing-function:ease-out}
/* wide rows and cards press less, so the text does not visibly shrink */
html .mb:active,html .crs-opt:active,html .chrow:active:not(.soon),html .ni:active{scale:.985;transition-duration:.1s;transition-timing-function:ease-out}
nav.gn .gn-drawer a:active,nav.gn .gn-drawer .gn-row:active{background:#FFEFD2;transition-duration:.05s}
/* touch screens: a tap must not leave a row lifted ("sticky hover"); the press above replaces it */
@media (hover:none){.chrow:hover:not(.soon){transform:none}}

/* 2. Material: glass top bar (site + landing pages) */
html body > nav.gn{background:rgba(255,248,238,.74);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);
  border-bottom-color:transparent;box-shadow:none;transition:box-shadow .3s var(--af-ease),background-color .3s var(--af-ease)}
html.af-scrolled body > nav.gn{background:rgba(255,248,238,.80);box-shadow:0 1px 0 rgba(234,223,200,.7),0 8px 24px -12px rgba(46,73,100,.28)}

/* 3. Space: the menu keeps its open-state place while it fades, grows from ☰ and returns into it */
nav.gn .gn-drawer{position:absolute;top:calc(100% + 8px);right:16px;width:360px;border-radius:16px;overflow:hidden;overflow-y:auto;
  background:#FFF8EE;border:1px solid #EADFC8;box-shadow:0 14px 30px rgba(0,0,0,.25);max-height:calc(100vh - 110px);
  opacity:0;transform:translateY(-6px) scale(.96);transform-origin:top right;pointer-events:none;
  transition:opacity .22s var(--af-ease),transform .32s var(--af-ease),display .32s allow-discrete,overlay .32s allow-discrete}
nav.gn.gn-open .gn-drawer{opacity:1;transform:none;pointer-events:auto}
@starting-style{nav.gn.gn-open .gn-drawer{opacity:0;transform:translateY(-6px) scale(.96)}}
@media (max-width:1100px){
  nav.gn .gn-drawer{top:100%;left:0;right:0;width:auto;border-radius:0;border:0;border-bottom:1px solid rgba(201,162,39,.35);max-height:calc(100vh - 70px);
    transform-origin:top center;transform:translateY(-10px)}
  @starting-style{nav.gn.gn-open .gn-drawer{opacity:0;transform:translateY(-10px)}}
}

/* 4. The course chooser on a workbook Part arrives as a material: the veil fades, the card rises and settles */
.crs-gate{transition:opacity .3s var(--af-ease)}
@starting-style{.crs-gate{opacity:0}}
.crs-card{transition:transform .42s var(--af-ease),opacity .3s var(--af-ease)}
@starting-style{.crs-card{transform:translateY(14px) scale(.97);opacity:0}}

/* 6. Touch ergonomics (owner 2026-10-22: "apply them all")
   a. iOS zooms the page when a text box under 16px gets focus: gha-apple.js raises only the boxes smaller than 16px
      on touch screens (a CSS rule would also shrink the larger ones) */
/* b. turning the phone sideways must not enlarge the text */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
/* c. a jump to a section (#link, table of contents) stops below the sticky bar instead of under it */
html{scroll-padding-top:96px}
@media (max-width:1100px){html{scroll-padding-top:76px}}
html.af-wb{scroll-padding-top:70px}
/* d. on a workbook Part, pulling the page down past the top does not reload it mid-test (Safari 16+, Chrome) */
html.af-wb,html.af-wb body{overscroll-behavior-y:none}
/* e. keyboard users see a clear ring; mouse and touch users do not (zero specificity, so a page's own focus style wins) */
:where(a,button,summary,[role="button"],[tabindex]):focus-visible{outline:3px solid #E0A12A;outline-offset:2px}
:where(a,button,summary,[role="button"],[tabindex]):focus:not(:focus-visible){outline:none}

/* 4b. Language picker (owner 2026-11-07 "everything perfectly smooth"): fades and grows from its button, fades back on close */
.ghalm .pane{opacity:0;transform:translateY(-4px) scale(.97);transform-origin:top right;
  transition:opacity .18s var(--af-ease),transform .26s var(--af-ease),display .26s allow-discrete}
.ghalm.open .pane{opacity:1;transform:none}
@starting-style{.ghalm.open .pane{opacity:0;transform:translateY(-4px) scale(.97)}}
nav.nav-open .nav-r > [data-gha-lang] .ghalm .pane{transform-origin:top center}

/* 5. Accessibility */
@media (prefers-reduced-motion:reduce){
  nav.gn .gn-drawer,nav.gn.gn-open .gn-drawer{transform:none!important;transition:opacity .2s ease,display .2s allow-discrete}
  .crs-card{transition:opacity .2s ease}
  .ghalm .pane,.ghalm.open .pane{transform:none!important}
  @starting-style{.crs-card{transform:none}nav.gn.gn-open .gn-drawer{transform:none}}
  button:active,[role="button"]:active,a.nbtn:active,.mb:active,.crs-opt:active,.chrow:active,.ni:active,.tfb:active{scale:1}
}
@media (prefers-reduced-transparency:reduce){
  html body > nav.gn,html.af-scrolled body > nav.gn{background:#FFF8EE;-webkit-backdrop-filter:none;backdrop-filter:none;border-bottom-color:#EADFC8}
}
@media (prefers-contrast:more){
  html body > nav.gn{background:#FFF8EE;border-bottom:1px solid #8A7A55}
  nav.gn .gn-drawer{border-color:#8A7A55}
}

/* 7. Level pills (owner 2026-11-04: "always level pills must match everywhere"). The ONE definition, copied from the
   homepage catalog; every page (homepage, PDF Store, ISBN page, landing pages, My PDFs, Nexus Atlas) uses class="lv-badge lv-N". */
.lv-badge{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;padding:4px 11px;border-radius:999px;font-family:'Quicksand',sans-serif;}
/* Level badges (owner 2026-12-05: "use the same colors for all our level badges everywhere"): the nine colors of the
   edition covers, flat, white type. Written by scripts/level_colors.py from scripts/edition_cover.py LEVEL_COLOR; never
   edit the nine rules by hand. (2026-10-08 to 2026-12-04: pale ivory to metallic black.) */
.lv-1{background:#D1453B;color:#fff;border:1.5px solid #9E342C;}
.lv-2{background:#D96B1E;color:#fff;border:1.5px solid #A45116;}
.lv-3{background:#C2327F;color:#fff;border:1.5px solid #932660;}
.lv-4{background:#6A3FC8;color:#fff;border:1.5px solid #502F98;}
.lv-5{background:#1F8A4C;color:#fff;border:1.5px solid #176839;}
.lv-6{background:#2B6CB8;color:#fff;border:1.5px solid #20528B;}
.lv-7{background:#0F7B7D;color:#fff;border:1.5px solid #0B5D5F;}
.lv-8{background:#7A1F45;color:#fff;border:1.5px solid #5C1734;}
.lv-9{background:#1B2A49;color:#fff;border:1.5px solid #141F37;}
