/* aiedu.guide: one stylesheet, no framework */
:root {
  --text: #1a1a1a;
  --muted: #555;
  --bg: #ffffff;
  --soft: #f5f6f8;
  --border: #dde1e6;
  --link: #0b57d0;
  --link-visited: #6a2fb5;
  --accent: #0b57d0;
  --code-bg: #f3f4f6;
  --measure: 720px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #e8e8e8;
    --muted: #b0b0b0;
    --bg: #121416;
    --soft: #1c1f23;
    --border: #33383e;
    --link: #8ab4f8;
    --link-visited: #c58af9;
    --accent: #8ab4f8;
    --code-bg: #1c1f23;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-wrap: break-word;
}
a { color: var(--link); text-underline-offset: 0.15em; }
a:visited { color: var(--link-visited); }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--bg); padding: .5rem 1rem; z-index: 10; }
.skip-link:focus { left: 1rem; top: 1rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--border); }
.header-inner, .footer-inner, .content {
  max-width: var(--measure);
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .5rem 1.25rem; padding-top: .9rem; padding-bottom: .9rem;
}
.brand { font-weight: 700; font-size: 1.15rem; text-decoration: none; color: var(--text); }
.brand:visited { color: var(--text); }
.site-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; }
.site-nav a { text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }

/* Content */
.content { padding-top: 1.5rem; padding-bottom: 3rem; }
h1, h2, h3 { line-height: 1.25; margin: 2rem 0 .75rem; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.3rem); margin-top: .5rem; letter-spacing: -0.01em; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
p, ul, ol { margin: 0 0 1rem; }
li { margin-bottom: .35rem; }
.lede { font-size: 1.15rem; }
.kicker { text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; color: var(--muted); margin: 0; }
.meta { color: var(--muted); font-size: .92rem; }
.note, .disclosure-inline { color: var(--muted); font-size: .93rem; }
.answer {
  background: var(--soft); border-left: 4px solid var(--accent);
  padding: .75rem 1rem; border-radius: 0 6px 6px 0;
}
section { scroll-margin-top: 1rem; }

/* Breadcrumbs */
.breadcrumbs ol { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; font-size: .9rem; color: var(--muted); }
.breadcrumbs li { margin: 0; }
.breadcrumbs li + li::before { content: "/"; padding: 0 .5rem; color: var(--muted); }

/* TOC */
.toc { border: 1px solid var(--border); border-radius: 8px; padding: .75rem 1.25rem; margin: 1.5rem 0; }
.toc-title { font-size: 1rem; margin: .25rem 0 .5rem; }
.toc ol { margin: 0; padding-left: 1.25rem; font-size: .95rem; }

/* Code */
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: .9em; background: var(--code-bg); padding: .1em .3em; border-radius: 4px;
  overflow-wrap: anywhere;
}
pre {
  background: var(--code-bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 1rem; overflow-x: auto; max-width: 100%; line-height: 1.45; margin: 0 0 1.25rem;
}
pre code { background: none; padding: 0; font-size: .85rem; overflow-wrap: normal; white-space: pre; }

/* Tables: scroll inside their own box, never widen the page */
.table-wrap { overflow-x: auto; max-width: 100%; margin: 0 0 1.25rem; border: 1px solid var(--border); border-radius: 8px; }
.table-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; vertical-align: top; padding: .55rem .75rem; border-bottom: 1px solid var(--border); }
thead th { background: var(--soft); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

/* Home */
.guide-list { list-style: none; padding: 0; }
.guide-list li { border: 1px solid var(--border); border-radius: 8px; padding: .9rem 1.1rem; margin-bottom: .9rem; }
.guide-list h3 { margin: 0 0 .35rem; font-size: 1.1rem; }
.guide-list p { margin: 0; color: var(--muted); }
.maker-box { background: var(--soft); border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.25rem; margin-top: 2.5rem; }
.maker-box h2 { font-size: 1.1rem; margin-top: .25rem; }
.maker-box p { margin-bottom: .25rem; }
.sources { border-top: 1px solid var(--border); margin-top: 2.5rem; font-size: .95rem; }
.contact-email { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.05rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--soft); }
.footer-inner { padding-top: 1.25rem; padding-bottom: 1.5rem; }
.footer-links { list-style: none; padding: 0; margin: 0 0 .75rem; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.footer-links li { margin: 0; }
.footer-note { color: var(--muted); font-size: .85rem; margin: 0 0 .4rem; }

@media (max-width: 480px) {
  body { font-size: 1rem; }
  .header-inner, .footer-inner, .content { padding-left: 1rem; padding-right: 1rem; }
  h2 { font-size: 1.25rem; }
  /* Tap targets: at least ~24px tall on small screens (desktop look unchanged) */
  .footer-links a, .breadcrumbs a, .toc a { display: inline-block; padding: .2rem 0; min-height: 24px; }
  .breadcrumbs ol { align-items: baseline; }
}

/* Keep identifiers intact inside tables; the table scrolls in its own box if needed */
.table-wrap code { white-space: nowrap; overflow-wrap: normal; }
