.resource-page {
  --resource-ink: #091126;
  --resource-blue: #245ff0;
  --resource-cyan: #28b7ff;
  --resource-line: rgba(9, 17, 38, 0.12);
  --resource-muted: #546078;
  --resource-panel: rgba(255, 255, 255, 0.9);
  min-height: 100vh;
  background:
    radial-gradient(circle at 52% 5%, rgba(36, 95, 240, 0.17), transparent 27rem),
    radial-gradient(circle at 92% 31%, rgba(40, 183, 255, 0.11), transparent 24rem),
    #e9edf5;
  color: var(--resource-ink);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

.resource-page main {
  width: min(calc(100% - 2rem), 1240px);
  margin: 1rem auto 0;
}

.resource-page .andromeda-header .nav-wrap {
  width: min(100%, 1240px);
}

.resource-page .nav-links a[aria-current="page"] {
  color: var(--resource-ink);
}

.resource-shell {
  position: relative;
  margin-bottom: 1rem;
  overflow: hidden;
  border: 1px solid var(--resource-line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 1px 1px, rgba(9, 17, 38, 0.11) 1px, transparent 1.45px),
    linear-gradient(155deg, rgba(255, 255, 255, 0.97), rgba(246, 249, 255, 0.91));
  background-size: 14px 14px, auto;
  box-shadow: 0 42px 90px -52px rgba(9, 17, 38, 0.55), 0 18px 42px -34px rgba(36, 95, 240, 0.45);
}

.resource-wrap {
  width: min(100%, 1120px);
  margin-inline: auto;
}

.resource-hero {
  display: grid;
  min-height: 620px;
  padding: clamp(3.25rem, 7vw, 6.5rem) clamp(1.25rem, 5vw, 4.5rem);
  place-items: center;
  text-align: center;
}

.resource-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 940px;
}

.resource-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin: 0 0 1.4rem;
  color: #647089;
  font-size: 0.82rem;
  font-weight: 700;
}

.resource-breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.resource-breadcrumbs a:hover,
.resource-breadcrumbs a:focus-visible {
  color: var(--resource-blue);
}

.resource-hero h1,
.resource-heading h2,
.article-prose h2,
.article-prose h3,
.resource-final h2,
.tool-panel h2 {
  margin: 0;
  color: var(--resource-ink);
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 800;
  letter-spacing: -0.055em;
}

.resource-hero h1 {
  max-width: 960px;
  margin-inline: auto;
  font-size: clamp(3.35rem, 7vw, 6.8rem);
  line-height: 0.92;
}

.resource-hero h1 em,
.resource-heading h2 em,
.resource-final h2 em {
  color: var(--resource-blue);
  font-weight: 800;
}

.resource-lead {
  max-width: 780px;
  margin: 1.6rem auto 0;
  color: #424f68;
  font-size: clamp(1.06rem, 1.8vw, 1.25rem);
  line-height: 1.75;
}

.resource-meta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 1.8rem;
}

.resource-chip {
  display: inline-flex;
  min-height: 38px;
  padding: 0.55rem 0.85rem;
  align-items: center;
  border: 1px solid rgba(36, 95, 240, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 26px -22px rgba(9, 17, 38, 0.55);
  color: #43516b;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.resource-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(78vw, 830px);
  aspect-ratio: 1;
  border: 1px solid rgba(36, 95, 240, 0.12);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.resource-orbit::before,
.resource-orbit::after {
  position: absolute;
  border: 1px solid rgba(36, 95, 240, 0.13);
  border-radius: inherit;
  content: "";
}

.resource-orbit::before { inset: 11%; }
.resource-orbit::after { inset: 25%; }

.resource-orbit-dot {
  position: absolute;
  top: 8%;
  left: 50%;
  width: 12px;
  height: 12px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--resource-cyan);
  box-shadow: 0 0 0 8px rgba(40, 183, 255, 0.1), 0 0 32px rgba(40, 183, 255, 0.8);
}

.resource-section {
  padding: clamp(3rem, 7vw, 6.5rem) clamp(1.25rem, 5vw, 4.5rem);
}

.resource-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.72fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
  margin-bottom: 2.25rem;
}

