:root {
  --bg: #F3F5F2; --surface: #FFFFFF; --fg: #1C2420; --muted: #5C6962; --line: #D6DDD8;
  --accent: #2F5D50; --accent-fg: #FFFFFF; --ochre: #A86512; --ochre-bg: #FBEFD9;
  --warn-bg: #FDECEA; --warn-fg: #8A2A1E;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Noto Sans", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #131815; --surface: #1C231F; --fg: #E6ECE8; --muted: #9AA8A0; --line: #2F3934;
    --accent: #6FB39D; --accent-fg: #0E1512; --ochre: #E2A54E; --ochre-bg: #3A2B14; --warn-bg: #3A1F1B; --warn-fg: #F2B4A9; color-scheme: dark; }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 15px; line-height: 1.55; }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 20px; padding-block: 28px 48px; display: grid; gap: 20px; }
.head-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
header h1 { font-family: var(--display); font-size: clamp(26px, 4vw, 36px); line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
header p { margin: 6px 0 0; color: var(--muted); max-width: 62ch; }
.who { display: flex; gap: 12px; align-items: center; font-size: 13.5px; flex-wrap: wrap; }
.who a { color: var(--accent); }
button.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }
.bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.field { display: grid; gap: 4px; min-width: 0; }
.field label, .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
select, input[type=text], input[type=email], input[type=password] { font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--fg); min-width: 170px; }
.swap { font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--fg); cursor: pointer; }
.swap:hover { border-color: var(--accent); }
.notice { background: var(--warn-bg); color: var(--warn-fg); border-radius: 8px; padding: 10px 14px; font-size: 13.5px; }
[hidden] { display: none !important; }
.panes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .panes { grid-template-columns: 1fr; } }
.pane { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; display: grid; grid-template-rows: auto 1fr auto; min-width: 0; }
.pane-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px 0; flex-wrap: wrap; }
.pane-head .lang { font-family: var(--display); font-size: 17px; font-weight: 600; }
textarea { font: inherit; font-size: 16px; line-height: 1.6; border: 0; resize: vertical; min-height: 260px; padding: 12px 14px; background: transparent; color: var(--fg); width: 100%; }
textarea:focus { outline: none; }
.pane:focus-within { border-color: var(--accent); }
.out { padding: 12px 14px; min-height: 260px; font-size: 16px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.out.placeholder { color: var(--muted); font-style: italic; }
mark, .out mark { background: var(--ochre-bg); color: var(--ochre); font-weight: 600; border-radius: 3px; padding: 0 2px; }
.out.nomarks mark { display: none; }
.pane-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px 12px; border-top: 1px solid var(--line); }
.keys { display: flex; flex-wrap: wrap; gap: 4px; }
.keys button { font-family: var(--body); font-size: 15px; min-width: 32px; height: 30px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; cursor: pointer; }
.keys button:hover { border-color: var(--accent); }
.small { font-size: 12.5px; color: var(--muted); }
.check { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.spacer { flex: 1; }
.btn { font: inherit; font-weight: 600; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-fg); cursor: pointer; }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.danger { border-color: var(--warn-fg); color: var(--warn-fg); background: transparent; }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.file { font-size: 13px; color: var(--accent); cursor: pointer; border: 1px dashed var(--line); border-radius: 6px; padding: 5px 10px; position: relative; }
.file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.thumbs { font-size: 12.5px; color: var(--muted); }
.notes { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; display: grid; gap: 8px; }
.notes-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.notes h2 { font-family: var(--display); font-size: 17px; margin: 0; }
.notes .body { white-space: pre-wrap; font-size: 14px; }
.conf { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--ochre-bg); color: var(--ochre); }
.status { font-size: 13px; color: var(--muted); }
footer { font-size: 12.5px; color: var(--muted); max-width: 75ch; }
.modal { position: fixed; inset: 0; background: rgba(10, 20, 15, 0.55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 10; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; width: 100%; max-width: 380px; display: grid; gap: 12px; }
.card h2 { font-family: var(--display); margin: 0; }
.card label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.card input { min-width: 0; width: 100%; }
.err { color: var(--warn-fg); font-size: 13.5px; min-height: 1em; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.table-wrap { overflow-x: auto; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
