/* Same palette as the main site (ervinssamorokovs.dev); readable sans/mono fonts for the work areas. */
:root {
  --bg: #06110a;
  --bg-2: #0a1a10;
  --card: #0d2015;
  --border: #1d3d29;
  --text: #dcf5e3;
  --muted: #8fb39b;
  --accent: #4ade80;
  --accent-dark: #166534;
  --on-accent: #04210f;
  --danger: #f87171;
  --pixel: "Pixel", "Courier New", monospace; /* fonts/fonts.css */
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --shadow: 4px 4px 0 var(--accent-dark);
  --radius: 4px;

  /* One colour per category: highlight background + underline. */
  --c-name: #4ade80;
  --c-address: #facc15;
  --c-phone: #38bdf8;
  --c-email: #c084fc;
  --c-handle: #818cf8;
  --c-personal_code: #f87171;
  --c-passport: #fb923c;
  --c-driver_license: #f472b6;
  --c-employee_id: #2dd4bf;
  --c-customer_id: #a3e635;
  --c-custom: #e2e8f0;
}

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(700px 450px at 85% -10%, rgba(74, 222, 128, .10), transparent 70%),
    linear-gradient(rgba(74, 222, 128, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 222, 128, .03) 1px, transparent 1px);
  background-size: auto, 24px 24px, 24px 24px;
  background-attachment: fixed;
  min-height: 100vh;
}

a { color: var(--accent); }
h1, h2 { font-family: var(--pixel); font-weight: 400; line-height: 1.3; margin: 0; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.05rem; color: var(--accent); }
::selection { background: var(--accent); color: var(--on-accent); }
button, select, textarea, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Header ---------- */
.top {
  display: flex; gap: 1rem 2rem; align-items: flex-start; justify-content: space-between;
  padding: 1.25rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 2px solid var(--border);
  background: rgba(6, 17, 10, .85);
}
.top__brand { display: flex; gap: 1rem; align-items: flex-start; min-width: 0; }
.top__sub { margin: .35rem 0 0; color: var(--muted); font-size: .95rem; }
.logo {
  flex: none; display: grid; place-items: center;
  width: 48px; height: 48px; background: var(--card); border: 2px solid var(--accent); box-shadow: var(--shadow);
}
.logo svg { width: 26px; height: 26px; fill: var(--accent); }
/* Title, subtitle and privacy badge on the left, language buttons always on the right. */
.top__right { display: flex; flex: none; }

.badge {
  display: inline-flex; align-items: center; gap: .55rem; margin: .7rem 0 0;
  padding: .45rem .8rem; border: 2px solid var(--border); background: var(--card);
  font-size: .85rem; color: var(--muted); min-width: 0;
}
.badge__dot { width: 10px; height: 10px; background: var(--muted); flex: none; }
.badge[data-state="ok"] { border-color: var(--accent-dark); color: var(--text); }
.badge[data-state="ok"] .badge__dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.badge[data-state="fail"] { border-color: var(--danger); color: var(--danger); }
.badge[data-state="fail"] .badge__dot { background: var(--danger); }

.lang { display: flex; flex: none; border: 2px solid var(--border); }
.lang button {
  background: none; border: 0; padding: .4rem .7rem; cursor: pointer;
  font-family: var(--pixel); font-size: .7rem; color: var(--muted);
}
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.lang button:hover:not([aria-pressed="true"]) { color: var(--text); }

/* ---------- Layout ---------- */
.layout {
  display: grid; gap: 1.25rem;
  grid-template-columns: 270px minmax(0, 1fr) minmax(0, 1fr);
  padding: 1.25rem clamp(1rem, 4vw, 2.5rem);
  align-items: start;
}
@media (max-width: 1150px) {
  .layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .settings { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem 1.5rem; }
  .settings h2 { grid-column: 1 / -1; }
}
/* One column: settings, original text, anonymized text, the same order as on wide screens. */
@media (max-width: 760px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
}

.card { background: var(--card); border: 2px solid var(--border); padding: 1.1rem; }

/* ---------- Settings ---------- */
.settings h2 { margin-bottom: .75rem; }
.field { display: flex; flex-direction: column; gap: .35rem; margin: 0 0 1rem; padding: 0; border: 0; min-width: 0; }
.field > span, .field legend { font-size: .85rem; color: var(--muted); padding: 0; margin-bottom: .1rem; }
.field small { color: var(--muted); font-size: .78rem; }
select, .field textarea {
  width: 100%; background: var(--bg-2); border: 2px solid var(--border); padding: .45rem .55rem; border-radius: var(--radius);
}
.field textarea { font-family: var(--mono); font-size: .9rem; resize: vertical; }
select option { background: var(--bg-2); }

