/* pptx.js.org: site styles (no framework). Light/dark via tokens. */
:root {
  --bg: #fbfaf8;
  --bg-soft: #f3f1ed;
  --surface: #ffffff;
  --text: #1c1b1a;
  --text-soft: #5d5a55;
  --line: #e4e0d9;
  --accent: #c43e1c;
  --accent-strong: #a8330f;
  --accent-ink: #ffffff;
  --accent-tint: #fbe9e3;
  --code-bg: #1f1d1b;
  --code-text: #f1ede6;
  --code-key: #ff9a76;
  --code-str: #a8d58a;
  --code-com: #8c877f;
  --shadow: 0 1px 2px rgba(28, 27, 26, 0.06), 0 8px 24px rgba(28, 27, 26, 0.08);
  --radius: 14px;
  --max: 1160px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141312;
    --bg-soft: #1b1a18;
    --surface: #211f1d;
    --text: #efebe5;
    --text-soft: #aaa49b;
    --line: #34312d;
    --accent: #f06a43;
    --accent-strong: #ff8460;
    --accent-ink: #1a0d08;
    --accent-tint: #3a2119;
    --code-bg: #0e0d0c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141312;
  --bg-soft: #1b1a18;
  --surface: #211f1d;
  --text: #efebe5;
  --text-soft: #aaa49b;
  --line: #34312d;
  --accent: #f06a43;
  --accent-strong: #ff8460;
  --accent-ink: #1a0d08;
  --accent-tint: #3a2119;
  --code-bg: #0e0d0c;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans Hebrew", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.container { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.muted { color: var(--text-soft); }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.brand:hover { color: var(--text); }
.brand .logo { width: 32px; height: 32px; flex: none; }
.brand .ver { font-size: 0.7rem; font-weight: 600; padding: 2px 7px; border-radius: 99px; background: var(--accent-tint); color: var(--accent); }
.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a { color: var(--text-soft); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--bg-soft); }
.header-actions { display: flex; gap: 6px; align-items: center; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer; }
.icon-btn:hover { border-color: var(--text-soft); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }
@media (max-width: 760px) {
  .menu-btn { display: inline-grid; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; padding: 8px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .header-actions { margin-inline-start: auto; }
}

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform 0.15s, border-color 0.15s, background 0.15s; }
.btn:hover { border-color: var(--text-soft); color: var(--text); transform: translateY(-1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-ink); }
.btn.small { height: 34px; padding: 0 12px; font-size: 0.9rem; border-radius: 8px; }
.btn svg { width: 18px; height: 18px; }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 40px; }
.hero::before { content: ""; position: absolute; inset: -40% -20% auto; height: 120%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%); pointer-events: none; }
.hero .container { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
.hero .container > * { min-width: 0; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; padding: 4px 12px; border-radius: 99px; background: var(--accent-tint); color: var(--accent); font-weight: 600; font-size: 0.85rem; margin-bottom: 18px; }
.lead { font-size: 1.2rem; color: var(--text-soft); max-width: 36ch; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 22px; }
.install { display: inline-flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 10px; background: var(--code-bg); color: var(--code-text); font: 0.92rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.install .copy { border: 0; background: rgba(255, 255, 255, 0.1); color: inherit; border-radius: 6px; height: 28px; padding: 0 10px; cursor: pointer; font: 600 0.78rem system-ui, sans-serif; }
.hero-viewer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; min-height: 260px; }
.hero-caption { font-size: 0.85rem; color: var(--text-soft); margin: 10px 4px 0; }
@media (max-width: 900px) { .hero .container { grid-template-columns: 1fr; } .hero { padding-top: 40px; } }

/* ---------------------------------------------------------------- sections */
.section { padding: 64px 0; }
.section.alt { background: var(--bg-soft); border-block: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 36px; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; }
.card p { color: var(--text-soft); margin: 0; font-size: 0.95rem; }
.card .ico { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-tint); color: var(--accent); flex: none; }
.card .ico svg { width: 20px; height: 20px; }
.stats { display: flex; gap: 32px; flex-wrap: wrap; margin-top: 8px; color: var(--text-soft); font-size: 0.92rem; }
.stats strong { display: block; color: var(--text); font-size: 1.5rem; }

