:root {
  --bg: #060d18;
  --bg-soft: #0a1423;
  --surface: rgba(13, 27, 46, 0.82);
  --surface-strong: #0e1d31;
  --surface-soft: rgba(18, 38, 64, 0.68);
  --surface-hover: rgba(24, 51, 84, 0.9);
  --text: #f3f7fc;
  --text-soft: #c5d3e4;
  --muted: #8298b2;
  --line: rgba(155, 185, 219, 0.16);
  --line-strong: rgba(155, 185, 219, 0.28);
  --blue: #4f8cff;
  --cyan: #40d7ff;
  --green: #42dfa0;
  --violet: #9c7dff;
  --orange: #ffad4d;
  --red: #ff6577;
  --yellow: #f7d35d;
  --success: #36d995;
  --danger: #ff6577;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 12px 40px rgba(0, 0, 0, 0.2);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --max-width: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
  scrollbar-color: rgba(79, 140, 255, 0.55) #091321;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 3%, rgba(46, 101, 207, 0.18), transparent 31rem),
    radial-gradient(circle at 88% 18%, rgba(123, 72, 230, 0.14), transparent 33rem),
    linear-gradient(180deg, #06101d 0%, #050b14 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  overflow-x: hidden;
}

button,
a,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(64, 215, 255, 0.8);
  outline-offset: 3px;
}

button:disabled {
  cursor: default;
}

::selection {
  color: #06101d;
  background: var(--cyan);
}

.hidden {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 14px;
  color: #06101d;
  background: var(--cyan);
  border-radius: 10px;
  font-weight: 800;
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

#ambientCanvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.48;
  pointer-events: none;
}

.app-shell {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 14px;
  padding: 12px 14px 12px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(6, 15, 27, 0.76);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(20px) saturate(135%);
}

.brand-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
  text-align: left;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(79, 140, 255, 0.42);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(79, 140, 255, 0.2), rgba(64, 215, 255, 0.06));
  box-shadow: inset 0 0 20px rgba(79, 140, 255, 0.1), 0 0 24px rgba(79, 140, 255, 0.09);
}

.brand-mark span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(64, 215, 255, 0.8);
}

.brand-mark span:nth-child(1) { transform: translate(-8px, 5px); }
.brand-mark span:nth-child(2) { transform: translate(0, -7px); }
.brand-mark span:nth-child(3) { transform: translate(9px, 7px); }

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(64, 215, 255, 0.8), transparent);
}

.brand-mark::before { transform: rotate(28deg); }
.brand-mark::after { transform: rotate(-35deg); }

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-copy strong {
  font-size: 0.96rem;
  letter-spacing: -0.02em;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-button,
#footerSourcesButton {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-button {
  padding: 9px 13px;
  color: var(--muted);
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-button:hover,
.nav-button.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
}

.screen {
  min-height: 70vh;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(410px, 0.92fr);
  align-items: center;
  gap: clamp(40px, 7vw, 90px);
  min-height: 720px;
  padding: 76px 22px 50px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  color: #82b7ff;
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(66, 223, 160, 0.1), 0 0 18px rgba(66, 223, 160, 0.75);
}

.hero-copy-block h1 {
  margin: 0;
  max-width: 700px;
  font-size: clamp(3.35rem, 7vw, 6.9rem);
  line-height: 0.92;
  letter-spacing: -0.065em;
}

.hero-copy-block h1 span {
  display: inline-block;
  color: transparent;
  background: linear-gradient(100deg, #7ab6ff 0%, #62e5ff 46%, #a58bff 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-copy {
  max-width: 650px;
  margin: 28px 0 0;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  line-height: 1.72;
}

.hero-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 34px;
}

.hero-assurance {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 17px;
  color: var(--text-soft);
  font-size: 0.84rem;
}

.hero-assurance > span {
  position: relative;
}

.hero-assurance > span:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -12px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green);
  transform: translateY(-50%);
}

.hero-assurance strong {
  color: var(--text);
}

.primary-button,
.secondary-button,
.icon-button {
  border: 0;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  padding: 13px 19px;
  border-radius: 13px;
  font-weight: 800;
}

.primary-button {
  color: #06101d;
  background: linear-gradient(135deg, #6da8ff, #5de2f3);
  box-shadow: 0 12px 30px rgba(67, 159, 255, 0.2);
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(67, 159, 255, 0.3);
}

.secondary-button {
  color: var(--text);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.035);
}

.secondary-button:hover {
  transform: translateY(-2px);
  border-color: rgba(102, 183, 255, 0.52);
  background: rgba(82, 143, 220, 0.1);
}

.full-button {
  width: 100%;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 31px;
  color: var(--muted);
  font-size: 0.84rem;
}

.trust-row span {
  position: relative;
}

