/* LOOPiN Help Center (loopin.app/help). Layout and tokens: Jordan's spec,
   /help-center/SPEC.md. Light by default; dark follows the system setting. */

@font-face { font-family: "DM Sans"; src: url("DMSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("DMSans-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("DMSans-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light dark;
  --page: #f6f6f6;
  --surface: #ffffff;
  --input: #ffffff;
  --ink: #2c2c2c;
  --secondary: #505050;
  --hint: #757575;          /* only on white */
  --placeholder: #757575;
  --border: #e8e8e8;
  --border-strong: #c5c5c5;
  --input-border: #e8e8e8;
  --primary: #197be5;       /* links, focus ring */
  --link: #1670d2;          /* 4.9:1 on white for small link text */
  --btn: #1670d2;           /* filled buttons: white type is 4.90:1 */
  --btn-hover: #125fb3;
  --btn-ink: #ffffff;
  --highlight: #e2edff;
  --warning-fill: #fff4e5;
  --warning-border: #d96b00;
  --well: #f6f6f6;
  --row-hover: #f6f6f6;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  --card-hover-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --mark: #fff3bf;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #1b1c1e;
    --surface: #2a2b2d;
    --input: #252628;
    --ink: #ffffff;
    --secondary: #c5c5c5;
    --hint: #c5c5c5;
    --placeholder: #9e9e9e;
    --border: #424242;
    --border-strong: #707070;
    --input-border: #707070;
    --primary: #42a5f5;
    --link: #42a5f5;
    --btn: #1670d2;
    --btn-hover: #2b80e0;
    --highlight: #243044;
    --warning-fill: #3a2e1c;
    --well: #252628;
    --row-hover: #252628;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    --card-hover-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    --mark: #4a4220;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--ink);
  font: 400 16px/1.5 "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--border); text-decoration: none; font-weight: 600;
}
.skip:focus { top: 10px; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 64px; padding: 10px 20px;
}
.brand { display: flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; border-radius: 8px; }
.brand img { width: 36px; height: 28px; flex: none; }
.word { font-size: 16px; font-weight: 700; letter-spacing: 0.02em; line-height: 1; }
.sep { width: 1px; height: 16px; background: var(--border-strong); margin: 0 2px; }
.help-label { font-size: 14px; font-weight: 600; color: var(--secondary); }

.get-app { position: relative; flex: none; }
.btn-app, .btn-contact {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 16px; border-radius: 999px;
  background: var(--btn); color: var(--btn-ink);
  font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; letter-spacing: 0.2px;
  text-decoration: none; white-space: nowrap; cursor: pointer; border: 0;
}
.btn-app:hover, .btn-contact:hover { background: var(--btn-hover); }
.get-app-menu > summary { list-style: none; }
.get-app-menu > summary::-webkit-details-marker { display: none; }
.store-list {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30;
  list-style: none; min-width: 180px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow);
}
.store {
  display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px;
  font-size: 15px; font-weight: 600; text-decoration: none;
}
.store:hover { background: var(--row-hover); }

/* ── Page canvas ────────────────────────────────────────────────────────── */
main { flex: 1; width: 100%; margin: 0 auto; }
.wrap { max-width: 1080px; padding: 28px 20px 48px; }
.article-wrap { max-width: 720px; padding: 24px 20px 48px; }

.eyebrow {
  margin: 0 0 8px; font-size: 12px; font-weight: 600; line-height: 1.33;
  letter-spacing: 0.3px; text-transform: uppercase; color: var(--secondary);
}
h1 { margin: 0 0 8px; font-size: 28px; font-weight: 700; line-height: 1.29; letter-spacing: -0.02em; }
.lede { margin: 0 0 20px; font-size: 14px; line-height: 1.43; color: var(--secondary); }
.hero { margin-bottom: 28px; }

/* ── Search ─────────────────────────────────────────────────────────────── */
.search { position: relative; max-width: 640px; margin: 0; }
.search-box {
  display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px;
  background: var(--input); border: 1px solid var(--input-border); border-radius: 16px;
}
.search-box:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.search-box svg { flex: none; color: var(--secondary); }
.search-box input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent;
  color: var(--ink); font-family: inherit; font-size: 16px; line-height: 1.5;
}
.search-box input::placeholder { color: var(--placeholder); opacity: 1; }
.search-box input::-webkit-search-cancel-button { cursor: pointer; }
.results-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 15;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); padding: 6px; text-align: left; max-height: 70vh; overflow: auto;
}
.results { list-style: none; }
.result {
  display: block; min-height: 48px; padding: 10px 12px; border-radius: 10px;
  text-decoration: none; cursor: pointer;
}
.result[aria-selected="true"], .result:hover { background: var(--row-hover); }
.result[aria-selected="true"] { outline: 2px solid var(--primary); outline-offset: -2px; }
.result-title { display: block; font-size: 16px; font-weight: 600; line-height: 1.35; }
.result-section {
  display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.3px; color: var(--secondary); margin-top: 2px;
}
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 1px; }
.results-empty { padding: 10px 10px 12px; }
.retry {
  min-height: 44px; padding: 0 4px; border: 0; background: none; cursor: pointer;
  font-family: inherit; font-size: 16px; font-weight: 600; color: var(--link); text-decoration: underline;
}
.empty-ico {
  width: 40px; height: 40px; border-radius: 10px; background: var(--well);
  display: flex; align-items: center; justify-content: center; margin-bottom: 10px; color: var(--secondary);
}
.empty-title { margin: 0 0 6px; font-size: 16px; font-weight: 600; line-height: 1.4; }
.empty-body, .empty-line { margin: 0; font-size: 14px; line-height: 1.43; color: var(--secondary); }
.empty-line { margin: 0 0 24px; }

