/* ── iOS 26 / macOS 26 "Liquid Glass" Design System ── */
:root {
  --sys-blue:    #007AFF;
  --sys-green:   #34C759;
  --sys-orange:  #FF9500;
  --sys-red:     #FF3B30;
  --sys-indigo:  #5856D6;
  --sys-purple:  #AF52DE;
  --sys-teal:    #5AC8FA;
  --label:               rgba(0,0,0,0.88);
  --secondary-label:     rgba(60,60,67,0.6);
  --tertiary-label:      rgba(60,60,67,0.3);
  --separator:           rgba(60,60,67,0.12);
  --fill-3:              rgba(120,120,128,0.12);
  --fill-4:              rgba(116,116,128,0.08);
  --glass-bg:            rgba(255,255,255,0.78);
  --glass-border:        rgba(255,255,255,0.9);
  --glass-blur:          blur(40px) saturate(180%);
  --shadow-sm:           0 2px 8px rgba(0,0,0,0.07), 0 0px 2px rgba(0,0,0,0.05);
  --shadow-md:           0 4px 20px rgba(0,0,0,0.09), 0 1px 4px rgba(0,0,0,0.06);
  --shadow-lg:           0 8px 40px rgba(0,0,0,0.11), 0 2px 8px rgba(0,0,0,0.07);
  --radius-card:         18px;
  --radius-module:       28px;
  --radius-pill:         9999px;
  --hc-header-height:    88px;
  --hc-subheader-height: 58px;
  --hc-footer-height:    56px;
}

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  background-color: #F2F2F7;
  color: var(--label);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  min-height: 100vh;
}

main {
  padding-top: calc(var(--hc-header-height) + var(--hc-subheader-height) + 0.75rem) !important;
  padding-bottom: calc(var(--hc-footer-height) + 1.5rem) !important;
}

/* ── Mesh gradient background orbs ── */
.mesh-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.mesh-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
}
.mesh-orb-1 { width: 600px; height: 600px; background: radial-gradient(circle, rgba(88,86,214,0.35) 0%, transparent 70%); top: -100px; left: -100px; animation: orbFloat 18s ease-in-out infinite; }
.mesh-orb-2 { width: 500px; height: 500px; background: radial-gradient(circle, rgba(0,122,255,0.3) 0%, transparent 70%); top: 20%; right: -80px; animation: orbFloat 22s ease-in-out infinite reverse; }
.mesh-orb-3 { width: 450px; height: 450px; background: radial-gradient(circle, rgba(52,199,89,0.25) 0%, transparent 70%); top: 55%; left: 15%; animation: orbFloat 26s ease-in-out infinite 4s; }
.mesh-orb-4 { width: 400px; height: 400px; background: radial-gradient(circle, rgba(255,149,0,0.22) 0%, transparent 70%); bottom: 5%; right: 10%; animation: orbFloat 20s ease-in-out infinite 2s; }
.mesh-orb-5 { width: 350px; height: 350px; background: radial-gradient(circle, rgba(175,82,222,0.2) 0%, transparent 70%); top: 40%; left: 55%; animation: orbFloat 24s ease-in-out infinite 6s; }

@keyframes orbFloat {
  0%,100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(30px, -40px) scale(1.05); }
  66%      { transform: translate(-20px, 30px) scale(0.97); }
}

/* ── Glass card ── */
.card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
}

/* ── Module shell (outer container for each section) ── */
.module-shell {
  display: none;
  border-radius: var(--radius-module);
  padding: 1.1rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.7);
}
.module-shell.is-active {
  display: block;
}
.module-shell-teaching {
  background: linear-gradient(160deg, rgba(88,86,214,0.07) 0%, rgba(255,255,255,0.65) 100%);
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
}
.module-shell-sim {
  background: linear-gradient(160deg, rgba(0,122,255,0.07) 0%, rgba(255,255,255,0.65) 100%);
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
}

/* ── App header ── */
.app-header {
  padding-top: env(safe-area-inset-top, 0px);
}

.hc-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--hc-header-height);
  z-index: 1001;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--separator);
  box-shadow: 0 1px 8px rgba(60,64,67,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.25rem;
  box-sizing: border-box;
  overflow: hidden;
}

.hc-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
  max-width: 100%;
  overflow: hidden;
}

