/* ═══════════════════════════════════════════════════════════════════════
   Project Helix — Design System matching thehsiddarth.com
   Typography: DM Sans, DM Mono, Instrument Serif
   Palette: Dark organic charcoal (#111311) + Acid lime (#b8f36a)
            Light warm paper (#f3f2ec) + Forest olive (#386b13)
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #111311;
  --surface: #171a17;
  --surface-2: #1d211d;
  --text: #f2f1eb;
  --muted: #a8aca2;
  --line: #343a34;
  --border: #343a34;
  --accent: #b8f36a;
  --accent-2: #d8ff9c;
  --warm: #f0e5c8;
  --max: 1180px;
  --radius: 18px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --mono: "DM Mono", monospace;
  --sans: "DM Sans", sans-serif;
  --serif: "Instrument Serif", serif;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.35);
}

html[data-theme="light"] {
  --bg: #f3f2ec;
  --surface: #ffffff;
  --surface-2: #e9e9e2;
  --text: #151713;
  --muted: #656a61;
  --line: #d5d7cd;
  --border: #d5d7cd;
  --accent: #386b13;
  --accent-2: #274e0e;
  --warm: #292c27;
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body, button, input, select, textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
  cursor: pointer;
  background: none;
  border: none;
}

::selection {
  background: var(--accent);
  color: #10120f;
}

/* ── Accessibility Skip Link ── */
.skip-link {
  position: fixed;
  left: 12px;
  top: -100px;
  z-index: 1000;
  padding: 10px 14px;
  background: var(--accent);
  color: #111;
  font: 500 12px var(--mono);
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ── Grain Texture Overlay ── */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.055;
  z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

/* ── Interactive Particle Background Canvas ── */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

/* ── Scrollbars ── */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* ═══════════════════════════════════════════════════════════════════════
   SITE HEADER / NAVIGATION
   ═══════════════════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  margin: auto;
  padding: 18px 24px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  transition: background var(--transition), border-color var(--transition);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-logo {
  height: 34px;
  width: auto;
  max-width: 46px;
  object-fit: contain;
  display: block;
  transition: transform var(--transition), filter var(--transition);
}
.brand:hover .brand-logo {
  transform: scale(1.08);
}
html[data-theme="dark"] .brand-logo {
  filter: brightness(1.7) saturate(1.3);
}
.footer-logo {
  height: 28px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font: 500 11px var(--mono);
  color: var(--accent);
  background: var(--surface);
}

.desktop-nav {
  display: flex;
  gap: 22px;
  font: 400 12px var(--mono);
  text-transform: lowercase;
}
.desktop-nav a, .terminal-link {
  color: var(--muted);
  transition: color var(--transition);
}
.desktop-nav a:hover, .terminal-link:hover {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.terminal-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 400 12px var(--mono);
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.terminal-link span {
  color: var(--accent);
}
.icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 50%;
  cursor: pointer;
  color: var(--text);
  font-size: 14px;
  transition: border-color var(--transition), transform var(--transition);
}
.icon-button:hover {
  border-color: var(--accent);
  transform: scale(1.05);
}
.menu-toggle {
  display: none;
}

.mobile-menu {
  position: fixed;
  top: 67px;
  left: 12px;
  right: 12px;
  z-index: 49;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}
.mobile-menu a {
  display: block;
  padding: 12px;
  border-radius: 9px;
  font: 500 13px var(--mono);
  color: var(--text);
}
.mobile-menu a:hover {
  background: var(--surface-2);
}

/* ═══════════════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════════════ */
.section {
  max-width: var(--max);
  margin: auto;
  padding: 100px 24px;
  position: relative;
  z-index: 1;
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 310px;
  align-content: center;
  gap: 70px;
  position: relative;
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.kicker, .eyebrow, .index, .project-meta, .now-list span, .uses-grid span, .notes-grid > article > span {
  font: 500 11px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  margin: 0 0 24px;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 12%, transparent);
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  font-size: clamp(52px, 8.5vw, 110px);
  line-height: 0.9;
  letter-spacing: -0.065em;
  max-width: 900px;
  margin-bottom: 26px;
  font-weight: 700;
}
h1 em {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.04em;
  color: var(--accent);
}

.hero-intro {
  font-size: clamp(17px, 2vw, 20px);
  max-width: 620px;
  color: var(--muted);
  line-height: 1.48;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 34px;
}
.button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  transition: transform var(--transition), opacity var(--transition);
}
.button:hover {
  transform: translateY(-2px);
}
.button-primary {
  background: var(--accent);
  color: #11150e;
}
.text-link {
  font: 500 12px var(--mono);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition);
}
.text-link:hover {
  color: var(--text);
}

