:root {
  --gt-bg: #050509;
  --gt-bg-elevated: #0b0b11;
  --gt-bg-soft: #111119;
  --gt-border-subtle: rgba(148, 163, 184, 0.12);
  --gt-border-strong: rgba(148, 163, 184, 0.28);
  --gt-text: #e5e7eb;
  --gt-text-soft: #9ca3af;
  --gt-text-softer: #6b7280;
  --gt-accent: #8b5cf6;
  --gt-accent-soft: rgba(139, 92, 246, 0.18);
  --gt-accent-strong: #a855f7;
  --gt-danger: #f97373;
  --gt-success: #4ade80;
  --gt-warning: #facc15;
  --gt-info: #38bdf8;
  --gt-radius-lg: 20px;
  --gt-radius-md: 12px;
  --gt-radius-full: 999px;
  --gt-shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.85);
  --gt-shadow-subtle: 0 16px 40px rgba(15, 23, 42, 0.7);
  --gt-transition-fast: 150ms ease-out;
  --gt-transition: 220ms ease-out;
  --gt-font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Inter", sans-serif;
}

html[data-theme="light"] {
  --gt-bg: #f3f4f6;
  --gt-bg-elevated: #ffffff;
  --gt-bg-soft: #f9fafb;
  --gt-border-subtle: rgba(148, 163, 184, 0.3);
  --gt-border-strong: rgba(107, 114, 128, 0.65);
  --gt-text: #111827;
  --gt-text-soft: #4b5563;
  --gt-text-softer: #6b7280;
  --gt-shadow-soft: 0 20px 50px rgba(15, 23, 42, 0.2);
  --gt-shadow-subtle: 0 12px 30px rgba(15, 23, 42, 0.14);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--gt-font-sans);
  background: radial-gradient(circle at 10% -20%, rgba(139, 92, 246, 0.12), transparent 55%),
    radial-gradient(circle at 90% 120%, rgba(8, 47, 73, 0.4), transparent 55%),
    var(--gt-bg);
  color: var(--gt-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#app {
  height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 16px 12px;
  display: flex;
  flex-direction: column;
}

/* Make container fluid on small screens while keeping max width on large */
@media (max-width: 960px) {
  #app {
    max-width: 920px;
    padding: 14px 12px 10px;
  }
}
@media (max-width: 640px) {
  #app {
    max-width: 100%;
    padding: 12px 10px 10px;
    height: auto; /* allow content to grow on small devices */
    min-height: 100vh;
  }
}

/* HEADER */

.gt-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--gt-border-subtle);
  background: linear-gradient(120deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.7));
  backdrop-filter: blur(20px);
  box-shadow: var(--gt-shadow-subtle);
}

