:root {
  color-scheme: light;
  --bg: #f8f3e9;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --ink: #17203e;
  --ink-strong: #0d1532;
  --muted: #626a7f;
  --border: #dcd4c7;
  --brand: #4d55d9;
  --brand-strong: #373eba;
  --brand-soft: #e9eaff;
  --secondary: #087f83;
  --secondary-soft: #dff5f1;
  --accent: #d85848;
  --focus: #0f7bd8;
  --shadow: 0 18px 50px rgba(43, 36, 24, .1);
}

html[data-theme="midnight"] {
  color-scheme: dark;
  --bg: #0b1020;
  --surface: #11182d;
  --surface-strong: #151d35;
  --ink: #eef2ff;
  --ink-strong: #ffffff;
  --muted: #aab3ca;
  --border: #2f3b5c;
  --brand: #8a91ff;
  --brand-strong: #aab0ff;
  --brand-soft: #262d5d;
  --secondary: #60d9cb;
  --secondary-soft: #163e3f;
  --accent: #ff8a78;
  --focus: #8ecbff;
  --shadow: 0 18px 50px rgba(0, 0, 0, .3);
}

html[data-theme="raid"] {
  color-scheme: light;
  --bg: #eaf4ff;
  --surface: #f6fbff;
  --surface-strong: #ffffff;
  --ink: #0c2850;
  --ink-strong: #061c39;
  --muted: #506b89;
  --border: #bdd8ef;
  --brand: #146dcc;
  --brand-strong: #0757aa;
  --brand-soft: #dcecff;
  --secondary: #007b78;
  --secondary-soft: #d9f4f1;
  --accent: #d3465b;
  --focus: #005fc4;
  --shadow: 0 18px 50px rgba(12, 69, 120, .12);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 90% 5%, color-mix(in srgb, var(--secondary-soft) 78%, transparent), transparent 28rem),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.68;
}

a {
  color: var(--brand-strong);
  text-underline-offset: 3px;
}

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

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 50;
  top: 8px;
  left: 8px;
  transform: translateY(-150%);
  padding: 9px 14px;
  border-radius: 10px;
  background: var(--ink-strong);
  color: var(--bg);
  font-weight: 800;
}

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

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 32px), 1080px);
  min-height: 70px;
  margin: 0 auto;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-strong);
  font-weight: 900;
  letter-spacing: -.03em;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
}

.brand span span {
  color: var(--brand);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tool-link {
  color: var(--brand-strong);
  font-size: .84rem;
  font-weight: 850;
  text-decoration: none;
}

.theme-switcher {
  display: flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-strong);
}

.theme-option {
  display: grid;
  width: 31px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.theme-option[aria-pressed="true"] {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.theme-option svg {
  width: 15px;
  height: 15px;
}

.page-shell {
  width: min(calc(100% - 32px), 860px);
  margin: 0 auto;
  padding: 68px 0 88px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: .78rem;
  gap: 8px;
}

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

.page-label {
  display: inline-block;
  margin: 0 0 12px;
  color: var(--secondary);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--ink-strong);
  line-height: 1.18;
  text-wrap: balance;
}

h1 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(2.45rem, 7vw, 4.7rem);
  letter-spacing: -.06em;
}

.page-lede {
  max-width: 720px;
  margin: 0 0 32px;
  color: var(--muted);
  font-size: clamp(1.03rem, 2vw, 1.18rem);
}

.updated {
  display: inline-block;
  margin-bottom: 40px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--secondary-soft);
  color: var(--secondary);
  font-size: .72rem;
  font-weight: 800;
}

.content-card {
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.content-card section + section {
  margin-top: 38px;
  padding-top: 34px;
  border-top: 1px solid var(--border);
}

.content-card h2 {
  margin: 0 0 12px;
  font-size: 1.45rem;
  letter-spacing: -.025em;
}

.content-card h3 {
  margin: 22px 0 8px;
  font-size: 1.02rem;
}

.content-card p,
.content-card li {
  color: var(--muted);
  font-size: .94rem;
}

.content-card p {
  margin: 0 0 13px;
}

.content-card p:last-child {
  margin-bottom: 0;
}

.content-card ul,
.content-card ol {
  margin: 12px 0 0;
  padding-left: 22px;
}

.content-card li + li {
  margin-top: 8px;
}

.callout {
  margin: 25px 0;
  padding: 17px 18px;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--border));
  border-left: 5px solid var(--brand);
  border-radius: 13px;
  background: var(--brand-soft);
}

.callout strong {
  color: var(--ink-strong);
}

.principles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 22px 0 0;
  padding: 0;
  gap: 12px;
  list-style: none;
}

.principles li {
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.principles strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink-strong);
}

.feedback-form {
  display: grid;
  gap: 18px;
}

.feedback-form label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-strong);
  font-size: .85rem;
  font-weight: 850;
}

.feedback-form input,
.feedback-form select,
.feedback-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  padding: 11px 12px;
}

.feedback-form textarea {
  min-height: 170px;
  resize: vertical;
}

.field-note {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: .73rem;
}

.submit-button,
.home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid var(--brand);
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  padding: 10px 18px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.submit-button:hover,
.home-button:hover {
  background: var(--brand-strong);
}

.feedback-status {
  min-height: 1.5em;
  margin: 0;
  color: var(--secondary);
  font-size: .83rem;
  font-weight: 750;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 32px), 1080px);
  min-height: 90px;
  margin: 0 auto;
  color: var(--muted);
  font-size: .75rem;
  gap: 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--brand-strong);
  text-decoration: underline;
}

@media (max-width: 640px) {
  .tool-link {
    display: none;
  }

  .page-shell {
    padding-top: 44px;
  }

  .principles {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    display: block;
    padding: 24px 0;
  }

  .footer-links {
    margin-top: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