.checks { display: flex; flex-direction: column; gap: .3rem; }
.check { display: flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .92rem; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.swatch { width: 12px; height: 12px; flex: none; }
.check--name .swatch { background: var(--c-name); }
.check--address .swatch { background: var(--c-address); }
.check--phone .swatch { background: var(--c-phone); }
.check--email .swatch { background: var(--c-email); }
.check--handle .swatch { background: var(--c-handle); }
.check--personal_code .swatch { background: var(--c-personal_code); }
.check--passport .swatch { background: var(--c-passport); }
.check--driver_license .swatch { background: var(--c-driver_license); }
.check--employee_id .swatch { background: var(--c-employee_id); }
.check--customer_id .swatch { background: var(--c-customer_id); }
.check--custom .swatch { background: var(--c-custom); }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.chip {
  display: inline-flex; align-items: center; gap: .3rem; max-width: 100%;
  background: var(--bg-2); border: 1px solid var(--border); padding: .1rem .2rem .1rem .5rem; font-family: var(--mono); font-size: .82rem;
}
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip button { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 1rem; line-height: 1; padding: 0 .2rem; }
.chip button:hover { color: var(--danger); }

/* ---------- Panes ---------- */
.pane { display: flex; flex-direction: column; gap: .75rem; min-width: 0; }
.pane__head { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; }
.pane__foot { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; min-height: 2rem; }
.actions { display: flex; flex-wrap: wrap; gap: .4rem; }

.btn {
  background: var(--bg-2); border: 2px solid var(--border); padding: .4rem .75rem; cursor: pointer;
  font-size: .88rem; border-radius: var(--radius); transition: border-color .15s, transform .1s;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translate(1px, 1px); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn--primary:hover { background: #6ee79d; }
.btn--ghost { background: none; }
.btn--small { font-size: .8rem; padding: .3rem .6rem; }

.text {
  width: 100%; height: 26rem; resize: vertical; overflow: auto;
  background: var(--bg-2); border: 2px solid var(--border); border-radius: var(--radius);
  padding: .8rem .9rem; font-family: var(--mono); font-size: .9rem; line-height: 1.65;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.text:focus { border-color: var(--accent-dark); outline: none; }
.text.is-drop { border-style: dashed; border-color: var(--accent); }
textarea.text::placeholder, .placeholder { color: var(--muted); opacity: .8; }
.count { color: var(--muted); font-size: .8rem; }

.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: -.75rem; }
.tab {
  background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px;
  padding: .35rem .8rem; cursor: pointer; color: var(--muted); font-size: .88rem;
}
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }

/* ---------- Highlights ---------- */
.ent {
  --c: var(--c-custom);
  display: inline; padding: 0 .15em; margin: 0; border: 0; border-radius: 2px; cursor: pointer;
  font: inherit; line-height: inherit; color: var(--text); white-space: pre-wrap;
  background: color-mix(in srgb, var(--c) 22%, transparent);
  box-shadow: inset 0 -2px 0 var(--c);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.ent:hover { background: color-mix(in srgb, var(--c) 38%, transparent); }
.ent.is-unsure { box-shadow: none; text-decoration: underline dotted var(--c) 2px; text-underline-offset: 3px; }
.ent.is-kept { background: none; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 60%, transparent); color: var(--muted); }
.ent--name { --c: var(--c-name); }
.ent--address { --c: var(--c-address); }
.ent--phone { --c: var(--c-phone); }
.ent--email { --c: var(--c-email); }
.ent--handle { --c: var(--c-handle); }
.ent--personal_code { --c: var(--c-personal_code); }
.ent--passport { --c: var(--c-passport); }
.ent--driver_license { --c: var(--c-driver_license); }
.ent--employee_id { --c: var(--c-employee_id); }
.ent--customer_id { --c: var(--c-customer_id); }
.ent--custom { --c: var(--c-custom); }

.stats { margin: 0; font-size: .85rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.stat { --c: var(--c-custom); padding: .05rem .45rem; color: var(--text); background: color-mix(in srgb, var(--c) 18%, transparent); border-left: 3px solid var(--c); }
.hint { margin: 0; font-size: .8rem; color: var(--muted); }

/* ---------- Privacy ---------- */
.privacy { margin: 0 clamp(1rem, 4vw, 2.5rem) 1.25rem; }
.privacy h2 { margin-bottom: .6rem; }
.privacy ol { margin: 0; padding-left: 1.3rem; display: grid; gap: .4rem; color: var(--text); }
.privacy li::marker { color: var(--accent); font-family: var(--mono); }
.disclaimer { margin: .9rem 0 0; padding: .6rem .8rem; border-left: 3px solid var(--c-address); background: var(--bg-2); font-size: .9rem; }

.footer { padding: 0 clamp(1rem, 4vw, 2.5rem) 2rem; color: var(--muted); font-size: .85rem; }
.noscript { margin: 1rem; padding: 1rem; border: 2px solid var(--danger); }

[hidden] { display: none !important; }
