:root {
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --surface2: #F5F5F5;
  --border: #E0E0E0;
  --border2: #C7C7C7;
  --text: #242424;
  --muted: #5C5C5C;
  --brand: #0F6CBD;
  --brand-bg: #0F6CBD;
  --brand-hover: #115EA3;
  --brand-tint: #EBF3FC;
  --ok: #0E700E;
  --warn: #8A5A00;
  --no: #6B6B6B;
  --err: #B10E1C;
  --shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 4px 12px rgba(0, 0, 0, .06);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141414;
    --surface: #1F1F1F;
    --surface2: #292929;
    --border: #3D3D3D;
    --border2: #5C5C5C;
    --text: #F5F5F5;
    --muted: #ADADAD;
    --brand: #62ABF5;
    --brand-bg: #115EA3;
    --brand-hover: #0F6CBD;
    --brand-tint: #0E2A47;
    --ok: #6CCB6C;
    --warn: #F2C661;
    --no: #9E9E9E;
    --err: #F4878F;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 12px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #141414;
  --surface: #1F1F1F;
  --surface2: #292929;
  --border: #3D3D3D;
  --border2: #5C5C5C;
  --text: #F5F5F5;
  --muted: #ADADAD;
  --brand: #62ABF5;
  --brand-bg: #115EA3;
  --brand-hover: #0F6CBD;
  --brand-tint: #0E2A47;
  --ok: #6CCB6C;
  --warn: #F2C661;
  --no: #9E9E9E;
  --err: #F4878F;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 12px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Segoe UI Variable", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: "Cascadia Code", Consolas, ui-monospace, monospace;
  font-size: .88em;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
}

h1, h2, h3, p { margin: 0; }
summary { cursor: pointer; }
[hidden] { display: none !important; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 6px 14px;
  flex-wrap: wrap;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  flex: none;
}
.brand-link:hover { text-decoration: none; }
.brand-365 { font-weight: 400; color: var(--brand); }

.main-nav {
  display: flex;
  gap: 2px;
  flex: 1 1 auto;
  flex-wrap: wrap;
  min-width: max-content;
}

.nav-link {
  padding: 8px 7px;
  font-size: 14px;
  white-space: nowrap;
  text-decoration: none;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.nav-link:hover { color: var(--text); text-decoration: none; }
.nav-link.active {
  color: var(--text);
  font-weight: 600;
  border-bottom-color: var(--brand);
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: none;
  white-space: nowrap;
  max-width: 100%;
  flex-wrap: wrap;
}

/* Buttons */
.btn-theme {
  font: inherit;
  font-size: 13px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 4px;
  cursor: pointer;
}
.btn-theme:hover { background: var(--surface2); color: var(--text); }

.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
}
.lang-switch a, .lang-switch span {
  padding: 5px 8px;
  text-decoration: none;
  color: var(--muted);
}
.lang-switch a:hover {
  background: var(--surface2);
  color: var(--text);
  text-decoration: none;
}
.lang-switch .active {
  background: var(--surface2);
  color: var(--text);
}

.btn-outline-sm {
  padding: 6px 10px;
  border: 1px solid var(--border2);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
}
.btn-outline-sm:hover { background: var(--surface2); text-decoration: none; }

.btn-primary-sm {
  padding: 7px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: var(--brand-bg);
}
.btn-primary-sm:hover { background: var(--brand-hover); text-decoration: none; }

.btn-primary {
  padding: 11px 20px;
  border-radius: 4px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: var(--brand-bg);
  border: 0;
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
  display: inline-block;
  text-align: center;
}
.btn-primary:hover { background: var(--brand-hover); text-decoration: none; }
.btn-primary:disabled { opacity: .65; cursor: wait; }

.btn-outline {
  padding: 10px 20px;
  border: 1px solid var(--border2);
  border-radius: 4px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  display: inline-block;
  text-align: center;
}
.btn-outline:hover { background: var(--surface2); text-decoration: none; }

/* Sections & Cards */
.surface-band {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.badge-pro {
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--ok);
  color: var(--ok);
  border-radius: 10px;
  padding: 0 7px;
}