.hc-logo-image {
  height: 44px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.hc-header-text {
  min-width: 0;
  min-height: 100%;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hc-title-line {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  flex-wrap: wrap;
  min-width: 0;
}

.hc-header h1 {
  font-family: 'Google Sans', 'Roboto', sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--label);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hc-tagline {
  font-size: 0.83rem;
  color: var(--secondary-label);
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hc-header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  min-width: 0;
}

.hc-suite-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.85rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #F5F9FF 0%, #E8F0FE 100%);
  border: 1px solid #C5D9FB;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  text-decoration: none !important;
  transition: transform 110ms ease, box-shadow 130ms ease, background 130ms ease;
}

.hc-suite-pill:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, #EEF5FF 0%, #DCEBFF 100%);
}

.hc-suite-pill:visited {
  color: inherit;
}

.hc-suite-label {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #4285F4;
  white-space: nowrap;
  text-transform: uppercase;
}

.hc-subheader {
  position: fixed;
  top: calc(var(--hc-header-height) + env(safe-area-inset-top, 0px));
  left: 0;
  right: 0;
  height: var(--hc-subheader-height);
  z-index: 1000;
  background: rgba(242,242,247,0.82);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border-bottom: 1px solid rgba(60,60,67,0.12);
  box-shadow: 0 1px 0 rgba(60,60,67,0.1), 0 2px 12px rgba(0,0,0,0.06);
}

.hc-subheader-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.25rem;
}

/* ── Segmented control (iOS style) ── */
.segmented-control {
  display: inline-flex;
  align-items: center;
  background: rgba(120,120,128,0.16);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 0;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.12), inset 0 0 0 1px rgba(0,0,0,0.06);
}
.seg-btn {
  position: relative;
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--secondary-label);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
  white-space: nowrap;
  min-height: 36px;
  outline: none;
  font-family: inherit;
  text-decoration: none;
}
.seg-btn.active {
  background: rgba(255,255,255,0.92);
  color: var(--label);
  box-shadow: 0 2px 8px rgba(0,0,0,0.14), 0 1px 3px rgba(0,0,0,0.1), inset 0 0 0 0.5px rgba(255,255,255,0.8);
  font-weight: 700;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.18s ease;
  text-decoration: none;
  min-height: 36px;
  font-family: inherit;
  white-space: nowrap;
}
.btn-filled {
  background: var(--sys-indigo);
  color: white;
  box-shadow: 0 3px 12px rgba(88,86,214,0.32);
}
.btn-filled:hover { transform: translateY(-1px); box-shadow: 0 5px 18px rgba(88,86,214,0.4); }
.btn-blue {
  background: var(--sys-blue);
  color: white;
  box-shadow: 0 3px 12px rgba(0,122,255,0.28);
}
.btn-blue:hover { transform: translateY(-1px); box-shadow: 0 5px 18px rgba(0,122,255,0.36); }
.btn-glass {
  background: rgba(255,255,255,0.78);
  color: var(--label);
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.btn-glass:hover { transform: translateY(-1px); background: rgba(255,255,255,0.92); box-shadow: var(--shadow-md); }
.btn-ghost {
  background: rgba(88,86,214,0.1);
  color: var(--sys-indigo);
  border: 1px solid rgba(88,86,214,0.2);
}
.btn-ghost:hover { transform: translateY(-1px); background: rgba(88,86,214,0.16); }
.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
  min-height: 30px;
}
.btn-scale-active {
  background: var(--sys-indigo) !important;
  color: white !important;
  box-shadow: 0 2px 8px rgba(88,86,214,0.3) !important;
}

/* ── Section band ── */
.section-band {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 14px;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* ── Chip/badge ── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.chip-indigo {
  background: rgba(88,86,214,0.1);
  border: 1px solid rgba(88,86,214,0.2);
  color: #3634A3;
}
.chip-blue {
  background: rgba(0,122,255,0.1);
  border: 1px solid rgba(0,122,255,0.2);
  color: #0062CC;
}

/* ── Inline note ── */
.inline-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 1rem;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: rgba(88,86,214,0.08);
  border: 1px solid rgba(88,86,214,0.18);
  color: #3634A3;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

/* ── Section title / copy ── */
.section-title {
  font-size: 1.65rem;
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--label);
}
.section-copy {
  color: var(--secondary-label);
  line-height: 1.7;
  font-size: 0.97rem;
}
.subtle {
  color: var(--secondary-label);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ── Interval selector ── */
.interval-selector {
  padding: 1.25rem 1.35rem;
}
.interval-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--label);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.interval-desc {
  font-size: 13px;
  color: var(--secondary-label);
  margin-top: 4px;
  line-height: 1.5;
}

