@font-face {
  font-family: "IBM Plex Sans";
  src: url("./ibm-plex-sans.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --accent: #e93356;
  --accent-text: #a9203b;
  --accent-soft: #fdecef;
  --background: #f6f7f9;
  --surface: #fff;
  --text: #202124;
  --muted: #59616d;
  --border: #dfe3ea;
  --radius: 12px;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  color: var(--text);
  background: var(--background);
}

* { box-sizing: border-box; }
body { display: flex; flex-direction: column; min-height: 100vh; margin: 0; }
a { color: var(--accent-text); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.65rem, 4.5vw, 2rem); font-weight: 600; letter-spacing: -.015em; }
h2 { font-size: 1.12rem; font-weight: 600; }
img { display: block; max-width: 100%; height: auto; }

.simulation-banner {
  position: sticky;
  z-index: 2;
  top: 0;
  padding: .6rem 1rem;
  background: #fff0cf;
  color: #573713;
  text-align: center;
  font-weight: 600;
  font-size: .875rem;
}

.site-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .4rem .8rem;
  padding: .6rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.brand { display: inline-flex; gap: .75rem; align-items: center; color: var(--text); text-decoration: none; font-size: 1.125rem; font-weight: 600; }
.brand img { width: clamp(95px, 30vw, 175px); }
.brand span { padding-left: .75rem; border-left: 1px solid var(--border); }
.primary-nav { display: flex; flex-wrap: wrap; width: 100%; order: 1; gap: .15rem; }
.primary-nav a, .lab-link { display: inline-flex; align-items: center; min-height: 44px; padding: .45rem .55rem; border-radius: 8px; font-size: .875rem; text-decoration: none; }
.primary-nav a { color: var(--muted); }
.primary-nav a:hover, .primary-nav a[aria-current] { color: var(--accent-text); background: var(--accent-soft); }
.primary-nav a[aria-current] { font-weight: 600; }
.site-footer { display: grid; place-items: center; padding: 1.5rem 1rem 2rem; }
.site-footer img { width: 200px; }

.content { flex: 1; width: min(100%, 75rem); margin-inline: auto; padding: 1.8rem 1rem; }
.content > h1 { margin-bottom: 1.15rem; }
.back-link { display: inline-block; margin-bottom: .75rem; }
.card { padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.empty-state { padding: clamp(2rem, 10vw, 4rem) 1rem; color: var(--muted); text-align: center; }

.login-page { flex: 1; display: grid; place-items: center; padding: 2rem 1rem; }
.login-card { width: min(100%, 25rem); padding: clamp(1.5rem, 8vw, 2.5rem); }
.login-card h1 { margin: 1rem 0 1.75rem; text-align: center; }
.login-logo { width: 220px; margin: 0 auto; }
.login-card .button { width: 100%; }
.muted { color: var(--muted); font-size: .875rem; }
.login-card .muted { margin-top: 1rem; }

.form-stack { display: grid; gap: 1rem; }
.form-stack label { display: grid; gap: .35rem; color: var(--muted); font-size: .875rem; font-weight: 500; }
input, select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: .45rem .65rem;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .65rem 1rem;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #17070c;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

button:hover:not(:disabled), .button:hover { background: #f14d6c; }
button:disabled { background: var(--accent-soft); color: var(--accent-text); cursor: default; }
.button-secondary { background: var(--surface); color: var(--accent-text); border: 1px solid var(--border); }
.button-secondary:hover:not(:disabled), .button-secondary:hover { background: var(--accent-soft); }

.lab { max-width: 56rem; }
.lab-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
.lab-grid > div { display: grid; gap: 1rem; }
.lab .card h2 { margin-bottom: .85rem; }
.lab-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .85rem; align-items: center; }
.lab-links { margin: .65rem 0 0; padding-inline-start: 1.2rem; }
.lab-links li { padding: .2rem 0; }
.notice { margin-bottom: 1rem; padding: .8rem 1rem; background: #fff0cf; color: #573713; border-radius: 8px; }

@media (min-width: 48rem) {
  .site-header { min-height: 72px; padding: .6rem 2rem; gap: 1rem; justify-content: flex-start; }
  .primary-nav { width: auto; order: 0; gap: .25rem; margin-left: clamp(.5rem, 2vw, 2rem); }
  .primary-nav a { padding-inline: .85rem; font-size: .9375rem; }
  .lab-link { margin-left: auto; }
  .content { padding: 2.5rem 2rem; }
  .lab-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 23rem) {
  .site-header { column-gap: .4rem; }
  .brand { gap: .5rem; }
  .brand span { padding-left: .5rem; }
  .primary-nav { justify-content: space-between; }
  .primary-nav a, .lab-link { padding-inline: .3rem; font-size: .8125rem; }
}
