:root {
  color-scheme: dark;
  --green: #07583f;
  --green-light: #0a7454;
  --orange: #ee7623;
  --ink: #111715;
  --muted: #9aa7a2;
  --line: rgba(255, 255, 255, 0.14);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(10, 116, 84, 0.22), transparent 34rem),
    radial-gradient(circle at 88% 78%, rgba(238, 118, 35, 0.12), transparent 30rem),
    #0d1110;
  color: #fff;
  font-family: Inter, Arial, sans-serif;
  font-size: 16px;
  min-height: 100vh;
}

button, a { font: inherit; }

.presentation {
  width: min(100%, 1620px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px clamp(16px, 3vw, 48px) 18px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px;
}

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 12px; letter-spacing: -0.02em; }
.brand-mark { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--green); border: 2px solid rgba(255, 255, 255, 0.85); box-shadow: inset 0 -4px 0 var(--orange); font-weight: 700; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.08rem; }
.brand small { color: var(--muted); font-size: 0.74rem; margin-top: 2px; text-transform: uppercase; letter-spacing: 0.11em; }
.top-actions { display: flex; align-items: center; gap: 10px; }

.button { min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 9px; color: #fff; cursor: pointer; text-decoration: none; transition: transform 160ms ease, background 160ms ease, border-color 160ms ease; }
.button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible, .nav-button:focus-visible, .dot:focus-visible { outline: 3px solid rgba(238, 118, 35, 0.85); outline-offset: 3px; }
.button-primary { background: var(--orange); font-weight: 700; }
.button-primary:hover { background: #ff8430; }
.button-secondary { background: rgba(255, 255, 255, 0.06); border-color: var(--line); }
.button-secondary:hover { background: rgba(255, 255, 255, 0.11); }

.stage { min-height: 0; display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; gap: clamp(8px, 1.7vw, 24px); }
.slide-frame { margin: 0 auto; width: min(100%, calc((100vh - 185px) * 16 / 9)); aspect-ratio: 16 / 9; overflow: hidden; background: #f4f5f2; border-radius: 5px; box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.12); touch-action: pan-y; }
.slide-frame img, .external-video { display: block; width: 100%; height: 100%; object-fit: contain; background: #f4f5f2; }
.slide-frame img { user-select: none; -webkit-user-drag: none; opacity: 1; transition: opacity 110ms ease; }
.slide-frame [hidden] { display: none; }
.slide-frame img.changing { opacity: 0.35; }
.external-video { position: relative; color: #fff; text-decoration: none; }
.external-video img { display: block; width: 100%; height: 100%; object-fit: contain; }
.external-video span { position: absolute; right: 22px; bottom: 20px; padding: 12px 18px; border-radius: 8px; background: var(--orange); color: #fff; font-weight: 700; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28); }
.nav-button { width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%; background: rgba(255, 255, 255, 0.06); color: #fff; display: grid; place-items: center; cursor: pointer; transition: background 160ms ease, transform 160ms ease, opacity 160ms ease; }
.nav-button:hover { background: var(--green); transform: scale(1.04); }
.nav-button:disabled { opacity: 0.26; cursor: default; transform: none; }
.nav-button svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.controls { display: grid; grid-template-columns: auto minmax(100px, 190px) auto 1fr; align-items: center; gap: 16px; }
.slide-status { display: flex; align-items: baseline; gap: 5px; min-width: 62px; }
.slide-status strong { font-size: 1.05rem; color: #fff; }
.slide-status span { color: var(--muted); font-size: 0.8rem; }
.progress { height: 3px; background: rgba(255, 255, 255, 0.12); border-radius: 99px; overflow: hidden; }
.progress span { display: block; width: 9.09%; height: 100%; background: var(--orange); transition: width 220ms ease; }
.slide-dots { display: flex; align-items: center; gap: 7px; }
.dot { width: 30px; height: 30px; border: 0; background: transparent; padding: 0; cursor: pointer; display: grid; place-items: center; }
.dot::before { content: ''; width: 7px; height: 7px; background: #68716e; border-radius: 99px; transition: width 160ms ease, background 160ms ease; }
.dot.active::before { width: 22px; background: var(--orange); }
.hint { margin: 0; justify-self: end; color: var(--muted); font-size: 0.78rem; }
.noscript { margin: 20px; text-align: center; }
.noscript a { color: #ff9a55; }
.presentation:fullscreen { width: 100%; max-width: none; background: #090c0b; }
.presentation:fullscreen .topbar { opacity: 0.22; transition: opacity 160ms ease; }
.presentation:fullscreen .topbar:hover { opacity: 1; }

@media (max-width: 760px) {
  .presentation { padding: 14px 12px 16px; gap: 14px; }
  .brand-mark { width: 38px; height: 38px; }
  .button { min-height: 40px; padding: 0 12px; }
  .button-secondary span { display: none; }
  .stage { grid-template-columns: 1fr; position: relative; }
  .slide-frame { width: 100%; }
  .nav-button { position: absolute; z-index: 2; width: 42px; height: 42px; background: rgba(7, 88, 63, 0.9); border-color: rgba(255, 255, 255, 0.3); }
  .nav-previous { left: 8px; }
  .nav-next { right: 8px; }
  .controls { grid-template-columns: auto 1fr; gap: 10px 14px; }
  .slide-dots { justify-self: end; gap: 2px; }
  .progress { grid-row: 2; grid-column: 1 / -1; }
  .hint { display: none; }
}

@media (max-width: 470px) {
  .brand strong { font-size: 0.96rem; }
  .brand small { font-size: 0.65rem; }
  .button-primary span { display: none; }
  .top-actions { gap: 6px; }
  .button { width: 40px; padding: 0; }
  .dot { width: 24px; }
  .nav-button { width: 38px; height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