/* Timeline */
.timeline-wrap {
  position: relative;
  padding: 8px 16px 4px;
  margin: 16px 0 8px;
}
.timeline-track-bg {
  position: absolute;
  top: 50%;
  left: 16px;
  right: 16px;
  height: 4px;
  background: rgba(120,120,128,0.14);
  border-radius: 2px;
  transform: translateY(-50%);
  margin-top: 4px;
}
.timeline-track-range {
  position: absolute;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--sys-indigo) 0%, #3634A3 100%);
  border-radius: 2px;
  transition: left 0.3s cubic-bezier(0.34,1.56,0.64,1), width 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.timeline-node-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1;
}
.timeline-label-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 8px;
  padding: 0 6px;
}
.timeline-label-row span {
  width: 32px;
  text-align: center;
}

/* Interval button rows */
.interval-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.interval-row-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--secondary-label);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  min-width: 44px;
}

/* ── Metrics row ── */
.metric-pill {
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.04), 0 1px 4px rgba(0,0,0,0.05);
}
.metric-pill .label {
  color: var(--secondary-label);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 3px;
}
.metric-pill .value {
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

/* keep .metric-compact for backward compat with JS */
.metric-compact {
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.04), 0 1px 4px rgba(0,0,0,0.05);
}
.metric-compact .label {
  color: var(--secondary-label);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 3px;
}
.metric-compact .value {
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

/* ── Formula card ── */
.formula-card {
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.85);
  border-radius: var(--radius-card);
  padding: 1.1rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
}
.formula-title {
  font-weight: 900;
  font-size: 1rem;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.formula-sub {
  font-size: 0.91rem;
  color: var(--secondary-label);
  line-height: 1.65;
}

/* ── Equation block ── */
.equation {
  margin-top: 0.8rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(242,242,247,0.7);
  border: 1px solid rgba(60,60,67,0.1);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Step card ── */
.step {
  background: rgba(255,255,255,0.62);
  border: 1px solid rgba(255,255,255,0.85);
  border-radius: var(--radius-card);
  padding: 1.1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

/* ── Control card (sliders) ── */
.control-card {
  background: rgba(255,255,255,0.68);
  border: 1px solid rgba(255,255,255,0.88);
  border-radius: var(--radius-card);
  padding: 1rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
}

/* ── Plot box ── */
.plot-box {
  width: 100%;
  height: 380px;
  overflow: hidden;
}

/* ── Table ── */
.table-wrap {
  overflow: auto;
  border: 1px solid var(--separator);
  border-radius: 14px;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
table {
  width: 100%;
  min-width: 1320px;
  border-collapse: collapse;
  background: rgba(255,255,255,0.9);
}
th, td {
  border-bottom: 1px solid rgba(60,60,67,0.08);
  padding: 0.78rem 0.82rem;
  text-align: right;
  white-space: nowrap;
  font-size: 0.86rem;
}
th:first-child, td:first-child { text-align: left; }
th {
  background: rgba(88,86,214,0.07);
  color: #3634A3;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 1;
}
tr:nth-child(even) td { background: rgba(242,242,247,0.5); }

/* ── Warn toggle ── */
.warn-toggle {
  margin-left: auto;
  position: relative;
}
.warn-toggle summary {
  list-style: none;
  cursor: pointer;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,149,0,0.12);
  color: #C75300;
  border: 1px solid rgba(255,149,0,0.3);
  font-weight: 900;
  font-size: 12px;
  user-select: none;
}
.warn-toggle summary::-webkit-details-marker { display: none; }
.warn-popup {
  position: absolute;
  top: 2rem;
  right: 0;
  width: min(320px, 78vw);
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255,149,0,0.25);
  background: rgba(255,247,237,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #92400e;
  box-shadow: var(--shadow-lg);
  font-size: 0.84rem;
  line-height: 1.55;
  z-index: 20;
}

/* ── Misc ── */
.mono {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}
.small-ref {
  margin-top: 0.7rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--tertiary-label);
}
.slider-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--label);
  margin-bottom: 0.35rem;
}
.slider-help {
  margin-top: 0.28rem;
  font-size: 0.76rem;
  color: var(--secondary-label);
  line-height: 1.42;
}
select, input[type="number"] {
  width: 100%;
  border: 1px solid rgba(60,60,67,0.18);
  border-radius: 12px;
  padding: 0.72rem 0.88rem;
  background: rgba(255,255,255,0.8);
  color: var(--label);
  outline: none;
  min-height: 44px;
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}
select:focus, input[type="number"]:focus {
  border-color: var(--sys-indigo);
  box-shadow: 0 0 0 3px rgba(88,86,214,0.15);
}
input[type="range"] {
  width: 100%;
  accent-color: var(--sys-indigo);
  min-height: 44px;
}
img, svg, canvas { max-width: 100%; height: auto; }