.hero-note {
  align-self: end;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 20px;
  transform: rotate(1.2deg);
  box-shadow: 10px 12px 0 var(--surface-2);
  transition: transform var(--transition);
}
.hero-note:hover {
  transform: rotate(0deg);
}
.note-top {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font: 500 10px var(--mono);
  text-transform: uppercase;
}
.hero-note p {
  font-size: 14px;
  margin: 14px 0 0;
  line-height: 1.45;
}
.note-rule {
  border-top: 1px dashed var(--line);
  margin-top: 18px;
}
.muted {
  color: var(--muted);
}

.hero-grid {
  position: absolute;
  inset: 10% 0 auto;
  height: 80%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  opacity: 0.11;
  pointer-events: none;
}
.hero-grid::before {
  content: "";
  position: absolute;
  left: 20%;
  top: 0;
  bottom: 0;
  border-left: 1px solid var(--line);
  box-shadow: 25vw 0 0 -1px var(--line), 50vw 0 0 -1px var(--line), 75vw 0 0 -1px var(--line);
}
.hero-grid span {
  align-self: end;
  font: 10px var(--mono);
  color: var(--muted);
  padding-left: 6px;
}

/* ═══════════════════════════════════════════════════════════════════════
   TICKER
   ═══════════════════════════════════════════════════════════════════════ */
.ticker {
  border-block: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  gap: 24px;
  white-space: nowrap;
  padding: 12px 0;
  color: var(--muted);
  font: 500 11px var(--mono);
  letter-spacing: 0.12em;
  justify-content: center;
  background: color-mix(in srgb, var(--surface) 35%, transparent);
}
.ticker div {
  display: inline-block;
}

/* ═══════════════════════════════════════════════════════════════════════
   SECTION HEADINGS
   ═══════════════════════════════════════════════════════════════════════ */
.content-section {
  padding-top: 90px;
  padding-bottom: 90px;
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: end;
  margin-bottom: 45px;
}
.section-heading > div {
  align-self: start;
  display: flex;
  gap: 14px;
  align-items: center;
}
.section-heading .index {
  color: var(--accent);
}
.section-heading h2 {
  grid-column: 1 / -1;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.92;
  letter-spacing: -0.06em;
  margin: 0;
  font-weight: 700;
}
.section-heading p {
  grid-column: 2;
  grid-row: 2;
  color: var(--muted);
  max-width: 440px;
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}
.section-heading.compact {
  grid-template-columns: 1fr auto;
}
.section-heading.compact h2 {
  grid-column: 1;
}
.section-heading.compact > div {
  grid-column: 1 / -1;
}

/* ═══════════════════════════════════════════════════════════════════════
   PREDICTOR / SEARCH BOX
   ═══════════════════════════════════════════════════════════════════════ */
.search-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 720px;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 8px 6px 20px;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-card);
}
.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent);
}
.search-icon {
  font-size: 20px;
  color: var(--accent);
  margin-right: 14px;
}
.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font: 500 16px var(--mono);
  min-width: 0;
}
.search-input::placeholder {
  color: var(--muted);
  font-size: 14px;
}
.search-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #11150e;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  font-family: var(--sans);
  transition: transform var(--transition), filter var(--transition);
}
.search-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.search-hints {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.hint-chip {
  padding: 6px 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  font: 400 11px var(--mono);
  color: var(--muted);
  transition: all var(--transition);
}
.hint-chip:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--surface-2);
}
.hint-chip-special {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--accent);
}

