/* criba.cc (web version of the Job Applications App). On a computer the job
   list is a dense table that scrolls inside the window, like the local app;
   on a phone (<= 760px) each row becomes a compact card.

   Identity: the criba.cc brand kit (brand/criba-cc-brand-kit/BRAND_GUIDELINES.md):
   midnight indigo, warm off-white, teal/cyan as the main accent and coral as
   the "signal" colour, set in Inter. The "--blue*" tokens keep their old
   names but now hold the brand teal. On light backgrounds the teal is a
   shade darker than the kit's #00A8B5 so text in it stays readable.

   Colours are tokens. Light values below; dark values under html.dark (the
   class is set by the small script in index.html: "auto" follows the
   device's setting, or the user picks light / dark). */

/* Inter, served from this site (the security headers allow no font host). */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(assets/fonts/inter-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(assets/fonts/inter-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(assets/fonts/inter-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(assets/fonts/inter-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(assets/fonts/inter-latin-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(assets/fonts/inter-latin-ext-700-normal.woff2) format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --text: #0B0E23;
  --muted: #5B6478;
  --faint: #9AA3B5;
  --jid: #8A93A6;
  --cell2: #3E4659;
  --bg: #F8F7F4;
  --panel: #FFFFFF;
  --input: #FFFFFF;
  --soft: #F1F0EB;
  --soft2: #EAE9E3;
  --hover-btn: #DFDED7;
  --row-hover: #F3F2EE;
  --th-bg: #F3F2EE;
  --new-bg: #EAF6F7;
  --new-hover: #DFF1F3;
  --kb-bg: #D2EEF0;
  --kb-hover: #C3E7EA;
  --line: rgba(11, 14, 35, 0.09);
  --line-row: rgba(11, 14, 35, 0.06);
  --line2: rgba(11, 14, 35, 0.17);
  --blue: #007A84;
  --blue-hover: #00666F;
  --blue-bg: #E2F4F5;
  --blue-active-text: #005A62;
  --on-accent: #FFFFFF;           /* text on a teal fill */
  --coral: #E4502F;               /* brand signal colour: closing soon, NEW, badges, Discard */
  --coral-hover: #CC4224;
  --coral-bg: #FDECE7;
  --green: #3B6D11;
  --green-bg: #EAF3DE;
  --green-bd: #97C459;
  --red: #B8321C;
  --red-bg: #FDECE7;
  --red-bd: #F4A391;
  --amber: #854F0B;
  --amber-bg: #FAEEDA;
  --amber-bd: #EF9F27;
  --amber-hover: #FAC775;
  --pend: #8a6d1a;
  --chip-blue-bg: #E2F4F5;
  --chip-blue-bd: #9ED9DE;
  --cat-bg: #E2F4F5;
  --cat-bd: #9ED9DE;
  --local-bg: #E8F5E9; --local-fg: #2E7D32; --local-bd: #A5D6A7;
  --intl-bg: #E2F4F5;  --intl-fg: #006B74;  --intl-bd: #9ED9DE;
  --lchip-fg: #3E4659;
  --desc-fg: #2A3045;
  --spinner: #E4E3DD;
  --selbar-bg: #0B0E23;
  --selbar-fg: #FFFFFF;
}

html.dark {
  --text: #EEF0F6;
  --muted: #9AA4BE;
  --faint: #66708C;
  --jid: #7A84A0;
  --cell2: #C4CADA;
  --bg: #0B0E23;
  --panel: #12163A;
  --input: #151A3D;
  --soft: #141938;
  --soft2: #1C2246;
  --hover-btn: #272E58;
  --row-hover: #141938;
  --th-bg: #12163A;
  --new-bg: #0F2340;
  --new-hover: #132A4A;
  --kb-bg: #12324A;
  --kb-hover: #163B57;
  --line: rgba(255, 255, 255, 0.09);
  --line-row: rgba(255, 255, 255, 0.06);
  --line2: rgba(255, 255, 255, 0.18);
  --blue: #00C2CB;
  --blue-hover: #33D1D8;
  --blue-bg: #0B2B3C;
  --blue-active-text: #7FE3E8;
  --on-accent: #0B0E23;
  --coral: #F15A3B;
  --coral-hover: #F47A61;
  --coral-bg: #3A1A1C;
  --green: #95d063;
  --green-bg: #1d2c14;
  --green-bd: #4c7a2a;
  --red: #FF7A5E;
  --red-bg: #3A1A1C;
  --red-bd: #7A3426;
  --amber: #f2b45e;
  --amber-bg: #372911;
  --amber-bd: #8a6320;
  --amber-hover: #4a3816;
  --pend: #e2c25a;
  --chip-blue-bg: #0B2B3C;
  --chip-blue-bd: #1E5C6E;
  --cat-bg: #0B2B3C;
  --cat-bd: #1E5C6E;
  --local-bg: #16291a; --local-fg: #8fd694; --local-bd: #2f6b37;
  --intl-bg: #0B2B3C;  --intl-fg: #5FD9E0;  --intl-bd: #1E5C6E;
  --lchip-fg: #C4CADA;
  --desc-fg: #D5D9E6;
  --spinner: #272E58;
  --selbar-bg: #EEF0F6;
  --selbar-fg: #0B0E23;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 13px/1.4 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  padding: 8px 12px 6px;
}
[hidden] { display: none !important; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 13px; margin: 0 0 8px; }
p { margin: 0 0 10px; }
a { color: var(--blue); }
code { font-size: 12px; background: var(--soft2); border-radius: 3px; padding: 0 4px; }

/* ── Top bar ── */
.topbar { display: flex; align-items: center; gap: 10px; min-height: 34px; }
.topbar-title { font-size: 13px; font-weight: 600; white-space: nowrap; }
/* Logo: the icon's core (cyan + coral rings, readable at this size) and the
   wordmark set in Inter Bold as the kit specifies. */
.brand { display: inline-flex; align-items: center; gap: 7px; color: var(--text); }
.brand-ico { width: 24px; height: 24px; display: block; }
.brand-wm { font-weight: 700; font-size: 15px; letter-spacing: -0.02em; }
.ico-d { display: none !important; }
html.dark .ico-l { display: none !important; }
html.dark .ico-d { display: block !important; }
/* The sign-in page shows the large logo, so the header's is left out there. */
body[data-view="view-auth"] .topbar .brand, body[data-view="view-checkmail"] .topbar .brand { visibility: hidden; }
.signin-brand { text-align: center; margin: 4px 0 20px; }
.signin-brand img { width: 112px; height: 112px; margin: 0 auto 6px; }
.signin-wm { font-weight: 700; font-size: 30px; letter-spacing: -0.02em; line-height: 1.1; }
.signin-tag { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.signin-tag strong { color: var(--blue); font-weight: 600; }
.topbar-meta { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.who { display: flex; gap: 6px; align-items: center; min-width: 0; margin-left: auto; position: relative; }
.who-email { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }

/* Account button + menu (Settings, Admin, colours, Sign out) */
.acct-btn {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 7px 0 3px;
  border-radius: 15px; border: 0.5px solid var(--line2); background: var(--panel); color: var(--muted);
  font: inherit; font-size: 11px; cursor: pointer; min-width: 0;
}
.acct-btn:hover { background: var(--soft2); color: var(--text); }
.acct-btn[aria-expanded="true"] { border-color: var(--blue); color: var(--text); }
.avatar {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--blue); color: var(--on-accent);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; line-height: 1;
}
.avatar-lg { width: 34px; height: 34px; font-size: 15px; }
.caret { width: 14px; height: 14px; flex-shrink: 0; }
.acct-badge { position: absolute; top: -6px; right: -6px; margin: 0; }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 1000; width: 270px; padding: 6px;
  background: var(--panel); border: 0.5px solid var(--line2); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(11, 14, 35, 0.18);
}
html.dark .acct-menu { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55); }
.acct-head { display: flex; gap: 10px; align-items: center; padding: 8px 8px 10px; border-bottom: 0.5px solid var(--line); margin-bottom: 4px; }
.acct-who { display: flex; flex-direction: column; min-width: 0; }
.acct-email { font-size: 12px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-item {
  display: grid; grid-template-columns: 18px auto 1fr auto; align-items: center; gap: 0 10px; width: 100%;
  padding: 8px; border: 0; border-radius: 8px; background: none; color: var(--text);
  font: inherit; font-size: 13px; text-align: left; cursor: pointer;
}
.acct-item:hover, .acct-item:focus-visible { background: var(--soft2); outline: none; }
.acct-item svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.acct-hint { font-size: 11px; color: var(--muted); justify-self: end; }
.acct-item .badge { margin: 0; grid-column: 4; }
.acct-sep { height: 0.5px; background: var(--line); margin: 4px 2px; }
.acct-theme { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; }
.theme-seg { display: inline-flex; border: 0.5px solid var(--line2); border-radius: 7px; overflow: hidden; }
.theme-seg button { font: inherit; font-size: 11px; padding: 4px 9px; border: 0; background: var(--panel); color: var(--muted); cursor: pointer; }
.theme-seg button + button { border-left: 0.5px solid var(--line2); }
.theme-seg button:hover { color: var(--text); }
.theme-seg button.on { background: var(--blue); color: var(--on-accent); }
.settings-foot { margin-top: 12px; }

/* ── Buttons ── */
.log-btn {
  font-weight: 500; font-size: 11px; font-family: inherit; line-height: 1.2; padding: 0 10px; height: 26px; border-radius: 5px;
  border: 0.5px solid var(--line2); background: var(--soft); color: var(--muted); cursor: pointer; white-space: nowrap;
}
.log-btn:hover { background: var(--hover-btn); color: var(--text); }
.log-btn[aria-pressed="true"] { background: var(--blue-bg); color: var(--blue-active-text); border-color: var(--blue); }
.btn {
  font-weight: 500; font-size: 12px; font-family: inherit; line-height: 1.2; padding: 0 12px; height: 28px; border-radius: 5px;
  border: 0.5px solid var(--line2); background: var(--soft2); color: var(--text); cursor: pointer;
}
.btn:hover { background: var(--hover-btn); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary {
  width: 100%; height: 32px; border-radius: 5px; border: 0.5px solid var(--blue);
  background: var(--blue); color: #fff; font-weight: 500; font-size: 13px; font-family: inherit; cursor: pointer;
}
.btn-primary { color: var(--on-accent); }
.btn-primary:hover { background: var(--blue-hover); }
.btn-link { background: none; border: 0; padding: 0; color: var(--blue); font: inherit; cursor: pointer; text-align: left; }
.btn-link:hover { text-decoration: underline; }
.btn-google { width: 100%; height: 34px; display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--input); }
.clear-btn {
  font-weight: 500; font-size: 11px; font-family: inherit; padding: 0 10px; height: 26px; border-radius: 5px;
  border: 0.5px solid var(--amber-bd); background: var(--amber-bg); color: var(--amber); cursor: pointer; white-space: nowrap;
}
.clear-btn:hover { background: var(--amber-hover); }

/* ── Forms, panels, messages ── */
label { display: block; margin-bottom: 10px; font-size: 12px; color: var(--muted); }
input[type=email], input[type=password], input[type=text], input[type=number], input[type=search], select {
  font-size: 12px; font-family: inherit; line-height: 1.2; color: var(--text); background: var(--input);
  border: 0.5px solid var(--line2); border-radius: 5px; padding: 4px 8px; height: 28px;
}
label > input[type=email], label > input[type=password] { display: block; width: 100%; margin-top: 3px; height: 32px; font-size: 13px; }
.panel { background: var(--panel); border: 0.5px solid var(--line); border-radius: 8px; padding: 16px; }
.narrow { max-width: 400px; margin: 40px auto; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.msg { min-height: 1.4em; font-size: 12px; margin: 6px 0 0; }
.msg.error { color: var(--red); }
.msg.ok { color: var(--green); }
.divider { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--muted); font-size: 11px; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 0.5px solid var(--line2); }
.check { display: flex; gap: 6px; align-items: center; margin: 0; font-size: 12px; color: var(--text); }
input.row-cb { cursor: pointer; accent-color: var(--blue); width: 13px; height: 13px; margin: 0; }

.loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); padding: 60px 0; }
.spinner { width: 26px; height: 26px; border: 2.5px solid var(--spinner); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Settings ── */
.settings { max-width: 680px; margin: 8px auto 24px; width: 100%; }
.settings .panel + .panel { margin-top: 12px; }

.cm-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

/* Settings: Access requests (admins only) */
.badge { display: inline-block; min-width: 16px; margin-left: 5px; padding: 0 5px; border-radius: 8px;
         background: var(--coral); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
.badge[hidden] { display: none; }
.acc-list { list-style: none; margin: 4px 0 0; padding: 0; }
.acc-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-bottom: 0.5px solid var(--line); }
.acc-who { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 180px; }
.acc-email { font-size: 13px; overflow-wrap: anywhere; }
.acc-btns { display: flex; gap: 6px; }
.acc-btns .acc-ok { color: var(--green); border-color: var(--green-bd); }
.acc-btns .acc-no { color: var(--red); border-color: var(--red-bd); }
.acc-declined { margin-top: 12px; font-size: 13px; }
.acc-declined summary { cursor: pointer; color: var(--muted); }

/* Settings: Scrape log (admins only) */
.settings h4 { margin: 14px 0 6px; font-size: 13px; }
.log-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.log-row select { flex: 1; min-width: 0; max-width: 100%; }
.log-row input[type=search] { flex: 1; min-width: 180px; }
.logbox {
  margin: 6px 0 0; padding: 10px 12px; max-height: 60vh; overflow: auto; white-space: pre;
  font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--soft); border: 0.5px solid var(--line); border-radius: 6px; color: var(--text);
}
.logbox.log-short { max-height: none; }
.rwrap { overflow-x: auto; }
.rtable { border-collapse: collapse; font-size: 12px; width: 100%; }
.rtable th, .rtable td { padding: 3px 8px; border-bottom: 0.5px solid var(--line); text-align: left; white-space: nowrap; }
.rtable th { color: var(--muted); font-weight: 600; }
.rtable td:nth-child(n+2):not(:last-child) { text-align: right; }
.rtable tr.bad td { color: var(--red); font-weight: 600; }
.rtable td:last-child { white-space: normal; min-width: 9em; }
.dl-row { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-bottom: 6px; }
.dl-row input[type=number] { width: 64px; }
.rule-add { display: grid; grid-template-columns: 9em auto 1fr auto; gap: 6px; align-items: center; margin-top: 12px; }
.rule-list { list-style: none; margin: 8px 0 0; padding: 0; }
.rule-list li { display: flex; gap: 10px; align-items: center; padding: 3px 0; border-bottom: 0.5px solid var(--line); font-size: 12px; }
.rule-list li span:first-child { flex: 1; overflow-wrap: anywhere; }
.rule-list button { width: 24px; height: 22px; border-radius: 4px; border: 0.5px solid var(--line2); background: var(--input); color: var(--muted); cursor: pointer; }
.rule-list button:hover { color: var(--red); border-color: var(--red-bd); }
.import-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.import-row input[type=file] { flex: 1 1 220px; min-width: 0; max-width: 100%; font-size: 12px; font-family: inherit; color: var(--text); }

/* ── Tabs + search ── */
.tabbar { display: flex; align-items: flex-end; gap: 10px; border-bottom: 0.5px solid var(--line); margin-top: 2px; }
.tabs { display: flex; gap: 2px; }
/* Status tabs with their counts (computer) */
.stat-tab {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px 7px; margin-bottom: -1px;
  border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted);
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.stat-tab:hover { color: var(--text); }
.stat-tab .stat-n { font-size: 11px; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; }
.stat-tab.on { color: var(--text); border-bottom-color: var(--blue); }
.stat-tab.on .stat-n { color: var(--blue); }
.tab-btn {
  font-weight: 500; font-size: 12px; font-family: inherit; line-height: 1.2; padding: 5px 14px; border: none; background: none; color: var(--muted);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); }
.tab-search { margin-left: auto; padding-bottom: 3px; display: flex; align-items: center; gap: 6px; }
.tab-search input {
  width: 260px; height: 28px; font-size: 12px; padding-left: 28px; border-radius: 8px;
  background: var(--input) no-repeat 9px center / 13px 13px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E");
}
.tab-search input.f-active {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: 9px center !important; background-size: 13px 13px !important;
}
/* "12 of 340" inside the right end of the search box while searching */
.search-box { position: relative; display: flex; }
.search-count {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-size: 10px; color: var(--muted); white-space: nowrap; pointer-events: none;
}
.search-count.none { color: var(--red, #c0392b); }
.search-info { font-size: 11px; color: var(--muted); white-space: nowrap; }
.search-mode { display: flex; height: 28px; flex-shrink: 0; border: 0.5px solid var(--line2); border-radius: 5px; overflow: hidden; }
.search-mode button { font: inherit; font-size: 10px; padding: 0 9px; border: 0; background: var(--panel); color: var(--muted); cursor: pointer; }
.search-mode button + button { border-left: 0.5px solid var(--line2); }
.search-mode button:hover { color: var(--text); }
.search-mode button.on { background: var(--blue); color: var(--on-accent); }

/* Breakdown (funnel), as in the local app */
.funnel-toggle { background: none; border: 0; padding: 0; font: inherit; font-size: 11px; color: var(--blue); cursor: pointer; }
.funnel-toggle:hover { text-decoration: underline; }
.m-funnel, .m-funnel-f { display: none; }
.ico-btn .ico, .ab-i { display: none; }
.sel-all-btn { display: none; }
.funnel { max-width: 460px; margin: 4px 0 10px; padding: 10px 14px; font-size: 12px; background: var(--panel);
          border: 0.5px solid var(--line); border-radius: 8px; }
.f-row { display: flex; align-items: baseline; gap: 6px; padding: 2px 0; }
.f-label { color: var(--text); }
.f-leader { flex: 1; min-width: 12px; border-bottom: 1px dotted var(--line2); transform: translateY(-3px); }
.f-row strong { font-variant-numeric: tabular-nums; }
.f-branch { margin-left: 8px; padding-left: 10px; border-left: 1px solid var(--line2); }
.f-active { border-color: var(--blue) !important; background: var(--blue-bg) !important; color: var(--blue-active-text) !important; }

/* ── Stats row ── */
.statsrow { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; color: var(--muted); min-height: 30px; margin: 4px 0 2px; }
.statsrow strong { color: var(--text); }
.stat-conf strong, .stat-conf .stat-icon, .stat-sub strong { color: var(--green); }
.stat-pend strong { color: var(--pend); }
.stat-disc strong { color: var(--red); }
.statsrow .sep { opacity: .3; }
/* The counters double as a Status switch (the one shown is underlined). */
.stat-btn {
  background: none; border: 0; padding: 1px 1px 0; margin: 0; font: inherit; color: inherit; cursor: pointer;
  border-bottom: 2px solid transparent;
}
.stat-btn:hover { color: var(--text); }
.stat-btn.on { border-bottom-color: var(--blue); color: var(--text); }
.status-seg { display: none; }
.stats-actions { display: flex; gap: 6px; align-items: center; margin-left: auto; }

/* ── Filter bar ── */
.fbar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 2px 0 6px; }
.fbar label { display: flex; align-items: center; gap: 4px; margin: 0; font-size: 11px; color: var(--muted); white-space: nowrap; }
.fbar select { font-size: 11px; height: 26px; padding: 2px 6px; max-width: 150px; text-overflow: ellipsis; cursor: pointer; }
.reset-btn {
  font-weight: 500; font-size: 11px; font-family: inherit; line-height: 1.2; padding: 0 10px; height: 26px; border-radius: 5px;
  border: 0.5px solid var(--line2); background: var(--soft2); color: var(--muted); cursor: pointer; white-space: nowrap;
}
.reset-btn:hover { background: var(--hover-btn); color: var(--text); }
.reset-btn.idle { opacity: .55; }

/* ── Table ── */
.tbl-wrap { border: 0.5px solid var(--line); border-radius: 8px; overflow: auto; }
table.jt { width: 100%; border-collapse: collapse; font-size: 12px; }
.jt th {
  text-align: left; padding: 6px 8px; font-weight: 500; font-size: 11px; color: var(--muted);
  border-bottom: 0.5px solid var(--line); position: sticky; top: 0; background: var(--th-bg);
  cursor: pointer; white-space: nowrap; user-select: none; z-index: 1;
}
.jt th:hover { color: var(--text); }
.jt th.asc::after { content: " ↑"; }
.jt th.desc::after { content: " ↓"; }
.jt th:not(.asc):not(.desc):not(.no-sort)::after { content: " ↕"; opacity: .3; }
.jt th.no-sort { cursor: default; }
.jt td { padding: 5px 8px; border-bottom: 0.5px solid var(--line-row); vertical-align: middle; }
.jt tbody tr:hover > td { background: var(--row-hover); }
.jt tr.is-new > td { background: var(--new-bg); }
.jt tr.is-new:hover > td { background: var(--new-hover); }
.jt tr.soft-disc > td { opacity: .4; background: var(--soft); }
.jt tr.soft-disc > td.c-cb, .jt tr.soft-disc > td.c-act, .jt tr.soft-disc > td.c-pos { opacity: 1; }
.jt tr.soft-disc .jlink { text-decoration: line-through; color: var(--muted); }
.jt tr.kb-focus > td { background: var(--kb-bg) !important; }
.jt tr.kb-focus:hover > td { background: var(--kb-hover) !important; }
.jt tr.detail > td { background: var(--soft) !important; padding: 10px 14px 12px; }
.c-cb { width: 22px; padding: 4px 2px 4px 8px !important; }
.c-idx { color: var(--faint); font-size: 10px; text-align: right; width: 28px; }
.jt th.c-idx { text-align: right; }
.c-dl { font-size: 11px; white-space: nowrap; width: 80px; }
.c-dl.soon { color: var(--coral); font-weight: 600; }
.c-act { width: 40px; }
.c-pos { min-width: 220px; }
.c-src, .c-recr { width: 70px; }
.c-recr { text-align: center; }
.c-con, .c-dur { font-size: 11px; color: var(--cell2); width: 80px; }
.c-loc { font-size: 11px; width: 110px; }
.c-lang { width: 90px; }
.c-lvl { font-size: 11px; width: 90px; }
.c-applied { font-size: 11px; white-space: nowrap; width: 90px; color: var(--blue); }
.c-srclvl { width: 110px; }
.c-srclvl .lvl { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }

.pos-line { display: flex; align-items: flex-start; gap: 4px; }
.xbtn {
  flex-shrink: 0; width: 16px; height: 16px; margin-top: 1px; padding: 0; border: 0; background: none;
  color: var(--faint); cursor: pointer; font-size: 10px; line-height: 16px; transition: transform .12s;
}
.xbtn:hover { color: var(--blue); }
.xbtn[aria-expanded="true"] { transform: rotate(90deg); color: var(--blue); }
.jlink { font-weight: 500; color: var(--text); text-decoration: none; font-size: 12px; overflow-wrap: anywhere; }
a.jlink:hover { color: var(--blue); text-decoration: underline; }
.jlink-exp { border-bottom: 1px dotted var(--line2); }
.jsub { font-size: 11px; color: var(--muted); margin-top: 1px; display: flex; align-items: center; flex-wrap: wrap; gap: 2px 4px; padding-left: 20px; }
.jid { font-size: 10px; color: var(--jid); font-family: monospace; }
.tip { border-bottom: 1px dotted var(--line2); cursor: default; }
.tag { display: inline-block; padding: 1px 5px; border-radius: 3px; font-size: 10px; }
.tag-new { background: var(--coral-bg); color: var(--coral); border: 0.5px solid transparent; font-weight: 600; }
.tag-tjo { background: var(--red-bg); color: var(--red); border: 0.5px solid var(--red-bd); }
.tag-category { background: var(--cat-bg); color: var(--blue); border: 0.5px solid var(--cat-bd); }
.tag-auto { background: var(--amber-bg); color: var(--amber); border: 0.5px solid var(--amber-bd); }
.tag-closed { color: var(--faint); font-size: 10px; }

.etag { display: inline-flex; align-items: center; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 500; background: var(--chip-blue-bg); color: var(--blue); border: 0.5px solid var(--chip-blue-bd); white-space: nowrap; }
.etag-idb { background: #FDF3E7; color: #854F0B; border-color: #EF9F27; }
.etag-wb { background: #F3EDF7; color: #5B2D8B; border-color: #C9A9E9; }
.etag-imf { background: #E8F5E9; color: #2E7D32; border-color: #A5D6A7; }
.etag-wto { background: #FFF3E0; color: #E65100; border-color: #FFB74D; }
.etag-wipo { background: #E3F2FD; color: #1565C0; border-color: #90CAF9; }
.etag-wef { background: #FCE4EC; color: #880E4F; border-color: #F48FB1; }
.etag-ilo { background: #F1F8E9; color: #33691E; border-color: #AED581; }
.etag-caf { background: #FFF8E1; color: #F57F17; border-color: #FFE082; }
.etag-unesco { background: #E8EAF6; color: #283593; border-color: #9FA8DA; }
/* Dark versions keep each source's hue: deep background, light text. */
html.dark .etag-idb { background: #33240f; color: #f2b45e; border-color: #7a5418; }
html.dark .etag-wb { background: #2a1f38; color: #cfa8f2; border-color: #5b3f80; }
html.dark .etag-imf { background: #16291a; color: #8fd694; border-color: #2f6b37; }
html.dark .etag-wto { background: #36230f; color: #ffb066; border-color: #85501c; }
html.dark .etag-wipo { background: #152638; color: #8cc4ff; border-color: #2c5582; }
html.dark .etag-wef { background: #351624; color: #f59bc0; border-color: #7a3354; }
html.dark .etag-ilo { background: #1c2a14; color: #b5dc86; border-color: #4a6b27; }
html.dark .etag-caf { background: #33290e; color: #ffd36a; border-color: #7d6420; }
html.dark .etag-unesco { background: #1d2140; color: #a9b3f0; border-color: #3f4a8a; }
.lchip { display: inline-block; padding: 2px 7px; border-radius: 10px; font-weight: 500; font-size: 10px; white-space: nowrap; border: 0.5px solid var(--line2); background: var(--soft2); color: var(--lchip-fg); cursor: default; }
.rchip { display: inline-block; padding: 2px 6px; border-radius: 10px; font-weight: 500; font-size: 10px; white-space: nowrap; border: 0.5px solid; }
.rchip-local { background: var(--local-bg); color: var(--local-fg); border-color: var(--local-bd); }
.rchip-intl { background: var(--intl-bg); color: var(--intl-fg); border-color: var(--intl-bd); }

/* Action buttons (✓ / ✗ / undo), as in the local app */
.brow { display: flex; flex-direction: column; gap: 2px; align-items: center; }
.ab {
  width: 24px; height: 20px; border-radius: 4px; border: 0.5px solid var(--line2); background: var(--input); color: var(--muted);
  cursor: pointer; font-size: 11px; display: flex; align-items: center; justify-content: center; padding: 0; line-height: 1; font-family: inherit;
}
.ab:hover { background: var(--soft2); color: var(--text); }
.ab.is-c { background: var(--green-bg); color: var(--green); border-color: var(--green-bd); }
.ab.is-u { background: var(--soft2); color: var(--amber); border-color: var(--amber-bd); font-size: 9px; height: 34px; flex-direction: column; line-height: 1.15; }
.ab.is-undo { color: var(--red); border: 0; background: none; font-size: 15px; }
.ab.is-undo:hover { background: var(--red-bg); }
.ab.is-s { color: var(--blue); border-color: var(--chip-blue-bd); }
.ab.is-s:hover { background: var(--chip-blue-bg); }
.lock { font-size: 11px; border: 1.5px solid var(--green); border-radius: 4px; padding: 1px 3px; cursor: default; }

/* Job details (opened with ▸) */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 3px 14px; margin: 0 0 8px; font-size: 12px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.desc { white-space: pre-wrap; font-size: 12px; line-height: 1.5; max-height: 420px; overflow: auto; background: var(--panel); border: 0.5px solid var(--line); border-radius: 6px; padding: 10px 12px; color: var(--desc-fg); }
.empty { text-align: center; padding: 2rem; color: var(--muted); font-size: 13px; }
.list-foot { display: flex; align-items: center; gap: 12px; padding: 6px 2px 0; }
.kb-hint { margin-left: auto; font-size: 10px; }

/* Selection bar (as in the local app) */
.sel-bar {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 900;
  display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px;
  background: var(--selbar-bg); color: var(--selbar-fg); border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25); font-size: 12px;
}
.sel-bar-count { font-weight: 600; white-space: nowrap; }
.sel-bar-discard { font-size: 12px; font-family: inherit; height: 28px; padding: 0 14px; border-radius: 6px; border: none; background: var(--coral); color: #fff; font-weight: 600; cursor: pointer; }
.sel-bar-discard:hover { background: var(--coral-hover); }
.sel-bar-clear { font-size: 12px; font-family: inherit; height: 28px; padding: 0 10px; border-radius: 6px; border: 0.5px solid currentColor; background: transparent; color: inherit; opacity: .8; cursor: pointer; }
.sel-bar-clear:hover { opacity: 1; }

/* ── Computer: the table scrolls inside the window, like the local app ── */
@media (min-width: 761px) {
  /* The status tabs replace the Status filter. */
  .fbar .fl-status { display: none; }
  /* Filters as pills: label + value in one rounded box, highlighted when set. */
  .fbar { gap: 6px; margin: 4px 0 8px; }
  .fbar label {
    gap: 0; height: 28px; padding: 0 2px 0 11px; border: 0.5px solid var(--line2); border-radius: 14px;
    background: var(--panel); color: var(--muted); font-size: 11.5px;
  }
  .fbar label select {
    height: 26px; border: 0; background: transparent; color: var(--text); font-weight: 500;
    padding: 0 6px; max-width: 170px; border-radius: 12px;
  }
  .fbar label select:focus { outline: none; }
  .fbar label:focus-within { border-color: var(--blue); }
  .fbar label:has(select.f-active) { border-color: var(--blue); background: var(--blue-bg); color: var(--blue-active-text); }
  .fbar label select.f-active { border: 0 !important; background: transparent !important; color: var(--blue-active-text) !important; font-weight: 600; }
  .fbar .reset-btn { height: 28px; border-radius: 14px; }
  /* Table: no Source column (the organisation is under each title), the job
     id only on hover, ✓ / ✗ as small icons side by side. */
  .jt .c-src { display: none; }
  .jsub .jid { order: 9; }     /* last on the line, so hiding it leaves no gap */
  .jt tbody tr:not(:hover):not(.kb-focus) .jid { opacity: 0; }
  .c-act { width: 62px; }
  .brow { flex-direction: row; gap: 3px; }
  .ab { width: 24px; height: 24px; border-radius: 6px; }
  .ab .ab-t { display: none; }
  .ab .ab-i { display: block; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2;
              stroke-linecap: round; stroke-linejoin: round; }
  .ab.is-u { width: auto; height: 24px; flex-direction: row; gap: 3px; padding: 0 7px; font-size: 10.5px; }
  html, body { height: 100%; }
  body { display: flex; flex-direction: column; overflow: hidden; }
  main { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; }
  .jobs { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  #pane-triage, #pane-submitted { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .tbl-wrap { flex: 1; min-height: 0; }
}

/* Phone-only pieces, hidden on computers */
.m-tools, .m-only, .msum, .m-commit { display: none; }

/* ── Phone (<= 760px): bigger text, airy cards, status switch ──
   Sizes are in rem so they follow the phone's own text-size setting. */
/* Swipe layer and Undo toast exist only on phones; [hidden] must win over display. */
.swipe-under[hidden], .swipe-toast[hidden] { display: none !important; }
.swipe-under, .swipe-toast { display: none; }

@media (max-width: 760px) {
  html { font-size: 100%; }
  body { padding: 6px 12px 90px; font-size: 0.9375rem; }
  .topbar { min-height: 40px; }
  .topbar-title { font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.01em; }
  .brand { gap: 8px; }
  .brand-ico { width: 28px; height: 28px; }
  .brand-wm { font-size: 1.25rem; }
  .topbar-meta, .who-email, .kb-hint { display: none; }
  /* Account: just the avatar; the menu items get finger-sized */
  .acct-btn { height: 40px; padding: 0 4px; border: 0; background: transparent; }
  .acct-btn .caret { display: none; }
  .avatar { width: 32px; height: 32px; font-size: 0.875rem; }
  .avatar-lg { width: 40px; height: 40px; font-size: 1rem; }
  .acct-badge { top: -2px; right: -4px; }
  .acct-menu { width: min(300px, calc(100vw - 24px)); }
  .acct-email { font-size: 0.875rem; }
  .acct-item { padding: 12px 8px; font-size: 0.9375rem; }
  .acct-hint { font-size: 0.75rem; }
  .theme-seg button { padding: 7px 12px; font-size: 0.8125rem; }

  /* Settings, Select and Filters: plain line icons */
  .ico-btn .lbl { display: none; }
  .ico-btn .ico { display: block; width: 22px; height: 22px; }
  .log-btn.ico-btn, .m-tools .log-btn.ico-btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--muted);
  }
  .log-btn.ico-btn[hidden] { display: none; }
  .log-btn.ico-btn:hover { background: var(--soft2); }
  .log-btn.ico-btn[aria-pressed="true"], .log-btn.ico-btn[aria-expanded="true"] { background: var(--blue-bg); color: var(--blue); }
  .ico-btn .badge, .ico-badge:not(:empty) {
    position: absolute; top: 3px; right: 1px; margin: 0; min-width: 16px; padding: 0 4px; border-radius: 8px;
    font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
  }
  .ico-badge:not(:empty) { background: var(--blue); color: #fff; }
  .ico-badge:not(:empty) { color: var(--on-accent); }
  .who { margin-left: auto; }
  .log-btn { height: 36px; font-size: 0.8125rem; padding: 0 12px; }
  .panel { padding: 14px; }
  .small, label { font-size: 0.875rem; }
  input[type=email], input[type=password], input[type=text], input[type=number], input[type=search], select { font-size: 1rem; height: 40px; }

  /* Header: no tabs and no counts row; search, Select and Filters on one line */
  .tabs, #pane-triage .statsrow, #pane-submitted .sub-count, .list-foot .kb-hint { display: none; }
  .tabbar { border-bottom: 0; gap: 4px; margin: 2px 0 10px; align-items: flex-start; }
  .tab-search { flex: 1; margin: 0; padding: 0; min-width: 0; flex-wrap: wrap; gap: 6px; }
  .tab-search .search-box { width: 100%; order: 1; }
  .tab-search input {
    width: 100%; height: 42px; font-size: 1rem; border: 0.5px solid transparent; border-radius: 12px;
    background: var(--soft2) no-repeat 13px center / 17px 17px; padding-left: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E");
  }
  .tab-search input:focus { background-color: var(--input); border-color: var(--blue); outline: none; }
  .tab-search input.f-active { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important; background-position: 13px center !important; background-size: 17px 17px !important; }
  .search-count { right: 12px; font-size: 0.8125rem; }
  .tab-search .search-mode { display: none; order: 2; height: 34px; }
  body.search-open .tab-search .search-mode { display: flex; }
  .search-mode button { font-size: 0.875rem; padding: 0 16px; }
  .search-info { order: 3; font-size: 0.8125rem; }
  /* Triage: the breakdown opens from Filters; this row only carries Select all.
     Submitted: the row carries the breakdown link. */
  .m-listbar { display: none; align-items: center; gap: 8px; margin: 4px 0 6px; }
  body.select-mode:not(.on-submitted) .m-listbar, body.on-submitted .m-listbar { display: flex; }
  body.on-submitted .m-funnel { display: block; margin-left: auto; padding: 4px 2px; font-size: 0.875rem; }
  .fbar .m-funnel-f { display: block; grid-column: 1 / -1; justify-self: start; padding: 6px 2px; font-size: 0.875rem; }
  /* The breakdown opens under the Filters panel, next to its link */
  #pane-triage { display: flex; flex-direction: column; }
  #pane-triage[hidden] { display: none; }
  #pane-triage > * { order: 3; }
  #pane-triage > .statsrow { order: 0; }
  #pane-triage > .fbar { order: 1; }
  #pane-triage > #funnel { order: 2; }
  body.select-mode:not(.on-submitted) .sel-all-btn {
    display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 8px;
    border: 0.5px solid var(--blue); background: var(--blue-bg); color: var(--blue-active-text);
    font-family: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer;
  }
  .sel-all-btn:disabled { opacity: .45; cursor: default; }
  .funnel { max-width: none; font-size: 0.875rem; margin: 0 0 10px; }
  .f-branch { margin-left: 6px; padding-left: 8px; }
  .m-tools { display: flex; gap: 6px; }
  .m-tools .log-btn { height: 42px; font-size: 0.875rem; padding: 0 10px; }
  body.on-submitted .m-tools { display: none; }
  #pane-submitted .statsrow { min-height: 0; margin: 0; }

  /* The status switch stays pinned at the top while the list scrolls */
  .status-seg {
    display: flex; gap: 3px; position: sticky; top: 0; z-index: 5; margin: 0 0 4px;
    padding: 3px; border-radius: 12px; background: var(--soft2);
    /* Masks cards scrolling under the pinned bar; covers the gap above it,
       no more, so the search row's bottom edge is not hidden. */
    box-shadow: 0 -6px 0 6px var(--bg);
  }
  .seg-btn {
    flex: 1; min-width: 0; height: 38px; padding: 0 4px; border: 0; border-radius: 9px;
    background: transparent; color: var(--muted); font-family: inherit; font-size: 0.9375rem; font-weight: 600;
    cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    display: flex; align-items: center; justify-content: center; gap: 6px; line-height: 1.15;
  }
  .seg-btn .seg-n { font-size: 0.8125rem; font-weight: 600; opacity: .75; }
  .seg-btn.on { background: var(--bg); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14); }
  html.dark .seg-btn.on { background: var(--hover-btn); box-shadow: none; }
  .seg-btn.on .seg-n { color: var(--blue); opacity: 1; }

  .fbar { display: none; }
  .fbar.open { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
  .fbar label { flex-direction: column; align-items: stretch; gap: 3px; font-size: 0.8125rem; }
  .fbar select { max-width: none; width: 100%; height: 42px; font-size: 1rem; }
  .fbar .reset-btn { height: 42px; font-size: 0.875rem; align-self: end; }
  .rule-add { grid-template-columns: 1fr auto; }
  .rule-add > span { display: none; }
  .rule-add select { grid-column: 1 / -1; }

  /* Cards: title, organisation, one summary line, a few useful badges */
  .tbl-wrap { border: 0; border-radius: 0; overflow: visible; }
  table.jt, .jt tbody { display: block; }
  .jt thead { display: none; }
  .jt tbody tr { display: flex; align-items: flex-start; gap: 10px; padding: 14px 2px 13px; border-bottom: 0.5px solid var(--line); }
  .jt td { display: none; padding: 0; border: 0; width: auto !important; min-width: 0; }
  .jt td.c-pos { display: block; flex: 1; order: 1; cursor: pointer; }
  .jt td.c-act { display: block; order: 2; flex: 0 0 auto; }
  .jt td.empty { display: block; flex: 1; font-size: 0.9375rem; }
  body.select-mode .jt td.c-cb { display: block; order: 0; padding: 2px 0 0 !important; }
  body.select-mode input.row-cb { width: 24px; height: 24px; }
  .jt tbody tr:hover > td { background: none; }
  .jt tr.is-new { background: var(--new-bg); }
  .jt tr.is-new > td, .jt tr.is-new:hover > td { background: none; }
  .jt tr.soft-disc { background: var(--soft); }
  .jt tr.soft-disc > td { background: none; }
  .jt tr.soft-disc > td.c-pos { opacity: .55; }
  .jt tr.kb-focus > td { background: none !important; }

  /* Swipe a card right to confirm, left to mark ✗ (see swipeCards in app.js).
     Cards scroll vertically only, so a sideways move reaches the page. */
  .jt tbody tr[data-id] { touch-action: pan-y pinch-zoom; }
  .jt tbody tr.swiping { position: relative; z-index: 2; background: var(--bg); will-change: transform;
                         box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12); }
  .jt tbody tr.swiping.is-new { background: var(--new-bg); }
  .jt tbody tr.swiping.soft-disc { background: var(--soft); }
  .swipe-under {
    position: fixed; z-index: 1; display: flex; align-items: center; padding: 0 22px;
    font-weight: 700; font-size: 1rem; pointer-events: none; opacity: .55; transition: opacity .1s;
  }
  .swipe-under.go-right { justify-content: flex-start; background: var(--green-bg); color: var(--green); }
  .swipe-under.go-left { justify-content: flex-end; background: var(--red-bg); color: var(--red); }
  .swipe-under.armed { opacity: 1; }
  .swipe-under.none { background: var(--soft); }
  .swipe-toast {
    position: fixed; left: 12px; right: 12px; bottom: calc(70px + env(safe-area-inset-bottom, 0px)); z-index: 950;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 10px 10px 16px; border-radius: 12px; background: var(--text); color: var(--bg);
    font-size: 0.9375rem; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  }
  .swipe-undo { height: 36px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent;
                color: var(--bg); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

  .rtable th, .rtable td { padding: 3px 4px; }
  .rtable td:last-child { min-width: 0; }

  .xbtn { display: none; }
  .pos-line { display: block; }
  .jlink {
    font-size: 1rem; font-weight: 600; line-height: 1.3; text-decoration: none;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  a.jlink:hover { text-decoration: none; }
  .jlink-exp { border-bottom: 0; }
  .tag-closed { font-size: 0.75rem; }
  .jsub { padding-left: 0; margin-top: 4px; font-size: 0.8125rem; gap: 4px 6px; }
  .jsub .jid, .jsub .tag-category { display: none; }
  .m-only { display: inline-block; }
  .msum { display: block; margin-top: 5px; font-size: 0.8125rem; color: var(--muted); line-height: 1.4; }
  .msum .soon { color: var(--coral); font-weight: 600; }
  .msum .when { color: var(--text); }
  .tag, .rchip, .lchip { font-size: 0.75rem; padding: 2px 8px; }

  /* Actions: small line icons side by side (swipe does the same) */
  .brow { flex-direction: row; gap: 2px; margin-top: -4px; }
  .ab { width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); }
  .ab:hover { background: var(--soft2); }
  .ab .ab-t { display: none; }
  .ab .ab-i { display: block; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2;
              stroke-linecap: round; stroke-linejoin: round; }
  .ab.is-c { background: var(--green-bg); color: var(--green); }
  .ab.is-s { color: var(--blue); }
  .ab.is-u { width: auto; height: 34px; padding: 0 12px; gap: 4px; flex-direction: row; font-size: 0.8125rem;
             border: 0; border-radius: 17px; background: var(--soft2); color: var(--amber); margin-top: 3px; }
  .ab.is-undo { color: var(--red); }
  .lock { display: inline-block; font-size: 1.125rem; padding: 6px 8px; }

  .jt tr.detail { display: block; padding: 0 0 14px; border-bottom: 0.5px solid var(--line2); }
  .jt tr.detail > td { display: block; padding: 12px 14px 14px; border-radius: 12px; }
  .facts { grid-template-columns: max-content 1fr; gap: 7px 14px; margin: 0 0 12px; font-size: 0.875rem; }
  .facts dt { font-size: 0.8125rem; padding-top: 1px; }
  .facts .m-skip { display: none; }
  .detail-actions { gap: 12px; }
  .detail-actions .btn { height: 42px; font-size: 0.9375rem; border-radius: 10px; }
  .detail-actions .btn-link {
    display: inline-flex; align-items: center; height: 42px; padding: 0 16px; border-radius: 10px;
    background: var(--blue); color: #fff; font-size: 0.9375rem; font-weight: 600; text-decoration: none;
  }
  .detail-actions .btn-link { color: var(--on-accent); }
  .desc { font-size: 0.875rem; border: 0; background: var(--bg); }
  .list-foot { padding: 10px 2px 0; }
  .list-foot .btn { height: 42px; font-size: 0.9375rem; }

  /* Floating actions clear of the phone's gesture bar */
  .sel-bar { bottom: calc(14px + env(safe-area-inset-bottom, 0px)); width: calc(100% - 24px); justify-content: space-between; font-size: 0.875rem; }
  .sel-bar-discard, .sel-bar-clear { height: 40px; font-size: 0.875rem; }
  .m-commit { display: block; position: fixed; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 800;
              height: 44px; padding: 0 18px; font-size: 0.875rem; font-weight: 600; border-radius: 22px; border: 0;
              background: var(--selbar-bg); color: var(--selbar-fg); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25); }
  .m-commit[hidden], body.has-selection .m-commit, body.on-submitted .m-commit { display: none !important; }
}
