:root {
  color-scheme: light;
  --bg: #f5efe6;
  --paper: #fffdf9;
  --paper-soft: #fbf7f1;
  --ink: #241b17;
  --text: #241b17;
  --muted: #6f625a;
  --line: rgba(36, 27, 23, 0.14);
  --bronze: #9a5a25;
  --bronze-dark: #7d431c;
  --bronze-soft: #f3e5d7;
  --purple: #6b3bf0;
  --purple-soft: #eee8ff;
  --shadow: 0 32px 90px rgba(64, 43, 32, 0.13);
}

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

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(154, 90, 37, 0.13), transparent 32rem),
    radial-gradient(circle at 92% 3%, rgba(107, 59, 240, 0.09), transparent 30rem),
    linear-gradient(rgba(36, 27, 23, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 27, 23, 0.025) 1px, transparent 1px),
    var(--bg);
  background-size: auto, auto, 44px 44px, 44px 44px, auto;
  color: var(--text);
  font-family: Inter, "DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: -1;
  top: -130px;
  right: -100px;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(107, 59, 240, 0.12);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

main {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 80px;
}

a {
  color: var(--bronze-dark);
  font-weight: 650;
  text-decoration-color: rgba(125, 67, 28, 0.35);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--purple);
  text-decoration-color: currentColor;
}

.top {
  position: sticky;
  z-index: 20;
  top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  margin-bottom: 30px;
  padding: 12px 14px 12px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 253, 249, 0.9);
  box-shadow: 0 14px 44px rgba(68, 46, 34, 0.1);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 132px;
  height: auto;
}

.langs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.langs > a {
  display: grid;
  min-width: 42px;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.langs > a:hover,
.langs > a[aria-current="true"] {
  border-color: rgba(154, 90, 37, 0.38);
  background: var(--bronze-soft);
  color: var(--bronze-dark);
}

.card {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: clamp(26px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(255, 253, 249, 0.94);
  box-shadow: var(--shadow);
}

.card::before {
  display: block;
  width: 62px;
  height: 5px;
  margin-bottom: 24px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--bronze), var(--purple));
  content: "";
}

.card[hidden],
.legal-section[hidden] {
  display: none !important;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.06;
}

h1 {
  max-width: 820px;
  margin: 0 0 14px;
  font-size: clamp(2.35rem, 6vw, 4.65rem);
  letter-spacing: -0.035em;
}

h2 {
  margin: 46px 0 13px;
  padding-top: 6px;
  border-top: 1px solid transparent;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  letter-spacing: -0.018em;
}

h3 {
  margin: 28px 0 10px;
  font-size: 1.35rem;
}

p,
li {
  color: var(--muted);
}

p {
  margin: 0 0 15px;
}

ul,
ol {
  margin: 12px 0 22px;
  padding-left: 1.35rem;
}

li + li {
  margin-top: 7px;
}

.meta {
  display: inline-flex;
  margin: 0 0 24px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.note {
  margin: 8px 0 30px;
  padding: 18px 20px;
  border: 1px solid rgba(154, 90, 37, 0.2);
  border-left: 4px solid var(--bronze);
  border-radius: 0 16px 16px 0;
  background: linear-gradient(110deg, var(--bronze-soft), rgba(238, 232, 255, 0.5));
  color: #59463a;
}

@media (max-width: 640px) {
  main {
    width: min(100% - 24px, 1040px);
    padding: 12px 0 42px;
  }

  .top {
    top: 8px;
    min-height: 62px;
    margin-bottom: 16px;
    padding: 10px 10px 10px 14px;
    border-radius: 18px;
  }

  .brand img {
    width: 108px;
  }

  .card {
    padding: 24px 20px 32px;
    border-radius: 22px;
  }

  .card::before {
    margin-bottom: 18px;
  }

  h1 {
    font-size: clamp(2.15rem, 12vw, 3.3rem);
  }

  h2 {
    margin-top: 36px;
  }

  .note {
    padding: 15px 16px;
  }
}

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