/* ATLAS Preflight — demo */
:root {
  --navy: #17243d;
  --navy-2: #22355a;
  --blue: #165cf5;
  --blue-soft: #eef3ff;
  --text: #18253a;
  --muted: #637089;
  --line: #e3e9f2;
  --bg: #f5f7fb;
  --card: #ffffff;
  --ok: #17803d;
  --ok-soft: #e8f7ee;
  --warn: #b86a00;
  --warn-soft: #fff4e0;
  --err: #c62828;
  --err-soft: #fdecec;
  --radius: 16px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.demo-body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
[hidden] { display: none !important; }
a { color: var(--blue); }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(24px, 3.4vw, 36px); line-height: 1.15; }
h2 { font-size: 18px; margin-bottom: 14px; }

/* ------------------------------------------------------------ top */
.demo-top { background: var(--navy); color: #fff; }
.demo-top-inner {
  max-width: 1180px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.demo-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 17px; }
.demo-brand img { width: 34px; height: 26px; object-fit: contain; }
.demo-pill {
  font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 99px; background: var(--blue);
}
.demo-top-actions { display: flex; align-items: center; gap: 14px; }
.demo-lang { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.demo-lang select {
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 8px;
  padding: 5px 8px; font: inherit;
}
.demo-lang select option { color: var(--text); }
.demo-top .demo-link-button { color: #dfe7f7; }

/* ------------------------------------------------------------ layout */
.demo-main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 32px 20px 48px; }
.demo-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: 0 1px 2px rgba(16, 32, 58, .04);
}
.demo-card + .demo-card { margin-top: 18px; }
.demo-narrow { max-width: 520px; margin: 24px auto; }
.demo-center { text-align: center; }
.demo-muted { color: var(--muted); }
.demo-small { font-size: 13px; }
.demo-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 8px;
}

/* ------------------------------------------------------------ hero */
.demo-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
.demo-hero-text p { font-size: 17px; color: #3b4a63; margin: 14px 0 18px; }
.demo-checklist { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.demo-checklist li { position: relative; padding-left: 26px; font-weight: 600; }
.demo-checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--ok-soft); color: var(--ok); font-size: 12px; display: grid; place-items: center;
}

/* ------------------------------------------------------------ forms */
.demo-tabs { display: flex; gap: 4px; background: var(--bg); border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.demo-tabs button {
  flex: 1; border: 0; background: transparent; padding: 9px 10px; border-radius: 9px; font: inherit;
  font-weight: 700; color: var(--muted); cursor: pointer;
}
.demo-tabs button.active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(16,32,58,.1); }
.demo-form { display: grid; gap: 12px; }
.demo-form label { display: grid; gap: 5px; font-size: 13px; font-weight: 700; color: #415069; }
.demo-form label small { font-weight: 500; color: var(--muted); }
.demo-form input[type="text"], .demo-form input[type="email"], .demo-form input[type="password"],
.demo-form input[type="tel"], .demo-form textarea {
  width: 100%; border: 1px solid #d5ddea; border-radius: 10px; padding: 10px 12px; font: inherit; font-weight: 500;
  color: var(--text); background: #fff;
}
.demo-form textarea { resize: vertical; }
.demo-form input:focus, .demo-form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22,92,245,.12); }
.demo-check { grid-template-columns: auto 1fr !important; align-items: start; font-weight: 500 !important; color: var(--muted) !important; }
.demo-check input { margin-top: 3px; }
.demo-code { font-size: 24px !important; letter-spacing: .35em; text-align: center; font-weight: 700 !important; }
.demo-primary {
  border: 0; border-radius: 11px; background: var(--blue); color: #fff; font: inherit; font-weight: 700;
  padding: 12px 18px; cursor: pointer; transition: background .12s, transform .12s;
}
.demo-primary:hover { background: #0f4fd8; }
.demo-primary:disabled { opacity: .55; cursor: default; }
.demo-secondary {
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); font: inherit;
  font-weight: 600; padding: 8px 12px; cursor: pointer;
}
.demo-secondary:hover { border-color: var(--blue); color: var(--blue); }
.demo-link-button { border: 0; background: none; padding: 0; font: inherit; color: var(--blue); cursor: pointer; font-weight: 600; }
.demo-danger { color: var(--err); }
.demo-message { margin: 0; min-height: 1em; font-size: 13.5px; color: var(--err); }
.demo-message.ok { color: var(--ok); }
.demo-done { color: var(--ok); font-weight: 700; margin: 0; }

