:root {
  color-scheme: light dark;
  --accent: #2456e6;
  --accent-text: #1f4bd1;
  --line: #8884;
}
@media (prefers-color-scheme: dark) { :root { --accent-text: #9bb4ff; } }
* { 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: center;
  gap: 16px;
}
.brand, header nav a { display: inline-block; min-width: 44px; min-height: 44px; line-height: 44px; }
.brand { font-weight: 700; text-decoration: none; color: inherit; }
a { color: var(--accent-text); }
/* Long URLs and code never push the page sideways on a narrow phone. */
main p, main li, main td, main a, main code { overflow-wrap: anywhere; }
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; }
[hidden] { display: none !important; }
.lede { margin-bottom: 20px; }
.sides { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 44rem) { .sides { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.side { min-width: 0; outline: 2px dashed transparent; outline-offset: 4px; border-radius: 8px; }
.side.over { outline-color: var(--accent); }
.side > label { display: block; font-weight: 600; }
.side .hint, .side .note { margin: 6px 0; overflow-wrap: anywhere; }
.side .note:empty { display: none; }
.side textarea { display: block; width: 100%; margin-top: 6px; padding: 12px; border: 1px solid #767676; border-radius: 6px; font: 16px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: transparent; color: inherit; resize: vertical; white-space: pre; overflow-wrap: normal; overflow-x: auto; }
@media (min-width: 44rem) { .side textarea { font-size: 14px; } }
.side .pick { display: block; margin-top: 12px; }
.side input[type="file"] { display: block; max-width: 100%; min-height: 44px; margin-top: 6px; font: inherit; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
button { min-height: 44px; min-width: 44px; padding: 8px 18px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
button.secondary { background: transparent; border-color: #767676; color: inherit; }
#compare:disabled { background: transparent; border: 1px dashed #767676; color: inherit; cursor: default; }
#messages { margin-top: 16px; }
#status { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
#status:empty, #warnings:empty { display: none; }
#status.error { color: #c53030; }
@media (prefers-color-scheme: dark) { #status.error { color: #ff8a8a; } :focus-visible { outline-color: #9bb4ff; } }
#warnings li { overflow-wrap: anywhere; }
#result-block { margin-top: 24px; }
.result-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.result-head h2 { margin: 0; }
#copy-status { min-height: 1.6em; margin: 6px 0; }
#result { margin: 0; padding: 16px; border: 1px solid #767676; border-radius: 8px; font: 15px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
/* The ad slot keeps its height whatever fills it, so the page never shifts. It is only rendered
   when the build has something to put in it (src/pages.mjs). */
.ad-slot { height: 250px; overflow: hidden; contain: strict; margin: 36px 0; padding: 12px; 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-text); }
.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; min-height: 44px; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--accent); background: transparent; color: inherit; font: inherit; cursor: pointer; }
footer { margin-top: 40px; color: color-mix(in srgb, CanvasText 72%, Canvas); font-size: .9rem; }
footer a { display: inline-block; min-height: 24px; margin-left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
