:root {
  --ink: #1f2933;
  --muted: #52606d;
  --cream: #fffaf5;
  --paper: #ffffff;
  --coral: #e76f51;
  --coral-dark: #c8553d;
  --teal: #2a9d8f;
  --teal-dark: #21867a;
  --gold: #e9c46a;
  --sand: #f4e8d8;
  --line: #e4ddd4;
  --shadow: 0 18px 50px rgba(31, 41, 51, 0.12);
  --radius: 18px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(233, 196, 106, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(42, 157, 143, 0.12), transparent 24%),
    linear-gradient(180deg, #fffdf9 0%, var(--cream) 100%);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--teal-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--coral-dark);
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(255, 250, 245, 0.88);
  border-bottom: 1px solid rgba(228, 221, 212, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 78px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.brand-photo {
  position: relative;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(145deg, #2a9d8f 0%, #e9c46a 52%, #e76f51 100%);
  box-shadow: 0 6px 18px rgba(23, 52, 63, 0.14);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.brand-photo img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 22%;
  border: 2px solid #fffaf5;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}

.brand-title {
  font-family: var(--font-display);
  font-size: clamp(1.18rem, 2.8vw, 1.48rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0.015em;
  color: var(--ink);
  white-space: nowrap;
}

.brand-title em {
  font-style: italic;
  font-weight: 700;
  color: var(--teal-dark);
}

.brand-rule {
  display: block;
  width: 100%;
  max-width: 10.8rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(42, 157, 143, 0.85), rgba(233, 196, 106, 0.75), rgba(231, 111, 81, 0.55));
}

.brand-tagline {
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
}

.brand:hover .brand-photo {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(23, 52, 63, 0.18);
}

.brand-mark,
.brand-logo {
  display: none;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  padding: 0.45rem 0.15rem;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--coral-dark);
  border-bottom-color: var(--coral);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font: inherit;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 72vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  border-radius: 0 0 var(--radius) var(--radius);
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 26%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.15) 10%, rgba(15, 23, 42, 0.72) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 3rem 0 2.5rem;
  color: #fff;
}

.hero-kicker {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 1.05;
  max-width: 14ch;
  margin: 0 0 1rem;
}

.hero-subhead {
  max-width: 38rem;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  font-style: italic;
  line-height: 1.3;
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.92);
}

.hero p {
  max-width: 38rem;
  font-size: 1.15rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 2rem;
  align-items: start;
}

.page-main {
  padding: 2rem 0 4rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
  margin: 0 0 0.75rem;
}

.lead {
  font-size: 1.18rem;
  color: var(--muted);
  margin: 0 0 2rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(31, 41, 51, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
}

.card-body {
  padding: 1.1rem 1.15rem 1.25rem;
}

.card-body h2,
.card-body h3 {
  font-family: var(--font-display);
  margin: 0 0 0.45rem;
  font-size: 1.35rem;
}

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

.card-body a.stretched {
  color: inherit;
  text-decoration: none;
}

.story-list {
  display: grid;
  gap: 1rem;
}

.story-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1rem;
  padding: 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 4px);
}

.story-item img {
  border-radius: 12px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.story-item h2 {
  font-family: var(--font-display);
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
}

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

.article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2.25rem);
  box-shadow: 0 12px 40px rgba(31, 41, 51, 0.06);
}

.article h2,
.article h3 {
  font-family: var(--font-display);
  line-height: 1.2;
}

.article h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.7rem;
}

.article h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.25rem;
}

.article p,
.article li {
  color: #334155;
}

.article ul,
.article ol {
  padding-left: 1.2rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.article-toc {
  margin-bottom: 1.5rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 8px);
  background: linear-gradient(180deg, rgba(244, 232, 216, 0.55) 0%, rgba(255, 250, 245, 0.9) 100%);
  overflow: hidden;
}

.article-toc-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1.1rem;
  border: 0;
  background: transparent;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--teal-dark);
  cursor: pointer;
  text-align: left;
  transition: color 0.2s ease, background 0.2s ease;
}

.article-toc-toggle:hover {
  color: var(--coral-dark);
  background: rgba(255, 255, 255, 0.45);
}

.article-toc-toggle:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: -2px;
}

.article-toc-chevron {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s ease;
}

.article-toc-toggle[aria-expanded="true"] .article-toc-chevron {
  transform: rotate(180deg);
}

.article-toc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}

.article-toc-panel.is-open {
  grid-template-rows: 1fr;
}

.article-toc-panel-inner {
  overflow: hidden;
}

