:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --bg-strong: #eef3f8;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-solid: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --soft: #f2f2f7;
  --line: rgba(60, 60, 67, 0.16);
  --line-strong: rgba(60, 60, 67, 0.25);
  --accent: #0071e3;
  --accent-strong: #0057c2;
  --mint: #35c759;
  --amber: #ff9f0a;
  --rose: #ff375f;
  --ink: #101014;
  --shadow: 0 18px 50px rgba(24, 39, 75, 0.12);
  --shadow-soft: 0 10px 28px rgba(24, 39, 75, 0.08);
  --radius: 8px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  font-family: var(--font);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(245, 247, 251, 0.96), rgba(239, 244, 248, 0.96)),
    #f5f7fb;
  color: var(--text);
  font-family: var(--font);
}

#app {
  min-height: 100vh;
}

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

button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 10px 15px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

button:hover,
.button-link:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
  box-shadow: none;
}

.button-link.primary,
button[type="submit"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.button-link.primary:hover,
button[type="submit"]:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.button-link.disabled {
  opacity: 0.55;
  pointer-events: none;
}

.secondary-button,
.load-more,
.button-link:not(.primary) {
  background: rgba(255, 255, 255, 0.82);
  border-color: var(--line);
  color: var(--accent);
  box-shadow: none;
}

.icon-button {
  min-width: 42px;
  background: var(--soft);
  border-color: var(--line);
  color: var(--text);
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  font-size: 64px;
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: 0;
}

h4 {
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  min-height: 44px;
  padding: 0 13px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

textarea {
  min-height: 110px;
  padding: 12px 13px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(0, 113, 227, 0.72);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
  background: #ffffff;
}

.hidden {
  display: none !important;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.muted,
.form-message,
.danger-text {
  color: var(--muted);
  line-height: 1.45;
}

.danger-text {
  color: var(--rose);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-weight: 850;
  text-decoration: none;
}

.brand-mark::before {
  content: "";
  width: 23px;
  height: 23px;
  border-radius: 7px;
  background:
    linear-gradient(135deg, #0071e3, #35c759 56%, #ff9f0a);
  box-shadow: 0 10px 20px rgba(0, 113, 227, 0.22);
}

.site-nav,
.public-nav {
  width: min(1380px, calc(100% - 48px));
  margin: 0 auto;
  padding: 22px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.marketing-shell,
.app-shell {
  width: min(1460px, calc(100% - 44px));
  margin: 0 auto;
}

.marketing-shell {
  padding-bottom: 44px;
}

.welcome-hero {
  min-height: calc(100vh - 84px);
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 0.85fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: center;
  padding: clamp(44px, 7vw, 96px) 0;
}

.welcome-copy {
  max-width: 840px;
}

.welcome-copy p:not(.eyebrow) {
  max-width: 680px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 22px;
  line-height: 1.42;
}

.hero-actions,
.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.welcome-showcase {
  min-height: 470px;
  display: grid;
  place-items: center;
}

.showcase-window {
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(24px);
}

.showcase-bar {
  height: 12px;
  width: 112px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rose), var(--amber), var(--mint));
  margin-bottom: 18px;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.showcase-grid span,
.showcase-grid img {
  min-height: 132px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.showcase-grid img {
  width: 100%;
  height: 132px;
  object-fit: cover;
  display: block;
}

.showcase-grid span {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(240, 244, 248, 0.78)),
    linear-gradient(135deg, rgba(0, 113, 227, 0.22), rgba(53, 199, 89, 0.14));
}

.home-image-panel {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
}

.home-image-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 1fr) 120px auto;
  gap: 12px;
  align-items: end;
}

.home-image-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.home-image-card {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.home-image-card img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  background: #edf1f6;
}

.home-image-card strong,
.home-image-card span {
  display: block;
}

.home-image-card span {
  color: var(--muted);
  font-size: 12px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(120deg, rgba(245, 247, 251, 0.9), rgba(238, 245, 242, 0.86)),
    #f5f7fb;
}

.login-card {
  width: min(1120px, 100%);
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(340px, 440px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.login-visual {
  position: relative;
  min-height: 520px;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(16, 16, 20, 0.18), rgba(16, 16, 20, 0.58)),
    url("https://images.unsplash.com/photo-1556911220-bff31c812dba?auto=format&fit=crop&w=1400&q=80");
  background-size: cover;
  background-position: center;
}

.glass-card {
  position: absolute;
  width: 210px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
  padding: 18px;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
}

.glass-card span {
  display: block;
  font-size: 42px;
  font-weight: 850;
  line-height: 1;
}

.glass-card strong {
  display: block;
  margin-top: 8px;
}

.glass-card-large {
  left: 28px;
  bottom: 28px;
}

.glass-card-small {
  right: 28px;
  top: 28px;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: clamp(28px, 4vw, 52px);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(24px);
}

.login-panel h1 {
  font-size: 58px;
}

.login-form {
  display: grid;
  gap: 15px;
  margin-top: 8px;
}

.app-shell {
  padding: 28px 0 48px;
}

.topbar,
.sync-panel,
.job-panel,
.sidebar,
.videos-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(24px);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(24px, 4vw, 44px);
  margin-bottom: 16px;
}

.admin-topbar {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(234, 244, 255, 0.82)),
    var(--panel-solid);
}

.topbar-copy {
  max-width: 980px;
}

.topbar-copy .brand-mark {
  margin-bottom: 18px;
}

.topbar-copy p:not(.eyebrow) {
  max-width: 720px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.topbar-actions,
.section-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.mode-pill,
.publish-pill,
.recipe-job-meta span,
.dialog-stats span,
.preview-chips span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 750;
}

.mode-pill {
  background: rgba(0, 113, 227, 0.1);
  color: var(--accent);
  border-color: rgba(0, 113, 227, 0.2);
}

.publish-pill.published {
  background: rgba(53, 199, 89, 0.12);
  color: #177238;
  border-color: rgba(53, 199, 89, 0.24);
}

.publish-pill.draft {
  background: rgba(255, 159, 10, 0.13);
  color: #8a5a00;
  border-color: rgba(255, 159, 10, 0.28);
}

.sync-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  gap: 22px;
  align-items: end;
  padding: 22px;
  margin-bottom: 16px;
}

