:root {
  --paper: #f8f8f5;
  --ink: #181a18;
  --muted: #696d68;
  --faint: #a8aca6;
  --line: #dedfd9;
  --accent: #b8ee62;
  --accent-deep: #294b18;
  --error-bg: #fff1ed;
  --error-ink: #692b1e;
  --measure: 47rem;
}

* {
  box-sizing: border-box;
}

/* Keep the native hidden state authoritative over component display rules. */
[hidden] {
  display: none !important;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "Helvetica Neue", "Noto Sans SC",
    "PingFang SC", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-width: 20rem;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgb(184 238 98 / 8%), transparent 26rem),
    var(--paper);
}

a {
  color: inherit;
}

.page-shell {
  width: min(calc(100% - 3rem), 69rem);
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 6.5rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 0.72rem;
  align-items: center;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  text-decoration: none;
}

.brand-icon {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  object-fit: cover;
}

.locale-pill {
  min-width: 2.6rem;
  padding: 0.38rem 0.65rem 0.33rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-align: center;
}

main {
  padding: 7.5rem 0 8rem;
}

.policy {
  width: min(100%, var(--measure));
  margin: 0 auto;
}

.eyebrow {
  margin-bottom: 1.15rem;
  color: var(--accent-deep);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1 {
  max-width: 40rem;
  margin: 0;
  font-family: Iowan Old Style, Baskerville, "Songti SC", "Noto Serif SC", serif;
  font-size: clamp(3.2rem, 8vw, 5.8rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.96;
}

.policy-meta {
  display: flex;
  gap: 3.5rem;
  margin: 3rem 0 2.8rem;
}

.policy-meta div {
  display: grid;
  gap: 0.35rem;
}

.policy-meta dt {
  color: var(--faint);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.policy-meta dd {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
}

.rule {
  position: relative;
  height: 1px;
  margin-bottom: 4.5rem;
  background: var(--line);
}

.rule span {
  position: absolute;
  top: -2px;
  left: 0;
  width: 3.8rem;
  height: 5px;
  border-radius: 999px;
  background: var(--accent);
}

.policy-content {
  color: #343734;
  font-family: Iowan Old Style, Baskerville, "Songti SC", "Noto Serif SC", serif;
  font-size: 1.07rem;
  line-height: 1.92;
}

.policy-content h2 {
  scroll-margin-top: 2rem;
  margin: 4.2rem 0 1.35rem;
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "Helvetica Neue", "Noto Sans SC",
    "PingFang SC", sans-serif;
  font-size: 1.26rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.4;
}

.policy-content h2:first-child {
  margin-top: 0;
}

.policy-content p {
  margin: 0 0 1.45rem;
}

.policy-content ul {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.7rem;
  padding-left: 1.25rem;
}

.policy-content li::marker {
  color: var(--accent-deep);
}

.loading {
  display: grid;
  gap: 0.8rem;
}

.skeleton {
  width: 100%;
  height: 0.85rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #e7e8e2 25%, #f2f2ee 45%, #e7e8e2 65%);
  background-size: 240% 100%;
  animation: shimmer 1.5s infinite linear;
}

.skeleton-heading {
  width: 34%;
  height: 1.1rem;
  margin-bottom: 1rem;
}

.skeleton-heading.second { margin-top: 2.6rem; }
.skeleton-short { width: 61%; }
.skeleton-medium { width: 78%; }

.error-card {
  padding: 2rem;
  border: 1px solid rgb(105 43 30 / 14%);
  border-radius: 1rem;
  background: var(--error-bg);
  color: var(--error-ink);
}

.error-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.error-card h2 {
  margin: 0 0 0.7rem;
  font-size: 1.2rem;
}

.error-card p:not(.error-kicker) {
  margin: 0 0 1.25rem;
  line-height: 1.6;
}

.error-card button {
  appearance: none;
  padding: 0.68rem 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
}

.error-card button:hover { background: #343734; }
.error-card button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 7.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
}

.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;
}

@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@media (max-width: 42rem) {
  .page-shell { width: min(calc(100% - 2rem), 69rem); }
  .site-header { min-height: 5.2rem; }
  main { padding: 5rem 0 5.5rem; }
  h1 { font-size: clamp(2.9rem, 15vw, 4.4rem); }
  .policy-meta { gap: 2rem; margin-top: 2.4rem; }
  .rule { margin-bottom: 3.2rem; }
  .policy-content { font-size: 1rem; line-height: 1.85; }
  .policy-content h2 { margin-top: 3.3rem; }
  .site-footer { flex-wrap: wrap; gap: 0.5rem; padding: 2rem 0; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  body { background: white; }
  .page-shell { width: 100%; }
  .site-header, .site-footer { display: none; }
  main { padding: 0; }
  .policy { width: 100%; }
  h1 { font-size: 3rem; }
  .policy-content { font-size: 10pt; }
  .policy-content h2 { break-after: avoid; }
}
