/* Zideons landing page styles */
:root {
  --bg: #05070c;
  --card: #0b1020;
  --muted: #9fb1c7;
  --text: #e8f1ff;
  --primary: #3cf0ff;
  --primary-strong: #1bd8ff;
  --accent: #a3ff6f;
  --border: rgba(255, 255, 255, 0.08);
  --glow: 0 15px 40px rgba(30, 219, 255, 0.35);
  --radius: 18px;
  --grid-gap: 22px;
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 15% 20%, rgba(60, 240, 255, 0.12), transparent 40%),
              radial-gradient(circle at 80% 0%, rgba(163, 255, 111, 0.08), transparent 35%),
              #05070c;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  padding: 0 24px 48px;
  background: transparent;
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }

.topbar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 12px;
  background: linear-gradient(180deg, rgba(5, 7, 12, 0.95), rgba(5,7,12,0.6), rgba(5,7,12,0));
  backdrop-filter: blur(8px);
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  margin-left: 14px;
}

.brand-mark img {
  height: 100%;
  width: auto;
  max-width: 190px;
  display: block;
  object-fit: contain;
}

.brand-name { font-weight: 700; letter-spacing: 0.5px; }
.brand-tagline { color: var(--muted); font-size: 13px; margin-top: -2px; }

.nav { display: flex; align-items: center; gap: 18px; }
.nav a { color: var(--text); font-weight: 500; }
.nav .cta-link { color: var(--primary); font-weight: 600; }
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
  transition: transform 150ms ease, opacity 150ms ease;
}

main { max-width: 1200px; margin: 0 auto; }
.section { padding: 56px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.eyebrow { text-transform: uppercase; letter-spacing: 1.8px; color: var(--muted); font-size: 12px; margin: 0 0 8px; }
.lede { color: var(--muted); max-width: 640px; margin: 8px 0 0; }
h1, h2, h3 { margin: 0; line-height: 1.1; }
h1 { font-size: clamp(36px, 5vw, 56px); }
h2 { font-size: clamp(28px, 4vw, 38px); }
h3 { font-size: 20px; }

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: center;
  gap: 32px;
  padding: 36px 0 28px;
}

.hero-copy { display: flex; flex-direction: column; gap: 14px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-callout {
  margin-top: 6px;
  max-width: 640px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(135deg, rgba(60, 240, 255, 0.08), rgba(11,16,32,0.85));
  color: var(--muted);
  font-size: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  line-height: 1.2;
  background: transparent;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, border 150ms ease;
}
.button.primary { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #031222; border: none; box-shadow: var(--glow); }
.button.ghost { background: rgba(255,255,255,0.04); }
.button.danger { background: rgba(255, 120, 120, 0.14); color: #ffd6d6; border-color: rgba(255, 120, 120, 0.45); }
.button.ghost:hover, .button.primary:hover { transform: translateY(-1px); border-color: rgba(255,255,255,0.18); }
.button.danger:hover { transform: translateY(-1px); border-color: rgba(255, 120, 120, 0.7); }

.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 22px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(11,16,32,0.9), rgba(11,16,32,0.75));
  border: 1px solid var(--border);
  box-shadow: var(--glow);
}
.hero-panel ul { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
.hero-panel li { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.hero-panel .check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(163, 255, 111, 0.16);
  border: 1px solid rgba(163, 255, 111, 0.5);
  color: var(--accent);
  font-weight: 700;
  line-height: 1;
}
.panel-title { color: var(--primary); font-weight: 600; margin: 0; letter-spacing: 0.6px; }
.panel-footer { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.glow {
  position: absolute;
  inset: -40px;
  background: radial-gradient(circle, rgba(60, 240, 255, 0.18), transparent 45%);
  filter: blur(30px);
  z-index: -1;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--grid-gap);
  margin-top: 28px;
}

.card {
  padding: 18px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(11,16,32,0.82), rgba(11,16,32,0.92));
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  transition: transform 150ms ease, border 150ms ease, box-shadow 150ms ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.18); box-shadow: var(--glow); }
.home .card,
.home .value-card,
.home .behind-card,
.home .news-card {
  max-height: min(520px, 70vh);
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.app-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card .meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 12px; }
.tag { padding: 6px 10px; background: rgba(60, 240, 255, 0.14); color: var(--primary); border-radius: 10px; font-size: 12px; border: 1px solid rgba(60, 240, 255, 0.4); }
.tag-group { display: flex; flex-wrap: wrap; gap: 6px; }
.app-card h3 { margin-top: 0; }
.app-card p { margin: 8px 0 0; color: var(--muted); flex: 1; }
.app-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 600;
  align-self: flex-start;
}
.status-pill { padding: 6px 10px; border-radius: 10px; background: rgba(163, 255, 111, 0.14); color: var(--accent); font-size: 12px; border: 1px solid rgba(163,255,111,0.4); white-space: nowrap; }