.sync-copy p {
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.45;
}

.sync-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.job-panel {
  padding: 20px;
  margin-bottom: 16px;
}

.job-header,
.section-header,
.recipe-job-header,
.landing-editor-header,
.ebook-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(120, 120, 128, 0.18);
  margin: 16px 0;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--mint));
  transition: width 260ms ease;
}

.metrics-row,
.selected-channel-stats,
.landing-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

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

.metrics-row div,
.stat-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  padding: 15px;
}

.stat-card strong,
.metrics-row strong {
  display: block;
  color: var(--text);
  font-size: 30px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.stat-card span,
.metrics-row span,
.stat-card small {
  display: block;
  color: var(--muted);
  margin-top: 7px;
  font-size: 13px;
  font-weight: 700;
}

.stat-card small {
  font-weight: 600;
}

.event-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  display: grid;
  gap: 7px;
  max-height: 160px;
  overflow: auto;
}

.library-grid {
  display: grid;
  grid-template-columns: 370px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.sidebar,
.videos-panel {
  padding: 18px;
  min-height: 420px;
}

.channel-list,
.video-list {
  margin-top: 15px;
  display: grid;
  gap: 10px;
}

.channel-card,
.video-card,
.public-video-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  text-align: left;
  box-shadow: none;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.channel-card {
  display: block;
  width: 100%;
  padding: 14px;
  cursor: pointer;
}

.channel-card:hover,
.video-card:hover,
.public-video-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 113, 227, 0.28);
  box-shadow: var(--shadow-soft);
}

