:root {
  color-scheme: light dark;
  --background: #f5f5f2;
  --surface: #ffffff;
  --surface-soft: #ecece7;
  --text: #171717;
  --muted: #686860;
  --border: #deded8;
  --accent: #6b50b6;
  --accent-soft: #eee8ff;
  --accent-text: #3f2b75;
  --button-text: #ffffff;
  --shadow: 0 18px 50px rgba(30, 24, 48, 0.08);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #151515;
  --surface: #20201f;
  --surface-soft: #292928;
  --text: #f5f5f2;
  --muted: #b7b7af;
  --border: #373735;
  --accent: #a991ed;
  --accent-soft: #342b4e;
  --accent-text: #ddd1ff;
  --button-text: #171717;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --background: #151515;
    --surface: #20201f;
    --surface-soft: #292928;
    --text: #f5f5f2;
    --muted: #b7b7af;
    --border: #373735;
    --accent: #a991ed;
    --accent-soft: #342b4e;
    --accent-text: #ddd1ff;
    --button-text: #171717;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
}

body {
  min-width: 0;
  margin: 0;
  color: var(--text);
  background: var(--background);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.start-page,
.footer-inner {
  width: min(100% - 28px, 760px);
  margin-inline: auto;
}

.start-page {
  padding: 20px 0 48px;
}

.masthead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand img {
  flex: 0 0 auto;
}

.appearance {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

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

.appearance-options {
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  display: flex;
  background: var(--surface);
}

.appearance button {
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
}

.appearance button[aria-pressed="true"] {
  color: var(--text);
  background: var(--surface-soft);
}

.welcome {
  padding: 64px 0 54px;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 650px;
  margin-bottom: 34px;
  font-size: clamp(2.65rem, 12.5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

h2 {
  margin-bottom: 0;
  font-size: 1.65rem;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

h3 {
  margin-bottom: 4px;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.search label {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.search-row {
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 18px;
  display: flex;
  gap: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search input {
  min-width: 0;
  min-height: 48px;
  padding: 0 12px;
  border: 0;
  outline: 0;
  flex: 1;
  color: var(--text);
  background: transparent;
}

.search input::placeholder {
  color: var(--muted);
}

.search button {
  min-width: 84px;
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 13px;
  color: var(--button-text);
  background: var(--accent);
  cursor: pointer;
  font-weight: 800;
}

.section {
  padding: 44px 0;
  border-top: 1px solid var(--border);
}

.section-heading {
  margin-bottom: 22px;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quick-links a {
  min-width: 0;
  min-height: 84px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  background: var(--surface);
  font-size: 0.88rem;
  font-weight: 750;
  text-decoration: none;
}

.link-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--accent-text);
  background: var(--accent-soft);
  font-size: 0.84rem;
  font-weight: 850;
}

.tips {
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface);
}

.tips article {
  padding: 18px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
}

.tips article + article {
  border-top: 1px solid var(--border);
}

.tips p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.tip-number {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.help-link {
  min-height: 44px;
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent-text);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.sponsored {
  min-height: 108px;
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  background: var(--surface-soft);
}

.sponsored p {
  margin-bottom: 0;
  font-size: 0.84rem;
}

.sponsored .eyebrow {
  margin-bottom: 4px;
  color: var(--text);
}

.placeholder-label {
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 750;
  text-transform: uppercase;
}

footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  min-height: 92px;
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 0.82rem;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-inner a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

a:hover {
  color: var(--accent-text);
}

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

.search-row:focus-within {
  border-color: var(--accent);
}

@media (max-width: 370px) {
  .masthead {
    align-items: stretch;
    flex-direction: column;
  }

  .appearance-options {
    width: max-content;
  }

  .sponsored,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (min-width: 640px) {
  .start-page {
    padding-top: 30px;
  }

  .welcome {
    padding: 92px 0 70px;
  }

  .quick-links {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .quick-links a {
    min-height: 112px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .quick-links a,
  .search button,
  .appearance button {
    transition: color 150ms ease, background-color 150ms ease, transform 150ms ease;
  }

  .quick-links a:hover,
  .search button:hover {
    transform: translateY(-2px);
  }
}
