
:root {
  color-scheme: light;
  --grad: linear-gradient(135deg, #667eea, #764ba2);
  --accent: #4c5acf; --accent-strong: #3b46a8; --on-accent: #fff; --soft: #e9ecfc; --soft-2: #f5f6fd; --soft-hover: #dce1fa;
  --text: #2d3748; --muted: #5f6b7e; --line: #e2e8f0; --bg: #f4f5fa; --card: #fff;
  --ok: #467236; --ok-soft: #e6efe0; --ok-hover: #d6e6cc; --ok-line: #cfe0c5;
  --warn: #8a6516; --warn-soft: #f4ecd8; --warn-line: #e9dbb5;
  --bad: #9b3160; --bad-soft: #f5e1ea; --bad-hover: #efcfdd; --bad-line: #ebc7d7;
  --info-line: #d5dbf7; --input-bg: #fff; --input-line: #cfd6e2; --row-hover: #fafbff; --off-bg: #edf0f4;
  --dashed: #b8c0ce; --link-dot: #9aa3b5; --meter-warn: #c99a2e; --focus: rgba(76,90,207,.35);
  --radius: .75rem; --shadow: 0 1px 2px rgba(45,55,72,.04), 0 4px 14px rgba(76,90,207,.08);
  --shadow-lg: 0 10px 15px -3px rgba(16,24,40,.12), 0 4px 6px -4px rgba(16,24,40,.1);
  --font: "Segoe UI", "Selawik", Arial, sans-serif; --mono: ui-monospace, Menlo, Consolas, monospace;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --grad: linear-gradient(135deg, #5468d4, #66408f);
  --accent: #9ba7ff; --accent-strong: #c0c7ff; --on-accent: #141733; --soft: #262b48; --soft-2: #1e2233; --soft-hover: #313760;
  --text: #e3e6ef; --muted: #9aa2b6; --line: #2e3346; --bg: #13151d; --card: #1b1e2a;
  --ok: #93c282; --ok-soft: #1e2b1c; --ok-hover: #283a25; --ok-line: #34502d;
  --warn: #d9b464; --warn-soft: #302817; --warn-line: #574622;
  --bad: #e68db2; --bad-soft: #3a1d2a; --bad-hover: #4a2537; --bad-line: #5e2f45;
  --info-line: #3a4275; --input-bg: #161925; --input-line: #3a4056; --row-hover: #20243a; --off-bg: #262a36;
  --dashed: #4b5168; --link-dot: #6b7390; --meter-warn: #c99a2e; --focus: rgba(155,167,255,.45);
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 6px 18px rgba(0,0,0,.35);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.5), 0 4px 6px -4px rgba(0,0,0,.5);
}
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) {
  color-scheme: dark;
  --grad: linear-gradient(135deg, #5468d4, #66408f);
  --accent: #9ba7ff; --accent-strong: #c0c7ff; --on-accent: #141733; --soft: #262b48; --soft-2: #1e2233; --soft-hover: #313760;
  --text: #e3e6ef; --muted: #9aa2b6; --line: #2e3346; --bg: #13151d; --card: #1b1e2a;
  --ok: #93c282; --ok-soft: #1e2b1c; --ok-hover: #283a25; --ok-line: #34502d;
  --warn: #d9b464; --warn-soft: #302817; --warn-line: #574622;
  --bad: #e68db2; --bad-soft: #3a1d2a; --bad-hover: #4a2537; --bad-line: #5e2f45;
  --info-line: #3a4275; --input-bg: #161925; --input-line: #3a4056; --row-hover: #20243a; --off-bg: #262a36;
  --dashed: #4b5168; --link-dot: #6b7390; --meter-warn: #c99a2e; --focus: rgba(155,167,255,.45);
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 6px 18px rgba(0,0,0,.35);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.5), 0 4px 6px -4px rgba(0,0,0,.5);
} }