.trust-row span:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -13px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
}

.trust-row strong {
  color: var(--text);
}

.hero-visual {
  position: relative;
  isolation: isolate;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    radial-gradient(circle at center, rgba(66, 138, 255, 0.15), transparent 48%),
    rgba(8, 19, 34, 0.6);
  background-size: 28px 28px, 28px 28px, auto, auto;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 13%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(69, 137, 255, 0.18), transparent 68%);
  filter: blur(14px);
}

.hero-core {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 138px;
  height: 138px;
  border: 1px solid rgba(92, 178, 255, 0.52);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 26%, rgba(111, 182, 255, 0.34), rgba(15, 47, 82, 0.9) 58%, rgba(5, 16, 29, 0.95));
  box-shadow: inset 0 0 35px rgba(69, 149, 255, 0.24), 0 0 60px rgba(69, 149, 255, 0.2);
  transform: translate(-50%, -50%);
}

.hero-core span {
  font-size: 2.45rem;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero-core small {
  margin-top: -25px;
  color: #9fc9fb;
  font-size: 0.65rem;
  line-height: 1.3;
  text-align: center;
}

.orbital {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(102, 169, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
}

.orbital-one {
  width: 350px;
  height: 350px;
}

.orbital-two {
  width: 455px;
  height: 455px;
  border-color: rgba(153, 123, 255, 0.16);
  transform: translate(-50%, -50%) rotate(19deg);
}

.orbit-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 148px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(10, 24, 42, 0.88);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.orbit-card strong {
  font-size: 0.86rem;
}

.orbit-card span {
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.35;
}

.orbit-ml { top: 12%; left: 16%; border-color: rgba(66, 223, 160, 0.36); }
.orbit-dl { top: 16%; right: 10%; border-color: rgba(156, 125, 255, 0.36); }
.orbit-gen { top: 45%; right: 3%; border-color: rgba(255, 173, 77, 0.36); }
.orbit-llm { bottom: 12%; right: 17%; border-color: rgba(64, 215, 255, 0.36); }
.orbit-rag { bottom: 9%; left: 15%; border-color: rgba(255, 101, 119, 0.36); }
.orbit-agent { top: 46%; left: 2%; border-color: rgba(79, 140, 255, 0.36); }

.section-block {
  margin: 0 0 44px;
  padding: clamp(26px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(13, 29, 50, 0.78), rgba(7, 17, 30, 0.78));
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.author-section {
  padding: clamp(25px, 4vw, 42px);
}

.author-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) minmax(210px, 0.3fr);
  align-items: start;
  gap: clamp(24px, 4vw, 52px);
}

.author-portrait {
  position: relative;
  isolation: isolate;
  width: 132px;
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
}

.author-portrait::after {
  content: "";
  position: absolute;
  inset: -5px;
  z-index: -1;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(109, 168, 255, 0.78), rgba(93, 226, 243, 0.5));
  filter: blur(7px);
  opacity: 0.48;
}

.author-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  border: 2px solid rgba(139, 220, 255, 0.68);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.3);
}

.author-copy h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  line-height: 1.08;
}

.author-role {
  margin: 8px 0 0;
  color: #8bdcff;
  font-weight: 800;
  line-height: 1.45;
}