.card-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; align-items: start; }
.pill-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pill { padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,0.06); border: 1px solid var(--border); color: var(--text); font-size: 13px; }
.value-cards { display: grid; gap: 12px; }
.value-card { padding: 16px; border-radius: var(--radius); background: rgba(11,16,32,0.85); border: 1px solid var(--border); }
.value-card p { margin: 8px 0 0; color: var(--muted); }

.status-dot { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 18px rgba(163, 255, 111, 0.8); }

.news-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.news-card h3 { margin-bottom: 8px; }
.news-card p { margin: 8px 0 0; color: var(--muted); }
.news-card { display: flex; flex-direction: column; }
.news-card footer { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; color: var(--muted); font-size: 12px; }
.news-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.news-updated { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 13px; }
.news-updated strong { color: var(--text); font-weight: 600; }
.news-feed-card { cursor: pointer; position: relative; overflow: hidden; }
.news-feed-card .news-card-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.news-card-snippet { color: var(--muted); margin-top: 8px; }
.news-card-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 14px; font-size: 12px; color: var(--muted); }
.news-card-meta-text { display: flex; gap: 10px; }
.news-card-link { align-self: flex-start; margin-top: auto; font-size: 14px; }
.news-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #031222;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: 1px solid rgba(255,255,255,0.18);
}
.input-label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 14px; }
.input-label input,
.input-label textarea,
.input-label select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  min-width: 220px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.input-label select {
  min-height: 44px;
  padding: 10px 44px 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
  background: linear-gradient(180deg, rgba(20,26,44,0.95), rgba(12,16,28,0.95));
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 8px 16px rgba(0,0,0,0.25);
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%239fb1c7'%3E%3Cpath d='M4.646 6.646a.5.5 0 0 1 .708 0L8 9.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
  cursor: pointer;
}
.input-label select:hover {
  border-color: rgba(255,255,255,0.35);
}
.input-label input:focus,
.input-label textarea:focus,
.input-label select:focus {
  outline: none;
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}
.select-wrap {
  position: relative;
  width: 100%;
}
.select-wrap select {
  width: 100%;
}
.input-with-action {
  display: flex;
  align-items: center;
  gap: 10px;
}
.input-with-action input {
  flex: 1;
}
.ai-button {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(60, 240, 255, 0.25), rgba(163, 255, 111, 0.25));
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, border 150ms ease;
}
.ai-button svg {
  width: 20px;
  height: 20px;
}
.ai-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.3);
  box-shadow: var(--glow);
}
.ai-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.input-label input[type="file"] {
  padding: 6px;
}
.input-label input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 6px 12px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #031222;
  font-weight: 600;
  cursor: pointer;
}
.input-label input[type="file"]::-webkit-file-upload-button {
  margin-right: 12px;
  padding: 6px 12px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #031222;
  font-weight: 600;
  cursor: pointer;
}
.input-label input[type="file"]::file-selector-button:hover,
.input-label input[type="file"]::-webkit-file-upload-button:hover {
  filter: brightness(1.05);
}
.input-label textarea { resize: vertical; min-height: 120px; }
.status-text { margin-top: 12px; color: var(--muted); }
.input-hint { font-size: 12px; color: var(--muted); }
.admin-form select {
  color-scheme: dark;
}
.contact-section {
  align-items: stretch;
}
.contact-card {
  display: grid;
  gap: 12px;
}
.contact-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.admin-form select option {
  color: #0f172a;
  background: #ffffff;
}
.admin-modal-filters select {
  color-scheme: dark;
}
.admin-modal-filters select option {
  color: #0f172a;
  background: #ffffff;
}

