:root {
  color-scheme: light dark;
  --canvas: #f6f1e7;
  --surface: #fffaf1;
  --surface-raised: #ece6da;
  --ink: #183047;
  --ink-muted: #596875;
  --accent: #b94838;
  --accent-deep: #8c3228;
  --secondary: #7191bd;
  --highlight: #efbd50;
  --focus-ring: #8c3228;
  --forest: #244a38;
  --border: #bdccda;
  --on-accent: #fffaf1;
  --on-dark: #fffaf1;
  --shadow: 0 1.5rem 4.5rem rgb(24 48 71 / 12%);
  --measure: 72rem;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
  color: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% -8%, rgb(239 189 80 / 22%), transparent 24rem),
    radial-gradient(circle at 96% 10%, rgb(113 145 189 / 20%), transparent 30rem),
    var(--canvas);
  font-size: clamp(1rem, 0.96rem + 0.18vw, 1.125rem);
  line-height: 1.65;
}

a {
  color: var(--ink);
  overflow-wrap: anywhere;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-deep);
}

a:focus-visible,
.table-wrap:focus-visible {
  border-radius: 0.3rem;
  outline: 0.2rem solid var(--focus-ring);
  outline-offset: 0.25rem;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--surface);
  transform: translateY(-180%);
}

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

.site-header,
.site-footer,
.document-shell {
  width: min(calc(100% - 2rem), var(--measure));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 6rem;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 2.75rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-decoration: none;
  text-transform: lowercase;
}

.brand-mark {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 2.4rem;
  height: 2.25rem;
}

.brand-mark span {
  position: absolute;
  display: block;
  width: 1.55rem;
  height: 1.55rem;
  border: 0.2rem solid currentColor;
  border-radius: 0.38rem;
  background: var(--canvas);
}

.brand-mark span:nth-child(1) {
  top: 0;
  right: 0;
  color: var(--ink);
}

.brand-mark span:nth-child(2) {
  top: 0.35rem;
  left: 0.4rem;
  color: var(--accent);
}

.brand-mark span:nth-child(3) {
  bottom: 0;
  left: 0;
  color: var(--secondary);
}

.site-header nav {
  display: flex;
  gap: 0.4rem;
}

.site-header nav a {
  display: inline-grid;
  min-height: 2.75rem;
  padding: 0.55rem 0.95rem;
  place-items: center;
  border-radius: 999px;
  text-decoration: none;
}

.site-header nav a[aria-current="page"] {
  background: var(--ink);
  color: var(--surface);
}

.document-shell {
  overflow: hidden;
  margin-block: 1rem 4rem;
  border: 1px solid rgb(24 48 71 / 14%);
  border-radius: clamp(1.25rem, 2vw, 2rem);
  background: rgb(255 250 241 / 94%);
  box-shadow: var(--shadow);
}

.document-page .document-shell {
  padding: clamp(2rem, 6vw, 5rem);
}

h1,
h2,
h3 {
  color: var(--ink);
  font-family: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  line-height: 1.08;
  text-wrap: balance;
}

h1 {
  max-width: 15ch;
  margin: 0 0 1.4rem;
  font-size: clamp(2.7rem, 7vw, 5.7rem);
  font-weight: 600;
  letter-spacing: -0.045em;
}

.document-page h1 {
  max-width: 22ch;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
}

h2 {
  margin: 3.5rem 0 1rem;
  padding-top: 0.4rem;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 650;
  letter-spacing: -0.025em;
}

h3 {
  margin-top: 2.25rem;
  font-size: 1.3rem;
}

.document-page .document-shell > h1 + p,
.document-page .document-shell > h1 + p + p {
  max-width: 52rem;
  color: var(--ink-muted);
}

.document-page .document-shell > h1 + p + p {
  margin-bottom: 1rem;
}

.topic-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-block: 1.5rem 2.5rem;
}

.topic-nav a {
  min-height: 2.75rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-raised);
  font-weight: 750;
  text-decoration: none;
}

.urgent-warning {
  max-width: 50rem;
  padding: 1rem 1.15rem;
  border-inline-start: 0.3rem solid var(--accent);
  border-radius: 0.75rem;
  background: rgb(185 72 56 / 10%);
}

p,
li {
  max-width: 72ch;
}

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

li {
  padding-left: 0.35rem;
  margin-block: 0.45rem;
}

li::marker {
  color: var(--accent);
  font-weight: 800;
}

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

code {
  padding: 0.1em 0.3em;
  border-radius: 0.3rem;
  background: rgb(113 145 189 / 16%);
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.table-wrap {
  overflow-x: auto;
  margin-block: 1.5rem 2.5rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
}

table {
  width: 100%;
  min-width: 42rem;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 0.94em;
}

th,
td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  background: rgb(113 145 189 / 15%);
  color: var(--ink);
  font-size: 0.8rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.landing {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(17rem, 0.8fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 7rem);
  padding: clamp(2rem, 6vw, 5rem);
}

.hero-copy {
  padding-block: clamp(1rem, 5vw, 4rem);
}

.lede {
  max-width: 38rem;
  margin: 0;
  color: var(--ink-muted);
  font-size: clamp(1.08rem, 1rem + 0.5vw, 1.35rem);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  margin-top: 2rem;
}

.primary-action,
.text-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  font-weight: 800;
}

