/* ===== Atemp — shared environment: tokens, background, nav, footer ===== */
:root {
  color-scheme: dark;
  --background: #0A0B0E;
  --surface: #14161B;
  --surface-raised: #1A1D23;
  --text: #A3A7AF;
  --bright: #F4F6F9;
  --muted: #8A8F98;
  --rule: #23262D;
  --brand: #4093F7;          /* logo blue: fills, sliders, progress */
  --brand-strong: #1E6FD9;   /* buttons with white text (4.85:1) */
  --brand-ink: #8FC0FF;      /* blue text on dark */
  --hard: #D65258;           /* hard sessions, race, errors */
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh; margin: 0; overflow-x: clip;
  background:
    radial-gradient(70% 55% at 50% -12%, rgb(64 147 247 / 17%), transparent 70%),
    radial-gradient(40% 35% at 100% 0%, rgb(64 147 247 / 8%), transparent 70%),
    var(--background);
  background-attachment: fixed;
  color: var(--text); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
/* faint track-lane grid behind everything */
body::before { position: fixed; z-index: 0; inset: 0; background-image: linear-gradient(rgb(255 255 255 / 2.6%) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 2.6%) 1px, transparent 1px); background-size: 56px 56px; content: ""; pointer-events: none; -webkit-mask-image: radial-gradient(80% 60% at 50% 0%, #000, transparent 75%); mask-image: radial-gradient(80% 60% at 50% 0%, #000, transparent 75%); }
button, a { color: inherit; font: inherit; }
a { text-decoration: none; }
:focus-visible { outline: 2px solid var(--bright); outline-offset: 2px; }

/* nav */
.at-nav { position: sticky; z-index: 30; top: 0; border-bottom: 1px solid transparent; transition: background .25s ease, border-color .25s ease; }
.at-nav.is-stuck { border-bottom-color: var(--rule); background: rgb(10 11 14 / 78%); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.at-nav-in { display: flex; align-items: center; gap: 24px; width: min(1080px, calc(100% - 48px)); height: 68px; margin: 0 auto; }
.at-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--bright); font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.at-brand img { width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 0 0 1px rgb(255 255 255 / 10%); }
.at-links { display: flex; gap: 4px; margin-left: auto; }
.at-links a { padding: 8px 12px; border-radius: 8px; color: var(--text); font-size: 14px; transition: color .15s ease, background .15s ease; }
.at-links a:hover { background: rgb(255 255 255 / 5%); color: var(--bright); }
.at-nav .at-btn { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.at-crumb { display: inline-flex; align-items: center; gap: 8px; margin-left: 4px; color: var(--muted); font-size: 14px; }
.at-crumb::before { width: 1px; height: 18px; margin-right: 6px; background: var(--rule); content: ""; }

/* buttons */
.at-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border: 1px solid #30343C; border-radius: 12px; background: rgb(255 255 255 / 4%); color: var(--bright); font-size: 15px; font-weight: 600; cursor: pointer; transition: background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.at-btn svg { width: 16px; height: 16px; flex: none; transition: transform .25s cubic-bezier(.3,1.5,.5,1); }
.at-btn:hover { border-color: #4A4F59; background: rgb(255 255 255 / 8%); }
.at-btn:active { transform: scale(.98); }
.at-btn-primary { border-color: var(--brand-strong); background: var(--brand-strong); color: #fff; box-shadow: 0 10px 30px -12px rgb(64 147 247 / 70%); }
.at-btn-primary:hover { border-color: #2A7BE6; background: #2A7BE6; box-shadow: 0 14px 36px -12px rgb(64 147 247 / 85%); }
.at-btn-primary:hover svg { transform: translateX(3px); }

/* room at the bottom so a fixed corner badge from the host never covers content */
body { padding-bottom: 76px; }

/* footer */
.at-footer { position: relative; z-index: 1; border-top: 1px solid var(--rule); }
.at-footer-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; width: min(1080px, calc(100% - 48px)); margin: 0 auto; padding: 28px 0 40px; color: var(--muted); font-size: 13px; }
.at-footer .at-brand { font-size: 14px; }
.at-footer .at-brand img { width: 24px; height: 24px; border-radius: 7px; }
.at-footer a:not(.at-brand) { color: var(--text); border-bottom: 1px dotted #4A4F59; }
.at-footer a:not(.at-brand):hover { color: var(--bright); }

@media (max-width: 720px) {
  .at-links { display: none; }
  .at-nav-in { width: calc(100% - 32px); gap: 12px; }
  .at-nav .at-btn { margin-left: auto; }
  .at-footer-in { width: calc(100% - 32px); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }

/* language switch */

/* account button (Google sign-in) */
.at-acct { position: relative; flex: none; margin-left: 10px; }
.at-acct-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 16px; border: 1px solid #30343C; border-radius: 12px; background: rgb(255 255 255 / 4%); color: var(--bright); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.at-acct-btn:hover { border-color: #4A4F59; background: rgb(255 255 255 / 8%); }
.at-acct-btn.is-user { position: relative; width: 38px; padding: 0; justify-content: center; }
.at-acct-btn img, .at-acct-btn i { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.at-acct-btn i { display: grid; place-items: center; background: var(--brand-strong); color: #fff; font-style: normal; font-size: 13px; font-weight: 700; }
.at-acct .at-dot { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border: 2px solid var(--background); border-radius: 50%; background: #7FD8A8; }
.at-acct .at-dot.is-syncing { background: var(--brand); animation: at-pulse 1s ease-in-out infinite; }
.at-acct .at-dot.is-offline, .at-acct .at-dot.is-conflict { background: #F0C064; }
.at-acct .at-dot.is-error { background: var(--hard); }
@keyframes at-pulse { 50% { opacity: .35; } }
.at-acct-menu { position: absolute; z-index: 40; top: calc(100% + 8px); right: 0; display: grid; gap: 2px; width: min(290px, calc(100vw - 32px)); padding: 8px; border: 1px solid #333338; border-radius: 14px; background: #15171C; box-shadow: 0 20px 50px rgb(0 0 0 / 55%); }
.at-acct-menu[hidden] { display: none; }
.at-acct-who { display: grid; gap: 2px; padding: 8px 10px 4px; }
.at-acct-who b { color: var(--bright); font-size: 14px; }
.at-acct-who small, .at-acct-status { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.at-acct-status { margin: 0 0 6px; padding: 0 10px 8px; border-bottom: 1px solid var(--rule); }
.at-acct-status.is-offline, .at-acct-status.is-conflict { color: #F0C064; }
.at-acct-status.is-error { color: #F2A3A7; }
.at-acct-menu button { padding: 9px 10px; border: 0; border-radius: 9px; background: none; color: var(--text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.at-acct-menu button:hover { background: rgb(255 255 255 / 6%); color: var(--bright); }
.at-acct-menu button[data-acct="wipe"] { color: #F2A3A7; }
.at-toast { position: fixed; z-index: 90; left: 50%; bottom: 96px; max-width: calc(100% - 32px); padding: 12px 18px; border: 1px solid #333338; border-radius: 12px; background: #1C1C1F; box-shadow: 0 16px 40px rgb(0 0 0 / 50%); color: var(--bright); font-size: 13.5px; opacity: 0; transform: translate(-50%, 8px); pointer-events: none; transition: opacity .25s ease, transform .25s ease; }
.at-toast.on { opacity: 1; transform: translate(-50%, 0); }
.at-cloud-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.at-cloud-pick > div { padding: 12px 14px; border: 1px solid #303035; border-radius: 12px; background: #111113; font-size: 13.5px; line-height: 1.5; }
.at-cloud-pick span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.at-cloud-pick p { margin: 0; }
.at-cloud-pick b { color: var(--bright); }
.at-cloud-pick small { color: var(--muted); font-size: 12px; }
@media (max-width: 720px) {
  .at-acct { margin-left: auto; }
  .at-nav .at-btn + .at-acct { margin-left: 8px; }
  .at-cloud-pick { grid-template-columns: 1fr; }
}

/* language dropdown (left, next to the brand) */
.at-lang { position: relative; flex: none; margin-left: 14px; }
.at-lang-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px 0 9px; border: 1px solid var(--rule); border-radius: 10px; background: rgb(255 255 255 / 3%); color: var(--bright); font: inherit; font-size: 13px; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.at-lang-btn:hover { border-color: #4A4F59; background: rgb(255 255 255 / 7%); }
.at-lang-btn b { font-weight: 600; letter-spacing: .03em; }
.at-flag { display: inline-flex; width: 20px; height: 14px; overflow: hidden; border-radius: 3px; box-shadow: 0 0 0 1px rgb(255 255 255 / 18%); }
.at-flag svg { width: 100%; height: 100%; display: block; }
.at-caret { width: 14px; height: 14px; color: var(--muted); }
.at-lang-menu { position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; display: grid; gap: 2px; min-width: 190px; padding: 6px; border: 1px solid #333338; border-radius: 12px; background: #15171C; box-shadow: 0 20px 50px rgb(0 0 0 / 55%); }
.at-lang-menu[hidden] { display: none; }
.at-lang-menu button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.at-lang-menu button:hover { background: rgb(255 255 255 / 6%); color: var(--bright); }
.at-lang-menu button[aria-selected="true"] { color: var(--bright); font-weight: 600; }
.at-nav .at-btn + .at-acct { margin-left: -16px; }
@media (max-width: 720px) {
  .at-nav-in { gap: 0; }
  .at-lang { margin-left: 10px; }
  .at-lang-btn b { display: none; }
  .at-nav .at-btn { margin-left: auto; min-height: 38px; padding: 8px 12px; font-size: 13.5px; }
  .at-nav .at-btn svg { display: none; }
  .at-acct-btn { min-height: 38px; padding: 8px 12px; font-size: 13.5px; }
}
@media (max-width: 520px) { .at-nav .at-brand { font-size: 0; gap: 0; } .at-nav .at-btn + .at-acct { margin-left: 8px; } .at-nav .at-btn { padding: 8px 11px; } }
