/* TrainTanmay apps (D&T, Physics, Chemistry, Maths): Apple-style finish, loaded after restyle.css.
   From the apple-design skill: system type with size-specific tracking, hairline edges and soft
   shadows instead of ink outlines and solid ledges, a translucent top bar, presses that give
   instantly (scale, no bounce), straight hero pictures.
   Looks only: no class, control, script or layout size changes, and every colour theme
   (Light, Dark, Salmon, Blush) keeps its own colours. Delete the <link> to apple-apps.css in a
   page to undo all of it there. Fonts go through --f-display / --f-body, so the
   dyslexia-friendly font (html.dys) still wins.
   Type: Apple devices use their own San Francisco; everything else gets Inter, the closest open
   match, so Windows, Android and Chromebooks all look the same. */
@import url("https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400..800&display=swap");

:root{
  --a-display:-apple-system,BlinkMacSystemFont,"SF Pro Display",Inter,"Segoe UI Variable Display","Segoe UI",system-ui,"Helvetica Neue",Helvetica,Arial,sans-serif;
  --a-text:-apple-system,BlinkMacSystemFont,"SF Pro Text",Inter,"Segoe UI Variable Text","Segoe UI",system-ui,"Helvetica Neue",Helvetica,Arial,sans-serif;
  --f-display:var(--a-display);
  --f-body:var(--a-text);
  /* critically damped: things settle without bouncing past their mark */
  --m-spring:cubic-bezier(.22,1,.36,1);
  --p-spring:cubic-bezier(.22,1,.36,1);
  --a-sh1:0 1px 2px rgba(15,20,30,.05),0 6px 18px -10px rgba(15,20,30,.16);
  --a-sh2:0 2px 6px rgba(15,20,30,.06),0 18px 36px -18px rgba(15,20,30,.3);
  --a-sh-pop:0 2px 8px rgba(0,0,0,.08),0 28px 64px -24px rgba(0,0,0,.4);
}
/* restyle.css draws an ink outline (--ol) and a solid ledge (--ledge) under everything. They are
   only ever used for borders and shadows, so retuning them here changes every app in every theme:
   outlines become the theme's own strong line colour and the ledge goes away. */
:root{--ol:var(--line-strong)!important;--ledge:transparent!important}

/* page: plain background (no dotted paper, no colour glow whose edge would then show) */
body{background-image:none;font-feature-settings:"kern";text-rendering:optimizeLegibility}
body::after{display:none}

/* type: weight and tight tracking as headings grow */
h1,h2,h3,h4{letter-spacing:-.015em}
h1{font-weight:700;letter-spacing:-.025em}
h2{letter-spacing:-.02em}
html.dys h1,html.dys h2,html.dys h3,html.dys h4{letter-spacing:0}
.brand b{font-weight:700;letter-spacing:-.02em}
.brand small,.eyebrow{font-family:var(--f-body);font-weight:600;letter-spacing:.08em}
html.dys .nav a,html.dys .brand{font-family:var(--a-text)}

/* hairlines instead of 1.5px ink outlines */
.topbar,.navmenu,body .btn,body .card,.stat,.term,.paper,.ms,.modal-panel,.fc-face,
body .tcard,body .labcard,body .casecard,body .qitem,body .bk-item,body .pack,body .vtile,body .featlab,
.hero,.hero-scope,.heroart,.tabs button,.tabs a,.subtabs button,.iconbtn,.theme-select,.dysbtn,.sel,.searchbox input,
.group,.panel,.stage,.empty,.pbanner,.qcard,body .qtile,body .ccard,body .vidt,body .vid,body .viscard,body .pq,
.seg,.fchip,.conf button,.marks button,.dots button,.qtile .ic,.viscard .ic,.rag,.bar,.pbar,.toggle input,.toast,
.answer,.readout,.note,.item .chk,body .doc,.bigsearch input,
input[type=search],input[type=text],input[type=number],textarea,.field select,.field input,.mat input,.drawer-panel input,
section>h2::before,.sec-head h2::before,.steps li::before{border-width:1px}
.drawer-panel{border-left-width:1px}
.items{border-top-width:1px}
.footer,footer{border-top-width:1px}
.toggle input::after{top:2px;left:2px}   /* re-centres the knob inside the thinner edge */

/* top bar: the same floating strip, now a translucent material the page scrolls under */
.topbar{border-color:color-mix(in srgb,var(--ink) 9%,transparent);
  background:color-mix(in srgb,var(--surface) 72%,transparent);
  -webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);
  box-shadow:0 1px 2px rgba(15,20,30,.04),0 10px 30px -16px rgba(15,20,30,.22)}
/* wide screens (where the nav links show): slightly tighter links, so the whole row fits on a
   1366px laptop instead of "Downloads" being cut and "Progress" hidden off the end */
