/* LK-ScamWatch — mobile-first, no framework, no build step (SPEC.md §8).
   Designed for a mid-range Android phone on mobile data: no webfonts, no
   images beyond what a page explicitly needs, system font stack only. */

:root {
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-muted: #5a5a5a;
  --color-border: #d8d8d8;
  --color-primary: #0a4d8c;
  --color-primary-dark: #083964;
  --color-danger-bg: #fdeaea;
  --color-danger-border: #c0392b;
  --color-danger-text: #7a1f14;
  --color-neutral-bg: #f2f2f2;
  --color-neutral-border: #9a9a9a;
  --color-neutral-text: #333333;
  --color-safe-bg: #eaf7ec;
  --color-safe-border: #2e7d32;
  --color-safe-text: #1b4d1e;
  --max-width: 720px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  font-size: 16px;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem;
}

header.site-header {
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: 0;
  padding: 0;
}

nav.main-nav a {
  text-decoration: none;
  font-size: 0.95rem;
}

.lang-toggle {
  display: flex;
  gap: 0.25rem;
}

.lang-toggle button {
  font-size: 0.85rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  border-radius: 4px;
  cursor: pointer;
}

.lang-toggle button[aria-pressed="true"] {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

h1 { font-size: 1.5rem; margin: 1rem 0 0.5rem; }
h2 { font-size: 1.15rem; margin: 1.5rem 0 0.5rem; }
p.intro { color: var(--color-muted); }

/* Dashboard stat grid */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1rem 0;
}

@media (min-width: 480px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}

.stat-card {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.75rem;
  text-align: center;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-primary);
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.25rem;
}

.stat-desc {
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-top: 0.25rem;
}

.cta-box {
  border: 2px solid var(--color-primary);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  margin: 1.5rem 0;
}

.button {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
}

.button:hover { background: var(--color-primary-dark); }
.button:disabled { background: var(--color-neutral-border); cursor: not-allowed; }

/* Forms */
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.25rem; }

.field input[type="text"],
.field input[type="url"],
.field select {
  width: 100%;
  padding: 0.55rem;
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

/* Honeypot: fully hidden from real users, still present for bots that
   fill every field blindly. Not display:none, since some unsophisticated
   scrapers specifically skip display:none fields — off-screen positioning
   plus aria-hidden covers both cases while staying invisible/unreachable
   for real (including screen-reader) users. */
.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Lookup / result states */
.result-box {
  border-radius: 8px;
  border: 2px solid;
  padding: 1rem;
  margin-top: 1rem;
}

.result-box.malicious {
  background: var(--color-danger-bg);
  border-color: var(--color-danger-border);
  color: var(--color-danger-text);
}

.result-box.unknown {
  background: var(--color-neutral-bg);
  border-color: var(--color-neutral-border);
  color: var(--color-neutral-text);
}

.result-box.clean {
  background: var(--color-safe-bg);
  border-color: var(--color-safe-border);
  color: var(--color-safe-text);
}

.result-box h2 { margin-top: 0; }
.result-box ul { padding-left: 1.25rem; }

/* Malicious list table */
.table-scroll { overflow-x: auto; }

table.malicious-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

table.malicious-table th,
table.malicious-table td {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.defanged-host {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* Footer */
footer.site-footer {
  border-top: 1px solid var(--color-border);
  margin-top: 2rem;
  font-size: 0.8rem;
  color: var(--color-muted);
}

footer.site-footer h3 {
  font-size: 0.85rem;
  margin: 1rem 0 0.25rem;
  color: var(--color-text);
}

footer.site-footer p { margin: 0.25rem 0; }

.status-message {
  padding: 0.6rem;
  border-radius: 6px;
  margin-top: 0.5rem;
}

.status-message.error {
  background: var(--color-danger-bg);
  color: var(--color-danger-text);
}

.status-message.success {
  background: var(--color-safe-bg);
  color: var(--color-safe-text);
}

[hidden] { display: none !important; }