/* Browser Frame & Screenshots */
.shot-tab {
  font: inherit;
  font-size: 14px;
  padding: 10px 14px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: -1px;
}
.shot-tab:hover { color: var(--text); }
.shot-tab.active {
  color: var(--text);
  font-weight: 600;
  border-bottom-color: var(--brand);
}

.zoomable-img {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
}

.shot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 820px) {
  .shot-grid.two-up {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

/* Forms */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
}

.form-input {
  font: inherit;
  font-weight: 400;
  padding: 8px 10px;
  min-height: 36px;
  border: 1px solid var(--border2);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
}
.form-input:focus {
  outline: 2px solid var(--brand);
  outline-offset: -1px;
}

.status-ok {
  border: 1px solid var(--ok);
  border-radius: 6px;
  padding: 16px;
  font-weight: 600;
  background: var(--surface2);
}

.status-err {
  border: 1px solid var(--err);
  color: var(--err);
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 14px;
}

/* Legal pages */
.legal-prose {
  max-width: 820px;
  margin: 0 auto;
  padding: 56px 20px 72px;
}
.legal-prose h1 {
  font-size: clamp(28px, 3.6vw, 38px);
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 8px;
}
.legal-prose .legal-meta {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 32px;
}
.legal-prose h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 28px 0 8px;
}
.legal-prose p, .legal-prose li {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 10px;
}
.legal-prose ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

/* Modal */
.zoom-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, .82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}
.zoom-modal img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
  background: #fff;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* Video Thumbnails & Lightbox Modal */
.video-thumb-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--surface2);
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.video-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform .2s ease, opacity .2s ease;
}

.video-thumb-btn:hover img {
  transform: scale(1.02);
  opacity: .88;
}

.video-play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.video-play-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(15, 108, 189, .92);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .38);
  transition: transform .15s ease, background .15s ease;
}

.video-thumb-btn:hover .video-play-circle {
  transform: scale(1.08);
  background: var(--brand);
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, .82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.video-modal-dialog {
  position: relative;
  width: min(1080px, 94vw);
  max-height: 90vh;
  background: #000;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .6);
  display: flex;
  flex-direction: column;
}

.video-modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: #141414;
  color: #f5f5f5;
  font-size: 14px;
  font-weight: 600;
}

.video-modal-close {
  border: 1px solid rgba(255, 255, 255, .24);
  background: transparent;
  color: #fff;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 14px;
  cursor: pointer;
}

.video-modal-close:hover {
  background: rgba(255, 255, 255, .12);
}

.video-modal-player {
  width: 100%;
  max-height: calc(90vh - 46px);
  display: block;
  background: #000;
  object-fit: contain;
}

.benefit-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.benefit-list li {
  position: relative;
  padding-left: 22px;
  font-size: 15px;
  color: var(--text);
}

.benefit-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--ok);
  font-weight: 700;
}

.quote-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.quote-text {
  font-size: 14px;
  color: var(--text);
  font-style: italic;
}

.quote-author {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

/* Interactive Feature Tiles */
.feature-tile {
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}

.feature-tile:hover,
.feature-tile:focus-visible {
  transform: translateY(-3px);
  border-color: var(--brand);
  box-shadow: 0 10px 24px rgba(15, 108, 189, .14);
  background: var(--surface);
  outline: none;
}

.feature-tile-cta {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  opacity: .75;
  transition: opacity .18s ease, transform .18s ease;
  align-self: flex-end;
}

.feature-tile:hover .feature-tile-cta,
.feature-tile:focus-visible .feature-tile-cta {
  opacity: 1;
  transform: translateX(2px);
}

/* Feature Detail Modal */
.feature-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(10, 14, 20, .72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.feature-modal[hidden] {
  display: none;
}

.feature-modal-dialog {
  width: min(920px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .4);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.feature-modal-close {
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex: none;
}

.feature-modal-close:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.feature-modal-points {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}

.feature-modal-shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 12px;
}

.feature-modal-shot {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface2);
}

.feature-modal-shot-label {
  padding: 6px 10px;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

/* Tutorials */
.tutorial-thumb-placeholder {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.tutorial-thumb-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: .72;
  filter: saturate(.85);
}

.tutorial-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.tutorial-pill-planned {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
}

.tutorial-pill-ready {
  background: var(--brand-tint);
  border: 1px solid var(--brand);
  color: var(--brand);
}
