:root {
  color-scheme: dark;
  --bg: #09141b;
  --bg-soft: #0d1b23;
  --surface: #11232d;
  --surface-raised: #162b36;
  --surface-hover: #1c3440;
  --line: rgba(181, 214, 219, .13);
  --line-strong: rgba(181, 214, 219, .22);
  --text: #f0f7f7;
  --muted: #9db0b7;
  --muted-dim: #71858e;
  --teal: #4be4d1;
  --teal-strong: #1bc9b8;
  --teal-soft: rgba(75, 228, 209, .12);
  --radius-lg: 22px;
  --radius-md: 15px;
  --font: "Noto Sans Arabic", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; }
body { margin: 0; min-width: 320px; background: radial-gradient(ellipse at 78% 1%, rgba(36, 104, 111, .15), transparent 30rem), var(--bg); color: var(--text); font-family: var(--font); }
button, input { font: inherit; }
a { color: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible, .periodic-scroll:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.site-shell { max-width: 1680px; margin-inline: auto; padding-inline: clamp(18px, 4vw, 68px); }
.topbar { min-height: 78px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 37px; height: 37px; display: grid; place-items: center; color: var(--teal); }
.brand-mark svg { width: 100%; height: 100%; }
.brand-name { font-weight: 800; letter-spacing: -.04em; font-size: 17px; }
.brand-dot, .footer-brand span { color: var(--teal); }
.topbar-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 12px rgba(75,228,209,.7); }
.topbar-separator { height: 13px; width: 1px; background: var(--line-strong); margin-inline: 4px; }
.hero { min-height: 340px; position: relative; display: flex; align-items: center; justify-content: space-between; overflow: hidden; padding-block: 48px 40px; border-bottom: 1px solid var(--line); }
.hero-copy { position: relative; z-index: 1; max-width: 610px; }
.eyebrow, .section-kicker { color: var(--teal); font-size: 12px; letter-spacing: .02em; font-weight: 700; margin: 0 0 16px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; }
.eyebrow-mark { width: 7px; height: 7px; border: 1px solid var(--teal); transform: rotate(45deg); display: inline-block; }
.hero h1 { margin: 0; font-size: clamp(40px, 5.5vw, 69px); line-height: 1.24; letter-spacing: -.055em; font-weight: 800; }
.hero h1 span { color: var(--teal); }
.hero-lead { max-width: 490px; margin: 14px 0 20px; color: #adbec2; font-size: 15px; line-height: 1.95; }
.hero-facts { display: flex; align-items: center; gap: 13px; color: #a4b7be; font-size: 11px; }
.hero-facts b { color: var(--text); font-size: 13px; margin-inline-end: 3px; }
.fact-divider { height: 15px; width: 1px; background: var(--line-strong); }
.hero-orbit { position: relative; flex: 0 0 350px; height: 270px; margin-inline-end: clamp(10px, 8vw, 115px); opacity: .87; }
.hero-orbit-ring { position: absolute; left: 50%; top: 50%; width: 255px; height: 111px; border: 1px solid rgba(75,228,209,.25); border-radius: 50%; transform: translate(-50%,-50%) rotate(-32deg); }
.hero-orbit-ring.ring-b { transform: translate(-50%,-50%) rotate(32deg); border-color: rgba(120,190,195,.2); }
.hero-orbit-ring.ring-c { width: 183px; height: 220px; transform: translate(-50%,-50%) rotate(52deg); border-color: rgba(75,228,209,.13); }
.hero-orbit-glow { position: absolute; left: 50%; top: 50%; width: 110px; height: 110px; transform: translate(-50%,-50%); background: radial-gradient(circle, rgba(75,228,209,.17), transparent 70%); }
.hero-nucleus { position: absolute; z-index: 2; left: 50%; top: 50%; width: 14px; height: 14px; background: #b8fff3; border-radius: 50%; box-shadow: 0 0 12px 3px rgba(75,228,209,.8), 0 0 42px 10px rgba(75,228,209,.34); transform: translate(-50%,-50%); }
.hero-electron { position: absolute; z-index: 3; width: 7px; height: 7px; background: var(--teal); border-radius: 50%; box-shadow: 0 0 12px var(--teal); }
.hero-electron-a { left: calc(50% + 119px); top: calc(50% - 48px); }
.hero-electron-b { left: calc(50% - 83px); top: calc(50% + 75px); width: 5px; height: 5px; }
.hero-atom-label { position: absolute; left: 9%; top: 16%; color: #849ba2; font-family: ui-monospace, monospace; letter-spacing: .1em; font-size: 11px; direction: ltr; }
.hero-atom-label i { display: inline-block; width: 5px; height: 5px; margin-inline: 8px; background: var(--teal); border-radius: 50%; }
.search-section { max-width: 790px; margin-block: 31px 27px; }
.search-label { display: block; margin-bottom: 9px; color: #d9e5e6; font-size: 12px; font-weight: 700; }
.search-box { position: relative; height: 54px; display: flex; align-items: center; gap: 12px; padding-inline: 17px; border: 1px solid var(--line-strong); background: rgba(15,31,40,.84); border-radius: 12px; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.search-box:focus-within { border-color: rgba(75,228,209,.65); box-shadow: 0 0 0 3px rgba(75,228,209,.08); background: #10242c; }
.search-icon { flex: 0 0 20px; width: 20px; height: 20px; stroke: #8fa8ae; stroke-width: 1.6; fill: none; }
.search-box input { width: 100%; height: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; }
.search-box input::placeholder { color: #758a91; }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-key { flex: 0 0 auto; color: #81969d; border: 1px solid var(--line-strong); border-radius: 6px; padding: 3px 7px; font-family: var(--font); font-size: 10px; background: rgba(255,255,255,.025); }
.clear-search { border: 0; background: none; color: #c6d6d8; font-size: 21px; line-height: 1; cursor: pointer; padding: 0 3px; }
.clear-search[hidden] { display: none; }
.search-hint { min-height: 19px; margin: 7px 2px 0; color: var(--muted-dim); font-size: 11px; }
.workspace { display: grid; grid-template-columns: minmax(330px, 378px) minmax(0, 1fr); align-items: start; gap: clamp(22px, 3vw, 42px); direction: rtl; padding-top: 8px; }
.detail-panel { grid-column: 1; grid-row: 1; position: sticky; top: 18px; min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(155deg, rgba(24,46,57,.98), rgba(15,31,40,.98)); box-shadow: 0 22px 70px rgba(0,0,0,.17); }
.table-section { grid-column: 2; grid-row: 1; min-width: 0; }
.detail-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-overline, .atom-overline { margin: 0; color: #8ea5ac; font-size: 10px; letter-spacing: .04em; }
.category-pill { --category-color: var(--teal); display: inline-flex; align-items: center; gap: 7px; border: 1px solid color-mix(in srgb, var(--category-color) 38%, transparent); border-radius: 999px; padding: 5px 9px; color: var(--category-color); background: color-mix(in srgb, var(--category-color) 10%, transparent); font-size: 10px; white-space: nowrap; }
.category-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.element-identity { display: flex; align-items: center; gap: 14px; margin-block: 18px 17px; }
.detail-symbol-wrap { position: relative; width: 76px; height: 76px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 17px; border: 1px solid rgba(75,228,209,.34); background: linear-gradient(140deg, rgba(75,228,209,.14), rgba(75,228,209,.035)); color: var(--teal); }
.detail-number { position: absolute; top: 7px; inset-inline-start: 9px; font: 10px ui-monospace, monospace; color: #a6c1c4; }
.detail-symbol { font: 600 35px/1 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: -.05em; }
.identity-copy { min-width: 0; }
.identity-copy h2 { margin: 0; font-size: 23px; line-height: 1.35; letter-spacing: -.04em; }
.english-name { margin: 4px 0 0; color: var(--muted); font: 12px/1.5 ui-sans-serif, Arial, sans-serif; }
.atom-card { overflow: hidden; border: 1px solid rgba(151,197,203,.12); border-radius: 16px; background: radial-gradient(ellipse at 50% 57%, rgba(28,89,91,.22), rgba(12,27,35,.48) 67%), #0e1c24; }
.atom-card-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 14px 0; }
.atom-caption { margin: 4px 0 0; color: #e2efef; font-size: 12px; font-weight: 700; }
.atom-orbit-icon { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid var(--line); border-radius: 50%; color: var(--teal); font-size: 15px; transform: rotate(30deg); }
.atom-diagram { display: block; width: min(100%, 300px); height: 210px; margin: 0 auto; overflow: visible; }
.orbit-line { fill: none; stroke: rgba(113,210,205,.35); stroke-width: 1; stroke-dasharray: 2.5 4; }
.nucleus-halo { fill: url(#nucleus-glow); opacity: .64; }
.nucleus-core { fill: #68f4df; filter: drop-shadow(0 0 5px rgba(75,228,209,.85)); }
.nucleus-label { fill: #0d3538; font: 700 7px ui-monospace, monospace; dominant-baseline: middle; }
.electron { fill: #c1fff5; stroke: rgba(75,228,209,.6); stroke-width: .8; filter: drop-shadow(0 0 3px rgba(75,228,209,.95)); }
.electron-orbit { transform-box: view-box; transform-origin: 150px 112px; animation: orbit-spin var(--orbit-duration, 22s) linear infinite; }
@keyframes orbit-spin { to { transform: rotate(360deg); } }
.atom-legend { display: flex; align-items: center; justify-content: center; gap: 15px; margin: -6px 0 13px; color: #81979e; font-size: 9px; }
.atom-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 5px; height: 5px; display: inline-block; border-radius: 50%; }
.proton-dot { background: var(--teal); box-shadow: 0 0 6px var(--teal); }
.electron-dot { background: #d5fff9; }
.electron-section { padding: 16px 1px 13px; border-bottom: 1px solid var(--line); }
.subsection-heading { display: flex; align-items: center; justify-content: space-between; color: #e0eded; font-size: 11px; font-weight: 700; }
.micro-label { color: #81969d; font-size: 9px; font-weight: 400; }
.shell-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.shell-badge { display: inline-flex; align-items: center; gap: 6px; min-width: 41px; justify-content: center; padding: 5px 8px; border: 1px solid rgba(75,228,209,.18); border-radius: 7px; color: #e5f8f5; background: rgba(75,228,209,.07); font: 11px ui-monospace, monospace; }
.shell-badge small { color: #83a6a7; font: 9px var(--font); }
.configuration-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; color: #869ba1; font-size: 9px; }
.configuration-line code { max-width: 68%; overflow-wrap: anywhere; text-align: left; color: var(--teal); font: 10px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; }
.detail-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 15px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--line); }
.metric { min-height: 56px; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 8px 10px; background: rgba(15,31,40,.92); }
.metric span { color: #859ba1; font-size: 9px; }
.metric strong { color: #e8f1f1; font-size: 11px; font-weight: 700; }
.detail-description { margin: 14px 0 0; color: #aec0c3; font-size: 11px; line-height: 1.9; }
.extra-details { margin-top: 14px; overflow: hidden; border: 1px solid rgba(75,228,209,.17); border-radius: 13px; background: linear-gradient(145deg, rgba(75,228,209,.045), rgba(15,31,40,.55) 52%); }
.extra-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 13px; cursor: pointer; list-style: none; }
.extra-summary::-webkit-details-marker { display: none; }
.extra-heading-copy { display: flex; flex-direction: column; gap: 4px; }
.extra-heading-copy small { color: var(--teal); font-size: 9px; }
.extra-heading-copy strong { color: #e7f3f2; font-size: 12px; }
.extra-chevron { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 50%; color: var(--teal); transition: transform .22s ease, background .22s ease; }
.extra-details[open] .extra-chevron { transform: rotate(180deg); background: rgba(75,228,209,.08); }
.extra-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 0 10px 10px; }
.extra-fact { position: relative; min-width: 0; min-height: 78px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; padding: 11px 10px 9px; overflow: hidden; border: 1px solid rgba(151,197,203,.11); border-radius: 9px; background: linear-gradient(150deg, rgba(21,43,52,.94), rgba(13,28,36,.96)); }
.extra-mark { position: absolute; top: 7px; inset-inline-start: 9px; color: rgba(75,228,209,.67); font: 10px ui-monospace, monospace; }
.extra-label { color: #91a8ac; font-size: 9px; line-height: 1.5; }
.extra-fact strong { color: #e1f2ef; font-size: 11px; line-height: 1.5; unicode-bidi: isolate; overflow-wrap: anywhere; }
.extra-fact #detail-block { color: var(--teal); font: 700 16px/1 ui-monospace, monospace; letter-spacing: .08em; }
.extra-fact small { color: #6f8a90; font-size: 8px; line-height: 1.4; }
.discovery-card { display: flex; align-items: center; gap: 10px; margin: 0 10px; padding: 11px; border: 1px solid rgba(75,228,209,.15); border-radius: 9px; background: rgba(75,228,209,.045); }
.discovery-icon { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 auto; border: 1px solid rgba(75,228,209,.25); border-radius: 9px; color: var(--teal); font-size: 13px; }
.discovery-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.discovery-copy small { color: #8ba1a5; font-size: 8px; }
.discovery-copy strong { color: #e3efed; font: 11px/1.5 ui-sans-serif, Arial, sans-serif; text-align: left; overflow-wrap: anywhere; }
.extra-footnote { margin: 9px 12px 11px; color: #748b90; font-size: 8px; line-height: 1.7; }
.detail-panel.is-opening { animation: detail-opening .42s cubic-bezier(.2,.75,.25,1) both; }
.detail-panel.is-opening .extra-fact { animation: extra-fact-in .34s both; }
.detail-panel.is-opening .extra-fact:nth-child(2) { animation-delay: .025s; }
.detail-panel.is-opening .extra-fact:nth-child(3) { animation-delay: .05s; }
.detail-panel.is-opening .extra-fact:nth-child(4) { animation-delay: .075s; }
.detail-panel.is-opening .extra-fact:nth-child(5) { animation-delay: .1s; }
.detail-panel.is-opening .extra-fact:nth-child(6) { animation-delay: .125s; }
@keyframes detail-opening { from { border-color: rgba(75,228,209,.48); box-shadow: 0 22px 70px rgba(0,0,0,.17), 0 0 22px rgba(75,228,209,.08); } to { border-color: var(--line); } }
@keyframes extra-fact-in { from { opacity: .45; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.model-note { display: flex; align-items: flex-start; gap: 6px; margin: 11px 0 0; color: #82989d; font-size: 9px; line-height: 1.7; }
.model-note span { color: var(--teal); font-size: 11px; }
.return-table { display: none; }
.table-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 8px; }
.section-kicker { margin: 0 0 4px; font-size: 10px; }
.table-heading h2 { margin: 0; font-size: 24px; line-height: 1.35; letter-spacing: -.035em; }
.result-count { color: #849ba2; font-size: 10px; white-space: nowrap; padding-bottom: 4px; }
.table-instruction { min-height: 22px; display: flex; align-items: center; gap: 10px; margin: 0 0 12px; color: #8ca1a6; font-size: 10px; }
.instruction-mobile { display: none; }
.scroll-cue { display: none; color: #739197; }
.scroll-cue b { color: var(--teal); margin-inline-start: 3px; }
.category-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 13px; }
.legend-filter { display: inline-flex; align-items: center; gap: 6px; min-height: 27px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: #9db0b5; cursor: pointer; white-space: nowrap; font-size: 9px; transition: color .18s ease, border-color .18s ease, background .18s ease, opacity .18s ease; }
.legend-filter:hover { color: var(--text); border-color: var(--line-strong); }
.legend-filter[aria-pressed="true"] { color: var(--text); background: rgba(255,255,255,.045); border-color: color-mix(in srgb, var(--kind-color) 55%, transparent); }
.legend-filter[data-kind="all"] { --kind-color: var(--teal); }
.legend-swatch { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--kind-color); box-shadow: 0 0 5px color-mix(in srgb, var(--kind-color) 48%, transparent); }
.periodic-scroll { width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; direction: ltr; scrollbar-width: thin; scrollbar-color: rgba(75,228,209,.33) rgba(255,255,255,.035); border: 1px solid rgba(155,197,202,.13); border-radius: 14px; background: linear-gradient(160deg, rgba(20,40,49,.7), rgba(14,29,37,.75)); padding: 12px 10px 14px; }
.periodic-inner { min-width: 1025px; direction: ltr; }
.f-block-heading, .f-row-label { direction: rtl; }
.group-numbers, .periodic-grid { display: grid; grid-template-columns: repeat(18, minmax(0, 1fr)); gap: 5px; direction: ltr; }
.group-numbers { margin-bottom: 6px; }
.group-number { text-align: center; color: #68828b; font: 9px ui-monospace, monospace; }
.periodic-grid { grid-template-rows: repeat(7, 67px); grid-auto-rows: 67px; }
.element-cell { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; min-height: 0; padding: 6px 6px 5px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--kind-color) 27%, transparent); border-radius: 8px; background: linear-gradient(150deg, color-mix(in srgb, var(--kind-color) 10%, #11232d), #0f1e26 82%); color: var(--text); text-align: left; cursor: pointer; transition: transform .16s ease, opacity .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.element-cell::before { position: absolute; z-index: -1; content: ""; width: 27px; height: 27px; right: -12px; bottom: -13px; border-radius: 50%; background: var(--kind-color); opacity: .075; filter: blur(5px); }
.element-cell:hover, .element-cell:focus-visible { z-index: 2; transform: translateY(-3px); border-color: color-mix(in srgb, var(--kind-color) 75%, white 5%); background: linear-gradient(150deg, color-mix(in srgb, var(--kind-color) 22%, #142933), #13252d 82%); box-shadow: 0 8px 23px rgba(0,0,0,.24), 0 0 0 1px color-mix(in srgb, var(--kind-color) 15%, transparent); }
.element-cell[aria-pressed="true"] { border-color: var(--kind-color); background: linear-gradient(145deg, color-mix(in srgb, var(--kind-color) 24%, #12242d), #13272f 90%); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--kind-color) 18%, transparent), 0 0 20px color-mix(in srgb, var(--kind-color) 10%, transparent); }
.element-cell.is-dimmed { opacity: .2; }
.element-cell.is-result { box-shadow: 0 0 0 2px rgba(255,255,255,.92), 0 0 19px color-mix(in srgb, var(--kind-color) 33%, transparent); }
.element-cell[hidden] { display: none; }
.cell-number { color: #9cafb3; font: 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.cell-symbol { display: block; align-self: center; color: var(--kind-color); font: 700 18px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: -.08em; }
.cell-name { align-self: center; max-width: 100%; overflow: hidden; color: #b4c6c8; font-size: 8px; line-height: 1.1; white-space: nowrap; text-overflow: ellipsis; }
.f-placeholder { cursor: default; justify-content: center; align-items: center; gap: 4px; border-style: dashed; color: #a4b7b8; background: rgba(255,255,255,.025); text-align: center; }
.f-placeholder:hover { transform: none; box-shadow: none; }
.f-placeholder strong { color: var(--kind-color); font: 11px ui-monospace, monospace; }
.f-placeholder span { font-size: 8px; line-height: 1.35; }
.f-block-heading { display: flex; align-items: center; gap: 9px; padding: 13px 0 7px; color: #789198; font-size: 9px; }
.f-block-heading b { color: var(--teal); font-family: ui-monospace, monospace; font-weight: 500; }
.f-block-line { height: 1px; flex: 1; background: var(--line); }
.f-row-label { display: flex; align-items: center; gap: 6px; margin: 4px 0 5px; color: #9cafb3; font-size: 9px; }
.f-row-dot { width: 6px; height: 6px; border-radius: 50%; }
.lanthanoid-dot { background: #f0be68; }.actinoid-dot { background: #ef8a8e; }
.f-periodic-grid { grid-template-rows: 67px; }
.table-footnote { display: flex; align-items: center; gap: 7px; margin: 10px 2px 0; color: #71878e; font-size: 9px; }
.footnote-mark { color: var(--teal); font-size: 13px; }
.site-footer { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; margin-top: 43px; padding-block: 20px 25px; border-top: 1px solid var(--line); color: #72888e; font-size: 9px; }
.footer-brand { white-space: nowrap; color: #d5e2e3; text-decoration: none; font-size: 11px; font-weight: 800; }
.site-footer p { margin: 0; line-height: 1.9; }
.site-footer p a { color: #9aafb3; text-decoration-color: rgba(154,175,179,.35); text-underline-offset: 3px; }
.site-footer p a:hover { color: var(--teal); }
.footer-note { text-align: left; white-space: nowrap; color: #82989d; }
.noscript-note { margin: 25px; padding: 16px; border: 1px solid #dfac66; color: #f4d8ac; }

.element-cell[data-kind="alkali"] { --kind-color: #f2a96f; }
.element-cell[data-kind="alkaline"] { --kind-color: #e9c66e; }
.element-cell[data-kind="transition"] { --kind-color: #ef8f8c; }
.element-cell[data-kind="post-transition"] { --kind-color: #b5a7ef; }
.element-cell[data-kind="metalloid"] { --kind-color: #63c8ac; }
.element-cell[data-kind="nonmetal"] { --kind-color: #74bbec; }
.element-cell[data-kind="halogen"] { --kind-color: #b2d77f; }
.element-cell[data-kind="noble"] { --kind-color: #78d3d1; }
.element-cell[data-kind="lanthanoid"] { --kind-color: #f0be68; }
.element-cell[data-kind="actinoid"] { --kind-color: #ef8a8e; }
.element-cell[data-kind="unknown"] { --kind-color: #b2bcc2; }
.category-pill[data-kind="alkali"] { --category-color: #f2a96f; }.category-pill[data-kind="alkaline"] { --category-color: #e9c66e; }
.category-pill[data-kind="transition"] { --category-color: #ef8f8c; }.category-pill[data-kind="post-transition"] { --category-color: #b5a7ef; }
.category-pill[data-kind="metalloid"] { --category-color: #63c8ac; }.category-pill[data-kind="nonmetal"] { --category-color: #74bbec; }
.category-pill[data-kind="halogen"] { --category-color: #b2d77f; }.category-pill[data-kind="noble"] { --category-color: #78d3d1; }
.category-pill[data-kind="lanthanoid"] { --category-color: #f0be68; }.category-pill[data-kind="actinoid"] { --category-color: #ef8a8e; }
.category-pill[data-kind="unknown"] { --category-color: #b2bcc2; }
.legend-filter[data-kind="alkali"] { --kind-color: #f2a96f; }.legend-filter[data-kind="alkaline"] { --kind-color: #e9c66e; }
.legend-filter[data-kind="transition"] { --kind-color: #ef8f8c; }.legend-filter[data-kind="post-transition"] { --kind-color: #b5a7ef; }
.legend-filter[data-kind="metalloid"] { --kind-color: #63c8ac; }.legend-filter[data-kind="nonmetal"] { --kind-color: #74bbec; }
.legend-filter[data-kind="halogen"] { --kind-color: #b2d77f; }.legend-filter[data-kind="noble"] { --kind-color: #78d3d1; }
.legend-filter[data-kind="lanthanoid"] { --kind-color: #f0be68; }.legend-filter[data-kind="actinoid"] { --kind-color: #ef8a8e; }
.legend-filter[data-kind="unknown"] { --kind-color: #b2bcc2; }

@media (max-width: 1180px) {
  .site-shell { padding-inline: 26px; }
  .workspace { grid-template-columns: minmax(300px, 340px) minmax(0, 1fr); gap: 20px; }
  .detail-panel { padding: 16px; }
  .hero-orbit { margin-inline-end: 1vw; }
  .hero { min-height: 315px; }
}
@media (max-width: 920px) {
  .workspace { display: flex; flex-direction: column-reverse; gap: 24px; }
  .table-section, .detail-panel { width: 100%; }
  .detail-panel { position: static; }
  .return-table { display: inline-flex; align-items: center; gap: 8px; margin-top: 15px; color: var(--teal); text-decoration: none; font-size: 11px; }
  .return-table span { font-size: 14px; }
  .hero-orbit { flex-basis: 270px; transform: scale(.82); transform-origin: center; margin-inline-end: -22px; }
  .hero-copy { max-width: 540px; }
}
@media (max-width: 640px) {
  .site-shell { padding-inline: 17px; }
  .topbar { min-height: 65px; }
  .topbar-meta { gap: 7px; font-size: 10px; }
  .topbar-meta > span:last-child { display: none; }
  .hero { min-height: 310px; padding-block: 40px 30px; }
  .hero h1 { font-size: clamp(40px, 11vw, 57px); }
  .hero-lead { max-width: 340px; font-size: 13px; line-height: 1.9; }
  .hero-facts { flex-wrap: wrap; gap: 8px; font-size: 9px; }
  .hero-facts b { font-size: 11px; }
  .hero-orbit { position: absolute; opacity: .17; left: -125px; bottom: -85px; transform: scale(.8); pointer-events: none; }
  .hero-copy { z-index: 2; }
  .search-section { margin-block: 23px 17px; }
  .search-box { height: 50px; padding-inline: 12px; gap: 9px; }
  .search-box input { font-size: 12px; }
  .search-key { display: none; }
  .workspace { padding-top: 0; gap: 20px; }
  .table-heading h2 { font-size: 21px; }
  .table-instruction { justify-content: space-between; font-size: 9px; }
  .instruction-desktop { display: none; }.instruction-mobile { display: inline; }
  .scroll-cue { display: inline; }
  .category-legend { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin-inline: -2px; }
  .category-legend::-webkit-scrollbar { display: none; }
  .legend-filter { font-size: 9px; }
  .periodic-scroll { padding: 10px 8px 12px; }
  .detail-panel { padding: 16px; }
  .extra-grid { gap: 5px; padding-inline: 8px; }
  .extra-fact { min-height: 77px; padding: 10px 8px 8px; }
  .extra-fact strong { font-size: 10px; }
  .discovery-card { margin-inline: 8px; }
  .detail-symbol-wrap { width: 67px; height: 67px; }
  .detail-symbol { font-size: 31px; }
  .identity-copy h2 { font-size: 20px; }
  .atom-diagram { height: 195px; }
  .site-footer { grid-template-columns: 1fr auto; gap: 7px 16px; margin-top: 30px; }
  .site-footer p { grid-column: 1 / -1; grid-row: 2; }
  .footer-note { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
