:root {
  --brand-red: #d90918;
  --brand-orange: #f07818;
  --ink: #1d1d1f;
  --muted: #62646a;
  --line: #e7e4df;
  --paper: #fffdf9;
  --soft: #f7f1e9;
  --deep: #2a2020;
  --shadow: 0 20px 60px rgba(43, 28, 22, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  line-height: 1.65;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(20px, 5vw, 72px);
  background: rgba(255, 253, 249, 0.94);
  border-bottom: 1px solid rgba(231, 228, 223, 0.86);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 800;
  color: var(--deep);
}

.brand img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  object-position: 28% center;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.brand span {
  font-size: 20px;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 6px;
  color: #4a4240;
  font-size: 15px;
  transition: background 0.2s ease, color 0.2s ease;
}

.site-nav a:hover {
  background: #fff2e9;
  color: var(--brand-red);
}

.account-menu {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.account-trigger {
  display: inline-flex !important;
  flex: 0 0 auto;
  align-items: center !important;
  justify-content: center;
  gap: 8px;
  width: auto !important;
  min-width: 108px;
  max-width: 150px;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  margin: 0;
  padding: 0 10px 0 7px !important;
  border: 1px solid #e5ddd6;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--deep);
  font: inherit;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.account-trigger:hover,
.account-menu[data-state="signed-in"] .account-trigger {
  border-color: rgba(217, 9, 24, 0.35);
  background: #fff8f4;
  box-shadow: 0 5px 14px rgba(43, 28, 22, 0.07);
}

.account-trigger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(217, 9, 24, 0.18);
}

.account-avatar {
  display: block;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  padding: 5px;
  border-radius: 5px;
  background: var(--brand-red);
  color: #fff;
}

.account-user-icon {
  display: block;
  width: 18px !important;
  height: 18px !important;
}

.account-trigger-label {
  display: block;
  overflow: hidden;
  max-width: 92px;
  text-align: left;
  color: var(--deep);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-chevron {
  flex: 0 0 14px;
  color: #887b73;
  transition: transform 0.2s ease;
}

.account-trigger[aria-expanded="true"] .account-chevron {
  transform: rotate(180deg);
}

.account-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  gap: 14px;
  width: 264px;
  padding: 16px;
  border: 1px solid #e7ded7;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(43, 28, 22, 0.14);
}

.account-panel-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eee7e1;
}

.account-panel-avatar {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 6px;
  background: #fff1ec;
  color: var(--brand-red);
  font-size: 0;
  line-height: 1;
}

.account-status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b8b4ae;
  flex-shrink: 0;
}

.account-status-dot[data-state="signed-in"] {
  background: #2e9b5f;
}

.account-panel-status-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.account-panel-status strong {
  color: var(--deep);
  font-size: 14px;
}

.account-panel-status span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.account-panel-status .account-panel-avatar {
  color: var(--brand-red);
  font-size: 0;
}

