:root { color-scheme: light; --ink: #253447; --muted: #586575; --line: #d8dfe6; --accent: #245ab5; --surface: #f4f6f9; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--surface); color: var(--ink); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
main { max-width: 1400px; margin: auto; padding: 36px 40px; }
header { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 24px; }
h1 { font-size: 26px; font-weight: 650; margin: 0; letter-spacing: -.02em; }
.brand, .note, footer, #count { color: var(--muted); }
.toolbar, .actions, .editor-bar, .selectors, .account { display: flex; gap: 12px; align-items: center; }
.selectors { flex-wrap: wrap; gap: 16px; }
.account { color: var(--muted); }
.account form { margin: 0; }
.login { max-width: 440px; margin: 8vh auto; }
.login p { color: var(--muted); }
.login-form { display: grid; gap: 8px; margin-top: 28px; }
.login-form label:not(:first-of-type) { margin-top: 12px; }
.login-form button { margin-top: 16px; }
.login p.error, .error { color: #a02525; }
.toolbar { justify-content: space-between; flex-wrap: wrap; }
.feed-label { display: flex; align-items: center; gap: 12px; font-weight: 600; }
select { min-width: 200px; }
button, input, select, textarea { font: inherit; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: white; padding: 9px 12px; }
button { cursor: pointer; min-height: 42px; white-space: nowrap; }
button:hover:enabled { border-color: var(--accent); background: #edf3fe; }
button:active:enabled { background: #dfe9fa; }
button:disabled { opacity: .55; cursor: default; }
button.primary { color: white; background: var(--accent); border-color: var(--accent); }
button.primary:hover:enabled { background: #194a9d; }
a { color: var(--accent); text-underline-offset: 3px; padding: 9px 0; }
a:hover { color: #194a9d; }
a[aria-disabled="true"] { color: var(--muted); cursor: default; }
:focus-visible { outline: 3px solid #78a4ed; outline-offset: 3px; }
input, textarea { caret-color: var(--accent); }
::selection { background: #dbe8ff; color: #18376b; }
.note { margin: 14px 0 0; min-height: 23px; font-size: 13px; max-width: 75ch; }
#status { min-height: 24px; margin: 8px 0 20px; }
#status.error { color: #a02525; }
.editor { background: white; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.editor-bar { padding: 18px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.search-label { display: flex; gap: 12px; align-items: center; flex: 1; }
#search { width: min(100%, 380px); }
#count { font-size: 13px; font-variant-numeric: tabular-nums; }
.table-wrap { max-height: 65vh; overflow: auto; }
table { border-collapse: collapse; width: 100%; table-layout: fixed; }
th { position: sticky; top: 0; background: #f0f3f7; text-align: left; font-size: 13px; font-weight: 600; padding: 12px 20px; border-bottom: 1px solid var(--line); }
th.markup { width: 140px; }
td { padding: 12px 20px; border-bottom: 1px solid #edf0f4; vertical-align: top; overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }
.original { font-size: 14px; margin-bottom: 12px; white-space: pre-wrap; }
.category-label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 5px; }
td textarea, td input { width: 100%; }
textarea { resize: vertical; min-height: 44px; line-height: 1.4; }
tr.changed { background: #f3f7ff; }
tr.changed textarea, tr.changed input { border-color: #7b9dce; }
#empty { padding: 24px 20px; color: var(--muted); }
footer { margin-top: 18px; font-size: 13px; max-width: 75ch; }
[hidden] { display: none !important; }
@media (max-width: 700px) {
  main { padding: 22px 16px; }
  header { padding-bottom: 20px; }
  .toolbar, .feed-label { align-items: stretch; width: 100%; }
  .selectors { width: 100%; }
  header { align-items: flex-start; gap: 12px; flex-wrap: wrap; }
  .account { flex-wrap: wrap; }
  button, input, select, textarea { font-size: 16px; }
  .feed-label { flex-direction: column; gap: 5px; }
  .actions { flex-wrap: wrap; gap: 8px 14px; }
  .editor-bar { padding: 14px; gap: 14px; }
  .search-label { flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 6px; }
  #search { width: 100%; }
  #save { margin-left: auto; }
  .table-wrap { max-height: none; }
  table, tbody { display: block; }
  thead { display: none; }
  tr { display: grid; grid-template-columns: minmax(0, 1fr) 100px; padding: 14px; border-bottom: 1px solid var(--line); gap: 10px; }
  td { display: block; border: 0; padding: 0; }
  td.category::before { display: none; }
  td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 12px; margin-bottom: 5px; }
}
