:root {
  color-scheme: light dark;
  --paper: #f3eddf;
  --paper-raised: #fffaf0;
  --ink: #171914;
  --muted: #62665d;
  --rule: color-mix(in srgb, var(--ink) 18%, transparent);
  --cyan: #30d5e8;
  --lime: #b8df3b;
  --coral: #ff715b;
  --blue: #5078ee;
  --shadow: 6px 6px 0 var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, transparent 0 97%, color-mix(in srgb, var(--cyan) 28%, transparent) 97% 100%),
    var(--paper);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  line-height: 1.62;
}

a {
  color: inherit;
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.2em;
}

.shell {
  width: min(820px, calc(100% - 40px));
  margin: 0 auto;
  padding: 30px 0 92px;
}

.draft-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
  padding: 11px 14px;
  border: 2px solid var(--ink);
  background: var(--coral);
  color: #12130f;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 var(--ink);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  text-decoration: none;
  letter-spacing: -0.025em;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 28px;
  place-items: center;
  border: 2px solid var(--ink);
  background: var(--lime);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
}

.language-switcher {
  display: flex;
  gap: 6px;
}

.language-switcher button {
  min-width: 44px;
  min-height: 38px;
  padding: 6px 10px;
  border: 1.5px solid var(--ink);
  border-radius: 0;
  color: var(--ink);
  background: var(--paper-raised);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.language-switcher button[aria-pressed="true"] {
  background: var(--cyan);
  box-shadow: 3px 3px 0 var(--ink);
  transform: translate(-1px, -1px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2 {
  line-height: 1.08;
  text-wrap: balance;
}

h1 {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(3rem, 10vw, 6.8rem);
  font-weight: 950;
  letter-spacing: -0.065em;
}

h2 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  letter-spacing: -0.03em;
}

.lede {
  max-width: 64ch;
  margin: 1.5rem 0 1rem;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.24rem);
}

.meta {
  margin: 0 0 3rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 36px;
}

.card,
section.policy-section {
  border: 2px solid var(--ink);
  background: var(--paper-raised);
  box-shadow: var(--shadow);
}

.card {
  min-height: 190px;
  padding: 22px;
  text-decoration: none;
}

.card:nth-child(1) {
  background: var(--lime);
}

.card:nth-child(2) {
  background: var(--cyan);
}

.card p,
.policy-section p,
.policy-section li {
  font-size: 1rem;
}

.card-arrow {
  display: block;
  margin-top: 24px;
  font-size: 1.8rem;
  font-weight: 900;
}

.policy-list {
  display: grid;
  gap: 18px;
  margin-top: 42px;
}

section.policy-section {
  padding: 22px 24px;
}

section.policy-section:nth-child(4n + 1) {
  border-top: 9px solid var(--lime);
}

section.policy-section:nth-child(4n + 2) {
  border-top: 9px solid var(--cyan);
}

section.policy-section:nth-child(4n + 3) {
  border-top: 9px solid var(--coral);
}

section.policy-section:nth-child(4n) {
  border-top: 9px solid var(--blue);
}

.policy-section p:last-child,
.policy-section ul:last-child {
  margin-bottom: 0;
}

code {
  padding: 0.08em 0.28em;
  border: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper) 70%, white);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 52px;
  padding-top: 22px;
  border-top: 2px solid var(--ink);
  color: var(--muted);
  font-size: 0.86rem;
}

[data-language="zh"] {
  display: none;
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 28px, 820px);
    padding-top: 20px;
  }

  .draft-notice,
  .topbar {
    align-items: flex-start;
  }

  .topbar {
    margin-bottom: 42px;
  }

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

  section.policy-section {
    padding: 20px;
    box-shadow: 4px 4px 0 var(--ink);
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #191b17;
    --paper-raised: #242720;
    --ink: #f2eddc;
    --muted: #b9b5a9;
    --cyan: #36bccc;
    --lime: #96ba35;
    --coral: #df705c;
    --blue: #7f9cff;
  }

  .draft-notice,
  .card:nth-child(1),
  .card:nth-child(2),
  .brand-mark,
  .language-switcher button[aria-pressed="true"] {
    color: #11130f;
  }
}

@media print {
  .draft-notice,
  .language-switcher {
    display: none;
  }

  body {
    background: white;
  }

  .card,
  section.policy-section {
    box-shadow: none;
  }
}
