/* =========================================================
   AnchorKite tool-suite design system
   Shared across all tools at /tools/<slug>/
   ----------------------------------------------------------
   - Light theme is the default; dark theme is opt-in via
     either prefers-color-scheme OR <html data-theme="dark">.
   - <html data-theme="light"> forces light even if the
     OS prefers dark.
   - Individual tools may add their own <tool>.css for
     widget-body styling, but should not redefine tokens.
   ========================================================= */

:root {
  /* ---------- Color tokens (light mode default) ---------- */
  --bg:                 #FAFAFA;
  --surface:            #FFFFFF;
  --surface-2:          #F4F4F5;
  --surface-inset:      #F8F8F9;
  --border:             #E4E4E7;
  --border-strong:      #D4D4D8;

  --text:               #18181B;
  --text-secondary:     #3F3F46;
  --text-muted:         #71717A;
  --text-subtle:        #A1A1AA;

  --accent:             #0D9488;
  --accent-hover:       #0F766E;
  --accent-fg:          #FFFFFF;
  --accent-soft-bg:     #CCFBF1;
  --accent-soft-fg:     #115E59;
  --accent-ring:        rgba(13, 148, 136, 0.32);

  --success:            #16A34A;
  --success-fg:         #FFFFFF;
  --warning:            #CA8A04;
  --danger:             #DC2626;
  --danger-soft-bg:     #FEE2E2;
  --danger-soft-fg:     #991B1B;

  --shadow-sm:          0 1px 2px rgba(15, 23, 42, 0.04),
                        0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow:             0 4px 12px rgba(15, 23, 42, 0.06),
                        0 12px 32px rgba(15, 23, 42, 0.08);

  /* ---------- Typography ---------- */
  --font-sans:          'Inter', system-ui, -apple-system, "Segoe UI",
                        Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono:          ui-monospace, "JetBrains Mono", "Cascadia Code",
                        SFMono-Regular, Menlo, Consolas, "Liberation Mono",
                        monospace;

  /* ---------- Spacing ---------- */
  --space-1: 4px;   --space-2: 8px;   --space-3: 12px;
  --space-4: 16px;  --space-5: 20px;  --space-6: 24px;
  --space-8: 32px;  --space-10: 40px; --space-12: 48px;
  --space-16: 64px; --space-20: 80px;

  /* ---------- Radius ---------- */
  --radius-sm:   6px;
  --radius:     10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-pill: 999px;

  /* ---------- Layout ---------- */
  --container:       720px;
  --container-wide:  960px;

  /* Smooth color transitions on theme flip */
  --transition-colors: background-color 0.18s ease,
                       border-color 0.18s ease,
                       color 0.18s ease;
}