/* ── Section cards (home) ───────────────────────────────────────────────── */
.grid { list-style: none; display: grid; grid-template-columns: 1fr; gap: 12px; }
.grid > li { min-width: 0; }
.card {
  display: flex; align-items: flex-start; gap: 12px; height: 100%; min-height: 88px; padding: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s;
}
@media (hover: hover) {
  .card:hover { border-color: var(--border-strong); box-shadow: var(--card-hover-shadow); }
}
.card:focus-visible { border-radius: 16px; }
.card-copy { flex: 1; min-width: 0; display: block; }
.card h2 { margin: 0 0 4px; font-size: 16px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; }
.card .desc {
  display: block; margin: 0 0 8px; font-size: 14px; line-height: 1.43; color: var(--secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card .count { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.3px; color: var(--hint); }
.icon-well {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; color: #2c2c2c;
}
.well-blue { background: #e2edff; } .well-sage { background: #d8ebe0; } .well-slate { background: #dae4ed; }
.well-blush { background: #ebd5d6; } .well-linen { background: #edeac6; } .well-lavender { background: #dedae9; }
.well-teal { background: #e6f4f5; } .well-peach { background: #f8e6d4; }
@media (prefers-color-scheme: dark) {
  .icon-well { color: #ffffff; }
  .well-blue { background: #243044; } .well-sage { background: #2a382f; } .well-slate { background: #2a323d; }
  .well-blush { background: #3d2f35; } .well-linen { background: #3a3d2a; } .well-lavender { background: #302e3d; }
  .well-teal { background: #1a3336; } .well-peach { background: #3a2e1c; }
}

/* ── Breadcrumbs ────────────────────────────────────────────────────────── */
.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; list-style: none;
  margin: 0 0 18px; font-size: 14px; line-height: 1.43; color: var(--secondary);
}
.crumbs li { min-width: 0; }
.crumbs a { color: var(--secondary); text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .here { color: var(--ink); display: block; max-width: 70vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs .slash { padding: 0 8px; color: var(--border-strong); }

/* ── Article rows ───────────────────────────────────────────────────────── */
.section-head { margin-bottom: 20px; }
.list-card {
  list-style: none; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden; margin: 0 0 24px;
}
.list-card > li + li { border-top: 1px solid var(--border); }
.row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 16px; text-decoration: none; }
.row:hover { background: var(--row-hover); }
.row:focus-visible { outline-offset: -2px; border-radius: 0; }
.list-card > li:first-child .row:focus-visible { border-radius: 16px 16px 0 0; }
.row-text { flex: 1; min-width: 0; }
.rt { display: block; margin: 0 0 2px; font-size: 16px; font-weight: 600; line-height: 1.35; }
.rd { display: block; font-size: 14px; line-height: 1.43; color: var(--secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chev { flex: none; color: var(--secondary); }

/* ── Article body ───────────────────────────────────────────────────────── */
article .summary { margin: 0 0 4px; font-size: 16px; line-height: 1.5; color: var(--secondary); }
.meta { margin: 0 0 20px; font-size: 12px; color: var(--secondary); }
.prose { max-width: 70ch; }
.prose p { margin: 0 0 14px; }
.prose h2 { margin: 28px 0 12px; font-size: 24px; font-weight: 600; line-height: 1.33; letter-spacing: -0.02em; }
.prose h3 { margin: 24px 0 8px; font-size: 18px; font-weight: 600; line-height: 1.33; }
.prose ol, .prose ul { margin: 0 0 16px; padding-left: 24px; }
.prose li { margin: 0 0 8px; padding-left: 4px; }
.prose li::marker { color: var(--secondary); font-weight: 600; }
.prose a, a.link { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover, a.link:hover { text-decoration-thickness: 2px; }
.prose code { font-size: 14px; padding: 1px 6px; border-radius: 12px; background: var(--well); }
.callout {
  margin: 8px 0 20px; padding: 16px; border-radius: 12px;
  background: var(--highlight); border-left: 3px solid var(--primary);
}
.callout.warn { background: var(--warning-fill); border-left-color: var(--warning-border); }
.callout strong { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.callout p { margin: 0; font-size: 14px; line-height: 1.43; }
.shot { margin: 8px 0 24px; }
.shot-well { background: var(--well); border: 1px solid var(--border); border-radius: 12px; padding: 8px; }
.shot-frame { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.shot-tag {
  background: var(--well); color: var(--secondary); font-size: 12px; font-weight: 600; letter-spacing: 0.3px;
  text-align: center; padding: 6px 8px; text-transform: uppercase; border-bottom: 1px solid var(--border);
}
.shot-cap { margin: 8px 2px 0; font-size: 14px; line-height: 1.43; color: var(--secondary); }

.related { margin: 32px 0 28px; }
.related h2, .help-block h2 { margin: 0 0 12px; font-size: 18px; font-weight: 600; line-height: 1.33; }
.help-block { background: var(--well); border-radius: 16px; padding: 20px; margin-top: 8px; }
.wrap .help-block, .article-wrap .help-block { border: 1px solid var(--border); }
.help-block p { margin: 0 0 16px; font-size: 14px; line-height: 1.43; color: var(--secondary); }
.btn-contact { font-size: 16px; padding: 10px 18px; }

.search-page { margin: 20px 0 0; }
.count-line { font-size: 14px; color: var(--secondary); margin: 0 0 12px; }
.browse { margin-top: 28px; }
.not-found { padding: 16px 0 24px; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  padding: 28px 20px; text-align: center; font-size: 14px; line-height: 1.5;
  color: var(--secondary); border-top: 1px solid var(--border); background: var(--surface);
}
.site-footer .links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; margin-bottom: 0; }
.site-footer .links a { color: var(--secondary); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
.site-footer .links a:hover { text-decoration: underline; color: var(--ink); }
.site-footer .dot { padding: 0 6px; color: var(--border-strong); }
/* Instagram glyph: own centered row, 8px above the LOOPIN LABS INC. line. */
.site-footer .social { display: flex; justify-content: center; margin: 0 0 8px; }
.site-footer .ig {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; color: var(--secondary);
  border: 0; text-decoration: none; background: transparent;
}
.site-footer .ig svg { width: 20px; height: 20px; display: block; }
.site-footer .ig:hover, .site-footer .ig:focus-visible { color: var(--primary); }
.legal { margin: 0; font-size: 12px; letter-spacing: 0.04em; }

/* ── Breakpoints (mobile first) ─────────────────────────────────────────── */
@media (min-width: 768px) {
  .header-inner, .wrap, .article-wrap { padding-left: 32px; padding-right: 32px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 16px; }
}
@media (min-width: 1080px) {
  .header-inner { padding-left: 48px; padding-right: 48px; }
  .wrap { padding: 40px 48px 64px; }
  .hero.center { text-align: center; margin-bottom: 36px; }
  .hero.center .search { margin: 0 auto; }
  .hero.center h1 { font-size: 32px; line-height: 1.25; }
  .hero.center .lede { font-size: 16px; line-height: 1.5; }
  .grid { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