.quill-wrapper {
  border-radius: 12px;
  border: 1px solid #2a3142;
  background: #0f1422;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.quill-wrapper .ql-toolbar {
  border: none;
  border-bottom: 1px solid #2a3142;
  background: #151c2c;
  padding: 8px 10px;
}

.quill-wrapper .ql-container {
  border: none;
  color: var(--text);
  height: 220px;
  background: #0f1422;
  font-family: inherit;
}

.quill-wrapper .ql-editor {
  height: 100%;
  overflow-y: auto;
  padding: 12px 14px;
}

.quill-wrapper .ql-toolbar button,
.quill-wrapper .ql-toolbar .ql-picker-label {
  color: var(--text);
}

.quill-wrapper .ql-toolbar button:hover,
.quill-wrapper .ql-toolbar .ql-picker-label:hover {
  color: var(--primary);
}

.quill-wrapper .ql-stroke {
  stroke: var(--text);
}

.quill-wrapper .ql-fill {
  fill: var(--text);
}

.quill-wrapper .ql-picker {
  color: var(--text);
}

.quill-wrapper:focus-within {
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

.quill-wrapper .ql-toolbar button.ql-active,
.quill-wrapper .ql-toolbar .ql-picker-label.ql-active,
.quill-wrapper .ql-toolbar button:focus {
  color: var(--primary);
}

.quill-wrapper .ql-picker-options {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.1);
}

.quill-wrapper .ql-picker-item {
  color: #1f2937;
}

.footer {
  margin: 32px auto 0;
  max-width: 1200px;
  padding: 28px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(60, 240, 255, 0.12), rgba(11,16,32,0.9));
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  align-items: center;
}
.footer-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.disclaimer-banner {
  max-width: 1200px;
  margin: 16px auto 0;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}
.cookie-banner {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 220;
  display: none;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 220ms ease, transform 220ms ease;
}
.cookie-banner.is-visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}
.cookie-banner-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.18);
  background: linear-gradient(135deg, rgba(60, 240, 255, 0.12), rgba(11,16,32,0.96));
  box-shadow: var(--glow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.cookie-banner-content {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}
.cookie-banner-icon {
  width: 26px;
  height: 26px;
  border-radius: 10px;
  background: rgba(60, 240, 255, 0.18);
  border: 1px solid rgba(60, 240, 255, 0.45);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.cookie-banner-icon span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  display: block;
}
.cookie-banner-copy strong {
  display: block;
  font-size: 15px;
  letter-spacing: 0.2px;
  color: var(--text);
}
.cookie-banner-copy p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.cookie-banner-copy a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: rgba(60, 240, 255, 0.6);
}
.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}
.cookie-banner-actions .button {
  height: 38px;
  padding: 0 16px;
  border-radius: 12px;
}
.cookie-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #031222;
  border: none;
  font-weight: 600;
}
.cookie-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.35);
}
.cookie-tertiary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.25);
}
.cookie-primary:hover,
.cookie-secondary:hover,
.cookie-tertiary:hover {
  transform: translateY(-1px);
}
.idle-warning {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 320px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(60, 240, 255, 0.12), rgba(11,16,32,0.95));
  box-shadow: var(--glow);
  z-index: 200;
  display: none;
}
.idle-warning.show { display: block; }
.idle-warning p { margin: 0 0 10px; color: var(--text); }
.idle-warning-actions { display: flex; justify-content: flex-end; }
.idle-warning .button { height: 36px; padding: 0 14px; }

