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

:root {
  --accent: #6d28d9;
  --accent-light: #8b5cf6;
  --bg: #f8f7f4;
  --bg-card: #ffffff;
  --text: #1a1a1a;
  --text-muted: #555;
  --border: #e2e0dc;
  --shadow: rgba(0, 0, 0, 0.06);
  --radius: 10px;
  --alert-bg: #fef3c7;
  --alert-text: #92400e;
  --alert-border: #f59e0b;
}

[data-theme="dark"] {
  --bg: #121212;
  --bg-card: #1e1e1e;
  --text: #e4e4e4;
  --text-muted: #999;
  --border: #2a2a2a;
  --shadow: rgba(0, 0, 0, 0.3);
  --alert-bg: #422006;
  --alert-text: #fcd34d;
  --alert-border: #b45309;
}

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.3s, color 0.3s;
}

a { color: var(--accent-light); text-decoration: none; }
a:hover { text-decoration: underline; }
em { font-style: italic; color: var(--accent-light); }

/* Visually hidden — accessible to screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Alert Banner */
.alert-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.4rem;
  background: var(--alert-bg);
  color: var(--alert-text);
  border-bottom: 1px solid var(--alert-border);
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.4;
  transition: background 0.3s, color 0.3s;
}

/* Top Bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.4rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
}

.topbar-icon { width: 26px; height: 26px; }

.theme-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text);
  transition: border-color 0.2s;
}
.theme-btn:hover { border-color: var(--accent); }

/* Hero */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1.4rem 2rem;
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
}

.hero-content {
  text-align: center;
  margin-bottom: 2.5rem;
}

.hero-logo { width: 90px; height: 90px; margin-bottom: 1rem; }

.hero-sub {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 420px;
  margin: 0 auto;
}

/* Tools */
.tools { width: 100%; margin-bottom: 3rem; }

.tools h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 1fr;
}

.card {
  display: block;
  padding: 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px var(--shadow);
  text-decoration: none;
}

.card-icon {
  display: block;
  width: 90px;
  height: 90px;
  margin-bottom: 0.6rem;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--accent-light);
}

.card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Footer */
.footer {
  margin-top: auto;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  width: 100%;
}

/* Responsive */
@media (max-width: 520px) {
  .card-grid { grid-template-columns: 1fr; }
}
