/* m3llo translate: shared styles.
   Tokens and shapes follow the graphite design system of the site.
   Fonts: the site's own Oxanium and Barlow files, copied into ./fonts. */

@font-face { font-family: 'Oxanium'; src: url('fonts/oxanium-var.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('fonts/barlow-300.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('fonts/barlow-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('fonts/barlow-600.woff2') format('woff2'); font-weight: 500 700; font-display: swap; }

:root {
  color-scheme: dark;
  --bg-app: #121214;
  --bg-panel: #17171A;
  --bg-card: #1C1C20;
  --bg-card-hover: #212127;
  --bg-raised: #26262B;
  --bg-raised-hover: #2E2E34;
  --bg-inset: #0F0F11;
  --line: #2F2F35;
  --line-hi: #42424A;
  --text-hi: #F3F3F4;
  --text: #A2A2A8;
  --text-dim: #6F6F76;
  --text-faint: #4B4B52;
  --accent: #FFFFFF;
  --accent-dim: rgba(255, 255, 255, .10);
  --accent-line: rgba(255, 255, 255, .34);
  --on-accent: #121214;
  --live: #FF453A;
  --live-dim: rgba(255, 69, 58, .14);
  --live-line: rgba(255, 69, 58, .45);
  --confirm: #FF453A;
  --on-confirm: #FFFFFF;
  --speaking: #3FD07A;
  --speaking-dim: rgba(63, 208, 122, .13);
  --amber: #E3A33B;
  --id-blue: #6E8FB8;
  --id-purple: #8E7FB0;
  --id-teal: #5FA396;
  --id-amber: #B39158;
  --id-pink: #B07793;
  --on-id: #0E0E10;
  --selection: rgba(255, 255, 255, .24);

  --display: 'Oxanium', sans-serif;
  --text-face: 'Barlow', 'Segoe UI', system-ui, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', 'SF Mono', Consolas, monospace;
  --cjk: "PingFang SC", "Microsoft YaHei", "Hiragino Sans", "Yu Gothic UI", "Noto Sans CJK SC", sans-serif;

  --cut: 8px;
  --notch: 14px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--bg-app); }
body {
  background: var(--bg-app);
  color: var(--text);
  font-family: var(--text-face);
  font-weight: 300;
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-width: 1180px;
}
::selection { background: var(--selection); color: var(--text-hi); }
a { color: inherit; text-decoration: none; }
b, strong { font-weight: 600; color: var(--text-hi); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3 { font-family: var(--display); font-weight: 300; letter-spacing: -.03em; color: var(--text-hi); line-height: 1.1; }
.cjk { font-family: 'Barlow', var(--cjk); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 11.5px; }

/* ── wordmark ───────────────────────────────────────────────── */
.mark { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; color: var(--text-hi); font-size: 19px; }
.mark b { color: var(--live); font-weight: 700; }
.mark-sub { font-family: var(--display); font-weight: 300; font-size: 19px; letter-spacing: -.02em; color: var(--text-dim); margin-left: 6px; }

/* ── labels ─────────────────────────────────────────────────── */
.label { font-weight: 600; font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-dim); }
.label.hi { color: var(--text-hi); }

/* ── header ─────────────────────────────────────────────────── */
.top {
  height: 56px; display: flex; align-items: center; gap: 28px;
  padding: 0 24px; border-bottom: 1px solid var(--line); background: var(--bg-panel);
}
.brand { display: flex; align-items: baseline; }
.nav { display: flex; gap: 2px; height: 100%; }
.nav a {
  display: flex; align-items: center; padding: 0 14px; height: 100%;
  font-weight: 600; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-dim);
  border-bottom: 1px solid transparent; margin-bottom: -1px;
}
.nav a:hover { color: var(--text-hi); }
.nav a.on { color: var(--text-hi); border-bottom-color: var(--accent); }
.nav a .count { margin-left: 7px; color: var(--live); font-variant-numeric: tabular-nums; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }

.lang-switch {
  display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 12px;
  border: 1px solid var(--line); background: var(--bg-app); color: var(--text-hi); font-weight: 400; font-size: 13px;
}
.lang-switch .tag { font-family: var(--mono); font-size: 11px; color: var(--text-dim); }
.chev { width: 10px; height: 10px; stroke: var(--text-dim); fill: none; stroke-width: 1.6; }

.role {
  display: flex; height: 26px; padding: 2px; background: var(--bg-inset); border: 1px solid var(--line);
}
.role span {
  display: flex; align-items: center; padding: 0 10px;
  font-weight: 600; font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-dim);
}
.role span.on { background: var(--bg-raised); color: var(--text-hi); }
.who { display: flex; align-items: center; gap: 8px; color: var(--text-hi); font-weight: 400; }
.who small { display: block; font-size: 10px; color: var(--text-dim); line-height: 1.1; }

/* ── people: octagon ────────────────────────────────────────── */
.av {
  --c: 6px; display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 24px; height: 24px; font-family: var(--display); font-size: 9px; font-weight: 700;
  color: var(--on-id); text-transform: uppercase; background: var(--id-blue);
  clip-path: polygon(var(--c) 0, calc(100% - var(--c)) 0, 100% var(--c), 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, var(--c) 100%, 0 calc(100% - var(--c)), 0 var(--c));
}
.av.xs { width: 18px; height: 18px; --c: 4.5px; font-size: 7px; }
.av.lg { width: 30px; height: 30px; --c: 7px; font-size: 10px; }
.id-blue { background: var(--id-blue); } .id-purple { background: var(--id-purple); }
.id-teal { background: var(--id-teal); } .id-amber { background: var(--id-amber); } .id-pink { background: var(--id-pink); }
.avs { display: inline-flex; } .avs .av + .av { margin-left: -5px; }