/* theme switch (header): three icon buttons, the active one filled */
.theme { display: inline-flex; gap: 2px; padding: 2px; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); margin: 0; }
.theme button { display: inline-grid; place-items: center; width: 28px; height: 26px; border: 0; border-radius: 999px; background: transparent; color: rgba(255,255,255,.85); cursor: pointer; padding: 0; }
.theme button:hover { color: #fff; background: rgba(255,255,255,.16); }
.theme button[aria-pressed="true"] { background: rgba(255,255,255,.92); color: #4c5acf; }
.theme svg { width: 15px; height: 15px; }
.login-theme { display: flex; justify-content: center; margin-top: 1rem; }
.login-theme .theme { background: var(--soft); border-color: var(--line); }
.login-theme .theme button { color: var(--muted); }
.login-theme .theme button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
* { box-sizing: border-box; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html { font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }
h1 { font-size: 1.55rem; line-height: 1.2; margin: 0 0 .25rem; font-weight: 700; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; color: var(--accent); font-weight: 700; }
p { margin: .25rem 0 .75rem; }
code, .code { font-family: var(--mono); font-size: .86em; background: var(--soft); color: var(--accent-strong); padding: .05em .35em; border-radius: .3rem; }

/* header */
.top { background: var(--grad); color: #fff; }
.top-inner { max-width: 1200px; margin: 0 auto; padding: .9rem 1.25rem; display: flex; align-items: center; gap: 1rem; }
.lockup { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; }
.lockup:hover { color: #fff; }
.lockup .mark { height: 30px; width: auto; }
.lockup .wordmark { height: 11px; width: auto; }
.lockup .product { border-left: 1px solid rgba(255,255,255,.45); padding-left: .7rem; margin-left: .2rem; font-size: .92rem; letter-spacing: .02em; opacity: .95; white-space: nowrap; }
.who { margin-left: auto; display: flex; align-items: center; gap: .6rem; font-size: .9rem; }
.who form { margin: 0; }
.who .btn { background: rgba(255,255,255,.18); color: #fff; border-color: rgba(255,255,255,.35); }
.who .btn:hover { background: rgba(255,255,255,.3); }
.nav { background: rgba(255,255,255,.12); }
.nav ul { max-width: 1200px; margin: 0 auto; padding: 0 1rem; list-style: none; display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; }
.nav li { flex: none; }
.nav a { display: block; padding: .55rem .85rem; color: rgba(255,255,255,.88); text-decoration: none; font-size: .93rem; border-radius: .6rem .6rem 0 0; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.12); }
.nav a[aria-current="page"] { background: var(--bg); color: var(--accent); font-weight: 600; }

main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1.5rem; margin-bottom: 1.25rem; }
.lead { color: var(--muted); margin: 0; max-width: 60rem; }
footer { color: var(--muted); font-size: .8rem; text-align: center; padding: 1rem; }

/* cards, notices */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; margin-bottom: 1.25rem; }
.card.flush { padding: 0; overflow: hidden; }
.card > :last-child { margin-bottom: 0; }
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.notice { border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: 1.25rem; border: 1px solid transparent; }
.notice.info { background: var(--soft); color: var(--accent-strong); border-color: var(--info-line); }
.notice.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.notice.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.notice.bad { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.notice strong { font-weight: 700; }
.banner { width: 100%; max-width: 1200px; margin: 1rem auto 0; padding: 0 1.25rem; }
.banner .notice { margin: 0; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty .big { font-size: 1.05rem; color: var(--text); font-weight: 600; margin-bottom: .35rem; }
.hint { color: var(--muted); font-size: .88rem; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; font: inherit; font-size: .9rem; font-weight: 600; line-height: 1.2;
  padding: .5rem 1.05rem; border-radius: 999px; border: 1px solid transparent; background: var(--soft); color: var(--accent); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--soft-hover); color: var(--accent-strong); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-strong); color: var(--on-accent); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.ghost:hover { background: var(--soft-2); }
.btn.ok { background: var(--ok-soft); color: var(--ok); }
.btn.ok:hover { background: var(--ok-hover); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.danger:hover { background: var(--bad-hover); }
.btn.small { padding: .3rem .75rem; font-size: .82rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.actions form { margin: 0; }

/* forms */
form.stack { display: grid; gap: .9rem; }
.field { display: grid; gap: .3rem; }
.field > span, .label { font-weight: 600; font-size: .9rem; }
.field small { color: var(--muted); font-size: .82rem; }
.field.error input, .field.error select, .field.error textarea { border-color: var(--bad); }
.field .err { color: var(--bad); font-size: .85rem; }
.row { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
input[type="text"], input[type="password"], input[type="search"], input:not([type]), select, textarea {
  font: inherit; color: var(--text); background: var(--input-bg); border: 1px solid var(--input-line); border-radius: .6rem; padding: .5rem .7rem; width: 100%; }
textarea { min-height: 6rem; resize: vertical; line-height: 1.45; }
textarea.code-input { font-family: var(--mono); font-size: .88rem; min-height: 9rem; }
input[readonly] { background: var(--soft-2); color: var(--muted); }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .9rem; }
.check input { width: 1.05rem; height: 1.05rem; accent-color: var(--accent); }
.toolbar { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: flex-end; }
.toolbar .field { min-width: 12rem; flex: 1 1 14rem; }
.toolbar .field.narrow { flex: 0 1 12rem; min-width: 9rem; }
.toolbar .field.lang { flex: 1 1 18rem; min-width: 15rem; }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: var(--soft-2); padding: .65rem .9rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--row-hover); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.nowrap { white-space: nowrap; }
tfoot td { font-weight: 700; background: var(--soft-2); border-top: 1px solid var(--line); }
tr.muted td { color: var(--muted); }
.disabled-row td { opacity: .6; }

@media (max-width: 760px) {
  html { font-size: 15.5px; }
  .top-inner { padding: .75rem 1rem; flex-wrap: wrap; }
  .lockup .product { display: none; }
  .nav ul { flex-wrap: wrap; overflow: visible; padding: .35rem .75rem .5rem; gap: .3rem; }
  .nav a { padding: .4rem .7rem; border-radius: 999px; font-size: .88rem; }
  .toolbar .field.lang { min-width: 0; }
  main { padding: 1rem .85rem 2.5rem; }
  .card { padding: 1rem; }
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { border-bottom: 1px solid var(--line); padding: .5rem 0; }
  table.stack td { border: 0; padding: .3rem 1rem; }
  table.stack td[data-label]::before { content: attr(data-label); display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
  table.stack td.num { text-align: left; }
  table.stack tfoot, table.stack tfoot tr { display: block; width: 100%; }
}

/* badges */
.badge { display: inline-block; padding: .12rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.badge.on { background: var(--ok-soft); color: var(--ok); }
.badge.off { background: var(--off-bg); color: var(--muted); }

/* stats, meter */
.stats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 1.25rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: .9rem 1rem; }
.stat .v { font-size: 1.45rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .k { color: var(--muted); font-size: .82rem; }
.bar { height: .7rem; border-radius: 999px; background: var(--soft); overflow: hidden; margin: .6rem 0 .3rem; }
.bar > span { display: block; height: 100%; background: var(--grad); border-radius: 999px; }
.bar.warn > span { background: var(--meter-warn); }
.bar.bad > span { background: var(--bad); }

/* text table (Übersetzungen): 36px rows, 12px text, sticky header and ID + original columns, one-line cells */
main.wide { max-width: none; }
.muted { color: var(--muted); }
.code-tag { font-family: var(--mono); font-size: .78em; color: var(--muted); font-weight: 500; }
.count { margin: 0 0 .5rem; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .75rem; }
.tsearch { display: flex; flex-wrap: wrap; gap: .5rem; flex: 1 1 24rem; margin: 0; min-width: 0; }
.tbar input[type="search"], .tbar select { padding: .4rem .65rem; font-size: .9rem; border-radius: .55rem; }
.tsearch input[type="search"] { flex: 1 1 16rem; width: auto; min-width: 0; }
.tsearch select { flex: 0 1 17rem; width: auto; min-width: 0; }
.menu { position: relative; }
.menu[hidden] { display: none; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after { content: ""; width: .4rem; height: .4rem; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-2px); margin-left: .15rem; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; display: grid; gap: 2px; min-width: 15rem; max-height: 60vh; overflow: auto;
  padding: .4rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); }
.menu-pop .check { padding: .3rem .5rem; border-radius: .45rem; font-weight: 500; font-size: .85rem; cursor: pointer; }
.menu-pop .check:hover { background: var(--row-hover); }
.card-lang { display: none; align-items: center; gap: .4rem; font-size: .85rem; color: var(--muted); }
.card-lang select { width: auto; }
.tframe { border: 1px solid var(--line); border-radius: 12px; overflow: auto; background: var(--card); max-height: calc(100vh - 14rem); min-height: 10rem; }
table.texts { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; line-height: 1.3; }
table.texts th, table.texts td { height: 36px; padding: 0 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle;
  border-bottom: 1px solid var(--line); width: 260px; min-width: 260px; max-width: 260px; }
table.texts tbody tr:last-child td { border-bottom: 0; }
table.texts thead th { position: sticky; top: 0; z-index: 2; background: var(--soft-2); color: var(--muted); font-size: 12px; font-weight: 500;
  text-transform: none; letter-spacing: 0; text-align: left; }
table.texts .c-id { position: sticky; left: 0; z-index: 1; background: var(--card); width: 92px; min-width: 92px; max-width: 92px; font-variant-numeric: tabular-nums; }
table.texts .c-orig { position: sticky; left: 92px; z-index: 1; background: var(--card); width: 340px; min-width: 340px; max-width: 340px; border-right: 1px solid var(--line); }
table.texts .c-page { width: 190px; min-width: 190px; max-width: 190px; color: var(--muted); }
table.texts thead .c-id, table.texts thead .c-orig { z-index: 3; background: var(--soft-2); }
table.texts .c-id a { color: inherit; text-decoration: none; font-weight: 600; }
table.texts.all .c-id { width: 150px; min-width: 150px; max-width: 150px; }
table.texts.all .c-orig { left: 150px; }
table.texts .id-page { color: var(--muted); font-size: 11px; }
.id-help { cursor: help; border-radius: .3rem; }
.id-help:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.help-dot { display: inline-grid; place-items: center; width: 14px; height: 14px; margin-left: 2px; border-radius: 999px; border: 1px solid currentColor; font-size: 9px; font-weight: 700; line-height: 1; }
@media (min-width: 768px) { table.texts .hid { display: none; } }
table.texts .more { color: var(--muted); font-size: 11px; margin-left: 2px; }
table.texts td.missing { color: var(--muted); }
table.texts .tx.off { opacity: .55; }
table.texts tbody tr { cursor: pointer; }
table.texts tbody tr:hover td { background: var(--row-hover); }
table.texts tbody tr.sel td { background: var(--soft); }
table.texts tbody tr:focus { outline: none; }
table.texts tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
table.texts tbody tr:focus-visible td { box-shadow: inset 0 2px 0 var(--accent), inset 0 -2px 0 var(--accent); }
table.texts tbody tr:focus-visible td:first-child { box-shadow: inset 2px 2px 0 var(--accent), inset 0 -2px 0 var(--accent); }
table.texts tbody tr:focus-visible td:last-child { box-shadow: inset -2px 2px 0 var(--accent), inset 0 -2px 0 var(--accent); }
table.texts tr[hidden] { display: none; }
.no-hits { color: var(--muted); text-align: center; padding: 2rem 1rem; }
.no-hits[hidden] { display: none; }
@media (max-width: 767.98px) {
  .tframe { max-height: none; overflow: visible; border: 0; border-radius: 0; background: transparent; }
  table.texts, table.texts tbody { display: block; width: 100%; min-width: 0; }
  table.texts thead { display: none; }
  table.texts tbody tr { display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
  table.texts tbody tr:hover td, table.texts tbody tr.sel td { background: transparent; }
  table.texts tbody tr:hover { background: var(--row-hover); }
  table.texts tbody tr.sel { background: var(--soft); }
  table.texts tbody tr:focus-visible td { box-shadow: none; }
  table.texts td, table.texts .c-id, table.texts .c-orig, table.texts .c-page { display: block; position: static; height: auto; padding: 0; border: 0; width: auto; min-width: 0; max-width: none; background: transparent; font-size: 13px; }
  table.texts .c-id { grid-column: 1; }
  table.texts .c-page { grid-column: 2; text-align: right; }
  table.texts .c-orig, table.texts td.tx { grid-column: 1 / -1; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  table.texts .c-orig { font-weight: 600; }
  .card-lang:not([hidden]) { display: flex; }
}

/* drawer: modal panel from the right, 760px, full screen on phones */
.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer[hidden] { display: none; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.4); opacity: 0; transition: opacity .2s ease; }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: 760px; max-width: 100vw; overflow-y: auto; overscroll-behavior: contain; outline: none;
  background: var(--card); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 0 24px;
  transform: translateX(100%); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.drawer.open .drawer-backdrop { opacity: 1; }
.drawer.open .drawer-panel { transform: none; }
/* the close button floats over the sticky top bar of the text (.dw-top), which keeps room for it on the right */
.drawer-close-wrap { position: sticky; top: 0; height: 0; display: flex; justify-content: flex-end; z-index: 6; }
.drawer-close { display: grid; place-items: center; width: 32px; height: 32px; margin: 8px -12px 0 0; padding: 0; border-radius: 999px; border: 1px solid var(--line); cursor: pointer;
  color: var(--text); background: var(--card); }
.drawer-close:hover { background: var(--soft); }
.drawer-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.drawer-loading { color: var(--muted); padding: 4rem 0 3rem; text-align: center; }
body.drawer-lock { overflow: hidden; }
@media (max-width: 767.98px) { .drawer-panel { width: 100vw; border-left: 0; padding: 0 14px; } .drawer-close { margin-right: 0; } }
@media (prefers-reduced-motion: reduce) { .drawer-backdrop, .drawer-panel { transition: none; } }

/* a text: one form; sticky top bar (ID, places, toolbar), notes, original, a compact row per language, sticky save bar */
.i { flex: none; vertical-align: -.15em; }
.dw { margin: 0; }
.drawer .dw { display: flex; flex-direction: column; min-height: 100dvh; }
.dw-top { position: sticky; top: 0; z-index: 4; margin: 0 -24px; padding: 8px 60px 0 24px; background: var(--card); border-bottom: 1px solid var(--line); }
.dw-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-height: 32px; }
.dw-id { font-size: 1.15rem; margin: 0; color: var(--text); font-variant-numeric: tabular-nums; }
.dw-id:focus { outline: none; }
.dw-help { display: inline-grid; place-items: center; color: var(--muted); cursor: help; border-radius: 999px; margin-left: -4px; }
.dw-help:hover { color: var(--accent); }
.dw-help:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.dw-where { margin: 0; font-size: .82rem; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.dw-where .ids { font-variant-numeric: tabular-nums; }
.dw-where .ext { display: inline-grid; place-items: center; padding: 0 3px; color: var(--muted); vertical-align: -1px; }
.dw-where .ext:hover { color: var(--accent); }
details.dw-where > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 2px; border-radius: .3rem; }
details.dw-where > summary::-webkit-details-marker { display: none; }
details.dw-where > summary:hover { color: var(--accent); }
details.dw-where > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
details.dw-where[open] > summary .i { transform: rotate(180deg); }
details.dw-where[open] { flex-basis: 100%; }
.dw-occ { list-style: none; margin: 2px 0 6px; padding: 0; max-height: 9.5rem; overflow-y: auto; }
.dw-occ li { margin: 1px 0; }
.ed-bar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 4px 0 6px; }
.ed-bar[hidden], .ed-hint[hidden], .ed-wrap[hidden], .ed-fallback[hidden], .chip-edit[hidden] { display: none; }
.ed-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; font: inherit; font-size: .78rem; min-width: 28px; height: 28px; padding: 0 6px;
  border: 1px solid transparent; border-radius: .4rem; background: transparent; color: var(--text); cursor: pointer; max-width: 14rem; white-space: nowrap; }
.ed-btn span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ed-btn.ed-link { color: var(--accent-strong); border-color: var(--line); }
.ed-btn:hover:not(:disabled) { background: var(--soft-2); border-color: var(--line); }
.ed-btn:disabled { opacity: .4; cursor: default; }
.ed-btn[aria-pressed="true"] { background: var(--soft); color: var(--accent-strong); border-color: var(--info-line); }
.ed-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ed-hint { font-size: .76rem; color: var(--muted); margin-left: 4px; }
.dw-note { display: flex; gap: 6px; align-items: baseline; margin: 6px 0 0; font-size: .8rem; color: var(--muted); }
.dw-note .i { align-self: center; }
.dw-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; align-items: start; padding: 4px 0; }
.dw-row.dw-orig { padding: 10px 0 6px; }
.dw-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; padding-top: 7px; font-size: .78rem; line-height: 1.3; color: var(--muted); min-width: 0; }
.dw-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.dw-row.active .dw-name { color: var(--accent-strong); font-weight: 600; }
.dw-row.off .dw-name, .dw-row.off .ed { opacity: .6; }
.dw-off { font-size: .68rem; padding: 0 5px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn-line); cursor: help; line-height: 1.35; white-space: nowrap; }
.dw-off:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.dw-row.off .ed:focus { opacity: 1; }
.dw-edited { font-size: .68rem; padding: 0 5px; border-radius: 999px; background: var(--soft); color: var(--accent-strong); cursor: help; line-height: 1.45; }
.dw-edited:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.dw-restore { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.dw-restore:hover { color: var(--accent-strong); background: var(--soft); }
.dw-restore:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.dw-field { display: grid; gap: 4px; min-width: 0; }
.preview { background: var(--soft-2); border: 1px solid var(--line); border-radius: .5rem; padding: .35rem .6rem; font-size: .92rem; line-height: 1.45; overflow-wrap: anywhere; }
.preview a { color: inherit; text-decoration: underline dotted; text-decoration-color: var(--link-dot); text-underline-offset: 3px; cursor: text; pointer-events: none; }
.ed-wrap { display: grid; gap: 4px; }
.ed { min-height: 2.25rem; padding: .35rem .6rem; border: 1px solid var(--input-line); border-radius: .5rem; background: var(--input-bg); color: var(--text); font-size: .92rem; line-height: 1.45; overflow-wrap: anywhere; }
.ed.template { color: var(--muted); }
.ed:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--accent); color: var(--text); }
.dw-row.dirty .ed { box-shadow: inset 3px 0 0 var(--accent); }
.dw-row.bad .ed, .dw-row.bad textarea { border-color: var(--bad); box-shadow: inset 3px 0 0 var(--bad); }
.dw-field textarea.code-input { min-height: 4.5rem; font-size: .84rem; }
.chip { padding: .05em .3em; border-radius: .35rem; background: var(--soft); color: var(--accent-strong); border: 1px solid var(--info-line); cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--link-dot); text-underline-offset: 3px; -webkit-user-modify: read-only; }
.chip:hover, .chip.editing { background: var(--soft-hover); }
.chip-edit { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip-edit input { flex: 1 1 12rem; width: auto; padding: .3rem .55rem; font-size: .88rem; }
.ed-note { margin: 0; font-size: .78rem; color: var(--warn); }
.ed-note:empty { display: none; }
.dw-field .err { margin: 0; font-size: .8rem; color: var(--bad); }
.dw-syntax { margin: 8px 0 0; font-size: .78rem; color: var(--muted); }
.dw-foot { position: sticky; bottom: 0; z-index: 4; display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin: auto -24px 0; padding: 10px 24px;
  background: var(--card); border-top: 1px solid var(--line); }
.dw-status { margin: 0 auto 0 0; font-size: .82rem; color: var(--muted); }
.dw-status.bad { color: var(--bad); }
.dw-foot .btn { padding: .4rem 1.1rem; }
.text-page .dw-top { position: static; margin: 0; padding: 0; border: 0; }
.text-page .dw-foot { margin: 10px -1.25rem -1.25rem; padding: 10px 1.25rem; border-radius: 0 0 var(--radius) var(--radius); }
@media (max-width: 767.98px) {
  .dw-top { margin: 0 -14px; padding: 6px 52px 0 14px; }
  .dw-foot { margin: auto -14px 0; padding: 8px 14px calc(8px + env(safe-area-inset-bottom)); }
  .dw-row { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 5px 0; }
  .dw-label { padding-top: 0; }
  .ed-hint { display: none; }
  /* one row: link buttons cut off harder, the bar scrolls sideways when they still do not fit */
  .ed-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -38px; padding-right: 38px; }
  .ed-bar::-webkit-scrollbar { display: none; }
  .ed-btn { flex: none; min-width: 34px; height: 34px; }
  .ed-btn.ed-link { max-width: 7.5rem; }
  /* link text editor: the field over the full width, both buttons side by side below */
  .chip-edit input { flex: 1 1 100%; }
  .chip-edit .btn { flex: 1 1 0; height: 34px; }
  .dw-restore { width: 28px; height: 28px; }
}

