/* apps.lconsulting.se – alla färger som variabler, ljust och mörkt läge. */
:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1b1f24;
  --muted: #555e69;
  --border: #dde1e6;
  --accent: #1f5fbf;
  --accent-text: #ffffff;
  --accent-hover: #184d9c;
  --focus: #1f5fbf;
  --error: #a4161a;
  --skeleton: #e8ebef;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111418;
    --surface: #1a1e24;
    --text: #e8ebef;
    --muted: #a3acb7;
    --border: #2c323a;
    --accent: #5b9cf5;
    --accent-text: #0b1220;
    --accent-hover: #7db1f7;
    --focus: #7db1f7;
    --error: #ff8a8a;
    --skeleton: #232830;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111418;
  --surface: #1a1e24;
  --text: #e8ebef;
  --muted: #a3acb7;
  --border: #2c323a;
  --accent: #5b9cf5;
  --accent-text: #0b1220;
  --accent-hover: #7db1f7;
  --focus: #7db1f7;
  --error: #ff8a8a;
  --skeleton: #232830;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  overflow-wrap: anywhere;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.skip {
  position: absolute; left: 16px; top: -100px;
  background: var(--surface); color: var(--text);
  padding: 10px 14px; border-radius: 8px; z-index: 10;
}
.skip:focus { top: calc(8px + env(safe-area-inset-top)); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.top { border-bottom: 1px solid var(--border); padding-top: env(safe-area-inset-top); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { margin: 0; font-weight: 600; }
.toggles { display: flex; gap: 8px; }

.pill {
  min-width: 44px; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text);
  font: inherit; font-size: 15px; cursor: pointer;
}
.pill:hover { border-color: var(--accent); }

h1 { font-size: clamp(28px, 6vw, 40px); line-height: 1.15; margin: 40px 0 8px; }
.lead { color: var(--muted); margin: 0 0 32px; max-width: 60ch; }
h2 { font-size: 22px; margin: 0 0 12px; }

.apps { display: grid; gap: 16px; margin-bottom: 32px; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.card-head { display: flex; gap: 16px; align-items: center; }
.card .icon { width: 72px; height: 72px; flex: none; }
.card .name { margin: 0; font-size: 22px; }
.card .meta { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.card .desc { margin: 16px 0; }

.skeleton { min-height: 220px; background: var(--skeleton); border-color: transparent; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px; border-radius: 10px;
  font-weight: 600; text-decoration: none;
}
.btn.primary { background: var(--accent); color: var(--accent-text); }
.btn.primary:hover { background: var(--accent-hover); color: var(--accent-text); }

.notes { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.notes summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
.notes-body { font-size: 15px; }
.notes-body h3, .notes-body h4 { font-size: 16px; margin: 12px 0 4px; }
.notes-body ul { padding-left: 20px; margin: 4px 0; }
.notes-body code { font-size: 14px; }

.error { color: var(--error); }

.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 24px;
}
.steps { margin: 0; padding-left: 22px; }
.steps li + li { margin-top: 8px; }
.muted { color: var(--muted); font-size: 15px; }

.foot {
  border-top: 1px solid var(--border); margin-top: 40px;
  padding: 20px 0 calc(20px + env(safe-area-inset-bottom));
  color: var(--muted); font-size: 15px;
}
.foot p { margin: 4px 0; }
.foot a { display: inline-block; padding: 6px 0; }

.notfound { text-align: center; padding: 64px 0; }
