:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f6f7f9;
  --text: #16181d;
  --muted: #5c6370;
  --border: #e3e6ea;
  --accent: #4f46e5;
  --accent-soft: #eef2ff;
  --warn-bg: #fff8e6;
  --warn-border: #f0d9a0;
  --max: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1014;
    --surface: #171a20;
    --text: #e8eaed;
    --muted: #9aa1ad;
    --border: #272b33;
    --accent: #a5b4fc;
    --accent-soft: #1b1f33;
    --warn-bg: #241f12;
    --warn-border: #4a3c1c;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a {
  color: var(--accent);
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  z-index: 10;
}

header.site {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

header.site .inner,
main,
footer.site .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

header.site .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.wordmark {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
}

nav.site a {
  margin-left: 1.1rem;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--muted);
}

nav.site a:hover,
nav.site a[aria-current="page"] {
  color: var(--text);
}

nav.site a:first-child {
  margin-left: 0;
}

main {
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}

h1 {
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.2rem;
  margin: 2.5rem 0 0.75rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1rem;
  margin: 1.75rem 0 0.5rem;
}

.lede {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.meta strong {
  color: var(--text);
  font-weight: 600;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.93rem;
}

.scroll {
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
}

.scroll table {
  margin: 0;
  min-width: 30rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
  background: var(--surface);
}

.note {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  margin: 1.5rem 0;
  font-size: 0.93rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  margin: 1.5rem 0;
}

.card h2,
.card h3 {
  margin-top: 0;
}

.tiles {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  margin: 2rem 0;
  padding: 0;
  list-style: none;
}

.tiles a {
  display: block;
  height: 100%;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
}

.tiles a:hover {
  border-color: var(--accent);
}

.tiles strong {
  display: block;
  margin-bottom: 0.25rem;
}

.tiles span {
  font-size: 0.9rem;
  color: var(--muted);
}

.faq {
  margin: 1.5rem 0;
}

.faq details {
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before {
  content: "＋";
  margin-right: 0.6rem;
  color: var(--muted);
  font-weight: 400;
}

.faq details[open] summary::before {
  content: "－";
}

.faq p {
  margin: 0.6rem 0 0;
  color: var(--muted);
}

.mail {
  display: inline-block;
  padding: 0.55rem 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

@media (prefers-color-scheme: dark) {
  .mail {
    color: #0e1014;
  }
}

footer.site {
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.87rem;
  color: var(--muted);
}

footer.site .inner {
  padding-top: 2rem;
  padding-bottom: 2.5rem;
}

footer.site a {
  color: var(--muted);
  margin-right: 1rem;
}

footer.site p {
  margin: 0.75rem 0 0;
}

ul,
ol {
  padding-left: 1.3rem;
}

li {
  margin: 0.3rem 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--surface);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

/* A card or note whose last paragraph would otherwise push a gap past its own
   border. Kept here rather than inline so the CSP can forbid style attributes. */
.card > p:last-child,
.note > p:last-child {
  margin-bottom: 0;
}

.note > p:first-child {
  margin-top: 0;
}
