:root {
  font:
    16px/1.65 system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: #1c2c41;
  background: #f1f4f8;
  --blue: #234d86;
  --amber: #845000;
  --muted: #506176;
  --line: #7b8da4;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
main {
  max-width: 1120px;
  padding: 50px 24px;
  margin: auto;
}
header {
  max-width: 850px;
  margin-bottom: 32px;
}
.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--blue);
}
h1 {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  line-height: 1.09;
  letter-spacing: -0.04em;
  text-wrap: balance;
  margin: 20px 0;
}
.intro {
  font-size: 1.16rem;
  color: var(--muted);
}
h2 {
  font-size: 1.4rem;
  margin-top: 0;
}
section {
  background: #fff;
  border: 1px solid #d2dbe6;
  border-radius: 10px;
  padding: 26px;
  margin: 24px 0;
}
.notice {
  background: #fff2dd;
  color: #593900;
  border-left: 4px solid #946000;
  padding: 14px;
}
.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 22px;
}
.fields > div:last-child {
  grid-column: 1/-1;
}
label {
  display: block;
  font-weight: 600;
  margin: 13px 0 7px;
}
input,
select,
button,
#download {
  font: inherit;
  min-height: 44px;
  padding: 10px 13px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
  color: #1c2c41;
}
input {
  display: block;
  width: 100%;
}
small {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 5px;
}
button,
select,
#download {
  cursor: pointer;
}
button:hover:not(:disabled) {
  background: #e9eef6;
}
.primary,
#download {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
.primary:hover:not(:disabled),
#download:hover {
  background: #19385f;
}
button:disabled {
  background: #edf1f6;
  color: #66778b;
  cursor: default;
}
:focus-visible {
  outline: 3px solid #a36300;
  outline-offset: 3px;
}
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0;
}
#compare {
  display: block;
  margin-top: 20px;
}
textarea {
  width: 100%;
  font:
    14px/1.6 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 12px;
  resize: vertical;
}
summary {
  cursor: pointer;
  min-height: 44px;
  padding: 10px 0;
  font-weight: 600;
}
#mode,
#source {
  font-size: 0.9rem;
  color: var(--muted);
}
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 22px 0;
}
.card {
  border: 1px solid #b9c7da;
  border-top: 4px solid var(--blue);
  padding: 20px;
  border-radius: 7px;
}
.card:nth-child(2) {
  border-color: #d1bc99;
  border-top-color: var(--amber);
}
.card h3 {
  font-size: 1.08rem;
  margin-top: 0;
}
.prediction {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 15px 0;
}
.card p {
  margin: 10px 0;
  font-size: 0.9rem;
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  min-width: 540px;
  width: 100%;
  font-size: 0.91rem;
}
caption {
  text-align: left;
  color: var(--muted);
  margin: 8px 0 12px;
}
th,
td {
  text-align: left;
  border-bottom: 1px solid #d2dbe6;
  padding: 12px 8px;
}
pre {
  font:
    13px/1.6 ui-monospace,
    monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f1f4f8;
  max-height: 440px;
  overflow: auto;
  padding: 14px;
}
a {
  color: var(--blue);
  text-underline-offset: 3px;
}
#download {
  display: inline-block;
  margin: 14px 0;
}
.study {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 22px 0;
}
footer {
  font-size: 0.86rem;
  color: var(--muted);
  margin: 30px 0;
}
.error {
  color: #9c2020;
}
p {
  overflow-wrap: anywhere;
}
[hidden] {
  display: none !important;
}
@media (max-width: 650px) {
  main {
    padding: 25px 12px;
  }
  section {
    padding: 20px 16px;
  }
  .fields,
  .cards {
    grid-template-columns: 1fr;
  }
  .fields > div:last-child {
    grid-column: auto;
  }
  .actions > * {
    flex: 1 1 auto;
  }
  h1 {
    font-size: 3rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
