/* Shared realistic Sun treatment for the system map and field note. */

.sun-hero-photo {
  position: relative;
  width: min(320px, 31vw);
  margin: 0;
  isolation: isolate;
}

.sun-hero-photo::before {
  content: "";
  position: absolute;
  inset: 9%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 159, 63, 0.34), rgba(225, 104, 42, 0.11) 48%, transparent 72%);
  filter: blur(24px);
}

.sun-hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow:
    0 0 0 7px rgba(255, 184, 92, 0.035),
    0 0 38px rgba(255, 130, 42, 0.18),
    0 24px 64px rgba(0, 0, 0, 0.54);
  filter: saturate(0.9) contrast(1.04);
  animation: sun-photo-breathe 9s ease-in-out infinite alternate;
}

.sun-hero-photo figcaption {
  width: min(260px, 100%);
  margin: 14px auto 0;
  color: var(--text-dim);
  font-size: 0.59375rem;
  line-height: 1.55;
  text-align: center;
}

.planet-swatch.sun-star {
  border-color: rgba(255, 211, 145, 0.3);
  background-color: transparent;
  background-image: url("assets/sun/sun-disk-small.webp");
  background-position: center;
  background-size: 100% 100%;
  box-shadow:
    inset 0 0 0 1px rgba(255, 232, 188, 0.12),
    0 0 24px rgba(255, 133, 48, 0.24),
    0 12px 34px rgba(0, 0, 0, 0.4);
}

/* Keep the home-system Sun observational at every size. */
.fp-solar .sun {
  width: clamp(32px, 3.6vw, 42px);
  background-color: transparent;
  background-image:
    radial-gradient(circle at 31% 24%, rgba(255, 250, 222, 0.24), transparent 24%),
    radial-gradient(ellipse 72% 78% at 77% 82%, rgba(25, 11, 5, 0.52), rgba(25, 11, 5, 0.13) 44%, transparent 72%),
    radial-gradient(circle at 50% 50%, transparent 55%, rgba(18, 8, 4, 0.2) 78%, transparent 100%),
    url("assets/sun/sun-disk-transparent.webp");
  background-position: center;
  background-size: 100% 100%;
  filter: brightness(0.9) saturate(0.8) contrast(1.04);
  box-shadow:
    inset -7px -8px 13px rgba(18, 8, 4, 0.5),
    inset 4px 5px 9px rgba(255, 240, 201, 0.12),
    0 0 6px rgba(247, 226, 178, 0.18),
    0 0 18px rgba(155, 132, 90, 0.08);
  animation: none;
  transition: box-shadow 0.35s ease, scale 0.35s ease, filter 0.35s ease;
}

.fp-solar .sun::before {
  inset: -12%;
  background: radial-gradient(circle, rgba(219, 185, 133, 0.09), transparent 66%);
  filter: blur(5px);
  opacity: 0.28;
  animation: none;
}

.fp-solar .sun::after {
  display: none;
}

.fp-solar .sun:hover,
.fp-solar .sun:focus-visible {
  scale: 2.2;
  filter: brightness(0.96) saturate(0.86) contrast(1.06);
  box-shadow:
    0 0 10px 2px rgba(239, 221, 183, 0.16),
    0 0 34px 8px rgba(146, 125, 86, 0.1);
}

@keyframes sun-photo-breathe {
  from {
    filter: brightness(0.98) saturate(0.94);
  }

  to {
    filter: brightness(1.09) saturate(1.04);
  }
}

/* Article diagrams */

.sun-section-lead {
  max-width: 760px;
}

.sun-fusion-visual {
  margin: 20px 0 22px;
  overflow: hidden;
  border: 1px solid rgba(241, 175, 95, 0.2);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(242, 152, 66, 0.11), transparent 44%),
    rgba(255, 255, 255, 0.018);
}

.sun-fusion-chain {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sun-reaction-card {
  min-width: 0;
  padding: 20px 18px 18px;
  border-right: 1px solid var(--line);
}

.sun-reaction-card:last-child {
  border-right: 0;
}

.sun-reaction-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
}

.sun-reaction-title > span {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 195, 113, 0.3);
  border-radius: 50%;
  color: #ffd18e;
  font-size: 0.5625rem;
  font-variant-numeric: tabular-nums;
}