.resource-heading h2,
.resource-final h2,
.tool-panel h2 {
  font-size: clamp(2.45rem, 4.4vw, 4.7rem);
  line-height: 0.98;
}

.resource-heading p,
.resource-final p {
  margin: 0;
  color: var(--resource-muted);
  font-size: 1.04rem;
  line-height: 1.75;
}

.featured-grid,
.topic-grid,
.method-grid,
.tool-layout,
.metric-grid,
.flow-grid,
.guide-layout,
.faq-grid {
  display: grid;
  gap: 1rem;
}

.featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.topic-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.method-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tool-layout { grid-template-columns: minmax(310px, 0.78fr) minmax(0, 1.22fr); align-items: start; }
.metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.flow-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.guide-layout { grid-template-columns: minmax(0, 1fr) 290px; align-items: start; }
.faq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.resource-card,
.topic-card,
.method-card,
.tool-panel,
.metric-card,
.answer-box,
.flow-step,
.article-aside,
.faq-card,
.resource-final {
  border: 1px solid var(--resource-line);
  background: var(--resource-panel);
  box-shadow: 0 25px 55px -40px rgba(9, 17, 38, 0.5), 0 12px 24px -22px rgba(36, 95, 240, 0.45);
}

.resource-card {
  position: relative;
  min-height: 420px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  overflow: hidden;
  border-radius: 24px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.resource-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 34px 64px -38px rgba(9, 17, 38, 0.55), 0 18px 36px -26px rgba(36, 95, 240, 0.55);
}