.account-panel-detail-row {
  display: flex !important;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.account-panel-detail-row > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-panel-actions {
  display: grid;
  gap: 4px;
}

.account-panel a,
.account-panel button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 8px 9px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #4a4240;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.account-panel a:hover,
.account-panel button:hover {
  background: #fff3ee;
  color: var(--brand-red);
}

.account-panel button {
  color: #746862;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--deep);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: clamp(48px, 7vw, 96px) clamp(20px, 5vw, 72px) clamp(36px, 5vw, 64px);
  background:
    linear-gradient(120deg, rgba(217, 9, 24, 0.08), rgba(240, 120, 24, 0.1) 48%, transparent 48%),
    var(--paper);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand-red);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

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

h1 {
  margin-bottom: 22px;
  color: var(--deep);
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  color: var(--deep);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  color: var(--deep);
  font-size: 22px;
  line-height: 1.32;
  letter-spacing: 0;
}

.hero-text {
  max-width: 680px;
  color: var(--muted);
  font-size: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.auth-demo {
  display: grid;
  gap: 14px;
  max-width: 620px;
  margin-top: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.auth-demo strong,
.auth-demo span {
  display: block;
}

.auth-demo strong {
  color: var(--deep);
}

.auth-demo span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
}

.auth-demo form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 110px auto auto auto;
  gap: 10px;
}

.auth-demo input {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

.auth-demo button,
.access-btn,
.resource-btn,
.permission-actions button {
  min-height: 42px;
  padding: 10px 14px;
  border: 0;
  border-radius: 6px;
  background: var(--brand-red);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

#logout-btn,
.permission-actions button:last-child {
  background: var(--deep);
}

#send-code-btn {
  min-width: 104px;
  background: var(--brand-orange);
}

#send-code-btn:disabled {
  cursor: wait;
  opacity: 0.62;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 6px;
  font-weight: 800;
}

.primary-btn {
  background: var(--brand-red);
  color: #fff;
  box-shadow: 0 14px 28px rgba(217, 9, 24, 0.2);
}

.secondary-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--deep);
}

.hero-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.hero-panel h3 {
  margin: 0;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  color: var(--muted);
  font-weight: 700;
}

.hero-services {
  margin: 0;
  padding: 16px 22px;
  list-style: none;
}

.hero-services li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.hero-services li:last-child {
  border-bottom: none;
}

.hero-services svg {
  width: 22px;
  height: 22px;
  color: var(--brand-red);
  flex-shrink: 0;
}

.hero-services div {
  display: flex;
  flex-direction: column;
}

.hero-services strong {
  font-size: 15px;
  color: var(--deep);
}

.hero-services span {
  font-size: 13px;
  color: var(--muted);
}

.hero-panel-note {
  margin: 0;
  padding: 12px 22px;
  background: #fff2e9;
  font-size: 13px;
  color: #8a5a28;
}

.hero-panel-note::before {
  content: "提示：";
  font-weight: 800;
}