.author-copy > p:not(.eyebrow):not(.author-role) {
  max-width: 720px;
  margin: 15px 0 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.author-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.author-highlights li {
  padding: 7px 10px;
  color: #b9d9ff;
  border: 1px solid rgba(109, 168, 255, 0.24);
  border-radius: 999px;
  background: rgba(109, 168, 255, 0.07);
  font-size: 0.72rem;
  font-weight: 750;
}

.author-copy .author-project-note {
  color: var(--muted);
  font-size: 0.84rem;
}

.author-actions {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 10px;
}

.author-profile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 13px 18px;
  color: #07111f;
  border-radius: 13px;
  background: #8bdcff;
  font-weight: 850;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.author-profile-link:hover,
.author-profile-link:focus-visible {
  color: #07111f;
  background: #b7ebff;
  box-shadow: 0 12px 28px rgba(91, 205, 255, 0.2);
  transform: translateY(-2px);
}

.author-secondary-link {
  color: #8bdcff;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
  text-underline-offset: 3px;
}

.author-secondary-link:hover,
.author-secondary-link:focus-visible {
  color: #b7ebff;
  text-decoration: underline;
}

.author-actions small {
  max-width: 250px;
  color: var(--muted);
  font-size: 0.71rem;
  line-height: 1.45;
}

.footer-author-link {
  color: #8bdcff;
  font-weight: 800;
  text-decoration: none;
  text-underline-offset: 3px;
}

.footer-author-link:hover,
.footer-author-link:focus-visible {
  color: #b7ebff;
  text-decoration: underline;
}

/* Página pública del autor */
.profile-main {
  padding: clamp(62px, 8vw, 104px) 0 0;
}

.profile-hero-page {
  display: grid;
  grid-template-columns: minmax(180px, 244px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(34px, 7vw, 88px);
  padding: clamp(30px, 6vw, 72px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 12% 30%, rgba(64, 215, 255, 0.13), transparent 24rem),
    linear-gradient(145deg, rgba(13, 29, 50, 0.9), rgba(7, 17, 30, 0.86));
  box-shadow: var(--shadow);
}

.profile-photo-frame {
  position: relative;
  isolation: isolate;
  justify-self: center;
  width: 100%;
  max-width: 244px;
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
}

.profile-photo-frame::before,
.profile-photo-frame::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.profile-photo-frame::before {
  inset: -9px;
  z-index: -1;
  border: 1px solid rgba(64, 215, 255, 0.46);
  box-shadow: 0 0 40px rgba(64, 215, 255, 0.16);
}

.profile-photo-frame::after {
  inset: -24px;
  z-index: -2;
  border: 1px solid rgba(156, 125, 255, 0.22);
}

.profile-photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  border: 2px solid rgba(139, 220, 255, 0.68);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

.profile-hero-copy h1 {
  margin: 0;
  font-size: clamp(3rem, 7vw, 6.2rem);
  line-height: 0.95;
  letter-spacing: -0.065em;
}

.profile-role {
  margin: 18px 0 0;
  color: #8bdcff;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 800;
  line-height: 1.45;
}

.profile-lead {
  max-width: 780px;
  margin: 22px 0 0;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  line-height: 1.72;
}

.profile-badges,
.profile-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-badges {
  margin-top: 24px;
}

.profile-badges span {
  padding: 7px 11px;
  color: #b9d9ff;
  border: 1px solid rgba(109, 168, 255, 0.27);
  border-radius: 999px;
  background: rgba(109, 168, 255, 0.08);
  font-size: 0.74rem;
  font-weight: 780;
}

.profile-actions-row {
  margin-top: 28px;
}

.profile-primary-link,
.profile-secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 13px 18px;
  border-radius: 13px;
  font-weight: 820;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.profile-primary-link {
  color: #06101d;
  background: linear-gradient(135deg, #6da8ff, #5de2f3);
  box-shadow: 0 12px 30px rgba(67, 159, 255, 0.2);
}

.profile-secondary-link {
  color: var(--text);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.035);
}

.profile-primary-link:hover,
.profile-primary-link:focus-visible,
.profile-secondary-link:hover,
.profile-secondary-link:focus-visible {
  transform: translateY(-2px);
}

.profile-primary-link:hover,
.profile-primary-link:focus-visible {
  color: #06101d;
  box-shadow: 0 16px 36px rgba(67, 159, 255, 0.3);
}

.profile-secondary-link:hover,
.profile-secondary-link:focus-visible {
  color: var(--text);
  border-color: rgba(102, 183, 255, 0.52);
  background: rgba(82, 143, 220, 0.1);
}

.profile-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 24px;
  margin-top: 24px;
}

.profile-panel,
.profile-section,
.profile-cta {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(13, 29, 50, 0.78), rgba(7, 17, 30, 0.78));
  box-shadow: var(--shadow-soft);
}

.profile-panel,
.profile-section {
  padding: clamp(25px, 4vw, 42px);
}

.profile-panel h2,
.profile-section h2,
.profile-cta h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3.2vw, 2.7rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.profile-story p {
  max-width: 78ch;
  margin: 18px 0 0;
  color: var(--text-soft);
  line-height: 1.76;
}

.profile-facts {
  display: grid;
  gap: 18px;
  margin: 24px 0 0;
}

.profile-facts div {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.profile-facts div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.profile-facts dt {
  color: var(--muted);
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-facts dd {
  margin: 5px 0 0;
  color: var(--text);
  font-weight: 760;
  line-height: 1.45;
}

.profile-section {
  margin-top: 24px;
}

.profile-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.profile-section-heading p {
  max-width: 54ch;
  margin: 0;
  color: var(--text-soft);
  line-height: 1.65;
}

.profile-card-grid,
.credential-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-focus-card,
.credential-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(11, 25, 43, 0.68);
}

.profile-focus-card span,
.credential-card span {
  display: block;
  margin-bottom: 12px;
  color: #72dfff;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-focus-card h3,
.credential-card h3 {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.35;
}

.profile-focus-card p,
.credential-card p {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 0.87rem;
  line-height: 1.64;
}

.profile-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 24px;
  padding: clamp(28px, 5vw, 52px);
  background:
    radial-gradient(circle at 85% 50%, rgba(64, 215, 255, 0.12), transparent 22rem),
    linear-gradient(145deg, rgba(13, 29, 50, 0.88), rgba(7, 17, 30, 0.82));
}

.profile-cta p {
  max-width: 64ch;
  margin: 12px 0 0;
  color: var(--text-soft);
  line-height: 1.65;
}

.section-heading {
  margin-bottom: 30px;
}

.section-heading h2,
.quiz-config-copy h2,
.sources-modal-card h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.45rem);
  line-height: 1.03;
  letter-spacing: -0.045em;
}