.channel-card.active {
  border-color: rgba(0, 113, 227, 0.62);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(238, 247, 255, 0.9));
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.channel-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.card-title {
  min-width: 0;
  color: var(--text);
  font-weight: 850;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.card-meta {
  margin-top: 9px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.channel-metrics {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  color: var(--muted);
  font-size: 13px;
}

.channel-metrics span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.channel-metrics strong {
  color: var(--text);
}

.selected-channel-stats {
  margin-top: 18px;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 10px;
  margin-top: 16px;
}

.landing-editor,
.recipe-job-panel,
.ai-analysis-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(248, 250, 252, 0.86);
  margin-top: 16px;
  padding: 16px;
}

.landing-editor.empty-state,
.empty-state {
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.56);
  padding: 24px;
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 350px);
  gap: 16px;
  margin-top: 16px;
}

.landing-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  grid-column: 1;
}

.landing-form .wide-field,
.landing-form .check-row,
.landing-actions {
  grid-column: 1 / -1;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: auto;
  min-height: 0;
}

.landing-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.ebook-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.landing-actions span,
.ebook-panel p {
  color: var(--muted);
  line-height: 1.4;
}

.publishing-preview {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(235, 244, 255, 0.82));
  padding: 16px;
  grid-column: 2;
  grid-row: 1;
}

.publishing-preview p:not(.eyebrow) {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.42;
}

.preview-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.ebook-panel {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.ebook-panel.empty-state {
  border: 1px dashed var(--line-strong);
  padding: 16px;
}

.navigation-editor {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  padding: 14px;
}

.section-header.compact {
  margin-bottom: 12px;
}

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

.menu-editor-row {
  display: grid;
  grid-template-columns: 86px minmax(130px, 1fr) 150px minmax(170px, 1fr) minmax(190px, 1.2fr) 88px 92px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(248, 250, 252, 0.92);
}

.menu-editor-row input,
.menu-editor-row select {
  min-height: 38px;
}

.menu-enabled,
.menu-new-tab {
  min-height: 38px;
  align-content: center;
  color: var(--text);
}

.recipe-job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.video-list {
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
}

.video-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 13px;
  padding: 10px;
  cursor: pointer;
}

.thumb {
  width: 132px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 7px;
  background: #e5e5ea;
}

.status {
  font-weight: 850;
}

.status.available {
  color: #177238;
}

.status.unavailable {
  color: #9b6400;
}

.status.failed {
  color: var(--rose);
}

.status.ai {
  color: var(--accent);
  text-transform: capitalize;
}

.status.recipe {
  color: #177238;
}

.load-more {
  width: 100%;
  margin-top: 14px;
}

dialog {
  width: min(1060px, calc(100% - 32px));
  max-height: calc(100vh - 34px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  color: var(--text);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.26);
}

dialog::backdrop {
  background: rgba(10, 10, 12, 0.46);
  backdrop-filter: blur(10px);
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.dialog-header h2 {
  font-size: 34px;
}

.dialog-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}

.dialog-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}