.stats-band {
  padding: clamp(40px, 6vw, 64px) clamp(20px, 5vw, 72px);
  background: linear-gradient(135deg, #2a2020 0%, #3d2828 100%);
  color: #fff;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px;
}

.stat-number {
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 900;
  color: var(--brand-orange);
  line-height: 1;
}

.stat-label {
  margin-top: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.overview-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.overview-strip a {
  display: flex;
  flex-direction: column;
  padding: 22px 20px;
  background: #fff;
}

.overview-strip strong,
.overview-strip span {
  display: block;
}

.overview-strip strong {
  margin-bottom: 4px;
  color: var(--deep);
  font-size: 18px;
}

.overview-strip span {
  color: var(--muted);
  font-size: 14px;
}

section {
  padding: clamp(56px, 8vw, 104px) clamp(20px, 5vw, 72px);
}

.section-band {
  background: var(--soft);
}

.section-heading {
  max-width: 860px;
  margin-bottom: 32px;
}

.intro p {
  max-width: 980px;
  color: #3e3937;
  font-size: 19px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.service-grid article {
  min-height: 230px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.service-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff2e9, #fff7f0);
}

.service-icon svg {
  width: 26px;
  height: 26px;
  color: var(--brand-red);
}

.service-grid span {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--brand-orange);
  font-size: 15px;
  font-weight: 900;
}

.service-grid p,
.split p,
.process-list span {
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.split > div {
  padding: 28px;
  border-left: 4px solid var(--brand-red);
  background: #fff;
}

.course-grid,
.product-grid,
.lead-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.course-grid article,
.product-grid article {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.tag {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff2e9;
  color: var(--brand-red);
  font-size: 13px;
  font-weight: 800;
}

.course-grid article > span {
  display: inline-block;
  margin-top: 8px;
  color: var(--brand-orange);
  font-weight: 800;
}

.access-card,
.resource-card {
  display: flex;
  flex-direction: column;
}

.access-card .access-btn,
.resource-card .resource-btn {
  align-self: flex-start;
  margin-top: 16px;
}

.course-grid {
  display: block;
}

.course-catalog {
  margin-top: 24px;
}

.course-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.course-tab {
  min-height: 40px;
  padding: 8px 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.course-tab span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  margin-left: 8px;
  padding: 0 6px;
  border-radius: 999px;
  background: #f1f3f5;
  color: var(--ink);
  font-size: 12px;
}

.course-tab[aria-selected="true"] {
  background: var(--ink);
  color: #fff;
}

.course-tab[aria-selected="true"] span {
  background: var(--brand-orange);
  color: #fff;
}

.course-panel {
  margin-top: 18px;
}

.course-panel[hidden] {
  display: none;
}

.course-lesson-list {
  border-top: 1px solid var(--line);
}

.course-grid .course-lesson {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 84px;
  padding: 16px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.course-lesson-index {
  color: var(--brand-red);
  font-size: 14px;
  font-weight: 900;
}

.course-lesson-main {
  min-width: 0;
}

.course-lesson-main h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 17px;
}

.content-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.content-category-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 20px;
  padding: 2px 7px;
  border: 1px solid #d9e4ef;
  border-radius: 4px;
  background: #f3f7fb;
  color: #4c6680;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.access-flow .content-category-badge {
  display: inline-flex;
  margin-top: 8px;
}

.course-lesson-main p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.course-lesson-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 188px;
}

.course-lesson-action > span {
  color: var(--brand-orange);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.course-lesson-action .access-btn {
  min-width: 72px;
  margin-top: 0;
}

.access-card .access-btn:disabled,
.resource-card .resource-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.access-result {
  min-height: 0;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 700;
}

.access-result:empty {
  display: none;
}

.access-result[data-type="ok"] {
  border-color: rgba(57, 136, 91, 0.35);
  background: #eef8f1;
  color: #276a42;
}

.access-result[data-type="warn"] {
  border-color: rgba(240, 120, 24, 0.36);
  background: #fff7ec;
  color: #9a5718;
}

.content-dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
}

.content-dialog::backdrop {
  background: rgba(29, 29, 31, 0.72);
}

.content-dialog-shell {
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.content-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.content-dialog-header h2 {
  margin-bottom: 0;
  font-size: 30px;
}

.dialog-close {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--deep);
  font: inherit;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.dialog-close:hover {
  border-color: rgba(217, 9, 24, 0.32);
  color: var(--brand-red);
}

.content-dialog-summary {
  margin: 18px 0;
  color: var(--muted);
}

.course-player-panel {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  background: #151515;
}

.course-player-panel video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.course-player-watermark {
  position: absolute;
  top: 12px;
  right: 14px;
  pointer-events: none;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.72);
  user-select: none;
}

.resource-download-panel {
  padding: 24px 0 8px;
  border-top: 1px solid var(--line);
}

.resource-download-panel .primary-btn {
  display: inline-flex;
}

.product-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-grid p {
  color: var(--muted);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.news-grid article {
  display: grid;
  gap: 8px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.news-grid time,
.news-grid span {
  color: var(--muted);
  font-size: 14px;
}

.news-grid p {
  color: var(--muted);
}

.access-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.access-flow div {
  padding: 26px;
  border-left: 4px solid var(--brand-orange);
  background: #fff;
}

.access-flow strong,
.access-flow span {
  display: block;
}

.access-flow strong {
  margin-bottom: 8px;
  color: var(--deep);
  font-size: 20px;
}

.access-flow span {
  color: var(--muted);
}

.lead-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lead-grid form {
  display: grid;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.lead-grid label {
  display: grid;
  gap: 6px;
  color: #4a4240;
  font-weight: 800;
}

.lead-grid input,
.lead-grid select,
.lead-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  font: inherit;
}

.lead-grid textarea {
  min-height: 92px;
  resize: vertical;
}

.lead-grid button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: var(--brand-red);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.process-flow {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-top: 32px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 160px;
  position: relative;
}

.step-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand-red);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  position: relative;
  z-index: 2;
}

.step-content {
  margin-top: 16px;
  padding: 0 12px;
  text-align: center;
}

.step-content h3 {
  font-size: 17px;
  margin-bottom: 6px;
}

.step-content p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.step-arrow {
  position: absolute;
  top: 28px;
  right: -12px;
  font-size: 24px;
  color: var(--brand-orange);
  z-index: 1;
}

.process-step:last-child .step-arrow {
  display: none;
}

.contact {
  padding-top: 32px;
}

.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  gap: 34px;
  align-items: start;
  padding: clamp(28px, 5vw, 48px);
  border-radius: 8px;
  background: var(--deep);
  color: #fff;
}

.contact-card h2 {
  color: #fff;
}

.contact-card dl {
  display: grid;
  gap: 16px;
  margin: 0;
}

.contact-card div div,
.contact-card dl div {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.contact-card dt {
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 14px;
}

.contact-card dd {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 24px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.site-footer a {
  color: inherit;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--deep);
}

.admin-body {
  background: #f6f3ef;
}

.nav-action {
  min-height: 38px;
  padding: 8px 13px;
  border: 0;
  border-radius: 6px;
  background: var(--deep);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

#admin-session-status {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-login-panel {
  display: grid;
  min-height: calc(100vh - 72px);
  place-items: center;
  padding: clamp(32px, 6vw, 72px) clamp(20px, 5vw, 72px);
  background:
    linear-gradient(135deg, rgba(217, 9, 24, 0.08), rgba(240, 120, 24, 0.08)),
    #f6f3ef;
}

.admin-login-card {
  display: grid;
  gap: 14px;
  width: min(100%, 520px);
  padding: clamp(24px, 5vw, 36px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.admin-login-card h1 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 40px);
}

.admin-login-card p {
  margin: 0;
  color: var(--muted);
}

.admin-login-card label {
  display: grid;
  gap: 7px;
  color: #4a4240;
  font-weight: 800;
}

.admin-login-card input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font: inherit;
}

.admin-login-card button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: var(--brand-red);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.admin-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  padding: 24px clamp(20px, 5vw, 72px) 64px;
}

