:root {
  --bg: #fbf6ee;
  --surface: #fffaf2;
  --surface-soft: #f4ede3;
  --text: #0b253f;
  --muted: #4d6072;
  --line: #c9c4ba;
  --green: #6f7d66;
  --header-height: 88px;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
}

.workshop-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  min-height: var(--header-height);
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 14px clamp(20px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 246, 238, 0.96);
  backdrop-filter: blur(14px);
}

.workshop-brand {
  color: var(--text);
  font-size: 26px;
  font-weight: 800;
  text-decoration: none;
}

.workshop-heading { min-width: 0; }
.workshop-heading p {
  margin: 0 0 2px;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.workshop-heading h1 {
  margin: 0;
  overflow: hidden;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workshop-back {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.workshop-back::before { margin-right: 8px; content: "\2190"; }
.workshop-back:hover, .workshop-back:focus-visible { color: var(--green); }

.workshop-content {
  min-height: calc(100dvh - var(--header-height));
  padding: clamp(18px, 3vw, 42px);
}

.slide-shell {
  width: min(100%, 1280px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(26, 37, 50, 0.1);
}

.slide-shell iframe {
  display: block;
  width: 100%;
  border: 0;
  aspect-ratio: 1440 / 839;
}

.notebook-shell {
  width: min(100%, 1040px);
  margin: 0 auto;
}

.notebook-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.notebook-download {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.notebook-cell {
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.notebook-cell.markdown-cell {
  padding: 26px clamp(22px, 4vw, 44px);
  border-color: transparent;
  background: transparent;
}

.markdown-cell h1,
.markdown-cell h2,
.markdown-cell h3 {
  margin: 1.2em 0 0.45em;
  font-family: "Cormorant Garamond", Georgia, serif;
  line-height: 1.08;
}

.markdown-cell h1:first-child,
.markdown-cell h2:first-child,
.markdown-cell h3:first-child { margin-top: 0; }
.markdown-cell h1 { font-size: clamp(38px, 5vw, 62px); }
.markdown-cell h2 { font-size: clamp(30px, 4vw, 46px); }
.markdown-cell h3 { font-size: clamp(24px, 3vw, 34px); }
.markdown-cell p, .markdown-cell li { color: #253c51; line-height: 1.72; }
.markdown-cell a { color: var(--green); }
.markdown-cell code { padding: 0.12em 0.32em; border-radius: 4px; background: #ece7df; }

.code-label {
  padding: 8px 16px;
  border-bottom: 1px solid #26384a;
  background: #132b42;
  color: #b9c7d3;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.code-cell pre,
.notebook-output pre {
  margin: 0;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.code-cell > pre {
  padding: 22px;
  background: #0d2032;
  color: #eef5f7;
  font: 13px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.notebook-output {
  padding: 18px 22px;
  border-top: 1px solid var(--line);
  background: #fff;
  color: #24384a;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.notebook-output img { display: block; max-width: 100%; height: auto; margin: 0 auto; }

.workshop-loading,
.workshop-unavailable {
  width: min(100%, 720px);
  margin: 12vh auto 0;
  padding: clamp(34px, 6vw, 68px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-align: center;
}

.workshop-unavailable h2 {
  margin: 0 0 14px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1;
}

.workshop-unavailable p { margin: 0; color: var(--muted); line-height: 1.7; }

@media (max-width: 700px) {
  .workshop-header { grid-template-columns: minmax(0, 1fr) auto; gap: 14px; }
  .workshop-brand { display: none; }
  .workshop-back { font-size: 0; }
  .workshop-back::before { margin: 0; font-size: 24px; }
  .workshop-content { padding: 12px; }
  .notebook-cell.markdown-cell { padding: 22px 12px; }
}
