:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --text: #1a2332;
  --muted: #5c6b7f;
  --accent: #0d7a6a;
  --accent-dark: #065a4e;
  --accent-soft: #e6f5f2;
  --border: #dbe3ee;
  --shadow: 0 18px 40px rgba(26, 35, 50, 0.08);
  --radius: 16px;
  --max: 1120px;
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: linear-gradient(180deg, #eef3f9 0%, var(--bg) 240px);
  line-height: 1.65;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

.container {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #14a892, #0d7a6a 55%, #065a4e);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-family: var(--display);
  font-size: 1.05rem;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.78rem;
}

.nav-primary {
  display: flex;
  gap: 1.25rem;
}

.nav-primary a {
  text-decoration: none;
  font-weight: 500;
  color: var(--text);
}

.nav-primary a:hover {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  font: inherit;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0 1rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.mobile-nav a {
  padding: 0.5rem 0;
  text-decoration: none;
  color: var(--text);
}

.mobile-nav[hidden] {
  display: none !important;
}

.mobile-nav.is-open {
  display: flex;
}

.hero {
  padding: 2.5rem 0 1.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  margin: 0 0 1rem;
}

.hero p {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 0 1.25rem;
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.hero-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 2rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  font-size: 0.92rem;
}

.pill.is-active,
.pill:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.25rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
}

.btn-secondary {
  background: var(--surface);
  color: var(--accent-dark);
  border: 1px solid var(--border);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  padding-bottom: 3rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(26, 35, 50, 0.04);
  display: flex;
  flex-direction: column;
}

.card-media {
  aspect-ratio: 16 / 9;
  background: #dfe8f3;
  overflow: hidden;
  display: block;
  line-height: 0;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 1rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.card-category {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.card h3 a {
  color: inherit;
  text-decoration: none;
}

.card h3 a:hover {
  color: var(--accent-dark);
}

.card-excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.card-meta {
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.page-head {
  padding: 2rem 0 1rem;
}

.page-head h1 {
  font-family: var(--display);
  margin: 0 0 0.5rem;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.page-head p {
  margin: 0;
  color: var(--muted);
  max-width: 60ch;
}

.article-layout {
  padding-bottom: 3rem;
}

.article-hero {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin: 0 auto 1.25rem;
  max-width: 42rem;
}

.article-hero img {
  width: 100%;
  max-height: 16rem;
  object-fit: cover;
  display: block;
}

.article-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.article-panel h1 {
  font-family: var(--display);
  margin: 0 0 0.75rem;
  line-height: 1.2;
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  color: var(--muted);
  font-size: 0.92rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.prose h2 {
  font-family: var(--display);
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  font-size: 1.35rem;
}

.prose p,
.prose ul {
  margin: 0 0 1rem;
}

.prose ul {
  padding-left: 1.2rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

.form-panel {
  max-width: 560px;
  margin: 0 auto 3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow);
}

.form-panel h1 {
  font-family: var(--display);
  margin-top: 0;
}

.form-field {
  margin-bottom: 1rem;
}

.form-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-field input[type="text"],
.form-field input[type="email"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
}

.form-field input:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.checkbox-field {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 1rem 0;
}

.checkbox-field input {
  margin-top: 0.25rem;
}

.checkbox-field label {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.95rem;
}

.form-error {
  color: #b42318;
  font-size: 0.88rem;
  margin-top: 0.25rem;
}

.alert {
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.alert-success {
  background: #ecfdf3;
  border: 1px solid #abefc6;
  color: #067647;
}

.alert-error {
  background: #fef3f2;
  border: 1px solid #fecdca;
  color: #b42318;
}

.legal {
  padding-bottom: 3rem;
}

.legal .article-panel {
  max-width: 780px;
  margin-inline: auto;
}

.legal h2 {
  font-family: var(--display);
  margin-top: 1.5rem;
}

.site-signup {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), var(--surface));
}

.signup-shell {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2rem;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow);
}

.signup-copy h2 {
  font-family: var(--display);
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.signup-copy p {
  margin: 0;
  color: var(--muted);
  max-width: 42ch;
}

.signup-form-wrap .form-field:last-of-type {
  margin-bottom: 0.5rem;
}

@media (max-width: 860px) {
  .signup-shell {
    grid-template-columns: 1fr;
  }
}

.site-footer {
  border-top: 1px solid var(--border);
  background: #0f1724;
  color: #d7dee8;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding: 2.5rem 0 1.5rem;
}

.footer-brand {
  font-family: var(--display);
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
}

.footer-note {
  margin: 0;
  color: #9fb0c5;
  max-width: 42ch;
}

.footer-heading {
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a,
.site-footer a {
  color: #d7dee8;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem 0 1.5rem;
  color: #9fb0c5;
  font-size: 0.9rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .nav-primary {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
