:root {
  --ink: #15251f;
  --muted: #65746e;
  --line: #d9e3df;
  --surface: #ffffff;
  --page: #f3f7f5;
  --soft: #f7f9f8;
  --accent: #167a57;
  --accent-soft: #e4f2ec;
  --warning: #fff3d1;
  --warning-ink: #755000;
  --waiting: #d99700;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--page); }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--page);
}

button,
a { font: inherit; }

button { color: inherit; }

.shell-header,
.prototype-shell {
  width: min(1440px, calc(100% - 48px));
  margin-inline: auto;
}

.shell-header {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 760;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: var(--accent);
}

.header-links {
  display: flex;
  align-items: center;
  gap: 34px;
}

.header-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.header-links a:hover { text-decoration: underline; }

.prototype-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  padding: 22px 2px 18px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 32px;
  letter-spacing: -0.03em;
}

.meta-list {
  display: flex;
  gap: 0;
  margin: 0;
}

.meta-list > div {
  min-width: 126px;
  padding-inline: 22px;
  border-left: 1px solid var(--line);
}

.meta-list dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
}

.meta-list dd {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 13px;
  font-weight: 650;
}

.status-dot,
.notice-dot,
.row-state {
  display: inline-block;
  border-radius: 50%;
}

.status-dot { width: 7px; height: 7px; background: var(--waiting); }

.prototype-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid #ecdcae;
  border-radius: 13px 13px 0 0;
  color: var(--warning-ink);
  background: var(--warning);
  font-size: 14px;
  text-align: center;
}

.notice-dot { width: 8px; height: 8px; background: #d89b00; }

.review-board {
  padding: 20px 24px 18px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background: var(--surface);
}

.review-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.annotation-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: none;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.annotation-toggle i { color: var(--accent); font-size: 20px; }

.view-labels {
  display: grid;
  grid-template-columns: 1fr 280px;
  width: calc(100% - 260px);
  gap: 34px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.view-labels span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.comparison-grid {
  display: grid;
  grid-template-columns: minmax(720px, 1fr) 280px;
  align-items: start;
  gap: 34px;
}

.desktop-stage {
  min-width: 0;
  overflow-x: auto;
  border-radius: 12px;
}

.wireframe-screen {
  position: relative;
  overflow: hidden;
  border: 1px solid #cbd6d1;
  border-radius: 12px;
  color: #263a32;
  background: #fff;
}

.desktop-frame {
  min-width: 720px;
  height: 548px;
  display: grid;
  grid-template-columns: 190px 1fr;
  overflow: visible;
}

.desktop-sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 18px 13px;
  border-right: 1px solid var(--line);
  background: #fbfcfb;
}

.wire-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 18px;
  font-size: 12px;
}

.wire-logo {
  width: 30px;
  height: 30px;
  display: block;
  border-radius: 5px;
  background: #dce2df;
}

.wire-nav {
  display: grid;
  gap: 4px;
}

.wire-nav.secondary { margin-top: auto; }

.wire-nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 7px;
  color: #35473f;
  font-size: 11px;
  text-decoration: none;
}

