:root {
  --bg: #081421;
  --bg-soft: #12263b;
  --panel: rgba(7, 24, 37, 0.8);
  --panel-strong: rgba(10, 30, 48, 0.92);
  --line: rgba(171, 205, 230, 0.16);
  --text: #eff7ff;
  --muted: #9fb7c9;
  --accent: #ff875c;
  --accent-soft: rgba(255, 135, 92, 0.18);
  --teal: #6ce5d8;
  --yellow: #ffd66b;
  --red: #ff6f7d;
  --green: #77e08e;
  --shadow: 0 28px 60px rgba(1, 11, 20, 0.38);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --max-width: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(108, 229, 216, 0.12), transparent 35%),
    radial-gradient(circle at 90% 10%, rgba(255, 135, 92, 0.14), transparent 30%),
    linear-gradient(180deg, #07111c 0%, #0d1e2f 46%, #091420 100%);
  color: var(--text);
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 12%, rgba(0, 0, 0, 0.85) 100%);
  pointer-events: none;
}

.ambient {
  position: fixed;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.28;
  pointer-events: none;
}

.ambient-left {
  top: 10rem;
  left: -12rem;
  background: rgba(108, 229, 216, 0.42);
}

.ambient-right {
  top: 18rem;
  right: -12rem;
  background: rgba(255, 135, 92, 0.32);
}

