@font-face { font-family: "Inter"; src: url("/static/fonts/InterVariable.woff2") format("woff2"); font-weight: 100 900;
  font-style: normal; font-display: swap; }
/* Design tokens: light by default, dark follows the device. Contrast measured in the PR (>= 4.5:1 text, >= 3:1 borders). */
:root {
  color-scheme: light dark;
  --bg: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0066cc;
  --accent-hover: #0058b0; /* light mode darkens on hover: a lighter blue fails 4.5:1 with white text */
  --on-accent: #ffffff;
  --border: #86868b;
  --hairline: rgba(0, 0, 0, .12); /* decorative dividers only; controls use --border */
  --glass: rgba(255, 255, 255, .72);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 28px rgba(0, 0, 0, .08);
  --fill: #e8e8ed; /* grey fill: secondary buttons, the sign-in art panel */
  --fill-hover: #dcdce1; /* light mode: a step darker, so it still reads on a white card */
  --on-fill-hover: #0058b0; /* secondary text on hover: >= 4.5:1 on --fill-hover */
  --card-hover: #ffffff;
  --shadow-hover: 0 1px 2px rgba(0, 0, 0, .05), 0 8px 24px rgba(0, 0, 0, .1); /* a hovered app card lifts off the page */
  --tile-bg-0: #e3eefb; --tile-fg-0: #0b4f9c; --tile-bg-1: #e1f3e6; --tile-fg-1: #17622b;
  --tile-bg-2: #fdecd6; --tile-fg-2: #8a4a00; --tile-bg-3: #fbe3e3; --tile-fg-3: #a1211f;
  --tile-bg-4: #eee6fa; --tile-fg-4: #5b34a6; --tile-bg-5: #ddf2f2; --tile-fg-5: #0c6568;
  --tile-bg-6: #fbe4f0; --tile-fg-6: #a31f64; --tile-bg-7: #e8e9f0; --tile-fg-7: #3f4466;
  --font: "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --space-1: .5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --radius: .75rem;
  --radius-sm: .5rem;
  --radius-lg: 1.25rem;
  --text-sm: .875rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.75rem; /* error titles */
  --text-2xl: 2rem; /* page titles */
  --tap: 2.75rem; /* 44px */
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --accent: #2997ff;
    --accent-hover: #5cb0ff;
    --on-accent: #000000;
    --border: #8e8e93;
    --hairline: rgba(255, 255, 255, .16);
    --glass: rgba(28, 28, 30, .72);
    --shadow: none; /* on black, surface lightness carries the depth */
    --fill: #2c2c2e;
    --fill-hover: #3a3a3c;
    --on-fill-hover: #5cb0ff;
    --card-hover: #2c2c2e;
    --shadow-hover: none; /* on black the lighter surface carries it */
    --tile-bg-0: #10304f; --tile-fg-0: #7cb8ff; --tile-bg-1: #12351d; --tile-fg-1: #6fd58c;
    --tile-bg-2: #40290a; --tile-fg-2: #ffb65c; --tile-bg-3: #471a1a; --tile-fg-3: #ff8f8b;
    --tile-bg-4: #2e2149; --tile-fg-4: #b89bff; --tile-bg-5: #0e3436; --tile-fg-5: #62d3d6;
    --tile-bg-6: #471a31; --tile-fg-6: #ff8fc3; --tile-bg-7: #2a2c38; --tile-fg-7: #aab0d0;
  }
}
@media (prefers-contrast: more) {
  :root { --hairline: var(--border); --glass: var(--surface); --shadow: none; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: var(--text-base)/1.5 var(--font); font-optical-sizing: auto; letter-spacing: -.011em; color: var(--text);
  background: var(--bg); -webkit-font-smoothing: antialiased; }
html { scroll-padding-top: 4.5rem; } /* anchors and focus land below the sticky header */
a { color: var(--accent); }
a, button { font: inherit; }
p { margin: 0; text-wrap: pretty; }
h1 { margin: 0; font-size: var(--text-2xl); line-height: 1.15; letter-spacing: -.025em; font-weight: 700;
  overflow-wrap: anywhere; text-wrap: balance; }
.caption { margin: 0; font-size: var(--text-sm); color: var(--muted); letter-spacing: .005em; }
.email { overflow-wrap: anywhere; }

/* Header: the mark and name on the left; when signed in, the account and Sign out on the right. */
.site-header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: var(--space-2);
  min-height: 3.5rem; padding: .5rem var(--space-3); border-bottom: 1px solid var(--hairline); background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
@media (prefers-reduced-transparency: reduce) {
  .site-header { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.brand { display: flex; align-items: center; gap: .6rem; margin-right: auto; font-weight: 600; letter-spacing: -.014em; }
.mark { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: var(--radius-sm);
  background: var(--text); color: var(--bg); font-size: .8125rem; font-weight: 700; letter-spacing: -.02em; }
.account { display: flex; align-items: center; gap: var(--space-1); min-width: 0; font-size: var(--text-sm); }
.avatar { flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--tile-bg-0); color: var(--tile-fg-0); font-size: .75rem; font-weight: 700; }
.account-email { min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 34rem) { .account-email { display: none; } }
.account form { margin: 0; }

main { max-width: 52rem; margin: 0 auto; padding: var(--space-4) var(--space-2); }

/* Buttons: blue fill; secondary is a grey fill; quiet, text and link buttons are blue words. */
.button, button { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: var(--tap);
  min-width: var(--tap); padding: .5rem var(--space-3); border: 1px solid transparent; border-radius: var(--radius);
  background: var(--accent); color: var(--on-accent); font-weight: 600; letter-spacing: -.011em; line-height: 1.3;
  text-align: center; text-decoration: none; overflow-wrap: anywhere; cursor: pointer; }
.button-secondary { background: var(--fill); color: var(--accent); font-weight: 500; }
.button-quiet, .button-text, .button-link { background: none; color: var(--accent); font-weight: 500; }
.button-quiet { justify-content: flex-start; padding: 0; text-align: left; }
.button-text { padding: 0 var(--space-1); }
.button-link { min-width: 0; padding: 0; }
/* Hover only where a pointer can hover, so a tapped control does not stay highlighted on a touch screen. */
@media (hover: hover) {
  a:not([class]):hover { color: var(--accent-hover); }
  .button:hover, button:hover { background: var(--accent-hover); }
  .button-secondary:hover { background: var(--fill-hover); color: var(--on-fill-hover); }
  .button-quiet:hover, .button-link:hover { background: none; text-decoration: underline; text-underline-offset: .2em; }
  .button-text:hover { background: var(--fill); }
}
/* The Google G on a white disc, so it keeps its colours on the blue fill. */
.button-google::before { content: ""; flex: none; width: 1.375rem; height: 1.375rem; border-radius: 50%;
  background: #fff url("/static/google-g.svg") center / 1rem no-repeat; }

/* Sign-in and refusal pages: one two-panel card, decorative art on the left, the words and the way out on the right. */
.panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin: var(--space-3) auto 0; overflow: hidden;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 1.5rem; box-shadow: var(--shadow); }
.panel-art { display: grid; grid-template-columns: repeat(3, 3.5rem); gap: .9rem; align-content: center; justify-content: center;
  padding: var(--space-4) var(--space-3); background: var(--fill); }
.panel-art .tile { width: 3.5rem; height: 3.5rem; border-radius: 1rem; }
.panel-art .glyph { grid-column: 1 / -1; justify-self: center; display: grid; place-items: center; width: 4.5rem; height: 4.5rem;
  border-radius: 50%; background: var(--tile-bg-2); color: var(--tile-fg-2); }
.panel-body { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-2); min-width: 0;
  padding: var(--space-4) var(--space-3); }
.panel-body h1 { font-size: var(--text-xl); line-height: 1.2; letter-spacing: -.022em; }
.lede strong, .support strong, .footnote strong { color: var(--text); font-weight: 600; }
.lede, .panel-body h1 + p { font-size: 1.0625rem; line-height: 1.45; letter-spacing: -.014em; color: var(--muted); overflow-wrap: anywhere; }
.panel-body .button, .actions button { min-height: 3rem; } /* links and form buttons match */
.forget { margin: 0; }
.support { color: var(--muted); overflow-wrap: anywhere; }
.actions { display: flex; flex-direction: column; gap: var(--space-1); }
.actions form, .actions form button { margin: 0; width: 100%; }
.actions .button-quiet { align-self: flex-start; min-height: var(--tap); }
@media (max-width: 40rem) {
  .panel { grid-template-columns: minmax(0, 1fr); }
  .panel-art { grid-template-columns: repeat(6, 2.5rem); gap: .5rem; padding: var(--space-3); }
  .panel-art .tile { width: 2.5rem; height: 2.5rem; border-radius: .75rem; }
  .panel-art .glyph { width: 3.5rem; height: 3.5rem; }
}

/* Launcher: a title, then a grid of app icons with the name and a two-line description below each. */
.identity { margin-bottom: var(--space-3); }
.identity h1 { margin-bottom: .25rem; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3) var(--space-2);
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); align-items: start; }
.card { position: relative; display: flex; flex-direction: column; align-items: center; gap: .6rem; padding: 1.25rem var(--space-2) 1rem;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 1.1rem; color: var(--text); text-align: center;
  text-decoration: none; }