html[data-theme="light"] .gt-header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.gt-logo-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.gt-logo-mark {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 14px;
  background: radial-gradient(circle at 0% 0%, #a855f7, #7c3aed);
  border: 1px solid rgba(248, 250, 252, 0.25);
  box-shadow: 0 10px 30px rgba(88, 28, 135, 0.7);
  overflow: hidden;
}

.gt-logo-orb {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #f9fafb, rgba(248, 250, 252, 0.1));
  top: 6px;
  left: 6px;
  opacity: 0.9;
}

.gt-logo-orb--secondary {
  width: 10px;
  height: 10px;
  bottom: 4px;
  right: 4px;
  top: auto;
  left: auto;
  opacity: 0.6;
}

.gt-logo-text {
  display: flex;
  flex-direction: column;
  max-width: 160px;
}

.gt-logo-title {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.gt-logo-subtitle {
  font-size: 0.68rem;
  color: var(--gt-text-softer);
}

/* NAV */

.gt-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

/* hide nav on very small screens; keep visible on tablet+ */
@media (max-width: 640px) {
  .gt-nav {
    display: none;
  }
}

.gt-nav-link {
  border: none;
  background: transparent;
  color: var(--gt-text-soft);
  font-size: 0.72rem;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--gt-transition-fast), background var(--gt-transition-fast),
    transform var(--gt-transition-fast);
}

.gt-nav-link:hover {
  color: var(--gt-text);
  transform: translateY(-0.5px);
}

.gt-nav-link--active {
  background: rgba(15, 23, 42, 0.96);
  color: var(--gt-text);
}

html[data-theme="light"] .gt-nav-link--active {
  background: #111827;
  color: #f9fafb;
}

.gt-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* BUTTONS */

.gt-button {
  border-radius: var(--gt-radius-full);
  border: 1px solid transparent;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 7px 13px;
  background: transparent;
  color: var(--gt-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background var(--gt-transition), border-color var(--gt-transition),
    color var(--gt-transition), box-shadow var(--gt-transition),
    transform var(--gt-transition-fast);
  white-space: nowrap;
}

.gt-button--primary {
  background: radial-gradient(circle at 0 0, #a855f7, #7c3aed);
  border-color: rgba(248, 250, 252, 0.2);
  color: #f9fafb;
  box-shadow: 0 14px 35px rgba(88, 28, 135, 0.65);
}

.gt-button--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(88, 28, 135, 0.85);
}

.gt-button--ghost {
  border-color: var(--gt-border-subtle);
  background: rgba(15, 23, 42, 0.3);
}

html[data-theme="light"] .gt-button--ghost {
  background: rgba(243, 244, 246, 0.9);
}

.gt-button--ghost:hover {
  background: rgba(15, 23, 42, 0.5);
}

html[data-theme="light"] .gt-button--ghost:hover {
  background: #e5e7eb;
}

.gt-button--lg {
  padding: 10px 18px;
  font-size: 0.85rem;
}

.gt-button--sm {
  padding: 6px 10px;
  font-size: 0.7rem;
}

/* Theme icon button */

.gt-icon-button {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--gt-border-subtle);
  background: rgba(15, 23, 42, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background var(--gt-transition-fast), transform var(--gt-transition-fast),
    border-color var(--gt-transition-fast);
}

html[data-theme="light"] .gt-icon-button {
  background: rgba(249, 250, 251, 0.9);
}

.gt-icon-button:hover {
  transform: translateY(-1px);
  border-color: var(--gt-accent);
}

.gt-theme-icon {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, #f9fafb, rgba(248, 250, 252, 0.9)) border-box,
    conic-gradient(from 180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.98)) padding-box,
    transparent;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9);
}

html[data-theme="light"] .gt-theme-icon {
  background:
    radial-gradient(circle at 30% 30%, #020617, rgba(15, 23, 42, 0.9)) border-box,
    conic-gradient(from 180deg, rgba(248, 250, 252, 1), rgba(248, 250, 252, 1)) padding-box,
    transparent;
  box-shadow: 0 0 0 1px rgba(248, 250, 252, 0.9);
}

/* HERO */

.gt-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-top: 12px;
  gap: 10px;
  min-height: 0;
}

.gt-hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  min-height: 0;
}

@media (max-width: 900px) {
  .gt-header {
    border-radius: 18px;
  }

  .gt-nav {
    display: none !important;
  }

  .gt-hero {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: auto;
  }
}

/* Tablet breakpoint: make hero use stacked but keep side panel visible below desktop */
@media (min-width: 641px) and (max-width: 900px) {
  .gt-hero {
    grid-template-columns: 1fr 0.95fr;
    gap: 12px;
  }
  .gt-hero-copy,
  .gt-hero-panel {
    padding: 14px;
  }
}

.gt-hero-copy {
  padding: 18px 18px 16px;
  border-radius: var(--gt-radius-lg);
  border: 1px solid var(--gt-border-subtle);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.88));
  box-shadow: var(--gt-shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

html[data-theme="light"] .gt-hero-copy {
  background: linear-gradient(145deg, #ffffff, #f9fafb);
}

.gt-hero-copy::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 0% 0%, rgba(139, 92, 246, 0.18), transparent 55%);
  opacity: 0.9;
  pointer-events: none;
}

.gt-hero-copy > * {
  position: relative;
  z-index: 1;
}

.gt-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.gt-badge {
  border-radius: 999px;
  font-size: 0.65rem;
  padding: 4px 9px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.gt-badge--accent {
  background: rgba(15, 23, 42, 0.88);
  border-color: rgba(248, 250, 252, 0.08);
  color: #f9fafb;
  box-shadow: 0 10px 25px rgba(88, 28, 135, 0.7);
}

html[data-theme="light"] .gt-badge--accent {
  background: #111827;
  color: #f9fafb;
}

.gt-badge--soft {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(148, 163, 184, 0.4);
  color: var(--gt-text-soft);
}

html[data-theme="light"] .gt-badge--soft {
  background: #f3f4f6;
}

.gt-hero-title {
  font-size: clamp(1.5rem, 3.1vw, 2.45rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0;
}

.gt-hero-gradient {
  background: conic-gradient(from 140deg, #a855f7, #ec4899, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gt-hero-subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: var(--gt-text-soft);
  max-width: 34rem;
}

.gt-hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gt-button-pulse {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #f97316;
  position: relative;
}

.gt-button-pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(249, 115, 22, 0.5);
  animation: gt-pulse 1.4s ease-out infinite;
}

@keyframes gt-pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(2.1);
    opacity: 0;
  }
}