.sun-reaction-title h3 {
  margin: 0;
  color: var(--text);
  font-size: 0.78125rem;
  font-weight: 600;
}

.sun-reaction-stage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 78px;
  padding: 12px 7px;
  border: 1px solid rgba(255, 213, 150, 0.09);
  border-radius: 13px;
  background: rgba(3, 5, 10, 0.28);
}

.sun-nucleon,
.sun-nucleus > i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 241, 205, 0.34);
  border-radius: 50%;
  color: #501d0d;
  font-size: 0.5625rem;
  font-style: normal;
  font-weight: 600;
  line-height: 1;
}

.sun-nucleon.is-proton,
.sun-nucleus > i.is-proton {
  background: radial-gradient(circle at 32% 28%, #fff5ca, #ffbb60 32%, #d86e31 72%, #8a2f1d);
  box-shadow: inset -3px -4px 7px rgba(87, 24, 11, 0.32), 0 0 8px rgba(255, 150, 62, 0.16);
}

.sun-nucleon.is-neutron,
.sun-nucleus > i.is-neutron {
  color: #e8edf2;
  border-color: rgba(214, 226, 239, 0.24);
  background: radial-gradient(circle at 32% 28%, #d9e2ec, #8795a6 40%, #475464 78%, #26303b);
}

.sun-nucleus {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  gap: 2px;
  width: 44px;
  min-height: 34px;
  padding: 5px;
  border: 1px solid rgba(255, 205, 132, 0.18);
  border-radius: 18px;
  background: rgba(255, 178, 75, 0.045);
  box-shadow: 0 0 16px rgba(255, 132, 45, 0.08);
}

.sun-nucleus.is-deuterium {
  width: 43px;
}

.sun-nucleus.is-helium-three {
  width: 50px;
}

.sun-nucleus.is-helium-four {
  width: 54px;
  min-height: 48px;
  border-radius: 14px;
}

.sun-nucleus.is-helium-four > i {
  width: 19px;
  height: 19px;
  font-size: 0;
}

.sun-reaction-arrow,
.sun-reaction-plus {
  color: rgba(255, 221, 164, 0.7);
  font-size: 0.875rem;
  line-height: 1;
}

.sun-reaction-plus {
  font-size: 0.6875rem;
}

.sun-emitted {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  font-size: 0.5625rem;
  line-height: 1;
  animation: sun-particle-pulse 2.8s ease-in-out infinite alternate;
}

.sun-emitted.is-positron {
  border: 1px solid rgba(137, 219, 243, 0.38);
  color: #bfeeff;
  background: rgba(89, 190, 225, 0.11);
}

.sun-emitted.is-neutrino {
  border: 1px dashed rgba(219, 225, 239, 0.34);
  color: rgba(225, 234, 245, 0.74);
}

.sun-emitted.is-photon {
  border: 1px solid rgba(255, 218, 116, 0.36);
  color: #ffe09a;
  background: rgba(255, 196, 70, 0.12);
  box-shadow: 0 0 12px rgba(255, 197, 78, 0.24);
}

.sun-reaction-card > p {
  min-height: 4.8em;
  margin: 12px 0 10px;
  color: var(--text-soft);
  font-size: 0.71875rem;
  line-height: 1.58;
}

.sun-reaction-card code {
  display: block;
  color: color-mix(in srgb, var(--accent) 68%, var(--text));
  font-family: var(--mono);
  font-size: 0.65625rem;
  line-height: 1.5;
}

.sun-fusion-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px 22px;
  align-items: center;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.sun-fusion-accounting {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sun-fusion-accounting > b {
  margin: 0 4px;
  color: var(--text-dim);
  font-size: 0.6875rem;
  font-weight: 400;
}

.sun-fusion-accounting .sun-energy-release {
  color: color-mix(in srgb, var(--accent) 72%, white);
  font-size: 0.59375rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.sun-fusion-summary p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.6875rem;
  line-height: 1.55;
}

.sun-fusion-summary strong {
  color: var(--text-soft);
  font-weight: 600;
}

@keyframes sun-particle-pulse {
  from {
    transform: translateY(1px);
    opacity: 0.68;
  }

  to {
    transform: translateY(-2px);
    opacity: 1;
  }
}

.sun-anatomy {
  margin: 20px 0 22px;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid rgba(242, 177, 91, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 20%, rgba(250, 151, 59, 0.1), transparent 34%),
    rgba(255, 255, 255, 0.018);
}

.sun-anatomy-map {
  width: min(100%, 380px);
  margin: 0 auto 24px;
}

.sun-anatomy-map svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.28));
}

