:root {
  --paper: #f3eee5;
  --paper-bright: #fbf8f2;
  --paper-deep: #e7ddcf;
  --ink: #211b17;
  --muted: #756b62;
  --line: rgba(48, 39, 32, 0.15);
  --line-strong: rgba(48, 39, 32, 0.28);
  --wine: #7b2633;
  --wine-deep: #5b1722;
  --olive: #56614a;
  --olive-soft: #e5e8dc;
  --gold: #a8793f;
  --warning: #a06a23;
  --danger: #983a32;
  --shadow: 0 24px 80px rgba(58, 42, 30, 0.1);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 5%, rgba(181, 145, 93, 0.14), transparent 30rem),
    radial-gradient(circle at 92% 28%, rgba(123, 38, 51, 0.08), transparent 34rem),
    var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(65, 49, 37, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(65, 49, 37, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(2px);
  pointer-events: none;
}

.ambient-one {
  top: 18vh;
  right: -12rem;
  width: 32rem;
  height: 32rem;
  border: 1px solid rgba(123, 38, 51, 0.11);
}

.ambient-two {
  top: 22vh;
  right: -7rem;
  width: 20rem;
  height: 20rem;
  border: 1px solid rgba(123, 38, 51, 0.09);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 14px max(24px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid transparent;
  background: rgba(243, 238, 229, 0.82);
  backdrop-filter: blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  color: #fff9f1;
  background: var(--ink);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.08em;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-copy strong {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.14em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 17px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.button-dark {
  color: #fffaf2;
  background: var(--ink);
  border-color: var(--ink);
}

.button-dark:hover {
  background: #382d26;
  border-color: #382d26;
}

.button-quiet {
  background: rgba(255, 255, 255, 0.44);
  border-color: var(--line);
}

.button-quiet:hover {
  background: rgba(255, 255, 255, 0.74);
  border-color: var(--line-strong);
}

.button-wine {
  color: #fff8f4;
  background: var(--wine);
  border-color: var(--wine);
}

.button-warning {
  color: #fff8f4;
  background: var(--wine-deep);
  border-color: var(--wine-deep);
}

main {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--wine);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.16em;
}

.gate {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
  gap: clamp(44px, 7vw, 100px);
  align-items: center;
  min-height: calc(100vh - 130px);
  padding: 64px 0 90px;
}

.gate-copy h1 {
  max-width: 790px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(52px, 7.2vw, 96px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.055em;
}

h1 em {
  color: var(--wine);
  font-weight: 400;
}

.gate-lead {
  max-width: 650px;
  margin: 34px 0 0;
  color: #5f544c;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.9;
}

.gate-points,
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 30px;
}

.gate-points span,
.hero-tags span {
  padding: 8px 12px;
  color: #5d5148;
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
}

.gate-points span::before,
.hero-tags span::before {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 7px;
  vertical-align: 2px;
  content: "";
  background: var(--gold);
  border-radius: 50%;
}

.access-card {
  position: relative;
  padding: 36px;
  background: rgba(251, 248, 242, 0.9);
  border: 1px solid rgba(55, 43, 34, 0.12);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.card-number {
  position: absolute;
  top: 26px;
  right: 30px;
  color: rgba(33, 27, 23, 0.22);
  font-family: var(--serif);
  font-size: 48px;
}

.access-card h2 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 35px;
  font-weight: 500;
}

.access-card > p:not(.eyebrow, .form-error) {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 14px;
}

.access-card label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 700;
}

.input-button-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

input,
textarea {
  width: 100%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input {
  height: 47px;
  padding: 0 14px;
}

textarea {
  padding: 12px 14px;
  resize: vertical;
}

input:focus,
textarea:focus {
  background: #fff;
  border-color: rgba(123, 38, 51, 0.55);
  box-shadow: 0 0 0 3px rgba(123, 38, 51, 0.08);
}

input::placeholder,
textarea::placeholder {
  color: #9a9087;
}

.privacy-note {
  display: block;
  margin-top: 16px;
  color: #8d8279;
  font-size: 11px;
}

.form-error {
  min-height: 21px;
  margin: 11px 0 0 !important;
  color: var(--danger) !important;
  font-size: 12px !important;
}

.workspace {
  padding-bottom: 90px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.5fr);
  gap: 70px;
  align-items: end;
  padding: clamp(60px, 8vw, 104px) 0 72px;
  border-bottom: 1px solid var(--line);
}

.hero-copy h1 {
  max-width: 880px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(48px, 6.7vw, 87px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.hero-lead {
  max-width: 710px;
  margin: 28px 0 0;
  color: #60554c;
  font-size: 16px;
  line-height: 1.9;
}

.progress-card {
  padding: 26px;
  background: rgba(251, 248, 242, 0.75);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
}

.progress-orbit {
  display: grid;
  width: 168px;
  height: 168px;
  margin: 0 auto 22px;
  place-items: center;
  background: conic-gradient(var(--wine) var(--progress, 0%), rgba(33, 27, 23, 0.08) 0);
  border-radius: 50%;
  transition: background 500ms ease;
}

.progress-orbit::before {
  grid-area: 1 / 1;
  width: 142px;
  height: 142px;
  content: "";
  background: var(--paper-bright);
  border-radius: 50%;
}

.progress-orbit > div {
  z-index: 1;
  display: flex;
  grid-area: 1 / 1;
  flex-direction: column;
  align-items: center;
}

.progress-orbit strong {
  font-family: var(--serif);
  font-size: 39px;
  font-weight: 500;
  line-height: 1;
}

.progress-orbit small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.progress-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.progress-stats div {
  padding: 12px 6px;
  text-align: center;
  background: var(--paper-bright);
}

.progress-stats strong,
.progress-stats span {
  display: block;
}

.progress-stats strong {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
}

.progress-stats span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.policy-section,
.board-section {
  padding: 76px 0;
  border-bottom: 1px solid var(--line);
}

.section-kicker {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 30px;
}

.section-kicker > span {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  margin-top: 4px;
  place-items: center;
  color: var(--wine);
  border: 1px solid rgba(123, 38, 51, 0.35);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 12px;
}

.section-kicker h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(34px, 4.5vw, 54px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.role-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.role-strip article {
  display: flex;
  gap: 13px;
  padding: 21px 18px;
  background: rgba(255, 255, 255, 0.32);
  border-right: 1px solid var(--line);
}

.role-strip article:last-child {
  border-right: 0;
}

.role-letter {
  display: grid;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  place-items: center;
  color: white;
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 12px;
}

.role-a {
  background: var(--wine);
}

.role-r {
  background: var(--ink);
}

.role-c {
  background: var(--gold);
}

.role-g {
  background: var(--olive);
}

.role-i {
  background: #8e8074;
}

.role-strip strong {
  font-size: 13px;
}

.role-strip p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.mechanism-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 16px;
}

.mechanism-card {
  padding: 28px;
  background: rgba(251, 248, 242, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.mechanism-main {
  grid-row: span 2;
  padding: 34px;
  color: #f8f1e8;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 50%),
    var(--ink);
}

.mechanism-index {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--wine);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.mechanism-main .mechanism-index {
  color: #d6ad7a;
}

.mechanism-card h3 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.25;
}

.mechanism-card p,
.mechanism-card li {
  color: #665b52;
  font-size: 13px;
  line-height: 1.8;
}

.mechanism-main p,
.mechanism-main li {
  color: rgba(255, 249, 242, 0.74);
}

.mechanism-main ol {
  margin: 0;
  padding-left: 1.35em;
}

.mechanism-main li {
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mechanism-main li:last-child {
  border-bottom: 0;
}

.mechanism-main strong {
  color: #fffaf4;
}

.decision-list p {
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 12px;
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.decision-list p:last-child {
  border-bottom: 0;
}

.decision-list b {
  color: var(--ink);
  font-size: 11px;
}

.separation-list {
  margin: 0;
  padding-left: 1.2em;
}

.separation-list li {
  padding: 3px 0;
}

.board-heading {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.board-summary {
  display: flex;
  gap: 18px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.text-button {
  padding: 0;
  color: var(--wine);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

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

.phase-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.phase-tab {
  padding: 8px 12px;
  color: #6a5e55;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 11px;
}

.phase-tab:hover {
  border-color: var(--line-strong);
}

.phase-tab.is-active {
  color: #fff9f3;
  background: var(--ink);
  border-color: var(--ink);
}

.toolbar-controls {
  display: flex;
  flex: 0 0 auto;
  gap: 9px;
  align-items: center;
}

.search-box input {
  width: 180px;
  height: 38px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 12px;
}

.check-control {
  display: flex;
  gap: 7px;
  align-items: center;
  color: #62564d;
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
}

.check-control input {
  width: 15px;
  height: 15px;
  accent-color: var(--wine);
}

.selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 12px 14px 12px 18px;
  color: #fff8f1;
  background: var(--wine);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(91, 23, 34, 0.18);
  font-size: 13px;
}

.selection-bar > div {
  display: flex;
  gap: 7px;
}

.selection-bar .button {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 11px;
}

.selection-bar .button-quiet {
  color: #fff8f1;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.24);
}

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

.task-card {
  position: relative;
  display: flex;
  min-height: 365px;
  flex-direction: column;
  padding: 22px;
  overflow: hidden;
  background: rgba(251, 248, 242, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.task-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 16px 40px rgba(58, 42, 30, 0.07);
}

.task-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  content: "";
  background: var(--line-strong);
}

.task-card.is-pending::before {
  background: var(--gold);
}

.task-card.is-confirmed::before {
  background: var(--olive);
}

.task-card.is-selected {
  border-color: rgba(123, 38, 51, 0.52);
  box-shadow: 0 0 0 2px rgba(123, 38, 51, 0.09);
}

.task-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.task-id {
  color: var(--wine);
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  color: #75685f;
  background: rgba(33, 27, 23, 0.055);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.status-pill::before {
  width: 5px;
  height: 5px;
  content: "";
  background: currentColor;
  border-radius: 50%;
}

.is-pending .status-pill {
  color: var(--warning);
  background: rgba(160, 106, 35, 0.09);
}

.is-confirmed .status-pill {
  color: var(--olive);
  background: rgba(86, 97, 74, 0.1);
}

.task-phase {
  margin: 17px 0 5px;
  color: #988a7e;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.task-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
  line-height: 1.32;
}

.task-goal {
  min-height: 44px;
  margin: 10px 0 15px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.task-owner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}

.task-owner span {
  color: var(--muted);
}

.task-owner strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-owner.is-open strong {
  color: var(--wine);
  font-weight: 600;
}

.task-details {
  margin: 6px 0 0;
}

.task-details summary {
  padding: 10px 0;
  color: var(--ink);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  list-style: none;
}

.task-details summary::-webkit-details-marker {
  display: none;
}

.task-details summary::after {
  float: right;
  color: var(--wine);
  content: "+";
  font-size: 16px;
  font-weight: 400;
}

.task-details[open] summary::after {
  content: "−";
}

.detail-block {
  margin: 0 0 11px;
  padding: 12px;
  background: rgba(33, 27, 23, 0.035);
  border-radius: 10px;
}

.detail-block b {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 10px;
  letter-spacing: 0.05em;
}

.detail-block p,
.detail-block ul {
  margin: 0;
  color: #665b52;
  font-size: 11px;
  line-height: 1.65;
}

.detail-block ul {
  padding-left: 1.15em;
}

.role-owner-line {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.role-owner-line div {
  padding: 9px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.role-owner-line span,
.role-owner-line strong {
  display: block;
}

.role-owner-line span {
  color: var(--muted);
  font-size: 9px;
}

.role-owner-line strong {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.5;
}

.task-bottom {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-top: auto;
  padding-top: 12px;
}

.task-bottom .button {
  flex: 1;
  min-height: 38px;
  padding: 7px 11px;
  font-size: 11px;
}

.select-task {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid var(--line);
  border-radius: 50%;
}

.select-task input {
  width: 15px;
  height: 15px;
  accent-color: var(--wine);
}

.admin-actions {
  display: flex;
  gap: 6px;
  width: 100%;
}

.admin-actions .button {
  flex: 1;
}

.empty-state {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
}

.empty-state strong {
  margin-bottom: 5px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
}

.empty-state span {
  font-size: 12px;
}

.closing-note {
  max-width: 780px;
  padding: 90px 0 10px;
}

.closing-note h2 {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-size: clamp(35px, 4.7vw, 55px);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.closing-note > p:last-child {
  color: #5f544c;
  font-size: 15px;
  line-height: 1.9;
}

footer {
  display: flex;
  justify-content: space-between;
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 35px;
  color: #8c8178;
  border-top: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.modal {
  width: min(780px, calc(100% - 32px));
  max-height: min(88vh, 920px);
  padding: 0;
  overflow: auto;
  color: var(--ink);
  background: var(--paper-bright);
  border: 1px solid rgba(49, 38, 30, 0.16);
  border-radius: 26px;
  box-shadow: 0 36px 110px rgba(37, 25, 17, 0.28);
}

.modal::backdrop {
  background: rgba(28, 21, 17, 0.56);
  backdrop-filter: blur(5px);
}

.modal form {
  padding: 30px;
}

.modal-compact {
  width: min(500px, calc(100% - 32px));
}

.modal-head {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
}

.modal-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
  line-height: 1.2;
}

.icon-button {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #73675e;
  background: rgba(33, 27, 23, 0.045);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
}

.modal-intro {
  margin: 17px 0 20px;
  color: var(--muted);
  font-size: 13px;
}

.selected-task-list {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}

.selected-task-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(33, 27, 23, 0.035);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.selected-task-list span {
  color: var(--wine);
  font-family: var(--serif);
  font-size: 11px;
}

.selected-task-list strong {
  font-size: 12px;
}

.selected-task-list small {
  color: var(--muted);
  font-size: 10px;
}

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

.form-grid-single {
  grid-template-columns: 1fr;
}

.form-grid label,
.full-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #51463e;
  font-size: 11px;
  font-weight: 650;
}

.form-grid label span,
.full-label span {
  color: #9a8e84;
  font-weight: 400;
}

.full-label {
  margin-top: 15px;
}

.acknowledgements {
  display: grid;
  gap: 7px;
  margin: 22px 0 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.acknowledgements legend {
  padding: 0 7px;
  color: var(--wine);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.06em;
}

.acknowledgements label {
  display: grid;
  grid-template-columns: 17px 1fr;
  gap: 9px;
  color: #5e534a;
  cursor: pointer;
  font-size: 11px;
  line-height: 1.65;
}

.acknowledgements input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--wine);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.toast {
  position: fixed;
  z-index: 80;
  right: 24px;
  bottom: 24px;
  max-width: min(420px, calc(100vw - 48px));
  padding: 13px 17px;
  color: #fff9f2;
  background: var(--ink);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(26, 18, 13, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
  font-size: 12px;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.is-loading {
  cursor: progress;
}

@media (max-width: 1060px) {
  .task-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .role-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .role-strip article:nth-child(3) {
    border-right: 0;
  }

  .role-strip article:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }

  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar-controls {
    width: 100%;
  }

  .search-box {
    flex: 1;
  }

  .search-box input {
    width: 100%;
  }
}

@media (max-width: 820px) {
  .site-header {
    padding: 11px 18px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .brand-copy small {
    display: none;
  }

  .header-actions {
    gap: 5px;
  }

  .header-actions .button {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 10px;
  }

  #exportButton {
    display: none;
  }

  main,
  footer {
    width: min(100% - 28px, 1240px);
  }

  .gate {
    grid-template-columns: 1fr;
    gap: 38px;
    min-height: auto;
    padding: 48px 0 70px;
  }

  .gate-copy h1 {
    font-size: clamp(36px, 10.8vw, 60px);
  }

  .gate-lead {
    margin-top: 24px;
    font-size: 15px;
  }

  .access-card {
    padding: 27px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 50px 0 48px;
  }

  .hero-copy h1 {
    font-size: clamp(34px, 9.5vw, 55px);
  }

  .progress-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px;
  }

  .progress-orbit {
    flex: 0 0 auto;
    width: 118px;
    height: 118px;
    margin: 0;
  }

  .progress-orbit::before {
    width: 98px;
    height: 98px;
  }

  .progress-orbit strong {
    font-size: 29px;
  }

  .progress-stats {
    flex: 1;
  }

  .policy-section,
  .board-section {
    padding: 55px 0;
  }

  .role-strip {
    grid-template-columns: 1fr 1fr;
  }

  .role-strip article {
    border-top: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }

  .role-strip article:nth-child(-n + 2) {
    border-top: 0;
  }

  .role-strip article:nth-child(2n) {
    border-right: 0;
  }

  .role-strip article:last-child {
    grid-column: span 2;
    border-right: 0;
  }

  .mechanism-grid {
    grid-template-columns: 1fr;
  }

  .mechanism-main {
    grid-row: auto;
  }

  .board-heading {
    grid-template-columns: auto 1fr;
  }

  .board-summary {
    grid-column: 2;
    margin-top: 10px;
  }

  .task-grid {
    grid-template-columns: 1fr;
  }

  .task-card {
    min-height: 330px;
  }

  .closing-note {
    padding-top: 64px;
  }

  footer {
    gap: 10px;
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .gate-copy h1,
  .hero-copy h1 {
    letter-spacing: -0.04em;
  }

  .gate-points,
  .hero-tags {
    gap: 6px;
  }

  .gate-points span,
  .hero-tags span {
    padding: 7px 9px;
    font-size: 10px;
  }

  .input-button-row {
    grid-template-columns: 1fr;
  }

  .input-button-row .button {
    width: 100%;
  }

  .progress-card {
    align-items: stretch;
    flex-direction: column;
  }

  .progress-orbit {
    margin: 0 auto;
  }

  .section-kicker {
    gap: 12px;
  }

  .section-kicker > span {
    width: 32px;
    height: 32px;
  }

  .section-kicker h2 {
    font-size: 34px;
  }

  .mechanism-card {
    padding: 22px;
  }

  .mechanism-main {
    padding: 25px;
  }

  .decision-list p {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .toolbar-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .phase-tabs {
    flex-wrap: nowrap;
    width: 100%;
    padding-bottom: 5px;
    overflow-x: auto;
  }

  .phase-tab {
    flex: 0 0 auto;
  }

  .selection-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .selection-bar > div {
    width: 100%;
  }

  .selection-bar .button {
    flex: 1;
  }

  .modal {
    width: calc(100% - 16px);
    max-height: 94vh;
    border-radius: 20px;
  }

  .modal form {
    padding: 22px 18px;
  }

  .modal-head h2 {
    font-size: 27px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .modal-actions .button {
    flex: 1;
  }

  .toast {
    right: 14px;
    bottom: 14px;
    max-width: calc(100vw - 28px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