.article-toc-list {
  margin: 0;
  padding: 0 1.1rem 1rem;
  list-style: none;
  border-top: 1px solid rgba(228, 221, 212, 0.85);
}

.article-toc-item {
  margin: 0;
  padding: 0.55rem 0 0;
}

.article-toc-item--sub {
  padding-left: 1rem;
}

.article-toc-item a {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.45;
  transition: color 0.2s ease;
}

.article-toc-item a:hover,
.article-toc-item a:focus-visible {
  color: var(--coral-dark);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.article-toc-item--sub a {
  font-weight: 400;
  color: var(--muted);
}

.article h2[id],
.article h3[id] {
  scroll-margin-top: 6rem;
}

.article-hero {
  border-radius: calc(var(--radius) - 6px);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.article-hero img {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: center;
  margin: 2rem 0;
}

.split img {
  border-radius: calc(var(--radius) - 6px);
  box-shadow: var(--shadow);
}

.quote {
  margin: 2rem 0;
  padding: 1.25rem 1.4rem;
  border-left: 4px solid var(--coral);
  background: linear-gradient(90deg, rgba(231, 111, 81, 0.08), transparent);
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.5;
}

.sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 1rem;
}

.widget {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 4px);
  padding: 1rem;
  box-shadow: 0 10px 28px rgba(31, 41, 51, 0.05);
}

.widget h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
}

.widget p {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.widget ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.card-body .page-meta {
  margin: 0.65rem 0 0;
}

.sponsored-widget {
  text-align: center;
}

.sponsored-label {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crazy-time-link {
  display: block;
  text-align: center;
  text-decoration: none;
}

.crazy-time-link img {
  margin: 0 auto;
  border-radius: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.crazy-time-link:hover img {
  transform: scale(1.03);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag {
  display: inline-block;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--sand);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
}

.site-footer {
  margin-top: 3rem;
  background: linear-gradient(180deg, #17343f 0%, #102a33 100%);
  color: #eef6f8;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  padding: 3rem 0 2rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}

.footer-grid p {
  color: rgba(238, 246, 248, 0.82);
}

.contact-form {
  display: grid;
  gap: 0.85rem;
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  font: inherit;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.contact-form button {
  justify-self: start;
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.35rem;
  background: linear-gradient(135deg, var(--coral) 0%, var(--coral-dark) 100%);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.contact-form button:hover {
  filter: brightness(1.05);
}

.contact-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-disclaimer {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: rgba(238, 246, 248, 0.65);
}

.form-note {
  min-height: 1.2rem;
  font-size: 0.92rem;
  color: var(--gold);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1rem 0 1.5rem;
  color: rgba(238, 246, 248, 0.65);
  font-size: 0.92rem;
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: -1rem 0 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.breadcrumbs {
  margin: 0 0 1rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumbs li:not(:last-child)::after {
  content: "›";
  margin-left: 0.35rem;
  color: #94a3b8;
}

.breadcrumbs a {
  text-decoration: none;
}

.breadcrumb {
  margin: 1.5rem 0 0.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb a {
  text-decoration: none;
}

@media (max-width: 900px) {
  .layout,
  .footer-grid,
  .split,
  .story-item {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    background: rgba(255, 250, 245, 0.98);
    border-bottom: 1px solid var(--line);
    padding: 0.75rem 1rem 1rem;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
  }

  .site-header {
    position: relative;
  }

  .brand-tagline {
    letter-spacing: 0.1em;
  }
}

.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 15;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.85rem;
  height: 2.85rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--teal) 0%, var(--teal-dark) 55%, var(--coral) 100%);
  color: #fff;
  box-shadow: 0 10px 28px rgba(31, 41, 51, 0.22);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(0.75rem);
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  filter: brightness(1.06);
  box-shadow: 0 14px 32px rgba(31, 41, 51, 0.28);
}

.back-to-top:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.back-to-top svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 900px) {
  .back-to-top {
    width: 2.55rem;
    height: 2.55rem;
    right: 1rem;
    bottom: 1rem;
  }

  .back-to-top svg {
    width: 1rem;
    height: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: opacity 0.01ms, visibility 0.01ms;
  }

  .article-toc-panel,
  .article-toc-chevron {
    transition: none;
  }
}

@media (max-width: 600px) {
  .article-toc-toggle {
    font-size: 0.95rem;
    padding: 0.8rem 1rem;
  }

  .article-toc-list {
    padding: 0 1rem 0.9rem;
  }
}