.dialog-actions span {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.ai-analysis-panel {
  margin: 18px 20px;
}

.ai-analysis-panel.empty-state {
  margin: 18px 20px;
}

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

.analysis-header h3 {
  text-transform: capitalize;
}

.analysis-badges,
.analysis-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.analysis-details {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.analysis-summary {
  margin-top: 12px;
  line-height: 1.5;
}

.recipe-text {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  max-height: 320px;
}

pre {
  margin: 0;
  padding: 18px 20px;
  white-space: pre-wrap;
  max-height: 62vh;
  overflow: auto;
  color: #242428;
  font: 14px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.landing-shell {
  min-height: 100vh;
  background:
    linear-gradient(180deg, #fbfcff, #f4f8f6 54%, #f8f6f2),
    #fbfcff;
  color: #1d1d1f;
}

.landing-hero {
  width: min(1380px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 590px;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 0.92fr);
  gap: clamp(28px, 5vw, 76px);
  align-items: center;
  padding: clamp(38px, 6vw, 82px) 0 34px;
}

.landing-hero-copy {
  max-width: 850px;
}

.landing-hero-copy p:not(.eyebrow) {
  max-width: 760px;
  margin-top: 18px;
  color: #4d535c;
  font-size: 22px;
  line-height: 1.45;
}

.landing-visual {
  min-width: 0;
}

.landing-cover-stack {
  display: grid;
  gap: 14px;
}

.cover-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(235, 244, 255, 0.86));
  box-shadow: var(--shadow);
  padding: 22px;
}

.cover-card strong {
  display: block;
  font-size: 42px;
  line-height: 1;
}

.cover-card span {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-weight: 750;
}

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

.thumbnail-mosaic img {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 28px rgba(24, 39, 75, 0.12);
}

.landing-stats {
  width: min(1380px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 0 24px;
}

.landing-workbench {
  width: min(1380px, calc(100% - 48px));
  margin: 0 auto;
  padding: 8px 0 52px;
}

.landing-tools {
  position: sticky;
  top: 10px;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 150px 220px;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(24px);
  padding: 12px;
}

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

.range-control input {
  min-height: 26px;
  padding: 0;
  accent-color: var(--accent);
  box-shadow: none;
}

.results-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin: 28px 0 16px;
}

#publicResultCount {
  color: var(--muted);
  font-weight: 750;
}

.public-video-grid {
  display: grid;
  gap: 16px;
}

.public-video-grid.size-small {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.public-video-grid.size-medium {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.public-video-grid.size-large {
  grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
}

.public-video-card {
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.9);
}

.public-thumb-wrap {
  position: relative;
  overflow: hidden;
  background: #e6e8ec;
}

.public-thumb-wrap img {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  transition: transform 260ms ease;
}

.public-video-card:hover .public-thumb-wrap img {
  transform: scale(1.035);
}

.public-thumb-wrap span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  border-radius: 999px;
  background: rgba(16, 16, 20, 0.72);
  color: #ffffff;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 850;
  backdrop-filter: blur(10px);
}

.public-card-copy {
  padding: 14px;
}

.public-card-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.public-video-card h3 {
  margin: 9px 0 0;
  font-size: 18px;
  line-height: 1.22;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.public-video-card p {
  margin-top: 9px;
  color: #4d535c;
  line-height: 1.42;
}

.video-embed {
  background: #101014;
  border-radius: var(--radius);
  overflow: hidden;
}

.video-embed iframe,
.video-embed img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
  object-fit: cover;
}

.public-video-detail {
  padding: 20px;
  display: grid;
  gap: 14px;
}

.detail-summary {
  color: #383c44;
  font-size: 16px;
  line-height: 1.55;
}

.public-recipe {
  max-height: 380px;
}

.transcript-details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #ffffff;
}

.transcript-details summary {
  cursor: pointer;
  font-weight: 850;
}

.publication-shell {
  background: #f8f5f0;
  color: #201f1d;
}

.publication-nav {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0;
  border-bottom: 1px solid rgba(58, 48, 39, 0.14);
}

.publication-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 18px;
  align-items: center;
  color: #4d463e;
  font-weight: 750;
}

.publication-menu a {
  text-decoration: none;
}

.publication-menu a:hover {
  color: #111111;
}

.publication-layout {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 740px) 300px;
  gap: 44px;
  align-items: start;
  padding: 30px 0 72px;
}

.publication-main {
  min-width: 0;
}

.publication-hero,
.publication-section,
.post-article {
  border-bottom: 1px solid rgba(58, 48, 39, 0.14);
  padding: 26px 0;
}

.publication-hero h1,
.recipe-index-head h1,
.archive-index h1,
.about-page h1,
.post-article h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.98;
  font-weight: 500;
}

.publication-hero p:not(.eyebrow),
.about-page p,
.detail-summary {
  margin-top: 16px;
  color: #5f574f;
  font-size: 19px;
  line-height: 1.55;
}

.publication-sidebar {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 16px;
}

.sidebar-profile,
.sidebar-stats,
.sidebar-links {
  border: 1px solid rgba(58, 48, 39, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 252, 247, 0.82);
  padding: 16px;
}

.sidebar-profile img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
}

.sidebar-profile p {
  margin-top: 8px;
  color: #625a52;
  line-height: 1.45;
}

.sidebar-actions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.sidebar-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sidebar-section-title {
  margin-bottom: 10px;
  color: #8b4d2b;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar-links {
  display: grid;
  gap: 8px;
}