.split-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.68fr);
  gap: 40px;
  align-items: end;
}

.split-heading > p,
.quiz-config-copy > p {
  max-width: 68ch;
  margin: 0;
  color: var(--text-soft);
  line-height: 1.72;
}

.relationship-board {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) 100px minmax(190px, 1fr) 100px minmax(210px, 1fr);
  gap: 12px;
  align-items: center;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.016) 1px, transparent 1px),
    rgba(4, 13, 24, 0.6);
  background-size: 24px 24px;
}

.relation-column {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.relation-label {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}

.relation-node {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 62px;
  padding: 13px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(15, 33, 55, 0.78);
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.relation-node:hover {
  transform: translateY(-2px);
  background: var(--surface-hover);
}

.relation-node span {
  font-size: 1.04rem;
  font-weight: 900;
}

.relation-node small {
  color: var(--muted);
  font-size: 0.72rem;
  text-align: right;
}

.node-ai { border-color: rgba(79, 140, 255, 0.36); }
.node-ml { border-color: rgba(66, 223, 160, 0.34); }
.node-dl { border-color: rgba(156, 125, 255, 0.34); }
.node-gen { border-color: rgba(255, 173, 77, 0.38); }
.node-llm { border-color: rgba(64, 215, 255, 0.36); }
.node-rag { border-color: rgba(255, 101, 119, 0.36); }
.node-agent { border-color: rgba(79, 140, 255, 0.42); }

.relation-arrow,
.relation-plus {
  color: #7d99b8;
  font-size: 1rem;
  text-align: center;
}

.relation-peer {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 1px 8px;
  color: var(--muted);
}

.relation-peer span {
  color: #66d8ff;
  font-size: 1rem;
  line-height: 1;
}

.relation-peer small {
  font-size: 0.63rem;
  line-height: 1.35;
  letter-spacing: 0.04em;
}

.relation-bridge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.65rem;
  text-align: center;
}

.relation-bridge i {
  position: relative;
  display: block;
  width: 78px;
  height: 1px;
  background: linear-gradient(90deg, rgba(102, 169, 255, 0.12), rgba(102, 169, 255, 0.8));
}

.relation-bridge i::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -1px;
  width: 7px;
  height: 7px;
  border-top: 1px solid rgba(102, 169, 255, 0.8);
  border-right: 1px solid rgba(102, 169, 255, 0.8);
  transform: translateY(-50%) rotate(45deg);
}

.relation-note {
  padding: 12px;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  font-size: 0.78rem;
  line-height: 1.55;
}

.accuracy-callout {
  display: flex;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(247, 211, 93, 0.23);
  border-radius: 16px;
  background: rgba(247, 211, 93, 0.055);
}

.callout-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #08101b;
  border-radius: 50%;
  background: var(--yellow);
  font-weight: 900;
}

.accuracy-callout strong {
  color: #ffe98d;
}

.accuracy-callout p {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 0.87rem;
}

.concept-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.filter-chip {
  padding: 9px 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 750;
}

.filter-chip:hover,
.filter-chip.active {
  color: var(--text);
  border-color: rgba(79, 140, 255, 0.42);
  background: rgba(79, 140, 255, 0.11);
}

.concept-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.concept-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 250px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(18, 38, 64, 0.74), rgba(8, 19, 34, 0.72));
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.concept-card::before {
  content: "";
  position: absolute;
  top: -70px;
  right: -70px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--card-glow, rgba(79, 140, 255, 0.14));
  filter: blur(2px);
  opacity: 0.75;
}

.concept-card:hover {
  transform: translateY(-5px);
  border-color: var(--card-line, rgba(79, 140, 255, 0.48));
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.2);
}

.concept-card-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.concept-icon {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 8px;
  color: var(--card-color, #8bb8ff);
  border: 1px solid var(--card-line, rgba(79, 140, 255, 0.4));
  border-radius: 12px;
  background: var(--card-bg, rgba(79, 140, 255, 0.08));
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.concept-card-arrow {
  color: var(--muted);
  font-size: 1.1rem;
}

.concept-card h3 {
  position: relative;
  z-index: 1;
  margin: 23px 0 8px;
  font-size: 1.15rem;
  letter-spacing: -0.025em;
}

.concept-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.65;
}

.concept-card-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 20px;
  color: var(--muted);
  font-size: 0.68rem;
}

