* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
header, main, footer { margin-inline: auto; }
header { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); }
.brand { min-height: 44px; line-height: 1.2; text-decoration: none; }
header nav a { display: inline-flex; min-height: 44px; align-items: center; }
main p, main li, main a, main code { overflow-wrap: anywhere; }
.paste textarea { height: 9rem; }
.tool[data-state="ready"] #read, .tool[data-state="ready"] .kbd-hint { display: none; }
.tool[data-state="ready"] .intake { display: flex; align-items: center; gap: var(--s2); }
.tool[data-state="ready"] .intake-pick { flex: 1 1 auto; }
.tool[data-state="ready"] .intake-copy { flex-basis: 12rem; }
.tool[data-state="ready"] .actions { flex: none; }
.tool[data-state="ready"] .intake.over { border-color: var(--accent); }
.classes { max-height: min(72vh, 46rem); overflow: auto; }
#class-list { gap: var(--s2); }
.line .t { text-align: start; }
.ad-slot { height: 250px; overflow: hidden; contain: strict; margin-block: var(--s6); padding: var(--s3); border-radius: var(--r-md); }
.ad-label { display: block; margin-bottom: var(--s2); }
.house-card { display: block; padding: var(--s3) var(--s4); border-radius: var(--r-md); text-decoration: none; }
.house-card strong, .house-card span { display: block; }

/* Selection bar: the summary has the first row to itself; the controls share the second. */
.selection-bar { align-items: center; }
.selection-bar .summary { flex: 1 1 100%; }
.selection-bar .position { text-align: left; }
.selection-bar #copy { margin-left: auto; }
.selection-bar .nav { align-items: center; }
.selection-bar .nav button { display: inline-flex; align-items: center; gap: var(--s2); min-height: 48px; }
/* The UI font sets its labels high in the line box; lift the icons to meet them. */
.selection-bar button svg { position: relative; top: -1px; }

/* Class names wrap at their dots, never inside a word (unless one part is wider than the column). */
.class-btn .class-name, .summary code { overflow-wrap: normal; word-break: normal; }
.class-name .long, .summary code .long { overflow-wrap: anywhere; }

/* The sample in the empty paste field must not pass for a pasted log. */
#input::placeholder { color: var(--muted); opacity: 1; font-style: italic; }

@media (max-width: 52rem) {
  .intake-pick .intake-copy { flex-basis: 0; }
  .tool[data-state="ready"] .intake { flex-wrap: wrap; }
  .tool[data-state="ready"] .actions { flex: 1 1 auto; }
  .selection-bar .nav { flex-wrap: wrap; }
}