/* ---------- Dark theme overrides ---------- */
/* 1) Honor OS preference unless explicitly overridden to light. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:                 #0F1115;
    --surface:            #18191D;
    --surface-2:          #1F2026;
    --surface-inset:      #131418;
    --border:             #2A2D33;
    --border-strong:      #3A3D44;

    --text:               #F4F4F5;
    --text-secondary:     #D4D4D8;
    --text-muted:         #A1A1AA;
    --text-subtle:        #71717A;

    --accent:             #2DD4BF;
    --accent-hover:       #5EEAD4;
    --accent-fg:          #042F2E;
    --accent-soft-bg:     rgba(45, 212, 191, 0.12);
    --accent-soft-fg:     #5EEAD4;
    --accent-ring:        rgba(45, 212, 191, 0.32);

    --success:            #4ADE80;
    --success-fg:         #052E1B;
    --warning:            #FACC15;
    --danger:             #F87171;
    --danger-soft-bg:     rgba(248, 113, 113, 0.12);
    --danger-soft-fg:     #FCA5A5;

    --shadow-sm:          0 1px 2px rgba(0, 0, 0, 0.3),
                          0 1px 3px rgba(0, 0, 0, 0.45);
    --shadow:             0 4px 12px rgba(0, 0, 0, 0.35),
                          0 16px 40px rgba(0, 0, 0, 0.55);
  }
}
/* 2) Explicit dark override (always wins over OS preference). */
:root[data-theme="dark"] {
  --bg:                 #0F1115;
  --surface:            #18191D;
  --surface-2:          #1F2026;
  --surface-inset:      #131418;
  --border:             #2A2D33;
  --border-strong:      #3A3D44;

  --text:               #F4F4F5;
  --text-secondary:     #D4D4D8;
  --text-muted:         #A1A1AA;
  --text-subtle:        #71717A;

  --accent:             #2DD4BF;
  --accent-hover:       #5EEAD4;
  --accent-fg:          #042F2E;
  --accent-soft-bg:     rgba(45, 212, 191, 0.12);
  --accent-soft-fg:     #5EEAD4;
  --accent-ring:        rgba(45, 212, 191, 0.32);

  --success:            #4ADE80;
  --success-fg:         #052E1B;
  --warning:            #FACC15;
  --danger:             #F87171;
  --danger-soft-bg:     rgba(248, 113, 113, 0.12);
  --danger-soft-fg:     #FCA5A5;

  --shadow-sm:          0 1px 2px rgba(0, 0, 0, 0.3),
                        0 1px 3px rgba(0, 0, 0, 0.45);
  --shadow:             0 4px 12px rgba(0, 0, 0, 0.35),
                        0 16px 40px rgba(0, 0, 0, 0.55);
}

/* =========================================================
   Reset + base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: var(--transition-colors);
}

main { flex: 1 0 auto; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--accent-hover); }

button {
  font: inherit;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--accent-soft-bg);
  color: var(--accent-soft-fg);
  border-radius: var(--radius-sm);
  padding: 1px 6px;
}

strong { font-weight: 700; }

/* =========================================================
   Accessibility helpers
   ========================================================= */
.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;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: var(--space-2);
  background: var(--accent);
  color: var(--accent-fg);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  font-weight: 600;
  z-index: 1000;
}
.skip-link:focus { left: var(--space-4); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* =========================================================
   Tool header (breadcrumb + theme toggle row)
   ========================================================= */
.tool-header {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-6) var(--space-6) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.breadcrumb { font-size: 13px; line-height: 1.4; }
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  color: var(--text-muted);
}
.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: var(--space-2);
  color: var(--text-subtle);
}
.breadcrumb a {
  color: var(--text-muted);
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.breadcrumb a:hover {
  color: var(--accent);
  border-bottom-color: currentColor;
}
.breadcrumb [aria-current="page"] {
  color: var(--text-secondary);
  font-weight: 500;
}

/* =========================================================
   Theme toggle
   ========================================================= */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: var(--transition-colors), transform 0.06s ease;
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--text);
  border-color: var(--border-strong);
}
.theme-toggle:active { transform: translateY(1px); }
.theme-toggle-icon {
  width: 18px;
  height: 18px;
}

/* Show the icon for the mode you'd switch TO. */
.theme-toggle-icon-sun  { display: none; }
.theme-toggle-icon-moon { display: inline-block; }

:root[data-theme="dark"] .theme-toggle-icon-sun  { display: inline-block; }
:root[data-theme="dark"] .theme-toggle-icon-moon { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle-icon-sun  { display: inline-block; }
  :root:not([data-theme="light"]) .theme-toggle-icon-moon { display: none; }
}

/* =========================================================
   Widget container
   ========================================================= */
.widget-wrap {
  display: flex;
  justify-content: center;
  padding: var(--space-10) var(--space-4) var(--space-16);
  position: relative;
}

.widget-card {
  width: 100%;
  max-width: 600px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow);
  transition: var(--transition-colors);
}

.widget-header {
  text-align: center;
  margin-bottom: var(--space-8);
}
.widget-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--accent);
  margin-bottom: var(--space-3);
}
.widget-header h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: var(--space-3);
}
.widget-lead {
  font-size: 15px;
  color: var(--text-muted);
}
@media (min-width: 640px) {
  .widget-header h1 { font-size: 36px; }
  .widget-lead { font-size: 16px; }
}