.search-error {
  color: #ff6b6b;
  font: 400 12px var(--mono);
  min-height: 18px;
}

/* ── Loading Overlay ── */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.loading-overlay.hidden,
.loading-overlay[hidden],
#loading-overlay.hidden,
#loading-overlay[hidden] {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  display: none !important;
}
.spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.loading-text {
  font: 400 12px var(--mono);
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════════════════
   RESULTS SECTION
   ═══════════════════════════════════════════════════════════════════════ */
.results-section {
  display: flex;
  flex-direction: column;
  gap: 80px;
  max-width: var(--max);
  margin: auto;
  padding: 20px 24px 100px;
}

/* Hypothetical banner */
.hypothetical-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 24px;
  background: var(--surface-2);
  border: 1px dashed var(--accent);
  border-radius: var(--radius-md);
  font-size: 14px;
}
.hypo-icon {
  font-size: 22px;
}
.hypo-text {
  flex: 1;
}
.hypo-text strong {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.hypo-confidence {
  font: 500 11px var(--mono);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--accent);
}

/* Element Hero Card */
.element-hero-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: 12px 14px 0 var(--surface-2);
}
.element-hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}
.element-identity {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}
.element-symbol-badge {
  width: 140px;
  height: 140px;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
  flex-shrink: 0;
  transition: transform var(--transition);
}
.element-symbol-badge:hover {
  transform: translateY(-2px);
}
.el-number {
  font: 500 13px var(--mono);
  color: var(--accent);
}
.el-symbol {
  font-size: 46px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}
.el-mass {
  font: 400 11px var(--mono);
  color: var(--muted);
}