.concept-card-footer strong {
  color: var(--card-color, #8bb8ff);
}

.quiz-config-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(460px, 1.2fr);
  gap: clamp(34px, 6vw, 80px);
  align-items: start;
}

.quiz-config-copy {
  position: sticky;
  top: 120px;
}

.feature-list {
  display: grid;
  gap: 11px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-soft);
  font-size: 0.87rem;
}

.feature-list li {
  display: flex;
  gap: 10px;
  align-items: center;
}

.feature-list span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #07111e;
  border-radius: 50%;
  background: rgba(66, 223, 160, 0.95);
  font-size: 0.7rem;
  font-weight: 900;
}

.quiz-config-card {
  display: grid;
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: rgba(7, 18, 32, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.quiz-config-card fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.quiz-config-card legend {
  margin-bottom: 10px;
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 800;
}

.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
}

.segmented button {
  min-height: 40px;
  padding: 7px 10px;
  color: var(--muted);
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
}

.segmented button:hover,
.segmented button.active {
  color: var(--text);
  background: rgba(79, 140, 255, 0.15);
  box-shadow: inset 0 0 0 1px rgba(79, 140, 255, 0.22);
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.choice-grid button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-height: 72px;
  padding: 12px 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  text-align: left;
}

.choice-grid button:hover,
.choice-grid button.active {
  color: var(--text);
  border-color: rgba(79, 140, 255, 0.42);
  background: rgba(79, 140, 255, 0.1);
}

.choice-grid strong {
  font-size: 0.82rem;
}

.choice-grid span {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.4;
}

.available-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}

.available-row strong {
  color: var(--text);
  font-size: 1rem;
}

.simple-quiz-section {
  display: grid;
  place-items: center;
  min-height: 540px;
  padding: clamp(48px, 9vw, 100px) clamp(22px, 6vw, 70px);
  background:
    radial-gradient(circle at 50% 18%, rgba(79, 140, 255, 0.16), transparent 27rem),
    linear-gradient(145deg, rgba(13, 28, 48, 0.9), rgba(6, 16, 29, 0.92));
}

.simple-quiz-card {
  width: min(100%, 780px);
  text-align: center;
}

.simple-quiz-card h2 {
  margin: 12px 0 22px;
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.simple-quiz-card h2 span {
  color: transparent;
  background: linear-gradient(90deg, #8ab7ff, #6ee5ef);
  -webkit-background-clip: text;
  background-clip: text;
}

.simple-quiz-card > p:not(.eyebrow) {
  max-width: 66ch;
  margin: 0 auto;
  color: var(--text-soft);
  font-size: clamp(0.98rem, 2vw, 1.12rem);
  line-height: 1.75;
}

.simple-start-button {
  width: min(100%, 360px);
  min-height: 58px;
  margin-top: 30px;
  font-size: 1.02rem;
}

.simple-quiz-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.78rem;
}

.simple-quiz-meta span {
  position: relative;
}

.simple-quiz-meta span:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -16px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted);
  content: '';
}

.simple-quiz-meta strong {
  color: var(--text-soft);
}

#quizScreen {
  padding: 56px 0 80px;
}

.quiz-topbar {
  display: grid;
  grid-template-columns: 48px 1fr 92px;
  gap: 18px;
  align-items: center;
  max-width: 900px;
  margin: 0 auto 18px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 1.1rem;
}

.icon-button:hover {
  border-color: rgba(79, 140, 255, 0.45);
  background: rgba(79, 140, 255, 0.1);
}

.progress-wrap {
  min-width: 0;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.progress-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.065);
  overflow: hidden;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 0 18px rgba(64, 215, 255, 0.4);
  transition: width 0.36s ease;
}

.score-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.score-pill small {
  color: var(--muted);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.score-pill strong {
  font-size: 1.2rem;
}

.question-card {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 44px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(14, 31, 53, 0.94), rgba(7, 18, 31, 0.94));
  box-shadow: var(--shadow);
}

.question-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.category-badge,
.difficulty-badge,
.mistake-badge {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 850;
}

.category-badge {
  max-width: 100%;
  color: #afd2ff;
  border: 1px solid rgba(79, 140, 255, 0.3);
  background: rgba(79, 140, 255, 0.1);
  line-height: 1.25;
  white-space: normal;
}