/* Every card shows at rest, so the equal grid reads; hover lifts it (a shadow in light, a lighter fill in dark). */
.card:active, .card.is-opening { background: var(--card-hover); border-color: var(--border); box-shadow: var(--shadow-hover); }
@media (hover: hover) {
  .card:hover { background: var(--card-hover); border-color: var(--border); box-shadow: var(--shadow-hover); }
}
.tile { flex: none; display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 1.125rem;
  font-size: 1.25rem; font-weight: 700; letter-spacing: .01em; }
.tint-0 { background: var(--tile-bg-0); color: var(--tile-fg-0); }
.tint-1 { background: var(--tile-bg-1); color: var(--tile-fg-1); }
.tint-2 { background: var(--tile-bg-2); color: var(--tile-fg-2); }
.tint-3 { background: var(--tile-bg-3); color: var(--tile-fg-3); }
.tint-4 { background: var(--tile-bg-4); color: var(--tile-fg-4); }
.tint-5 { background: var(--tile-bg-5); color: var(--tile-fg-5); }
.tint-6 { background: var(--tile-bg-6); color: var(--tile-fg-6); }
.tint-7 { background: var(--tile-bg-7); color: var(--tile-fg-7); }
/* Every card reserves the same space, two lines of name and two of description, used or not. */
.card-text { display: flex; flex-direction: column; gap: .2rem; width: 100%; height: calc(2 * 1.3 * .9375rem + 2 * 1.35 * .8125rem + .2rem); }
/* shortcut: names and descriptions clip at two lines (full text in the title tooltip); revisit if apps need longer ones. */
.card-name, .card-desc { flex: none; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-name { font-weight: 600; font-size: .9375rem; line-height: 1.3; }
.card-desc { font-size: .8125rem; line-height: 1.35; color: var(--muted); }
/* Opening state: a static ring in the card's corner (accent arc on a grey ring) that only spins under no-preference. */
.spinner { display: none; position: absolute; top: .6rem; right: .6rem; width: 1.25rem; height: 1.25rem;
  border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; }
.card.is-opening .spinner { display: block; }
.footnote { margin-top: var(--space-4); }
.notice { max-width: 36rem; margin: var(--space-3) auto 0; padding: var(--space-3); background: var(--surface);
  border: 1px solid var(--hairline); border-radius: var(--radius-lg); }
.notice h2 { margin: 0 0 var(--space-1); font-size: var(--text-lg); line-height: 1.3; letter-spacing: -.017em; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: no-preference) {
  .button, button, .card { transition: background-color .15s ease, box-shadow .2s ease, transform .1s ease-out; }
  .button:active, button:active, .card:active { transform: scale(.97); }
  .card.is-opening .spinner { animation: spin .8s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
}