/* AI notice: the pinned first row of the text table and its drawer */
.pin-tag { display: inline-block; max-width: 100%; padding: 1px 6px; border-radius: 6px; background: var(--soft); color: var(--accent-strong); border: 1px solid var(--info-line);
  font-size: 10.5px; font-weight: 600; line-height: 1.15; white-space: normal; vertical-align: middle; }
table.texts tbody tr.pinned td, table.texts tbody tr.pinned .c-id, table.texts tbody tr.pinned .c-orig { background: var(--soft-2); border-bottom: 2px solid var(--info-line); }
table.texts tbody tr.pinned:hover td { background: var(--soft); }
table.texts tbody tr.pinned.sel td { background: var(--soft); }
.dw-bar .pin-tag { font-size: .72rem; }
textarea.plain-input { field-sizing: content; min-height: 2.6rem; padding: .35rem .6rem; font-size: .92rem; line-height: 1.45; border-radius: .5rem; resize: vertical; }
.dw-row.plain.dirty textarea { box-shadow: inset 3px 0 0 var(--accent); }
.dw-row.off textarea.plain-input:not(:focus) { opacity: .6; }
@media (max-width: 767.98px) { table.texts tbody tr.pinned { background: var(--soft-2); border-color: var(--info-line); } table.texts tbody tr.pinned td { border-bottom: 0; } }