.sun-anatomy-map .sun-shape {
  transform-origin: 220px 220px;
  transition: opacity 0.2s ease, filter 0.2s ease;
  cursor: pointer;
}

.sun-anatomy-map .sun-layer-hit {
  stroke: transparent;
  pointer-events: stroke;
}

.sun-layer-status {
  min-height: 1.5em;
  margin: 0 0 5px;
  color: color-mix(in srgb, var(--accent) 62%, var(--text-soft));
  font-size: 0.6875rem;
  line-height: 1.5;
  text-align: center;
}

.sun-radius-reference {
  margin: 0 0 10px;
  color: var(--text-dim);
  font-size: 0.625rem;
  text-align: center;
}

.sun-layer-key {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sun-layer-key li {
  --layer-color: #ffb45e;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.sun-layer-key li[data-layer="core"] {
  --layer-color: #fff0ad;
}

.sun-layer-key li[data-layer="radiative"] {
  --layer-color: #bd4c4d;
}

.sun-layer-key li[data-layer="convective"] {
  --layer-color: #d69445;
}

.sun-layer-key li[data-layer="photosphere"] {
  --layer-color: #f2d27f;
}

.sun-layer-key li[data-layer="chromosphere"] {
  --layer-color: #cf7a83;
}

.sun-layer-key li[data-layer="corona"] {
  --layer-color: #a8c2d6;
}

.sun-layer-key button {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  width: 100%;
  min-height: 100%;
  padding: 11px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.sun-layer-key button:is(:hover, :focus) {
  outline: none;
  background: color-mix(in srgb, var(--layer-color) 9%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--layer-color) 48%, transparent);
}

.sun-layer-item.is-active {
  border-color: color-mix(in srgb, var(--layer-color) 52%, var(--line));
  background: color-mix(in srgb, var(--layer-color) 7%, rgba(255, 255, 255, 0.02));
}

.sun-layer-keymark {
  width: 9px;
  height: 9px;
  margin-top: 3px;
  border: 1px solid rgba(255, 238, 201, 0.36);
  border-radius: 50%;
  box-shadow: 0 0 8px color-mix(in srgb, var(--layer-color) 45%, transparent);
  background: var(--layer-color);
}

.sun-layer-copy {
  display: grid;
  gap: 3px;
}

.sun-layer-key strong {
  color: var(--text);
  font-size: 0.6875rem;
  font-weight: 600;
}

.sun-layer-key small {
  color: var(--text-dim);
  font-size: 0.625rem;
  line-height: 1.45;
}

.sun-shape[data-layer="core"] {
  --layer-glow: #fff0ad;
}

.sun-shape[data-layer="radiative"] {
  --layer-glow: #ef8c82;
}

.sun-shape[data-layer="convective"] {
  --layer-glow: #ffd08d;
}

.sun-shape[data-layer="photosphere"] {
  --layer-glow: #fff1b5;
}

.sun-shape[data-layer="chromosphere"] {
  --layer-glow: #ffc5c8;
}

.sun-shape[data-layer="corona"] {
  --layer-glow: #d2e8f7;
}

.sun-anatomy.has-active-layer .sun-shape {
  opacity: 0.15;
}

.sun-anatomy.has-active-layer .sun-shape.is-active {
  opacity: 1;
  filter: brightness(1.22) saturate(1.08) drop-shadow(0 0 9px var(--layer-glow));
}

.sun-anatomy.has-active-layer .sun-shape.is-active .sun-layer-hit {
  stroke: var(--layer-glow);
  stroke-opacity: 0.42;
}

.sun-anatomy .sun-diagram-note {
  display: block;
  margin-top: 12px;
  text-align: center;
}

.sun-diagram-note {
  color: var(--text-dim);
  font-size: 0.5625rem;
  line-height: 1.5;
}

.sun-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 18px 0 20px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--line);
}

