:root {
  --navy: #243b6b;
  --ink: #20314f;
  --muted: #52617e;
  --background: #f2f5fb;
  --panel: #fff;
  --field-border: #63718b;
  --line: #d8e2f2;
  --selection: #3c5d8f;
  --highlight: #e8effb;
  --danger: #922d3d;
  --focus: #164a9e;
  font: 100%/1.5 system-ui, sans-serif;
  color: var(--ink);
  background: var(--background);
}

* { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 0; }
h1 { font-size: clamp(1.55rem, 3vw, 2rem); }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p, dl { margin: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sidebar :focus-visible { outline-color: white; }
.skip {
  position: fixed;
  z-index: 2;
  top: .5rem;
  left: .5rem;
  transform: translateY(-200%);
  padding: .5rem 1rem;
  background: white;
  color: var(--navy);
}
.skip:focus { transform: none; }
.spoken {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.shell { min-height: 100vh; }
.sidebar { background: var(--navy); color: white; padding: 1rem; }
.brand { font-size: 1.2rem; font-weight: 750; display: block; }
.sidebar nav { display: flex; gap: .5rem; margin-top: .7rem; }
.nav {
  min-height: 44px;
  padding: .5rem .85rem;
  border: 0;
  border-radius: .55rem;
  background: transparent;
  color: white;
  text-align: left;
}
.nav[aria-current="page"] {
  font-weight: 700;
  box-shadow: inset 0 -3px white;
  background: var(--selection);
}
.page > header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  padding: 1.1rem clamp(1rem, 4vw, 2.1rem);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.page main { padding: clamp(1rem, 4vw, 2.1rem); }
.entry { max-width: 42rem; margin: 0 auto; }
.entry .brand { color: var(--navy); margin-bottom: .6rem; }
.workspace { display: grid; gap: 1rem; max-width: 85rem; margin: 0 auto; }
.stack, .form { display: grid; gap: .85rem; min-width: 0; }
.card {
  padding: clamp(.95rem, 3vw, 1.45rem);
  display: grid;
  gap: .7rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: .9rem;
  overflow-wrap: anywhere;
}
.summary { background: var(--navy); color: white; border-color: var(--navy); }
.summary h2 { color: white; }
.summary dl, .review dl { display: grid; gap: .35rem; }
.summary dl div, .review dl div { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: space-between; }
.summary dt, .review dt { font-weight: 650; }
dd { margin: 0; font-variant-numeric: tabular-nums; }
.aside { align-content: start; }
.aside p { background: var(--highlight); border-radius: .55rem; padding: .9rem; }
.hint, .meta { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.action {
  min-height: 44px;
  border: 1px solid var(--field-border);
  border-radius: .6rem;
  background: white;
  color: var(--navy);
  font-weight: 680;
  padding: .55rem .85rem;
}
.action.primary { background: var(--navy); color: white; border-color: var(--navy); }
.action:disabled { cursor: wait; }
.form label { display: block; font-weight: 650; margin-bottom: .25rem; }
.form input, .form select {
  width: 100%;
  min-height: 44px;
  padding: .55rem .7rem;
  border: 1px solid var(--field-border);
  border-radius: .55rem;
  background: white;
  color: var(--ink);
}
.form input { min-width: 0; }
.form [aria-invalid="true"] { border: 2px solid var(--danger); }
#error:not(:empty) { color: var(--danger); font-weight: 650; }
#error:not(:empty), #notice:not(:empty) { margin-bottom: .75rem; }

@media (min-width: 800px) {
  .shell.has-nav { display: grid; grid-template-columns: 14rem minmax(0,1fr); }
  .sidebar { padding: 1.6rem .85rem; }
  .sidebar .brand { margin-inline: .6rem; }
  .sidebar nav { flex-direction: column; margin-top: 1.7rem; }
  .nav[aria-current="page"] { box-shadow: inset 3px 0 white; }
}
@media (min-width: 1050px) {
  .workspace { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
}
