@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --ink: #202c28;
  --muted: #738079;
  --paper: #f3f1e9;
  --card: #fffefa;
  --line: #dce1d8;
  --green: #1d6b50;
  --green-dark: #174c3c;
  --green-soft: #e6f1e9;
  --coral: #b94936;
  --coral-soft: #faeae4;
  --mono: "DM Mono", "Consolas", monospace;
  --sans: "DM Sans", "Segoe UI", sans-serif;
  --display: "Manrope", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 7% 5%, rgba(192, 211, 183, .42), transparent 32rem),
    radial-gradient(ellipse at 100% 35%, rgba(241, 206, 184, .3), transparent 30rem),
    var(--paper);
  font-family: var(--sans);
  min-height: 100vh;
}
a { color: inherit; }
.shell { width: min(100% - 40px, 960px); margin: 0 auto; padding: 54px 0 42px; }
.masthead { padding: 14px 0 36px; }
.eyebrow { margin: 0 0 12px; color: var(--green); font: 500 11px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 16px; font: 800 clamp(38px, 7vw, 68px)/1.02 var(--display); letter-spacing: -.055em; }
h1 em { color: var(--green); font-style: normal; }
h2 { margin-bottom: 8px; font: 750 22px/1.2 var(--display); letter-spacing: -.035em; }
.intro { max-width: 570px; margin: 0; color: #5d6b63; font-size: 16px; line-height: 1.65; }
.panel, .content-card, .complete-card { border: 1px solid rgba(190, 199, 187, .72); border-radius: 18px; background: rgba(255, 254, 250, .88); box-shadow: 0 12px 36px rgba(43, 61, 47, .045); }
.panel { padding: 26px 30px; margin-bottom: 18px; }
.identity-panel { max-width: 650px; }
.identity-panel > p, .muted { color: var(--muted); line-height: 1.55; }
.identity-form { margin-top: 24px; }
label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.identity-row { display: flex; gap: 10px; }
input { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 9px; background: white; padding: 13px 14px; color: var(--ink); font: 15px var(--sans); outline: none; }
input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(29, 107, 80, .12); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 11px 15px; text-decoration: none; white-space: nowrap; font: 700 13px var(--sans); cursor: pointer; transition: transform .15s, background .15s, border-color .15s; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: white; border-color: var(--green); background: var(--green); }
.button.primary:hover { background: var(--green-dark); }
.button.quiet { color: #526158; background: transparent; }
.button.quiet:hover { border-color: #9cab9e; background: rgba(255,255,255,.6); }
.button.dark { color: white; border-color: var(--ink); background: var(--ink); }
.welcome-row, .section-heading, .progress-heading, .item-nav, .topline, .item-head, .decision-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.welcome-row { margin: 30px 0 18px; }
.welcome-row h2 { margin: 0; font-size: 29px; }
.welcome-actions, .analysis-nav { display: flex; align-items: center; gap: 10px; }
.welcome-actions form { margin: 0; }
.welcome-row .eyebrow, .section-heading .eyebrow, .progress-heading .eyebrow { margin-bottom: 6px; }
.progress-heading h2 { font-size: 31px; }
.progress-heading h2 span { color: #94a098; font-size: 18px; font-weight: 500; }
.progress-track, .roster-progress { overflow: hidden; height: 7px; border-radius: 20px; background: #e8ebe4; }
.progress-track > span, .roster-progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #458c68, #83aa68); transition: width .25s ease; }
.progress-panel .progress-track { margin: 10px 0 11px; }
.progress-panel .muted { margin: 0; font-size: 13px; }
.team-panel { margin-top: 28px; }
.section-heading { margin-bottom: 22px; }
.section-heading h2 { margin: 0; }
.pill { padding: 7px 10px; border: 1px solid var(--line); border-radius: 30px; color: #66736b; font: 11px var(--mono); white-space: nowrap; }
.roster { display: grid; gap: 14px; }
.roster-row { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(80px, 1.2fr) auto 72px; align-items: center; gap: 14px; font-size: 13px; }
.roster-name { font-weight: 700; }
.roster-progress { height: 5px; }
.roster-count { color: var(--muted); font: 11px var(--mono); white-space: nowrap; }
.status-done { color: var(--green); font-size: 11px; font-weight: 700; text-align: right; }
.team-panel > .button { margin-top: 24px; }
.small { margin: 22px 0 0; font-size: 12px; }
footer { padding: 15px 2px; color: #879188; font: 11px var(--mono); }
.notice { margin: 0 0 15px; padding: 12px 15px; border-radius: 8px; font-size: 13px; }
.notice.error { color: #8f382b; background: var(--coral-soft); }

.annotation-shell { width: min(100% - 40px, 850px); padding-top: 25px; }
.topline { min-height: 44px; margin-bottom: 45px; color: #78847c; font-size: 12px; }
.topline a { text-decoration: none; }
.annotation-top-actions { display: flex; align-items: center; gap: 8px; }
.annotation-top-actions a { color: var(--green-dark); font-weight: 700; }
.analysis-nav { flex-wrap: wrap; justify-content: flex-end; }
.analysis-nav > span { color: var(--muted); font: 10px var(--mono); }
.wordmark { color: var(--ink); font: 500 11px var(--mono); letter-spacing: .1em; }
.dot { padding: 0 5px; color: #a3ada3; }
.item-head { align-items: end; margin-bottom: 20px; }
.item-head h1 { margin: 0; font-size: clamp(29px, 5vw, 43px); }
.item-progress { color: var(--green); font: 500 14px var(--mono); }
.annotation-shell > .progress-track { margin-bottom: 21px; }
.content-card { overflow: hidden; }
.content-card article { padding: 25px 29px 27px; }
.content-card article + article { border-top: 1px solid var(--line); }
.text-block { white-space: pre-wrap; overflow-wrap: anywhere; color: #39463f; font-size: 15px; line-height: 1.72; }
.response-article { background: rgba(246, 248, 241, .55); }
.response-text { color: #202d27; }
.decision { margin: 26px 0 22px; }
.decision-heading { align-items: baseline; margin-bottom: 14px; }
.decision-heading h2 { margin: 0; }
.decision-heading p, .shortcut-note { margin: 0; color: var(--muted); font-size: 12px; }
.label-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.label-button { display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 12px; text-align: left; cursor: pointer; transition: transform .15s, box-shadow .15s, border .15s; }
.label-button:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(40, 55, 44, .08); }
.label-button.safe { color: var(--green-dark); background: #f7fbf6; }
.label-button.safe.selected { border: 2px solid var(--green); }
.label-button.harmful { color: #843c2e; background: #fff8f5; }
.label-button.harmful.selected { border: 2px solid var(--coral); }
.label-key { display: grid; place-items: center; min-width: 38px; height: 38px; border: 1px solid currentColor; border-radius: 8px; font: 500 15px var(--mono); }
.label-key small { font-size: 9px; opacity: .75; }
.label-title { font-size: 14px; font-weight: 700; }
.shortcut-note { margin-top: 12px; }
kbd { margin: 0 2px; padding: 2px 5px; border: 1px solid #d4dbd2; border-radius: 4px; background: #fbfcf8; color: #4c5c51; font: 10px var(--mono); }
.item-nav { padding-top: 15px; border-top: 1px solid #dce1d8; }
.saved-note { color: #78847c; font-size: 11px; }

.complete-card { max-width: 700px; margin: 60px auto; padding: 38px; text-align: center; }
.complete-card h1 { font-size: clamp(32px, 5vw, 48px); }
.complete-card > p:not(.eyebrow) { max-width: 490px; margin: 0 auto 23px; color: var(--muted); line-height: 1.6; }
.complete-mark { display: grid; place-items: center; width: 52px; height: 52px; margin: 15px auto 19px; border-radius: 50%; color: var(--green); background: var(--green-soft); font-size: 25px; }
.compact { margin: 30px 0; text-align: left; }

.report-shell { width: min(100% - 40px, 1120px); }
.report-shell .topline { margin-bottom: 38px; }
.report-header { padding-bottom: 30px; }
.report-header h1 { font-size: clamp(37px, 6vw, 58px); }
.report-header > p:not(.eyebrow) { color: var(--muted); }
.report-header code { color: var(--green-dark); font: 12px var(--mono); }
.report-header .button { margin-top: 9px; }
.report-section { margin: 22px 0; padding: 26px; border: 1px solid rgba(190, 199, 187, .72); border-radius: 15px; background: rgba(255, 254, 250, .88); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; white-space: nowrap; }
th { padding: 10px 12px; color: #77847b; text-align: left; font: 10px var(--mono); letter-spacing: .035em; text-transform: uppercase; }
td { padding: 12px; border-top: 1px solid #e7e9e2; }
td.strong { color: var(--green); font-weight: 800; }
td.mismatch { color: #9c3e30; background: #fff0e9; font-weight: 800; }
.report-section > .muted { margin-top: -8px; font-size: 13px; }
.empty-state { margin: 0; padding: 19px; border-radius: 8px; color: var(--green-dark); background: var(--green-soft); font-size: 14px; }

@media (max-width: 640px) {
  .shell { width: min(100% - 26px, 960px); padding-top: 29px; }
  .panel { padding: 21px 19px; }
  .identity-row { align-items: stretch; flex-direction: column; }
  .progress-heading { align-items: flex-start; flex-direction: column; }
  .welcome-row { align-items: flex-start; flex-direction: column; }
  .welcome-actions { flex-wrap: wrap; }
  .roster-row { grid-template-columns: 1fr auto; gap: 7px 11px; }
  .roster-progress { grid-column: 1 / 2; grid-row: 2; }
  .roster-count { grid-column: 2; grid-row: 2; }
  .status-done { grid-column: 2; grid-row: 1; }
  .annotation-shell { width: min(100% - 26px, 850px); }
  .topline { margin-bottom: 30px; }
  .report-shell .topline { align-items: flex-start; flex-direction: column; }
  .analysis-nav { justify-content: flex-start; }
  .annotation-top-actions { flex-wrap: wrap; justify-content: flex-end; }
  .content-card article { padding: 20px; }
  .decision-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .label-buttons { grid-template-columns: 1fr; gap: 9px; }
  .label-button { min-height: 68px; }
  .item-nav { gap: 8px; }
  .item-nav .button { padding: 10px; }
  .saved-note { text-align: center; }
  .complete-card { margin: 30px auto; padding: 27px 19px; }
  .report-section { padding: 19px 14px; }
  .section-heading { align-items: flex-start; }
}