.primary-action {
  gap: 0.75rem;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
}

.primary-action:hover {
  background: var(--accent-deep);
  color: var(--on-accent);
}

.frame-study {
  position: relative;
  min-height: 30rem;
  isolation: isolate;
}

.frame-card {
  position: absolute;
  display: grid;
  overflow: hidden;
  width: min(90%, 19rem);
  aspect-ratio: 4 / 5;
  border: 0.45rem solid var(--surface);
  border-radius: 1.4rem;
  box-shadow: 0 1.3rem 3rem rgb(24 48 71 / 18%);
}

.frame-card-back {
  top: 0;
  right: 0;
  place-items: end start;
  padding: 1rem;
  background: var(--secondary);
  color: var(--on-dark);
  transform: rotate(8deg);
}

.frame-card-middle {
  top: 1.7rem;
  right: 8%;
  place-items: start end;
  padding: 1rem;
  background: var(--highlight);
  color: var(--ink);
  transform: rotate(-7deg);
}

.frame-card-back span,
.frame-card-middle span {
  font-weight: 900;
  letter-spacing: 0.12em;
}

.frame-card-front {
  right: 4%;
  bottom: 0;
  grid-template-rows: 1fr auto auto;
  padding: 1.25rem;
  background: linear-gradient(180deg, var(--forest) 0 58%, var(--accent) 58% 100%);
  color: var(--surface);
  transform: rotate(1deg);
}

.frame-card-front strong,
.frame-card-front small {
  position: relative;
  z-index: 2;
  color: var(--on-dark);
}

.frame-card-front strong {
  font-family: ui-serif, "New York", Georgia, serif;
  font-size: 2rem;
}

.frame-card-front small {
  opacity: 0.9;
}

.frame-sun {
  position: absolute;
  top: 16%;
  right: 18%;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: var(--highlight);
  box-shadow: 0 0 0 1.5rem rgb(239 189 80 / 15%);
}

.frame-horizon {
  position: absolute;
  right: -10%;
  bottom: 34%;
  left: -10%;
  height: 7rem;
  border-radius: 50% 50% 0 0;
  background: var(--secondary);
  transform: rotate(-5deg);
}

.trust-list {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.trust-list li {
  padding: 1.25rem;
  border-top: 0.2rem solid var(--highlight);
  margin: 0;
}

.trust-list strong,
.trust-list span {
  display: block;
}

.trust-list span {
  margin-top: 0.35rem;
  color: var(--ink-muted);
  font-size: 0.94em;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0 3rem;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0;
}

.footer-nav {
  display: flex;
  gap: 1rem;
}

.footer-nav a {
  min-height: 2.75rem;
  padding: 0.4rem 0.2rem;
}

@media (max-width: 52rem) {
  .landing {
    grid-template-columns: 1fr;
  }

  .frame-study {
    width: min(100%, 22rem);
    min-height: 24rem;
    margin-inline: auto;
  }

  .frame-card {
    width: min(82%, 15rem);
  }
}

@media (max-width: 42rem) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header {
    padding-block: 1.2rem;
  }

  .site-header nav {
    width: 100%;
  }

  .site-header nav a {
    flex: 1;
    padding-inline: 0.55rem;
  }

  .document-shell {
    margin-top: 0.25rem;
  }

  .document-page .document-shell,
  .landing {
    padding: 1.5rem;
  }

  .trust-list {
    grid-template-columns: 1fr;
  }

  .frame-study {
    min-height: 21rem;
  }

  .footer-nav {
    order: -1;
  }
}

@media (max-width: 23rem) {
  .site-header,
  .site-footer,
  .document-shell {
    width: min(calc(100% - 1rem), var(--measure));
  }

  .site-header nav {
    gap: 0.1rem;
    font-size: 0.9rem;
  }

  .document-page .document-shell,
  .landing {
    padding: 1.1rem;
  }

}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0e1d23;
    --surface: #172b33;
    --surface-raised: #203841;
    --ink: #f6f0e6;
    --ink-muted: #c1cbc9;
    --accent: #ef8b7d;
    --accent-deep: #f3a296;
    --secondary: #8da8cb;
    --highlight: #f2c35d;
    --focus-ring: #f2c35d;
    --forest: #315c46;
    --border: #4c6570;
    --on-accent: #10212a;
    --shadow: 0 1.5rem 4.5rem rgb(0 0 0 / 30%);
  }

  body {
    background:
      radial-gradient(circle at 8% -8%, rgb(239 189 80 / 10%), transparent 24rem),
      radial-gradient(circle at 96% 10%, rgb(113 145 189 / 13%), transparent 30rem),
      var(--canvas);
  }

  .document-shell {
    border-color: rgb(246 240 230 / 13%);
    background: rgb(23 43 51 / 96%);
  }

}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