.news-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 7, 12, 0.78);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 100;
}
.news-modal-backdrop {
  position: absolute;
  inset: 0;
}
.news-modal.is-open { opacity: 1; pointer-events: auto; }
.news-modal-content {
  width: min(960px, 92vw);
  border-radius: 20px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(11,16,32,0.95), rgba(11,16,32,0.85));
  border: 1px solid var(--border);
  box-shadow: var(--glow);
  position: relative;
  z-index: 1;
}
.home .news-modal-content {
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}
.news-modal-header { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.icon-button {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.news-carousel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  margin-top: 18px;
}
.news-slide {
  display: grid;
  gap: 18px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}
.news-slide-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.news-source { text-transform: uppercase; letter-spacing: 1.2px; color: var(--primary); font-size: 12px; margin: 0 0 6px; }
.news-snippet { color: var(--muted); }
.carousel-control {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
}
.carousel-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}
.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.4);
  background: transparent;
  cursor: pointer;
}
.carousel-dot.is-active { background: var(--primary); border-color: var(--primary); }
.modal-open { overflow: hidden; }

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12px 0;
  opacity: 0;
  pointer-events: none;
  background: rgba(5, 7, 12, 0.78);
  transition: opacity 520ms cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 110;
  overflow-y: auto;
}
.modal.open { opacity: 1; pointer-events: auto; }
.modal-panel {
  transform: translateY(12px) scale(0.98);
  transition: transform 520ms cubic-bezier(0.25, 0.8, 0.25, 1), opacity 520ms cubic-bezier(0.25, 0.8, 0.25, 1);
  opacity: 0;
}
.modal.open .modal-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.modal-backdrop { position: absolute; inset: 0; }
.modal-panel {
  width: min(1180px, 96vw);
  border-radius: 20px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(11,16,32,0.96), rgba(11,16,32,0.9));
  border: 1px solid var(--border);
  box-shadow: var(--glow);
  z-index: 1;
  max-height: calc(100vh - 48px);
  height: calc(100vh - 48px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}
.modal-panel-wide {
  width: min(1200px, 96vw);
  grid-template-rows: auto auto;
  height: auto;
  max-height: calc(100vh - 24px);
}
.home .modal-panel-wide {
  overflow-y: auto;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.modal-tabs {
  display: none;
  gap: 8px;
  margin-top: 12px;
}
.modal-tab {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  padding: 0 16px;
  border-radius: 14px;
  font-weight: 600;
  line-height: 1.2;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.modal-tab[hidden] {
  display: none;
}
.modal-tab.is-active {
  background: linear-gradient(135deg, rgba(60, 240, 255, 0.22), rgba(163, 255, 111, 0.22));
  border-color: rgba(255,255,255,0.3);
}
.modal-close {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 12px;
  cursor: pointer;
}
.modal-carousel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  margin-top: 0;
}
.carousel-track {
  width: 100%;
  max-height: 70vh;
  border-radius: 16px;
  overflow: visible;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  display: grid;
  place-items: center;
}
#carousel-image {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  opacity: 0;
  transition: opacity 560ms cubic-bezier(0.25, 0.8, 0.25, 1);
}
#carousel-image.is-visible { opacity: 1; }
.carousel-btn {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
}
.carousel-counter {
  margin-top: 12px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}
.modal-app-link {
  align-self: flex-start;
  margin-top: auto;
}
.modal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 18px;
  padding-top: 16px;
  height: 100%;
  min-height: 0;
}
.modal-media {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 0;
}
.modal-body {
  border-left: 1px solid rgba(255,255,255,0.08);
  padding-left: 18px;
  display: grid;
  gap: 12px;
  overflow-y: auto;
  min-height: 0;
  height: 100%;
}

.modal-description p {
  margin: 0 0 12px;
  color: var(--muted);
}

.modal-description ul,
.modal-description ol {
  margin: 0 0 12px 20px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .modal-layout {
    grid-template-columns: 1fr;
  }
  .modal-body {
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-left: 0;
    padding-top: 14px;
  }
}

@media (max-width: 980px) {
  .modal-tabs {
    display: flex;
  }
  .modal-layout {
    display: block;
  }
  .modal[data-active-tab="media"] .modal-body {
    display: none;
  }
  .modal[data-active-tab="details"] .modal-media {
    display: none;
  }
}

