:root {
  scroll-behavior: smooth;
  --bg: #f4f4f4;
  --text: #333;
  --muted: #666;
  --header: #1a1a1a;
  --card: #ffffff;
  --soft: #f9f9f9;
  --soft-2: #eeeeee;
  --line: #d9d9d9;
  --accent: #007bff;
  --accent-hover: #005fcc;
  --good: #21a366;
  --danger: #d93025;
  --warning-bg: #fff7e0;
  --warning-border: #ffd36a;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-strong: 0 4px 12px rgba(0,0,0,0.15);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

h1 {
  font-size: clamp(2rem, 7vw, 3.2rem);
  line-height: 1.05;
  margin-bottom: 8px;
}

h2 {
  margin-bottom: 14px;
}

a {
  color: inherit;
}

.section {
  padding: 40px 20px 60px;
  max-width: 1000px;
  margin: 40px auto 50px;
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.page-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: var(--shadow-strong);
  padding: clamp(22px, 6vw, 42px);
  background:
    linear-gradient(rgba(0,0,0,0.62), rgba(0,0,0,0.62)),
    url('https://images.squarespace-cdn.com/content/5965047fe4fcb50195c18796/e19e0aaf-b070-4d49-86f5-cbe1c33a1f50/prod-banner.jpg?content-type=image%2Fjpeg') center/cover;
  color: white;
  min-height: 210px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.eyebrow {
  color: white;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .76rem;
  font-weight: 800;
  margin-bottom: 8px;
  opacity: .88;
}

.muted {
  color: var(--muted);
}

.page-hero .muted {
  color: rgba(255,255,255,.88);
  max-width: 560px;
}

.small {
  font-size: .82rem;
  margin-bottom: 3px;
}

.admin-link,
.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn,
.role-tab,
.mode-btn {
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 6px 4px;
  padding: 10px 16px;
  background: var(--soft-2);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.3s ease, transform 0.2s, color 0.2s;
  white-space: nowrap;
  box-shadow: none;
}

.admin-link {
  background: rgba(255,255,255,.92);
  color: #333;
}

.primary-btn,
.role-tab.active,
.mode-btn.active {
  background: var(--accent);
  color: white;
  font-weight: 700;
}

.secondary-btn:hover,
.ghost-btn:hover,
.admin-link:hover,
.role-tab:hover,
.mode-btn:hover {
  background: #ddd;
  transform: scale(1.03);
}

.primary-btn:hover,
.role-tab.active:hover,
.mode-btn.active:hover {
  background: var(--accent-hover);
}

.danger-btn {
  background: rgba(217,48,37,.12);
  color: var(--danger);
  font-weight: 700;
}

.role-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0 14px;
  scrollbar-width: none;
}

.role-strip::-webkit-scrollbar {
  display: none;
}

.mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.mode-btn {
  width: 100%;
  margin: 0;
}

.card,
.progress-card,
.check-item,
.info-item {
  background: var(--soft);
  padding: 16px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  border: 1px solid var(--line);
}

.progress-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-bottom: 16px;
}

.progress-bar {
  grid-column: 1 / -1;
  height: 10px;
  background: var(--soft-2);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--good);
  transition: .25s ease;
}

.content-stack {
  display: grid;
  gap: 13px;
}

.section-title {
  margin: 22px 4px 8px;
  color: var(--accent);
  font-size: .92rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.check-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.check-main input {
  width: 24px;
  height: 24px;
  accent-color: var(--good);
  flex: 0 0 auto;
  margin-top: 1px;
}

.check-item.done {
  opacity: .68;
}

.check-item.done h3 {
  text-decoration: line-through;
}

.check-item h3,
.info-item h3 {
  margin-bottom: 6px;
  font-size: 1.08rem;
}

.subpoints {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--text);
}

.subpoints li {
  margin: 5px 0;
}

.warning {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: var(--text);
}

.item-img,
.info-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 12px;
  border: 1px solid var(--line);
}

.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 32px 10px;
}

.admin-shell {
  display: grid;
  gap: 16px;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: end;
}

.admin-card {
  padding: 16px;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

label span {
  color: var(--muted);
  font-size: .85rem;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: #333;
  padding: 12px;
  outline: none;
}

textarea {
  resize: vertical;
}

.section-heading-row,
.button-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.editor-list {
  display: grid;
  gap: 14px;
}

.editor-block {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
}

.editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.subpoint-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin: 8px 0;
}

.remove-small {
  border-radius: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(217,48,37,.25);
  background: rgba(217,48,37,.12);
  color: var(--danger);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: #111;
  color: white;
  border: 1px solid var(--line);
  padding: 12px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
  z-index: 2000;
}

.toast.show {
  opacity: 1;
}

@media (max-width: 768px) {
  .section {
    margin: 18px 10px 32px;
    padding: 14px 12px 26px;
    border-radius: 8px;
  }

  .page-hero {
    min-height: 180px;
    padding: 20px;
    flex-direction: column;
  }

  .page-hero h1 {
    font-size: 2rem;
  }

  .admin-link {
    width: fit-content;
  }

  .admin-toolbar,
  .editor-grid,
  .mode-toggle {
    grid-template-columns: 1fr;
  }

  .check-main {
    gap: 10px;
  }

  .button-row button,
  .section-heading-row button {
    width: 100%;
  }
}

.three-tabs {
  grid-template-columns: repeat(3, 1fr);
}

details {
  background: #f5f5f5;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 12px;
}

summary {
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 10px;
}

.cheatsheet-table {
  width: 100%;
  border-collapse: collapse;
}

.cheatsheet-table td,
.cheatsheet-table th {
  border: 1px solid #ddd;
  padding: 8px;
}

.cheatsheet-img {
  width: 80px;
}

.back-home {
  margin-top: 40px;
  padding: 20px;
  display: flex;
  justify-content: center;
}

.home-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #111;
  color: white;
  padding: 14px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.home-btn:hover {
  background: #007bff;
  transform: translateY(-2px);
}