:root {
  color-scheme: light;
  --bg: #f4f2ed;
  --panel: #ffffff;
  --ink: #1d2528;
  --muted: #627071;
  --line: #d9ded9;
  --accent: #23635f;
  --accent-dark: #174743;
  --warn: #9f3f35;
  --soft: #e9f0ec;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(35, 99, 95, 0.08), transparent 340px),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  width: min(1080px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 40px 0;
}

.lookup-panel,
.result-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(29, 37, 40, 0.08);
}

.lookup-panel {
  padding: 28px;
}

.result-panel {
  min-height: 420px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
}

.brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.eyebrow,
.status-label {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
}

h1 {
  margin: 2px 0 0;
  font-size: 3.2rem;
  line-height: 0.95;
}

.lookup-form {
  display: grid;
  gap: 12px;
}

label {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input,
button {
  min-height: 48px;
  border-radius: 8px;
  font: inherit;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  padding: 0 14px;
  color: var(--ink);
  background: #fbfcfb;
  text-transform: uppercase;
}

input:focus {
  outline: 3px solid rgba(35, 99, 95, 0.18);
  border-color: var(--accent);
}

button {
  border: 0;
  padding: 0 18px;
  background: var(--accent);
  color: #fff;
  font-weight: 760;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.hint,
.empty-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.empty-state {
  display: grid;
  gap: 8px;
  text-align: center;
}

.student-name {
  margin: 0 0 6px;
  font-size: 2.2rem;
  line-height: 1.08;
}

.student-id {
  margin: 0 0 24px;
  color: var(--muted);
  font-weight: 700;
}

.grade-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfcfb;
}

.metric.primary {
  background: var(--soft);
  border-color: rgba(35, 99, 95, 0.28);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 740;
}

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 2rem;
  line-height: 1;
}

.error {
  color: var(--warn);
  font-weight: 760;
  text-align: center;
}

.confirm-box {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.confirm-message {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.confirm-message.success {
  color: var(--accent-dark);
  font-weight: 740;
}

@media (max-width: 760px) {
  .shell {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 24px 0;
  }

  .result-panel {
    min-height: 260px;
  }

  .input-row,
  .grade-grid {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }

  .confirm-box {
    align-items: stretch;
    flex-direction: column;
  }

  h1 {
    font-size: 2.3rem;
  }

  .student-name {
    font-size: 1.6rem;
  }
}
