/* Dork Sports — editorial static site, UK English */

:root {
  --bg: #0c0d10;
  --bg-elevated: #14161c;
  --surface: #1a1d26;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8eaef;
  --text-muted: #9aa3b2;
  --accent: #c9a227;
  --accent-soft: rgba(201, 162, 39, 0.15);
  --category-news: #5b8def;
  --category-world: #3db88a;
  --category-money: #d4a574;
  --category-culture: #b87fd4;
  --category-lifestyle: #e07d6e;
  --category-science: #6ec8e0;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  --max: 1180px;
  --ad-border: rgba(218, 220, 224, 0.28);
  --ad-bg: rgba(255, 255, 255, 0.04);
  --ad-bg-inner: rgba(0, 0, 0, 0.22);
  --ad-label: #9aa0a6;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(201, 162, 39, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(91, 141, 239, 0.06), transparent);
}

body.nav-menu-open {
  overflow: hidden;
}

@media (min-width: 768px) {
  body.nav-menu-open {
    overflow: auto;
  }
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 13, 16, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  flex-wrap: nowrap;
  position: relative;
}

.header-article-end {
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  flex-shrink: 0;
}

/* Stays above fixed backdrop / panel so the toggle stays tappable */
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 52;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .header-bar {
    flex-wrap: nowrap;
    gap: 1rem;
  }
}

/* Mobile category toggle */
.nav-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s, background 0.2s;
}

.nav-menu-toggle:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: var(--bg-elevated);
}

.nav-menu-toggle__box {
  display: block;
  width: 0.9rem;
  height: 0.9rem;
  position: relative;
}

.nav-menu-toggle__line {
  display: block;
  height: 2px;
  width: 0.7rem;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.2s ease;
  transform-origin: center;
  position: absolute;
  top: 50%;
  left: 50%;
}

.site-header--nav-open .nav-menu-toggle__line:nth-child(1) {
  transform: translate(-78%, -10%) rotate(45deg);
}

.site-header--nav-open .nav-menu-toggle__line:nth-child(2) {
  transform: translate(-22%, -10%) rotate(-45deg);
}

.nav-menu-toggle__line:nth-child(1) {
  transform: translate(-78%, -115%) rotate(45deg);
}

.nav-menu-toggle__line:nth-child(2) {
  transform: translate(-22%, -115%) rotate(-45deg);
}

.nav-menu-toggle__line:nth-child(3) {
  display: none;
}

.nav-menu-backdrop {
  display: none;
}

@media (max-width: 767px) {
  .nav-menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 48;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }

  .site-header--nav-open .nav-menu-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-menu-panel {
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: calc(100% + 0.75rem);
    z-index: 53;
    padding: 1rem;
    max-height: min(70vh, 26rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
  }

  .site-header--nav-open .nav-menu-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-menu-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
  }

  .nav-menu-panel__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
  }

  .nav-menu-close {
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    flex-shrink: 0;
  }

  .nav-menu-close__icon,
  .nav-menu-close__icon::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
  }

  .nav-menu-close__icon {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .nav-menu-close__icon::before {
    transform: translate(-50%, -50%) rotate(90deg);
  }

  .nav-menu-panel .nav-cats {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .nav-menu-panel .nav-cats button,
  .nav-menu-panel .nav-cats a.cat-pill {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    padding: 0.65rem 1rem;
    font-size: 1rem;
  }
}

@media (min-width: 768px) {
  .header-bar {
    flex: 0 0 auto;
  }

  .nav-menu-toggle {
    display: none;
  }

  .nav-menu-panel__header {
    display: none;
  }

  .nav-menu-backdrop {
    display: none !important;
  }

  .nav-menu-panel {
    position: static;
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-width: 0;
    padding: 0;
    margin: 0;
    max-height: none;
    overflow: visible;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .nav-menu-panel .nav-cats {
    justify-content: flex-end;
  }
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.logo span {
  color: var(--accent);
}

.logo:hover {
  text-decoration: none;
  opacity: 0.92;
}

.nav-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  justify-content: flex-end;
}

.nav-cats button,
.nav-cats a.cat-pill {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  text-decoration: none;
}

.nav-cats button:hover,
.nav-cats a.cat-pill:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.15);
  text-decoration: none;
}

.nav-cats button.is-active,
.nav-cats a.cat-pill.is-active {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 1rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
  max-width: 18ch;
}

.hero p {
  margin: 0;
  color: var(--text-muted);
  max-width: 52ch;
  font-size: 1.1rem;
}