.admin-sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-sidebar strong {
  margin-bottom: 8px;
  color: var(--deep);
}

.admin-sidebar a {
  padding: 10px 12px;
  border-radius: 6px;
  color: #4a4240;
}

.admin-sidebar a:hover {
  background: #fff2e9;
  color: var(--brand-red);
}

.admin-content {
  display: grid;
  gap: 18px;
  padding: 0;
}

.admin-panel,
.admin-grid article {
  scroll-margin-top: 88px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-panel h1 {
  max-width: 960px;
  font-size: clamp(30px, 4vw, 48px);
}

.admin-panel p {
  max-width: 860px;
  color: var(--muted);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.admin-grid h2,
.admin-panel h2 {
  font-size: 24px;
}

.admin-grid ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.admin-overview-grid p {
  min-height: 48px;
  margin: 0 0 16px;
}

.admin-jump {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--deep);
  font-size: 13px;
  font-weight: 800;
}

.admin-jump:hover,
.admin-jump:focus-visible {
  border-color: rgba(217, 9, 24, 0.28);
  background: #fff2e9;
  color: var(--brand-red);
}

.data-model {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.data-model span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf9;
  color: var(--deep);
  font-weight: 800;
}

.permission-demo form {
  display: grid;
  gap: 14px;
  max-width: 620px;
  margin-top: 18px;
}

.manage-form {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
}

.manage-form h3 {
  margin-bottom: 4px;
  font-size: 20px;
}

.manage-form label {
  display: grid;
  gap: 7px;
  color: #4a4240;
  font-weight: 800;
}

.manage-form input,
.manage-form select,
.manage-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font: inherit;
}

