/* alert.kumarathurai.eu. Colors from kumarathurai.eu (style.css, travel.css),
   darkened where needed for WCAG AA contrast. System fonts only: nothing is
   loaded from other domains. */
:root {
  --primary: #3d4f22;
  --bg: #fafaf6;
  --surface: #ffffff;
  --surface-1: #f5f3ec;
  --text: #2a2a2a;
  --muted: #4d4d4d;
  --border: #ddd8cf;
  --border-strong: #6b6b6b;
  --link: #1556a6;
  --focus: #1556a6;
  --header-bg: #3d4f22;
  --header-text: #fafaf6;
  --check: #2e6b30;

  --danger-bg: #fce4ec;  --danger-text: #a51d1d;
  --accent-bg: #e3f2fd;  --accent-text: #0d4f9e;
  --warning-bg: #fff4d6; --warning-text: #8a3b00;
  --success-bg: #e8f5e9; --success-text: #1b5e20;
  --neutral-bg: #f5f3ec; --neutral-text: #2a2a2a;

  --official-bg: #e3f2fd; --official-text: #0d4f9e;
  --mine-bg: #fff4d6;     --mine-text: #8a3b00;

  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14160f;
    --surface: #1d2017;
    --surface-1: #262a1e;
    --text: #ecece4;
    --muted: #c5c5ba;
    --border: #3b4031;
    --border-strong: #9a9a8e;
    --link: #9ccbff;
    --focus: #9ccbff;
    --header-bg: #26301a;
    --header-text: #ecece4;
    --check: #7fc483;

    --danger-bg: #3a1d22;  --danger-text: #ffb4b4;
    --accent-bg: #172a3d;  --accent-text: #a8d2ff;
    --warning-bg: #36280e; --warning-text: #ffcf8a;
    --success-bg: #1a3220; --success-text: #a9dcab;
    --neutral-bg: #262a1e; --neutral-text: #ecece4;

    --official-bg: #172a3d; --official-text: #a8d2ff;
    --mine-bg: #36280e;     --mine-text: #ffcf8a;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
}
a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
main:focus { outline: none; }

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

.skip-link {
  position: absolute; left: 8px; top: -100px; z-index: 10;
  background: var(--surface); color: var(--text);
  padding: 12px 16px; border-radius: 6px; font-weight: 600;
  min-height: 44px; display: inline-flex; align-items: center;
}
.skip-link:focus { top: 8px; }

.site-header { background: var(--header-bg); color: var(--header-text); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 56px; }
.site-header a { color: var(--header-text); }
.site-header :focus-visible { outline-color: var(--header-text); }
.site-name { font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.lang-link { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; padding: 0 8px; font-weight: 600; }

.hero { background: var(--surface-1); border-bottom: 1px solid var(--border); padding: 1.75rem 0 1.5rem; }
.hero h1 { margin: 0 0 0.5rem; font-size: clamp(1.6rem, 5vw, 2.2rem); line-height: 1.2; color: var(--text); }
.hero p { margin: 0; color: var(--muted); font-size: 1.05rem; }

.content { padding-top: 1.5rem; padding-bottom: 3rem; }

/* Badge legend (as on /travel/) */
.badge-legend { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.25rem; margin-bottom: 1rem; }
.badge-legend-title { font-size: 0.85rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 0.6rem; }
.badge-legend-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; font-size: 0.95rem; }
.badge-legend-list .check-badge { margin: 0 4px 0 0; }

.check-badge { display: inline-block; font-size: 0.8rem; line-height: 1.4; padding: 1px 8px; border-radius: 4px; font-weight: 600; margin-left: 6px; white-space: nowrap; vertical-align: 1px; }
.badge-official { background: var(--official-bg); color: var(--official-text); }
.badge-mine { background: var(--mine-bg); color: var(--mine-text); }

/* Progress */
.progress-container { background: var(--surface-1); border-radius: 12px; padding: 1.25rem; margin-bottom: 1.5rem; }
.progress-text { font-size: 1.05rem; font-weight: 700; margin: 0; }
.progress-bar-outer { background: var(--border); border-radius: 999px; height: 14px; overflow: hidden; margin: 10px 0; }
.progress-bar-inner { background: var(--check); height: 100%; width: 0; border-radius: 999px; transition: width 0.3s ease; }
.progress-sub { margin: 0; color: var(--muted); font-size: 0.95rem; }
.progress-warning { margin: 0.5rem 0 0; color: var(--danger-text); font-weight: 600; font-size: 0.95rem; }

