/* ExperimentApps — shared stylesheet
   No external resources, no web fonts, no trackers, no cookies. */

:root {
  --primary: #6750A4;
  --primary-hover: #56419b;
  --on-primary: #ffffff;
  --primary-container: #EADDFF;
  --on-primary-container: #21005D;

  --bg: #fbf9fe;
  --surface: #ffffff;
  --surface-2: #f4f0fa;
  --border: #e4dced;
  --text: #1d1b20;
  --text-muted: #5b5566;

  --ok: #2E7D32;
  --warn: #b26a00;
  --danger: #C62828;

  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 900px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #cfbcff;
    --primary-hover: #ddd0ff;
    --on-primary: #381E72;
    --primary-container: #4F378B;
    --on-primary-container: #EADDFF;

    --bg: #141218;
    --surface: #1d1b20;
    --surface-2: #262329;
    --border: #38343d;
    --text: #e7e0eb;
    --text-muted: #a9a2b3;

    --ok: #7fd18a;
    --warn: #e5b168;
    --danger: #f2b8b5;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

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

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; min-height: 60px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.15rem; color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--primary); color: var(--on-primary);
  display: grid; place-items: center; font-weight: 800; font-size: 1rem;
  flex: 0 0 auto;
}
.nav-links { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav-links a {
  color: var(--text-muted); padding: 8px 12px; border-radius: 999px;
  font-size: .96rem; font-weight: 500;
}
.nav-links a:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.nav-links a.active { color: var(--primary); background: var(--primary-container); }
@media (prefers-color-scheme: dark) { .nav-links a.active { color: var(--on-primary-container); } }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; cursor: pointer; color: var(--text);
  font-size: 1.1rem;
}
@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 8px 12px 14px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; border-radius: 10px; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0 40px; text-align: center;
}
.hero h1 { font-size: 2.2rem; line-height: 1.2; margin: 0 0 14px; letter-spacing: -.02em; }
.hero p { font-size: 1.15rem; color: var(--text-muted); max-width: 620px; margin: 0 auto; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--primary);
  background: var(--primary-container); padding: 5px 12px; border-radius: 999px; margin-bottom: 18px;
}
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--on-primary-container); } }

/* ---------- Sections ---------- */
main { padding: 8px 0 64px; }
section { margin: 40px 0; }
h2 { font-size: 1.55rem; margin: 0 0 12px; letter-spacing: -.01em; }
h3 { font-size: 1.2rem; margin: 26px 0 8px; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin: 6px 0; }
hr { border: none; border-top: 1px solid var(--border); margin: 40px 0; }

.lead { font-size: 1.1rem; color: var(--text-muted); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px; margin: 16px 0;
}
.card h3:first-child { margin-top: 0; }

.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid.cols-2 { grid-template-columns: 1fr 1fr; } }

.app-card {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; transition: border-color .15s, transform .15s;
}
.app-card:hover { text-decoration: none; border-color: var(--primary); transform: translateY(-2px); }
.app-card .icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--primary);
  color: var(--on-primary); display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 14px;
}
.app-card h3 { margin: 0 0 6px; color: var(--text); }
.app-card p { color: var(--text-muted); margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--primary); color: var(--on-primary);
  border: none; border-radius: 999px; padding: 13px 26px;
  font-size: 1rem; font-weight: 600; font-family: inherit;
  transition: background .15s;
}
.btn:hover { background: var(--primary-hover); text-decoration: none; }
.btn.secondary { background: transparent; color: var(--primary); border: 1.5px solid var(--border); }
.btn.secondary:hover { background: var(--surface-2); }
.btn.block { width: 100%; justify-content: center; }

/* ---------- Callouts ---------- */
.note {
  border-left: 4px solid var(--primary); background: var(--surface-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 14px 18px; margin: 18px 0;
}
.note.warn { border-left-color: var(--warn); }
.note strong { display: block; margin-bottom: 4px; }

/* ---------- Feature list ---------- */
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 30px; margin: 10px 0; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--ok); font-weight: 800;
}

/* ---------- Download box ---------- */
.download {
  background: linear-gradient(135deg, var(--primary-container), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; text-align: center;
}
.download .meta {
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center;
  color: var(--text-muted); font-size: .9rem; margin: 16px 0 4px;
}
.download .meta code { font-family: var(--mono); font-size: .82rem; word-break: break-all; }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; margin: 16px 0; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 700; color: var(--text); }
td code, .inline-code {
  font-family: var(--mono); font-size: .85rem;
  background: var(--surface-2); padding: 2px 6px; border-radius: 6px; white-space: nowrap;
}

/* ---------- FAQ accordion ---------- */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 10px 0; overflow: hidden; background: var(--surface); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 16px 48px 16px 18px; font-size: 1.03rem; font-weight: 600; color: var(--text);
  font-family: inherit; position: relative;
}
.faq-q::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; color: var(--primary); font-weight: 400;
}
.faq-item.open .faq-q::after { content: "−"; }
.faq-a { padding: 0 18px; max-height: 0; overflow: hidden; transition: max-height .25s ease, padding .25s ease; }
.faq-item.open .faq-a { padding: 0 18px 16px; max-height: 900px; }
.faq-a p:last-child { margin-bottom: 0; }

/* ---------- Form ---------- */
.field { margin: 16px 0; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field .req { color: var(--danger); }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; font-size: 1rem; font-family: inherit;
  color: var(--text); background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
.field textarea { resize: vertical; min-height: 150px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { padding: 14px 18px; border-radius: var(--radius-sm); margin: 16px 0; }
.form-msg.ok { background: rgba(46,125,50,.12); border: 1px solid var(--ok); color: var(--ok); }
.form-msg.err { background: rgba(198,40,40,.1); border: 1px solid var(--danger); color: var(--danger); }
.consent { font-size: .9rem; color: var(--text-muted); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border); background: var(--surface);
  padding: 30px 0; color: var(--text-muted); font-size: .9rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center; }
.site-footer a { color: var(--text-muted); }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }

.small { font-size: .85rem; color: var(--text-muted); }