.page-shell {
  position: relative;
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.hero,
.filter-card,
.editorial-card,
.insight-card,
.roadmap-card,
.subpage-hero,
.article-toc-card,
.news-feed-item,
.article-longform,
.job-card {
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(12, 32, 50, 0.92) 0%, rgba(7, 20, 32, 0.92) 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.72fr);
  gap: 1.5rem;
  padding: 1.6rem;
  border-radius: var(--radius-xl);
  animation: rise 0.7s ease both;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-mark {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  color: #081421;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #ffb26b 0%, #6ce5d8 100%);
}

.brand-label,
.brand-subtitle {
  margin: 0;
}

.brand-label {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand-subtitle {
  font-size: 0.96rem;
  color: var(--text);
}

.language-switch {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.32rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lang-button {
  border: 0;
  border-radius: 999px;
  padding: 0.56rem 0.8rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-button[aria-pressed="true"] {
  background: linear-gradient(135deg, rgba(255, 135, 92, 0.95) 0%, rgba(255, 205, 107, 0.95) 100%);
  color: #091420;
}

.eyebrow,
.section-kicker {
  margin: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--teal);
}

#heroTitle,
.insight-card h2,
.roadmap-card h2,
#resultsTitle {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

#heroTitle {
  font-size: clamp(3.15rem, 6vw, 5.8rem);
  max-width: 11ch;
}

.hero-lead,
.section-copy,
.results-copy,
.disclaimer,
.detail-copy,
.roadmap-step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.hero-notes {
  display: grid;
  gap: 0.8rem;
  max-width: 50rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #ffc2af;
  font-size: 0.86rem;
  font-weight: 700;
}

.hero-panel {
  display: grid;
  gap: 1rem;
}

.stat-card {
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.15rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-value {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
}

.stat-label {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.filter-stack {
  margin-top: 1.4rem;
  display: grid;
  gap: 1rem;
}

.editorial-grid {
  margin-top: 1.4rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.editorial-card,
.subpage-hero,
.article-toc-card,
.news-feed-item,
.article-longform {
  padding: 1.2rem;
  border-radius: var(--radius-lg);
  animation: rise 0.85s ease both;
}

.editorial-card {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.editorial-card-header,
.section-actions,
.news-feed-meta,
.news-preview-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.editorial-card h2,
.subpage-hero h1,
.article-toc-card h2,
.news-feed-item h2,
.article-longform h2 {
  margin: 0;
  font-size: 1.65rem;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

.editorial-link,
.editorial-button,
.news-source-link,
.back-link,
.toc-link,
.pagination-link {
  text-decoration: none;
}

.editorial-link,
.news-source-link,
.back-link {
  color: var(--teal);
  font-weight: 700;
  text-underline-offset: 0.16rem;
}

.editorial-button,
.pagination-link,
.toc-link {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0.62rem 0.88rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.editorial-button:hover,
.pagination-link:hover,
.toc-link:hover,
.editorial-link:hover,
.news-source-link:hover,
.back-link:hover {
  border-color: rgba(255, 255, 255, 0.24);
  color: var(--text);
}

.news-preview-list,
.news-feed,
.article-index,
.article-toc {
  display: grid;
  gap: 0.9rem;
}

.news-preview-item {
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.news-preview-meta,
.news-feed-meta {
  color: #c3d8e7;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.news-preview-title,
.article-preview-title {
  color: var(--text);
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.35;
}

.news-preview-summary,
.article-preview-hook,
.article-preview-summary,
.editorial-empty,
.news-impact,
.subpage-summary,
.article-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.article-preview-card,
.article-longform-header {
  display: grid;
  gap: 0.8rem;
}

.article-preview-hook {
  color: #dbeaf6;
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.keyword-chip,
.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.68rem;
  border-radius: 999px;
  font-size: 0.78rem;
  color: #dcecf9;
  background: rgba(255, 255, 255, 0.06);
}

.keyword-chip-strong {
  background: rgba(255, 135, 92, 0.16);
  color: #ffd0bd;
}

.subpage-hero {
  display: grid;
  gap: 0.85rem;
}

.news-feed {
  margin-top: 1.2rem;
}

.news-feed-item,
.article-longform {
  display: grid;
  gap: 0.9rem;
}

.article-toc-card {
  margin-top: 1.2rem;
  display: grid;
  gap: 1rem;
}

.article-toc {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.toc-link {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.article-index {
  margin-top: 1.2rem;
}

.article-section {
  display: grid;
  gap: 0.8rem;
}

.article-section h3 {
  margin: 0;
  font-size: 1.08rem;
  color: var(--text);
}

.pagination {
  margin-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.pagination-link.is-active {
  background: linear-gradient(135deg, rgba(255, 135, 92, 0.95) 0%, rgba(255, 205, 107, 0.95) 100%);
  color: #091420;
  border-color: transparent;
}

.filter-card {
  padding: 1rem;
  border-radius: var(--radius-lg);
  animation: rise 0.85s ease both;
}

.filter-header {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 0.9rem;
}

.filter-header h2 {
  margin: 0;
  font-size: 1.6rem;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

.seo-card h2,
.seo-card h3,
.faq-list h3 {
  margin-top: 0;
}

.seo-grid {
  margin-top: 1rem;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.faq-list {
  margin-top: 1rem;
  display: grid;
  gap: 0.4rem;
}

.faq-list h3 {
  font-size: 1.1rem;
  line-height: 1.45;
}

.control-panel {
  display: grid;
  gap: 1rem;
}

.job-control-panel {
  grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(0, 1fr));
}

.ai-control-panel {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field label {
  font-size: 0.84rem;
  font-weight: 700;
  color: #d6e7f5;
}

input,
select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

input::placeholder {
  color: #89a2b4;
}

input:focus,
select:focus,
.lang-button:focus {
  outline: 2px solid rgba(108, 229, 216, 0.55);
  outline-offset: 2px;
}

.insight-grid {
  margin-top: 1.4rem;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 1rem;
}

.insight-card,
.roadmap-card {
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  animation: rise 1s ease both;
}

.risk-bars,
.guide-list,
.roadmap-grid,
.job-grid {
  display: grid;
  gap: 0.9rem;
}

.risk-row {
  display: grid;
  gap: 0.42rem;
}

.risk-row-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: #d6e7f5;
  font-size: 0.95rem;
}

.risk-row-track,
.meter-track {
  height: 0.72rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.risk-row-fill,
.meter-fill {
  height: 100%;
  border-radius: inherit;
}

.risk-row-fill.low,
.meter-fill.low {
  background: linear-gradient(90deg, #49c46c 0%, #77e08e 100%);
}

.risk-row-fill.medium,
.meter-fill.medium {
  background: linear-gradient(90deg, #eeb14a 0%, #ffd66b 100%);
}

.risk-row-fill.high,
.meter-fill.high {
  background: linear-gradient(90deg, #ff6f7d 0%, #ff9b7d 100%);
}

.guide-card {
  align-content: start;
}

.guide-item,
.roadmap-step {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.guide-item strong,
.roadmap-step strong,
.detail-block h3 {
  color: var(--text);
}

.results-block {
  margin-top: 1.65rem;
}

.results-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}

.job-grid {
  margin-top: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.job-card {
  display: grid;
  gap: 1rem;
  padding: 1.3rem;
  border-radius: 24px;
  animation: rise 0.9s ease both;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.job-card:hover,
.job-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.24);
}

.job-open-label {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.job-card-modal {
  margin: 0;
  cursor: default;
  animation: none;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.job-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(3, 10, 18, 0.72);
}

.job-modal-overlay.is-open {
  display: flex;
}

.job-modal-panel {
  width: min(980px, 100%);
  max-height: min(86vh, 960px);
  overflow: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(12, 32, 50, 0.98) 0%, rgba(7, 20, 32, 0.98) 100%);
  box-shadow: var(--shadow);
}

.job-modal-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem 1.2rem;
  background: rgba(5, 17, 29, 0.95);
}

.job-modal-header h2 {
  margin: 0;
  font-size: 1.6rem;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

.job-modal-close {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #f6fcff;
  border-radius: 999px;
  width: 2rem;
  height: 2rem;
  line-height: 1;
  font-size: 1.2rem;
  cursor: pointer;
}

.job-modal-body {
  padding: 1rem 1.2rem 1.2rem;
}

.card-top,
.meta-row,
.card-tags,
.meter-meta,
.detail-lists {
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: start;
  flex-wrap: wrap;
}

.job-title {
  margin: 0;
  font-size: 1.55rem;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

.job-summary {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.classification-path {
  margin: 0.55rem 0 0;
  color: #cfe1ef;
  font-size: 0.88rem;
  line-height: 1.5;
}

.tag {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.tag.neutral {
  background: rgba(255, 255, 255, 0.07);
  color: #dceaf6;
}

.tag.replace {
  background: rgba(255, 111, 125, 0.14);
  color: #ffb3bd;
}

.tag.hybrid {
  background: rgba(255, 214, 107, 0.14);
  color: #ffe6a2;
}

.tag.enhance {
  background: rgba(108, 229, 216, 0.14);
  color: #aef2ea;
}

.risk-number {
  margin: 0;
  font-size: 2.1rem;
  font-weight: 800;
}

.meter-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.detail-lists {
  align-items: stretch;
}

.detail-block {
  flex: 1 1 220px;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.detail-block h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.detail-block ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  display: grid;
  gap: 0.5rem;
}

.detail-copy {
  display: grid;
  gap: 0.72rem;
}

.detail-copy p {
  margin: 0;
}

.service-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.reference-list {
  display: grid;
  gap: 0.6rem;
}

.service-pill {
  padding: 0.45rem 0.68rem;
  border-radius: 999px;
  font-size: 0.8rem;
  color: #dcedfb;
  background: rgba(255, 255, 255, 0.06);
}

.service-link {
  color: #aef2ea;
  display: inline-flex;
  width: fit-content;
  text-decoration-color: rgba(174, 242, 234, 0.6);
  text-underline-offset: 0.16rem;
  word-break: break-word;
}

.service-link:hover {
  color: var(--text);
}

.service-link-none {
  color: var(--muted);
  text-decoration: none;
}

.empty-state {
  padding: 2rem;
  border-radius: 24px;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  color: var(--muted);
}

.roadmap-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 1rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero,
  .editorial-grid,
  .insight-grid,
  .job-control-panel,
  .ai-control-panel {
    grid-template-columns: 1fr;
  }

  .results-meta {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(calc(100% - 1rem), var(--max-width));
    padding-top: 0.75rem;
  }

  .hero,
  .editorial-card,
  .subpage-hero,
  .article-toc-card,
  .news-feed-item,
  .article-longform,
  .insight-card,
  .roadmap-card,
  .filter-card,
  .job-card {
    padding: 1rem;
  }

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

  #heroTitle {
    max-width: 100%;
    font-size: clamp(2.5rem, 14vw, 4rem);
  }
}