/* ------------------------------------------------------------ app */
.demo-app-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.demo-usage { min-width: 260px; }
.demo-usage-bar { height: 8px; background: #e6ebf3; border-radius: 99px; overflow: hidden; }
.demo-usage-bar span { display: block; height: 100%; background: var(--blue); border-radius: 99px; transition: width .3s; }
.demo-usage p { margin: 6px 0 0; font-size: 13px; color: var(--muted); font-weight: 600; text-align: right; }
.demo-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }

.demo-drop {
  display: grid; justify-items: center; gap: 6px; text-align: center; padding: 34px 20px;
  border: 2px dashed #c8d3e6; border-radius: 14px; cursor: pointer; background: #fafcff;
  transition: border-color .12s, background .12s;
}
.demo-drop:hover, .demo-drop.drag { border-color: var(--blue); background: var(--blue-soft); }
.demo-drop-icon { font-size: 26px; color: var(--blue); }
.demo-drop small { color: var(--muted); }
.demo-drop.disabled { pointer-events: none; opacity: .5; }
.demo-samples { margin-top: 14px; display: grid; gap: 8px; }
.demo-sample-list { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-sample {
  text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 12px;
  font: inherit; cursor: pointer; max-width: 340px;
}
.demo-sample:hover { border-color: var(--blue); }
.demo-sample strong { display: block; font-size: 13.5px; }
.demo-sample small { color: var(--muted); }
.demo-busy { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-weight: 600; color: #415069; }
.demo-spinner {
  width: 18px; height: 18px; border-radius: 50%; border: 3px solid #d7e1f5; border-top-color: var(--blue);
  animation: demoSpin .8s linear infinite;
}
@keyframes demoSpin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ resultaat */
.demo-result { margin-top: 18px; }
.demo-result-head { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 20px; align-items: center; }
.demo-thumb {
  width: 150px; height: 110px; border-radius: 10px; border: 1px solid var(--line); background: #f0f3f8;
  object-fit: contain; cursor: zoom-in;
}
.demo-result-title h2 { margin: 0 0 6px; word-break: break-word; }
.demo-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.demo-chip { font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--bg); color: #415069; }
.demo-score {
  --c: var(--ok); width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; text-align: center;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), #e8edf5 0); position: relative;
}
.demo-score::before { content: ""; position: absolute; inset: 9px; background: #fff; border-radius: 50%; }
.demo-score b { position: relative; font-size: 26px; line-height: 1; }
.demo-score small { position: relative; display: block; font-size: 10px; color: var(--muted); font-weight: 700; }
.demo-score.mid { --c: var(--warn); }
.demo-score.bad { --c: var(--err); }
.demo-status { margin-top: 16px; padding: 12px 14px; border-radius: 12px; font-weight: 700; }
.demo-status.ok { background: var(--ok-soft); color: var(--ok); }
.demo-status.mid { background: var(--warn-soft); color: var(--warn); }
.demo-status.bad { background: var(--err-soft); color: var(--err); }

.demo-group { margin-top: 18px; }
.demo-group h3 { font-size: 14px; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.demo-count { font-size: 12px; padding: 1px 8px; border-radius: 99px; background: var(--bg); color: var(--muted); }
.demo-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.demo-checks li { border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.demo-checks li.error { border-left-color: var(--err); }
.demo-checks li.warning { border-left-color: var(--warn); }
.demo-checks li.success, .demo-checks li.info { border-left-color: var(--ok); }
.demo-checks strong { display: block; font-size: 14px; }
.demo-checks p { margin: 2px 0 0; font-size: 13.5px; color: #3b4a63; }
.demo-checks .demo-solution { color: var(--blue); font-weight: 600; }
details.demo-group summary { cursor: pointer; font-weight: 700; font-size: 14px; }
details.demo-group summary::marker { color: var(--muted); }

.demo-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.demo-image { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; cursor: zoom-in; text-align: left; padding: 0; font: inherit; }
.demo-image img { width: 100%; height: 110px; object-fit: cover; display: block; background: #f0f3f8; }
.demo-image div { padding: 8px 10px; font-size: 12.5px; }
.demo-image strong { display: block; }
.demo-dpi.bad { color: var(--err); font-weight: 700; }
.demo-dpi.mid { color: var(--warn); font-weight: 700; }
.demo-dpi.ok { color: var(--ok); font-weight: 700; }

.demo-ai { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.demo-ai form { display: flex; gap: 8px; }
.demo-ai input { flex: 1; border: 1px solid #d5ddea; border-radius: 10px; padding: 10px 12px; font: inherit; }
.demo-ai-answer { margin-top: 10px; padding: 12px 14px; background: var(--bg); border-radius: 10px; white-space: pre-wrap; font-size: 14px; }

.demo-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.demo-history button {
  width: 100%; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 10px;
  font: inherit; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; align-items: center;
}
.demo-history button:hover { border-color: var(--blue); }
.demo-history span { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-history b { font-size: 12px; padding: 2px 8px; border-radius: 99px; }
.demo-history b.ok { background: var(--ok-soft); color: var(--ok); }
.demo-history b.mid { background: var(--warn-soft); color: var(--warn); }
.demo-history b.bad { background: var(--err-soft); color: var(--err); }
.demo-cta { border-color: #cfdcfb; background: linear-gradient(180deg, #f6f9ff 0%, #fff 100%); }
.demo-quiet { padding: 14px 18px; text-align: center; }

/* ------------------------------------------------------------ modal */
.demo-modal { position: fixed; inset: 0; z-index: 50; background: rgba(16, 32, 58, .6); display: grid; place-items: center; padding: 20px; }
.demo-modal-card { position: relative; background: #fff; border-radius: 14px; padding: 12px; max-width: min(1100px, 100%); max-height: 100%; overflow: auto; }
.demo-modal-card img { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; }
.demo-modal-close { position: absolute; top: 8px; right: 8px; border: 0; background: #fff; border-radius: 8px; width: 32px; height: 32px; cursor: pointer; font-size: 15px; box-shadow: 0 1px 4px rgba(0,0,0,.15); }

.demo-footer {
  text-align: center; font-size: 12.5px; color: var(--muted); padding: 18px 20px 26px;
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
}

/* ------------------------------------------------------------ mobiel */
@media (max-width: 900px) {
  .demo-hero, .demo-grid { grid-template-columns: 1fr; }
  .demo-result-head { grid-template-columns: 1fr auto; }
  .demo-thumb { grid-column: 1 / -1; width: 100%; height: 180px; }
}
@media (max-width: 560px) {
  .demo-main { padding: 20px 16px 36px; }
  .demo-card { padding: 18px 16px; }
  .demo-checklist { grid-template-columns: 1fr; }
  .demo-brand span { display: none; }
  .demo-usage { min-width: 0; width: 100%; }
  .demo-usage p { text-align: left; }
  .demo-ai form { flex-direction: column; }
}

/* lange bestandsnamen in de lijst afkappen */
.demo-history li { min-width: 0; }
.demo-history button { min-width: 0; }
.demo-history span { flex: 1; min-width: 0; }
.demo-col-main, .demo-col-side { min-width: 0; }

/* ------------------------------------------------------------ wat kan ATLAS nog meer */
.demo-feature-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 14px; }
.demo-feature-list li { display: grid; gap: 3px; }
.demo-feature-list img { width: 100%; height: auto; display: block; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 6px; }
.demo-feature-list strong { font-size: 15px; }
.demo-feature-list span { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
