/* =========================================================
   ROOT VARIABLES
========================================================= */
:root {
  --bg: #e6e6e6;
  --bg-2: #f4f4f4;
  --panel: #ffffff;
  --panel-2: #d9d9d9;
  --text: #1f1f1f;
  --muted: #4b4b4b;
  --line: #c7c7c7;
  --accent: #4b4b4b;
  --accent-2: #8a8a8a;
  --success: #1f7a4c;
  --error: #9b2c2c;
}

/* =========================================================
   RESET / BASE
========================================================= */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

html { scrollbar-color: #4b4b4b #d8d8d8; }

body {
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

::-webkit-scrollbar { width: 14px; }
::-webkit-scrollbar-track { background: #d8d8d8; }

::-webkit-scrollbar-thumb {
  background: #4b4b4b;
  border-radius: 20px;
  border: 2px solid #d8d8d8;
}

::-webkit-scrollbar-thumb:hover { background: #3b3b3b; }

a {
  color: var(--text);
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

video, iframe {
  width: 100%;
  display: block;
  border: 0;
}

.wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

/* =========================================================
   HEADER
========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244,244,244,.82);
  backdrop-filter: blur(10px);
  padding: 12px 0;
}

.topbar {
  width: calc(100% - 32px);
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #eeeeee 100%);
  border-radius: 26px;
  padding: 10px 18px;
  box-shadow:
    0 0 0 1px rgba(75,75,75,.22),
    0 0 18px rgba(75,75,75,.25),
    0 12px 30px rgba(0,0,0,.18),
    inset 0 1px 0 rgba(255,255,255,.9);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.brand-copy strong {
  display: block;
  font-size: 18px;
  text-shadow: 0 1px 0 #ffffff;
}

.brand-copy small {
  display: block;
  color: #4b4b4b;
  font-size: 14px;
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--muted);
  font-weight: 700;
}

.main-nav a:hover {
  color: var(--text);
}

.account-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.account-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: #ededed;
  border: 1px solid var(--line);
  font-weight: 700;
  color: var(--text);
}

/* =========================================================
   ADMIN SUBNAV
========================================================= */
.admin-subnav-wrap {
  border-top: 1px solid rgba(255,255,255,.7);
  background: rgba(255,255,255,.65);
}

.admin-subnav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 0;
}

.admin-subnav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  background: #efefef;
  border: 1px solid var(--line);
  font-weight: 700;
  color: var(--text);
}

/* =========================================================
   SECTIONS / HERO
========================================================= */
.hero-section, .page-hero, .section { padding: 34px 0; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 24px;
  align-items: start;
}

.full-width-hero {
  width: 100%;
  padding: 34px 0;
  overflow-x: hidden;
}

.full-width-inner {
  width: 100%;
  max-width: none;
  padding: 0 32px;
  margin: 0 auto;
}

.hero-banner {
  width: calc(100vw - 32px);
  margin: 0 0 22px 50%;
  transform: translateX(-50%);
  display: block;
  border-radius: 28px;
  padding: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #eeeeee 100%);
  box-shadow:
    0 0 0 1px rgba(75,75,75,.22),
    0 0 22px rgba(75,75,75,.30),
    0 14px 34px rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.9);
}

.hero-banner img {
  width: 100%;
  max-width: none;
  height: auto;
  border-radius: 20px;
  background: var(--panel);
}

.hero-tagline {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  text-align: center;
  color: #4b4b4b;
  font-size: clamp(15px, 2.4vw, 20px);
  font-weight: 600;
  line-height: 1.35;
}

.hero-card, .featured-card, .content-card, .viewer-card, .form-card, .table-card, .stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(0,0,0,.06);
}

.hero-card, .form-card, .stat-card { padding: 22px; }

.alt-section {
  background: rgba(255,255,255,.4);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* =========================================================
   INDEX PAGE SECTION PANELS
========================================================= */
.home-panel {
  background: linear-gradient(180deg, #ffffff 0%, #eeeeee 100%);
  border: 2px solid #4b4b4b;
  border-radius: 28px;
  padding: 26px;
  box-shadow:
    0 3px 0 #3f3f3f,
    0 14px 32px rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.9);
}

.home-panel + .home-panel { margin-top: 30px; }
.home-panel .section-head { margin-bottom: 24px; }

.home-panel .section-head h2 {
  font-size: 36px;
  font-weight: 800;
  color: #4b4b4b;
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 3px solid #4b4b4b;
  display: inline-block;
  text-shadow: 0 1px 0 #ffffff;
}

/* =========================================================
   TYPOGRAPHY
========================================================= */
.eyebrow {
  display: inline-block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}

h1, h2, h3 { margin-top: 0; }

h1 {
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.05;
  margin-bottom: 14px;
}

.page-hero h1, .form-card h1 {
  font-size: clamp(28px, 4vw, 42px);
}

.lede, p { color: var(--muted); }

/* =========================================================
   BUTTONS
========================================================= */
.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-secondary { background: #efefef; }
.btn-ghost { background: transparent; }

.btn-sm {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
}

/* =========================================================
   CARDS / GRIDS
========================================================= */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.feature-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.feature-list li + li { margin-top: 8px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card-grid.three-up { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.featured-card {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  overflow: hidden;
}

.content-card { overflow: hidden; }
.locked-card { opacity: .95; }

.home-panel .featured-card,
.home-panel .content-card {
  background: linear-gradient(180deg, #ffffff 0%, #f0f0f0 100%);
  border-radius: 26px;
  border: 1px solid rgba(75,75,75,.28);
  box-shadow:
    0 0 0 2px rgba(75,75,75,.16),
    0 0 18px rgba(75,75,75,.30),
    0 0 36px rgba(75,75,75,.18),
    0 18px 38px rgba(0,0,0,.24),
    inset 0 1px 0 rgba(255,255,255,.98);
}

.home-panel .featured-card:hover,
.home-panel .content-card:hover {
  box-shadow:
    0 0 0 2px rgba(75,75,75,.22),
    0 0 24px rgba(75,75,75,.38),
    0 0 48px rgba(75,75,75,.24),
    0 22px 44px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.98);
}

.home-panel .card-thumb {
  border-radius: 22px;
  box-shadow:
    0 0 0 2px rgba(75,75,75,.18),
    0 0 16px rgba(75,75,75,.28),
    0 10px 24px rgba(0,0,0,.22);
}

.card-thumb {
  aspect-ratio: 16 / 9;
  background: #d0d0d0;
  overflow: hidden;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.card-body { padding: 18px; }
.large-body { padding-top: 22px; }

.badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  background: #ececec;
  color: var(--text);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}

.badge-muted { background: #dcdcdc; }

/* =========================================================
   VIEWER / VIDEO
========================================================= */
.viewer-grid { display: grid; grid-template-columns: 1fr; }
.viewer-media { padding: 18px 18px 0; }

.video-frame {
  aspect-ratio: 16 / 9;
  background: #111;
  border-radius: 16px;
  overflow: hidden;
}

.video-frame iframe, .viewer-media video {
  width: 100%;
  height: 100%;
  min-height: 480px;
  border-radius: 16px;
  background: #111;
}

.thought-box {
  min-height: 360px;
  padding: 22px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
}

/* =========================================================
   FORMS
========================================================= */
.narrow-wrap { max-width: 560px; }
.narrow-wide { max-width: 820px; }

label {
  display: block;
  font-weight: 700;
  margin: 12px 0 8px;
}

input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font: inherit;
}

textarea { resize: vertical; }

.form-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.check-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin: 14px 0;
}

/* =========================================================
   ALERTS
========================================================= */
.alert {
  padding: 14px;
  border-radius: 14px;
  margin-bottom: 16px;
  font-weight: 700;
}

.alert-success {
  background: rgba(31,122,76,.12);
  color: var(--success);
  border: 1px solid rgba(31,122,76,.18);
}

.alert-error {
  background: rgba(155,44,44,.1);
  color: var(--error);
  border: 1px solid rgba(155,44,44,.16);
}

/* =========================================================
   STATS / TABLES
========================================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.stat-card strong {
  display: block;
  font-size: 40px;
}

.stat-card span { color: var(--muted); }
.table-card { overflow: auto; }

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

/* =========================================================
   FOOTER
========================================================= */
.site-footer {
  margin-top: 34px;
  padding: 28px 0 40px;
  background: transparent;
}

.footer-grid {
  width: calc(100% - 32px);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  background: linear-gradient(180deg, #ffffff 0%, #eeeeee 100%);
  border-radius: 26px;
  padding: 24px;
  box-shadow:
    0 0 0 1px rgba(75,75,75,.22),
    0 0 18px rgba(75,75,75,.25),
    0 12px 30px rgba(0,0,0,.18),
    inset 0 1px 0 rgba(255,255,255,.9);
}

/* =========================================================
   ADMIN
========================================================= */
.admin-hero {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 18px;
  align-items: stretch;
}

.admin-quick-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.quick-link-card {
  display: block;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg,#fbfbfb,#efefef);
}

.quick-link-card strong {
  display: block;
  margin-bottom: 6px;
}

.quick-link-card span { color: var(--muted); }
.admin-stats { margin-top: 20px; }
.admin-section-head { margin-top: 24px; }

.admin-form-card {
  box-shadow: 0 16px 40px rgba(0,0,0,.08);
}

.help-text {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 980px) {
  .hero-grid, .featured-card, .card-grid, .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .featured-card, .admin-hero { grid-template-columns: 1fr; }

  .header-actions { justify-content: flex-start; }
}

@media (max-width: 700px) {
  .topbar, .section-head, .footer-grid {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-grid, .card-grid, .stats-grid, .form-two {
    grid-template-columns: 1fr;
  }

  .main-nav, .account-nav, .admin-subnav {
    width: 100%;
  }

  .main-nav a, .account-nav a, .account-chip {
    width: auto;
  }

  .header-actions { width: 100%; }
  .full-width-inner { padding: 0 16px; }

  .hero-banner {
    width: calc(100vw - 16px);
    border-radius: 18px;
    padding: 6px;
  }

  .hero-banner img {
    width: 100%;
    border-radius: 13px;
  }

  .hero-tagline {
    padding: 0 10px;
    font-size: clamp(14px, 4vw, 17px);
    line-height: 1.35;
  }

  .home-panel {
    padding: 18px;
    border-radius: 20px;
  }

  .home-panel .section-head h2 {
    font-size: 28px;
  }

  .home-panel .featured-card,
  .home-panel .content-card {
    border-radius: 22px;
    box-shadow:
      0 0 0 2px rgba(75,75,75,.14),
      0 0 18px rgba(75,75,75,.26),
      0 14px 30px rgba(0,0,0,.22),
      inset 0 1px 0 rgba(255,255,255,.98);
  }

  .home-panel .card-thumb {
    border-radius: 18px;
  }

  .video-frame iframe, .viewer-media video {
    min-height: 220px;
  }
}