:root {
  --bg: #f4efe6;
  --bg-accent: #efe5d5;
  --text: #1b2a24;
  --muted: #4b5e55;
  --card: #fffaf0;
  --line: #d6c8b3;
  --primary: #215c4a;
  --primary-strong: #163f33;
  --warm: #bd6b2d;
  --shadow: 0 12px 32px rgba(27, 42, 36, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 14%, #fbf4e6 0%, rgba(251, 244, 230, 0.2) 24%, transparent 42%),
    radial-gradient(circle at 82% 0%, #e8ddc7 0%, rgba(232, 221, 199, 0.24) 24%, transparent 44%),
    linear-gradient(165deg, var(--bg) 0%, var(--bg-accent) 100%);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

.shell {
  width: min(1040px, 92vw);
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.brand {
  font-family: "Fraunces", "Georgia", serif;
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--primary-strong);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.brand-icon {
  width: 1.1em;
  height: 1.1em;
  flex: 0 0 auto;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nav a {
  text-decoration: none;
  color: var(--primary-strong);
  font-weight: 600;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 160ms ease;
}

.nav a:hover,
.nav a:focus-visible,
.nav a.active {
  border-color: var(--line);
  background: rgba(255, 250, 240, 0.82);
}

.hero {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: clamp(1.2rem, 2.8vw, 2rem);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -30px -40px auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(189, 107, 45, 0.22) 0%, rgba(189, 107, 45, 0) 68%);
  pointer-events: none;
}

h1,
h2,
h3 {
  font-family: "Fraunces", "Georgia", serif;
  line-height: 1.15;
  margin: 0 0 0.6rem;
  color: #14231d;
}

h1 {
  font-size: clamp(1.6rem, 4vw, 3.1rem);
}

h2 {
  font-size: clamp(1.2rem, 2.6vw, 2rem);
  margin-top: 2rem;
}

p {
  margin: 0.3rem 0 1rem;
  color: var(--text);
}

code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 1em;
  line-height: inherit;
}

.lead {
  font-size: clamp(0.98rem, 1.6vw, 1.15rem);
  max-width: 68ch;
  color: var(--muted);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.button {
  display: inline-block;
  text-decoration: none;
  color: #fffaf2;
  background: var(--primary);
  border: 1px solid var(--primary);
  font-weight: 700;
  border-radius: 10px;
  padding: 0.62rem 0.95rem;
  transition: transform 140ms ease, background 140ms ease;
}

.button:hover,
.button:focus-visible {
  background: var(--primary-strong);
  transform: translateY(-1px);
}

.button.secondary {
  color: var(--primary-strong);
  background: transparent;
  border-color: var(--line);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
  margin-top: 1.4rem;
}

.card {
  grid-column: span 6;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 6px 22px rgba(27, 42, 36, 0.06);
}

.card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.2rem;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.content {
  background: rgba(255, 250, 240, 0.88);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(1rem, 2.1vw, 1.6rem);
  margin-top: 1.3rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.96rem;
}

.table-wrap {
  overflow-x: auto;
}

.centered-table-wrap {
  display: flex;
  justify-content: center;
}

.compact-table {
  width: auto;
  table-layout: fixed;
}

.compact-table th,
.compact-table td {
  padding: 0.45rem 1rem;
  font-size: 0.88rem;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.compact-table th:first-child,
.compact-table td:first-child {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  text-align: right;
}

.compact-table th:nth-child(2),
.compact-table td:nth-child(2) {
  text-align: right;
}

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

th {
  color: #1a3d31;
  font-weight: 700;
}

ul {
  margin-top: 0.35rem;
  margin-bottom: 1rem;
}

.footer {
  margin-top: 2.2rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.reveal {
  opacity: 0;
  transform: translateY(9px);
  animation: rise 520ms ease forwards;
}

.reveal.delay-1 {
  animation-delay: 90ms;
}

.reveal.delay-2 {
  animation-delay: 180ms;
}

.reveal.delay-3 {
  animation-delay: 270ms;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 880px) {
  .card {
    grid-column: span 12;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(1080px, 94vw);
    padding-top: 1.2rem;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 1.4rem;
  }

  .nav {
    gap: 0.25rem;
  }

  .brand {
    font-size: 1.25rem;
  }

  .nav a {
    font-size: 0.94rem;
    padding: 0.38rem 0.62rem;
  }

  h1 {
    font-size: clamp(1.45rem, 6.8vw, 1.9rem);
  }

  h2 {
    font-size: clamp(1.1rem, 5.3vw, 1.45rem);
    margin-top: 1.5rem;
  }

  .card h3 {
    font-size: 1.06rem;
  }

  .lead {
    font-size: 1rem;
  }

  .button {
    font-size: 0.94rem;
    padding: 0.56rem 0.84rem;
  }

  .footer {
    font-size: 0.84rem;
  }

  .compact-table th,
  .compact-table td {
    font-size: 0.8rem;
    padding: 0.42rem 0.68rem;
  }
}
