/* Rensabilden – samma lugna, mörka formspråk som Bildinformation */
:root {
  --bg: #000;
  --bg-alt: #0b0b0c;
  --surface: #161617;
  --surface-2: #1d1d1f;
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #6e6e73;
  --line: #2c2c2e;
  --line-soft: #232325;
  --sand: #e6dccb;
  --sand-ink: #2b2620;
  --sand-ink-2: #6b6255;
  --red: #ff6961;
  --green: #30d158;
  --radius: 28px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Segoe UI", system-ui, Arial, sans-serif;
  --ease: cubic-bezier(.25, .1, .25, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
body { margin: 0; padding-bottom: env(safe-area-inset-bottom); font-family: var(--font); font-size: 17px; line-height: 1.47; letter-spacing: -0.022em; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img, svg { display: block; }
[hidden] { display: none !important; }
a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(245,245,247,.35); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid rgba(255,255,255,.7); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 22px; }
.card { background: var(--surface); border-radius: var(--radius); }
@media not all and (hover: none) and (pointer: coarse) { .only-mobile { display: none !important; } }
@media (hover: none) and (pointer: coarse) { .only-desktop { display: none !important; } }

/* Sidhuvud */
.header { position: sticky; top: 0; z-index: 20; background: rgba(0,0,0,.72); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid rgba(255,255,255,.08); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 48px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font-weight: 600; letter-spacing: -0.02em; }
.brand__mark { width: 26px; height: 26px; border-radius: 7px; box-shadow: 0 0 0 .5px rgba(255,255,255,.14); }
.header__link { font-size: 14px; color: var(--text-2); text-decoration: none; }
.header__link:hover { color: var(--text); }

/* Hero */
.hero { padding: 72px 0 72px; text-align: center; background: radial-gradient(ellipse 70% 50% at 50% 0%, #1a1a1c 0%, #000 70%); }
.hero h1 { font-size: clamp(36px, 6.4vw, 64px); line-height: 1.05; letter-spacing: -0.045em; font-weight: 700; }
.hero h1 span { display: block; color: var(--text-3); }
.lead { font-size: clamp(18px, 2.2vw, 22px); line-height: 1.4; color: var(--text-2); margin: 22px auto 0; max-width: 600px; letter-spacing: -0.02em; }

/* Valyta – sand */
.drop { margin: 40px auto 0; max-width: 560px; background: var(--sand); color: var(--sand-ink); border-radius: 32px; padding: 44px 26px 38px; position: relative; box-shadow: 0 30px 80px -30px rgba(230,220,203,.25); transition: transform .3s var(--ease), background .3s var(--ease); }
.drop::after { content: ""; position: absolute; inset: 14px; border-radius: 22px; border: 1px solid rgba(43,38,32,.12); pointer-events: none; }
.drop.is-over { transform: scale(1.015); background: #efe7d9; }
.drop.is-over::after { border: 1.5px solid var(--sand-ink); }
.drop.is-busy { opacity: .75; }
.drop__icon { width: 46px; height: 46px; margin: 0 auto 20px; color: var(--sand-ink); opacity: .85; }
.drop__help { margin-top: 20px; font-size: 13px; color: var(--sand-ink-2); letter-spacing: 0; position: relative; z-index: 1; }
.drop .button { position: relative; z-index: 1; }

/* Knappar */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 17px; letter-spacing: -0.02em; padding: 13px 28px; border-radius: 980px; border: 0; cursor: pointer; text-decoration: none; transition: background .2s var(--ease); white-space: nowrap; }
.button--dark { background: #1d1d1f; color: #f5f5f7; }
.button--dark:hover { background: #000; }
.button--light { background: #f5f5f7; color: #000; }
.button--light:hover { background: #fff; }
.button--secondary { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px #48484a; }
.button--secondary:hover { background: rgba(255,255,255,.06); }

/* Resultat */
.results { padding: 8px 22px 64px; max-width: 720px; scroll-margin-top: 60px; }
.summary { padding: 30px 28px; text-align: center; }
.summary h2 { font-size: clamp(24px, 4vw, 30px); letter-spacing: -0.03em; }
.summary p { color: var(--text-2); margin-top: 10px; line-height: 1.45; }
.summary__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }
.summary .summary__hint { font-size: 14px; color: var(--text-3); margin-top: 14px; }
.summary .summary__note { font-size: 14px; color: var(--text-3); }

.files { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.file { display: grid; grid-template-columns: 76px 1fr; gap: 16px; align-items: start; background: var(--surface); border-radius: 20px; padding: 14px; }
.file__thumb { width: 76px; height: 76px; border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.file__thumb img { width: 100%; height: 100%; object-fit: cover; }
.file__body { min-width: 0; padding-top: 2px; }
.file__name { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file__status { font-size: 15px; color: var(--text-2); margin-top: 3px; }
.file__status--ok { color: var(--green); }
.file__status--error { color: var(--red); }
.file--work .file__status { color: var(--text); }
.file__note { font-size: 13px; color: var(--text-3); margin-top: 8px; }
.found { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 10px 0 0; font-size: 14px; }
.found dt { color: var(--text-3); }
.found dd { margin: 0; color: var(--text-2); text-decoration: line-through; text-decoration-color: rgba(255,255,255,.35); overflow-wrap: anywhere; }
.found dd.is-strong { color: var(--text); }

/* Sektioner */
.section { padding: 88px 0; }
.section--alt { background: var(--bg-alt); }
.section h2 { font-size: clamp(32px, 5vw, 48px); line-height: 1.08; letter-spacing: -0.045em; font-weight: 700; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 40px; }
.fact { background: var(--surface); border-radius: 22px; padding: 24px 22px; }
.fact strong { display: block; font-weight: 600; margin-bottom: 6px; }
.fact p { color: var(--text-2); font-size: 15px; line-height: 1.45; }
.note { color: var(--text-3); font-size: 15px; margin-top: 22px; max-width: 680px; }

.faq { margin-top: 40px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 44px 22px 0; font-size: 18px; font-weight: 500; letter-spacing: -0.02em; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 28px; font-weight: 200; color: var(--text-2); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details > div { padding: 0 0 24px; color: var(--text-2); max-width: 680px; }
.faq details > div p + p { margin-top: 10px; }

/* Om-sidan */
.page { padding: 64px 0 88px; }
.page h1 { font-size: clamp(34px, 5vw, 48px); letter-spacing: -0.045em; font-weight: 700; }
.page .intro { color: var(--text-2); font-size: 19px; margin-top: 16px; max-width: 680px; }
.page h2 { font-size: 21px; letter-spacing: -0.02em; margin: 44px 0 10px; }
.page p, .page li { color: var(--text-2); max-width: 680px; }
.page p + p { margin-top: 12px; }
.page ul { padding-left: 20px; margin: 10px 0 0; }
.page li { margin-bottom: 6px; }
.page a { color: inherit; }
.page a:hover { color: var(--text); }

/* Statistiksidan */
.stats { padding: 48px 0 80px; }
.stats h1 { font-size: 34px; letter-spacing: -0.04em; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 28px 0; }
.kpi { background: var(--surface); border-radius: 20px; padding: 18px 20px; }
.kpi span { display: block; color: var(--text-3); font-size: 14px; }
.kpi strong { display: block; font-size: 32px; letter-spacing: -0.03em; margin-top: 2px; }
.table-scroll { overflow-x: auto; }
.stable { width: 100%; border-collapse: collapse; font-size: 15px; }
.stable th, .stable td { text-align: right; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.stable th:first-child, .stable td:first-child { text-align: left; }
.stable th { color: var(--text-3); font-weight: 500; }
.login { max-width: 360px; margin: 40px auto; display: grid; gap: 14px; }
.login label { display: grid; gap: 6px; color: var(--text-2); font-size: 15px; }
.login input { font: inherit; color: var(--text); background: var(--surface-2); border: 0; border-radius: 12px; padding: 12px 14px; box-shadow: inset 0 0 0 1px var(--line); }
.login .error { color: var(--red); font-size: 15px; }

/* Sidfot */
.footer { background: var(--bg-alt); color: var(--text-3); padding: 32px 0 40px; font-size: 13px; border-top: 1px solid var(--line-soft); }
.footer__inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer a { color: var(--text-2); }

@media (max-width: 600px) {
  .hero { padding: 44px 0 52px; }
  .hero h1 { font-size: 36px; }
  .lead { font-size: 17px; margin-top: 16px; }
  .drop { margin-top: 28px; padding: 34px 22px 30px; border-radius: 26px; }
  .summary { padding: 26px 20px; }
  .summary__actions .button { flex: 1 1 100%; }
  .section { padding: 64px 0; }
}

/* Information om hantering och valet att rensa i telefonen */
.mode { margin: 18px auto 0; max-width: 520px; font-size: 13px; line-height: 1.5; color: var(--text-3); }
.mode a { color: var(--text-2); }
.mode__toggle { font: inherit; font-size: 13px; color: var(--text-3); background: none; border: 0; padding: 6px 4px; margin-top: 2px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.25); }
.mode__toggle:hover { color: var(--text-2); }
.mode-choice .mode__toggle { font-size: 15px; color: var(--text-2); }
.footer nav { display: flex; gap: 22px; flex-wrap: wrap; }

/* Inställningar (knapp uppe till höger + ark) */
.gear { width: 38px; height: 38px; margin-right: -8px; display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--text-2); cursor: pointer; position: relative; }
.gear:hover { color: var(--text); background: rgba(255,255,255,.06); }
.gear svg { width: 22px; height: 22px; }
.gear.is-local::after { content: ""; position: absolute; top: 8px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--sand); }
.sheet { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 520px; background: transparent; color: var(--text); }
.sheet::backdrop { background: rgba(0,0,0,.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sheet__inner { background: #1c1c1e; border-radius: 26px 26px 0 0; padding: 22px 22px calc(26px + env(safe-area-inset-bottom)); box-shadow: 0 -1px 0 rgba(255,255,255,.08); }
@media (min-width: 600px) { .sheet { margin: auto; } .sheet__inner { border-radius: 26px; } }
.sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet__head h2 { font-size: 21px; letter-spacing: -0.02em; }
.sheet__close { width: 32px; height: 32px; border-radius: 50%; border: 0; background: #2c2c2e; color: var(--text-2); font-size: 14px; cursor: pointer; }
.sheet__q { color: var(--text-2); font-size: 15px; margin-bottom: 10px; }
.opt { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; padding: 14px 16px; border-radius: 16px; background: #2c2c2e; margin-bottom: 10px; cursor: pointer; }
.opt input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: #e6dccb; }
.opt strong { display: block; font-weight: 600; margin-bottom: 2px; color: var(--text); }
.opt strong em { font-style: normal; font-weight: 400; color: var(--text-3); }
.opt span { color: var(--text-2); font-size: 15px; line-height: 1.45; }
.opt:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--sand); }
.sheet__more { margin-top: 6px; font-size: 14px; }
.sheet__more a { color: var(--text-2); }

/* Dator: QR-kod till telefonen */
.gate { margin: 48px auto 0; max-width: 560px; background: var(--sand); color: var(--sand-ink); border-radius: 32px; padding: 48px 40px 44px; text-align: center; }
.qr { width: 200px; height: 200px; margin: 0 auto 26px; background: #fff; border-radius: 22px; padding: 16px; box-shadow: 0 10px 30px -12px rgba(43,38,32,.35); }
.qr svg { width: 100%; height: 100%; display: block; }
.gate__title { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; margin: 0 0 8px; }
.gate__text { color: var(--sand-ink-2); max-width: 400px; margin: 0 auto 14px; }
.gate__url { font-size: 13px; color: var(--sand-ink-2); word-break: break-all; margin: 0; }
