:root {
  --bg: #f6f7f5;
  --surface: #ffffff;
  --text: #17251e;
  --muted: #526258;
  --line: #d6ddd7;
  --accent: #176842;
  --accent-hover: #104c30;
  --danger: #a52c32;
  --focus: #176842;
  font-family: Tahoma, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.7;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .25em; }
button, input, select { font: inherit; }
button, .button { border: 0; border-radius: 6px; padding: .65rem 1.2rem; background: var(--accent); color: white; cursor: pointer; font-weight: 600; text-decoration: none; }
button:hover, .button:hover { background: var(--accent-hover); }
button:disabled { opacity: .55; cursor: wait; }
button.secondary, .button.secondary { background: #e8eee9; color: var(--text); }
button.secondary:hover, .button.secondary:hover { background: #dce5de; }
input, select { padding: .65rem .8rem; border: 1px solid #a9b7ac; border-radius: 5px; background: var(--surface); color: var(--text); width: 100%; caret-color: var(--accent); }
input::placeholder { color: #64726a; opacity: 1; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
::selection { color: white; background: var(--accent); }
html { scrollbar-color: #a9b7ac var(--bg); }
.header { display: flex; gap: 1.5rem; align-items: center; padding: 1.1rem max(1.5rem, calc((100vw - 1160px) / 2)); background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .45rem; font-weight: 800; font-size: 1.5rem; color: var(--text); text-decoration: none; }
.brand-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.product-name { color: var(--muted); }
#account { margin-inline-start: auto; display: flex; align-items: center; gap: 1rem; font-size: .85rem; }
main { max-width: 1160px; margin: 0 auto; padding: 2.5rem 1.5rem 5rem; }
h1 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.45; margin: 0 0 .6rem; text-wrap: balance; }
h2 { font-size: 1.2rem; margin: 0 0 1rem; }
h3 { margin: 0; font-size: 1.1rem; }
p { margin: .3rem 0 1rem; max-width: 75ch; }
.muted { color: var(--muted); }
.login { max-width: 440px; margin: 5vh auto; padding: 2rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
label { display: block; margin-bottom: .35rem; font-weight: 600; font-size: .9rem; }
.field { margin-top: 1.2rem; }
.login button { margin-top: 1.5rem; width: 100%; }
.error { color: var(--danger); padding-top: .6rem; }
.form-strip { display: grid; grid-template-columns: minmax(220px, 1fr) 180px auto; align-items: end; gap: 1rem; padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin: 1.8rem 0; }
.form-strip .error { grid-column: 1 / -1; }
.help { font-size: .85rem; color: var(--muted); }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: .9rem; }
th, td { padding: 1rem; text-align: start; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; background: #eef2ed; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f7faf7; }
td.keyword { white-space: normal; min-width: 180px; max-width: 340px; }
.num { font-variant-numeric: tabular-nums; }
.status { font-size: .8rem; padding: .2rem .6rem; background: #e8eee9; border-radius: 4px; display: inline-block; }
.status.negative, .status.failed { color: #92242a; background: #fbe9e8; }
.status.positive, .status.completed { color: #175739; background: #e0f0e6; }
.status.unknown, .status.partial { color: #765013; background: #fff0d4; }
.empty { padding: 3rem 1.5rem; text-align: center; }
.empty p { margin-inline: auto; }
.back { display: inline-block; margin-bottom: 1.5rem; }
.job-head { display: flex; gap: 1rem; align-items: start; justify-content: space-between; }
.summary { margin: 1.5rem 0; padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 0; }
dt { color: var(--muted); font-size: .85rem; }
dd { margin: .3rem 0 0; font-weight: 600; }
.summary-note { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1rem; font-size: .85rem; }
.result { padding: 1.5rem 0; border-top: 1px solid var(--line); }
.result-top { display: flex; gap: 1rem; align-items: start; }
.rank { width: 3rem; flex-shrink: 0; font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.result-title { flex: 1; min-width: 0; }
.source-url { display: block; font-size: .85rem; overflow-wrap: anywhere; margin-top: .4rem; }
.result-body { margin-inline-start: 4rem; margin-top: 1rem; }
.result-body p { margin-bottom: .8rem; }
blockquote { margin: .6rem 0 1rem; padding: 1rem; background: #edf2ee; border-radius: 5px; max-width: 75ch; white-space: pre-wrap; overflow-wrap: anywhere; }
.loading { padding: 2rem 0; color: var(--muted); }
#notice:empty { display: none; }
#notice { position: fixed; bottom: 1.5rem; inset-inline: 1.5rem; margin-inline: auto; width: fit-content; max-width: calc(100vw - 3rem); background: var(--text); color: white; border-radius: 6px; padding: .8rem 1.2rem; }
@media (max-width: 700px) {
  .header { padding: 1rem; gap: .8rem; flex-wrap: wrap; }
  .product-name { font-size: .8rem; }
  #account { width: 100%; justify-content: space-between; }
  main { padding: 1.5rem 1rem 4rem; }
  .login { padding: 1.5rem; }
  .form-strip { grid-template-columns: 1fr; padding: 1rem; }
  dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-body { margin-inline-start: 0; }
  .result-top { gap: .6rem; }
  .rank { width: 2rem; }
  .job-head { flex-direction: column; }
}
@media (prefers-reduced-motion: no-preference) {
  button, .button { transition: background-color 120ms ease-out; }
}