.manage-form textarea {
  min-height: 86px;
  resize: vertical;
}

.manage-form button,
.lead-actions button {
  min-height: 42px;
  padding: 10px 14px;
  border: 0;
  border-radius: 6px;
  background: var(--brand-red);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.manage-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.manage-form-actions .form-cancel {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--deep);
}

.manage-form-actions .form-cancel:hover,
.manage-form-actions .form-cancel:focus-visible {
  background: #fff2e9;
  color: var(--brand-red);
}

.content-workspaces {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-top: 24px;
}

.content-workspace {
  min-width: 0;
  display: grid;
  align-content: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.content-workspace-head,
.content-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.content-workspace-head {
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.content-workspace-title {
  min-width: 0;
}

.content-type-kicker {
  display: block;
  color: var(--brand-orange);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.content-workspace-title h3 {
  margin: 2px 0 0;
  color: var(--deep);
  font-size: 24px;
}

.content-primary-action {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 13px;
  border: 0;
  border-radius: 6px;
  background: var(--brand-red);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.content-primary-action:hover,
.content-primary-action:focus-visible {
  background: #b80815;
}

.content-list-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.82fr);
  align-items: center;
  gap: 10px;
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--line);
}

.content-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.content-filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: #5d514c;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.content-filter-tab:hover,
.content-filter-tab:focus-visible {
  border-color: rgba(217, 9, 24, 0.28);
  color: var(--brand-red);
}

.content-filter-tab.is-active {
  border-color: var(--brand-red);
  background: var(--brand-red);
  color: #fff;
}

.content-filter-tab span {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  padding: 0 4px;
  border-radius: 9px;
  background: #f3eee8;
  color: var(--deep);
  font-size: 11px;
  line-height: 1;
}

.content-filter-tab.is-active span {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.content-filter-tab:focus-visible,
.content-list-item button:focus-visible,
.content-search input:focus-visible,
.content-search-clear:focus-visible,
.content-primary-action:focus-visible {
  outline: 2px solid rgba(217, 9, 24, 0.26);
  outline-offset: 2px;
}

.content-search {
  position: relative;
  display: block;
  min-width: 0;
}

.content-search input {
  width: 100%;
  min-height: 38px;
  padding: 8px 36px 8px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--deep);
  font: inherit;
  font-size: 13px;
}

.content-search input:focus {
  outline: 2px solid rgba(217, 9, 24, 0.16);
  outline-offset: 1px;
  border-color: var(--brand-red);
}

.content-search-clear {
  position: absolute;
  top: 50%;
  right: 5px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.content-search-clear:hover {
  background: #f7f1e9;
  color: var(--brand-red);
}

.content-list-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 8px 0 6px;
}

.content-list-overview strong {
  color: var(--deep);
  font-size: 14px;
}

.content-list-overview span,
.content-group-head span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.content-list-scroll {
  height: clamp(320px, 52vh, 520px);
  min-height: 320px;
  overflow-y: auto;
  padding: 6px 8px 4px 0;
  overscroll-behavior: contain;
  scrollbar-color: var(--brand-orange) #f3eee8;
  scrollbar-width: thin;
}

.content-group {
  padding: 0;
}

.content-group + .content-group {
  margin-top: 18px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}

.content-group-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 7px 0 6px;
  background: #fff;
  border-bottom: 1px solid rgba(231, 228, 223, 0.72);
}

.content-group-list {
  display: grid;
  gap: 6px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.content-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf9;
}

.content-group-empty {
  display: block;
  padding: 12px 4px;
  color: var(--muted);
  font-size: 14px;
}

.content-item-main {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.content-item-title {
  display: flex;
  align-items: center;
  min-width: 0;
  flex-wrap: wrap;
  gap: 5px;
}

.content-item-title .mock-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-item-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  color: #8a7d75;
  font-size: 11px;
  line-height: 1.35;
}