.sun-compare article {
  position: relative;
  padding: 22px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
}

.sun-compare .is-fusion {
  --compare-color: #f0a24d;
  --nuclear-fill: rgba(240, 162, 77, 0.09);
}

.sun-compare .is-fission {
  --compare-color: #7f9fc0;
  --nuclear-fill: rgba(127, 159, 192, 0.09);
}

.sun-compare header {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
}

.sun-compare header span {
  color: var(--compare-color);
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.sun-compare header h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
}

.sun-nuclear-sketch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 112px;
  margin-bottom: 16px;
  padding: 16px 12px;
  border: 1px solid color-mix(in srgb, var(--compare-color) 18%, var(--line));
  border-radius: 13px;
  background:
    radial-gradient(circle at center, var(--nuclear-fill), transparent 64%),
    rgba(3, 5, 10, 0.18);
}

.sun-nuclear-sketch .sun-nucleon,
.sun-nuclear-sketch .sun-nucleus > i {
  width: 27px;
  height: 27px;
  font-size: 0.625rem;
}

.sun-nuclear-sketch .sun-nucleus {
  width: 52px;
  min-height: 40px;
}

.sun-nuclear-sketch .sun-nucleus.is-helium-three {
  width: 59px;
}

.sun-energy-burst {
  position: relative;
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 209, 117, 0.28);
  border-radius: 50%;
  color: #ffd57c;
  font-size: 0.5rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  box-shadow: 0 0 18px rgba(255, 180, 74, 0.18);
}

.sun-energy-burst::before,
.sun-energy-burst::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(255, 199, 99, 0.21);
  border-radius: 50%;
}

.sun-energy-burst::after {
  inset: -12px;
  border-style: dashed;
  opacity: 0.42;
}

.sun-fission-start {
  display: grid;
  grid-template-columns: repeat(3, 12px);
  gap: 2px;
  padding: 8px;
  border: 1px solid rgba(169, 191, 216, 0.24);
  border-radius: 50%;
  background: rgba(99, 131, 167, 0.1);
}

.sun-fission-start i,
.sun-fission-piece i,
.sun-neutron-stream i {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #e3edf6, #8193a7 42%, #465464);
}

.sun-fission-piece {
  display: grid;
  grid-template-columns: repeat(2, 11px);
  gap: 2px;
  padding: 6px;
  border: 1px solid rgba(169, 191, 216, 0.18);
  border-radius: 12px;
}

.sun-fission-piece i {
  width: 11px;
  height: 11px;
}

.sun-neutron-stream {
  display: flex;
  gap: 3px;
}

.sun-neutron-stream i {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  color: #e9f0f6;
  font-size: 0.5rem;
  font-style: normal;
}

.sun-compare ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sun-compare li {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.71875rem;
  line-height: 1.55;
}

.sun-compare li strong {
  color: var(--compare-color);
}

.sun-compare-takeaway {
  padding: 12px 14px;
  border-left: 2px solid color-mix(in srgb, var(--accent) 58%, transparent);
  color: var(--text-dim);
  font-size: 0.6875rem;
  line-height: 1.6;
}

.sun-lifecycle {
  position: relative;
  display: grid;
  gap: 9px;
  margin: 18px 0 18px;
  padding: 0;
  list-style: none;
}

.sun-lifecycle::before {
  content: "";
  position: absolute;
  left: 171px;
  top: 38px;
  bottom: 38px;
  width: 1px;
  background: linear-gradient(#7f8fa1, #f0a24d 24%, #df7640 52%, #b86c62 73%, #8db8ce);
  opacity: 0.5;
}

.sun-life-stage {
  position: relative;
  display: grid;
  grid-template-columns: 112px 80px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 92px;
  padding: 12px 15px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.017);
}

.sun-life-age {
  display: grid;
  gap: 4px;
  color: var(--text-dim);
  font-size: 0.59375rem;
  line-height: 1.45;
  text-align: right;
}

.sun-life-age span {
  color: color-mix(in srgb, var(--life-color) 72%, var(--text));
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.07em;
}