.element-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.el-name {
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  margin: 0;
}
.el-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.el-tag {
  font: 400 11px var(--mono);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--bg);
}
.el-tag-category {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
.el-tag-ml {
  color: var(--accent);
  border-color: var(--accent);
}
.el-summary {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  max-width: 650px;
  margin: 4px 0 0;
}
.el-discovery {
  font: 400 12px var(--mono);
  color: var(--muted);
  margin-top: 4px;
}

.element-image-panel {
  max-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.el-photo {
  width: 180px;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.el-photo-caption {
  font: 400 10px var(--mono);
  color: var(--muted);
  line-height: 1.3;
}

/* ═══════════════════════════════════════════════════════════════════════
   PHYSICAL PROPERTIES GRID
   ═══════════════════════════════════════════════════════════════════════ */
.prop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}
.prop-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform var(--transition), border-color var(--transition);
}
.prop-card:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  transform: translateY(-2px);
}
.prop-label {
  font: 500 11px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.prop-ml-badge {
  font-size: 9px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--accent);
}
.prop-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-top: 4px;
}
.prop-unit {
  font: 400 11px var(--mono);
  color: var(--muted);
}
.prop-missing {
  font: 400 13px var(--mono);
  color: var(--muted);
  margin-top: 6px;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════════
   ELECTRON CONFIGURATION
   ═══════════════════════════════════════════════════════════════════════ */
.electron-section {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 30px;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 30px;
}
.ec-text-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.ec-notation {
  font: 500 20px var(--mono);
  color: var(--text);
  padding: 16px 20px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  word-break: break-all;
}
.ec-shells-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ec-shell-chip {
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: var(--radius-sm);
  font: 400 12px var(--mono);
  color: var(--muted);
}
.ec-shell-chip strong {
  color: var(--accent);
  margin-left: 4px;
}

.bohr-panel {
  display: grid;
  place-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px;
}
.bohr-canvas {
  width: 320px;
  height: 320px;
  display: block;
}

/* ═══════════════════════════════════════════════════════════════════════
   ML PROPERTY PREDICTIONS SECTION
   ═══════════════════════════════════════════════════════════════════════ */
.model-metrics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.metric-chip {
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 400 11px var(--mono);
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.metric-label {
  color: var(--muted);
  text-transform: uppercase;
}
.metric-good {
  color: var(--accent);
}
.metric-ok {
  color: #fb923c;
}
.metric-bad {
  color: #ff6b6b;
}

.prediction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.pred-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform var(--transition);
}
.pred-card:hover {
  transform: translateY(-2px);
}
.pred-label {
  font: 500 11px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.pred-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.pred-actual {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.pred-estimated {
  font: 500 15px var(--mono);
  color: var(--accent);
}
.pred-bar-wrap {
  width: 100%;
  height: 4px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.pred-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.6s ease;
}
.pred-match {
  font: 400 11px var(--mono);
  color: var(--muted);
}
.pred-match.good {
  color: var(--accent);
}
.pred-confidence {
  font: 400 10px var(--mono);
  color: var(--muted);
  border-top: 1px dashed var(--line);
  padding-top: 10px;
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════
   PERIODIC POSITION / MINI MAP
   ═══════════════════════════════════════════════════════════════════════ */
.periodic-wrapper {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 30px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 26px;
}
.mini-table {
  overflow-x: auto;
}
.pt-grid {
  display: grid;
  grid-template-columns: repeat(18, minmax(22px, 1fr));
  gap: 4px;
  min-width: 500px;
}
.pt-cell {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font: 500 10px var(--mono);
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition);
}
.pt-cell.empty {
  visibility: hidden;
  pointer-events: none;
}
.pt-cell:hover {
  transform: scale(1.2);
  z-index: 5;
  border-color: var(--text) !important;
}
.pt-cell.active {
  box-shadow: 0 0 0 2px var(--accent);
  font-weight: 700;
  transform: scale(1.15);
  z-index: 4;
}

.position-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pos-stat-card {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pos-stat-label {
  font: 500 10px var(--mono);
  text-transform: uppercase;
  color: var(--muted);
}
.pos-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.pos-stat-sub {
  font: 400 11px var(--mono);
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════════════════
   PROPERTY TRENDS SECTION
   ═══════════════════════════════════════════════════════════════════════ */
.trends-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.trends-label {
  font: 500 11px var(--mono);
  text-transform: uppercase;
  color: var(--muted);
}
.trends-select {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  color: var(--text);
  font: 400 12px var(--mono);
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
}
.trends-select:focus {
  border-color: var(--accent);
}
.chart-container {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
}
#trends-chart {
  width: 100%;
  height: 320px;
  display: block;
}

/* ═══════════════════════════════════════════════════════════════════════
   DATA QUALITY DASHBOARD
   ═══════════════════════════════════════════════════════════════════════ */
.quality-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.quality-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.quality-card-title {
  font: 600 13px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.quality-metric-big {
  font-size: 46px;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}
.quality-metric-big.pass {
  color: var(--accent);
}
.quality-detail {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.quality-bar-row {
  display: grid;
  grid-template-columns: 100px 1fr 40px;
  align-items: center;
  gap: 10px;
  font: 400 11px var(--mono);
  color: var(--muted);
}
.quality-bar-track {
  height: 5px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.quality-bar-fill {
  height: 100%;
  border-radius: 999px;
}
.fill-good { background: var(--accent); }
.fill-warn { background: #fb923c; }
.fill-bad  { background: #ff6b6b; }
.quality-bar-value {
  text-align: right;
  color: var(--text);
}
.quality-check-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}
.quality-check-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}
.check-icon {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════════════
   NAVIGATION ARROWS
   ═══════════════════════════════════════════════════════════════════════ */
.nav-arrows {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 30px;
  gap: 20px;
}
.arrow-btn {
  padding: 10px 22px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  font: 500 12px var(--mono);
  color: var(--text);
  transition: all var(--transition);
}
.arrow-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.arrow-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.nav-arrow-label {
  font: 500 12px var(--mono);
  color: var(--muted);
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════
   DEVOTIONAL SECTION (MATCHING thehsiddarth.com EXACTLY)
   ═══════════════════════════════════════════════════════════════════════ */
.devotional {
  text-align: center;
  padding: 48px 20px 35px;
  border-top: 1px solid var(--border);
}

.devotional-label {
  display: block;
  font: 500 10px var(--mono);
  letter-spacing: 3px;
  opacity: 0.5;
  margin-bottom: 22px;
  text-transform: uppercase;
}

.devotional h2 {
  font-family: var(--serif), serif;
  font-size: 26px;
  font-weight: 500;
  margin-bottom: 20px;
  color: var(--accent);
}

.devotional p {
  font-family: var(--serif), serif;
  font-size: 16px;
  line-height: 2.2;
  opacity: 0.85;
  max-width: 650px;
  margin: auto;
  white-space: pre-line;
}

@media (max-width: 600px) {
  .devotional {
    padding: 38px 16px 28px;
  }
  .devotional p {
    font-size: 14px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   SITE FOOTER (MATCHING thehsiddarth.com)
   ═══════════════════════════════════════════════════════════════════════ */
.site-footer {
  max-width: var(--max);
  margin: auto;
  padding: 40px 24px 45px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  color: var(--muted);
  font: 400 11px var(--mono);
  border-top: 1px solid var(--line);
}

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
  font-size: 13px;
}
.footer-badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  font: 500 10px var(--mono);
  color: var(--accent);
}
.footer-desc {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  max-width: 650px;
}
.footer-desc a {
  color: var(--text);
  border-bottom: 1px solid var(--line);
  transition: border-color var(--transition);
}
.footer-desc a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.footer-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid color-mix(in srgb, var(--line) 40%, transparent);
  padding-top: 22px;
  font: 400 11px var(--mono);
  color: var(--muted);
}
.footer-bottom-row a:hover {
  color: var(--text);
}

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN (MATCHING thehsiddarth.com BREAKPOINTS)
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .desktop-nav { display: none; }
  .menu-toggle { display: grid; }
  .terminal-link { display: none; }
  .hero {
    grid-template-columns: 1fr;
    gap: 45px;
    padding-top: 90px;
    min-height: auto;
  }
  .hero-note {
    max-width: 330px;
    justify-self: end;
  }
  .section-heading {
    grid-template-columns: 1fr;
  }
  .section-heading p {
    grid-column: 1;
    grid-row: auto;
  }
  .element-hero-inner {
    grid-template-columns: 1fr;
  }
  .element-image-panel {
    display: none;
  }
  .electron-section {
    grid-template-columns: 1fr;
  }
  .bohr-canvas {
    margin: 0 auto;
  }
  .periodic-wrapper {
    grid-template-columns: 1fr;
  }
  .position-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
  .quality-dashboard {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .site-header { padding: 14px 16px; }
  .section { padding: 80px 16px; }
  .results-section { padding-inline: 16px; }
  h1 { font-size: clamp(48px, 14vw, 72px); }
  .hero { min-height: auto; padding-top: 60px; }
  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }
  .hero-grid { display: none; }
  .section-heading { margin-bottom: 30px; }
  .section-heading h2 { font-size: 42px; }
  .element-identity { flex-direction: column; }
  .element-symbol-badge {
    width: 100%;
    height: auto;
    flex-direction: row;
    padding: 12px 16px;
    gap: 12px;
  }
  .el-symbol { font-size: 32px; }
  .el-name { font-size: 28px; }
  .prop-grid { grid-template-columns: 1fr 1fr; }
  .prediction-grid { grid-template-columns: 1fr; }
  .footer-bottom-row { flex-direction: column; gap: 12px; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