.gt-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.gt-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--gt-text-softer);
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px dashed rgba(148, 163, 184, 0.35);
}

html[data-theme="light"] .gt-meta-item {
  background: #f3f4f6;
}

.gt-meta-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #22c55e, #16a34a);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25);
}

/* HERO PANEL */

.gt-hero-panel {
  padding: 14px 14px 12px;
  border-radius: var(--gt-radius-lg);
  border: 1px solid var(--gt-border-subtle);
  background: radial-gradient(circle at 0 0, rgba(139, 92, 246, 0.22), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(8, 47, 73, 0.45), transparent 60%),
    var(--gt-bg-elevated);
  box-shadow: var(--gt-shadow-soft);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden; /* ensure inner boxes don't render outside the panel frame */
}

html[data-theme="light"] .gt-hero-panel {
  background: #ffffff;
}

.gt-panel-tabs {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  align-self: flex-start;
}

html[data-theme="light"] .gt-panel-tabs {
  background: #f3f4f6;
}

.gt-panel-tab {
  border: none;
  background: transparent;
  color: var(--gt-text-softer);
  font-size: 0.7rem;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--gt-transition-fast), background var(--gt-transition-fast),
    transform var(--gt-transition-fast);
}

.gt-panel-tab--active {
  background: rgba(15, 23, 42, 0.98);
  color: #e5e7eb;
}

html[data-theme="light"] .gt-panel-tab--active {
  background: #111827;
  color: #f9fafb;
}

.gt-panel-tab:hover {
  transform: translateY(-0.5px);
}

.gt-panel-body {
  flex: 1;
  margin-top: 10px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(15, 23, 42, 0.9);
  padding: 10px;
  display: flex;
  min-height: 0;
  /* allow inner content to scroll when it exceeds the panel frame */
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  gap: 10px;
  align-items: stretch;
}

/* Stack panel content on narrow screens so the mini charts and timeline don't overflow */
@media (max-width: 720px) {
  .gt-panel-body {
    flex-direction: column;
    padding: 8px;
  }
  .gt-panel-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .gt-timeline {
    order: 1;
    width: 100%;
  }
  .gt-mini-chart {
    order: 2;
    width: 100%;
    height: 72px;
  }
}

html[data-theme="light"] .gt-panel-body {
  background: #f9fafb;
  border-color: #e5e7eb;
}

.gt-panel-view {
  display: none;
  width: 100%;
  height: 100%;
}

.gt-panel-view--active {
  display: block;
}

/* KPIs */

.gt-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

/* make KPIs flow to single column on small screens */
@media (max-width: 520px) {
  .gt-kpi-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .gt-kpi-card {
    padding: 10px;
  }
}

.gt-kpi-card {
  border-radius: 12px;
  padding: 8px 9px;
  background: radial-gradient(circle at 0 0, rgba(139, 92, 246, 0.26), transparent 70%),
    rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.32);
}

html[data-theme="light"] .gt-kpi-card {
  background: #ffffff;
}

.gt-kpi-label {
  font-size: 0.68rem;
  color: var(--gt-text-softer);
}

.gt-kpi-value {
  margin-top: 2px;
  font-size: 1.05rem;
  font-weight: 600;
}

.gt-kpi-value--pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.5);
  background: rgba(21, 128, 61, 0.12);
  font-size: 0.7rem;
}

.gt-kpi-trend {
  margin-top: 1px;
  font-size: 0.65rem;
}

.gt-kpi-trend--up {
  color: #4ade80;
}

.gt-kpi-trend--neutral {
  color: var(--gt-text-soft);
}

/* Panel footer */

.gt-panel-footer {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
  height: 100%;
}

