:root {
  --ink: #1f2d22;
  --muted: #687269;
  --paper: #fffdf4;
  --paper-deep: #f4f3dc;
  --green: #3f6b4d;
  --green-soft: #dfead6;
  --yellow: #edb840;
  --yellow-soft: #fae7a8;
  --line: rgba(31, 45, 34, 0.14);
  --shadow: 0 24px 80px rgba(49, 62, 42, 0.12);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(237, 184, 64, 0.19), transparent 24rem),
    radial-gradient(circle at 88% 18%, rgba(115, 157, 109, 0.17), transparent 28rem),
    var(--paper-deep);
  font-family: "Avenir Next", Avenir, "Helvetica Neue", sans-serif;
  line-height: 1.7;
}

a {
  color: var(--green);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: #274832;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(237, 184, 64, 0.72);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 70px;
  padding: 0.75rem clamp(1rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 244, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(31, 45, 34, 0.28);
  border-radius: 13px;
  background: var(--yellow-soft);
  font: 700 1.1rem/1 Georgia, serif;
  transform: rotate(-2deg);
}

.brand-mark::after {
  position: absolute;
  right: -7px;
  top: -7px;
  width: 15px;
  height: 15px;
  border: 2px solid var(--yellow);
  border-radius: 50%;
  content: "";
}

.header-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  font-size: 0.88rem;
  font-weight: 650;
}

.header-nav a {
  color: var(--ink);
  text-decoration: none;
}

.language-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.language-switch button {
  min-width: 44px;
  padding: 0.35rem 0.7rem;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
}

.language-switch button[aria-pressed="true"] {
  color: var(--paper);
  background: var(--green);
}

.hero {
  position: relative;
  width: min(1120px, calc(100% - 2rem));
  margin: clamp(2.5rem, 8vw, 6rem) auto 2.5rem;
  overflow: hidden;
  padding: clamp(2rem, 6vw, 5rem);
  border: 1px solid var(--line);
  border-radius: 34px;
  background: rgba(255, 253, 244, 0.9);
  box-shadow: var(--shadow);
}

.hero::before {
  position: absolute;
  right: clamp(-4rem, -2vw, -1rem);
  top: clamp(-5rem, -3vw, -2rem);
  width: clamp(13rem, 30vw, 22rem);
  aspect-ratio: 1;
  border: clamp(1.2rem, 3vw, 2.5rem) solid rgba(237, 184, 64, 0.32);
  border-radius: 50%;
  content: "";
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

h1 {
  position: relative;
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 5.8rem);
  font-weight: 500;
}

.hero-copy {
  position: relative;
  max-width: 670px;
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.meta-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.page-grid {
  display: grid;
  grid-template-columns: 230px minmax(0, 760px);
  gap: clamp(2rem, 6vw, 5rem);
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto clamp(4rem, 10vw, 8rem);
  align-items: start;
}

.toc {
  position: sticky;
  top: 98px;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 253, 244, 0.68);
}

.toc strong {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.toc a {
  display: block;
  padding: 0.35rem 0;
  color: var(--muted);
  font-size: 0.86rem;
  text-decoration: none;
}

.toc a:hover {
  color: var(--green);
}

.legal-card {
  padding: clamp(1.5rem, 5vw, 4rem);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 18px 60px rgba(49, 62, 42, 0.08);
}

.legal-card section {
  scroll-margin-top: 96px;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--line);
}

.legal-card section:first-child {
  padding-top: 0;
}

.legal-card section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.45rem, 4vw, 2rem);
  font-weight: 600;
}

h3 {
  margin: 1.5rem 0 0.45rem;
  font-size: 1.05rem;
}

p,
li {
  color: #39433b;
}

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

li + li {
  margin-top: 0.55rem;
}

.note {
  margin: 1.25rem 0;
  padding: 1rem 1.15rem;
  border-left: 4px solid var(--yellow);
  border-radius: 4px 16px 16px 4px;
  background: rgba(250, 231, 168, 0.32);
}

.placeholder {
  padding: 0.08em 0.35em;
  border: 1px dashed #9c6b00;
  border-radius: 5px;
  color: #754f00;
  background: #fff3c7;
  font-weight: 700;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto clamp(5rem, 10vw, 8rem);
}

.link-card {
  min-height: 210px;
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--ink);
  background: rgba(255, 253, 244, 0.88);
  box-shadow: 0 16px 50px rgba(49, 62, 42, 0.07);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.link-card:hover {
  color: var(--ink);
  transform: translateY(-4px) rotate(-0.3deg);
  box-shadow: 0 22px 60px rgba(49, 62, 42, 0.12);
}

.link-card:nth-child(2) {
  background: rgba(223, 234, 214, 0.84);
}

.link-card:nth-child(3) {
  background: rgba(250, 231, 168, 0.66);
}

.link-card .number {
  color: var(--green);
  font: 700 0.78rem/1 Georgia, serif;
  letter-spacing: 0.12em;
}

.link-card h2 {
  margin-top: 2rem;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem clamp(1rem, 4vw, 3.5rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 253, 244, 0.7);
  font-size: 0.82rem;
}

[data-lang-content][hidden] {
  display: none !important;
}

@media (max-width: 800px) {
  .site-header {
    align-items: flex-start;
  }

  .header-nav > a {
    display: none;
  }

  .hero {
    border-radius: 24px;
  }

  .page-grid {
    display: block;
  }

  .toc {
    position: static;
    margin-bottom: 1rem;
  }

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .link-card {
    transition: none;
  }
}

@media print {
  body {
    background: #fff;
  }

  .site-header,
  .toc,
  .site-footer {
    display: none;
  }

  .hero,
  .legal-card {
    width: 100%;
    margin: 0;
    border: 0;
    box-shadow: none;
  }

  .page-grid {
    display: block;
    width: 100%;
  }
}