.content-config-badge,
.content-source-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #f3eee8;
  color: #766961;
  font-size: 11px;
  font-weight: 800;
}

.content-config-badge[data-config="ready"] {
  background: #eef8f1;
  color: #276a42;
}

.content-config-badge[data-config="missing"] {
  background: #fff7ec;
  color: #9a5718;
}

.content-source-badge {
  background: #eef3fa;
  color: #3c5e85;
}

.mock-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.mock-title {
  color: var(--deep);
  font-weight: 800;
}

.mock-badge {
  justify-self: start;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff2e9;
  color: var(--brand-red);
  font-size: 12px;
  font-weight: 800;
}

.content-access-badge[data-access="free"] {
  background: #eef8f1;
  color: #276a42;
}

.content-access-badge[data-access="paid"] {
  background: #fff2e9;
  color: var(--brand-red);
}

.mock-status {
  justify-self: start;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef8f1;
  color: #276a42;
  font-size: 12px;
  font-weight: 800;
}

.mock-status[data-status="draft"] {
  background: #fff7ec;
  color: #9a5718;
}

.mock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.mock-actions button {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--deep);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.mock-actions button:hover {
  border-color: rgba(217, 9, 24, 0.28);
  background: #fff2e9;
  color: var(--brand-red);
}

.content-list-item .mock-actions {
  align-self: center;
  justify-content: flex-end;
  margin-top: 0;
}

.content-list-item .mock-actions button {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}

.content-list-item .content-status-action {
  background: #fffaf4;
}

.content-list-item .content-danger-action {
  color: #9a3d36;
}

.content-list-item .content-danger-action:hover {
  border-color: rgba(154, 61, 54, 0.35);
  background: #fff0ee;
  color: #9a3d36;
}

.content-empty-state {
  display: grid;
  min-height: 160px;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 24px 12px;
  color: var(--muted);
  text-align: center;
}

.content-empty-state strong {
  color: var(--deep);
  font-size: 14px;
}

.content-empty-state span {
  font-size: 12px;
}

.content-editor-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
}

.content-editor-dialog::backdrop {
  background: rgba(29, 29, 31, 0.62);
}

