/* ColdStrike base styles. Light/dark follows the system, no manual toggle. */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #eef0f4;
  --text: #16181d;
  --muted: #5f6470;
  --border: #e1e4ea;
  --accent: #2f5cff;
  --accent-press: #2149d6;
  --accent-text: #ffffff;
  --ok: #157f3d;
  --ok-bg: #e3f4e9;
  --warn: #9a6700;
  --warn-bg: #fff3d6;
  --danger: #c62f2f;
  --danger-bg: #fde8e8;
  --shadow: 0 1px 2px rgba(15, 17, 21, 0.05), 0 2px 8px rgba(15, 17, 21, 0.06);
  --ring: rgba(47, 92, 255, 0.25);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #171a21;
    --surface-2: #1f232d;
    --text: #e9eaee;
    --muted: #9aa0ab;
    --border: #272c37;
    --accent: #6b8bff;
    --accent-press: #8aa3ff;
    --accent-text: #0f1115;
    --ok: #4cc57a;
    --ok-bg: #14301f;
    --warn: #e3b341;
    --warn-bg: #33290f;
    --danger: #f07b7b;
    --danger-bg: #3a1717;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 10px rgba(0, 0, 0, 0.25);
    --ring: rgba(107, 139, 255, 0.35);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
}

#app {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px;
  padding-top: calc(16px + env(safe-area-inset-top));
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

h1, h2, h3 { margin: 0 0 8px; line-height: 1.2; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 12px;
}

.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
.center { text-align: center; }

button, .btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  border-radius: 12px;
  padding: 12px 18px;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
button:hover:not(:disabled) { border-color: var(--muted); }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.5; cursor: default; }
button:focus-visible, .btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}
.btn-primary:hover:not(:disabled) { border-color: var(--accent); filter: brightness(1.05); }
.btn-primary:active { background: var(--accent-press); }
.btn-danger {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: var(--danger);
}
.btn-ok {
  background: var(--ok-bg);
  border-color: var(--ok);
  color: var(--ok);
}
.btn-block { display: block; width: 100%; }

input, textarea, select {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
label { display: block; font-weight: 600; margin-bottom: 4px; }
.field { margin-bottom: 14px; }

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
}
.badge-ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.badge-warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge-danger { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.badge-accent { background: var(--accent); color: var(--accent-text); border-color: transparent; }

.tabs {
  display: flex;
  gap: 6px;
  background: var(--surface-2);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 16px;
}
.tabs button {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 10px;
  border-radius: 9px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}
.tabs button:hover:not(.active) { color: var(--text); }
.tabs button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.brand {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.brand .dot { color: var(--accent); }

.notice {
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
  margin-bottom: 12px;
}
.notice-ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.notice-warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }

.empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--muted);
}
.empty .glyph { font-size: 2.4rem; margin-bottom: 8px; }

.divider { border: none; border-top: 1px solid var(--border); margin: 14px 0; }

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.checklist-item:last-child { border-bottom: none; }
.checklist-item input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  flex: none;
  accent-color: var(--accent);
  cursor: pointer;
}
.checklist-item .txt { cursor: pointer; }
.checklist-item.done .txt { text-decoration: line-through; color: var(--muted); }

.steps { margin: 0; padding-left: 20px; }
.steps li { margin-bottom: 10px; }

.kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted); }

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