.five-code-workbench,
.five-code-overlay {
  --fc-ink: #173b31;
  --fc-muted: #677b73;
  --fc-line: #d9e6df;
  --fc-soft: #f4f8f5;
  --fc-brand: #087455;
  --fc-brand-dark: #064c3a;
  --fc-gold: #dda93f;
  --fc-danger: #a44336;
  color: var(--fc-ink);
}

.five-code-workbench {
  display: grid;
  gap: 16px;
  margin-top: 4px;
  padding: 22px;
  border: 1px solid #cee0d7;
  border-radius: 20px;
  background:
    radial-gradient(circle at 96% 4%, rgba(226, 178, 67, .13), transparent 23%),
    linear-gradient(180deg, #fbfdfc, #f4f8f6);
  box-shadow: 0 16px 40px rgba(28, 72, 58, .08);
}

.five-code-workbench :is(button, a, summary):focus-visible,
.five-code-dialog :is(button, input, select, textarea):focus-visible {
  outline: 3px solid #efb94c;
  outline-offset: 3px;
}

.five-code-workbench__hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr);
  gap: 20px;
  padding: 24px;
  border-radius: 16px;
  color: #fff;
  background:
    radial-gradient(circle at 85% 16%, rgba(239, 191, 79, .25), transparent 25%),
    linear-gradient(135deg, #073d31, #0a6e53 60%, #174c3c);
}

.five-code-workbench__hero > div > span,
.five-code-panel > header small,
.five-code-actions > header small,
.five-code-dialog header span,
.five-code-dialog section header small {
  color: #8ed1b8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .11em;
}

.five-code-workbench__hero h2 {
  margin: 8px 0 7px;
  color: #fff;
  font-size: clamp(25px, 3vw, 36px);
  letter-spacing: -.035em;
}

.five-code-workbench__hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, .82);
  font-size: 13px;
  line-height: 1.72;
}

.five-code-workbench__hero > div > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.five-code-workbench__hero > aside {
  padding: 18px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  background: rgba(255,255,255,.08);
}

