:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #5d6575;
  --line: #dce1eb;
  --paper: #f7f8fb;
  --card: #ffffff;
  --accent: #5b35d5;
  --accent-dark: #4522b2;
  --good: #126b4c;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

a { color: var(--accent-dark); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #f0b429; outline-offset: 3px; }

.shell {
  width: min(72rem, calc(100% - 2rem));
  margin: 0 auto;
}

header { padding: 2.5rem 0 1.25rem; }
header p { color: var(--muted); max-width: 49rem; }

.eyebrow {
  color: var(--accent-dark);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1 { max-width: 48rem; margin: .4rem 0; font-size: clamp(2rem, 5vw, 3.75rem); line-height: 1.05; }
h2 { margin-top: 0; }
h3 { margin-bottom: .35rem; }

.layout {
  display: grid;
  grid-template-columns: minmax(17rem, 24rem) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.card {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 10px 30px rgba(28, 35, 52, .06);
}

label { display: block; margin-top: 1rem; font-weight: 750; }
label span { display: block; margin-top: .2rem; color: var(--muted); font-size: .86rem; font-weight: 450; }

input {
  width: 100%;
  margin-top: .4rem;
  padding: .72rem .78rem;
  border: 1px solid #aeb7c8;
  border-radius: .55rem;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.actions { display: flex; gap: .65rem; margin-top: 1.25rem; }
button { padding: .72rem 1rem; border: 0; border-radius: .55rem; font: inherit; font-weight: 800; cursor: pointer; }
button[type="submit"] { color: #fff; background: var(--accent); }
button[type="reset"] { color: var(--ink); background: #e9ecf4; }

.error { min-height: 1.5rem; color: #a0172f; font-weight: 700; }
.result-grid { display: grid; grid-template-columns: repeat(3, minmax(8rem, 1fr)); gap: .75rem; }
.metric { padding: 1rem; border-radius: .8rem; background: #f1effd; }
.metric strong { display: block; color: var(--good); font-size: clamp(1.5rem, 4vw, 2.35rem); line-height: 1.1; }
.metric span { color: var(--muted); font-size: .85rem; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 34rem; }
th, td { padding: .65rem; border-bottom: 1px solid var(--line); text-align: right; }
th:first-child, td:first-child { text-align: left; }

code { overflow-wrap: anywhere; }
.notice { margin-top: 1rem; padding: .85rem 1rem; border-left: 4px solid #f0b429; background: #fff8de; }
.support { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 1.25rem 0; }
.support ul { padding-left: 1.2rem; }
footer { padding: 1rem 0 3rem; color: var(--muted); font-size: .88rem; }
nav { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }

@media (max-width: 780px) {
  .layout, .support { grid-template-columns: minmax(0, 1fr); }
  .result-grid { grid-template-columns: 1fr; }
  header { padding-top: 1.5rem; }
}
