:root {
  color-scheme: light;
  --paper: #f7f4ec;
  --card: #fffdf7;
  --ink: #22342b;
  --muted: #647168;
  --line: #d7ddd6;
  --green: #286a4b;
  --green-dark: #20573e;
  --green-soft: #eef4ef;
  --danger: #a12b2b;
  --danger-soft: #fff0ed;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 90% 0%, #e6efe7 0, transparent 34rem), var(--paper); }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
.shell { width: min(1160px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 38px; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 48px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 15px; background: var(--green); color: white; font-family: Georgia, serif; font-size: 22px; font-weight: 700; box-shadow: 0 8px 24px #286a4b33; }
.brand strong, .brand small { display: block; }
.brand strong { font-family: Georgia, "Times New Roman", serif; font-size: 20px; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.api-link { color: var(--muted); font-size: 14px; font-weight: 650; text-underline-offset: 4px; }
.intro-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: 34px; align-items: start; }
.eyebrow, .aside-title { color: #52705e; font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow { display: inline-block; margin: 0 0 15px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; }
h1 { max-width: 760px; margin: 0; font-size: clamp(40px, 5.5vw, 64px); line-height: 1.03; letter-spacing: -.04em; }
.lead { max-width: 680px; margin: 18px 0 0; color: var(--muted); font-size: 18px; line-height: 1.65; }
.search-card, .results-card { border: 1px solid var(--line); border-radius: 26px; background: var(--card); box-shadow: 0 26px 70px -48px #22342b99; }
.search-card { margin-top: 30px; padding: 26px; }
.language-grid { display: grid; grid-template-columns: 1fr 44px 1fr; gap: 14px; align-items: end; }
.category-grid { display: grid; grid-template-columns: 1fr 155px; gap: 16px; margin-top: 20px; }
label { display: grid; gap: 8px; font-size: 14px; font-weight: 750; }
label small { color: var(--muted); font-size: 12px; font-weight: 450; }
input, select { width: 100%; min-height: 46px; border: 1px solid #cbd3cc; border-radius: 12px; outline: none; background: #fff; color: var(--ink); padding: 0 13px; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px #286a4b20; }
.icon-button { width: 44px; height: 44px; margin-bottom: 27px; border: 1px solid #cbd3cc; border-radius: 12px; background: white; color: var(--green); font-size: 23px; }
.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.primary-button, .secondary-button, .text-button { border-radius: 11px; font-weight: 750; }
.primary-button { min-height: 48px; border: 0; background: var(--green); color: white; padding: 0 24px; }
.primary-button:hover { background: var(--green-dark); }
.primary-button:disabled { cursor: wait; opacity: .7; }
.secondary-button { min-height: 38px; border: 1px solid #cbd3cc; background: white; color: var(--ink); padding: 0 13px; }
.secondary-button:hover { border-color: #aebbb1; background: #f7faf7; }
.secondary-button:disabled { cursor: not-allowed; opacity: .45; }
.text-button { min-height: 44px; border: 0; background: transparent; color: var(--muted); padding: 0 14px; }
.progress-wrap { margin-top: 20px; }
.progress-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: var(--muted); font-size: 12px; }
progress { display: block; width: 100%; height: 7px; overflow: hidden; border: 0; border-radius: 20px; appearance: none; }
progress::-webkit-progress-bar { background: #e3e9e4; }
progress::-webkit-progress-value { background: var(--green); border-radius: 20px; }
progress::-moz-progress-bar { background: var(--green); border-radius: 20px; }
.explainer { margin-top: 146px; border: 1px solid var(--line); border-radius: 26px; background: var(--green-soft); padding: 25px; }
.explainer ol { display: grid; gap: 20px; margin: 22px 0; padding: 0; list-style: none; }
.explainer li { display: flex; align-items: flex-start; gap: 12px; }
.explainer li > span { display: grid; flex: 0 0 29px; height: 29px; place-items: center; border-radius: 9px; background: var(--green); color: white; font-size: 12px; font-weight: 800; }
.explainer li p { margin: 2px 0 0; font-size: 14px; line-height: 1.5; }
.privacy-note { margin: 0; border-radius: 17px; background: var(--card); color: var(--muted); padding: 16px; font-size: 13px; line-height: 1.6; box-shadow: 0 10px 25px -20px #22342b; }
.alert { display: grid; gap: 4px; margin-top: 26px; border: 1px solid; border-radius: 16px; padding: 15px 17px; font-size: 14px; }
.error { border-color: #e0a39c; background: var(--danger-soft); color: var(--danger); }
.warning { margin: 22px; border-color: #e7c970; background: #fff9df; color: #735b12; }
.results-card { overflow: hidden; margin-top: 38px; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding: 24px 26px; }
.title-row { display: flex; align-items: center; gap: 10px; }
.title-row h2 { margin: 0; font-size: 28px; }
.count { display: inline-grid; min-width: 28px; height: 25px; place-items: center; border-radius: 999px; background: var(--green); color: white; padding: 0 8px; font-size: 12px; font-weight: 800; }
.results-head p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.result-actions { display: flex; gap: 9px; }
.filter-wrap { padding: 22px 25px 0; }
.filter-wrap input { max-width: 390px; min-height: 41px; }
.table-scroll { overflow-x: auto; padding: 18px 25px 25px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { border-bottom: 1px solid var(--line); padding: 13px 10px; text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 12px; letter-spacing: .02em; }
th:first-child, td:first-child { width: 58px; color: var(--muted); font-family: ui-monospace, monospace; font-size: 12px; }
th:last-child, td:last-child { width: 145px; text-align: right; }
.article-link { color: var(--green); font-weight: 700; text-underline-offset: 4px; }
.missing-note { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.target-link { color: var(--green); font-weight: 700; white-space: nowrap; text-underline-offset: 4px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); background: #f4f6f2; padding: 15px 25px; }
.pagination p { margin: 0; color: var(--muted); font-size: 13px; }
.pagination div { display: flex; gap: 8px; }
.empty-results, .initial-state { display: grid; place-items: center; text-align: center; }
.empty-results { padding: 58px 22px; }
.empty-results h3 { margin: 14px 0 0; font-size: 23px; }
.empty-results p { max-width: 520px; margin: 8px 0 0; color: var(--muted); line-height: 1.6; }
.success-mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: var(--green); color: white; font-size: 24px; }
.initial-state { margin-top: 38px; border: 1px dashed #bdc8bf; border-radius: 26px; background: #fffdf7aa; padding: 42px 20px; }
.initial-state strong { margin-top: 6px; }
.initial-state p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.search-mark { color: var(--muted); font-size: 32px; }
footer { margin-top: 28px; color: var(--muted); text-align: center; font-size: 12px; }
footer a { color: var(--green); font-weight: 750; text-underline-offset: 3px; }

@media (max-width: 820px) {
  .site-header { margin-bottom: 34px; }
  .intro-grid { grid-template-columns: 1fr; }
  .explainer { margin-top: 0; }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 22px, 1160px); padding-top: 18px; }
  .api-link { display: none; }
  h1 { font-size: 40px; }
  .lead { font-size: 16px; }
  .search-card { padding: 18px; }
  .language-grid, .category-grid { grid-template-columns: 1fr; }
  .icon-button { margin: -2px 0; transform: rotate(90deg); }
  .primary-button { width: 100%; }
  .results-head { align-items: flex-start; flex-direction: column; }
  .result-actions { width: 100%; }
  .result-actions button { flex: 1; }
  th:last-child, td:last-child { width: 118px; }
  .pagination { align-items: flex-start; flex-direction: column; }
}
