:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f4f6f9;
  --navy: #14243d;
  --navy-soft: #213859;
  --blue: #1f63d5;
  --green: #18794e;
  --green-soft: #e8f5ee;
  --amber: #966400;
  --amber-soft: #fff5d6;
  --border: #d8dee8;
  --muted: #5c667a;
  --surface: #ffffff;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #f4f6f9; }
a { color: inherit; }
button, input, select { font: inherit; }

.skip-link {
  position: fixed;
  z-index: 10;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: #fff;
  background: var(--blue);
  border-radius: 8px;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(220px, 268px) 1fr; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 18px;
  color: #fff;
  background: var(--navy);
}
.brand { padding: 10px 12px; font-weight: 800; letter-spacing: .08em; text-decoration: none; }
.nav-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.nav-list a {
  display: flex;
  min-height: 44px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
}
.nav-list a:hover, .nav-list a[aria-current="page"] { background: var(--navy-soft); }
.account-panel { margin-top: auto; display: grid; gap: 10px; padding: 12px; border-top: 1px solid #46607f; }
.role-preview-form { display: grid; gap: 8px; padding: 12px; border-top: 1px solid #46607f; }
.role-preview-form label { color: #dbe6f4; font-size: .88rem; }
.role-preview-form select { min-height: 44px; width: 100%; padding: 8px; border: 1px solid #7990ad; border-radius: 8px; color: #172033; background: #fff; }
.account-name { overflow-wrap: anywhere; color: #dbe6f4; }
.quiet-button {
  min-height: 44px;
  width: 100%;
  color: #fff;
  background: transparent;
  border: 1px solid #7990ad;
  border-radius: 8px;
  cursor: pointer;
}

.main-content { min-width: 0; width: 100%; max-width: 1440px; padding: clamp(20px, 4vw, 48px); }
.role-preview-banner { margin: 0 0 18px; padding: 10px 14px; color: #694700; background: var(--amber-soft); border: 1px solid #e8c45f; border-radius: 8px; font-weight: 700; }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.page-header h1, .forbidden-card h1 { margin: 4px 0 0; font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1.1; }
.eyebrow { margin: 0; color: var(--muted); font-size: .78rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.acceptance-card, .placeholder-card, .forbidden-card, .problem-placeholder {
  margin-bottom: 32px;
  padding: clamp(20px, 3vw, 30px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.acceptance-card { border-left: 5px solid var(--green); }
.acceptance-card h2 { margin: 12px 0 6px; font-size: 1.55rem; }
.acceptance-card p { margin: 0; color: var(--muted); }
.problem-placeholder { border-left: 5px solid var(--amber); }
.problem-placeholder h2 { margin-top: 0; }
.problem-placeholder p { color: var(--muted); }
.problem-placeholder button { min-height: 44px; padding: 8px 14px; border: 1px solid #9aa7b8; border-radius: 8px; color: #4c566a; background: #eef1f5; cursor: not-allowed; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.status-badge, .empty-state { display: inline-flex; width: fit-content; padding: 5px 9px; border-radius: 999px; font-weight: 700; font-size: .82rem; }
.status-confirmed { color: var(--green); background: var(--green-soft); }
.section-heading { display: flex; gap: 24px; justify-content: space-between; align-items: end; margin-bottom: 16px; }
.section-heading h2 { margin: 4px 0 0; }
.section-note { max-width: 570px; margin: 0; color: var(--muted); }
.stage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.stage-card { padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.stage-card h3 { margin: 0 0 16px; font-size: 1.05rem; }
.stage-card p:last-child { margin-bottom: 0; color: var(--muted); line-height: 1.55; }
.empty-state { margin: 0 0 10px; color: var(--amber); background: var(--amber-soft); }
.primary-link { display: inline-flex; min-height: 44px; align-items: center; margin-top: 10px; color: #fff; background: var(--blue); padding: 8px 14px; border-radius: 8px; text-decoration: none; }

:focus-visible { outline: 3px solid #77a9ff; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: static; height: auto; padding: 14px; gap: 12px; }
  .nav-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-panel { margin-top: 0; grid-template-columns: 1fr auto; align-items: center; }
  .quiet-button { width: auto; padding-inline: 16px; }
  .main-content { padding: 20px 14px 36px; }
  .section-heading { display: grid; }
  .stage-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) { .nav-list { grid-template-columns: 1fr; } }

.auth-content { width: min(100% - 32px, 440px); margin: 10vh auto; padding: 24px; background: #fff; border: 1px solid var(--border); border-radius: 12px; }
.auth-content form { display: grid; gap: 16px; }
.auth-content label { display: grid; gap: 6px; }
.auth-content input:not([type="hidden"]) { min-height: 44px; border: 1px solid #9aa7b8; border-radius: 7px; padding: 8px 10px; }
.auth-content button { min-height: 44px; color: #fff; background: var(--blue); border: 0; border-radius: 8px; cursor: pointer; }
