:root {
  --bg: #f6f6f3; --card: #ffffff; --text: #1f1f1d; --muted: #6b6b66; --border: #dcdcd6;
  --accent: #0f6e56; --accent-bg: #e1f5ee; --danger: #a32d2d; --danger-bg: #fcebeb;
  --warn: #854f0b; --warn-bg: #faeeda; --radius: 8px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1b1a; --card: #262624; --text: #ecebe6; --muted: #a3a29c; --border: #3a3a37;
    --accent: #5dcaa5; --accent-bg: #08413a; --danger: #f09595; --danger-bg: #501313;
    --warn: #fac775; --warn-bg: #412402;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Segoe UI", Tahoma, Arial, sans-serif; line-height: 1.6; }
header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; background: var(--card); border-bottom: 1px solid var(--border); }
header h1 { font-size: 18px; margin: 0; font-weight: 600; }
main { max-width: 1100px; margin: 0 auto; padding: 20px 16px; }
.narrow { max-width: 620px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; margin-bottom: 16px; }
label { display: block; font-size: 14px; color: var(--muted); margin: 14px 0 4px; }
input, select, textarea, button { font: inherit; color: var(--text); }
input, select, textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
button { padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); cursor: pointer; }
button:hover { border-color: var(--muted); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.spread { justify-content: space-between; }
.choice { flex: 1; min-width: 110px; }
.choice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.tabs button[aria-selected="true"] { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.error { color: var(--danger); font-size: 13px; min-height: 18px; margin: 4px 0 0; }
.success { background: var(--accent-bg); color: var(--accent); border-radius: var(--radius); padding: 12px 14px; margin-top: 14px; }
.ref { font-size: 22px; font-weight: 700; letter-spacing: 1px; direction: ltr; display: inline-block; }
.muted { color: var(--muted); font-size: 13px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.metric { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.metric b { display: block; font-size: 26px; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.list-item { border-top: 1px solid var(--border); padding: 8px 0; cursor: pointer; }
.list-item:hover { color: var(--accent); }
.badge { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: var(--radius); background: var(--accent-bg); color: var(--accent); white-space: nowrap; }
.badge.High { background: var(--danger-bg); color: var(--danger); }
.badge.Medium { background: var(--warn-bg); color: var(--warn); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: start; padding: 8px 6px; border-top: 1px solid var(--border); vertical-align: top; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--bg); }
.table-wrap { overflow-x: auto; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.filters label { margin: 0 0 2px; }
.translation { color: var(--muted); font-size: 13px; font-style: italic; margin-top: 3px; }
.translation::before { content: "↳ "; font-style: normal; }
.message { white-space: pre-wrap; margin: 8px 0; background: var(--bg); border-radius: var(--radius); padding: 10px 12px; }
.hidden { display: none !important; }
.choice-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); text-align: center; padding: 28px 20px; }
.choice-card b { font-size: 20px; }
.choice-card:hover { border-color: var(--accent); }
.back { color: var(--accent); text-decoration: none; font-size: 14px; }
