/* ============================================
   EduTools - base visual system
   Static HTML + CSS + Vanilla JS
   ============================================ */

@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0");

:root {
  color-scheme: light;

  --color-primary: #2150c9;
  --color-primary-dark: #173b9a;
  --color-primary-soft: #edf2ff;
  --color-accent: #f97316;
  --color-accent-dark: #c2410c;
  --color-ink: #171923;
  --color-text: #202436;
  --color-muted: #596174;
  --color-soft: #7c8498;
  --color-bg: #f6f7fb;
  --color-surface: #ffffff;
  --color-surface-2: #fdfdf8;
  --color-border: #dde2ec;
  --color-border-soft: #edf0f6;
  --color-success: #0f9f6e;
  --color-warning: #d97706;
  --color-error: #dc2626;
  --color-info: #2563eb;
  --color-math: #4f46e5;
  --color-lang: #c026d3;
  --color-classroom: #0f9f6e;
  --color-evaluation: #b45309;
  --color-ad: #fff7ed;

  --font-heading: Outfit, "Segoe UI", system-ui, sans-serif;
  --font-body: "DM Sans", "Segoe UI", system-ui, sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  --leading-tight: 1.2;
  --leading-normal: 1.55;
  --leading-relaxed: 1.75;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.5rem;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgb(23 25 35 / 0.06);
  --shadow-md: 0 10px 25px rgb(23 25 35 / 0.08);
  --shadow-lg: 0 18px 40px rgb(23 25 35 / 0.12);

  --container: 1180px;
  --container-wide: 1360px;
  --header-height: 70px;
  --transition: 180ms ease;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background:
    linear-gradient(90deg, rgb(33 80 201 / 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgb(33 80 201 / 0.035) 1px, transparent 1px),
    var(--color-bg);
  background-size: 32px 32px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-menu-open,
body.is-panel-open {
  overflow: hidden;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-heading);
  line-height: var(--leading-tight);
  color: var(--color-ink);
}

p {
  margin: 0;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

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

ul,
ol {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

main {
  min-height: 62vh;
}

::selection {
  color: #ffffff;
  background: var(--color-primary);
}

:focus-visible {
  outline: 3px solid rgb(249 115 22 / 0.5);
  outline-offset: 3px;
}

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

.container-wide {
  width: min(100% - 32px, var(--container-wide));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  transform: translateY(-160%);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  color: #ffffff;
  background: var(--color-ink);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition);
}

.skip-link:focus {
  transform: translateY(0);
}

.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;
}

.section {
  padding: var(--space-16) 0;
}

.section--tight {
  padding: var(--space-10) 0;
}

.section-heading {
  display: grid;
  gap: var(--space-3);
  max-width: 760px;
  margin-bottom: var(--space-8);
}

.section-heading h2 {
  font-size: clamp(1.6rem, 2vw + 1rem, 2.35rem);
}

.section-heading p {
  color: var(--color-muted);
  font-size: var(--text-lg);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  width: max-content;
  color: var(--color-primary-dark);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.page-header {
  padding: var(--space-16) 0 var(--space-10);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-soft);
}

.page-header__inner {
  display: grid;
  gap: var(--space-4);
  max-width: 820px;
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
}

.page-header p {
  color: var(--color-muted);
  font-size: var(--text-lg);
}

.prose {
  width: min(100% - 32px, 820px);
  margin-inline: auto;
  padding: var(--space-10) 0 var(--space-16);
}

.prose h2 {
  margin-top: var(--space-10);
  margin-bottom: var(--space-3);
  font-size: var(--text-2xl);
}

.prose h3 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-2);
  font-size: var(--text-xl);
}

.prose p,
.prose li {
  color: var(--color-muted);
  font-size: var(--text-lg);
}

.prose p + p {
  margin-top: var(--space-4);
}

.prose ul {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.prose li {
  position: relative;
  padding-left: var(--space-5);
}

.prose li::before {
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 7px;
  height: 7px;
  content: "";
  border-radius: var(--radius-full);
  background: var(--color-accent);
}

.muted {
  color: var(--color-muted);
}

.divider {
  height: 1px;
  background: var(--color-border-soft);
}

.surface-band {
  background: var(--color-surface);
  border-block: 1px solid var(--color-border-soft);
}

.ad-slot {
  display: grid;
  place-items: center;
  min-height: 112px;
  padding: var(--space-5);
  border: 1px dashed #f0b47b;
  border-radius: var(--radius-md);
  color: #8a4b13;
  background:
    repeating-linear-gradient(135deg, rgb(249 115 22 / 0.08) 0 8px, transparent 8px 18px),
    var(--color-ad);
  text-align: center;
}

.ad-slot small {
  display: block;
  margin-bottom: var(--space-1);
  color: #9a5a1b;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
}

.ad-slot strong {
  color: #74370d;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 210px;
  padding: var(--space-8);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-muted);
  background: var(--color-surface);
  text-align: center;
}

@media (max-width: 767px) {
  :root {
    --header-height: 64px;
  }

  .container,
  .container-wide,
  .prose {
    width: min(100% - 24px, var(--container));
  }

  .section {
    padding: var(--space-12) 0;
  }

  .page-header {
    padding: var(--space-12) 0 var(--space-8);
  }

  .prose p,
  .prose li,
  .section-heading p {
    font-size: var(--text-base);
  }
}

/* Material Symbols Outlined global styling */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined', sans-serif;
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
  user-select: none;
  -webkit-user-select: none;
}

