: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;
}

/* 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: 50;
  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);
}
