:root {
  color-scheme: light;
  --blue: #1e73be;
  --navy: #15558a;
  --ink: #243d52;
  --muted: #536a7d;
  --canvas: #f5f8fc;
  --line: #dce5ed;
  --white: #fff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 1rem/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }

.site-header, main, .site-footer {
  width: min(880px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  min-height: 106px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand img { display: block; width: 186px; height: auto; }
.brand-divider { color: #8ea4b6; font-size: 1.35rem; font-weight: 300; }
.brand-product { color: var(--blue); font-size: .875rem; font-weight: 750; letter-spacing: .08em; }
.header-note, .intro, .source, .ascii-domain, .result-note, .site-footer { color: var(--muted); }
.header-note { font-size: .875rem; }

main { padding-block: 40px 0; }

h1, h2, p { margin: 0; }
h1, h2 { line-height: 1.2; }
h1 { font-size: clamp(1.9rem, 5vw, 2.35rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.25rem, 4vw, 1.65rem); overflow-wrap: anywhere; }
.intro { margin-top: 10px; }

.card {
  padding: 24px 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.search-card { margin-top: 25px; border-top: 3px solid var(--blue); }
label { display: block; margin-bottom: 8px; font-size: .875rem; font-weight: 650; }
.form-row { display: flex; align-items: stretch; gap: 12px; }

input, button { font: inherit; }

input {
  min-width: 0;
  flex: 1;
  padding: 11px 13px;
  color: var(--ink);
  background: #fbfcfe;
  border: 1px solid #a7bacb;
  border-radius: 8px;
}

input::placeholder { color: #5f7487; }

button {
  padding: 11px 19px;
  color: var(--white);
  background: var(--blue);
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 650;
  cursor: pointer;
}

button:hover { background: var(--navy); }

.error {
  margin-top: 18px;
  padding: 13px 16px;
  color: #8c352c;
  background: #fff3f1;
  border: 1px solid #efcdc8;
  border-radius: 8px;
}

.result-card { margin-top: 20px; }
.result-heading { padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.ascii-domain, .source, .result-note { margin-top: 6px; font-size: .875rem; overflow-wrap: anywhere; }
.ascii-domain, pre { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
.result-note { margin-top: 15px; }

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 26px;
  margin: 18px 0 0;
}

dt { color: var(--muted); font-size: .8125rem; }
dd { margin: 4px 0 0; font-weight: 550; overflow-wrap: anywhere; }

.raw { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
summary { width: fit-content; color: var(--navy); font-weight: 650; cursor: pointer; }

pre {
  max-height: 28rem;
  overflow: auto;
  margin: 14px 0 0;
  padding: 13px 15px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: .8125rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.site-footer {
  margin-top: 36px;
  padding: 17px 0 24px;
  border-top: 2px solid var(--blue);
  font-size: .8125rem;
}

@media (max-width: 600px) {
  .site-header, main, .site-footer { width: calc(100% - 36px); }
  .site-header { min-height: 82px; }
  .brand { gap: 11px; }
  .brand img { width: 152px; }
  .header-note { display: none; }
  main { padding-top: 27px; }
  .card { padding: 18px; }
  .form-row { flex-direction: column; }
  .result-grid { grid-template-columns: minmax(0, 1fr); gap: 13px; }
}