.hc-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--hc-footer-height);
  background: rgba(248, 249, 250, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid #E0E0E0;
  box-shadow: 0 -1px 8px rgba(60,64,67,0.07);
  z-index: 9999;
  box-sizing: border-box;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.hc-footer-inner {
  height: 100%;
  padding: 0 1.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  font-family: 'Roboto', 'Google Sans', sans-serif;
}

.hc-footer-suite {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.hc-footer-name {
  font-size: 0.83rem;
  font-weight: 700;
  color: #4285F4;
  white-space: nowrap;
}

.hc-footer-slogan {
  font-size: 0.67rem;
  color: #5F6368;
  white-space: nowrap;
  font-style: italic;
}

.hc-footer-author {
  font-size: 0.78rem;
  color: #5F6368;
  white-space: nowrap;
  margin-left: auto;
}

.hc-footer-github {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0.44rem 1.05rem;
  border-radius: 999px;
  background: #1e2330;
  color: #FFFFFF !important;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 130ms ease, transform 110ms ease, box-shadow 130ms ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.20);
  flex-shrink: 0;
  font-family: 'Google Sans', 'Roboto', sans-serif;
}

.hc-footer-github:hover {
  background: #2d3348;
  transform: translateY(-1px);
  box-shadow: 0 3px 9px rgba(0,0,0,0.25);
}

.hc-footer-github svg { flex-shrink: 0; }

@media (min-width: 640px) {
  .hc-logo-image { height: 52px; }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .plot-box { height: 320px; }
  :root { --hc-header-height: 80px; }
  .hc-header { padding: 0 1rem; }
  .hc-subheader-inner { padding: 0 1rem; }
  .hc-logo-image { height: 40px; }
  .hc-header h1 { font-size: 0.98rem; }
  .hc-tagline { font-size: 0.76rem; }
  .hc-suite-label { font-size: 0.72rem; white-space: normal; }
}
@media (max-width: 640px) {
  :root {
    --hc-header-height: 94px;
    --hc-subheader-height: 52px;
    --hc-footer-height: 76px;
  }
  main {
    padding-top: calc(var(--hc-header-height) + var(--hc-subheader-height) + 0.5rem) !important;
    padding-bottom: calc(var(--hc-footer-height) + 1rem) !important;
  }
  .hc-header {
    align-items: center;
    padding: 0 0.8rem;
  }
  .hc-subheader-inner {
    padding: 0 0.8rem;
  }
  .hc-logo-image { height: 36px; }
  .hc-title-line {
    align-items: flex-start;
    gap: 0.2rem;
    flex-direction: column;
    flex-wrap: nowrap;
  }
  .hc-header h1 {
    font-size: 0.9rem;
    white-space: normal;
  }
  .hc-tagline {
    font-size: 0.72rem;
    white-space: normal;
  }
  .hc-header-right {
    gap: 0.35rem;
  }
  .hc-footer-inner {
    padding: 0.45rem 0.9rem;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.35rem 1rem;
  }
  .hc-footer-author { margin-left: 0; }
  .hc-footer-github { margin-left: auto; }
  .hc-suite-pill {
    padding: 0.45rem 0.65rem;
  }
  .hc-suite-label {
    font-size: 0.68rem;
  }
  .module-shell { padding: 0.85rem; border-radius: 22px; }
  .interval-selector { padding: 1rem; }
  .section-title { font-size: 1.35rem; }
  .segmented-control { width: 100%; }
  .seg-btn { flex: 1; text-align: center; }
}