.gt-timeline {
  flex: 1.4;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gt-timeline-item {
  display: flex;
  gap: 8px;
}

.gt-timeline-badge {
  margin-top: 3px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.gt-timeline-badge--success {
  background: #22c55e;
}

.gt-timeline-badge--info {
  background: #38bdf8;
}

.gt-timeline-badge--warning {
  background: #facc15;
}

.gt-timeline-content {
  border-radius: 10px;
  padding: 5px 7px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.96);
}

html[data-theme="light"] .gt-timeline-content {
  background: #ffffff;
  border-color: #e5e7eb;
}

.gt-timeline-title {
  font-size: 0.7rem;
}

.gt-timeline-meta {
  font-size: 0.63rem;
  color: var(--gt-text-softer);
}

.gt-mini-chart {
  flex: 1;
  border-radius: 10px;
  padding: 6px 7px;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: space-between;
}

.gt-mini-chart-label {
  font-size: 0.65rem;
  color: var(--gt-text-softer);
}

.gt-mini-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 42px;
}

.gt-mini-chart-bar {
  flex: 1;
  border-radius: 999px;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.9));
  position: relative;
  overflow: hidden;
}

.gt-mini-chart-bar::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 100%;
  background: linear-gradient(to top, rgba(139, 92, 246, 0.1), var(--gt-accent));
  animation: gt-bar 1.8s ease-in-out infinite;
  transform-origin: bottom;
}

.gt-mini-chart-bar:nth-child(2)::before {
  animation-delay: 0.2s;
}
.gt-mini-chart-bar:nth-child(3)::before {
  animation-delay: 0.4s;
}
.gt-mini-chart-bar:nth-child(4)::before {
  animation-delay: 0.6s;
}
.gt-mini-chart-bar:nth-child(5)::before {
  animation-delay: 0.8s;
}

@keyframes gt-bar {
  0% {
    transform: scaleY(0.25);
  }
  50% {
    transform: scaleY(0.9);
  }
  100% {
    transform: scaleY(0.3);
  }
}

/* TRAINING VIEW */

.gt-training-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 10px;
  height: 100%;
}

/* For tablets, make columns more balanced and reduce height pressure */
@media (min-width: 641px) and (max-width: 900px) {
  .gt-training-layout {
    grid-template-columns: 1fr 0.9fr;
    gap: 8px;
    height: auto;
  }
}

/* on narrow screens stack training layout */
@media (max-width: 600px) {
  .gt-training-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
}

.gt-training-main {
  border-radius: 12px;
  padding: 9px 10px;
  background: radial-gradient(circle at 0 0, rgba(139, 92, 246, 0.26), transparent 70%),
    rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.34);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

html[data-theme="light"] .gt-training-main {
  background: #ffffff;
}

.gt-training-header h2 {
  margin: 0;
  font-size: 0.98rem;
}

.gt-training-header p {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--gt-text-soft);
}

.gt-training-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.gt-training-card {
  border-radius: 10px;
  padding: 7px 8px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.96);
}

html[data-theme="light"] .gt-training-card {
  background: #f9fafb;
  border-color: #e5e7eb;
}

.gt-training-label {
  font-size: 0.68rem;
  color: var(--gt-text-softer);
}

.gt-training-value {
  font-size: 0.9rem;
  font-weight: 600;
}

.gt-training-sub {
  font-size: 0.7rem;
  color: var(--gt-text-softer);
}

.gt-stars {
  font-size: 0.8rem;
  color: #facc15;
}

.gt-star-dim {
  opacity: 0.4;
}

.gt-progress-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}

.gt-progress-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gt-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--gt-text-soft);
}

.gt-progress-track {
  border-radius: 999px;
  height: 6px;
  background: rgba(15, 23, 42, 0.9);
  overflow: hidden;
}

html[data-theme="light"] .gt-progress-track {
  background: #e5e7eb;
}

.gt-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(to right, var(--gt-accent), var(--gt-accent-strong));
  width: 64%;
}

.gt-progress-fill--secondary {
  width: 64%;
  background: linear-gradient(to right, #22c55e, #16a34a);
}

.gt-training-side {
  border-radius: 12px;
  padding: 9px 9px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.34);
  display: flex;
  flex-direction: column;
}

html[data-theme="light"] .gt-training-side {
  background: #ffffff;
}

.gt-instruction-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
}

.gt-instruction-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gt-instruction-label {
  font-size: 0.7rem;
  color: var(--gt-text-soft);
}

.gt-instruction-pill {
  font-size: 0.65rem;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
}

html[data-theme="light"] .gt-instruction-pill {
  background: #111827;
  color: #f9fafb;
}

.gt-instruction-text {
  font-size: 0.78rem;
  color: var(--gt-text-soft);
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px dashed rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.8);
}

html[data-theme="light"] .gt-instruction-text {
  background: #f9fafb;
}