/* =========================================================
   Section eyebrow (small uppercase label, used for OPTIONS etc.)
   ========================================================= */
.section-eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  background: transparent;
  color: var(--text);
  transition: background 0.15s ease, color 0.15s ease,
              border-color 0.15s ease, transform 0.06s ease;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { cursor: not-allowed; opacity: 0.6; }

.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 700;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-primary:disabled {
  background: var(--surface-2);
  color: var(--text-subtle);
  opacity: 1;
}
.btn-primary.is-success {
  background: var(--success);
  color: var(--success-fg);
}

.btn-outline {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--surface);
}
.btn-outline:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-destructive {
  border-color: var(--border-strong);
  color: var(--danger);
  background: var(--surface);
}
.btn-destructive:hover:not(:disabled) {
  border-color: var(--danger);
  background: var(--danger-soft-bg);
  color: var(--danger);
}
.btn-destructive:disabled {
  border-color: var(--border);
  color: var(--text-subtle);
  opacity: 1;
}

.btn-block {
  width: 100%;
  padding: var(--space-4) var(--space-5);
  font-size: 15px;
}

.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* =========================================================
   Form primitives — checkbox row, range slider
   ========================================================= */
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
@media (min-width: 640px) {
  .checkbox-grid { grid-template-columns: 1fr 1fr; }
}

.checkbox {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition-colors);
}
.checkbox:hover { border-color: var(--border-strong); }
.checkbox:has(input:focus-visible) {
  border-color: var(--accent);
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
}
.checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s ease;
}
input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s ease;
}
input[type="range"]:focus-visible::-webkit-slider-thumb {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
}
input[type="range"]:focus-visible::-moz-range-thumb {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
}

/* Generic teal "pill" badge — useful for values, counts, etc. */
.pill {
  display: inline-flex;
  align-items: center;
  background: var(--accent-soft-bg);
  color: var(--accent-soft-fg);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

/* =========================================================
   Inline error / status messages
   ========================================================= */
.error-msg {
  margin-top: var(--space-3);
  background: var(--danger-soft-bg);
  border: 1px solid var(--danger);
  color: var(--danger-soft-fg);
  font-size: 14px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
}

/* =========================================================
   Attenda CTA — cross-product promo block

   Drop into a classroom-tool article between the SEO content
   and the related-tools section. ALWAYS renders in Attenda's
   brand colors (warm yellow + orange) regardless of the
   surrounding tool's light/dark theme — the visual disruption
   is intentional, signaling "this is a different product."
   ========================================================= */
.attenda-cta {
  max-width: var(--container);
  margin: var(--space-12) auto;
  padding: var(--space-6);
  background: #FEF3DC;
  border: 1px solid #FBE4A8;
  border-radius: var(--radius-lg);
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
  color: #18181B;
  font-family: var(--font-sans);
}
@media (max-width: 560px) {
  .attenda-cta {
    flex-direction: column;
    text-align: left;
  }
}

.attenda-cta-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.10);
}

.attenda-cta-content {
  flex: 1;
  min-width: 0;
}

.attenda-cta-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #B45309;
  margin: 0 0 6px;
}

.attenda-cta h2,
.attenda-cta-content h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #18181B;
  margin: 0 0 8px;
  line-height: 1.25;
  padding: 0;
  border: none;
}

.attenda-cta p {
  font-size: 14px;
  color: #3F3F46;
  line-height: 1.55;
  margin: 0 0 14px;
  max-width: 540px;
}

.attenda-cta-link {
  display: inline-block;
  background: #F59E3B;
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 800;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.06s ease,
              box-shadow 0.15s ease;
  box-shadow: 0 2px 8px rgba(245, 158, 59, 0.28);
}
.attenda-cta-link:hover {
  background: #D97706;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.32);
}
.attenda-cta-link:active { transform: translateY(1px); }

/* =========================================================
   Toast (transient confirmation)
   ========================================================= */