/* Categories */
.checklist-category { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.category-header { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 12px 1.25rem; background: var(--tone-bg); border-bottom: 1px solid var(--border); }
.category-header h2 { margin: 0; font-size: 1.1rem; line-height: 1.3; color: var(--tone-text); }
.tone-danger  { --tone-bg: var(--danger-bg);  --tone-text: var(--danger-text); }
.tone-accent  { --tone-bg: var(--accent-bg);  --tone-text: var(--accent-text); }
.tone-warning { --tone-bg: var(--warning-bg); --tone-text: var(--warning-text); }
.tone-success { --tone-bg: var(--success-bg); --tone-text: var(--success-text); }
.tone-neutral { --tone-bg: var(--neutral-bg); --tone-text: var(--neutral-text); }
.category-count { font-size: 0.85rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--surface); color: var(--muted); white-space: nowrap; }
.category-count:empty { display: none; }
.category-count.done { background: var(--success-bg); color: var(--success-text); }
.category-body { padding: 0.25rem 1.25rem 0.75rem; }
.category-intro { margin: 0.75rem 0 0.25rem; font-weight: 600; }

/* Check items: native checkbox + label, whole row is at least 44px tall */
.check-list { list-style: none; margin: 0; padding: 0; }
.check-item { display: flex; align-items: flex-start; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.check-item:last-child { border-bottom: none; }
.check-item input {
  flex-shrink: 0;
  width: 24px; height: 24px;
  /* 10px top margin centres the box on the first 44px-tall label line */
  margin: 10px 0 0;
  accent-color: var(--check);
  cursor: pointer;
}
.check-text { flex: 1; min-width: 0; }
.check-item label { display: block; padding: 10px 0; min-height: 44px; cursor: pointer; }
.check-label { font-size: 1rem; }
.check-item input:checked + .check-text .check-label { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); }
.check-hint { margin: -6px 0 8px; font-size: 0.92rem; color: var(--muted); }
.check-hint a, .info-note a { display: inline-block; padding: 12px 0; margin: -12px 0; }

/* Official links */
.links-title { font-size: 0.85rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin: 1rem 0 0.25rem; }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.link-list li:last-child { border-bottom: none; }
.link-list a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.link-note { display: block; font-size: 0.9rem; color: var(--muted); margin-top: -6px; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 1.25rem; }
.actions[hidden] { display: none; }
.btn {
  min-height: 44px; padding: 8px 18px;
  font: inherit; font-size: 0.95rem; font-weight: 600;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 6px; cursor: pointer;
}
.btn:hover { background: var(--surface-1); }
.btn-danger { color: var(--danger-text); }
.btn-danger:hover { background: var(--danger-bg); }

/* Guidance + privacy note */
.info-note { background: var(--surface-1); border: 1px solid var(--border); border-radius: 12px; padding: 0.875rem 1.25rem; margin-top: 1.5rem; font-size: 0.95rem; }
.info-note p { margin: 0.25rem 0; }
.info-note-title { font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  :root { --bg: #fff; --surface: #fff; --surface-1: #fff; --text: #000; --muted: #333; --border: #bbb; }
  body { font-size: 11pt; background: #fff; color: #000; }
  .skip-link, .site-header, .progress-container, .actions { display: none !important; }
  .badge-legend { border: 1px solid #999; padding: 6px 10px; margin-bottom: 8px; }
  .hero { background: none; border: 0; padding: 0 0 0.5rem; }
  .hero h1 { font-size: 18pt; }
  .content { padding: 0; }
  .wrap { max-width: none; padding: 0; }
  .checklist-category { break-inside: avoid; border: 1px solid #999; margin-bottom: 8px; }
  .category-header { background: none; border-bottom: 1px solid #999; padding: 6px 10px; }
  .category-header h2 { color: #000; font-size: 13pt; }
  .category-body { padding: 0 10px 4px; }
  .check-item label { padding: 4px 0; min-height: 0; }
  .check-item input { margin-top: 5px; width: 14px; height: 14px; }
  .check-hint { margin: 0 0 4px; }
  .check-hint a, .info-note a, .link-list a { padding: 0; margin: 0; min-height: 0; }
  .check-badge { border: 1px solid #666; background: none; color: #000; }
  a { color: #000; }
  .check-hint a[href^="http"]::after, .link-list a[href^="http"]::after, .info-note a[href^="http"]::after {
    content: " (" attr(href) ")"; font-weight: normal; word-break: break-all;
  }
}