.gt-export-footer {
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  display: flex;
  align-items: center;
  gap: 6px;
}

.gt-export-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gt-export-label {
  font-size: 0.65rem;
  color: var(--gt-text-softer);
}

.gt-export-value {
  font-size: 0.78rem;
}

.gt-export-sub {
  font-size: 0.65rem;
  color: var(--gt-text-softer);
}

/* SECURITY VIEW */

.gt-security-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 10px;
  height: 100%;
}

/* keep security cards readable on tablet */
@media (min-width: 641px) and (max-width: 960px) {
  .gt-security-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .gt-security-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.gt-security-card {
  border-radius: 12px;
  padding: 9px 10px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.34);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

html[data-theme="light"] .gt-security-card {
  background: #ffffff;
}

.gt-security-header h2 {
  margin: 0;
  font-size: 0.95rem;
}

.gt-security-header p {
  margin: 2px 0 0;
}

.gt-security-card p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--gt-text-soft);
}

.gt-list {
  margin: 2px 0 0;
  padding-left: 16px;
  font-size: 0.75rem;
  color: var(--gt-text-soft);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gt-security-card--compact {
  gap: 6px;
}

.gt-security-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--gt-text-soft);
}

.gt-pill {
  border-radius: 999px;
  font-size: 0.65rem;
  padding: 3px 8px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.gt-pill--success {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.7);
  color: #bbf7d0;
}

html[data-theme="light"] .gt-pill--success {
  background: #bbf7d0;
  color: #166534;
}

.gt-pill--neutral {
  background: rgba(148, 163, 184, 0.2);
  border-color: rgba(148, 163, 184, 0.6);
  color: var(--gt-text);
}

.gt-pill--soft {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.45);
  color: var(--gt-text-soft);
}

html[data-theme="light"] .gt-pill--soft {
  background: #f3f4f6;
}

.gt-pill--outline {
  border-color: rgba(148, 163, 184, 0.45);
  color: var(--gt-text-soft);
  background: transparent;
}

.gt-security-divider {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(148, 163, 184, 0.6),
    transparent
  );
  margin: 3px 0;
}

.gt-security-footnote {
  font-size: 0.7rem;
  color: var(--gt-text-softer);
}

.gt-security-label {
  font-size: 0.7rem;
  color: var(--gt-text-soft);
}

.gt-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.gt-chip {
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.45);
}

html[data-theme="light"] .gt-chip {
  background: #f3f4f6;
}

.gt-security-sub {
  margin-top: 2px;
  font-size: 0.72rem;
  color: var(--gt-text-softer);
}

/* BOTTOM STRIP */

.gt-bottom-strip {
  border-radius: 999px;
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.96);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

html[data-theme="light"] .gt-bottom-strip {
  background: #ffffff;
}

@media (max-width: 720px) {
  .gt-bottom-strip {
    border-radius: 16px;
    flex-direction: column;
    align-items: flex-start;
  }
}

.gt-bottom-item {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.gt-bottom-label {
  font-size: 0.68rem;
  color: var(--gt-text-softer);
}

.gt-bottom-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* Extra pill variants */

.gt-pill--soft {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.45);
  color: var(--gt-text-soft);
}

.gt-pill--outline {
  border-color: rgba(148, 163, 184, 0.45);
  color: var(--gt-text-soft);
  background: transparent;
}

/* FUNCTIONAL PILLARS */

