:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-2: #edf3f4;
  --text: #172226;
  --muted: #617179;
  --border: #d8e2e4;
  --accent: #087c7f;
  --accent-2: #0c5f66;
  --ok: #167044;
  --warn: #a66300;
  --bad: #b42318;
  --shadow: 0 10px 24px rgba(23, 42, 49, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  min-height: 38px;
  border-radius: 7px;
  border: 1px solid var(--border);
  font: inherit;
  font-size: 14px;
}

button { cursor: pointer; }
button:disabled { cursor: wait; opacity: 0.64; }

.shell {
  min-height: 100vh;
  padding: 22px;
}

.workspace {
  width: min(1180px, 100%);
  margin: 0 auto;
}

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

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

h1,
h2,
h3,
p { margin-top: 0; }

h1 {
  margin-bottom: 6px;
  font-size: 30px;
  line-height: 36px;
  font-weight: 780;
}

h2 {
  margin-bottom: 0;
  font-size: 16px;
  line-height: 22px;
  font-weight: 760;
}

h3 {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 780;
}

.subtitle {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 21px;
}

.status-card {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.status-card.ready {
  border-color: #b9e5c9;
  background: #eaf8f0;
  color: var(--ok);
}

.status-card.problem {
  border-color: #f0b8b2;
  background: #fff1f0;
  color: var(--bad);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.summary-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
  box-shadow: var(--shadow);
}

.summary-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.summary-item strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  line-height: 28px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
  gap: 14px;
}

.panel {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 16px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.panel-head small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.panel-head > span {
  min-width: 28px;
  height: 25px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 760;
}

.board-head {
  margin: 16px 0 10px;
}

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

.field {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 720;
}

.wide-field { grid-column: 1 / -1; }

input,
textarea,
select {
  width: 100%;
  background: #ffffff;
  color: var(--text);
  padding: 9px 10px;
}

textarea {
  min-height: 170px;
  resize: vertical;
  line-height: 20px;
}

.field-note {
  justify-self: end;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.skill-picker,
.skill-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.skill-option,
.skill-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}

.skill-option {
  display: grid;
  gap: 4px;
  padding: 11px;
}

.skill-option input {
  position: absolute;
  width: 1px;
  min-height: 0;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.skill-option:has(input:checked) {
  border-color: var(--accent);
  background: #ebf7f7;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.skill-option strong,
.skill-option small {
  overflow-wrap: anywhere;
}

.skill-option strong {
  font-size: 13px;
  line-height: 18px;
}

.skill-option small,
.empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.quick-fill {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-fill button,
.feedback-form button {
  background: #ffffff;
  color: var(--accent-2);
  border-color: var(--border);
  padding: 8px 10px;
  font-weight: 740;
}

.quick-fill button:hover,
.quick-fill button:focus-visible,
.feedback-form button:hover,
.feedback-form button:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.primary-action {
  grid-column: 1 / -1;
  justify-self: start;
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  padding: 9px 14px;
  font-weight: 760;
}

.form-message {
  grid-column: 1 / -1;
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

.form-message.ok { color: var(--ok); }
.form-message.problem { color: var(--bad); }

.side-stack {
  display: grid;
  gap: 14px;
  align-content: start;
}

.skill-loop {
  counter-reset: skill-step;
  list-style: none;
  display: grid;
  gap: 0;
  padding: 0;
  margin: 0;
}

.skill-loop li {
  position: relative;
  border-top: 1px solid var(--border);
  padding: 10px 0 10px 36px;
}

.skill-loop li:first-child {
  border-top: 0;
  padding-top: 0;
}

.skill-loop li::before {
  counter-increment: skill-step;
  content: counter(skill-step);
  position: absolute;
  top: 10px;
  left: 0;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 780;
}

.skill-loop li:first-child::before { top: 0; }
.skill-loop strong { display: block; font-size: 13px; line-height: 18px; }
.skill-loop small { display: block; color: var(--muted); font-size: 12px; line-height: 17px; margin-top: 2px; }

.improvement-list {
  display: grid;
  gap: 8px;
}

.improvement-item {
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.improvement-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.improvement-item strong {
  display: block;
  font-size: 13px;
  line-height: 18px;
}

.improvement-item small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.skill-card {
  padding: 14px;
}

.skill-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.skill-card-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.skill-status {
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--accent-2);
  padding: 4px 7px;
  font-size: 11px;
  line-height: 14px;
  font-weight: 760;
  white-space: nowrap;
}

.skill-meter {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
  margin: 12px 0;
}

.skill-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.skill-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.skill-card dt {
  color: var(--muted);
  font-size: 11px;
  line-height: 14px;
}

.skill-card dd {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 760;
}

.skill-next {
  margin: 12px 0 0;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.request-list {
  display: grid;
  gap: 10px;
}

.request-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  box-shadow: var(--shadow);
}

.request-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 7px;
}

.pill {
  border: 1px solid #f1d1a9;
  border-radius: 999px;
  background: #fff7eb;
  color: var(--warn);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 730;
}

.pill.skill {
  border-color: #bfdfdf;
  background: #edfafa;
  color: var(--accent-2);
}

.request-card p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 19px;
  overflow-wrap: anywhere;
}

.request-card time {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.feedback-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  margin-top: 12px;
}

.feedback-form input {
  min-width: 0;
}

@media (max-width: 940px) {
  .layout,
  .skill-board {
    grid-template-columns: 1fr;
  }

  .skill-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .shell { padding: 14px; }

  .topbar,
  .summary-grid,
  .form-stack,
  .skill-picker,
  .feedback-form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .status-card {
    justify-self: start;
  }

  .primary-action {
    width: 100%;
    justify-content: center;
  }
}