.sun-life-visual {
  position: relative;
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  justify-self: center;
  border: 1px solid color-mix(in srgb, var(--life-color) 18%, var(--line));
  border-radius: 50%;
  background: rgba(3, 5, 10, 0.2);
  box-shadow: 0 0 22px color-mix(in srgb, var(--life-color) 10%, transparent);
}

.sun-life-body {
  position: relative;
  display: block;
  border-radius: 50%;
}

.sun-life-stage.is-birth {
  --life-color: #9fb0c6;
}

.sun-life-stage.is-main {
  --life-color: #ffc46d;
}

.sun-life-stage.is-red {
  --life-color: #e77f48;
}

.sun-life-stage.is-helium {
  --life-color: #f0b856;
}

.sun-life-stage.is-death {
  --life-color: #bb7e79;
}

.sun-life-stage.is-remnant {
  --life-color: #9bc1d6;
}

.sun-life-stage.is-birth .sun-life-body {
  width: 18px;
  height: 18px;
  background: radial-gradient(circle at 38% 34%, #ffe5c8, #ca7a5b 40%, #603341);
  box-shadow: 0 0 13px rgba(209, 122, 92, 0.65);
}

.sun-life-stage.is-birth .sun-life-visual i {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(180, 195, 214, 0.48);
}

.sun-life-stage.is-birth .sun-life-visual i:nth-child(2) {
  left: 9px;
  top: 18px;
}

.sun-life-stage.is-birth .sun-life-visual i:nth-child(3) {
  right: 8px;
  top: 14px;
}

.sun-life-stage.is-birth .sun-life-visual i:nth-child(4) {
  left: 16px;
  bottom: 8px;
}

.sun-life-stage.is-birth .sun-life-visual i:nth-child(5) {
  right: 14px;
  bottom: 11px;
}

.sun-life-stage.is-main .sun-life-body {
  width: 36px;
  height: 36px;
  background: url("assets/sun/sun-disk-transparent.webp") center / 100% 100%;
  filter: drop-shadow(0 0 9px rgba(255, 172, 69, 0.5));
}

.sun-life-stage.is-red .sun-life-body {
  width: 54px;
  height: 54px;
  background: radial-gradient(circle at 35% 30%, #ffd39d, #e36b43 36%, #8e2f2c 78%, #421820);
  box-shadow: 0 0 20px rgba(219, 92, 48, 0.32);
}

.sun-life-stage.is-red .sun-life-earth {
  position: absolute;
  right: 2px;
  bottom: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4a91bf;
  box-shadow: 0 0 0 1px rgba(209, 237, 251, 0.26);
}

.sun-life-stage.is-helium .sun-life-body {
  width: 40px;
  height: 40px;
  background: radial-gradient(circle, #fff4b4 0 15%, #ffbe4d 16% 39%, #d66e2d 76%, #8c3020);
  box-shadow: 0 0 18px rgba(255, 185, 77, 0.35);
}

.sun-life-stage.is-helium .sun-life-body::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(255, 244, 185, 0.58);
  border-radius: 50%;
}

.sun-life-stage.is-death .sun-life-body {
  width: 54px;
  height: 54px;
  background:
    repeating-conic-gradient(from 20deg, rgba(255, 218, 165, 0.18) 0 8deg, transparent 9deg 24deg),
    radial-gradient(circle at 40% 36%, #ffb171, #c54b35 46%, #64232b 80%);
  box-shadow: 0 0 22px rgba(213, 81, 56, 0.35);
}

.sun-life-stage.is-death .sun-life-visual > i:not(.sun-life-body) {
  position: absolute;
  width: 2px;
  height: 13px;
  border-radius: 99px;
  background: linear-gradient(rgba(235, 188, 143, 0), rgba(235, 188, 143, 0.72));
}

.sun-life-stage.is-death .sun-life-visual > i:nth-of-type(1) {
  right: 7px;
  top: 3px;
  transform: rotate(35deg);
}

.sun-life-stage.is-death .sun-life-visual > i:nth-of-type(2) {
  left: 8px;
  top: 4px;
  transform: rotate(-42deg);
}

.sun-life-stage.is-death .sun-life-visual > i:nth-of-type(3) {
  left: 4px;
  bottom: 9px;
  transform: rotate(-102deg);
}

.sun-life-stage.is-remnant .sun-life-body {
  width: 12px;
  height: 12px;
  background: radial-gradient(circle at 35% 32%, #ffffff, #d7edf6 44%, #83b6cf);
  box-shadow: 0 0 16px rgba(167, 220, 240, 0.8);
}

.sun-life-stage.is-remnant .sun-life-ring {
  position: absolute;
  inset: 7px;
  border: 2px solid rgba(133, 200, 225, 0.42);
  border-radius: 50%;
  box-shadow: inset 0 0 13px rgba(98, 178, 213, 0.16);
}

.sun-life-copy h3 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 0.78125rem;
  font-weight: 600;
}

.sun-life-copy p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.6875rem;
  line-height: 1.6;
}

.sun-energy {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr);
  gap: 18px 24px;
  margin: 18px 0 20px;
  padding: clamp(18px, 4vw, 28px);
  overflow: hidden;
  border: 1px solid rgba(240, 166, 82, 0.18);
  border-radius: 16px;
  background:
    radial-gradient(circle at 14% 18%, rgba(245, 167, 80, 0.13), transparent 32%),
    rgba(255, 255, 255, 0.018);
}

.sun-energy-lead {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.sun-energy-square {
  position: relative;
  display: grid;
  width: 112px;
  height: 112px;
  place-items: end start;
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 205, 113, 0.32);
  border-radius: 10px;
  background:
    linear-gradient(135deg, transparent 48%, rgba(255, 219, 142, 0.08) 49% 51%, transparent 52%),
    linear-gradient(45deg, rgba(255, 187, 75, 0.15), rgba(255, 120, 44, 0.03));
  box-shadow: inset 0 0 28px rgba(255, 177, 69, 0.08), 0 12px 28px rgba(0, 0, 0, 0.24);
}

.sun-energy-square::before {
  content: "";
  position: absolute;
  top: -4px;
  right: -4px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff0b6, #ffb04e 35%, rgba(237, 95, 35, 0.1) 70%);
  box-shadow: 0 0 25px rgba(255, 170, 65, 0.42);
}

.sun-energy-square span {
  color: #ffdda0;
  font-family: var(--mono);
  font-size: 0.65625rem;
}

.sun-energy-lead > div:last-child {
  display: grid;
  gap: 5px;
}

.sun-energy-lead span,
.sun-energy-examples span {
  color: var(--text-dim);
  font-size: 0.6875rem;
  line-height: 1.45;
}

.sun-energy-lead strong {
  color: var(--text);
  font-size: clamp(1.45rem, 4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1;
}

.sun-energy-lead small {
  color: color-mix(in srgb, var(--accent) 64%, var(--text-dim));
  font-size: 0.625rem;
}

.sun-energy-scale {
  display: grid;
  grid-template-columns: 1fr 0.74fr 0.25fr;
  gap: 5px;
  align-self: end;
}

.sun-energy-scale i {
  display: block;
  height: 6px;
  border-radius: 99px;
}

.sun-energy-scale i:nth-child(1) {
  background: #ffd076;
}

.sun-energy-scale i:nth-child(2) {
  background: #ee994a;
}

.sun-energy-scale i:nth-child(3) {
  background: #b66940;
}

.sun-energy-examples {
  display: grid;
  grid-row: 1 / span 2;
  grid-column: 2;
  gap: 7px;
}

.sun-energy-examples article {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.022);
}

.sun-energy-examples article > div:last-child {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  align-items: baseline;
}

.sun-energy-examples strong {
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.sun-energy-examples p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--text-soft);
  font-size: 0.6875rem;
  line-height: 1.45;
}

