:root {
  --radius-xs: .75rem;
  --radius-sm: 1rem;
  --radius-md: 1.35rem;
  --radius-pill: 9999px;
  --surface-glass: color-mix(in srgb, var(--surface) 72%, transparent);
  --surface-glass-strong: color-mix(in srgb, var(--surface) 84%, transparent);
  --border-glass: color-mix(in srgb, var(--outline) 36%, transparent);
  --border-glass-strong: color-mix(in srgb, var(--outline) 58%, transparent);
  --shadow-elevated: 0 22px 70px -34px color-mix(in srgb, var(--shadow) 70%, transparent);
  --shadow-card: 0 14px 40px -28px color-mix(in srgb, var(--shadow) 58%, transparent);
  --text: var(--on-surface);
  --muted: var(--on-surface-variant);
  --line: var(--outline-variant);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  line-height: 1.55;
  background:
    radial-gradient(1100px 700px at 15% 0%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 55%),
    radial-gradient(900px 620px at 100% 10%, color-mix(in srgb, var(--secondary, var(--primary)) 14%, transparent), transparent 48%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 92%, white 8%), var(--bg));
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: absolute;
  top: -10rem;
  left: 1rem;
  z-index: 1000;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: .7rem 1rem;
  border: 1px solid var(--border-glass-strong);
  border-radius: var(--radius-pill);
  background: var(--surface-glass-strong);
  color: var(--text);
  box-shadow: var(--shadow-card);
  font-weight: 700;
}

.skip-link:focus-visible {
  top: 1rem;
  outline: 3px solid color-mix(in srgb, var(--primary) 55%, white);
  outline-offset: 2px;
}

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

.site-header,
main,
.footer {
  width: min(100% - 1.5rem, 72rem);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  min-height: 4.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1rem;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  background: var(--surface-glass);
  box-shadow: var(--shadow-elevated);
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: .7rem;
  border-radius: var(--radius-pill);
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

.brand:focus-visible,
.tool-link:focus-visible,
.footer a:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary) 68%, white);
  outline-offset: 3px;
}

.login-theme-toggle {
  display: inline-flex;
  flex: 0 0 auto;
}

.theme-toggle-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  padding: .25rem;
  border: 1px solid var(--outline);
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.theme-choice {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.theme-choice-label {
  display: flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--on-surface);
  cursor: pointer;
  transition: transform .3s var(--ease-standard), background-color .3s var(--ease-standard), color .3s var(--ease-standard);
}

.theme-choice-label:hover {
  transform: rotate(12deg) scale(1.08);
  background: var(--surface-variant);
  color: var(--primary);
}

.theme-choice:checked + .theme-choice-label {
  background: var(--primary);
  color: var(--on-primary);
}

:root[data-theme="light"] body:not(:has(.theme-choice:checked)) .theme-choice-label[for="platform-theme-light"],
:root[data-theme="dark"] body:not(:has(.theme-choice:checked)) .theme-choice-label[for="platform-theme-dark"] {
  background: var(--primary);
  color: var(--on-primary);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) body:not(:has(.theme-choice:checked)) .theme-choice-label[for="platform-theme-light"] {
    background: var(--primary);
    color: var(--on-primary);
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) body:not(:has(.theme-choice:checked)) .theme-choice-label[for="platform-theme-dark"] {
    background: var(--primary);
    color: var(--on-primary);
  }
}

.theme-choice:focus-visible + .theme-choice-label {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

.login-theme-toggle {
  position: fixed !important;
  top: 16px;
  right: 16px;
  z-index: 2001;
  display: block !important;
}

.login-theme-toggle .theme-toggle-wrapper {
  padding: 0 !important;
  line-height: normal;
  color: var(--on-surface);
  box-shadow: var(--shadow-sm) !important;
  border: 1px solid var(--outline);
}

.login-theme-toggle .theme-choice-label {
  min-width: auto;
  min-height: auto;
  padding: 0;
  border: none;
  line-height: normal;
}

.login-theme-toggle .theme-choice-text {
  display: none;
}

.login-theme-toggle .theme-choice-icon {
  line-height: normal;
}

main {
  padding: 1.5rem 0 2rem;
}

.hero {
  display: grid;
  gap: .9rem;
  margin: 2rem 0 1.5rem;
  padding: 2rem 1.25rem;
  border: 1px solid var(--border-glass);
  border-radius: calc(var(--radius-md) + .4rem);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 72%, transparent), color-mix(in srgb, var(--surface) 88%, transparent));
  box-shadow: var(--shadow-elevated);
  text-align: center;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.75rem);
  line-height: 1.04;
  letter-spacing: -.04em;
}

.hero p {
  margin: 0 auto;
  max-width: 60ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.08rem);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 1rem;
}

.tool-link {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  align-items: start;
  column-gap: .85rem;
  min-height: 44px;
  padding: 1.15rem 1.15rem 1.1rem;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 76%, transparent), color-mix(in srgb, var(--surface) 92%, transparent));
  box-shadow: var(--shadow-card);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.tool-link:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border-glass-strong));
  box-shadow: 0 18px 48px -28px color-mix(in srgb, var(--primary) 34%, var(--shadow));
}

.tool-link:hover .tool-icon {
  transform: scale(1.04);
  color: var(--primary);
}

.tool-icon {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  color: color-mix(in srgb, var(--primary) 82%, var(--text));
  transition: transform 180ms ease, color 180ms ease;
}

.tool-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
}

.tool-link h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.tool-link p,
.footer p {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}

.tool-link p {
  grid-column: 2;
  margin-top: .3rem;
}

.footer {
  margin: 0 auto 1.75rem;
  padding: 1.1rem 1rem 1.35rem;
  border-top: 1px solid var(--border-glass);
  text-align: center;
}

.footer p + p {
  margin-top: .5rem;
}

.footer a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 .5rem;
  border-radius: .45rem;
  color: var(--text);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}

.theme-choice-text {
  display: none;
}

.theme-choice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

@media (max-width: 42rem) {
  .site-header {
    flex-wrap: wrap;
    justify-content: center;
  }

  .brand {
    justify-content: center;
    width: 100%;
  }

  .hero {
    padding: 1.6rem 1rem;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .tool-link,
  .footer {
    content-visibility: auto;
  }

  .tool-link {
    contain-intrinsic-size: auto 89.59375px;
  }

  .footer {
    contain-intrinsic-size: auto 100px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
