/* TrainTanmay home: Apple-style finish (apple-design skill: system type with size-specific
   tracking, a translucent top bar, calm pill buttons, press feedback without overshoot).
   Looks only: no class, control or script changes. Delete the <link> to apple-home.css
   in index.html to undo all of it. Font choices 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{
  --f-display:-apple-system,BlinkMacSystemFont,"SF Pro Display",Inter,"Segoe UI Variable Display","Segoe UI",system-ui,"Helvetica Neue",Helvetica,Arial,sans-serif;
  --f-body:-apple-system,BlinkMacSystemFont,"SF Pro Text",Inter,"Segoe UI Variable Text","Segoe UI",system-ui,"Helvetica Neue",Helvetica,Arial,sans-serif;
  /* critically damped: things settle without bouncing past their mark */
  --spring:cubic-bezier(.22,1,.36,1);
  --a-glass:rgba(14,11,34,.6);
  --a-fill:rgba(246,241,231,.08);
  --a-fill-hover:rgba(246,241,231,.15);
  --a-hair:rgba(246,241,231,.14);
  --a-gutter:clamp(16px,4vw,48px);   /* same as .page's side padding */
}
body{font-feature-settings:"kern";text-rendering:optimizeLegibility}

/* quieter film grain: the sky stays, the noise steps back */
.grain{opacity:.07}

/* top bar: a translucent layer the sky scrolls under */
.top{position:sticky;top:0;z-index:20;
  margin-inline:calc(var(--a-gutter) * -1);padding:10px var(--a-gutter);
  background:var(--a-glass);
  -webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);
  border-bottom:1px solid rgba(246,241,231,.07)}
.mark{gap:10px;min-width:0}
.mark svg{width:36px;height:36px}
.mark b{font-weight:700;font-size:1.2rem;letter-spacing:-.02em;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* pill buttons: flat fill, hairline edge, no hover jump; a small press on pointer-down */
.pill{height:38px;padding:0 16px;border-radius:980px;font-weight:600;font-size:.875rem;letter-spacing:-.005em;
  background:var(--a-fill);border-color:var(--a-hair);
  transition:background-color .2s ease,border-color .2s ease,color .2s ease,filter .2s ease,transform .1s ease-out}
.pill:hover{background:var(--a-fill-hover);border-color:rgba(246,241,231,.26);transform:none}
.pill:active{transform:scale(.97)}
.pill.solid{background:var(--paper);color:var(--ink);border-color:var(--paper)}
.pill.solid:hover{background:#fff;border-color:#fff}
.pill[aria-pressed="true"]{background:var(--paper);color:var(--ink);border-color:var(--paper)}
.pill:focus-visible{outline-offset:3px}
/* the bar is already glass: buttons on it don't need their own blur */
.top .pill{-webkit-backdrop-filter:none;backdrop-filter:none}
.dock .go:hover{filter:brightness(1.06);border-color:var(--c)}

/* headline: tight tracking and leading as the type grows, body near zero */
.eyebrow{font-family:var(--f-body);font-weight:600;font-size:.78rem;letter-spacing:.08em}
h1{font-weight:700;letter-spacing:-.03em;line-height:1.03}
h1 em::after{height:.12em;bottom:.02em}
/* OpenDyslexic has very deep descenders: give its lines room so the underline sits under
   "today?" instead of over the sentence below it */
html.dys h1{line-height:1.15}
html.dys h1 em::after{bottom:.28em}
.lead{font-size:clamp(1.05rem,1.6vw,1.25rem);line-height:1.45;letter-spacing:-.005em}

/* the worlds */
.w-key{font-family:var(--f-body);font-weight:700;font-size:.68rem;letter-spacing:0;border-radius:6px;padding:1px 7px}
.w-name{font-weight:700;letter-spacing:-.022em}
.w-sub{font-family:var(--f-body);font-weight:600;font-size:.68rem;letter-spacing:.07em}
.w-tag{font-size:.875rem;line-height:1.4}
.w-last{font-family:var(--f-body);font-weight:600;font-size:.64rem;letter-spacing:.06em}

footer{font-size:.82rem}

@media (max-width:480px){
  .mark{gap:8px}
  .mark svg{width:32px;height:32px}
  .mark b{font-size:1.05rem}
  .pill{height:36px}
  .top-links .pill{padding:0 10px}
  /* a long first name after signing in shortens instead of pushing Help off the screen */
  .top-links [data-tt-account]>span:not(.txt){display:inline-block;max-width:9ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle}
}

/* accessibility settings: solid surfaces, firmer edges */
@media (prefers-reduced-transparency:reduce){
  .top{background:#0e0b22;-webkit-backdrop-filter:none;backdrop-filter:none}
  .pill{background:#231c4f;-webkit-backdrop-filter:none;backdrop-filter:none}
  .pill.solid,.pill[aria-pressed="true"]{background:var(--paper)}
}
@media (prefers-contrast:more){
  .top{background:#0e0b22;border-bottom-color:rgba(246,241,231,.5)}
  .pill{border-color:rgba(246,241,231,.7)}
}