.wire-nav a.active { color: var(--ink); background: #e9edeb; font-weight: 700; }
.wire-nav i { font-size: 15px; }

.desktop-content { min-width: 0; }

.wire-topbar {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}

.wire-topbar button,
.mobile-topbar button {
  display: grid;
  place-items: center;
  padding: 5px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.topbar-actions { display: flex; align-items: center; gap: 9px; font-size: 10px; }
.topbar-actions button { font-size: 16px; }
.wire-avatar { width: 26px; height: 26px; border-radius: 50%; background: #e1e6e3; }

.wire-main { padding: 22px 26px; }

.welcome-block h2 {
  margin-bottom: 4px;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.welcome-block p { margin-bottom: 18px; color: var(--muted); font-size: 10px; }

.summary-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.summary-grid article {
  min-height: 86px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr auto;
  column-gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.summary-grid article i { grid-row: 1 / 4; font-size: 17px; }
.summary-grid article span { font-size: 9px; }
.summary-grid article strong { align-self: end; font-size: 19px; }
.summary-grid article small { color: var(--muted); font-size: 8px; }

.content-columns { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 14px; }

.wire-panel {
  position: relative;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 13px;
}

.panel-title h3 { margin: 0; font-size: 11px; }
.panel-title a { color: var(--accent); font-size: 8px; font-weight: 700; text-decoration: none; }

.table-head,
.table-row {
  display: grid;
  grid-template-columns: 1.8fr 0.8fr 0.9fr 0.8fr;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
}

.table-head {
  min-height: 25px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 7px;
}

.table-row {
  min-height: 35px;
  border-bottom: 1px solid #e9eeeb;
  font-size: 8px;
}

.table-row:last-of-type { border-bottom: 0; }
.table-row > span:first-child { display: flex; align-items: center; gap: 5px; }
.appeal-head,
.appeal-row { grid-template-columns: 1.5fr 0.75fr 0.85fr; }

.state { display: inline-flex; align-items: center; gap: 4px; }
.state::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.state.success { color: var(--accent); }
.state.wait { color: var(--waiting); }

.annotation-pin {
  position: absolute;
  z-index: 3;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 0 0 1px rgba(22, 122, 87, 0.18);
  cursor: pointer;
  transition: opacity 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.annotation-pin:hover,
.annotation-pin.is-highlighted { transform: scale(1.14); box-shadow: 0 0 0 5px rgba(22, 122, 87, 0.16); }

.pin-nav { top: 12px; right: -12px; }
.summary-grid > .pin-2 { right: -38px; top: 28px; }
.wire-panel > .pin-3,
.wire-panel > .pin-4 { right: -27px; top: 37px; }

.mobile-frame {
  height: 548px;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.mobile-topbar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}

.mobile-content {
  min-height: 0;
  flex: 1;
  overflow: hidden;
  padding: 16px 14px 8px;
}

.mobile-welcome { position: relative; margin-bottom: 13px; }
.mobile-welcome h2 { margin-bottom: 5px; font-size: 17px; line-height: 1.1; }
.mobile-welcome p { margin-bottom: 0; color: var(--muted); font-size: 8px; line-height: 1.4; }
.mobile-welcome .pin-1 { right: -22px; top: 0; }

.mobile-summary {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 15px;
}

.mobile-summary article {
  min-height: 58px;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfb;
}

.mobile-summary i { grid-row: 1 / 4; font-size: 12px; }
.mobile-summary span { font-size: 7px; }
.mobile-summary strong { font-size: 13px; }
.mobile-summary small { color: var(--muted); font-size: 6px; }
.mobile-summary .pin-2 { right: -25px; top: 28px; }

.mobile-list { position: relative; margin-bottom: 10px; }
.mobile-list .panel-title { padding: 0 0 6px; }
.mobile-list .panel-title h3 { font-size: 9px; }
.mobile-list .panel-title a { font-size: 7px; }
.mobile-list .pin-3,
.mobile-list .pin-4 { right: -25px; top: 22px; }

.mobile-row {
  min-height: 33px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #e8eeeb;
  font-size: 7px;
}

.mobile-row > span:not(.row-state) { min-width: 0; flex: 1; display: grid; gap: 2px; }
.mobile-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-row small { color: var(--muted); font-size: 6px; }
.row-state { width: 5px; height: 5px; flex: 0 0 auto; }
.row-state.success { background: var(--accent); }
.row-state.wait { background: var(--waiting); }

.mobile-tabs {
  min-height: 50px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  background: #fff;
}

.mobile-tabs a {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  color: var(--muted);
  font-size: 6px;
  text-decoration: none;
}

.mobile-tabs a.active { color: var(--accent); font-weight: 700; }
.mobile-tabs i { font-size: 13px; }

.annotation-legend {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 18px 0 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  list-style: none;
}

.annotation-legend li { min-width: 0; }
.annotation-legend li + li { border-left: 1px solid var(--line); }

.annotation-legend button {
  width: 100%;
  min-height: 96px;
  display: grid;
  grid-template-columns: 24px 1fr;
  grid-template-rows: auto 1fr;
  gap: 5px 8px;
  padding: 15px 16px;
  border: 0;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.annotation-legend button > span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  grid-row: 1 / 3;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-size: 10px;
  font-weight: 800;
}

.annotation-legend strong { font-size: 11px; }
.annotation-legend small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.annotation-legend li.is-highlighted { background: var(--accent-soft); }

.annotations-off .annotation-pin,
.annotations-off .annotation-legend { display: none; }

.annotations-off .annotation-toggle i::before { content: "\eb7d"; }

.wireframe-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 2px 34px;
  color: var(--muted);
  font-size: 12px;
}

/* Requirements document */
.requirements-page .prototype-shell { max-width: 1040px; }

.document-header {
  padding: 54px 0 34px;
  border-bottom: 1px solid var(--line);
}

.document-kicker {
  width: fit-content;
  margin: 0 0 20px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--warning-ink);
  background: var(--warning);
  font-size: 12px;
  font-weight: 750;
}

.document-header h1 { max-width: 760px; margin-bottom: 16px; font-size: 46px; }
.document-lead { max-width: 720px; margin-bottom: 24px; color: var(--muted); font-size: 17px; line-height: 1.6; }

.document-meta { display: flex; gap: 26px; color: var(--muted); font-size: 12px; }
.document-meta strong { color: var(--ink); }

.document-content { padding: 34px 0 70px; }
.document-section { display: grid; grid-template-columns: 210px 1fr; gap: 40px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.document-section h2 { margin-bottom: 0; font-size: 20px; }
.document-section h3 { margin-bottom: 8px; font-size: 15px; }
.document-section p,
.document-section li { color: #43554d; font-size: 14px; line-height: 1.6; }
.document-section ul,
.document-section ol { margin: 0; padding-left: 20px; }
.requirement-list { display: grid; gap: 20px; }
.acceptance-list { display: grid; gap: 10px; list-style: none; padding-left: 0 !important; }
.acceptance-list li { position: relative; padding-left: 28px; }
.acceptance-list li::before { content: ""; position: absolute; left: 0; top: 7px; width: 14px; height: 14px; border: 1px solid #aebdb6; border-radius: 3px; }

@media (max-width: 1100px) {
  .comparison-grid { grid-template-columns: 1fr; }
  .mobile-stage { width: min(100%, 340px); }
  .view-labels { display: none; }
  .annotation-legend { grid-template-columns: 1fr 1fr; }
  .annotation-legend li:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .annotation-legend li:nth-child(4) { border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .shell-header,
  .prototype-shell { width: min(100% - 24px, 1440px); }
  .shell-header { align-items: flex-start; flex-direction: column; padding-block: 16px; }
  .header-links { width: 100%; justify-content: space-between; gap: 12px; }
  .prototype-heading { align-items: flex-start; flex-direction: column; }
  .meta-list { width: 100%; overflow-x: auto; }
  .meta-list > div:first-child { padding-left: 0; border-left: 0; }
  .review-board { padding: 16px 12px; }
  .review-toolbar { margin-bottom: 12px; }
  .desktop-frame { min-width: 700px; }
  .annotation-legend { grid-template-columns: 1fr; }
  .annotation-legend li + li { border-left: 0; border-top: 1px solid var(--line); }
  .document-header h1 { font-size: 36px; }
  .document-section { grid-template-columns: 1fr; gap: 16px; }
}