.sun-energy-icon {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 177, 76, 0.07);
}

.sun-energy-icon.is-heater {
  grid-template-columns: repeat(3, 4px);
  gap: 4px;
  border: 1px solid rgba(255, 185, 93, 0.26);
}

.sun-energy-icon.is-heater i {
  width: 4px;
  height: 20px;
  border-radius: 99px;
  background: linear-gradient(#ffd586, #e37a36);
}

.sun-energy-icon.is-panel {
  grid-template-columns: repeat(3, 8px);
  gap: 2px;
  transform: rotate(-8deg);
  border: 1px solid rgba(144, 191, 222, 0.3);
  background: rgba(95, 151, 190, 0.12);
}

.sun-energy-icon.is-panel i {
  width: 8px;
  height: 22px;
  border-radius: 2px;
  background: linear-gradient(135deg, #8bb8d2, #3f728f);
}

.sun-energy-icon.is-earth i {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse 32% 22% at 35% 38%, #8dbc82, transparent 64%),
    radial-gradient(ellipse 24% 19% at 67% 61%, #91bd7a, transparent 66%),
    radial-gradient(circle at 34% 29%, #a7ddf5, #3b87b3 51%, #1e486a);
  box-shadow: 0 0 0 1px rgba(174, 222, 244, 0.2);
}

.sun-energy figcaption {
  grid-column: 1 / -1;
  margin-top: 1px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 0.625rem;
  line-height: 1.6;
}

.sun-feature-image {
  margin: 18px 0 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #030408;
}

.sun-feature-image img {
  display: block;
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  object-position: center;
}

.sun-feature-image figcaption {
  padding: 11px 14px;
  color: var(--text-dim);
  font-size: 0.59375rem;
  line-height: 1.55;
}

.sun-missions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.sun-missions a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.625rem;
  text-decoration: none;
}

.sun-missions a:hover,
.sun-missions a:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  color: var(--text);
}

[data-theme="light"] .sun-compare article,
[data-theme="light"] .sun-energy,
[data-theme="light"] .sun-anatomy,
[data-theme="light"] .sun-life-stage {
  background-color: rgba(255, 255, 255, 0.62);
}

[data-theme="light"] .sun-reaction-stage,
[data-theme="light"] .sun-life-visual,
[data-theme="light"] .sun-nuclear-sketch {
  background-color: rgba(11, 13, 20, 0.88);
}

[data-theme="light"] .sun-fusion-summary {
  background-color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 760px) {
  .sun-hero-photo {
    width: min(210px, 58vw);
  }

  .sun-hero-photo figcaption {
    margin-top: 10px;
  }

  .sun-fusion-chain {
    grid-template-columns: 1fr;
  }

  .sun-reaction-card {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sun-reaction-card:last-child {
    border-bottom: 0;
  }

  .sun-reaction-stage {
    min-height: 72px;
  }

  .sun-reaction-card > p {
    min-height: 0;
  }

  .sun-fusion-summary {
    grid-template-columns: 1fr;
  }

  .sun-fusion-accounting {
    flex-wrap: wrap;
  }

  .sun-anatomy-map {
    width: min(100%, 330px);
  }

  .sun-layer-key {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sun-compare {
    grid-template-columns: 1fr;
  }

  .sun-compare article {
    padding: 18px;
  }

  .sun-life-stage {
    grid-template-columns: 64px minmax(0, 1fr);
    grid-template-areas:
      "age age"
      "visual copy";
    gap: 9px 14px;
    padding: 14px;
  }

  .sun-life-age {
    grid-area: age;
    padding: 0 0 2px;
    text-align: left;
  }

  .sun-life-visual {
    grid-area: visual;
    margin-top: 2px;
  }

  .sun-life-copy {
    grid-area: copy;
  }

  .sun-lifecycle::before {
    left: 56px;
    top: 55px;
    bottom: 55px;
  }

  .sun-energy {
    grid-template-columns: 1fr;
  }

  .sun-energy-examples {
    grid-row: auto;
    grid-column: 1;
  }

  .sun-energy-scale {
    grid-row: auto;
    grid-column: 1;
  }

  .sun-energy figcaption {
    grid-column: 1;
  }
}

@media (max-width: 440px) {
  .sun-compare article,
  .sun-energy {
    padding: 15px;
  }

  .sun-anatomy {
    padding: 17px;
  }

  .sun-layer-key {
    grid-template-columns: 1fr;
  }

  .sun-energy-lead {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
  }

  .sun-energy-square {
    width: 82px;
    height: 82px;
  }

  .sun-energy-examples article {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 9px;
    padding: 9px 10px;
  }

  .sun-energy-icon {
    width: 36px;
    height: 36px;
  }

  .sun-energy-examples article > div:last-child {
    grid-template-columns: 1fr;
  }

  .sun-energy-examples strong {
    white-space: normal;
  }

  .sun-nuclear-sketch {
    gap: 5px;
  }
}