.toast {
  position: fixed;
  left: 50%;
  bottom: var(--space-6);
  transform: translateX(-50%);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  box-shadow: var(--shadow);
  z-index: 100;
  pointer-events: none;
}
.toast.is-success {
  background: var(--success);
  color: var(--success-fg);
  border-color: var(--success);
}
.toast.is-error {
  background: var(--danger);
  color: #FFFFFF;
  border-color: var(--danger);
}

/* =========================================================
   SEO article
   ========================================================= */
.article {
  max-width: var(--container);
  margin: var(--space-6) auto 0;
  padding: 0 var(--space-6) var(--space-20);
  color: var(--text-secondary);
}
.article section { margin-bottom: var(--space-12); }
.article h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: var(--space-5);
  padding-top: var(--space-8);
  border-top: 1px solid var(--border);
}
.article section:first-child h2 {
  border-top: none;
  padding-top: 0;
}
.article p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}
.article ul,
.article ol {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-4);
}
.article ul li,
.article ol li {
  position: relative;
  padding-left: 22px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
}
.article ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.7em;
  width: 8px;
  height: 1px;
  background: var(--accent);
}
.article ol {
  counter-reset: ol-counter;
}
.article ol li {
  counter-increment: ol-counter;
}
.article ol li::before {
  content: counter(ol-counter) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 600;
  color: var(--accent);
}
.article a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent-ring);
}
.article a:hover {
  color: var(--accent-hover);
  border-bottom-color: currentColor;
}

.article details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-3);
  transition: var(--transition-colors);
}
.article details[open] { border-color: var(--accent); }
.article details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  font-size: 15px;
  list-style: none;
  position: relative;
  padding-right: 28px;
}
.article details summary::-webkit-details-marker { display: none; }
.article details summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--accent);
  transition: transform 0.2s ease;
}
.article details[open] summary::after { content: "−"; }
.article details p {
  margin-top: var(--space-3);
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.related { margin-top: var(--space-2); }

/* =========================================================
   Category hub layout (e.g. /tools/creators/, /tools/instagram/)
   ========================================================= */
.hub-intro {
  max-width: var(--container);
  margin: var(--space-10) auto var(--space-6);
  padding: 0 var(--space-6);
  text-align: center;
}
.hub-intro h1 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: var(--space-4);
}
.hub-lead {
  max-width: 560px;
  margin: 0 auto;
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.55;
}
@media (max-width: 640px) {
  .hub-intro h1 { font-size: 32px; }
  .hub-lead { font-size: 15px; }
}

.hub-grid {
  max-width: var(--container-wide);
  margin: var(--space-8) auto var(--space-12);
  padding: 0 var(--space-6);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 720px) {
  .hub-grid { grid-template-columns: repeat(2, 1fr); }
}

.hub-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: var(--transition-colors), transform 0.12s ease,
              box-shadow 0.15s ease;
}
.hub-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.hub-card-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
}
.hub-card h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
}
.hub-card p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}
.hub-card-arrow {
  margin-top: auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}
.hub-card:hover .hub-card-arrow { color: var(--accent-hover); }

/* =========================================================
   Footer credit
   ========================================================= */
.tool-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-8) var(--space-6) var(--space-10);
  background: var(--surface-inset);
  transition: var(--transition-colors);
}
.tool-footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.brand-credit {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 14px;
  color: var(--text-muted);
  border: none;
  transition: color 0.15s ease;
}
.brand-credit:hover { color: var(--accent); }
.brand-credit strong { color: var(--text); font-weight: 700; }
.brand-credit svg { color: var(--accent); transition: color 0.15s ease; }
.brand-credit:hover svg { color: var(--accent-hover); }

.footer-nav {
  display: flex;
  gap: var(--space-5);
  flex-wrap: wrap;
  font-size: 13px;
}
.footer-nav a {
  color: var(--text-muted);
  border-bottom: 1px solid transparent;
}
.footer-nav a:hover {
  color: var(--accent);
  border-bottom-color: currentColor;
}

