:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17201e;
  background: #f2f4ef;
  font-synthesis: none;
  --surface: #fff;
  --ink: #17201e;
  --muted: #52605a;
  --line: #dce3da;
  --accent: #d9eea8;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 2px solid #47724b; outline-offset: 3px; }
.symbols { position: absolute; width: 0; height: 0; }
svg use { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.top { background: #141a1c; color: #fff; padding-top: env(safe-area-inset-top); }
.top-inner {
  max-width: 1024px;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: auto;
  padding: 0 24px;
}
.brand-icon, .entry-icon, .close { display: grid; place-items: center; }
.brand-icon { width: 36px; height: 36px; border-radius: 9px; background: var(--accent); color: var(--ink); }
.brand-icon svg, .entry-icon svg, .close svg { width: 22px; height: 22px; }
.brand { font-size: 20px; font-weight: 720; letter-spacing: -.025em; }
.brand strong { color: var(--accent); }
.country { margin-left: auto; font-size: 13px; color: #d0d9d4; }
main { max-width: 1024px; margin: auto; padding: 22px 24px calc(20px + env(safe-area-inset-bottom)); }
.hero {
  position: relative;
  overflow: hidden;
  min-height: 236px;
  display: flex;
  align-items: center;
  padding: 34px;
  background: #1b2823;
  color: #f3f6ef;
  border-radius: 16px;
}
.hero-copy { position: relative; z-index: 1; }
.hero-art {
  position: absolute;
  width: min(50%, 430px);
  right: 0;
  bottom: 3px;
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 92%, transparent);
}
.eyebrow { margin: 0 0 13px; color: var(--accent); font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .095em; }
.eyebrow span { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
h1 { margin: 0; font-size: clamp(2.05rem, 5.6vw, 3.6rem); line-height: 1.06; letter-spacing: -.055em; }
.intro { margin: 12px 0 0; max-width: 310px; color: #d1dad2; font-size: 16px; line-height: 1.5; }
.catalog { margin-top: 26px; }
h2 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
.search { position: relative; margin-top: 12px; }
.search svg { position: absolute; top: 15px; left: 14px; width: 22px; height: 22px; color: var(--muted); pointer-events: none; }
.search input, select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.search input { min-height: 51px; padding: 10px 15px 10px 45px; }
.search input::placeholder { color: var(--muted); }
.model-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.model-row label { color: var(--muted); font-size: 14px; }
select { width: min(100%, 245px); min-height: 44px; padding: 8px 10px; }
.filters { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.filters button {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 7px 13px;
  font-size: 14px;
}
.filters button[aria-pressed="true"] { background: var(--accent); border-color: #acc879; font-weight: 700; }
.ai-search {
  margin-top: 16px;
  border: 1px solid #acc879;
  border-radius: 11px;
  background: var(--surface);
}
.ai-search summary { padding: 13px 15px; font-weight: 720; cursor: pointer; }
.ai-search form { display: grid; gap: 8px; padding: 0 15px 13px; }
.ai-search label, .ai-hint, #ai-status, .ai-scope { font-size: 14px; color: var(--muted); }
.ai-search textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  resize: vertical;
}
.ai-hint { margin: 0; }
.ai-search button {
  justify-self: start;
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid #acc879;
  border-radius: 8px;
  background: var(--accent);
  font-weight: 700;
}
.ai-search button:disabled { opacity: .65; cursor: wait; }
#ai-status { margin: 0 15px 13px; }
#ai-status:empty { margin: 0; }
#ai-result { border-top: 1px solid var(--line); padding: 13px 15px 15px; overflow-wrap: anywhere; }
#ai-result p { margin: 0 0 10px; line-height: 1.45; }
#ai-result h3, #ai-result h4 { margin: 12px 0 5px; font-size: 15px; }
#ai-result .source-note { margin: 5px 0 0; }
.results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 24px 0 11px; }
#result-count { font-size: 13px; color: var(--muted); }
.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.entry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 13px 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  text-align: left;
}
.entry:hover { border-color: #a4b69e; }
.entry-icon { width: 42px; height: 42px; background: #edf2e6; border-radius: 8px; color: #405b43; }
.entry-icon.case { background: #f9efe0; color: #795226; }
.entry-next { width: 20px; height: 20px; color: #54655a; }
.entry-meta, .entry-title, .entry-summary { display: block; }
.entry-meta { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.entry-title { font-size: 16px; font-weight: 720; }
.entry-summary { margin-top: 4px; color: var(--muted); font-size: 14px; line-height: 1.38; }
.empty { padding: 17px; border: 1px dashed #aab9a6; border-radius: 10px; color: var(--muted); }
footer { padding-top: 22px; color: var(--muted); font-size: 12px; }
dialog {
  width: min(540px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 23px;
  color: var(--ink);
  background: var(--surface);
  overflow-wrap: anywhere;
}
dialog::backdrop { background: #131e1aaa; }
.close { position: absolute; top: 9px; right: 9px; width: 44px; height: 44px; border: 0; border-radius: 8px; background: #eff3ec; }
dialog h2 { font-size: 25px; margin: 8px 0 12px; }
dialog p { color: var(--muted); line-height: 1.55; }
dialog .entry-meta { padding-right: 44px; }
dialog h3 { margin: 20px 0 4px; font-size: 15px; }
dialog h3 + p { margin-top: 0; }
.source-link { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: 8px; background: var(--accent); color: var(--ink); font-weight: 700; text-decoration: none; }
.source-link:hover { text-decoration: underline; }
.source-link svg { width: 19px; height: 19px; flex: none; }
.source-list { display: grid; gap: 8px; list-style: none; margin: 8px 0 0; padding: 0; }
.source-note { margin: 5px 0 0; font-size: 13px; }
@media (max-width: 600px) {
  .top-inner { min-height: 58px; padding-inline: 15px; }
  main { padding: 12px 12px calc(16px + env(safe-area-inset-bottom)); }
  .hero { align-items: flex-start; min-height: 203px; padding: 21px 16px; }
  .hero-art { width: min(72%, 270px); right: -10px; bottom: -18px; opacity: .48; }
  .hero .intro { max-width: 240px; font-size: 14px; }
  .catalog { margin-top: 19px; }
  .entry { gap: 9px; padding: 11px 9px; }
  .entry-icon { width: 35px; height: 35px; }
}
