:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --ink: #17202a;
  --muted: #5d6875;
  --line: #d9e0e8;
  --panel: #ffffff;
  --panel-soft: #f0f5f7;
  --accent: #0f766e;
  --accent-ink: #064e49;
  --error: #b42318;
  --error-soft: #fff1f0;
  --match: #0f7a4c;
  --mismatch: #b42318;
  --placeholder: #7a8490;
  --ok-soft: #eaf7f3;
  --code: #122034;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

.app-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.topbar > div {
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
}

.intro {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.intro a {
  color: var(--accent);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

h2 {
  font-size: 1rem;
  line-height: 1.2;
}

.runtime-status {
  margin: 58px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  white-space: nowrap;
}

.input-band {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr) 180px;
  gap: 14px;
  align-items: end;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  letter-spacing: 0;
}

input {
  padding: 9px 11px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

select {
  padding: 9px 10px;
}

input:focus,
select:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(15, 118, 110, 0.18);
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.result-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.result-panel {
  min-width: 0;
  overflow: hidden;
}

.panel-heading,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
}

.status-pill {
  min-width: 74px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2f6;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.result-panel[data-state="ok"] .status-pill {
  background: var(--ok-soft);
  color: var(--accent-ink);
}

.result-panel[data-state="error"] .status-pill {
  background: var(--error-soft);
  color: var(--error);
}

.error-line {
  min-height: 20px;
  margin: 0;
  padding: 10px 16px 0;
  color: var(--error);
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.component-table {
  display: grid;
  margin: 0;
  padding: 8px 0 12px;
}

.component-table div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  min-height: 34px;
  padding: 7px 16px;
  border-bottom: 1px solid rgba(217, 224, 232, 0.72);
}

.component-table div:last-child {
  border-bottom: 0;
}

dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

dd {
  margin: 0;
  min-width: 0;
  color: var(--code);
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

dd[data-value-state="match"],
dd[data-value-state="value"] {
  color: var(--match);
}

dd[data-value-state="mismatch"] {
  color: var(--mismatch);
}

dd[data-value-state="empty"],
dd[data-value-state="unsupported"] {
  color: var(--placeholder);
}

.java-comparison-grid {
  margin-top: 18px;
}

@media (max-width: 920px) {
  .topbar {
    display: grid;
    align-items: start;
  }

  .runtime-status {
    margin: 0;
    white-space: normal;
  }

  .input-band,
  .comparison-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 20px, 1280px);
    padding-top: 18px;
  }

  .input-band {
    padding: 12px;
  }

  .component-table div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}