/* =========================================================
   Print credit — baked-in AnchorKite attribution

   Every tool that produces a printout or a downloadable
   handout includes a .print-credit line inside its printable
   area. It is NOT optional: the credit always rides along to
   the printed page so a sheet handed around a classroom keeps
   its source. (Downloaded raw assets that would be degraded by
   a watermark — e.g. a bare QR image — are the one exception;
   see the QR tool.)

   Fixed neutral "paper" colors because this renders inside
   white print sheets / white preview surfaces, not themed
   surfaces — theme-based text vars would vanish on white.
   ========================================================= */
.print-credit {
  margin-top: 24px;
  padding-top: 10px;
  border-top: 1px solid #D4D4D8;
  font-size: 11px;
  line-height: 1.4;
  color: #71717A;
  text-align: center;
  font-family: var(--font-sans);
}
.print-credit a {
  color: inherit;
  border: none;
}
.print-credit strong { color: #3F3F46; font-weight: 700; }
@media print {
  .print-credit {
    border-top-color: #999 !important;
    color: #555 !important;
    page-break-inside: avoid;
  }
  .print-credit strong { color: #000 !important; }
}

/* =========================================================
   Email-capture blocks (notify + concept)

   Two patterns:
   - .notify-block — general "tell me about new tools"
     newsletter. Drops into category hubs and the tools index.
     Subdued visual weight; ambient invitation, not a CTA.
   - .concept-block — per-tool concept-validation form.
     For tools where there's a natural "I'd love to save this"
     moment (custom-content games, etc.). Slightly more
     prominent than .notify-block; uses accent-soft styling.

   Both pull from the shared tokens so they flip with theme.
   Both share the .notify-form / .notify-status styling so the
   form pattern is identical between them.
   ========================================================= */
.notify-block,
.concept-block {
  max-width: var(--container);
  margin: var(--space-12) auto;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  font-family: var(--font-sans);
  border: 1px solid var(--border);
}
.notify-block {
  background: var(--surface-2);
}
.concept-block {
  background: var(--accent-soft-bg);
  border-color: var(--accent);
  margin-top: var(--space-10);
  margin-bottom: var(--space-10);
}

.notify-block h2,
.concept-block h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  line-height: 1.3;
  padding: 0;
  border: none;
}
.notify-block h2 { color: var(--text); }
.concept-block h2 { color: var(--accent-soft-fg); }

.notify-block-lead,
.concept-block-lead {
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 var(--space-4);
  max-width: 540px;
}
.notify-block-lead { color: var(--text-secondary); }
.concept-block-lead { color: var(--accent-soft-fg); }

.notify-form {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}
.notify-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 10px 14px;
  font: inherit;
  font-size: 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: var(--transition-colors);
}
.notify-form input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.notify-form button { flex-shrink: 0; }

.notify-status {
  font-size: 14px;
  color: var(--accent-soft-fg);
  background: var(--accent-soft-bg);
  border: 1px solid var(--accent);
  padding: 12px 14px;
  border-radius: var(--radius);
  margin: 0 0 var(--space-3);
  line-height: 1.45;
}
.notify-status.is-error {
  color: var(--danger-soft-fg);
  background: var(--danger-soft-bg);
  border-color: var(--danger);
}

.notify-block-note,
.concept-block-note {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
.concept-block-note { color: var(--accent-soft-fg); opacity: 0.85; }

/* =========================================================
   Mobile tweaks
   ========================================================= */
@media (max-width: 640px) {
  .tool-header { padding: var(--space-5) var(--space-5) 0; }
  .widget-wrap { padding: var(--space-6) var(--space-4) var(--space-12); }
  .widget-card { padding: var(--space-5); border-radius: var(--radius-lg); }
  .widget-header h1 { font-size: 28px; }
  .article { padding: 0 var(--space-5) var(--space-16); }
  .article h2 { font-size: 22px; padding-top: var(--space-6); }
  .tool-footer-inner { flex-direction: column; align-items: flex-start; }
}