.hero-meta {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.5rem 4rem;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .article-grid.featured {
    grid-template-columns: 1.2fr 1fr;
    grid-template-rows: auto auto;
    align-items: stretch;
  }

  /*
   * Lead card spans two rows (matches stacked cards on the right). Grid + 1fr row
   * fills remaining height with the image; plain flex often left empty space below text.
   */
  .article-grid.featured .article-card:first-child {
    grid-row: span 2;
    min-height: 0;
    height: 100%;
    align-self: stretch;
  }

  .article-grid.featured .article-card:first-child a.card-link {
    flex: 1 1 0;
    min-height: 0;
    height: 100%;
    display: grid;
    grid-template-rows: 1fr auto;
    grid-template-columns: 1fr;
  }

  .article-grid.featured .article-card:first-child .card-image-wrap {
    min-height: 0;
    aspect-ratio: unset;
    height: 100%;
    align-self: stretch;
  }

  .article-grid.featured .article-card:first-child .card-image-wrap img {
    min-height: 12rem;
    height: 100%;
  }

  .article-grid.featured .article-card:first-child .card-body {
    align-self: end;
  }
}

.article-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(201, 162, 39, 0.25);
}

.article-card a.card-link {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-card a.card-link:hover {
  text-decoration: none;
}

.card-image-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface);
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  background: rgba(12, 13, 16, 0.75);
  backdrop-filter: blur(8px);
}

.cat-News .card-badge {
  color: var(--category-news);
}
.cat-World .card-badge {
  color: var(--category-world);
}
.cat-Money .card-badge {
  color: var(--category-money);
}
.cat-Culture .card-badge {
  color: var(--category-culture);
}
.cat-Lifestyle .card-badge {
  color: var(--category-lifestyle);
}
.cat-Science .card-badge {
  color: var(--category-science);
}

.card-body {
  padding: 1.15rem 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  line-height:1.3;
  margin: 0 0 0.6rem;
  letter-spacing: -0.02em;
}

.card-excerpt {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
  flex: 1;
}

/* Article page */
.article-page-header {
  padding: 2rem 1.5rem 0;
  max-width: 720px;
  margin: 0 auto;
}

.article-page-header .breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.article-page-header .breadcrumb a {
  color: var(--text-muted);
}

.article-page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
  margin: 0 0 1rem;
  letter-spacing: -0.03em;
}

.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.article-meta-bar .cat-tag {
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.article-hero-img {
  max-width: 900px;
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
}

.article-hero-img figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.article-hero-img figcaption {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  padding: 0 0.25rem;
}

.article-prose {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.article-prose p {
  margin: 0 0 1.25rem;
}

.article-prose .editorial-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 2rem 0;
}

.back-link {
  display: inline-block;
  margin-top: 2rem;
  font-weight: 600;
}

/* Display ad slots (AdSense-style placeholders; paste network code inside .ad-slot__inner) */
.ad-wrap {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  text-align: center;
}

.ad-wrap + .ad-wrap {
  margin-top: 0.25rem;
}

.ad-wrap--spaced-top {
  margin-top: 2.5rem;
}

.ad-label {
  display: block;
  font-family: Arial, Helvetica, system-ui, sans-serif;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ad-label);
  margin: 0 0 6px;
  user-select: none;
}

.ad-slot {
  position: relative;
  margin: 0 auto;
  box-sizing: content-box;
  border: 1px solid var(--ad-border);
  border-radius: 4px;
  background: var(--ad-bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ad-slot__loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ad-bg-inner);
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.ad-slot--loaded .ad-slot__loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.ad-slot__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: ad-slot-spin 0.7s linear infinite;
}

@keyframes ad-slot-spin {
  to {
    transform: rotate(360deg);
  }
}

.ad-slot__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  background: var(--ad-bg-inner);
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 8px,
    rgba(255, 255, 255, 0.02) 8px,
    rgba(255, 255, 255, 0.02) 9px
  );
}

/* ~728×90 leaderboard */
.ad-slot--leaderboard {
  width: 100%;
  max-width: 728px;
  min-height: 90px;
}

/* ~970×90 large leaderboard (scales down on small screens) */
.ad-slot--billboard {
  width: 100%;
  max-width: 970px;
  min-height: 90px;
}

/* ~300×250 medium rectangle (MPU) */
.ad-slot--mpu {
  width: 300px;
  max-width: 100%;
  min-height: 250px;
}

/* In-article responsive block */
.ad-slot--infeed {
  width: 100%;
  max-width: min(728px, 100%);
  min-height: 280px;
}

.ad-wrap--article {
  max-width: 720px;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.article-prose .ad-wrap--article {
  padding-left: 0;
  padding-right: 0;
}

/* Legal & static pages */
.legal-page,
.contact-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.legal-page h1,
.contact-page h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-top: 0;
}

.legal-page h2 {
  font-size: 1.2rem;
  margin-top: 2rem;
}