.gt-pillars {
  margin-top: 4px;
  margin-bottom: 4px;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid var(--gt-border-subtle);
  background: rgba(15, 23, 42, 0.96);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

html[data-theme="light"] .gt-pillars {
  background: #ffffff;
}

.gt-pillars-header h2 {
  margin: 0;
  font-size: 0.9rem;
}

.gt-pillars-header .gt-badge {
  margin-bottom: 4px;
}

.gt-pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

/* smoother pillar transitions for tablet */
@media (min-width: 641px) and (max-width: 960px) {
  .gt-pillars-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (max-width: 960px) {
  .gt-pillars-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .gt-pillars {
    padding: 9px 9px;
  }

  .gt-pillars-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.gt-pillar-card {
  border-radius: 12px;
  padding: 8px 9px;
  background: radial-gradient(circle at 0 0, rgba(139, 92, 246, 0.14), transparent 70%),
    rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.3);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

html[data-theme="light"] .gt-pillar-card {
  background: #f9fafb;
}

.gt-pillar-tag {
  align-self: flex-start;
  font-size: 0.65rem;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: #e5e7eb;
}

html[data-theme="light"] .gt-pillar-tag {
  background: #111827;
  color: #f9fafb;
}

.gt-pillar-card h3 {
  margin: 0;
  font-size: 0.8rem;
}

.gt-pillar-card p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--gt-text-soft);
}

.gt-pillar-card ul {
  margin: 4px 0 0;
  padding-left: 14px;
  font-size: 0.7rem;
  color: var(--gt-text-softer);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* RESPONSIVE TWEAKS */

@media (max-width: 640px) {
  #app {
    padding: 12px 10px 10px;
  }

  .gt-header {
    padding: 8px 10px;
  }

  .gt-header-actions .gt-button--ghost {
    display: none;
  }

  .gt-hero-copy {
    padding: 14px 12px 12px;
  }

  .gt-hero-panel {
    padding: 12px 10px;
  }

  .gt-bottom-strip {
    padding: 7px 8px;
  }
}

/* UTILITIES */

.gt-badge--soft,
.gt-badge--accent,
.gt-pill,
.gt-chip,
.gt-button,
.gt-meta-item,
.gt-logo-mark,
.gt-icon-button {
  will-change: transform;
}

/* Modal */
.gt-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
}

.gt-modal--open {
  display: flex;
}

.gt-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.6);
  backdrop-filter: blur(6px);
}

html[data-theme="light"] .gt-modal-backdrop {
  background: rgba(2, 6, 23, 0.12);
}

.gt-modal-panel {
  position: relative;
  width: min(760px, calc(100% - 40px));
  max-height: 86vh;
  overflow: auto;
  border-radius: 14px;
  padding: 14px;
  background: var(--gt-bg-elevated);
  border: 1px solid var(--gt-border-subtle);
  box-shadow: var(--gt-shadow-soft);
  z-index: 2;
}

html[data-theme="light"] .gt-modal-panel {
  background: var(--gt-bg-elevated);
}

.gt-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.gt-modal-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.gt-modal-body {
  font-size: 0.9rem;
  color: var(--gt-text-soft);
  line-height: 1.5;
  padding-bottom: 10px;
}

.gt-modal-body ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.gt-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

/* Ensure modal is touch-friendly on small screens */
@media (max-width: 640px) {
  .gt-modal-panel {
    width: calc(100% - 28px);
    padding: 12px;
    border-radius: 12px;
  }
}

/* Modal form styles */
.gt-demo-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gt-demo-form label {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  color: var(--gt-text-soft);
  gap: 6px;
}
.gt-demo-form input[type="text"],
.gt-demo-form input[type="tel"],
.gt-demo-form select,
.gt-demo-form textarea {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--gt-border-subtle);
  background: var(--gt-bg-elevated);
  color: var(--gt-text);
}
html[data-theme="light"] .gt-demo-form input,
html[data-theme="light"] .gt-demo-form select,
html[data-theme="light"] .gt-demo-form textarea {
  background: #fff;
}
.gt-terms {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--gt-text-soft);
}
.gt-demo-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}
.gt-demo-feedback {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--gt-text-soft);
}
/* Ensure inputs are touch-friendly */
@media (max-width: 640px) {
  .gt-demo-form input,
  .gt-demo-form select,
  .gt-demo-form textarea {
    font-size: 1rem;
    padding: 10px 12px;
  }
}

/* Hide native scrollbars globally (document and common scrollable elements) */
html, body, .gt-panel-body, .gt-modal-panel {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE 10+ */
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.gt-panel-body::-webkit-scrollbar,
.gt-modal-panel::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* Custom single-dot scroll indicator */
#gt-scroll-dot {
  position: fixed;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gt-accent-strong), var(--gt-accent));
  box-shadow: 0 6px 18px rgba(139,92,246,0.18), 0 2px 6px rgba(0,0,0,0.35);
  z-index: 1400;
  transition: transform 220ms cubic-bezier(.2,.9,.3,1), opacity 240ms;
  opacity: 0.9;
  pointer-events: none;
}

/* Subtle collapsed state when no scrollable overflow */
#gt-scroll-dot.gt-hidden {
  opacity: 0;
  transform: translateY(-50%) scale(0.6);
}

/* Slightly larger on hover to hint affordance (non-interactive) */
#gt-scroll-dot:hover {
  transform: translateY(-50%) scale(1.2);
}

/* Make sure on small screens dot moves inward */
@media (max-width: 640px) {
  #gt-scroll-dot {
    right: 10px;
  }
}