.five-code-workbench__hero > aside :is(small, strong) { display: block; }
.five-code-workbench__hero > aside small { color: #f1ce7a; font-size: 10px; font-weight: 850; }
.five-code-workbench__hero > aside strong { margin: 8px 0 6px; font-size: 17px; }
.five-code-workbench__hero > aside p { font-size: 11px; }

.five-code-scenarios {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.five-code-scenarios > button {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--fc-line);
  border-radius: 12px;
  color: var(--fc-ink);
  text-align: left;
  background: #fff;
  cursor: pointer;
}

.five-code-scenarios > button:hover { border-color: #93bbaa; background: #f7fbf9; }
.five-code-scenarios > button.is-active { border-color: var(--fc-brand); box-shadow: inset 0 0 0 1px var(--fc-brand); background: #eef8f3; }
.five-code-scenarios > button > span:first-child { min-width: 0; overflow: hidden; font-size: 11px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }

.five-code-object-grid,
.five-code-readiness-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, .82fr);
  gap: 14px;
}

.five-code-passport-card,
.five-code-decision-card,
.five-code-panel,
.five-code-actions {
  border: 1px solid var(--fc-line);
  border-radius: 15px;
  background: #fff;
}

.five-code-passport-card,
.five-code-decision-card { padding: 18px; }

.five-code-passport-card > header,
.five-code-decision-card > header,
.five-code-panel > header,
.five-code-actions > header,
.five-code-action-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.five-code-passport-card > header small,
.five-code-passport-card > header h3,
.five-code-passport-card > header code { display: block; }
.five-code-passport-card > header small { color: var(--fc-brand); font-size: 9px; font-weight: 850; letter-spacing: .08em; }
.five-code-passport-card > header h3 { margin: 5px 0 3px; font-size: 19px; }
.five-code-passport-card > header code { color: var(--fc-muted); font-size: 10px; }

.five-code-passport-card__main {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 16px;
}

.five-code-qr { margin: 0; }
.five-code-qr > span {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 110px;
  aspect-ratio: 1;
  gap: 5px;
  padding: 9px;
  border: 1px solid #cddbd4;
  border-radius: 11px;
  background: #fff;
}
.five-code-qr i { border-radius: 2px; background: #0d3d31; }
.five-code-qr i:nth-child(2n) { background: #dbe9e2; }
.five-code-qr i:nth-child(4),
.five-code-qr i:nth-child(6) { background: #c48b29; }
.five-code-qr figcaption { margin-top: 7px; }
.five-code-qr figcaption :is(strong, small) { display: block; }
.five-code-qr figcaption strong { font-size: 10px; }
.five-code-qr figcaption small { margin-top: 2px; color: var(--fc-muted); font-size: 8px; }

.five-code-passport-card dl,
.five-code-dialog__context dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 0;
}

.five-code-passport-card dl > div,
.five-code-dialog__context dl > div {
  min-width: 0;
  padding: 9px;
  border-radius: 9px;
  background: var(--fc-soft);
}
.five-code-passport-card :is(dt, dd),
.five-code-dialog__context :is(dt, dd) { margin: 0; }
.five-code-passport-card dt,
.five-code-dialog__context dt { color: var(--fc-muted); font-size: 8px; }
.five-code-passport-card dd,
.five-code-dialog__context dd { margin-top: 4px; overflow-wrap: anywhere; font-size: 10px; font-weight: 750; }
.five-code-passport-card > p { margin: 15px 0 0; padding-top: 12px; border-top: 1px solid var(--fc-line); color: var(--fc-muted); font-size: 10px; line-height: 1.55; }

.five-code-decision-card > header { justify-content: flex-start; }
.five-code-decision-card > header > span:first-child { display: grid; flex: 0 0 40px; width: 40px; height: 40px; place-items: center; border-radius: 11px; color: #fff; background: var(--fc-brand); }
.five-code-decision-card > header .icon { width: 20px; }
.five-code-decision-card > header > div { flex: 1; }
.five-code-decision-card > header small,
.five-code-decision-card > header h3 { display: block; }
.five-code-decision-card > header small { color: var(--fc-muted); font-size: 9px; }
.five-code-decision-card > header h3 { margin: 4px 0 0; font-size: 16px; }
.five-code-decision-card > p { margin: 14px 0; color: var(--fc-muted); font-size: 10px; line-height: 1.65; }

.five-code-lifecycle { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.five-code-lifecycle li { display: grid; grid-template-columns: 30px 1fr; gap: 9px; align-items: center; padding: 8px 9px; border: 1px solid #e4ece8; border-radius: 9px; color: #72847d; background: #fafcfb; }
.five-code-lifecycle li > i { font-size: 9px; font-style: normal; font-weight: 900; }
.five-code-lifecycle li :is(strong, small) { display: block; }
.five-code-lifecycle li strong { font-size: 10px; }
.five-code-lifecycle li small { margin-top: 2px; font-size: 8px; }
.five-code-lifecycle li.is-complete { border-color: #b8d9ca; color: #0b664c; background: #eff8f3; }
.five-code-lifecycle li.is-current { border-color: #d8b15c; color: #765416; background: #fff8e9; }

.five-code-panel,
.five-code-actions { padding: 18px; }
.five-code-panel > header h3,
.five-code-actions > header h3 { margin: 4px 0 0; font-size: 16px; }
.five-code-panel > header small,
.five-code-actions > header small { color: var(--fc-brand); }
.five-code-gates { display: grid; gap: 7px; margin-top: 14px; }
.five-code-gate { display: grid; grid-template-columns: 28px 1fr auto; gap: 9px; align-items: center; padding: 9px; border: 1px solid #dfe9e4; border-radius: 10px; background: #fafcfb; }
.five-code-gate > span:first-child { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; color: #0c7253; background: #eaf6f0; }
.five-code-gate.is-blocked > span:first-child { color: #9a3f32; background: #fff0ed; }
.five-code-gate .icon { width: 15px; }
.five-code-gate :is(strong, small) { display: block; }
.five-code-gate strong { font-size: 10px; }
.five-code-gate small { margin-top: 2px; color: var(--fc-muted); font-size: 8px; line-height: 1.45; }

.five-code-disclosure > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.five-code-disclosure section { padding: 11px; border-radius: 10px; background: #f1f8f4; }
.five-code-disclosure section + section { background: #f7f5f0; }
.five-code-disclosure section strong { display: flex; gap: 6px; align-items: center; font-size: 10px; }
.five-code-disclosure section .icon { width: 15px; }
.five-code-disclosure ul { display: grid; gap: 4px; margin: 9px 0 0; padding-left: 17px; color: var(--fc-muted); font-size: 9px; }
.five-code-disclosure > p { margin: 11px 0 0; color: var(--fc-muted); font-size: 9px; line-height: 1.55; }

.five-code-actions > header { align-items: center; }
.five-code-actions > header h3 { max-width: 760px; }
.five-code-actions > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.five-code-action-card { display: flex; flex-direction: column; min-width: 0; padding: 13px; border: 1px solid var(--fc-line); border-radius: 12px; background: #fbfdfc; }
.five-code-action-card.is-limited { background: #fbfaf6; }
.five-code-action-card > header { justify-content: flex-start; }
.five-code-action-card > header > span:first-child { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; border-radius: 9px; color: var(--fc-brand); background: #eaf5ef; }
.five-code-action-card > header .icon { width: 17px; }
.five-code-action-card > header > div { flex: 1; min-width: 0; }
.five-code-action-card > header :is(strong, small) { display: block; }
.five-code-action-card > header strong { font-size: 12px; }
.five-code-action-card > header small { margin-top: 3px; overflow: hidden; color: var(--fc-muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.five-code-action-card dl { display: grid; gap: 6px; margin: 12px 0; }
.five-code-action-card dl > div { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 7px; padding: 7px 0; border-top: 1px solid #e5ede9; }
.five-code-action-card :is(dt, dd) { margin: 0; font-size: 9px; line-height: 1.5; }
.five-code-action-card dt { color: var(--fc-muted); }
.five-code-action-card dd { font-weight: 650; }
.five-code-action-card > button { min-height: 44px; margin-top: auto; align-self: flex-start; }

.five-code-workbench__boundary { display: flex; gap: 10px; align-items: center; padding: 13px 15px; border-radius: 12px; color: #075b45; background: #eaf5ef; }
.five-code-workbench__boundary .icon { flex: 0 0 22px; width: 22px; }
.five-code-workbench__boundary :is(strong, small) { display: block; }
.five-code-workbench__boundary strong { font-size: 11px; }
.five-code-workbench__boundary small { margin-top: 3px; color: #57746a; font-size: 9px; line-height: 1.5; }

.five-code-workbench--task {
  --fc-task-blue: #1f6581;
  --fc-task-blue-soft: #eaf5f9;
  background:
    radial-gradient(circle at 94% 2%, rgba(45, 122, 148, .14), transparent 25%),
    linear-gradient(180deg, #fbfdfd, #f2f7f7);
}

.five-code-task-hero {
  background:
    radial-gradient(circle at 83% 12%, rgba(101, 190, 202, .24), transparent 27%),
    linear-gradient(135deg, #0b3440, #0b655e 62%, #194557);
}

.five-code-task-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(140px, .8fr)) minmax(180px, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid #d7e5e4;
  border-radius: 14px;
  background: #d7e5e4;
}

.five-code-task-summary > div {
  display: flex;
  min-width: 0;
  min-height: 78px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 13px;
  background: #fff;
}

.five-code-task-summary small { color: var(--fc-muted); font-size: 8px; font-weight: 800; letter-spacing: .04em; }
.five-code-task-summary strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.five-code-task-summary code,
.five-code-task-summary span:not(.badge) { color: var(--fc-muted); font-size: 8px; }
.five-code-task-summary .badge { align-self: flex-start; }
.five-code-task-summary__progress > span { display: block; height: 7px; overflow: hidden; border-radius: 999px; background: #e6efeb; }
.five-code-task-summary__progress > span > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--fc-brand), #d4a13d); }

.five-code-two-layers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.five-code-layer-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid #cedfdf;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(13, 67, 69, .05);
}

.five-code-layer-card--reference { border-top: 4px solid var(--fc-task-blue); }
.five-code-layer-card--challenge { border-top: 4px solid #c48b29; }
.five-code-layer-card--challenge.is-inactive { border-top-color: #9caaa5; background: #fbfcfc; }
.five-code-layer-card > header { display: flex; gap: 10px; align-items: center; }
.five-code-layer-card > header > span:first-child { display: grid; flex: 0 0 40px; width: 40px; height: 40px; place-items: center; border-radius: 11px; color: #fff; background: var(--fc-task-blue); }
.five-code-layer-card--challenge > header > span:first-child { background: #a87119; }
.five-code-layer-card--challenge.is-inactive > header > span:first-child { background: #778680; }
.five-code-layer-card > header .icon { width: 19px; }
.five-code-layer-card > header > div { flex: 1; min-width: 0; }
.five-code-layer-card > header :is(small, h3) { display: block; }
.five-code-layer-card > header small { color: var(--fc-task-blue); font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.five-code-layer-card > header h3 { margin: 4px 0 0; font-size: 16px; }
.five-code-layer-card > p { margin: 13px 0; color: var(--fc-muted); font-size: 10px; line-height: 1.62; }
.five-code-layer-card__body { display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 14px; align-items: center; margin-top: 14px; }
.five-code-layer-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 0; }
.five-code-layer-card dl > div { min-width: 0; padding: 9px; border-radius: 9px; background: #f2f7f6; }
.five-code-layer-card :is(dt, dd) { margin: 0; }
.five-code-layer-card dt { color: var(--fc-muted); font-size: 8px; }
.five-code-layer-card dd { margin-top: 4px; overflow-wrap: anywhere; font-size: 9px; font-weight: 750; line-height: 1.45; }

.five-code-task-lifecycle {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.five-code-task-lifecycle li { display: grid; grid-template-columns: 27px 1fr; gap: 7px; align-items: center; min-width: 0; padding: 8px; border: 1px solid #dfe8e6; border-radius: 9px; color: #6d7f79; background: #fafcfb; }
.five-code-task-lifecycle li > i { font-size: 8px; font-style: normal; font-weight: 900; }
.five-code-task-lifecycle li :is(strong, small) { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.five-code-task-lifecycle li strong { font-size: 9px; }
.five-code-task-lifecycle li small { margin-top: 2px; font-size: 7px; }
.five-code-task-lifecycle li.is-complete { border-color: #b8d9ca; color: #0b664c; background: #eff8f3; }
.five-code-task-lifecycle li.is-current { border-color: #c69b3d; color: #755416; box-shadow: inset 0 0 0 1px #d8b15c; background: #fff8e9; }

.five-code-task-atomic {
  padding: 18px;
  border: 1px solid #cfe1dd;
  border-radius: 15px;
  background: linear-gradient(135deg, #eff8f5, #f7fbfa);
}

.five-code-task-atomic > header { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.five-code-task-atomic > header small { color: var(--fc-brand); font-size: 9px; font-weight: 900; letter-spacing: .09em; }
.five-code-task-atomic > header h3 { margin: 4px 0 0; font-size: 16px; }
.five-code-task-atomic ol { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 15px 0 12px; padding: 0; list-style: none; }
.five-code-task-atomic li { position: relative; display: grid; grid-template-columns: 30px 1fr; gap: 8px; min-width: 0; padding: 10px; border: 1px solid #d7e5e0; border-radius: 10px; background: #fff; }
.five-code-task-atomic li:not(:last-child)::after { position: absolute; z-index: 2; top: 50%; right: -9px; width: 9px; height: 2px; content: ""; background: #9bbcb0; }
.five-code-task-atomic li > i { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 8px; color: #fff; font-size: 9px; font-style: normal; font-weight: 900; background: var(--fc-brand); }
.five-code-task-atomic li :is(strong, small) { display: block; }
.five-code-task-atomic li strong { font-size: 9px; }
.five-code-task-atomic li small { margin-top: 4px; color: var(--fc-muted); font-size: 8px; line-height: 1.5; }
.five-code-task-atomic .five-code-task-lifecycle { margin-top: 13px; }

.five-code-task-control-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(430px, 1.1fr); gap: 14px; }
.five-code-task-gate.is-pending > span:first-child { color: #8a611c; background: #fff5dc; }
.five-code-task-gate.is-blocked > span:first-child { color: #9a3f32; background: #fff0ed; }
.five-code-task-control-grid .five-code-panel > footer { display: flex; gap: 9px; align-items: center; margin-top: 12px; padding: 10px; border-radius: 10px; color: #0b634b; background: #eef7f3; }
.five-code-task-control-grid .five-code-panel > footer .icon { flex: 0 0 18px; width: 18px; }
.five-code-task-control-grid .five-code-panel > footer :is(strong, small) { display: block; }
.five-code-task-control-grid .five-code-panel > footer strong { font-size: 9px; }
.five-code-task-control-grid .five-code-panel > footer small { margin-top: 3px; color: var(--fc-muted); font-size: 8px; line-height: 1.45; }

.five-code-role-table { display: grid; gap: 1px; overflow: hidden; margin-top: 14px; border: 1px solid #dce7e3; border-radius: 10px; background: #dce7e3; }
.five-code-role-table > div { display: grid; grid-template-columns: 92px 1fr 1fr; gap: 1px; background: #dce7e3; }
.five-code-role-table :is(strong, b, span) { min-width: 0; padding: 8px; background: #fff; font-size: 8px; line-height: 1.45; }
.five-code-role-table strong { color: #fff; background: #496d63; }
.five-code-role-table b { color: #075f48; }
.five-code-task-boundaries > p { margin: 11px 0 0; color: var(--fc-muted); font-size: 9px; line-height: 1.55; }
.five-code-task-actions .five-code-action-card > header > span:first-child { color: var(--fc-task-blue); background: var(--fc-task-blue-soft); }
.five-code-dialog--task > header { background: linear-gradient(135deg, #0a3742, #087064); }

body.five-code-dialog-open { overflow: hidden; }
.five-code-overlay { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(3, 20, 15, .64); backdrop-filter: blur(7px); }
.five-code-dialog { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: min(920px, 100%); max-height: min(880px, calc(100vh - 48px)); overflow: hidden; border: 1px solid #ccddd5; border-radius: 19px; background: #fff; box-shadow: 0 28px 80px rgba(0,0,0,.28); }
.five-code-dialog > header { display: flex; justify-content: space-between; gap: 16px; padding: 20px 22px; color: #fff; background: linear-gradient(135deg, #073d31, #0a7154); }
.five-code-dialog > header span { color: #9ed9c3; }
.five-code-dialog > header h2 { margin: 5px 0; color: #fff; font-size: 24px; }
.five-code-dialog > header p { max-width: 720px; margin: 0; color: rgba(255,255,255,.78); font-size: 10px; line-height: 1.55; }
.five-code-dialog > header > button { flex: 0 0 44px; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.24); border-radius: 12px; color: #fff; font-size: 25px; background: rgba(255,255,255,.08); cursor: pointer; }
.five-code-dialog__body { display: grid; gap: 12px; padding: 18px 22px; overflow: auto; }
.five-code-dialog__truth { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; padding: 11px; border: 1px solid #e5ca87; border-radius: 11px; color: #6b4d17; background: #fff9e9; }
.five-code-dialog__truth .icon { width: 20px; }
.five-code-dialog__truth :is(strong, p) { margin: 0; }
.five-code-dialog__truth strong { font-size: 10px; }
.five-code-dialog__truth p { margin-top: 3px; font-size: 9px; line-height: 1.5; }
.five-code-dialog__context,
.five-code-dialog__steps { padding: 14px; border: 1px solid var(--fc-line); border-radius: 12px; background: #fff; }
.five-code-dialog__context > header { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 11px; }
.five-code-dialog section header small { color: var(--fc-brand); }
.five-code-dialog section header h3 { margin: 4px 0 0; font-size: 14px; }
.five-code-dialog__steps ol { display: grid; gap: 7px; margin: 12px 0 0; padding: 0; list-style: none; }
.five-code-dialog__steps li { display: grid; grid-template-columns: 30px 1fr; gap: 9px; padding: 9px; border-radius: 9px; background: var(--fc-soft); }
.five-code-dialog__steps li > i { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 8px; color: #fff; font-size: 9px; font-style: normal; font-weight: 900; background: var(--fc-brand); }
.five-code-dialog__steps li :is(strong, small) { display: block; }
.five-code-dialog__steps li strong { font-size: 10px; }
.five-code-dialog__steps li small { margin-top: 3px; color: var(--fc-muted); font-size: 9px; line-height: 1.5; }
.five-code-dialog__decision { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.five-code-dialog__decision section { padding: 12px; border-radius: 10px; background: #eff7f3; }
.five-code-dialog__decision section + section { background: #fff6ea; }
.five-code-dialog__decision small { color: var(--fc-brand); font-size: 9px; font-weight: 850; }
.five-code-dialog__decision p { margin: 6px 0 0; font-size: 9px; line-height: 1.55; }
.five-code-dialog > footer { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 22px; border-top: 1px solid var(--fc-line); background: #f8faf9; }
.five-code-dialog > footer .btn { min-height: 44px; }

@media (max-width: 1024px) {
  .five-code-workbench__hero,
  .five-code-object-grid,
  .five-code-readiness-grid,
  .five-code-two-layers,
  .five-code-task-control-grid { grid-template-columns: 1fr; }
  .five-code-workbench__hero > aside { min-height: 0; }
  .five-code-task-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .five-code-task-summary > div:first-child,
  .five-code-task-summary__progress { grid-column: span 2; }
  .five-code-task-atomic ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .five-code-task-lifecycle { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .five-code-workbench { padding: 15px; }
  .five-code-workbench__hero { padding: 19px; }
  .five-code-scenarios { grid-template-columns: 1fr; }
  .five-code-actions > div { grid-template-columns: 1fr; }
  .five-code-task-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .five-code-task-summary > div:first-child,
  .five-code-task-summary__progress { grid-column: 1 / -1; }
  .five-code-task-atomic ol { grid-template-columns: 1fr; }
  .five-code-task-atomic li:not(:last-child)::after { display: none; }
  .five-code-role-table > div { grid-template-columns: 80px 1fr 1fr; }
  .five-code-action-card dl > div { grid-template-columns: 92px minmax(0, 1fr); }
  .five-code-overlay { padding: 12px; }
  .five-code-dialog { max-height: calc(100vh - 24px); }
}

@media (max-width: 480px) {
  .five-code-workbench { gap: 12px; padding: 11px; border-radius: 15px; }
  .five-code-workbench__hero { padding: 16px; border-radius: 13px; }
  .five-code-workbench__hero h2 { font-size: 25px; }
  .five-code-passport-card,
  .five-code-decision-card,
  .five-code-panel,
  .five-code-actions { padding: 13px; }
  .five-code-passport-card__main { grid-template-columns: 1fr; }
  .five-code-task-summary { grid-template-columns: 1fr; }
  .five-code-task-summary > div:first-child,
  .five-code-task-summary__progress { grid-column: auto; }
  .five-code-layer-card__body,
  .five-code-layer-card dl { grid-template-columns: 1fr; }
  .five-code-task-lifecycle { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .five-code-task-atomic > header { display: grid; }
  .five-code-role-table { overflow-x: auto; }
  .five-code-role-table > div { grid-template-columns: 76px minmax(180px, 1fr) minmax(180px, 1fr); min-width: 460px; }
  .five-code-qr { display: grid; grid-template-columns: 94px 1fr; gap: 10px; align-items: center; }
  .five-code-qr > span { width: 94px; }
  .five-code-passport-card dl,
  .five-code-dialog__context dl,
  .five-code-disclosure > div,
  .five-code-dialog__decision { grid-template-columns: 1fr; }
  .five-code-actions > header { display: grid; }
  .five-code-action-card dl > div { grid-template-columns: 1fr; }
  .five-code-action-card > button { width: 100%; justify-content: center; }
  .five-code-workbench__boundary { align-items: flex-start; }
  .five-code-dialog > header { padding: 16px; }
  .five-code-dialog > header h2 { font-size: 20px; }
  .five-code-dialog__body { padding: 13px; }
  .five-code-dialog__truth { grid-template-columns: 22px 1fr; }
  .five-code-dialog__truth .badge { grid-column: 2; justify-self: start; }
  .five-code-dialog > footer { padding: 12px 13px; }
  .five-code-dialog > footer .btn { flex: 1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .five-code-workbench *,
  .five-code-overlay * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