.admin-hero { padding-bottom: 12px; }
.admin-section {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
}
.admin-section[data-auth-page] {
  display: flex;
  justify-content: center;
}
.admin-section[data-auth-page] .admin-panel {
  width: min(460px, 100%);
}
.admin-panel-new { grid-area: new; }
.admin-panel-launchpad { grid-area: launchpad; }
.admin-panel-behind { grid-area: behind; }
.admin-panel-why { grid-area: why; }
.admin-panel {
  padding: 24px;
  border-radius: 18px;
  background: rgba(11,16,32,0.9);
  border: 1px solid var(--border);
}
.admin-feature-card {
  cursor: pointer;
  display: grid;
  gap: 10px;
}
.admin-feature-card .app-link {
  margin-top: 4px;
}
.admin-form { display: grid; gap: 18px; margin-top: 16px; }
.admin-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.admin-apps { display: grid; gap: 12px; margin-top: 16px; }
.admin-card {
  padding: 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}
.admin-card p { margin: 8px 0 0; color: var(--muted); }
.admin-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.admin-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.admin-thumbs img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
}
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.featured-option {
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  cursor: pointer;
}
.featured-option input {
  margin: 0;
}
.featured-option img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
}
.featured-option input:checked + img {
  border-color: rgba(60, 240, 255, 0.7);
  box-shadow: 0 0 0 1px rgba(60, 240, 255, 0.7);
}
.admin-thumb-empty {
  padding: 16px;
  border-radius: 12px;
  border: 1px dashed rgba(255,255,255,0.15);
  color: var(--muted);
  text-align: center;
}
.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 8px 0 4px;
}
.admin-actions .button {
  height: 38px;
  padding: 0 16px;
}
.admin-actions form { margin: 0; }
.muted { color: var(--muted); font-size: 13px; }
.admin-modal .modal-panel {
  height: auto;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  grid-template-rows: auto auto 1fr;
}

#launchpad-admin-modal .modal-panel {
  height: calc(100vh - 24px);
  max-height: calc(100vh - 24px);
}

#launchpad-admin-modal .admin-modal-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

#launchpad-admin-modal .admin-tab-panel {
  flex: 1;
  min-height: 0;
}

#launchpad-admin-modal .admin-card {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
}

#launchpad-admin-modal .admin-thumbs {
  align-content: start;
}

#launchpad-admin-modal .admin-card p {
  align-self: start;
}

#launchpad-admin-modal .admin-card .admin-actions {
  align-self: end;
}

#launchpad-admin-modal .admin-thumbs {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

#launchpad-admin-modal .admin-thumbs img {
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.admin-modal .modal-tabs {
  display: flex;
  flex-wrap: wrap;
  margin-top: 10px;
}
.admin-modal-form {
  margin-top: 12px;
}
.admin-tab-panel {
  display: none;
  gap: 18px;
}
.admin-tab-panel.is-active {
  display: grid;
}
.admin-modal-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 6px;
}
.admin-modal-filters {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 220px);
  margin-top: 10px;
}

.explain-preview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 20px;
  margin-top: 18px;
}
.explain-preview-form {
  display: grid;
  gap: 14px;
}
.explain-loop-fields {
  display: grid;
  gap: 10px;
}
.explain-loop-row {
  display: grid;
  grid-template-columns: minmax(0, 140px) minmax(0, 1fr);
  gap: 10px;
}
.explain-preview-pane {
  display: grid;
  gap: 14px;
  align-content: start;
}
.explain-preview-card {
  padding: 18px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  display: grid;
  gap: 10px;
}
.explain-preview-block {
  margin-top: 8px;
}
.explain-preview-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.explain-preview-modal .modal-panel {
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

@media (max-width: 980px) {
  .explain-preview-layout {
    grid-template-columns: 1fr;
  }
  .explain-preview-actions {
    justify-content: space-between;
  }
}

.behind-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.behind-bullets {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(135deg, rgba(60, 240, 255, 0.08), rgba(11,16,32,0.9));
  display: grid;
  gap: 8px;
  color: var(--muted);
}
.behind-bullets .eyebrow {
  margin-bottom: 0;
}
.behind-bullets ul {
  margin: 0 0 0 18px;
  display: grid;
  gap: 8px;
}
.behind-intro .muted {
  margin-top: 6px;
}
.behind-diagram {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}
.diagram-node {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
}
.diagram-arrow {
  color: var(--primary);
  font-weight: 600;
}
.behind-diagram.compact .diagram-node {
  font-size: 12px;
}
.behind-qa {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
}
.behind-qa p {
  margin: 6px 0 0;
}
.behind-list {
  margin: 12px 0 0 18px;
  color: var(--muted);
}
.behind-scroll {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255,255,255,0.1);
  color: var(--muted);
}
.behind-deep-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  align-items: start;
}
.behind-select .select-action {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.behind-select select {
  width: 100%;
  color: #0f172a;
}
.behind-select select option {
  color: #1f2937;
  background: #ffffff;
}
.behind-card {
  cursor: pointer;
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(15,20,34,0.7), rgba(15,20,34,0.92));
  transition: transform 150ms ease, border 150ms ease, box-shadow 150ms ease;
}
.behind-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,0.18);
  box-shadow: var(--glow);
}

