:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #10243a;
  background: #edf3f7;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(circle at 10% 0, #ffffff 0, #edf3f7 38%, #e4edf3 100%); }
button, input { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 40px 0 28px; }
.brand { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; margin-bottom: 28px; }
.brand img { border-radius: 14px; box-shadow: 0 10px 28px #123d6a24; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 5px; font-size: clamp(1.7rem, 3vw, 2.35rem); letter-spacing: -.035em; }
h2 { margin-bottom: 0; font-size: 1.25rem; letter-spacing: -.015em; }
.brand p:not(.eyebrow) { margin: 0; color: #60758a; }
.eyebrow { margin-bottom: 4px; color: #2e6f8e; font-size: .72rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.health { justify-self: end; padding: 8px 12px; border: 1px solid #bdd1df; border-radius: 999px; color: #426276; background: #f7fafc; font-size: .82rem; }
.health.ok { color: #17603c; border-color: #a8d8bf; background: #edf9f2; }
.health.bad { color: #8a2f2f; border-color: #ebbbbb; background: #fff2f2; }
.card { border: 1px solid #cfdae2; border-radius: 20px; background: #ffffffed; box-shadow: 0 18px 55px #14334c13; padding: 26px; }
.narrow { max-width: 520px; margin: 64px auto; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr); gap: 20px; align-items: start; }
.section-heading { display: flex; justify-content: space-between; gap: 20px; align-items: start; margin-bottom: 22px; }
form { display: grid; gap: 15px; }
label { display: grid; gap: 7px; color: #324e66; font-size: .86rem; font-weight: 680; }
input { width: 100%; min-height: 47px; padding: 10px 12px; border: 1px solid #b9cbd8; border-radius: 10px; outline: none; color: #10243a; background: #fbfdfe; transition: border-color .15s, box-shadow .15s; }
input:focus { border-color: #2b7198; box-shadow: 0 0 0 3px #2b719822; }
#machine-id { font: 600 .93rem ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .02em; }
.captcha-row { display: grid; grid-template-columns: 1fr 160px; gap: 10px; }
.captcha { height: 60px; padding: 0; overflow: hidden; border: 1px solid #b9cbd8; border-radius: 10px; background: #f8fafb; }
.captcha img { display: block; width: 100%; height: 100%; }
.primary, .secondary, .quiet { min-height: 42px; border-radius: 10px; padding: 9px 14px; font-weight: 720; }
.primary { border: 1px solid #123d6a; color: #fff; background: #123d6a; box-shadow: 0 8px 18px #123d6a28; }
.primary:hover:not(:disabled) { background: #0d3157; }
.primary:disabled { opacity: .45; cursor: not-allowed; }
.wide { width: 100%; margin-top: 4px; }
.secondary { border: 1px solid #2d718e; color: #205b75; background: #edf8fb; }
.quiet { min-height: 36px; border: 1px solid #c4d1da; color: #3c5a70; background: #f8fafb; }
.hint { margin: -7px 0 1px; color: #6c8092; font-size: .8rem; }
.hint.bad { color: #a23a3a; }
.result { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; margin-top: 24px; padding: 19px; border: 1px solid #a9cfcb; border-radius: 15px; background: linear-gradient(135deg, #f0fbf8, #f7fbfd); }
.result span { display: block; margin-bottom: 5px; color: #4a6a70; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.result strong { display: block; font: 700 clamp(1.05rem, 2.2vw, 1.35rem) ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .055em; color: #164d4a; }
.result dl { grid-column: 1 / -1; display: grid; grid-template-columns: 1.4fr 1fr .9fr; gap: 12px; margin: 0; padding-top: 14px; border-top: 1px solid #c6ddd9; }
.result dl div { min-width: 0; }
.result dt { margin-bottom: 3px; color: #6a7d86; font-size: .72rem; }
.result dd { margin: 0; overflow-wrap: anywhere; font-size: .82rem; font-weight: 650; }
.table-wrap { overflow: auto; max-height: 530px; }
table { width: 100%; border-collapse: collapse; font-size: .8rem; }
th { position: sticky; top: 0; z-index: 1; color: #587082; background: #fff; text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
th, td { padding: 11px 8px; border-bottom: 1px solid #e3eaf0; white-space: nowrap; }
td:nth-child(2), td:nth-child(3) { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.status { min-height: 24px; margin: 17px 0 0; color: #526b7d; text-align: center; }
.status.error { color: #a22d2d; }
.status.success { color: #17603c; }
footer { margin-top: 40px; color: #708392; text-align: center; font-size: .76rem; }
.hidden { display: none !important; }

@media (max-width: 920px) {
  .workspace { grid-template-columns: 1fr; }
  .history-card { order: 2; }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 20px, 1180px); padding-top: 20px; }
  .brand { grid-template-columns: auto 1fr; gap: 12px; }
  .brand .health { grid-column: 1 / -1; justify-self: stretch; text-align: center; }
  .brand p:not(.eyebrow) { font-size: .85rem; }
  .card { padding: 19px; border-radius: 16px; }
  .narrow { margin: 32px auto; }
  .captcha-row { grid-template-columns: 1fr 132px; }
  .result { grid-template-columns: 1fr; }
  .result dl { grid-template-columns: 1fr; }
}
