:root {
  color-scheme: dark;
  /* DEFAULT: EYE-FRIENDLY DEEP MIDNIGHT BLUE + CRISP WHITE TYPOGRAPHY */
  --side-bg: #060E1B;
  --bg: #091426;
  --surface: #10203A;
  --surface-2: #162B4D;
  --ink: #F8FAFC;
  --body-ink: #D8E2F0;
  --muted: #9FB2CC;
  --border: rgba(148, 179, 219, 0.18);
  --accent: #38BDF8;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --pos: #34D399;
}
body.light {
  color-scheme: light;
  --side-bg: #0B192C;
  --bg: #F4F7FB;
  --surface: #FFFFFF;
  --surface-2: #EEF3FA;
  --ink: #0F172A;
  --body-ink: #334155;
  --muted: #64748B;
  --border: #DCE4F0;
  --accent: #1D4ED8;
  --accent-soft: rgba(29, 78, 216, 0.08);
  --pos: #059669;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; min-height: 100vh;
  background: var(--bg); color: var(--body-ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 15px; line-height: 1.75; overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

.iy-shell { display: flex; min-height: 100vh; }

/* LEFT SIDEBAR */
.iy-side {
  width: 296px; flex: 0 0 296px;
  background: var(--side-bg); color: #E2E8F0;
  border-right: 1px solid rgba(56, 189, 248, 0.18);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  z-index: 60;
}
.iy-side-head {
  padding: 18px 16px 15px; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.iy-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: #F8FAFC; }
.iy-mono {
  width: 42px; height: 42px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.22);
}
.iy-brand strong { display: block; font-family: "Plus Jakarta Sans", sans-serif; font-size: 15px; letter-spacing: 0.04em; color: #FFFFFF; }
.iy-brand small { display: block; font-size: 11.5px; color: #94A3B8; }
.iy-close-mob {
  display: none; background: transparent; border: 1px solid rgba(255,255,255,0.22);
  color: #fff; width: 34px; height: 34px; border-radius: 7px; font-size: 18px; cursor: pointer;
}

.iy-side-search { padding: 12px 14px 8px; }
.iy-side-search input {
  width: 100%; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(148, 179, 219, 0.22);
  color: #F8FAFC; border-radius: 8px; padding: 9px 12px; font-family: inherit; font-size: 13px; outline: none;
}
.iy-side-search input::placeholder { color: #94A3B8; }
.iy-side-search input:focus { border-color: #38BDF8; }

.iy-tree {
  flex: 1; overflow-y: auto; padding: 6px 10px 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 179, 219, 0.25) transparent;
}
.iy-tree::-webkit-scrollbar { width: 5px; }
.iy-tree::-webkit-scrollbar-track { background: transparent; }
.iy-tree::-webkit-scrollbar-thumb {
  background: rgba(148, 179, 219, 0.22);
  border-radius: 99px;
}
.iy-tree:hover::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.48);
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: rgba(148, 179, 219, 0.22);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.45);
}
.iy-group { margin-bottom: 9px; }
.iy-group-btn {
  width: 100%; border: 1px solid rgba(148, 179, 219, 0.14); background: rgba(255, 255, 255, 0.035); color: #F1F5F9;
  font-family: "Plus Jakarta Sans", sans-serif; font-size: 12.8px; font-weight: 700;
  padding: 10px 12px; border-radius: 9px; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  text-align: left; transition: background 0.14s, border-color 0.14s;
}
.iy-group-btn:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.35);
}
.iy-group.open > .iy-group-btn {
  background: rgba(56, 189, 248, 0.11);
  border-color: rgba(56, 189, 248, 0.48);
  color: #FFFFFF;
}
.iy-group-btn .iy-g-cnt { font-size: 10.5px; color: #38BDF8; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.iy-sublist { display: none; flex-direction: column; gap: 3px; padding: 6px 0 4px 8px; }
.iy-group.open .iy-sublist { display: flex; }
.iy-sub-btn {
  width: 100%; border: none; background: transparent; color: #CBD5E1;
  font-family: inherit; font-size: 13px; font-weight: 500;
  padding: 8px 10px; border-radius: 7px; cursor: pointer; text-align: left;
  transition: background 0.12s, color 0.12s;
}
.iy-sub-btn:hover { background: rgba(56, 189, 248, 0.12); color: #FFFFFF; }
.iy-sub-btn.act { background: linear-gradient(135deg, #2563EB, #0284C7); color: #FFFFFF; font-weight: 700; }

.iy-side-foot {
  padding: 12px 14px; border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.iy-theme-btn {
  width: 100%; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(56, 189, 248, 0.35);
  color: #F8FAFC; padding: 9px 12px; border-radius: 7px; font-family: inherit;
  font-size: 13px; font-weight: 600; cursor: pointer;
}

/* CONTENT WORKSPACE */
.iy-content-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.iy-topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(9, 20, 38, 0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 13px 26px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
body.light .iy-topbar { background: rgba(255, 255, 255, 0.95); }
.iy-menu-btn {
  display: none; background: #2563EB; color: #fff; border: none;
  padding: 8px 13px; border-radius: 7px; font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.iy-crumb { font-size: 13.5px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iy-top-cta {
  font-size: 12.5px; font-weight: 700; text-decoration: none;
  background: linear-gradient(135deg, #2563EB, #0284C7); color: #FFFFFF;
  padding: 8px 14px; border-radius: 7px; white-space: nowrap;
}

/* ANIMATED NEURAL TECH BANNER */
.iy-tech-banner {
  position: relative; overflow: hidden;
  background: radial-gradient(circle at 18% 20%, rgba(56, 189, 248, 0.22), transparent 55%),
              radial-gradient(circle at 82% 80%, rgba(52, 211, 153, 0.16), transparent 50%),
              linear-gradient(135deg, #050D1A 0%, #0A1B36 52%, #071428 100%);
  border-bottom: 1px solid rgba(56, 189, 248, 0.24);
  min-height: 78px; display: flex; align-items: center;
}
.iy-neural-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
}
.iy-banner-inner {
  position: relative; z-index: 2; max-width: 960px; width: 100%;
  margin: 0 auto; padding: 14px 28px; pointer-events: none;
  display: flex; align-items: center;
}
.iy-banner-badge {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em; color: #E0F2FE;
  background: rgba(8, 19, 38, 0.65); border: 1px solid rgba(56, 189, 248, 0.38);
  padding: 7px 15px; border-radius: 99px; backdrop-filter: blur(6px);
}
.iy-pulse-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #34D399;
  box-shadow: 0 0 8px #34D399; animation: iyPulse 2s infinite;
}
@keyframes iyPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.35); }
}
.iy-banner-title {
  font-family: "Plus Jakarta Sans", sans-serif; font-weight: 800;
  font-size: clamp(18px, 2.3vw, 24px); color: #FFFFFF; line-height: 1.25;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55); margin-bottom: 10px;
}
.iy-banner-pills {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.iy-banner-pills span {
  font-size: 11.5px; font-weight: 600; color: #E2E8F0;
  background: rgba(15, 32, 58, 0.72); border: 1px solid rgba(148, 179, 219, 0.25);
  padding: 3px 10px; border-radius: 6px; backdrop-filter: blur(4px);
}

.iy-main { max-width: 960px; width: 100%; margin: 0 auto; padding: 30px 28px 70px; }

/* MODULE LESSON CARDS */
.iy-kicker { font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; color: var(--accent); text-transform: uppercase; margin-bottom: 8px; }
.iy-h1 {
  margin: 0 0 10px; font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(24px, 3vw, 33px); font-weight: 800; color: var(--ink); line-height: 1.25;
}
.iy-lead { margin: 0 0 22px; font-size: 16px; color: var(--body-ink); line-height: 1.7; }

.iy-simple-box {
  background: var(--accent-soft); border: 1px solid rgba(56, 189, 248, 0.32);
  border-radius: 12px;
  padding: 16px 20px; margin-bottom: 20px;
}
.iy-simple-box strong { display: block; font-size: 13px; color: var(--accent); margin-bottom: 5px; letter-spacing: 0.03em; text-transform: uppercase; }
.iy-simple-box p { margin: 0; font-size: 15px; color: var(--ink); line-height: 1.7; }

.iy-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.iy-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 22px 24px; margin-bottom: 18px;
}
.iy-info-grid .iy-card { margin-bottom: 0; }
.iy-card h3 {
  margin: 0 0 12px; font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 16px; font-weight: 700; color: var(--ink);
  border-bottom: 1px solid var(--border); padding-bottom: 9px;
}
.iy-card p { margin: 0 0 10px; font-size: 14.8px; color: var(--body-ink); }
.iy-card p:last-child { margin-bottom: 0; }
.iy-list { margin: 0; padding-left: 19px; display: flex; flex-direction: column; gap: 8px; }
.iy-list li { font-size: 14.5px; color: var(--body-ink); line-height: 1.65; }
.iy-list li strong { color: var(--ink); }

.iy-ex-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
/* EDITORIAL NON-BOXY HOME PAGE (v11) */
.iy-ed-hero {
  display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 36px;
  padding: 14px 0 34px; border-bottom: 1px solid rgba(148, 179, 219, 0.14); margin-bottom: 30px;
}
.iy-ed-title {
  margin: 0 0 14px; font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; line-height: 1.16;
  letter-spacing: -0.02em; color: #FFFFFF;
}
.iy-ed-title span {
  background: linear-gradient(120deg, #38BDF8, #34D399);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.iy-ed-sub { margin: 0 0 22px; font-size: 15.5px; color: #A9BDD6; line-height: 1.72; max-width: 540px; }
.iy-ed-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.iy-ed-btn-pri {
  background: linear-gradient(135deg, #2563EB, #0284C7); color: #FFFFFF; border: none;
  padding: 11px 20px; border-radius: 9px; font-family: inherit; font-size: 13.5px; font-weight: 700;
  cursor: pointer; transition: transform 0.14s, box-shadow 0.14s;
}
.iy-ed-btn-pri:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(2, 132, 199, 0.35); }
.iy-ed-btn-sec {
  background: transparent; color: #E2E8F0; border: 1px solid rgba(148, 179, 219, 0.3);
  padding: 11px 20px; border-radius: 9px; font-family: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: border-color 0.14s, color 0.14s;
}
.iy-ed-btn-sec:hover { border-color: #38BDF8; color: #FFFFFF; }
.iy-ed-art { display: flex; justify-content: center; align-items: center; }
.iy-ed-art svg { width: 100%; max-width: 340px; height: auto; filter: drop-shadow(0 12px 32px rgba(56, 189, 248, 0.16)); }

.iy-ed-stories { display: flex; flex-direction: column; gap: 38px; margin-top: 12px; }
.iy-ed-story {
  display: grid; grid-template-columns: 1.25fr 0.75fr; align-items: center; gap: 32px;
  padding-bottom: 34px; border-bottom: 1px solid rgba(148, 179, 219, 0.12);
}
.iy-ed-story:last-child { border-bottom: none; padding-bottom: 0; }
.iy-ed-story.rev { grid-template-columns: 0.75fr 1.25fr; }
.iy-ed-story.rev .iy-story-art { order: -1; }
.iy-story-kicker {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: #38BDF8; margin-bottom: 8px;
}
.iy-story-body h2 {
  margin: 0 0 10px; font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(19px, 2.2vw, 23px); font-weight: 800; color: #F8FAFC; line-height: 1.28;
}
.iy-story-body p {
  margin: 0; font-size: 14.8px; color: #A9BDD6; line-height: 1.78;
}
.iy-story-art { display: flex; justify-content: center; align-items: center; }
.iy-story-art svg { width: 100%; max-width: 250px; height: auto; filter: drop-shadow(0 8px 24px rgba(56, 189, 248, 0.14)); }

@media (max-width: 820px) {
  .iy-ed-hero, .iy-ed-story, .iy-ed-story.rev { grid-template-columns: 1fr; gap: 18px; }
  .iy-ed-story.rev .iy-story-art { order: 0; }
  .iy-ed-art svg { max-width: 240px; }
  .iy-story-art svg { max-width: 210px; }
}
.iy-ex-item {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px;
  padding: 14px 15px; font-size: 13.8px; color: var(--body-ink); line-height: 1.6;
}
.iy-ex-num { display: block; font-size: 11px; font-weight: 800; color: var(--accent); margin-bottom: 5px; letter-spacing: 0.06em; }

.iy-formula {
  background: var(--surface-2); border-left: 3px solid var(--pos);
  padding: 12px 15px; border-radius: 7px; font-size: 13.8px; color: var(--ink);
  margin-top: 12px; font-weight: 600;
}

/* INTERACTIVE SOLVER BOX */
.iy-solver {
  background: var(--surface); border: 1px solid rgba(56, 189, 248, 0.28); border-top: 3px solid var(--accent);
  border-radius: 12px; padding: 24px; margin-bottom: 20px;
}
.iy-solver-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.iy-solver-head h3 { margin: 0; font-family: "Plus Jakarta Sans", sans-serif; font-size: 17px; color: var(--ink); }
.iy-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 15px; }
.iy-form-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.iy-field { display: flex; flex-direction: column; gap: 5px; }
.iy-field label { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.iy-field input, .iy-field select, .iy-field textarea {
  width: 100%; border: 1px solid var(--border); background: var(--bg); color: var(--ink);
  border-radius: 7px; padding: 10px 11px; font-family: inherit; font-size: 14px; outline: none;
}
.iy-field input:focus { border-color: var(--accent); }
.iy-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; background: linear-gradient(135deg, #2563EB, #0284C7); color: #FFFFFF;
  padding: 11px 18px; border-radius: 8px; font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  text-decoration: none;
}
.iy-btn.gold { background: linear-gradient(135deg, #0EA5E9, #2563EB); color: #FFFFFF; }
.iy-result {
  margin-top: 15px; padding: 15px 18px; border-radius: 9px;
  background: rgba(52, 211, 153, 0.1); border: 1px solid rgba(52, 211, 153, 0.35);
  font-size: 14.5px; color: var(--ink); line-height: 1.7;
}
.iy-result strong { color: var(--pos); }

.iy-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 55; }

@media (max-width: 900px) {
  .iy-side { position: fixed; left: -305px; top: 0; bottom: 0; transition: left 0.2s ease; }
  .iy-side.open { left: 0; }
  .iy-backdrop.open { display: block; }
  .iy-menu-btn, .iy-close-mob { display: inline-flex; align-items: center; justify-content: center; }
  .iy-info-grid, .iy-ex-grid, .iy-form-grid, .iy-form-grid.cols-2 { grid-template-columns: 1fr; }
  .iy-topbar { padding: 10px 14px; }
  .iy-main { padding: 20px 15px 54px; }
  .iy-top-cta { display: none; }
}
