:root {
  color-scheme: light dark;
  --accent: #2456e6;
  --line: #8884;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 17px/1.6 system-ui, sans-serif;
}
header, main, footer {
  max-width: 44rem;
  margin: 0 auto;
  padding: 16px 20px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.brand { font-weight: 700; text-decoration: none; color: inherit; }
h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); line-height: 1.15; margin: 12px 0; text-wrap: balance; }
h2 { margin-top: 2.2rem; }
h3 { margin-bottom: 0; font-size: 1rem; }
.lede { font-size: 1.1rem; }
.drop {
  display: block;
  margin: 20px 0 12px;
  padding: 36px 20px;
  border: 2px dashed var(--accent);
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
}
.drop.over { background: #2456e61a; }
.drop input { display: block; margin: 14px auto 0; max-width: 100%; }
.quality { display: flex; align-items: center; gap: 12px; }
.quality input { flex: 1; }
#results { list-style: none; padding: 0; }
#results li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
#results .error { color: #c53030; }
.button {
  padding: 6px 14px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.links { padding-left: 1.2rem; }
.links.big { font-size: 1.1rem; line-height: 2; }
/* The ad slot keeps its height whatever fills it (or nothing), so the page never shifts. */
.ad-slot { height: 250px; overflow: hidden; contain: strict; margin: 36px 0; padding: 12px; border: 1px dashed var(--line); border-radius: 12px; }
.ads-off .ad-slot { display: none; }
.ad-label { display: block; opacity: .65; font-size: .75rem; margin-bottom: 8px; }
.house-card { display: block; padding: 14px 16px; border-radius: 10px; background: #2456e612; color: inherit; text-decoration: none; }
.house-card strong { display: block; color: var(--accent); }
.house-card span { display: block; margin-top: 4px; font-size: .95rem; }
.consent { position: fixed; inset: auto 12px 12px 12px; max-width: 44rem; margin: 0 auto; padding: 14px 16px; border-radius: 12px; background: Canvas; color: CanvasText; border: 1px solid var(--line); box-shadow: 0 6px 24px #0004; z-index: 10; }
.consent div { display: flex; gap: 10px; flex-wrap: wrap; }
.consent button { flex: 1; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--accent); background: transparent; color: inherit; font: inherit; cursor: pointer; }
footer { margin-top: 40px; opacity: .7; font-size: .9rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* Lockout Trace */
.brand, header nav a { display: inline-block; min-height: 44px; padding: 10px 4px; line-height: 24px; }
.drop { margin: 20px 0 16px; }
.drop strong, .drop span { display: block; }
.drop, .brand, #status, .command { overflow-wrap: anywhere; }
.command {
  white-space: pre-wrap;
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 12px 0;
  padding: 14px 16px;
  border: 1px solid #767676;
  border-radius: 12px;
}
.verdict {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 12px 0 20px;
  padding: 4px 0 4px 16px;
  border-left: 4px solid var(--accent);
}
#status:empty { margin: 0; padding: 0; border: 0; }
#status > section:first-child h2 { margin-top: 12px; }
#status table { margin-bottom: 16px; }
.error { color: #c53030; font-weight: 600; }
.drop:has(input:disabled) { opacity: .45; cursor: default; }
table.trace { width: 100%; border-collapse: collapse; }
table.trace th, table.trace td {
  text-align: left;
  vertical-align: top;
  padding: 8px 16px 8px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
table.trace th { font-weight: 600; }
table.trace .num { font-variant-numeric: tabular-nums; }
.k { display: none; }
@media (max-width: 40rem) {
  table.trace thead { display: none; }
  table.trace tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.trace td { display: block; border: 0; padding: 2px 0; }
  .k { display: block; font-weight: 600; }
}
@media (prefers-color-scheme: dark) {
  .error { color: #ff8a8a; }
  :focus-visible { outline-color: #7194ff; }
  .drop { border-color: #7194ff; }
}
