:root {
  --ink: #16232b;
  --muted: #5e6b70;
  --paper: #fbfbf4;
  --navy: #263c5b;
  --orange: #d99635;
  --orange-soft: #f5dec0;
  --line: rgba(38, 60, 91, 0.16);
  --shadow: 0 16px 42px rgba(38, 60, 91, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #e9eced;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
}

.website-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.website-nav__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 18px;
  max-width: 1540px;
  min-height: 58px;
  margin: 0 auto;
  padding: 0 50px;
}
.website-nav a,
.website-nav button {
  border: 0;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}
.website-nav a:hover,
.website-nav a:focus-visible,
.website-nav button:hover,
.website-nav button:focus-visible { color: var(--orange); }
.website-nav__dropdown { position: relative; }
.website-nav__dropdown button { padding: 20px 0; }
.website-nav__submenu {
  position: absolute;
  top: calc(100% - 3px);
  right: 0;
  display: none;
  width: min(360px, 88vw);
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(38, 60, 91, 0.16);
}
.website-nav__submenu a {
  display: block;
  padding: 10px 12px;
  border-radius: 7px;
  line-height: 1.4;
  text-transform: none;
}
.website-nav__submenu a[aria-current="page"] {
  background: var(--orange-soft);
  color: var(--navy);
}
.website-nav__dropdown:hover .website-nav__submenu,
.website-nav__dropdown:focus-within .website-nav__submenu { display: block; }

.page-shell {
  max-width: 1180px;
  min-height: calc(100vh - 58px);
  margin: 0 auto;
  padding: 74px 34px 80px;
  background: var(--paper);
  box-shadow: 0 20px 50px rgba(22, 35, 43, 0.09);
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}
h1 {
  max-width: 850px;
  margin: 0 0 18px;
  color: var(--navy);
  font-family: Georgia, serif;
  font-size: clamp(46px, 7vw, 82px);
  letter-spacing: -0.06em;
  line-height: 0.98;
}
.intro {
  max-width: 840px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 20px;
}
.intro a { color: var(--navy); }
.template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.overleaf-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 17px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}
.overleaf-button:hover,
.overleaf-button:focus-visible { background: var(--orange); }
.overleaf-button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.48;
  pointer-events: none;
}
.preview-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}
.preview-card__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.preview-card__heading h2 {
  margin: 0;
  color: var(--navy);
  font-family: Georgia, serif;
  font-size: 28px;
}
.preview-card__heading span { color: var(--muted); font-size: 14px; }
.template-preview {
  display: block;
  width: 100%;
  min-height: 720px;
  border: 0;
  background: #f7f7f4;
}
.preview-placeholder {
  padding: 48px 22px;
  color: var(--muted);
  text-align: center;
}
.preview-placeholder strong {
  display: block;
  margin-bottom: 8px;
  color: var(--navy);
  font-family: Georgia, serif;
  font-size: 26px;
}

@media (max-width: 980px) {
  .website-nav__inner { justify-content: flex-start; padding: 9px 24px; }
  .website-nav__dropdown { width: 100%; }
  .website-nav__dropdown button {
    padding: 8px 0;
    cursor: default;
    pointer-events: none;
  }
  .website-nav__submenu {
    position: static;
    display: block;
    width: 100%;
    margin-bottom: 5px;
    box-shadow: none;
  }
  .page-shell { padding: 54px 22px 64px; }
  .template-preview { min-height: 560px; }
}
