/* Shared brand tokens and primitives for the landing page and the app shell. */
:root {
  --primary: #2f55d4;
  --primary-dark: #2443ac;
  --primary-soft: rgba(47, 85, 212, .1);
  --success: #2eca8b;
  --warning: #f17425;
  --danger: #e43f52;
  --heading: #3c4858;
  --text: #5a6677;
  --muted: #8492a6;
  --light: #f8f9fa;
  --line: #e9ecef;
  --footer: #202942;
  --shadow: 0 0 3px rgba(60, 72, 88, .15);
  --shadow-lg: 0 10px 25px rgba(60, 72, 88, .15);
  /* Surfaces. --light is the recessed tone: alternate sections, the app background, troughs. */
  --bg: #fff;
  --surface: #fff;
  --field: #fff;
  --nav-bg: rgba(255, 255, 255, .95);
  --stripe: #cfd6e4;
  --hero-top: #f3f6fe;
  --band: #2f55d4;
  color-scheme: light dark;
}

/* The whole site follows the system theme. */
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #5578f0;
    --primary-dark: #6d8cff;
    --primary-soft: rgba(85, 120, 240, .18);
    --heading: #f1f4fa;
    --text: #b4bdcc;
    --muted: #8a96aa;
    --light: #111727;
    --line: #2c3650;
    --footer: #0c111e;
    --shadow: 0 0 3px rgba(0, 0, 0, .5);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, .45);
    --bg: #161c2d;
    --surface: #1e2639;
    --field: #141a2b;
    --nav-bg: rgba(22, 28, 45, .92);
    --stripe: #3a4666;
    --hero-top: #1b2442;
    --band: #2443ac;
  }
}
* { box-sizing: border-box; }
/* The hidden attribute always hides, whatever display a class gives the element (.btn, flex rows...). */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { color: var(--heading); font-weight: 700; line-height: 1.3; margin: 0; }
a { color: var(--primary); text-decoration: none; }
p { margin: 0; }
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.text-primary { color: var(--primary); }
.muted { color: var(--muted); }

.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo img { display: block; }
.logo-word { color: var(--heading); font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.logo-word b { color: var(--primary); font-weight: 800; }

.btn { display: inline-block; padding: 10px 24px; border: 1px solid var(--primary); border-radius: 30px; background: var(--primary); color: #fff; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; box-shadow: 0 3px 5px rgba(47, 85, 212, .3); transition: background .2s, color .2s, box-shadow .2s; }
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-soft { background: var(--primary-soft); border-color: transparent; color: var(--primary); box-shadow: none; }
.btn-soft:hover { background: var(--primary); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); box-shadow: none; }
.btn-danger:hover { background: #c9303f; border-color: #c9303f; }
.btn-light { background: #fff; border-color: #fff; color: #2f55d4; box-shadow: none; }
.btn-light:hover { background: #e9edf8; border-color: #e9edf8; }

.topnav { position: sticky; top: 0; z-index: 10; background: var(--nav-bg); backdrop-filter: blur(8px); box-shadow: var(--shadow); }
.topnav .container { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 16px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links > a, .nav-menu button { color: var(--heading); font-weight: 700; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; }
.nav-links > a:hover, .nav-menu:hover button, .nav-menu:focus-within button { color: var(--primary); }
/* The Guides menu: a list of the topic pages that drops under its label. */
.nav-menu { position: relative; }
.nav-menu button { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font-family: inherit; cursor: pointer; }
.nav-menu svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.nav-menu:hover svg, .nav-menu:focus-within svg { transform: rotate(180deg); }
.nav-drop { position: absolute; top: 100%; left: 50%; z-index: 20; display: none; min-width: 270px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-lg); transform: translateX(-50%); }
/* A transparent bridge over the gap, so the menu does not close on the way down to it. */
.nav-drop::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.nav-menu:hover .nav-drop, .nav-menu:focus-within .nav-drop { display: block; margin-top: 14px; }
.nav-drop a { display: block; padding: 9px 12px; border-radius: 6px; color: var(--heading); font-size: 14px; font-weight: 600; white-space: nowrap; }
.nav-drop a:hover, .nav-drop a:focus { background: var(--primary-soft); color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.nav-actions .link { color: var(--heading); font-weight: 700; font-size: 15px; }
.nav-actions form { display: flex; align-items: center; gap: 14px; margin: 0; font-size: 14px; color: var(--muted); }
.nav-actions button.link { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; cursor: pointer; }

/* Cookie notice: a card that rises from the bottom of the screen. */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; display: flex; align-items: center; gap: 20px; max-width: 760px; margin: 0 auto; padding: 16px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 12px 40px rgba(0, 0, 0, .25); font-size: 14px; animation: consent-rise .4s ease-out; }
.consent p { flex: 1; color: var(--text); }
.consent-actions { display: flex; flex: none; gap: 10px; }
.consent .btn { padding: 8px 20px; font-size: 14px; }
@keyframes consent-rise { from { transform: translateY(120%); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .consent { animation: none; } }
@media (max-width: 600px) {
  .consent { flex-direction: column; align-items: stretch; text-align: center; }
  .consent-actions { justify-content: center; }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
}
@media (max-width: 480px) {
  .logo-word { font-size: 19px; }
  .nav-actions .hide-sm { display: none; }
  .btn { padding: 9px 18px; }
}
