:root {
  color-scheme: light;
  --ink: #162537;
  --muted: #4a5e70;
  --line: #dce4e9;
  --surface: #fff;
  --accent: #146153;
  font-family: "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: #f2f6f8; color: var(--ink); }
header { background: #162537; color: #fff; }
.masthead { max-width: 1180px; margin: auto; padding: 16px 28px; display: flex; gap: 18px; align-items: center; }
.brand { font-size: 24px; font-weight: 800; letter-spacing: .1em; padding-right: 18px; border-right: 1px solid #607487; }
main { max-width: 1180px; margin: auto; padding: 32px 28px 56px; }
h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.1; letter-spacing: -.04em; margin: 0 0 12px; }
.intro { margin: 0 0 25px; color: var(--muted); line-height: 1.55; }
form, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
form { padding: 18px; }
.controls { display: flex; align-items: end; flex-wrap: wrap; gap: 14px; }
.mode { margin-left: auto; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 650; }
input, button, select { border-radius: 8px; padding: 10px 12px; min-height: 43px; font: inherit; }
input, select { color: var(--ink); border: 1px solid #acb9c4; background: white; min-width: 0; }
button { color: white; border: 1px solid var(--accent); background: var(--accent); cursor: pointer; font-weight: 650; }
button:hover { background: #104d42; }
button:disabled { opacity: .6; cursor: wait; }
:focus-visible { outline: 3px solid #227db3; outline-offset: 2px; }
details { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 13px; }
summary { cursor: pointer; font-weight: 650; }
.settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.checkbox { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.checkbox input { min-height: 0; }
.hint, #status { color: var(--muted); font-size: 14px; }
.hint { margin-bottom: 0; }
#status { margin: 15px 0; min-height: 20px; }
.results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.panel { min-width: 0; }
.panel-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 5px 14px; padding: 17px 20px 12px; border-bottom: 1px solid var(--line); }
h2 { margin: 0; font-size: 18px; }
.panel-heading span, .meta, .empty { font-size: 13px; color: var(--muted); }
.panel-content { padding: 15px 20px 20px; overflow-wrap: anywhere; }
.panel-content p { line-height: 1.55; }
.panel-content h3 { margin: 5px 0 10px; font-size: 25px; letter-spacing: -.025em; line-height: 1.2; }
.panel-content > :first-child { margin-top: 0; }
.panel-content > :last-child { margin-bottom: 0; }
.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.photos a { display: block; background: #fafcfc; border: 1px solid var(--line); border-radius: 8px; }
.photos a:first-child { grid-column: 1 / -1; }
.photos img { display: block; width: 100%; height: 82px; object-fit: contain; }
.photos a:first-child img { height: 225px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
th, td { padding: 9px 8px; border-bottom: 1px solid var(--line); }
th { background: #f1f7f5; color: #194f45; }
.error { color: #943323; }
.field-viewer {
  max-height: 27rem;
  overflow: auto;
  margin-top: 10px;
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.field-list { list-style: none; margin: 0; padding: 3px 8px; }
.field-list .field-list { border-left: 1px solid var(--line); margin-left: 4px; padding-right: 0; }
.field-row { display: flex; flex-wrap: wrap; gap: 2px 10px; padding: 5px 0; font-size: 13px; }
.field-name { color: #194f45; font-weight: 650; }
.field-value { white-space: pre-wrap; }
.attribute { padding: 2px 0 2px 12px; color: var(--muted); }
@media (max-width: 700px) {
  main { padding: 26px 16px; }
  .masthead { padding-inline: 16px; }
  .mode { margin-left: 0; }
  .results { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .controls > label, .controls > button { flex: 1 1 160px; }
}