/* Sprachen: compact rows, a grip to drag, a switch per language, Vorab übersetzen with its progress */
.lang-card { padding-bottom: .25rem; }
.lang-h { margin: 0; padding: .9rem 1.1rem .35rem; }
.lang-hint { margin: 0 1.1rem .5rem; font-size: .82rem; }
.lang-hint .i { vertical-align: -.2em; }
.lang-empty { border-top: 1px solid var(--line); }
.langs { list-style: none; margin: 0; padding: 0; }
.lang-row { display: flex; align-items: center; gap: .5rem .75rem; min-height: 44px; padding: .35rem 1.1rem; border-top: 1px solid var(--line); background: var(--card); }
.lang-row.off .lang-name strong { color: var(--muted); }
.lang-name { flex: 1 1 10rem; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .4rem; }
.lang-name strong { font-weight: 600; }
.dw-off[hidden] { display: none; }
.grip { flex: none; display: inline-grid; place-items: center; width: 28px; height: 32px; margin-left: -.45rem; padding: 0; border: 1px solid transparent; border-radius: .45rem;
  background: transparent; color: var(--muted); cursor: grab; touch-action: none; }
.grip[hidden] { display: none; }
.grip:hover { color: var(--accent); background: var(--soft-2); }
.grip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.sorting, .sorting * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.lang-row.dragging { position: relative; z-index: 2; background: var(--soft); box-shadow: var(--shadow-lg); border-radius: .5rem; }
.lang-row.grabbed { background: var(--soft); box-shadow: inset 3px 0 0 var(--accent); }
.lang-row.grabbed .grip { color: var(--accent-strong); background: var(--soft-hover); }
.lang-row.saved { transition: background .6s ease; background: var(--ok-soft); }
.lang-pw { flex: 0 1 17rem; min-width: 0; display: grid; gap: 3px; font-size: .78rem; color: var(--muted); text-align: right; }
.lang-pw .pw-line { overflow-wrap: anywhere; }
.pw-bar { display: block; height: 4px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.pw-bar[hidden] { display: none; }
.pw-bar > span { display: block; height: 100%; background: var(--grad); transition: width .4s ease; }
.lang-prewarm { margin: 0; flex: none; }
.pw-busy { display: block; font-size: .78rem; color: var(--muted); }
.pw-busy[hidden] { display: none; }
.combo-list li.combo-have { color: var(--muted); cursor: default; }
.combo-list li.combo-have:hover { background: transparent; }
.dw-retr { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; margin: -.15rem 0 .6rem; }
.dw-retr .de-hint { flex-basis: 100%; margin: 0; }
.dw-retr .de-hint[hidden] { display: none; }
.dw-retr .btn { gap: .3rem; }
.dw-retr-status { margin: 0; font-size: .85rem; color: var(--muted); }
.dw-retr-status.bad { color: var(--bad); }
.lang-prewarm .btn { gap: .3rem; }
.lang-toggle { margin: 0; flex: none; }
.lang-remove { margin: 0 -.45rem 0 0; flex: none; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid transparent; border-radius: .45rem; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.icon-btn.danger:hover, .icon-btn.danger:focus-visible { color: var(--bad); background: var(--bad-soft); }
.switch { position: relative; display: inline-block; width: 40px; height: 24px; padding: 0; border: 1px solid var(--input-line); border-radius: 999px; background: var(--off-bg); cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.switch .knob { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 999px; background: var(--card); box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s ease; }
.switch[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
.switch[aria-checked="true"] .knob { transform: translateX(16px); background: var(--on-accent); }
.switch:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.switch:disabled { opacity: .6; cursor: progress; }
.add-lang { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.add-lang .field { flex: 1 1 20rem; }
.combo { position: relative; }
.combo-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; list-style: none; margin: 0; padding: .3rem; max-height: 18rem; overflow-y: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: .6rem; box-shadow: var(--shadow-lg); }
.combo-list[hidden] { display: none; }
.combo-list li { display: flex; justify-content: space-between; gap: .75rem; padding: .35rem .55rem; border-radius: .4rem; cursor: pointer; font-size: .9rem; }
.combo-list li .muted { font-size: .8rem; }
.combo-list li:hover { background: var(--row-hover); }
.combo-list li[aria-selected="true"] { background: var(--soft); color: var(--accent-strong); }
.combo-list .combo-none { color: var(--muted); cursor: default; }
@media (max-width: 760px) {
  .lang-row { flex-wrap: wrap; padding: .5rem .85rem; }
  .lang-h { padding: .8rem .85rem .3rem; }
  .lang-hint { margin: 0 .85rem .5rem; }
  /* line 1: grip, name, switch; line 2: Vorab übersetzen and its status */
  .lang-name { flex: 1 1 calc(100% - 36px - 40px - 1.5rem); }
  .lang-name { flex-basis: calc(100% - 36px - 40px - 40px - 2.25rem); }
  .lang-toggle { order: 3; }
  .lang-remove { order: 3; }
  .icon-btn { width: 40px; height: 40px; }
  .lang-prewarm { order: 4; margin-left: calc(36px + .3rem); }
  .lang-pw { order: 5; flex: 1 1 8rem; text-align: left; }
  .grip { width: 36px; height: 40px; }
}

/* login */
.login { flex: 1; display: grid; place-items: center; padding: 2rem 1rem; }
.login .card { width: min(400px, 100%); }
.login .top-card { background: var(--grad); color: #fff; margin: -1.25rem -1.25rem 1.25rem; padding: 1.25rem; border-radius: var(--radius) var(--radius) 0 0; }
.login .top-card .product { display: block; margin-top: .5rem; font-size: .9rem; opacity: .92; }
