:root {
  color-scheme: light;
  --paper: #f6f1e8;
  --paper-2: #fffaf1;
  --ink: #162033;
  --muted: #637083;
  --line: rgba(22, 32, 51, 0.14);
  --card: rgba(255, 250, 241, 0.82);
  --gold: #d49a36;
  --green: #16745f;
  --blue: #305c9f;
  --rose: #a6435d;
  --shadow: 0 22px 70px rgba(38, 31, 22, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  background:
    linear-gradient(135deg, rgba(22, 116, 95, 0.1), transparent 26rem),
    linear-gradient(180deg, var(--paper), #ece3d5);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  min-height: 100vh;
}

a,
button {
  color: inherit;
  font: inherit;
}

a {
  text-decoration: none;
}

button {
  cursor: pointer;
}

.review-shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: 22px;
}

.review-topbar,
.review-brand,
.review-links,
.review-hero,
.review-layout,
.section-head,
.phone-status,
.phone-action,
.evidence-grid,
.gate-matrix {
  display: flex;
}

.review-topbar {
  align-items: center;
  gap: 18px;
  justify-content: space-between;
  padding: 8px 0 28px;
}

.review-brand {
  align-items: center;
  gap: 12px;
}

.review-brand-mark {
  align-items: center;
  background: var(--ink);
  border-radius: 50%;
  color: var(--paper-2);
  display: inline-flex;
  font-weight: 900;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.review-brand strong,
.review-brand small {
  display: block;
}

.review-brand small,
.review-links a,
.hero-copy p,
.evidence-grid p,
.note-list p,
.unit-stack span,
.phone-content p {
  color: var(--muted);
}

.review-brand small {
  font-size: 12px;
  margin-top: 2px;
}

.review-links {
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.review-links a,
.screen-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  padding: 9px 12px;
}

.review-links a {
  background: rgba(255, 255, 255, 0.42);
}

.review-hero {
  align-items: end;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.eyebrow {
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p,
ol {
  margin: 0;
}

h1 {
  font-size: clamp(42px, 8vw, 86px);
  line-height: 0.95;
}

h2 {
  font-size: 27px;
  line-height: 1.08;
}

.hero-copy p {
  line-height: 1.55;
  margin-top: 14px;
  max-width: 660px;
}

.status-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: grid;
  flex: 0 0 320px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
}

.status-panel div {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 16px;
}

.status-panel div:nth-child(2n) {
  border-right: 0;
}

.status-panel div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.status-panel span,
.evidence-card span,
.note-list span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
}

.status-panel strong {
  display: block;
  font-size: 18px;
  margin-top: 4px;
}

.review-layout {
  align-items: stretch;
  gap: 22px;
}

.phone-card,
.review-notes,
.evidence-card,
.gate-matrix {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.gate-matrix {
  align-items: stretch;
  gap: 18px;
  margin: 0 0 22px;
  padding: 18px;
}

.gate-copy {
  flex: 1 1 320px;
}

.gate-copy p {
  color: var(--muted);
  line-height: 1.55;
  margin-top: 10px;
}

.gate-rows {
  display: grid;
  flex: 1.4 1 520px;
  gap: 10px;
}

.gate-row {
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  border-radius: 14px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(150px, 0.9fr) minmax(160px, 1fr) minmax(180px, 1.1fr);
  padding: 12px;
}

.gate-row strong,
.gate-row span,
.gate-row em {
  align-self: center;
  font-size: 13px;
  line-height: 1.25;
}

.gate-row strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.gate-row span {
  color: var(--green);
  font-weight: 900;
}

.gate-row em {
  color: var(--muted);
  font-style: normal;
}

.gate-row-approved {
  border-left-color: var(--green);
}

.phone-card {
  flex: 1 1 680px;
  padding: 18px;
}

.review-notes {
  flex: 0 0 360px;
  padding: 18px;
}

.section-head {
  align-items: start;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.segment-control {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.screen-button {
  background: #ffffff;
  border-color: rgba(22, 32, 51, 0.16);
}

.screen-button.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.phone-stage {
  display: grid;
  justify-items: center;
}

.phone-shell {
  aspect-ratio: 390 / 844;
  background: #ffffff;
  border: 8px solid #172033;
  border-radius: 42px;
  box-shadow: 0 28px 70px rgba(22, 32, 51, 0.22);
  display: flex;
  flex-direction: column;
  max-width: 390px;
  min-height: 720px;
  overflow: hidden;
  padding: 18px;
  width: min(100%, 390px);
}

.phone-status,
.phone-action {
  align-items: center;
  justify-content: space-between;
}

.phone-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding-bottom: 18px;
}

.phone-header span {
  color: var(--green);
  display: block;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.phone-header h3 {
  font-size: 28px;
  line-height: 1.02;
  margin: 6px 0 0;
}

.phone-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  padding: 18px 0;
}

.lesson-card,
.input-table,
.rubric-row,
.chip,
.note-list div,
.unit-stack,
.evidence-card {
  border: 1px solid var(--line);
  border-radius: 16px;
}

.lesson-card,
.input-table,
.rubric-row {
  background: #fff8ed;
  padding: 14px;
}

.lesson-card strong,
.input-table strong {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
}

.phone-content p {
  font-size: 14px;
  line-height: 1.45;
}

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

.mini-grid div {
  background: #eef6f2;
  border-radius: 12px;
  padding: 10px;
}

.mini-grid span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 4px;
}

.mini-grid strong {
  color: var(--green);
  font-size: 13px;
}

.input-table {
  display: grid;
  gap: 8px;
}

.input-row {
  border-top: 1px solid rgba(22, 32, 51, 0.1);
  display: grid;
  gap: 8px;
  grid-template-columns: 1.1fr 0.8fr 0.8fr;
  padding-top: 8px;
}

.input-row span {
  color: var(--muted);
  font-size: 12px;
}

.rubric-row {
  display: grid;
  gap: 4px;
}

.rubric-row strong {
  color: var(--blue);
  font-size: 14px;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  padding: 10px 12px;
}

.phone-action {
  background: #f1eadf;
  border: 1px solid var(--line);
  border-radius: 999px;
  gap: 8px;
  padding: 8px 8px 8px 14px;
}

.phone-action span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-action button {
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
  padding: 10px 14px;
}

.note-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.note-list div {
  background: rgba(255, 255, 255, 0.54);
  padding: 14px;
}

.note-list p {
  line-height: 1.45;
  margin-top: 5px;
}

.unit-stack {
  background: #ffffff;
  margin-top: 18px;
  padding: 16px;
}

.unit-stack h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.unit-stack ol {
  display: grid;
  gap: 7px;
  list-style: none;
  padding: 0;
}

.unit-stack li {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 42px 1fr;
}

.unit-stack strong {
  background: #eef6f2;
  border-radius: 999px;
  color: var(--green);
  font-size: 12px;
  padding: 6px 8px;
  text-align: center;
}

.unit-stack span {
  font-size: 13px;
}

.evidence-grid {
  align-items: stretch;
  gap: 16px;
  margin-top: 22px;
}

.evidence-grid > div:first-child {
  flex: 1.1 1 260px;
  padding: 8px 0;
}

.evidence-grid > div:first-child p {
  line-height: 1.55;
  margin-top: 10px;
}

.evidence-card {
  flex: 1 1 220px;
  padding: 16px;
}

.evidence-card strong {
  display: block;
  font-size: 18px;
  line-height: 1.15;
  margin: 7px 0;
}

.evidence-card p {
  line-height: 1.45;
}

@media (max-width: 920px) {
  .review-hero,
  .review-layout,
  .evidence-grid,
  .gate-matrix {
    flex-direction: column;
  }

  .status-panel,
  .review-notes {
    flex-basis: auto;
    width: 100%;
  }
}

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

  .review-topbar,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .review-links,
  .segment-control {
    justify-content: flex-start;
  }

  h1 {
    font-size: 42px;
  }

  h2 {
    font-size: 24px;
  }

  .phone-card,
  .review-notes {
    border-radius: 18px;
    padding: 14px;
  }

  .phone-shell {
    border-width: 5px;
    border-radius: 32px;
    min-height: 650px;
    padding: 14px;
  }

  .phone-header h3 {
    font-size: 23px;
  }

  .mini-grid,
  .input-row,
  .gate-row {
    grid-template-columns: 1fr;
  }
}