@media (min-width:1061px){
  .topbar .wrap{gap:10px}
  .topbar .nav{gap:1px;margin-left:4px}
  .topbar .nav a{font-size:.875rem;padding-inline:7px}
}
/* phones: D&T's bar has one more button (NEA planner) than the other apps, and on phones up to
   about 430px wide it ran off the right edge (it already did before this file). There the
   wordmark steps aside and the logo stays; the link keeps its "TrainTanmay home" label. */
@media (max-width:429px){
  .topbar .wrap:has(.neabtn) .brand>span{display:none}
}
.iconbtn:hover,.dysbtn:hover{transform:none;box-shadow:none}
.iconbtn:active,.dysbtn:active{transform:scale(.95)}

/* surfaces: hairline edge, soft resting shadow */
body .card,.stat,.term,.paper,.ms,.group,.panel,.stage,.pbanner,.qcard,
body .tcard,body .labcard,body .casecard,body .qitem,body .bk-item,body .pack,body .vtile,body .featlab,
body .qtile,body .ccard,body .vidt,body .vid,body .viscard,body .pq{border-color:var(--line);box-shadow:var(--a-sh1)}
.modal-panel,.navmenu{border-color:var(--line);box-shadow:var(--a-sh-pop)}
.fc-face{border-color:var(--line);box-shadow:var(--a-sh2)}
.answer{box-shadow:var(--a-sh1)}

/* things you click: a small lift and a deeper shadow on hover, a quick press */
body .tcard:hover,body .labcard:hover,body .casecard:hover,body .featlab:hover,
body .qtile:hover,body .ccard:hover,body .vidt:hover,body .vid:hover,body .viscard:hover{
  transform:translateY(-2px);box-shadow:var(--a-sh2);border-color:color-mix(in srgb,var(--brand) 35%,var(--line))}
body .qitem:hover,body .bk-item:hover,body .pack:hover,body .pq:hover,body .doc:hover{
  transform:translateY(-1px);box-shadow:var(--a-sh2);border-color:color-mix(in srgb,var(--brand) 35%,var(--line))}
body .tcard:active,body .labcard:active,body .casecard:active,body .featlab:active,body .qitem:active,body .bk-item:active,body .pack:active,
body .qtile:active,body .ccard:active,body .vidt:active,body .vid:active,body .viscard:active,body .pq:active,body .doc:active{
  transform:scale(.985);box-shadow:var(--a-sh1);transition-duration:.1s}

/* buttons: no ledge and no hover jump; they give a little the instant you press */
body .btn{box-shadow:none;transition:background-color .2s ease,color .2s ease,border-color .2s ease,filter .2s ease,transform .1s ease-out}
body .btn:hover:not(:disabled){transform:none;box-shadow:none}
body .btn:active:not(:disabled){transform:scale(.97);box-shadow:none}
body .btn.primary{background-image:none;box-shadow:none}
body .btn-sm,body .btn.sm{box-shadow:none}

/* tabs, filters and answer buttons: no hover hop, a small press */
.tabs button:hover,.tabs a:hover,.subtabs button:hover,.fchip:hover,.conf button:hover,.marks button:hover,.dots button:hover{transform:none}
.tabs button:active,.tabs a:active,.subtabs button:active,.fchip:active,.conf button:active,.marks button:active,.dots button:active{transform:scale(.97)}

/* home hero: the night sky stays; a soft shadow instead of the ledge, glass buttons, straight pictures */
.hero{border-color:transparent;box-shadow:0 1px 2px rgba(0,0,0,.06),0 24px 48px -28px rgba(0,0,0,.45)}
body .hero .btn{box-shadow:none}
body .hero .btn:hover:not(:disabled){box-shadow:none}
body .hero .btn:not(.primary):not(.ghost){background:rgba(246,241,231,.08);border-color:rgba(246,241,231,.28)}
body .hero .btn:not(.primary):not(.ghost):hover:not(:disabled){background:rgba(246,241,231,.16);border-color:rgba(246,241,231,.45)}
body .hero .btn.primary{border-color:transparent;box-shadow:none}
body .hero .btn.primary:hover:not(:disabled){box-shadow:none;filter:brightness(1.06)}
.hero-scope,.heroart{rotate:0deg;border-color:rgba(246,241,231,.14);box-shadow:0 20px 40px -20px rgba(0,0,0,.55)}
.hero-scope:hover,.heroart:hover{rotate:0deg;scale:1.02}
.bigsearch input{border-color:transparent;box-shadow:0 1px 2px rgba(0,0,0,.12)}
.bigsearch input:focus{border-color:transparent;box-shadow:0 0 0 4px rgba(185,242,124,.5)}

/* accessibility settings: solid surfaces, firmer edges */
@media (prefers-reduced-transparency:reduce){
  .topbar{background:var(--surface);-webkit-backdrop-filter:none;backdrop-filter:none}
}
@media (prefers-contrast:more){
  :root{--ol:var(--ink)!important}
  .topbar,body .card,.stat,body .tcard,body .qtile,body .ccard,.group,.panel{border-color:var(--ink)}
}