.behind-card-cta {
  align-content: start;
}

.behind-callout {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(135deg, rgba(60, 240, 255, 0.06), rgba(11,16,32,0.75));
  display: grid;
  gap: 10px;
}

.behind-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.behind-points li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
}

.behind-points .check {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #031222;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.behind-carousel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  margin-top: 16px;
}

.behind-carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 6px;
}

.behind-carousel-track::-webkit-scrollbar {
  height: 8px;
}
.behind-carousel-track::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
}

.behind-slide {
  scroll-snap-align: center;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(11,16,32,0.9), rgba(11,16,32,0.98));
  display: grid;
  gap: 12px;
  min-height: 320px;
}

.behind-slide-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.behind-slide .muted {
  margin: 0;
}

.behind-slide .modal-description {
  margin-top: 6px;
}

.behind-slide .modal-description h4 {
  margin: 10px 0 6px;
}

.behind-slide .modal-description p {
  margin: 0 0 10px;
}

.behind-slide .modal-description ul,
.behind-slide .modal-description ol {
  margin: 0 0 10px 18px;
}

.behind-tabs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.behind-slide .tech-details {
  display: none;
}

.behind-slide .friendly-details {
  color: var(--muted);
  font-size: 16px;
  font-family: inherit;
}

.behind-slide .friendly-details .behind-diagram {
  font-size: 14px;
  font-family: inherit;
}

.behind-slide .friendly-details .diagram-node {
  font-size: 13px;
  font-family: inherit;
}

.behind-slide .friendly-details .behind-not {
  font-size: 14px;
  font-family: inherit;
}

.modal[data-behind-tab="technical"] .behind-slide .friendly-details {
  display: none;
}

.modal[data-behind-tab="technical"] .behind-slide .tech-details {
  display: block;
}

@media (max-width: 900px) {
  .behind-carousel {
    grid-template-columns: 1fr;
  }
  .behind-carousel .carousel-btn {
    width: 100%;
  }
}
.behind-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.behind-card p {
  margin: 0;
  color: var(--muted);
}
.behind-card .app-link {
  margin-top: 6px;
}
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms ease, transform 500ms ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (max-width: 900px) {
  .behind-deep-layout {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


.alert {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
}
.alert.success { border-color: rgba(60, 240, 255, 0.4); }
.alert.error { border-color: rgba(255, 120, 120, 0.45); }
.alert p { margin: 0 0 6px; }
.alert p:last-child { margin-bottom: 0; }

@media (max-width: 980px) {
  .topbar { position: sticky; }
  .nav {
    position: absolute;
    top: calc(100% - 8px);
    right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(11,16,32,0.95);
    box-shadow: var(--glow);
    min-width: 200px;
  }
  body.nav-open .nav { display: flex; }
  .nav-toggle { display: inline-flex; }
  body { padding: 0 18px 36px; }
  .cookie-banner {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
  .cookie-banner-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .cookie-banner-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .news-carousel { grid-template-columns: 1fr; }
  .carousel-control { width: 100%; }
  .modal-carousel { grid-template-columns: 1fr; }
  .carousel-btn { width: 100%; }
  .brand-mark { height: 44px; margin-left: 10px; }
  .brand-mark img { max-width: 150px; }
  body.nav-open .nav-toggle span { opacity: 1; transform: none; }
}

@media (min-width: 1024px) {
  .admin-section {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    grid-template-areas:
      "new launchpad"
      "new behind"
      "new why";
  }
}