.difficulty-badge {
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.question-title {
  max-width: 790px;
  margin: 22px 0 28px;
  font-size: clamp(1.55rem, 3.3vw, 2.45rem);
  line-height: 1.22;
  letter-spacing: -0.035em;
}

.options {
  display: grid;
  gap: 10px;
}

.option {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 66px;
  padding: 11px 14px;
  color: var(--text-soft);
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.5;
  text-align: left;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, opacity 0.16s ease;
}

.option:hover:not(:disabled) {
  transform: translateX(4px);
  color: var(--text);
  border-color: rgba(79, 140, 255, 0.42);
  background: rgba(79, 140, 255, 0.08);
}

.option-key {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.78rem;
  font-weight: 900;
}

.option-status {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  opacity: 0;
}

.option.correct {
  color: #dfffee;
  border-color: rgba(54, 217, 149, 0.6);
  background: rgba(54, 217, 149, 0.1);
}

.option.correct .option-key,
.option.correct .option-status {
  color: #06170f;
  border-color: transparent;
  background: var(--success);
}

.option.wrong {
  color: #ffe7ea;
  border-color: rgba(255, 101, 119, 0.6);
  background: rgba(255, 101, 119, 0.1);
}

.option.wrong .option-key,
.option.wrong .option-status {
  color: #1e070a;
  border-color: transparent;
  background: var(--danger);
}

.option.correct .option-status,
.option.wrong .option-status {
  opacity: 1;
}

.option.dimmed {
  opacity: 0.46;
}

.feedback-panel {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(5, 14, 25, 0.6);
}

.feedback-panel.correct-feedback {
  border-color: rgba(54, 217, 149, 0.28);
  background: rgba(54, 217, 149, 0.045);
}

.feedback-panel.wrong-feedback {
  border-color: rgba(255, 101, 119, 0.28);
  background: rgba(255, 101, 119, 0.045);
}

.feedback-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
  font-size: 1rem;
  font-weight: 900;
}

.feedback-heading span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #06110d;
  border-radius: 50%;
  background: var(--success);
}

.wrong-feedback .feedback-heading span {
  color: #1e070a;
  background: var(--danger);
}

.feedback-panel p {
  max-width: 70ch;
  margin: 7px 0 0;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.6;
}

.feedback-detail {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.feedback-detail strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 0.84rem;
}

.feedback-more {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.feedback-more summary {
  width: fit-content;
  color: #80cfff;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
}

.feedback-more[open] summary {
  margin-bottom: 10px;
}

.feedback-takeaway {
  display: flex;
  gap: 9px;
  margin-top: 12px;
  padding: 11px 12px;
  color: #cae2ff;
  border-radius: 11px;
  background: rgba(79, 140, 255, 0.08);
  font-size: 0.78rem;
}

.source-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  color: #80cfff;
  font-size: 0.74rem;
  font-weight: 750;
  text-decoration: none;
}

.source-link:hover {
  text-decoration: underline;
}

.quiz-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
}

.keyboard-help {
  color: var(--muted);
  font-size: 0.68rem;
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  color: var(--text-soft);
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  font-family: inherit;
  font-size: 0.62rem;
}

#resultScreen {
  padding: 58px 0 80px;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(420px, 1.28fr);
  gap: 18px;
}

.result-summary-card,
.result-detail-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(14, 31, 53, 0.9), rgba(7, 18, 31, 0.9));
  box-shadow: var(--shadow-soft);
}

.result-summary-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 34px;
  text-align: center;
}

.score-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 180px;
  height: 180px;
  margin: 8px auto 24px;
  border-radius: 50%;
  background: conic-gradient(var(--cyan) var(--score-angle, 0deg), rgba(255, 255, 255, 0.07) 0);
  box-shadow: 0 0 45px rgba(64, 215, 255, 0.12);
}

.score-ring::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: #0b192b;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.28);
}

.score-ring div {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

.score-ring strong {
  font-size: 2.8rem;
  line-height: 1;
  letter-spacing: -0.06em;
}

.score-ring span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.67rem;
  text-transform: uppercase;
}

.result-summary-card h2 {
  margin: 0;
  font-size: 1.75rem;
  letter-spacing: -0.035em;
}

.result-summary-card > p:not(.eyebrow) {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.65;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  margin-top: auto;
  padding-top: 26px;
  gap: 8px;
}

.result-stats div {
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.result-stats small,
.result-stats strong {
  display: block;
}

.result-stats small {
  color: var(--muted);
  font-size: 0.62rem;
}

.result-stats strong {
  margin-top: 3px;
  font-size: 1.05rem;
}

.result-detail-card {
  padding: 28px;
}

.result-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.result-detail-header h3 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.025em;
}

.mistake-badge {
  color: #ffd2d8;
  border: 1px solid rgba(255, 101, 119, 0.25);
  background: rgba(255, 101, 119, 0.08);
}

.breakdown {
  display: grid;
  gap: 12px;
}