.content-editor-shell {
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.content-editor-form {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.content-editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.content-editor-form h2 {
  margin: 0;
  color: var(--deep);
  font-size: 30px;
}

.content-editor-note {
  margin: 14px 0 20px;
  color: var(--muted);
  font-size: 14px;
}

.content-editor-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.content-editor-field-wide {
  grid-column: 1 / -1;
}

.content-editor-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 22px;
  padding-top: 18px;
  padding-bottom: 2px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.content-editor-form .dialog-close {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--deep);
  font-size: 28px;
  line-height: 1;
}

.content-editor-form .dialog-close:hover,
.content-editor-form .dialog-close:focus-visible {
  border-color: rgba(217, 9, 24, 0.32);
  background: #fff8f4;
  color: var(--brand-red);
}

@media (max-width: 720px) {
  .content-list-tools {
    grid-template-columns: 1fr;
  }

  .content-editor-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .content-editor-shell {
    max-height: calc(100vh - 20px);
    padding: 20px;
  }

  .content-editor-fields {
    grid-template-columns: 1fr;
  }

  .content-editor-field-wide {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .content-workspace {
    padding: 14px;
  }

  .content-workspace-head {
    flex-direction: column;
    align-items: stretch;
  }

  .content-primary-action {
    width: 100%;
  }

  .content-list-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .content-list-item .mock-actions {
    justify-content: flex-start;
  }

  .content-list-scroll {
    height: clamp(260px, 52vh, 420px);
    min-height: 260px;
  }
}

.permission-demo label {
  display: grid;
  gap: 8px;
  color: #4a4240;
  font-weight: 800;
}

.permission-demo input {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

.permission-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.permission-list {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
}

.permission-list ul {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.user-filter {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 12px;
}

.user-filter label {
  display: grid;
  flex: 1 1 260px;
  gap: 8px;
  color: #4a4240;
  font-weight: 800;
}

.user-filter input {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

.user-summary {
  margin: 0 0 12px;
  font-weight: 800;
}

.lead-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.lead-actions button:last-child {
  background: var(--deep);
}

.lead-table {
  display: grid;
  gap: 12px;
}

.lead-table article,
.empty-note {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
}

.lead-table article {
  display: grid;
  gap: 5px;
}

.lead-table strong {
  color: var(--deep);
}

.lead-table span,
.lead-table small,
.empty-note {
  color: var(--muted);
}

.lead-table p {
  margin: 0;
  color: #4a4240;
}

@media (max-width: 980px) {
  .hero,
  .overview-strip,
  .service-grid,
  .product-grid,
  .news-grid,
  .access-flow,
  .lead-grid,
  .contact-card,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .process-flow {
    flex-direction: column;
    align-items: stretch;
  }

  .process-step {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
  }

  .process-step:last-child {
    border-bottom: none;
  }

  .step-icon {
    width: 44px;
    height: 44px;
    font-size: 18px;
    flex-shrink: 0;
  }

  .step-content {
    margin-top: 0;
    padding: 0;
    text-align: left;
    flex: 1;
  }

  .step-content h3 {
    font-size: 16px;
  }

  .step-arrow {
    display: none;
  }

  .course-grid {
    grid-template-columns: 1fr;
  }

  .admin-shell,
  .admin-grid,
  .content-workspaces {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
  }

  .lead-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .site-header {
    min-height: 66px;
    padding-inline: 16px;
  }

  .brand img {
    width: 42px;
    height: 42px;
  }

  .brand span {
    font-size: 18px;
  }

  .menu-toggle {
    display: inline-block;
  }

  .site-nav {
    position: fixed;
    top: 65px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
    z-index: 100;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 12px;
  }

  .account-menu {
    margin-left: auto;
  }

  .account-trigger {
    min-width: 96px;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    padding: 0 8px 0 6px !important;
  }

  .account-avatar {
    flex-basis: 26px;
    width: 26px;
    height: 26px;
    padding: 4px;
  }

  .account-trigger-label {
    max-width: 80px;
    font-size: 13px;
  }

  .account-panel {
    right: -4px;
    width: min(264px, calc(100vw - 32px));
  }

  #admin-session-status,
  .nav-action {
    width: 100%;
    text-align: left;
  }

  .hero {
    padding-top: 100px;
  }

  h1 {
    font-size: 40px;
  }

  .hero-text,
  .intro p {
    font-size: 17px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .primary-btn,
  .secondary-btn,
  .auth-demo button,
  .access-btn,
  .resource-btn,
  .permission-actions button {
    width: 100%;
  }

  .course-tabs {
    display: flex;
    width: 100%;
  }

  .course-tab {
    flex: 1;
    min-width: 0;
  }

  .course-grid .course-lesson {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px 12px;
    align-items: start;
    padding: 16px 0;
  }

  .course-lesson-action {
    grid-column: 2;
    justify-content: space-between;
    min-width: 0;
  }

  .course-lesson-action .access-btn {
    width: auto;
    min-width: 72px;
  }

  .auth-demo form {
    grid-template-columns: 1fr;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .service-grid article {
    min-height: 0;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .overview-strip {
    padding: 0;
  }

  .overview-strip a {
    padding: 16px;
  }

  .hero-panel {
    margin-top: 0;
  }

  .hero-panel h3 {
    font-size: 14px;
  }

  .hero-services {
    padding: 12px 16px;
  }

  .hero-services li {
    padding: 8px 0;
  }

  .hero-panel-note {
    font-size: 12px;
  }
}