/* ── page ───────────────────────────────────────────────────── */
.page { max-width: 1320px; margin: 0 auto; padding: 44px 32px 88px; }
.page.narrow { max-width: 1120px; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); margin-bottom: 18px; }
.crumbs a:hover { color: var(--text-hi); }
.crumbs i { font-style: normal; color: var(--text-faint); }
.head-row { display: flex; align-items: baseline; gap: 20px; margin-bottom: 36px; }
.head-row h1 { font-size: 38px; white-space: nowrap; }
.head-row .sub { color: var(--text-dim); font-size: 15px; }

/* ── buttons: cut top-left and bottom-right ─────────────────── */
.btn {
  font-weight: 600; font-size: 9.5px; letter-spacing: .17em; text-transform: uppercase; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 14px; white-space: nowrap; background: var(--bg-raised); color: var(--text-hi);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.btn:hover { background: var(--bg-raised-hover); }
.btn.sm { padding: 7px 10px; font-size: 9px; --cut: 6px; }
.btn-confirm { background: var(--confirm); color: var(--on-confirm); }
.btn-confirm:hover { background: var(--confirm); }
.btn-outline { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4); }
.btn-outline:hover { background: var(--accent-dim); }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-hi); }
.btn-ghost:hover { color: var(--text-hi); background: var(--bg-raised); }
.btn[disabled], .btn.disabled { background: var(--bg-raised); color: var(--text-faint); box-shadow: none; cursor: not-allowed; }
.link { color: var(--text); border-bottom: 1px solid var(--line-hi); cursor: pointer; }
.link:hover { color: var(--text-hi); border-bottom-color: var(--text-hi); }

/* ── fields: a plain rectangle ──────────────────────────────── */
.field {
  font-family: var(--text-face); font-weight: 300; font-size: 13.5px; color: var(--text-hi);
  background: var(--bg-app); border: 1px solid var(--line); border-radius: 0; padding: 9px 12px; outline: 0; width: 100%;
}
.field::placeholder { color: var(--text-faint); }
.field:focus, .field.focus { border-color: var(--line-hi); box-shadow: 0 0 0 1px var(--line-hi); }
textarea.field { resize: vertical; min-height: 64px; line-height: 1.5; }
select.field { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%), linear-gradient(135deg, var(--text-dim) 50%, transparent 50%); background-position: calc(100% - 15px) 52%, calc(100% - 11px) 52%; background-size: 4px 4px; background-repeat: no-repeat; }
.search { position: relative; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 13px; height: 13px; stroke: var(--text-dim); fill: none; stroke-width: 1.6; }
.search .field { padding-left: 32px; }

/* ── state marks: one dot and one word ──────────────────────── */
.mk { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 12.5px; font-weight: 400; line-height: 1.2; color: var(--text-dim); }
.mk::before { content: ""; width: 7px; height: 7px; border-radius: 9px; background: currentColor; flex: none; }
.mk.reviewed { color: var(--speaking); }
.mk.approved { color: var(--text-hi); }
.mk.inpr { color: var(--text-hi); }
.mk.inpr::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.mk.stale, .mk.ctx { color: var(--amber); }
.mk.pref { color: var(--text-hi); }
.mk.pref::before { content: "\2605"; width: auto; height: auto; background: none; font-size: 12px; }
.mk.plain::before { display: none; }
.mk.plain { color: var(--text-dim); font-size: 11.5px; }

/* rejected glossary word inside a text */
.bad { text-decoration: underline wavy var(--live); text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* placeholder chip */
.ph {
  font-family: var(--mono); font-size: .86em; color: var(--text-hi); background: var(--bg-raised);
  box-shadow: inset 0 0 0 1px var(--line-hi); padding: 0 4px; margin: 0 1px; white-space: nowrap;
}

/* ── tables ─────────────────────────────────────────────────── */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-weight: 600; font-size: 9px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-dim); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--bg-card-hover); }
.tbl .r { text-align: right; }
.en { color: var(--text-hi); font-weight: 400; }
.tr { color: var(--text); }
.dim { color: var(--text-dim); }
.small { font-size: 11.5px; }

/* ── progress ───────────────────────────────────────────────── */
.bar { display: flex; height: 6px; background: var(--bg-inset); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; }
.bar .rv { background: var(--speaking); }

/* ── side filters ───────────────────────────────────────────── */
.side { display: flex; flex-direction: column; gap: 18px; }
.fgroup .label { display: block; margin-bottom: 7px; }
.fopt {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 5px 10px; margin: 0 -10px; color: var(--text); font-size: 13px; cursor: pointer;
}
.fopt:hover { background: var(--bg-card); color: var(--text-hi); }
.fopt.on { background: var(--bg-raised); color: var(--text-hi); box-shadow: inset 2px 0 0 var(--accent); }
.fopt .n { font-variant-numeric: tabular-nums; color: var(--text-dim); font-size: 11.5px; }
.seg { display: flex; border: 1px solid var(--line); background: var(--bg-inset); padding: 2px; }
.seg span { flex: 1; text-align: center; white-space: nowrap; padding: 6px 8px; font-size: 12px; color: var(--text-dim); cursor: pointer; }
.seg span.on { background: var(--bg-raised); color: var(--text-hi); }
.seg span small { color: var(--text-faint); margin-left: 4px; font-size: 10.5px; }

/* ── misc ───────────────────────────────────────────────────── */
.row { display: flex; align-items: center; gap: 10px; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.fold { display: flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: 12px; padding: 8px 0; }
.fold:hover { color: var(--text-hi); }
.fold svg { width: 10px; height: 10px; stroke: currentColor; fill: none; stroke-width: 1.6; transform: rotate(-90deg); transition: transform .12s; }
details[open] > summary .fold svg, details[open] > summary.fold svg { transform: none; }