.breakdown-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) 1fr 44px;
  align-items: center;
  gap: 12px;
  font-size: 0.76rem;
}

.breakdown-row > span {
  color: var(--text-soft);
  line-height: 1.35;
}

.breakdown-row > strong {
  text-align: right;
}

.breakdown-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.breakdown-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.weak-topics {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.weak-topics h4 {
  margin: 0 0 10px;
  font-size: 0.8rem;
}

.weak-topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.weak-topic-list span {
  padding: 7px 10px;
  color: #ffd0d5;
  border: 1px solid rgba(255, 101, 119, 0.22);
  border-radius: 999px;
  background: rgba(255, 101, 119, 0.06);
  font-size: 0.68rem;
}

.weak-topics p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.result-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 42px 0 26px;
  padding: 20px 4px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.74rem;
}

.site-footer > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.site-footer strong {
  color: var(--text-soft);
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

#footerSourcesButton {
  padding: 0;
  color: #80cfff;
}

#footerSourcesButton:hover {
  text-decoration: underline;
}

.modal {
  width: min(calc(100% - 28px), 920px);
  max-height: min(88vh, 900px);
  padding: 0;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: transparent;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.modal::backdrop {
  background: rgba(1, 6, 12, 0.78);
  backdrop-filter: blur(10px);
}

.modal-card {
  position: relative;
  max-height: inherit;
  padding: clamp(24px, 5vw, 42px);
  background: linear-gradient(145deg, #10233b, #081522 72%);
  overflow: auto;
}

.modal-close {
  position: sticky;
  top: 0;
  z-index: 5;
  float: right;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin: -10px -8px 0 12px;
  color: var(--text-soft);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(8, 20, 35, 0.88);
  cursor: pointer;
  font-size: 1.4rem;
}

.concept-modal-hero {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}

.concept-modal-icon {
  display: grid;
  place-items: center;
  min-width: 62px;
  height: 62px;
  color: var(--modal-color, #8bb8ff);
  border: 1px solid var(--modal-line, rgba(79, 140, 255, 0.45));
  border-radius: 17px;
  background: var(--modal-bg, rgba(79, 140, 255, 0.08));
  font-size: 0.9rem;
  font-weight: 900;
}

.concept-modal-hero h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.concept-modal-hero p {
  margin: 9px 0 0;
  color: var(--text-soft);
}

.concept-definition {
  margin: 0 0 22px;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.75;
}

.concept-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.concept-detail-box {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.025);
}

.concept-detail-box h3 {
  margin: 0 0 8px;
  color: var(--modal-color, #8bb8ff);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.concept-detail-box p,
.concept-detail-box ul {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.62;
}

.concept-detail-box ul {
  padding-left: 18px;
}

.concept-warning {
  grid-column: 1 / -1;
  border-color: rgba(247, 211, 93, 0.22);
  background: rgba(247, 211, 93, 0.045);
}

.concept-source {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.concept-source span {
  color: var(--muted);
  font-size: 0.72rem;
}

.concept-source a {
  color: #80cfff;
  font-size: 0.76rem;
  font-weight: 750;
  text-decoration: none;
}

.method-note {
  margin: 22px 0 18px;
  padding: 18px;
  border: 1px solid rgba(247, 211, 93, 0.22);
  border-radius: 15px;
  background: rgba(247, 211, 93, 0.045);
}

.method-note strong {
  color: #ffe58a;
}

.method-note p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.65;
}

.source-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.7rem;
}

.sources-list {
  display: grid;
  gap: 9px;
}

.source-item {
  display: grid;
  grid-template-columns: minmax(140px, 0.34fr) minmax(0, 0.66fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.source-item:hover {
  border-color: rgba(79, 140, 255, 0.38);
  background: rgba(79, 140, 255, 0.07);
}

.source-item strong {
  font-size: 0.8rem;
}

.source-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.source-item span {
  color: #80cfff;
  font-size: 0.7rem;
  font-weight: 800;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  max-width: min(360px, calc(100% - 40px));
  padding: 12px 15px;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(10, 25, 43, 0.94);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-size: 0.78rem;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1050px) {
  .hero-section {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 90px;
  }

  .hero-copy-block {
    max-width: 790px;
  }

  .hero-visual {
    width: min(100%, 700px);
    min-height: 560px;
    margin: 0 auto;
  }

  .relationship-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .relation-bridge {
    display: none;
  }

  .quiz-config-section {
    grid-template-columns: 1fr;
  }

  .quiz-config-copy {
    position: static;
  }

  .result-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .app-shell {
    width: min(calc(100% - 20px), var(--max-width));
  }

  .site-header {
    top: 8px;
    margin-top: 8px;
  }

  .brand-copy small {
    display: none;
  }

  .nav-button {
    padding: 9px 10px;
    font-size: 0.78rem;
  }

  .split-heading {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .author-card {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .author-portrait {
    width: 108px;
  }

  .author-profile-link {
    width: 100%;
  }

  .relationship-board {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .relation-column:not(:last-child) {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
  }

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

  .source-item {
    grid-template-columns: 1fr auto;
  }

  .source-item p {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 10px;
  }

  .brand-copy strong {
    display: none;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .header-nav {
    flex: 1;
    justify-content: flex-end;
  }

  .hero-section {
    padding: 66px 6px 34px;
  }

  .hero-copy-block h1 {
    font-size: clamp(3.1rem, 17vw, 5rem);
  }

  .hero-copy {
    font-size: 0.96rem;
  }

  .hero-actions,
  .result-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-actions button,
  .result-actions button {
    width: 100%;
  }

  .trust-row {
    gap: 8px 14px;
  }

  .hero-assurance {
    gap: 7px 16px;
  }

  .hero-assurance > span:not(:last-child)::after {
    display: none;
  }

  .trust-row span:not(:last-child)::after {
    display: none;
  }

  .hero-visual {
    min-height: 480px;
    border-radius: 24px;
  }

  .orbital-one { width: 300px; height: 300px; }
  .orbital-two { width: 390px; height: 390px; }
  .hero-core { width: 118px; height: 118px; }
  .hero-core span { font-size: 2.1rem; }
  .orbit-card { min-width: 100px; padding: 9px 10px; }
  .orbit-card span { display: none; }
  .orbit-ml { top: 12%; left: 8%; }
  .orbit-dl { top: 15%; right: 5%; }
  .orbit-gen { top: 47%; right: 1%; }
  .orbit-llm { bottom: 13%; right: 10%; }
  .orbit-rag { bottom: 11%; left: 8%; }
  .orbit-agent { top: 46%; left: 1%; }

  .section-block {
    padding: 24px 18px;
    border-radius: 22px;
  }

  .simple-quiz-section {
    min-height: 470px;
    padding: 52px 20px;
  }

  .simple-quiz-card h2 {
    font-size: clamp(2.65rem, 14vw, 4rem);
  }

  .simple-quiz-meta {
    align-items: center;
    flex-direction: column;
    gap: 5px;
  }

  .simple-quiz-meta span:not(:last-child)::after {
    display: none;
  }

  .relationship-board {
    padding: 18px;
  }

  .concept-grid,
  .choice-grid,
  .concept-detail-grid {
    grid-template-columns: 1fr;
  }

  .concept-card {
    min-height: 220px;
  }

  .quiz-config-card {
    padding: 18px;
  }

  .segmented {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, 1fr);
  }

  .quiz-topbar {
    grid-template-columns: 42px 1fr 68px;
    gap: 9px;
  }

  .icon-button {
    width: 42px;
    height: 42px;
  }

  .score-pill {
    min-height: 46px;
  }

  .question-card {
    padding: 22px 16px;
    border-radius: 20px;
  }

  .option {
    grid-template-columns: 36px 1fr 22px;
    gap: 10px;
    min-height: 62px;
    padding: 10px;
    font-size: 1rem;
  }

  .option-key {
    width: 34px;
    height: 34px;
  }

  .quiz-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .keyboard-help {
    display: none;
  }

  .result-summary-card,
  .result-detail-card {
    padding: 22px 17px;
  }

  .breakdown-row {
    grid-template-columns: minmax(112px, 0.9fr) 1fr 36px;
    gap: 8px;
    font-size: 0.68rem;
  }

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

  .footer-meta {
    width: 100%;
    justify-content: space-between;
  }

  .modal {
    width: calc(100% - 14px);
    max-height: 94vh;
    border-radius: 18px;
  }

  .modal-card {
    padding: 22px 16px;
  }

  .concept-modal-hero {
    flex-direction: column;
  }

  .concept-warning {
    grid-column: auto;
  }

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

@media (max-width: 820px) {
  .profile-main {
    padding-top: 54px;
  }

  .profile-hero-page,
  .profile-content-grid {
    grid-template-columns: 1fr;
  }

  .profile-photo-frame {
    width: 156px;
  }

  .profile-section-heading,
  .profile-cta {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .profile-hero-page {
    padding: 29px 20px;
  }

  .profile-photo-frame {
    width: 116px;
  }

  .profile-hero-copy h1 {
    font-size: clamp(2.9rem, 18vw, 4.6rem);
  }

  .profile-card-grid,
  .credential-grid {
    grid-template-columns: 1fr;
  }

  .profile-actions-row,
  .profile-primary-link,
  .profile-secondary-link,
  .profile-cta .profile-primary-link {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  #ambientCanvas {
    display: none;
  }
}