/* ---------------------------------------------------------------- code */
pre, code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
:not(pre) > code { font-size: 0.88em; background: var(--bg-soft); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
.code { position: relative; margin: 0 0 1.2em; }
.code pre { margin: 0; padding: 18px 20px; overflow: auto; background: var(--code-bg); color: var(--code-text); border-radius: 12px; font-size: 0.88rem; line-height: 1.6; tab-size: 2; }
.code .copy { position: absolute; top: 10px; right: 10px; border: 1px solid rgba(255, 255, 255, 0.15); background: rgba(255, 255, 255, 0.08); color: var(--code-text); border-radius: 6px; padding: 3px 10px; font: 600 0.75rem system-ui, sans-serif; cursor: pointer; opacity: 0; transition: opacity 0.15s; }
.code:hover .copy, .code .copy:focus-visible { opacity: 1; }
.tok-k { color: var(--code-key); }
.tok-s { color: var(--code-str); }
.tok-c { color: var(--code-com); font-style: italic; }

/* tabs */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs [role="tab"] { border: 0; background: none; color: var(--text-soft); font: inherit; font-weight: 600; font-size: 0.92rem; padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs [role="tab"][aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
[role="tabpanel"][hidden] { display: none; }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0; color: var(--text-soft); font-size: 0.9rem; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; }
.site-footer a { color: var(--text-soft); }
.site-footer a:hover { color: var(--text); }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- docs */
.docs > * { min-width: 0; }
.docs { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 48px; padding: 40px 0 72px; }
.toc { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow: auto; font-size: 0.92rem; }
.toc h4 { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.75rem; color: var(--text-soft); margin: 18px 0 6px; }
.toc a { display: block; padding: 4px 10px; border-radius: 6px; color: var(--text-soft); text-decoration: none; border-inline-start: 2px solid transparent; }
.toc a:hover { color: var(--text); background: var(--bg-soft); }
.toc a.active { color: var(--accent); border-inline-start-color: var(--accent); background: var(--accent-tint); }
.prose { max-width: 820px; }
.prose h2 { margin-top: 2.2em; padding-top: 0.6em; border-top: 1px solid var(--line); }
.prose h2:first-of-type { margin-top: 0; border-top: 0; padding-top: 0; }
.prose h3 { margin-top: 1.6em; }
.prose ul { padding-inline-start: 1.3em; }
.prose li { margin-bottom: 0.3em; }
.table-wrap { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { text-align: start; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-soft); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }
.callout { border: 1px solid var(--line); border-inline-start: 4px solid var(--accent); background: var(--surface); border-radius: 10px; padding: 14px 18px; margin: 0 0 1.4em; }
.callout p:last-child { margin: 0; }
kbd { font: 0.8em ui-monospace, monospace; padding: 2px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); }
@media (max-width: 860px) {
  .docs { grid-template-columns: 1fr; gap: 16px; }
  .toc { position: static; max-height: none; border: 1px solid var(--line); border-radius: 12px; padding: 4px 12px 12px; }
}

/* ---------------------------------------------------------------- demos */
.demo-layout > * { min-width: 0; }
.demo-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel h3 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-soft); margin: 4px 0 12px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; font-size: 0.9rem; font-weight: 500; }
.field.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.field select, .field input[type="number"] { height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; }
.field input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
.stage { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-height: 320px; position: relative; }
.dropzone { display: grid; place-items: center; text-align: center; gap: 6px; border: 2px dashed var(--line); border-radius: 12px; padding: 22px; color: var(--text-soft); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-tint); color: var(--text); }
.dropzone strong { color: var(--text); }
.log { list-style: none; margin: 0; padding: 0; max-height: 200px; overflow: auto; font: 0.78rem/1.6 ui-monospace, monospace; color: var(--text-soft); }
.log li { border-bottom: 1px dashed var(--line); padding: 2px 0; word-break: break-word; }
.log .warn { color: #c98a16; }
.log .error { color: #d44d3c; }
.toolbar-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.editor-host { height: min(78vh, 760px); min-height: 520px; }
.editor-host .pptxjs-editor { border-radius: var(--radius); }
.notes-list { padding-inline-start: 22px; max-height: 420px; overflow: auto; }
.notes-list li { margin-bottom: 6px; white-space: pre-wrap; }
@media (max-width: 900px) { .demo-layout { grid-template-columns: 1fr; } }

/* the viewer chrome adapts to the site theme */
.pptxjs-viewer .pptxjs-btn { background: var(--surface); color: var(--text); border-color: var(--line); }
.pptxjs-viewer .pptxjs-btn:hover { background: var(--bg-soft); }
.pptxjs-viewer .pptxjs-counter { color: var(--text-soft); }
.pptxjs-viewer .pptxjs-progress-bar { background: var(--accent); }
