/* Formulacion.com — visual system. No external fonts, icons, imagery or runtime dependencies. */
:root {
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --max-width: 1240px;
  --accent: #93d8d2;
  --accent-rgb: 147, 216, 210;
  --accent-soft: rgba(147,216,210,.11);
  --focus: #e7ba79;
  --radius: 18px;
  --radius-lg: 26px;
  --speed: .24s;
}
html[data-section="inorganic"] {
  --accent: #83bbff;
  --accent-rgb: 131,187,255;
  --accent-soft: rgba(131,187,255,.12);
}
html[data-section="organic"] {
  --accent: #8ed5ac;
  --accent-rgb: 142,213,172;
  --accent-soft: rgba(142,213,172,.12);
}
html[data-section="elements"] {
  --accent: #a7c3e5;
  --accent-rgb: 167,195,229;
  --accent-soft: rgba(167,195,229,.12);
}
html[data-section="resources"] {
  --accent: #dcc3a2;
  --accent-rgb: 220,195,162;
  --accent-soft: rgba(220,195,162,.11);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #080c11;
  --bg-dim: #0b1219;
  --surface: #10171f;
  --surface-raised: #141e27;
  --surface-hover: #1b2933;
  --text: #f4f7f8;
  --text-soft: #b8c6d0;
  --muted: #84949f;
  --line: rgba(213,234,246,.115);
  --line-strong: rgba(215,237,255,.20);
  --shadow: rgba(0,0,0,.30);
  --inverse: #101a22;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f9f9;
  --bg-dim: #eff4f5;
  --surface: #ffffff;
  --surface-raised: #f8fbfc;
  --surface-hover: #eff5f7;
  --text: #16232e;
  --text-soft: #425769;
  --muted: #657b89;
  --line: rgba(29,63,88,.14);
  --line-strong: rgba(29,63,88,.23);
  --shadow: rgba(13,54,71,.09);
  --inverse: #ffffff;
}
html[data-theme="dark"][data-section="inorganic"] { --bg: #07101d; --bg-dim: #0a1728; --surface: #0f1c2d; --surface-raised: #13233a; --surface-hover: #1c3150; }
html[data-theme="dark"][data-section="organic"] { --bg: #09120f; --bg-dim: #0d1a15; --surface: #14231d; --surface-raised: #1b2c23; --surface-hover: #254033; }
html[data-theme="dark"][data-section="resources"] { --bg: #11100e; --bg-dim: #171510; --surface: #1d1a15; --surface-raised: #27231c; --surface-hover: #353027; }
html[data-theme="light"][data-section="inorganic"] { --bg: #f4f8fd; --bg-dim: #eaf1fa; --surface: #fff; --surface-raised: #f6f9fe; --surface-hover: #eaf2fc; --accent: #245fa2; --accent-rgb: 36,95,162; }
html[data-theme="light"][data-section="organic"] { --bg: #f5f9f5; --bg-dim: #eaf2eb; --surface: #fff; --surface-raised: #f5faf5; --surface-hover: #e9f3ea; --accent: #276b4e; --accent-rgb: 39,107,78; }
html[data-theme="light"][data-section="elements"] { --accent: #345d91; --accent-rgb: 52,93,145; }
html[data-theme="light"][data-section="resources"] { --bg: #fbf9f5; --bg-dim: #f5f0e9; --surface: #fff; --surface-raised: #fdf9f1; --accent: #80562a; --accent-rgb: 128,86,42; }
html[data-theme="light"][data-section="home"] { --accent: #176c70; --accent-rgb: 23,108,112; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px; min-height: 100vh; margin: 0;
  background-color: var(--bg); color: var(--text);
  transition: background-color var(--speed) ease, color var(--speed) ease;
}
body::before {
  content: ""; pointer-events: none; z-index: -1;
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 48% 42% at 82% 13%, rgba(var(--accent-rgb),.09), transparent 76%),
    radial-gradient(ellipse 40% 40% at 9% 68%, rgba(var(--accent-rgb),.037), transparent 78%);
}
body::after {
  content: ""; z-index: -1; pointer-events: none; position: fixed; inset: 0;
  background-image: linear-gradient(rgba(var(--accent-rgb),.026) 1px, transparent 1px), linear-gradient(90deg,rgba(var(--accent-rgb),.026) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, transparent 6%, #000 50%, transparent 95%);
}
a { color: inherit; text-decoration: none; }
button, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
::selection { background: rgba(var(--accent-rgb),.35); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.svg-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 22px; height: 22px; display: inline-block; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon-lg { width: 38px; height: 38px; }
.icon-sm { width: 16px; height: 16px; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 50; background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 8px; }
.skip-link:focus { top: 14px; }
.container { width: min(var(--max-width), calc(100% - 72px)); margin: 0 auto; }
.site-header { position: relative; z-index: 20; border-bottom: 1px solid var(--line); }
.site-header-inner { display:flex; align-items:center; justify-content:space-between; gap:30px; min-height: 86px; }
.brand { display: inline-flex; align-items: center; gap: 13px; white-space: nowrap; }
.brand-emblem { color: var(--accent); display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(var(--accent-rgb),.35); background: var(--accent-soft); border-radius: 13px; }
.brand-emblem .icon { width: 30px; height: 30px; }
.brand-word { font-size: 18px; font-weight: 730; letter-spacing: -.8px; }
.brand-word small { font-size: .84em; font-weight: 450; color: var(--accent); letter-spacing: -.5px; }
.primary-nav { display:flex; align-items:center; gap: 7px; margin-left: auto; }
.nav-link { font-size: 13px; font-weight: 620; color: var(--text-soft); padding: 11px 15px; border-radius: 10px; transition: background var(--speed), color var(--speed); }
.nav-link:hover, .nav-link[aria-current="page"] { background: var(--accent-soft); color: var(--text); }
.nav-link[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
.header-actions { display:flex; align-items:center; gap: 11px; }
.lang-wrap { position: relative; }
.lang-wrap::after { content: ""; position: absolute; pointer-events:none; right: 14px; top: 15px; width: 5px; height: 5px; transform: rotate(45deg); border-bottom: 1px solid var(--text-soft); border-right: 1px solid var(--text-soft); }
.lang-select { min-width: 78px; height: 39px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--text); padding: 0 27px 0 13px; appearance: none; cursor:pointer; font-size: 12px; font-weight: 680; }
.lang-select:hover, .icon-button:hover { background: var(--surface-hover); }
.icon-button { border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); border-radius: 10px; height: 39px; width: 42px; display: inline-grid; place-items: center; }
.icon-button .icon { width: 19px; height: 19px; }
.menu-toggle { display: none; }
.mobile-menu { display: none; }
main { outline: none; }
.hero-home { display: grid; grid-template-columns: 1.05fr 1fr; gap: 26px; align-items: center; padding: 74px 0 54px; min-height: 420px; }
.eyebrow { display: inline-flex; align-items:center; gap: 12px; font-weight: 680; font-size: 11px; letter-spacing: 2.6px; text-transform: uppercase; color: var(--accent); }
.eyebrow::before { content: ""; display:block; width: 24px; height:1px; background:currentColor; opacity:.75; }
h1,h2,h3,p { margin-top: 0; }
.hero-home h1 { font-size: clamp(54px,5.4vw,83px); letter-spacing: -.065em; line-height: 1.065; margin: 23px 0 22px; font-weight: 690; max-width: 640px; }
.hero-home h1 .headline-line { display:block; }
.hero-home h1 .headline-line-2 { color: var(--accent); }
.hero-copy { max-width: 530px; font-size: 17px; line-height: 1.85; color: var(--text-soft); }
.hero-actions { display:flex; flex-wrap:wrap; gap: 13px; margin-top: 30px; }
.btn { display: inline-flex; align-items:center; justify-content:center; gap: 13px; padding: 14px 18px; font-size: 13px; font-weight: 720; border-radius: 11px; border: 1px solid transparent; transition: background var(--speed), transform var(--speed), border-color var(--speed); }
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: #081516; background: #9ae0d6; }
html[data-theme="light"] .btn-primary { color: #fff; background: #176c70; }
html[data-section="inorganic"] .btn-primary { color: #051625; background: #9ac8ff; }
html[data-section="organic"] .btn-primary { color: #092114; background: #a8dfbc; }
html[data-theme="light"][data-section="inorganic"] .btn-primary { color: #fff; background: #245fa2; }
html[data-theme="light"][data-section="organic"] .btn-primary { color: #fff; background: #276b4e; }
.btn-secondary { border-color: var(--line-strong); background: var(--surface); color: var(--text); }
.btn-secondary:hover { background: var(--surface-hover); }
.btn .icon { height: 17px; width: 17px; }
.hero-art { position: relative; height: 360px; isolation:isolate; display:flex; align-items:center; justify-content:center; }
.hero-art::before { content: ""; position:absolute; inset:8% 8%; border-radius:50%; background:radial-gradient(circle,rgba(var(--accent-rgb),.15),transparent 63%); filter:blur(20px); z-index:-1; }
.hero-art svg { width:min(100%,540px); height:100%; overflow:visible; }
.hero-art .orbit-rotation { transform-origin: 50% 50%; animation:orbit 40s linear infinite; }
.hero-art .orbit-rotation-reverse { transform-origin: 50% 50%; animation:orbit 48s linear infinite reverse; }
@keyframes orbit { to { transform: rotate(360deg); } }
.hero-art .note { position:absolute; color:var(--text-soft); font: 500 11px/1.3 ui-monospace,SFMono-Regular,Consolas,monospace; letter-spacing: .4px; border:1px solid var(--line); background: var(--surface); padding:10px 12px; border-radius:8px; box-shadow:0 12px 35px var(--shadow); transition: opacity .95s ease, transform .95s ease; }
.hero-art .note.is-fading { opacity: .08; transform: translateY(6px); }
.hero-art .note-a { left: 1%; top: 24%; } .hero-art .note-b { right: 4.5%; bottom: 22%; } .hero-art .note-c { left: 15%; bottom: 9%; }
.hero-art .note strong { color: var(--accent); font-weight:680; }
.section-lead { display:flex; align-items:end; justify-content:space-between; gap:20px; margin: 16px 0 23px; }
.section-lead h2 { font-size: clamp(24px,2.6vw,34px); font-weight:650; letter-spacing:-1.1px; margin:7px 0 0; }
.section-lead p { color:var(--muted); font-size:13px; margin-bottom:4px; }
.minor-label { font-size: 11px; text-transform:uppercase; letter-spacing:2px; color:var(--accent); font-weight:650; }
.subject-grid { display:grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap:20px; }
.subject-card { position:relative; display:block; min-height:298px; overflow:hidden; border-radius:var(--radius-lg); padding: 34px 34px 30px; border:1px solid rgba(255,255,255,.10); color:#f5fbff; isolation:isolate; transition:transform var(--speed), border-color var(--speed), box-shadow var(--speed); }
.subject-card:hover { transform:translateY(-4px); border-color:rgba(255,255,255,.32); box-shadow:0 18px 50px rgba(0,0,0,.18); }
.subject-card.inorganic { background: radial-gradient(circle at 79% 31%,#294e8b 0%,transparent 47%),linear-gradient(135deg,#101d35,#0a172b 68%,#06101d); }
.subject-card.organic { background:radial-gradient(circle at 79% 29%,#275541 0%,transparent 49%), linear-gradient(135deg,#12291f,#0e211a 73%,#0a1712); }
.subject-card::after { content:""; position:absolute; inset:0; z-index:-1; opacity:.35; background-image:linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),linear-gradient(90deg,rgba(255,255,255,.05) 1px,transparent 1px);background-size:42px 42px;mask-image:linear-gradient(90deg,transparent 25%,#000 100%); }
.subject-card-content { position:relative; z-index:2; display:flex; flex-direction:column; align-items:flex-start; height:100%; }
.subject-kicker { font-size:11px; font-weight:750; letter-spacing:2.3px; text-transform:uppercase; color:#a5c9ec; }
.organic .subject-kicker { color:#a5dab7; }
.subject-card h3 { font-weight:660; letter-spacing:-1.5px; font-size:clamp(26px,3vw,39px); margin:14px 0 10px; }
.subject-card p { max-width:245px; font-size:14px; line-height:1.65; color:#c1d2df; }
.organic.subject-card p { color:#c3d9ce; }
.subject-link { margin-top:auto; display:flex; align-items:center; gap:12px; font-size:13px; font-weight:720; color:#dfefff; }
.subject-link .icon { width:17px; height:17px; }
.subject-illustration { pointer-events:none; position:absolute; z-index:1; width:270px; height:270px; right:-10px; top:19px; opacity:.94; }
.further-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:17px; margin-bottom:100px; }
.further-card { border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); min-height:165px; padding:24px; display:block; transition:transform var(--speed), background var(--speed),border-color var(--speed); }
.further-card:hover { transform:translateY(-3px); border-color:var(--line-strong); background:var(--surface-raised); }
.further-card .icon { color:var(--accent); width:30px; height:30px; }
.further-card h3 { font-size:17px; letter-spacing:-.35px; margin:20px 0 7px; font-weight:680; }
.further-card p { font-size:13px; line-height:1.6; color:var(--muted); margin-bottom:0; }
.page-hero { position: relative; overflow:hidden; padding:50px 0 40px; min-height:252px; border-bottom:1px solid var(--line); }
.breadcrumbs { display:flex; align-items:center; flex-wrap:wrap; gap:9px; color:var(--muted); font-size:12px; margin-bottom:32px; }
.breadcrumbs a:hover { color:var(--accent); }
.breadcrumbs .icon { width:12px; height:12px; }
.page-hero-inner { position:relative; z-index:1; max-width:770px; }
.page-hero h1 { font-size:clamp(39px,5vw,69px); line-height:1.08; letter-spacing:-.055em; font-weight:670; margin:14px 0 16px; }
.page-hero p { color:var(--text-soft); font-size:16px; line-height:1.8; max-width:720px; margin-bottom:0; }
.page-hero-decor { position:absolute; right:max(30px,calc((100vw - 1200px)/2)); top:30px; width:260px; height:230px; pointer-events:none; color:var(--accent); opacity:.16; }
.page-hero-decor .icon { width:210px; height:210px; stroke-width:.65; transform:rotate(-14deg); }
.content-section { padding:41px 0 98px; }
.content-section .section-lead { margin-top:0; margin-bottom:24px; }
.menu-grid { display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); gap:17px; }
.menu-card { grid-column:span 4; min-height:190px; border:1px solid var(--line); background:var(--surface); border-radius:20px; padding:26px; display:flex; flex-direction:column; gap:10px; transition:background var(--speed),transform var(--speed),border-color var(--speed); }
.menu-card:hover { background:var(--surface-raised); border-color:rgba(var(--accent-rgb),.38); transform:translateY(-3px); }
.menu-card.major { grid-column:span 6; min-height:235px; padding:31px; }
.menu-card-icon { height:46px; width:46px; display:grid; place-items:center; background:var(--accent-soft); border:1px solid rgba(var(--accent-rgb),.15); border-radius:13px; color:var(--accent); margin-bottom:8px; }
.menu-card-icon .icon { width:27px; height:27px; }
.menu-card h3 { font-size:19px; letter-spacing:-.5px; font-weight:670; margin:0; }
.menu-card.major h3 { font-size:25px; letter-spacing:-.85px; }
.menu-card p { font-size:13px; line-height:1.65; color:var(--muted); max-width:450px; margin:0; }
.menu-card-bottom { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:auto; }
.arrow-bubble { width:30px; height:30px; border-radius:50%; display:grid; place-items:center; color:var(--accent); border:1px solid var(--line-strong); }
.arrow-bubble .icon { width:14px; height:14px; }
.status-tag { font-size:10px; font-weight:690; letter-spacing:.75px; text-transform:uppercase; color:var(--muted); }
.status-tag.active { color:var(--accent); }
.syllabus-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.topic-card { display:flex; gap:18px; align-items:center; border:1px solid var(--line); border-radius:14px; padding:18px 19px; background:var(--surface); transition:background var(--speed),border-color var(--speed); min-height:83px; }
.topic-card:hover { background:var(--surface-raised); border-color:rgba(var(--accent-rgb),.37); }
.topic-number { display:grid; place-items:center; flex:0 0 38px; height:38px; border-radius:11px; color:var(--accent); background:var(--accent-soft); font-size:12px; font-weight:700; font-family:ui-monospace,Consolas,monospace; }
.topic-text { min-width:0; flex:1; }
.topic-card h3 { font-size:15px; font-weight:665; margin:0 0 4px; }
.topic-card p { font-size:12px; color:var(--muted); margin:0; }
.topic-card > .icon { color:var(--muted); height:16px; width:16px; }
.notice { border:1px solid rgba(var(--accent-rgb),.24); background:var(--accent-soft); border-radius:16px; padding:20px 23px; display:flex; align-items:start; gap:17px; margin-bottom:28px; }
.notice > .icon { color:var(--accent); width:24px; height:24px; margin-top:2px; }
.notice h3 { margin:0 0 6px; font-size:15px; }
.notice p { margin:0; color:var(--text-soft); font-size:13px; line-height:1.65; }
.preview-frame { border:1px solid var(--line); background:var(--surface); border-radius:20px; padding:26px; overflow:hidden; }
.preview-frame-header { display:flex; flex-wrap:wrap; gap:18px; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); padding-bottom:18px; margin-bottom:22px; }
.preview-frame-header h2 { font-size:19px; letter-spacing:-.5px; margin:0; }
.mode-tabs { display:flex; gap:7px; padding:5px; border-radius:10px; background:var(--bg-dim); border:1px solid var(--line); }
.mode-tab { border:0; border-radius:7px; padding:9px 14px; background:transparent; color:var(--muted); font-size:12px; font-weight:660; }
.mode-tab[aria-selected="true"] { background:var(--surface-raised); color:var(--text); box-shadow:0 1px 5px var(--shadow); }
.preview-surface { display:grid; place-items:center; min-height:205px; background:var(--bg-dim); border-radius:14px; border:1px solid var(--line); padding:22px; }
.preview-question { text-align:center; width:min(100%,430px); }
.preview-question small { display:block; color:var(--muted); font-size:12px; margin-bottom:12px; }
.chemical-formula { font-family:"Cambria Math","Times New Roman",serif; font-weight:700; font-size:56px; letter-spacing:1px; }
.chemical-formula sub { font-size:.55em; }
.preview-answer { text-align:left; border:1px solid var(--line-strong); margin-top:18px; border-radius:10px; padding:15px; font:12px "Segoe UI",sans-serif; color:var(--muted); }
.sample-line { display:grid; grid-template-columns:65px 115px minmax(0,1fr) 26px; align-items:center; gap:13px; width:100%; padding:13px 14px; border-bottom:1px solid var(--line); font-size:13px; }
.sample-line:last-child { border-bottom:0; }
.sample-number { color:var(--muted); font-family:ui-monospace,monospace; font-size:11px; }
.sample-chemical { font-weight:720; }
.sample-answer { color:var(--text-soft); }
.sample-state { width:8px;height:8px;border-radius:50%;background:#76c9aa; }
.sample-state.pending { background:var(--accent); }
.preview-disclaimer { color:var(--muted); font-size:12px; line-height:1.7; margin:13px 0 0; }
.classic-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:17px; }
.classic-card { border:1px solid var(--line); background:var(--surface); border-radius:19px; overflow:hidden; }
.classic-screen { height:165px; background:#05090d; border-bottom:1px solid var(--line); display:grid;place-items:center; position:relative; }
.classic-screen::before { content:""; position:absolute;inset:15px; border:1px solid rgba(109,182,206,.16); }
.classic-screen .icon { width:58px; height:58px; color:#60bfd0; stroke-width:1.0; opacity:.85; }
.classic-screen.organic-screen .icon { color:#a0c699; }
.classic-card-body { padding:24px; }
.classic-card-body h3 { margin:0 0 10px; font-size:20px; letter-spacing:-.5px; }
.classic-card-body p { color:var(--muted); font-size:13px; line-height:1.75; margin:0 0 15px; }
.coming-details { display:grid; grid-template-columns:1fr 1fr; gap:15px; }
.detail-panel { background:var(--surface); border:1px solid var(--line); border-radius:17px; padding:24px; }
.detail-panel h3 { margin:0 0 10px; font-size:16px; }
.detail-panel p { margin:0; font-size:13px; line-height:1.8; color:var(--text-soft); }
.help-block { margin-bottom:20px; }
.help-block h3 {font-size:17px; margin-bottom:7px;} .help-block p {font-size:14px;color:var(--text-soft);line-height:1.8;}
.page-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:28px; }
.mini-track { display:flex; align-items:center; gap:11px; color:var(--muted); font-size:12px; padding-top:29px; }
.mini-track span { display:block; height:1px; width:24px; background:var(--line-strong); }
.site-footer { border-top:1px solid var(--line); background:rgba(0,0,0,.015); padding:38px 0 45px; }
.footer-inner { display:flex; justify-content:space-between; gap:25px; align-items:start; }
.footer-title { font-size:15px; font-weight:700; margin-bottom:8px; letter-spacing:-.35px; }
.footer-text { color:var(--muted); line-height:1.6; font-size:12px; max-width:365px; }
.footer-links { display:flex; flex-wrap:wrap; gap:12px 23px; justify-content:flex-end; max-width:570px; }
.footer-links a { color:var(--text-soft); font-size:12px; }
.footer-links a:hover { color:var(--accent); }
@media (max-width: 1120px) {
  .container { width:min(var(--max-width),calc(100% - 52px)); }
  .nav-link { padding:10px 9px; font-size:12px; }
  .header-actions {gap:7px;}
  .hero-home { grid-template-columns:1fr .85fr; }
  .subject-illustration { right:-54px; opacity:.76; }
}
@media (max-width: 900px) {
  .primary-nav { display:none; }
  .menu-toggle { display:inline-grid; }
  .mobile-menu { display:block; position:absolute; left:0;right:0;top:100%; background:var(--bg); border-bottom:1px solid var(--line); padding:12px 26px 22px; box-shadow:0 25px 40px var(--shadow); }
  .mobile-menu[hidden] { display:none; }
  .mobile-menu a { display:block; padding:15px 9px; font-weight:640; border-bottom:1px solid var(--line); color:var(--text-soft); }
  .mobile-menu a[aria-current="page"] { color:var(--accent); }
  .hero-home { grid-template-columns:1fr .75fr; padding-top:55px; }
  .hero-home h1 { font-size:clamp(45px,7vw,70px); }
  .hero-art {height:315px;}
  .hero-art .note {font-size:10px;}
  .menu-card, .menu-card.major {grid-column:span 6; }
}
@media (max-width: 670px) {
  .container {width:calc(100% - 36px);}
  .site-header-inner {min-height:72px; gap:12px;}
  .brand {gap:8px;}
  .brand-emblem {width:35px;height:35px;border-radius:11px;}
  .brand-emblem .icon {width:26px;height:26px;}
  .brand-word {font-size:16px;}
  .lang-select {min-width:68px;padding-left:9px;padding-right:19px;height:36px;}
  .lang-wrap::after {right:9px;top:14px;}
  .icon-button {width:36px;height:36px;}
  .hero-home { display:block; min-height:auto; padding:48px 0 40px; }
  .hero-home h1 {font-size:clamp(46px,11vw,68px);max-width:520px;margin:19px 0 15px;}
  .hero-copy {font-size:15px;line-height:1.75;}
  .hero-art { height:255px; margin:4px 0 -19px; }
  .hero-art .note {padding:7px;font-size:9px;}
  .hero-art .note-a {left:0;top:19%;}.hero-art .note-b {right:0;bottom:23%;}
  .subject-grid, .further-grid, .syllabus-grid, .classic-grid, .coming-details {grid-template-columns:1fr;}
  .subject-card {min-height:275px;padding:29px;}
  .subject-illustration {right:-22px;width:240px;height:240px;top:25px;opacity:.82;}
  .subject-card h3 {font-size:30px;max-width:60%;}
  .subject-card p {max-width:60%;}
  .further-grid {gap:12px;margin-bottom:58px;}
  .further-card {min-height:125px;}
  .section-lead {align-items:start;}
  .section-lead p {max-width:135px;text-align:right;line-height:1.5;}
  .page-hero {padding:34px 0 39px;min-height:0;}
  .page-hero h1 {font-size:clamp(39px,9vw,55px);}
  .page-hero p {font-size:14px;}
  .page-hero-decor {right:0;top:38px;opacity:.10;}
  .breadcrumbs {margin-bottom:28px;}
  .content-section {padding:32px 0 72px;}
  .menu-grid {gap:12px;}
  .menu-card,.menu-card.major {grid-column:span 12;min-height:163px;padding:21px;}
  .menu-card.major {min-height:188px;}
  .menu-card h3,.menu-card.major h3 {font-size:20px;}
  .menu-card-icon {width:41px;height:41px;margin-bottom:4px;}
  .menu-card-icon .icon {width:25px;height:25px;}
  .menu-card p {font-size:12px;}
  .topic-card {padding:15px;min-height:75px;}
  .footer-inner {flex-direction:column;}
  .footer-links {justify-content:flex-start;}
  .preview-frame {padding:15px;}
  .preview-frame-header {align-items:start;}
  .sample-line {grid-template-columns:25px 58px 1fr 12px;gap:6px;padding:13px 3px;font-size:11px;}
  .mode-tabs {width:100%;} .mode-tab {flex:1;}
}
@media (prefers-reduced-motion:reduce) {
  html {scroll-behavior:auto;}
  *, *::before, *::after {animation-duration:.01ms !important;transition-duration:.01ms !important;}
}

/* --- v0.3 polish --- */
html[data-theme="light"] {
  --bg: #f2f6f8;
  --bg-dim: #e8eff3;
  --surface: #ffffff;
  --surface-raised: #f7fbfd;
  --surface-hover: #ecf4f8;
  --text: #13212d;
  --text-soft: #365063;
  --muted: #5f7382;
  --line: rgba(24,55,77,.18);
  --line-strong: rgba(24,55,77,.30);
  --shadow: rgba(20,55,77,.11);
}
html[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 52% 42% at 82% 14%, rgba(var(--accent-rgb),.16), transparent 76%),
    radial-gradient(ellipse 44% 45% at 9% 68%, rgba(var(--accent-rgb),.08), transparent 78%);
}
html[data-theme="light"] body::after {
  background-image: linear-gradient(rgba(var(--accent-rgb),.045) 1px, transparent 1px), linear-gradient(90deg,rgba(var(--accent-rgb),.045) 1px, transparent 1px);
}
.hero-home,
.home-panel,
.preview-frame,
.detail-panel,
.notice,
.classic-card,
.further-card,
.menu-card,
.topic-card {
  box-shadow: 0 16px 34px var(--shadow);
}
.home-panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0)), var(--surface);
  border-radius: 28px;
  padding: 28px 32px;
  margin-bottom: 20px;
}
.hero-panel {
  padding: 38px 38px 32px;
  overflow: hidden;
}
.hero-home > div:first-child {
  padding-left: 34px;
}
.section-lead {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}
.hero-home {
  min-height: 0;
  padding: 24px 0 12px;
}
.message-rotator {
  margin-top: 24px;
  max-width: 540px;
  min-height: 78px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(var(--accent-rgb), .26);
  border-left: 3.5px solid var(--accent);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), .10), rgba(var(--accent-rgb), .03));
  border-radius: 14px;
  padding: 16px 22px 16px 24px;
}
#rotating-message {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.55;
  font-weight: 500;
  color: var(--text);
  transition: opacity .22s ease;
}
#rotating-message.is-fading { opacity: .08; }

.hero-art::before {
  inset: 2% 2%;
  background: radial-gradient(circle,rgba(var(--accent-rgb),.17),transparent 62%);
}
/* Las órbitas no giran: el movimiento está definido por las trayectorias SVG. */
.hero-art .orbit-rest { display: none; }
.hero-art .atom-nucleus { filter: drop-shadow(0 0 12px rgba(117,222,217,.24)); }
@media (prefers-reduced-motion: reduce) {
  .hero-art .orbit-electron { display: none; }
  .hero-art .orbit-rest { display: block; }
}
.hero-art .halo-ring {
  fill: none;
  stroke: #7ac9d5;
  stroke-opacity: .20;
  stroke-width: 2.2;
}
.hero-art .halo-ring.outer { stroke-opacity: .13; stroke-dasharray: 4 11; }
.hero-art .orbital-track {
  fill: none;
  stroke: url(#orbitalLine);
  stroke-width: 2.8;
  opacity: .92;
}
.hero-art .orbital-track.vertical { stroke-width: 2.4; opacity: .76; }
.hero-art .electron-dot { fill: #7ddde1; stroke: #f3ffff; stroke-width: 2.4; }
.hero-art .electron-dot.electron-alt { fill: #93bbff; }
.hero-art .electron-dot.electron-third { fill: #affff1; }
.hero-art .core-shell { fill: rgba(122, 217, 226, .08); stroke: #8ad9d6; stroke-opacity: .38; stroke-width: 1.8; }
.hero-art .molecule-constellation path { stroke: #95cfdb; stroke-opacity: .42; stroke-width: 1.5; }
.hero-art .molecule-nodes circle { fill: #a7e5e2; }
html[data-theme="light"] .hero-art .halo-ring { stroke-opacity: .35; }
html[data-theme="light"] .hero-art .halo-ring.outer { stroke-opacity: .24; }
html[data-theme="light"] .hero-art .orbital-track { opacity: .98; filter: drop-shadow(0 0 3px rgba(112,183,198,.16)); }
html[data-theme="light"] .hero-art .molecule-constellation path { stroke-opacity: .55; }

/* Tarjetas de materias sin solapamiento entre texto y molécula */
.subject-card {
  min-height: 295px;
  padding: 30px 32px;
  border: 1px solid rgba(255,255,255,.14);
}
.subject-card-content {
  justify-content: flex-start;
  max-width: 56%;
}
.subject-card h3 {
  margin-top: 4px;
}
.subject-card p {
  max-width: 100%;
}
.subject-kicker { display:none; }
.subject-illustration {
  width: 250px;
  height: 228px;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  opacity: .96;
}
.image-carousel {
  pointer-events: none;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.image-carousel-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}
.image-carousel .molecule-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 1.8s ease;
}
.image-carousel .molecule-frame.is-active {
  opacity: 1;
}
.image-carousel-hero {
  position: static;
  width: 100%;
  height: 100%;
}
.molecule-caption {
  padding-top: 6px;
  text-align: center;
  line-height: 1.15;
}
.molecule-formula {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .04em;
}
.molecule-name {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 650;
}
.molecule-caption-hero .molecule-formula {
  font-size: 20px;
}
.molecule-caption-hero .molecule-name {
  font-size: 13px;
}
.image-carousel-inorganic .molecule-formula,
.image-carousel-inorganic .molecule-name {
  color: #90bdee;
}
.image-carousel-organic .molecule-formula,
.image-carousel-organic .molecule-name {
  color: #8fd8a9;
}
html[data-theme="light"] .image-carousel-inorganic .molecule-formula,
html[data-theme="light"] .image-carousel-inorganic .molecule-name {
  color: #1e3a8a;
}
html[data-theme="light"] .image-carousel-organic .molecule-formula,
html[data-theme="light"] .image-carousel-organic .molecule-name {
  color: #14532d;
}

/* Cabeceras de sección con ilustraciones químicas */
.page-hero {
  background: linear-gradient(180deg, rgba(255,255,255,.015), rgba(255,255,255,0));
}
.page-hero-decor {
  width: 320px;
  height: 230px;
  top: 50%;
  transform: translateY(-50%);
  right: max(28px,calc((100vw - 1200px)/2));
  opacity: .98;
}
.page-hero-decor .subject-illustration,
.page-hero-decor .image-carousel,
.chemistry-hero svg {
  position: static;
  width: 100%;
  height: 100%;
  right: auto;
  top: auto;
  transform: none;
  opacity: 1;
}
.chemistry-hero-elements svg { overflow: visible; }
.ptable-main { fill: rgba(var(--accent-rgb), .24); stroke: rgba(var(--accent-rgb), .85); stroke-width: 1.8; }
.ptable-box { fill: rgba(var(--accent-rgb), .09); stroke: rgba(var(--accent-rgb), .42); stroke-width: 1.4; }
.ptable-noble { fill: rgba(var(--accent-rgb), .15); stroke: rgba(var(--accent-rgb), .58); stroke-width: 1.4; }
.ptable-box.faint, .ptable-noble.faint { opacity: .55; }
.ptable-num { font: 600 7.5px/1 "Segoe UI", Arial, sans-serif; fill: var(--text-soft); }
.ptable-sym { font: 700 13px/1 "Segoe UI", Arial, sans-serif; fill: var(--text); }

.menu-card,
.further-card,
.preview-frame,
.notice,
.detail-panel,
.classic-card,
.topic-card {
  border-width: 1.2px;
}
.notice {
  background: linear-gradient(135deg, rgba(var(--accent-rgb),.12), rgba(var(--accent-rgb),.05));
}
html[data-theme="light"] .subject-card.inorganic {
  background: radial-gradient(circle at 79% 31%, #b7d7ff 0%, transparent 47%),linear-gradient(135deg,#d9ebff,#c7def8 68%,#b8d2f1);
  color: #0e2037;
}
html[data-theme="light"] .subject-card.organic {
  background: radial-gradient(circle at 79% 29%, #c5ead1 0%, transparent 49%), linear-gradient(135deg,#deefe3,#cde4d4 73%,#c0d9c8);
  color: #12271d;
}
html[data-theme="light"] .subject-card p { color: rgba(19,33,45,.82); }
html[data-theme="light"] .subject-link { color: #13212d; }

@media (max-width: 1120px) {
  .subject-card-content { max-width: 62%; }
  .subject-illustration { width: 210px; height: 200px; right: 4px; opacity: .82; }
}
@media (max-width: 900px) {
  .home-panel { padding: 22px 22px; }
  .hero-panel { padding: 26px 24px; }
  .hero-home > div:first-child { padding-left: 20px; }
  .message-rotator { min-height: 82px; padding: 14px 18px 14px 20px; }
  .page-hero-decor { width: 230px; height: 165px; opacity: .88; }
}
@media (max-width: 670px) {
  .home-panel { border-radius: 22px; padding: 18px 16px; }
  .hero-home { padding: 14px 0 6px; }
  .hero-home > div:first-child { padding-left: 0; }
  .subject-card { min-height: 270px; padding: 24px; }
  .subject-card-content { max-width: 65%; }
  .subject-card h3 { max-width: 100%; }
  .subject-card p { max-width: 100%; }
  .subject-illustration { width: 182px; height: 172px; right: -10px; opacity: .82; }
  #rotating-message { font-size: 15px; }
  .section-lead { align-items: start; }
  .page-hero-decor { display: none; }
}

/* v0.4.1 · Mantener completa la cabecera en móviles de 320 px. */
@media (max-width: 370px) {
  .site-header-inner { gap: 6px; }
  .brand { gap: 5px; min-width: 0; }
  .brand-emblem { width: 30px; height: 30px; }
  .brand-word { font-size: 14px; }
  .header-actions { gap: 4px; }
  .lang-select { min-width: 58px; padding-left: 7px; padding-right: 16px; font-size: 11px; }
  .lang-wrap::after { right: 8px; }
  .icon-button { width: 32px; height: 32px; }
}
