:root {
  --bg: #f5f2ec;
  --surface: #fffdf7;
  --surface-strong: #ffffff;
  --text: #161b22;
  --muted: #68707d;
  --border: #ded7ca;
  --accent: #0d9488;
  --accent-strong: #0f766e;
  --accent-soft: #d8f4ee;
  --shadow: 0 24px 70px rgba(22, 27, 34, 0.14);
  --radius: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  background:
    radial-gradient(circle at 14% 8%, rgba(13, 148, 136, 0.18), transparent 24rem),
    radial-gradient(circle at 86% 20%, rgba(20, 83, 45, 0.10), transparent 22rem),
    linear-gradient(180deg, #fbfaf6 0%, var(--bg) 48rem);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(22, 27, 34, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 27, 34, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, black, transparent 72%);
}

a {
  color: var(--accent-strong);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #0b4f4a;
}

img,
iframe,
canvas {
  max-width: 100%;
}

iframe,
canvas {
  border-radius: var(--radius);
}

img {
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 14px 36px rgba(31, 41, 51, 0.14);
}

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

pre {
  overflow-x: auto;
  padding: 1rem;
  background: #18212f;
  color: #f8fafc;
  border-radius: var(--radius);
}

blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1rem;
  color: var(--muted);
  border-left: 4px solid var(--accent);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-160%);
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  background: var(--text);
  color: white;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(221, 214, 200, 0.72);
  background: rgba(251, 250, 246, 0.82);
  backdrop-filter: blur(18px);
}

.site-nav {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.65rem;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  display: inline-grid;
  place-items: center;
  color: white;
  background: var(--accent);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.22);
}

.nav-links {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem;
}

.nav-links a {
  padding: 0.45rem 0.7rem;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 650;
  text-decoration: none;
  border-radius: var(--radius);
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(15, 118, 110, 0.09);
}

.page-shell {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 4rem 0 5rem;
}

.home-shell {
  width: min(1120px, calc(100% - 2rem));
}

.page-shell > :first-child {
  margin-top: 0;
}

.page-shell h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.home-shell h1 {
  max-width: 8ch;
  font-size: clamp(4rem, 14vw, 11rem);
  line-height: 0.82;
}

.page-shell h2 {
  margin: 2.5rem 0 0.65rem;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.15;
}

.page-shell h3 {
  margin: 1.8rem 0 0.45rem;
}

.page-shell p,
.page-shell li {
  color: #374151;
}

.page-shell ul,
.page-shell ol {
  padding-left: 1.35rem;
}

.site-footer {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 2.5rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.92rem;
  border-top: 1px solid var(--border);
}

.footer-dot {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 999px;
  background: var(--border);
}

.hero {
  position: relative;
  display: grid;
  gap: 1.55rem;
  min-height: clamp(28rem, 66vh, 42rem);
  align-content: center;
  padding: 4.5rem 0 3.5rem;
}

.hero::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: min(28vw, 18rem);
  aspect-ratio: 1;
  transform: translateY(-50%);
  border: 1px solid rgba(13, 148, 136, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.40), rgba(255, 255, 255, 0.05)),
    repeating-linear-gradient(135deg, rgba(13, 148, 136, 0.14) 0 1px, transparent 1px 16px);
  box-shadow: var(--shadow);
  opacity: 0.9;
  pointer-events: none;
}

.eyebrow {
  width: fit-content;
  margin: 0;
  padding: 0.35rem 0.55rem;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(13, 148, 136, 0.22);
  border-radius: 999px;
  background: rgba(216, 244, 238, 0.54);
}

.lede {
  max-width: 40rem;
  margin: 0;
  color: #3d4856;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  line-height: 1.55;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: -1.5rem 0 3rem;
}

.quick-card {
  position: relative;
  min-height: 15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  overflow: hidden;
  padding: 1.25rem;
  color: var(--text);
  text-decoration: none;
  border: 1px solid rgba(222, 215, 202, 0.82);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 253, 247, 0.54)),
    rgba(255, 253, 247, 0.78);
  box-shadow: 0 12px 34px rgba(22, 27, 34, 0.08);
  backdrop-filter: blur(12px);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.quick-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 16%, rgba(13, 148, 136, 0.16), transparent 34%),
    linear-gradient(135deg, transparent 58%, rgba(13, 148, 136, 0.10));
  opacity: 0;
  transition: opacity 180ms ease;
}

.quick-card::after {
  content: ">";
  position: absolute;
  right: 1rem;
  bottom: 0.85rem;
  color: var(--accent-strong);
  font-size: 1.6rem;
  line-height: 1;
  transform: translateX(-0.25rem);
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
}

.quick-card:hover {
  transform: translateY(-6px);
  color: var(--text);
  border-color: rgba(13, 148, 136, 0.40);
  box-shadow: var(--shadow);
}

.quick-card:hover::before,
.quick-card:hover::after {
  opacity: 1;
}

.quick-card:hover::after {
  transform: translateX(0);
}

.quick-card strong {
  position: relative;
  display: block;
  max-width: 10rem;
  font-size: clamp(1.35rem, 2.3vw, 1.9rem);
  line-height: 1;
}

.quick-card span {
  position: relative;
  max-width: 17rem;
  color: var(--muted);
}

.home-grid,
.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 0;
}

.panel,
.link-grid a {
  padding: 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.82);
}

.panel p:last-child {
  margin-bottom: 0;
}

.link-grid a {
  display: block;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.link-grid a:hover {
  color: var(--accent-strong);
  border-color: rgba(15, 118, 110, 0.32);
}

.date-pill {
  width: fit-content;
  padding: 0.45rem 0.7rem;
  color: var(--accent-strong);
  font-size: 0.95rem;
  font-weight: 700;
  background: var(--accent-soft);
  border-radius: 999px;
}

form {
  display: grid;
  gap: 0.75rem;
  margin: 1.25rem 0 1.75rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.8);
}

label {
  font-weight: 700;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

button,
.button {
  width: fit-content;
  padding: 0.65rem 0.9rem;
  color: white;
  font-weight: 800;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  cursor: pointer;
}

button:hover,
.button:hover {
  background: var(--accent-strong);
}

#result {
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.book-modal .card {
  border-radius: var(--radius) !important;
}

@media (max-width: 760px) {
  .site-nav {
    min-height: auto;
    padding: 0.85rem 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .page-shell {
    padding: 2.6rem 0 4rem;
  }

  .hero {
    min-height: auto;
    padding-top: 2.6rem;
  }

  .hero::after {
    display: none;
  }

  .quick-links,
  .home-grid,
  .link-grid {
    grid-template-columns: 1fr;
  }

  .quick-card {
    min-height: 10rem;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-dot {
    display: none;
  }
}