.resource-card::after {
  position: absolute;
  right: -65px;
  bottom: -100px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(36, 95, 240, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 0 35px rgba(36, 95, 240, 0.035), 0 0 0 72px rgba(36, 95, 240, 0.025);
  content: "";
}

.resource-card > * { position: relative; z-index: 1; }

.resource-card-type {
  display: inline-flex;
  margin-bottom: 4rem;
  color: var(--resource-blue);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.resource-card h3,
.topic-card h3,
.method-card h3,
.metric-card h3,
.flow-step h3,
.faq-card h3 {
  margin: 0;
  color: var(--resource-ink);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.resource-card h3 { max-width: 520px; font-size: clamp(1.7rem, 3vw, 2.55rem); line-height: 1.08; }
.resource-card p { max-width: 570px; color: var(--resource-muted); }

.resource-card-link,
.resource-button {
  display: inline-flex;
  min-height: 48px;
  padding: 0.75rem 1rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(36, 95, 240, 0.2);
  border-radius: 12px;
  background: var(--resource-blue);
  box-shadow: 0 18px 34px -24px rgba(36, 95, 240, 0.9);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.resource-card-link:hover,
.resource-card-link:focus-visible,
.resource-button:hover,
.resource-button:focus-visible {
  background: #1744b8;
  color: #fff;
  transform: translateY(-1px);
}

.resource-button.secondary {
  background: #fff;
  color: var(--resource-ink);
  box-shadow: none;
}

.resource-button.secondary:hover,
.resource-button.secondary:focus-visible {
  border-color: var(--resource-blue);
  color: var(--resource-blue);
}

.topic-card,
.method-card {
  min-height: 220px;
  padding: 1.45rem;
  border-radius: 20px;
}

.topic-number,
.method-number,
.flow-number {
  display: grid;
  width: 36px;
  height: 36px;
  margin-bottom: 2.5rem;
  place-items: center;
  border: 1px solid rgba(36, 95, 240, 0.2);
  border-radius: 11px;
  background: rgba(36, 95, 240, 0.08);
  color: var(--resource-blue);
  font-size: 0.75rem;
  font-weight: 800;
}

.topic-card p,
.method-card p,
.metric-card p,
.faq-card p,
.flow-step p {
  margin-bottom: 0;
  color: var(--resource-muted);
  font-size: 0.92rem;
}

.editorial-standard {
  border-top: 1px solid var(--resource-line);
}

.resource-final {
  padding: clamp(2.25rem, 6vw, 5rem);
  border-radius: 26px;
  text-align: center;
}

.resource-final p { max-width: 700px; margin: 1.15rem auto 1.6rem; }

.resource-footer {
  width: min(calc(100% - 2rem), 1240px);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
}

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

.resource-footer p { margin: 0; color: var(--resource-muted); font-size: 0.85rem; }

.resource-footer .footer-links { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.resource-footer .footer-links a { color: #526079; font-size: 0.76rem; text-decoration: none; }

.tool-hero { min-height: 540px; }
.tool-hero h1 { max-width: 1050px; font-size: clamp(3.1rem, 6.3vw, 6.3rem); }

.tool-panel {
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 24px;
}

.calculator-form {
  display: grid;
  gap: 1rem;
}

.field label {
  display: block;
  margin-bottom: 0.45rem;
  color: #293650;
  font-size: 0.84rem;
  font-weight: 800;
}

.input-shell {
  display: flex;
  min-height: 54px;
  align-items: center;
  border: 1px solid rgba(9, 17, 38, 0.16);
  border-radius: 13px;
  background: #fff;
  overflow: hidden;
}

.input-shell:focus-within {
  border-color: var(--resource-blue);
  box-shadow: 0 0 0 4px rgba(36, 95, 240, 0.1);
}

.input-affix {
  padding-inline: 0.85rem;
  color: #657089;
  font-weight: 800;
}

.input-shell input {
  width: 100%;
  min-width: 0;
  padding: 0.9rem 0.85rem;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--resource-ink);
  font: inherit;
  font-weight: 700;
}

.calculator-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 0.25rem; }
.calculator-actions button { cursor: pointer; font: inherit; }

.calculator-results {
  position: sticky;
  top: 92px;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0, rgba(40, 183, 255, 0.22), transparent 14rem),
    linear-gradient(145deg, #0b1530, #091126);
  box-shadow: 0 38px 80px -42px rgba(9, 17, 38, 0.85);
  color: #fff;
}

.calculator-results h2 { color: #fff; font-size: clamp(2rem, 3.2vw, 3.4rem); }
.calculator-results > p { color: #b9c6df; }

.metric-card {
  min-height: 145px;
  padding: 1.1rem;
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.metric-card h3 { color: #bfcae0; font-size: 0.77rem; letter-spacing: 0.02em; text-transform: uppercase; }
.metric-value { display: block; margin-top: 0.8rem; color: #fff; font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 800; letter-spacing: -0.055em; }
.metric-card p { color: #8fa0bf; font-size: 0.76rem; line-height: 1.45; }

.result-note {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(40, 183, 255, 0.2);
  border-radius: 14px;
  background: rgba(40, 183, 255, 0.07);
  color: #d8e2f5;
  font-size: 0.82rem;
}

.answer-box {
  margin-bottom: 2rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-left: 5px solid var(--resource-blue);
  border-radius: 20px;
}

.answer-box strong { display: block; margin-bottom: 0.55rem; color: var(--resource-blue); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.answer-box p { margin: 0; font-size: clamp(1.08rem, 2vw, 1.32rem); line-height: 1.7; }

.article-prose { min-width: 0; }
.article-prose h2 { margin-top: 3.4rem; font-size: clamp(2.2rem, 4vw, 3.7rem); line-height: 1; }
.article-prose h2:first-child { margin-top: 0; }
.article-prose h3 { margin-top: 2.2rem; font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.15; }
.article-prose p,
.article-prose li { color: #394761; font-size: 1rem; line-height: 1.82; }
.article-prose a { color: #174fcf; font-weight: 700; }
.article-prose ul,
.article-prose ol { padding-left: 1.25rem; }
.article-prose li + li { margin-top: 0.45rem; }

.formula-box,
.warning-box,
.example-box {
  margin: 1.5rem 0;
  padding: 1.2rem 1.35rem;
  border: 1px solid rgba(36, 95, 240, 0.18);
  border-radius: 16px;
  background: rgba(36, 95, 240, 0.055);
}

.warning-box {
  border-color: rgba(191, 117, 0, 0.24);
  background: rgba(255, 173, 40, 0.08);
}

.formula-box code {
  color: #123a9c;
  font-family: "DM Mono", Consolas, monospace;
  font-size: 0.9rem;
  font-weight: 700;
}

.flow-step {
  position: relative;
  min-height: 185px;
  padding: 1rem;
  border-radius: 18px;
}

.flow-step:not(:last-child)::after {
  position: absolute;
  top: 34px;
  right: -13px;
  z-index: 3;
  color: var(--resource-blue);
  content: "→";
  font-weight: 800;
}

.flow-step .flow-number { margin-bottom: 1.4rem; }
.flow-step h3 { font-size: 0.95rem; }
.flow-step p { font-size: 0.78rem; line-height: 1.55; }

.article-aside {
  position: sticky;
  top: 92px;
  padding: 1.25rem;
  border-radius: 18px;
}

.article-aside strong { display: block; margin-bottom: 0.8rem; }
.article-aside nav { display: grid; gap: 0.55rem; }
.article-aside a { color: #53617b; font-size: 0.84rem; font-weight: 700; text-decoration: none; }
.article-aside a:hover,
.article-aside a:focus-visible { color: var(--resource-blue); }

.comparison-table {
  width: 100%;
  margin: 1.4rem 0;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--resource-line);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.comparison-table th,
.comparison-table td { padding: 0.95rem; border-bottom: 1px solid var(--resource-line); text-align: left; vertical-align: top; }
.comparison-table th { background: #f2f6ff; color: #23314b; font-size: 0.8rem; }
.comparison-table td { color: #46536c; font-size: 0.86rem; }
.comparison-table tr:last-child td { border-bottom: 0; }

.faq-card { padding: 1.35rem; border-radius: 18px; }
.faq-card h3 { font-size: 1.02rem; line-height: 1.35; }

.sources-list { padding-left: 1.2rem; }
.sources-list li { margin-top: 0.6rem; }

@media (prefers-reduced-motion: no-preference) {
  .resource-orbit-dot { animation: resource-pulse 3.2s ease-in-out infinite; }
  @keyframes resource-pulse { 50% { box-shadow: 0 0 0 14px rgba(40, 183, 255, 0.04), 0 0 42px rgba(40, 183, 255, 0.9); } }
}

@media (max-width: 980px) {
  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .method-grid { grid-template-columns: 1fr; }
  .tool-layout,
  .guide-layout { grid-template-columns: 1fr; }
  .calculator-results,
  .article-aside { position: static; }
  .flow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-step:not(:last-child)::after { display: none; }
  .article-aside nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .resource-page .andromeda-header .nav-links { display: none; }
  .resource-heading { grid-template-columns: 1fr; gap: 1rem; }
  .featured-grid,
  .faq-grid { grid-template-columns: 1fr; }
  .resource-card { min-height: 350px; }
  .resource-card-type { margin-bottom: 2.5rem; }
}

@media (max-width: 620px) {
  .resource-page main,
  .resource-footer { width: min(calc(100% - 1rem), 1240px); }
  .resource-hero { min-height: 520px; padding: 3rem 1rem; }
  .resource-hero h1,
  .tool-hero h1 { font-size: clamp(2.7rem, 14vw, 4rem); }
  .resource-section { padding: 3rem 1rem; }
  .topic-grid,
  .metric-grid,
  .flow-grid { grid-template-columns: 1fr; }
  .resource-orbit { width: 150vw; }
  .resource-orbit-dot { display: none; }
  .topic-card,
  .method-card { min-height: 190px; }
  .article-aside nav { grid-template-columns: 1fr; }
  .comparison-table { display: block; overflow-x: auto; }
  .resource-footer .footer-wrap { align-items: flex-start; flex-direction: column; }
}

@media print {
  .andromeda-header,
  .resource-footer,
  .resource-orbit,
  .resource-final { display: none !important; }
  .resource-page,
  .resource-shell { background: #fff !important; box-shadow: none !important; }
  .resource-page main { width: 100%; }
  .resource-shell { border: 0; }
  .article-aside { display: none; }
  .guide-layout { display: block; }
}