.sidebar-links a,
.recipe-mode-grid a,
.archive-category-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(58, 48, 39, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
  padding: 10px 12px;
  color: #2c2925;
  text-decoration: none;
}

.sidebar-links strong,
.recipe-mode-grid strong,
.archive-category-card strong {
  color: #8b4d2b;
}

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

.publication-card {
  border: 1px solid rgba(58, 48, 39, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 252, 247, 0.86);
  overflow: hidden;
}

.publication-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.publication-card-copy {
  padding: 14px;
}

.publication-card-copy h3 {
  margin-top: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 500;
}

.publication-card-copy p {
  margin-top: 9px;
  color: #625a52;
  line-height: 1.45;
}

.publication-tools {
  position: static;
  grid-template-columns: minmax(220px, 1fr) 180px;
  margin: 0 0 16px;
  box-shadow: none;
  backdrop-filter: none;
}

.recipe-mode-grid,
.archive-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.about-actions,
.post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}

.post-actions {
  margin-bottom: 18px;
}

#shareStatus {
  color: var(--muted);
  font-weight: 750;
}

.post-article .video-embed {
  margin-top: 18px;
}

@media (max-width: 1120px) {
  .library-grid,
  .editor-layout,
  .landing-hero,
  .publication-layout,
  .welcome-hero,
  .login-card {
    grid-template-columns: 1fr;
  }

  .landing-form,
  .publishing-preview,
  .navigation-editor {
    grid-column: 1;
    grid-row: auto;
  }

  .publication-sidebar {
    position: static;
  }

  .login-visual {
    min-height: 360px;
  }
}

@media (max-width: 860px) {
  h1 {
    font-size: 46px;
  }

  h2 {
    font-size: 26px;
  }

  .welcome-copy p:not(.eyebrow),
  .landing-hero-copy p:not(.eyebrow) {
    font-size: 18px;
  }

  .login-panel h1 {
    font-size: 44px;
  }

  .dialog-header h2 {
    font-size: 28px;
  }

  .marketing-shell,
  .app-shell,
  .landing-hero,
  .landing-stats,
  .landing-workbench,
  .site-nav,
  .public-nav,
  .publication-layout {
    width: min(100% - 24px, 720px);
  }

  .topbar,
  .sync-panel,
  .job-header,
  .section-header,
  .recipe-job-header,
  .landing-editor-header,
  .ebook-row,
  .results-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .ebook-actions {
    justify-content: flex-start;
  }

  .sidebar .section-header button {
    align-self: flex-start;
  }

  .sync-panel,
  .sync-form,
  .home-image-form,
  .filters,
  .landing-tools,
  .landing-form,
  .menu-editor-row,
  .publication-tools {
    grid-template-columns: 1fr;
  }

  .metrics-row,
  .selected-channel-stats,
  .landing-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .video-list,
  .publication-card-grid,
  .recipe-mode-grid,
  .archive-category-grid,
  .public-video-grid.size-small,
  .public-video-grid.size-medium,
  .public-video-grid.size-large {
    grid-template-columns: 1fr;
  }

  .video-card {
    grid-template-columns: 1fr;
  }

  .home-image-card {
    grid-template-columns: 64px 1fr;
  }

  .home-image-card button {
    grid-column: 1 / -1;
  }

  .thumb {
    width: 100%;
  }

  .landing-tools {
    position: static;
  }

  .publication-nav {
    align-items: flex-start;
  }

  .publication-menu {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 38px;
  }

  h2 {
    font-size: 24px;
  }

  .login-shell {
    padding: 14px;
  }

  .login-card {
    min-height: 0;
  }

  .login-visual {
    display: none;
  }

  .metrics-row,
  .selected-channel-stats,
  .landing-stats,
  .thumbnail-mosaic {
    grid-template-columns: 1fr;
  }

  .topbar,
  .sync-panel,
  .job-panel,
  .sidebar,
  .videos-panel,
  .landing-editor,
  .recipe-job-panel {
    padding: 14px;
  }
}