.legal-page ul {
  padding-left: 1.25rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 2.5rem 1.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-inner--extended {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  width: 100%;
}

@media (min-width: 900px) {
  .footer-top {
    grid-template-columns: minmax(200px, 280px) 1fr;
    align-items: start;
  }
}

.footer-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 640px) {
  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .footer-columns {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-col-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.footer-col-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col-nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-col-nav a:hover {
  color: var(--text);
}

.footer-col--company p,
.footer-about {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 0.65rem;
  line-height: 1.55;
}

.footer-col--company p:last-child {
  margin-bottom: 0;
}

.footer-address {
  margin-top: 0.25rem;
}

.footer-col--company a {
  color: var(--text-muted);
}

.footer-col--company a:hover {
  color: var(--text);
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.footer-brand span {
  color: var(--accent);
}

.footer-tagline {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 280px;
  margin: 0;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.footer-legal a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-legal a:hover {
  color: var(--text);
}

.footer-copy {
  width: 100%;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
  display: none;
}

.cookie-banner.is-visible {
  display: block;
}

.cookie-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.cookie-text {
  flex: 1;
  min-width: min(100%, 520px);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.cookie-text a {
  color: var(--accent);
}

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

.cookie-actions button {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
}

.cookie-actions button.primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.layout-column {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.header-util-btn {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.header-util-btn:hover {
  background: rgba(201, 162, 39, 0.28);
  color: #e4c04a;
}

body.subscribe-modal-open {
  overflow: hidden;
}

.subscribe-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.subscribe-modal.is-open {
  display: flex;
}

.subscribe-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.subscribe-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-height: min(92vh, 720px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.5rem 1.5rem;
}

@media (min-width: 900px) {
  .subscribe-modal__panel {
    width: min(100%, 960px);
    max-height: none;
    overflow-y: visible;
    padding: 1.5rem 1.5rem 1.35rem;
  }
}

.subscribe-modal__x {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.subscribe-modal__x:hover {
  color: var(--text);
  background: var(--bg-elevated);
}

.subscribe-modal__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  padding-right: 2rem;
}

.subscribe-modal__lead {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.subscribe-plans {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 900px) {
  .subscribe-plans {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem 1rem;
    align-items: stretch;
    margin-bottom: 1.25rem;
  }
}

.subscribe-plan {
  display: block;
  cursor: pointer;
  margin: 0;
  position: relative;
  min-width: 0;
}

.subscribe-plan input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.subscribe-plan__badge {
  position: absolute;
  top: -0.5rem;
  right: 0.75rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: var(--accent);
  color: var(--bg);
  z-index: 1;
}

.subscribe-plan__box {
  display: block;
  padding: 1rem 1rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.subscribe-plan input:focus-visible ~ .subscribe-plan__box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.subscribe-plan input:checked ~ .subscribe-plan__box {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.35);
}

.subscribe-plan--popular .subscribe-plan__box {
  padding-top: 1.35rem;
}

.subscribe-plan__name {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}

.subscribe-plan__price {
  display: block;
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.subscribe-plan__list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.subscribe-plan__list li {
  margin-bottom: 0.2rem;
}

@media (min-width: 900px) {
  .subscribe-plan {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .subscribe-plan__box {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0.85rem 0.75rem 0.75rem;
  }

  .subscribe-plan__list {
    flex: 1;
    font-size: 0.78rem;
    line-height: 1.4;
    padding-left: 1rem;
  }

  .subscribe-plan__list li {
    margin-bottom: 0.12rem;
  }

  .subscribe-plan__name {
    font-size: 0.95rem;
  }

  .subscribe-plan__price {
    font-size: 0.82rem;
    margin-bottom: 0.4rem;
  }

  .subscribe-plan--popular .subscribe-plan__box {
    padding-top: 1.1rem;
  }

  .subscribe-plan__badge {
    top: -0.35rem;
    right: 0.5rem;
    font-size: 0.6rem;
  }

  .subscribe-modal__title {
    font-size: 1.25rem;
  }

  .subscribe-modal__lead {
    margin-bottom: 1rem;
    font-size: 0.9rem;
  }
}

.subscribe-form__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.subscribe-form__input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  margin-bottom: 0.5rem;
}

.subscribe-form__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.subscribe-form__error {
  font-size: 0.85rem;
  color: #e07d6e;
  margin: 0 0 0.75rem;
}

.subscribe-form__submit {
  width: 100%;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: var(--accent);
  color: var(--bg);
  margin-top: 0.25rem;
}

.subscribe-form__submit:hover {
  filter: brightness(1.08);
}

.subscribe-form__submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.subscribe-thanks {
  text-align: center;
  padding: 0.5rem 0 0.25rem;
}

.subscribe-thanks__icon {
  font-size: 2rem;
  color: #3db88a;
  margin: 0 0 0.75rem;
}

.subscribe-thanks__text,
.subscribe-thanks__hint {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  line-height: 1.55;
}

.subscribe-thanks .subscribe-modal__title {
  padding-right: 0;
}

.footer-subscribe-btn {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}

.footer-subscribe-btn:hover {
  color: var(--text);
  text-decoration: underline;
}
