.book-content > div {
  max-width: 780px;
  white-space: normal;
  text-align: left;
}

.book-main {
  min-width: 0;
}

.workspace-view {
  min-height: calc(100vh - 92px);
  padding-top: 54px;
}

.traditional-clone .home-footer,
.traditional-clone .mode-card:not(.traditional) {
  animation: workspace-fade-out .5s ease .1s forwards;
}

.traditional-clone .intro-grid {
  overflow: hidden;
  animation: traditional-hero-collapse .7s ease .1s forwards;
}

#traditional.traditional-clone-view::before {
  top: 72px;
  left: 360px;
  opacity: .22;
  background-size: 24px 24px;
  animation: traditional-grid-converge 1.5s cubic-bezier(.2, .8, .2, 1) .1s forwards;
}

#traditional.traditional-clone-view #traditional-page {
  position: relative;
  min-height: calc(100vh - 150px);
}

.traditional-workspace {
  position: absolute;
  z-index: 2;
  top: 0;
  right: auto;
  bottom: auto;
  left: 360px;
  width: calc(100% - 360px);
  min-height: calc(100vh - 150px);
  transform-origin: top left;
}

.traditional-workspace::before {
  position: absolute;
  z-index: 0;
  content: '';
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .7) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .7) 1px, transparent 1px);
  background-size: 24px 24px;
  animation: traditional-panel-grid-in .8s ease 2.6s forwards;
}

.traditional-window {
  position: absolute;
  width: 288px;
  height: 192px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 10px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 16px 34px rgba(23, 35, 52, .2);
  transition: box-shadow .18s ease, border-color .18s ease;
}

.traditional-group-container {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
  border-radius: 28px 28px 14px 14px;
  background: #102d46;
  box-shadow: 0 18px 38px rgba(23, 35, 52, .2);
}

.traditional-group-container .traditional-window,
.traditional-group-container .traditional-group-header {
  pointer-events: auto;
}

.traditional-group-container .traditional-window {
  border-radius: 10px;
}

.traditional-window.is-fused .traditional-window-header {
  background: #8993a0;
}

.traditional-window.is-fused {
  margin: 0;
  padding: 0;
  border: 0;
}

.traditional-window.fuse-target-right {
  border-right-color: transparent;
}

.traditional-window.fuse-source-right {
  border-left-color: transparent;
}

.traditional-window.fuse-target-bottom {
  border-bottom-color: transparent;
}

.traditional-window.fuse-source-bottom {
  border-top-color: transparent;
}

.traditional-window.fuse-preview-right,
.traditional-window.fuse-preview-bottom {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91, 95, 199, .25), 0 16px 34px rgba(23, 35, 52, .2);
}

.traditional-window.fuse-target-right {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.traditional-window.fuse-source-right {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.traditional-window.fuse-target-bottom {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.traditional-window.fuse-source-bottom {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.traditional-window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 34px;
  padding: 0 8px 0 13px;
  color: #fff;
  background: var(--navy);
  cursor: grab;
  font: 10px 'DM Mono', monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
  user-select: none;
  touch-action: none;
}

.traditional-window-title {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: default;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  text-overflow: ellipsis;
  text-transform: inherit;
  white-space: nowrap;
}

.traditional-window-name,
.traditional-group-name {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.traditional-name-edit {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  transition: opacity .16s ease, background-color .16s ease;
}

.traditional-window-name:hover .traditional-name-edit,
.traditional-group-name:hover .traditional-name-edit,
.traditional-name-edit:focus-visible {
  opacity: 1;
}

.traditional-name-edit:hover {
  background: rgba(255, 255, 255, .16);
  outline: none;
}

.traditional-name-edit svg {
  width: 15px;
  height: 15px;
}

.traditional-group-header {
  position: absolute;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  color: #fff;
  background: transparent;
  cursor: grab;
  font: 10px 'DM Mono', monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
  touch-action: none;
}

.traditional-group-rename {
  border: 0;
}

.traditional-name-modal {
  position: fixed;
  z-index: 3000;
  display: block;
  padding: 0;
  pointer-events: auto;
}

.traditional-name-dialog {
  display: grid;
  gap: 16px;
  width: 320px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .28);
}

.traditional-name-dialog h2 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 24px;
}

.traditional-name-dialog label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font: 11px 'DM Mono', monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.traditional-name-dialog input[type='text'] {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: transparent;
  font-size: 15px;
  font-family: inherit;
  letter-spacing: normal;
  text-transform: none;
}

.traditional-name-dialog input[type='color'] {
  width: 42px;
  height: 28px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
}

.traditional-color-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.traditional-color-row label {
  display: grid;
  gap: 7px;
}

.traditional-color-row label span {
  color: var(--muted);
  font: 10px 'DM Mono', monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.traditional-color-palette {
  position: relative;
}

.traditional-current-swatch {
  width: 42px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  cursor: pointer;
}

.traditional-color-options {
  position: absolute;
  z-index: 2;
  top: 36px;
  left: 0;
  display: none;
  grid-template-columns: repeat(8, 16px);
  gap: 2px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(23, 35, 52, .2);
}

.traditional-color-palette.is-open .traditional-color-options {
  display: grid;
}

.traditional-color-swatch {
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 3px;
  cursor: pointer;
}

.traditional-color-swatch.is-selected {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.traditional-name-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 5px;
}

.traditional-name-actions button {
  padding: 9px 13px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font: 10px 'DM Mono', monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.traditional-name-actions .traditional-name-save {
  border-color: var(--ink);
  color: #fff;
  background: var(--ink);
}

.traditional-window-header:active {
  cursor: grabbing;
}

.traditional-window-close {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.traditional-window-unlock {
  display: none;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  color: #fff;
  background: transparent;
  cursor: pointer;
}

.traditional-window.is-fused .traditional-window-unlock {
  display: grid;
}

.traditional-window-unlock:hover,
.traditional-window-unlock:focus-visible {
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  outline: none;
}

.traditional-window-unlock svg {
  width: 15px;
  height: 15px;
}

.traditional-window-close:hover,
.traditional-window-close:focus-visible {
  background: rgba(255, 255, 255, .18);
  outline: none;
}

.traditional-window-body {
  padding: 18px;
}

.traditional-window-body .eyebrow {
  margin-bottom: 10px;
  font-size: 9px;
}

.traditional-window-body h2 {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 25px;
  letter-spacing: -.04em;
}

.traditional-window-body p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.traditional-window-resize {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
}

.traditional-window-resize::after {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  content: '';
}

.traditional-detail-panel {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  left: 360px;
  min-height: 280px;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 42px rgba(23, 35, 52, .16);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}

.traditional-detail-panel.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.traditional-detail-panel h2 {
  margin-bottom: 14px;
  color: var(--ink);
  font-size: clamp(34px, 5vw, 64px);
  letter-spacing: -.055em;
}

.traditional-detail-panel p:last-child {
  max-width: 540px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.traditional-menu button.is-active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 10px 22px rgba(91, 95, 199, .28);
}

.traditional-clone .mode-grid {
  animation: traditional-grid-lift .7s ease .1s forwards;
}

.traditional-clone .mode-card.traditional {
  animation: traditional-card-expand .7s ease .45s forwards;
}

.traditional-clone .mode-card.traditional > *:not(.traditional-menu) {
  animation: card-copy-fade .35s ease .65s forwards;
}

.traditional-clone .mode-card.traditional::after {
  animation: workspace-fade-out .35s ease .65s forwards;
}

.traditional-clone .mode-card.traditional {
  justify-self: start;
  width: 100%;
}

.traditional-menu {
  position: absolute;
  inset: 25px;
  display: grid;
  align-content: start;
  gap: 12px;
  opacity: 0;
  animation: traditional-menu-in .45s ease 1.1s forwards;
}

.traditional-menu button {
  padding: 13px 14px;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 7px 16px rgba(23, 35, 52, .14);
  font: 11px 'DM Mono', monospace;
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
  opacity: 0;
  animation: traditional-button-drop .5s cubic-bezier(.2, 1.35, .35, 1) forwards;
}

.traditional-menu button:nth-child(1) { animation-delay: 1.18s; }
.traditional-menu button:nth-child(2) { animation-delay: 1.32s; }
.traditional-menu button:nth-child(3) { animation-delay: 1.46s; }

.traditional-menu button:hover,
.traditional-menu button:focus-visible {
  box-shadow: 0 10px 20px rgba(23, 35, 52, .2);
  background: var(--accent-soft);
  outline: none;
  transform: translateX(4px);
}

.workspace-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 92px);
  align-items: stretch;
  min-height: 620px;
}

.workspace-menu {
  display: flex;
  flex-direction: column;
  padding: 20px 0 28px;
  border-right: 1px solid var(--line);
  animation: workspace-menu-in .55s ease both;
}

.workspace-menu h1 {
  margin-bottom: 20px;
  font-size: clamp(46px, 5vw, 74px);
}

.workspace-intro {
  max-width: 250px;
  margin-bottom: 38px;
  color: var(--muted);
  line-height: 1.6;
}

.workspace-actions {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.workspace-action {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 2px 12px;
  padding: 15px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  color: var(--ink);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  opacity: 0;
  animation: workspace-action-in .45s ease forwards;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.workspace-action:nth-child(2) { animation-delay: .16s; }
.workspace-action:nth-child(3) { animation-delay: .32s; }
.workspace-action:hover { border-color: var(--ink); box-shadow: 0 10px 22px var(--shadow); transform: translateX(5px); }
.workspace-action span { grid-row: 1 / 3; color: var(--accent); font: 10px 'DM Mono', monospace; }
.workspace-action strong { font-size: 18px; }
.workspace-action small { color: var(--muted); font-size: 11px; }

.workspace-grid-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 4vw, 52px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 18px 38px var(--shadow);
  animation: workspace-panel-in .7s .08s ease both;
}

.workspace-grid-lines {
  position: absolute;
  inset: 0;
  opacity: .42;
  pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

.workspace-panel-heading,
.workspace-grid-cards {
  position: relative;
}

.workspace-panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 46px;
}

.workspace-panel-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(32px, 4vw, 58px);
  letter-spacing: -.055em;
}

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

.workspace-grid-cards article {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 82%, var(--accent-soft));
}

.workspace-grid-cards article span {
  color: var(--muted);
  font: 10px 'DM Mono', monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.workspace-grid-cards article strong {
  max-width: 360px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.25;
}

.workspace-grid-cards .workspace-wide {
  grid-column: 1 / -1;
  min-height: 170px;
}

.signal-good { color: var(--green) !important; }

.workspace-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--accent);
}

.workspace-flow b { font-size: 20px; }
.workspace-flow i { flex: 1; height: 1px; background: var(--accent); }

@keyframes workspace-fade-out { to { opacity: 0; transform: translateY(-10px); } }
@keyframes traditional-hero-collapse { from { max-height: 500px; opacity: 1; } to { max-height: 0; margin: 0; opacity: 0; } }
@keyframes traditional-grid-lift { from { margin-top: 78px; } to { margin-top: 0; } }
@keyframes traditional-grid-converge { from { top: -72px; left: -18vw; opacity: .22; background-size: 44px 44px; } to { top: 72px; left: 360px; opacity: 0; background-size: 24px 24px; } }
@keyframes traditional-grid-converge-mobile { from { top: -52px; left: -18vw; opacity: .22; background-size: 44px 44px; } to { top: 52px; left: 0; opacity: 0; background-size: 24px 24px; } }
@keyframes traditional-panel-grid-in { 0% { opacity: 0; } 25% { opacity: .22; } 43% { opacity: .02; } 61% { opacity: .22; } 76% { opacity: .08; } 100% { opacity: .22; } }
@keyframes traditional-card-expand { 0% { min-height: 270px; width: 100%; } 72% { min-height: calc(100vh - 130px); width: min(100%, 340px); } 100% { min-height: calc(100vh - 150px); width: min(100%, 320px); } }
@keyframes traditional-menu-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes traditional-button-drop { 0% { opacity: 0; transform: translateY(-18px) scale(.94); } 65% { opacity: 1; transform: translateY(4px) scale(1.02); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes card-copy-fade { to { opacity: 0; transform: translateX(-12px); } }
@keyframes card-morph { to { transform: translateX(-8px) scale(1.05); border-radius: 5px; box-shadow: 0 0 0 2px var(--accent); } }
@keyframes workspace-menu-in { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: translateX(0); } }
@keyframes workspace-action-in { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: translateX(0); } }
@keyframes workspace-panel-in { from { opacity: 0; transform: translateX(35px) scale(.98); } to { opacity: 1; transform: translateX(0) scale(1); } }

.book-content > div > p {
  margin: 0 0 1.35em;
  text-wrap: pretty;
}

.book-content > div > p:last-child {
  margin-bottom: 0;
}

.book-subheading {
  margin: 2.4em 0 .7em;
  padding-top: .7em;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.book-principle {
  margin: 0 0 1.4em !important;
  color: var(--accent) !important;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.2;
}

.book-heading-lede {
  margin-top: -.35em !important;
  color: var(--ink) !important;
  font-size: 1.08em;
}

.book-content > div > ol {
  margin: 0 0 1.5em;
  padding-left: 1.6em;
}

.book-content > div > ol li {
  margin: .55em 0;
  padding-left: .35em;
}

.book-callout {
  margin: 1.8em 0;
  padding: 22px 24px;
  border-left: 4px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  color: var(--ink) !important;
  font-size: .96em;
}

.book-callout + .book-callout {
  margin-top: -1em;
}

.book-examples {
  padding-top: 10px;
}

.examples-intro {
  max-width: 700px;
  margin-bottom: 42px;
}

.examples-intro h2 {
  margin-bottom: 16px;
  color: var(--ink);
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -.055em;
}

.examples-intro > p:last-child {
  max-width: 600px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

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

.example-card {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 88%, var(--accent-soft));
  box-shadow: 0 12px 28px var(--shadow);
}

.example-card-heading {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 12px;
}

.example-card-heading .card-index {
  margin: 0;
}

.example-card h3 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -.04em;
}

.example-card > p {
  min-height: 54px;
  margin-bottom: 22px;
  color: var(--muted);
  line-height: 1.55;
}

.example-card img {
  display: block;
  width: 100%;
  height: 330px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #fff;
}

.book-tutorial {
  padding-top: 10px;
}

.tutorial-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.tutorial-heading h2 {
  margin-bottom: 14px;
  color: var(--ink);
  font-size: clamp(38px, 5vw, 68px);
  line-height: .98;
  letter-spacing: -.06em;
}

.tutorial-heading p:last-child {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.tutorial-progress {
  flex: 0 0 auto;
  padding: 10px 12px;
  border: 1px solid var(--line);
  color: var(--muted);
  font: 11px 'DM Mono', monospace;
  letter-spacing: .1em;
}

.tutorial-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.tutorial-steps {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 5px;
}

.tutorial-step {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-left: 2px solid var(--line);
  color: var(--muted);
  background: transparent;
  font: 13px 'DM Sans', sans-serif;
  text-align: left;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}

.tutorial-step span {
  color: var(--accent);
  font: 10px 'DM Mono', monospace;
}

.tutorial-step:hover,
.tutorial-step.active {
  border-color: var(--accent-soft);
  border-left-color: var(--accent);
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
}

.tutorial-stage {
  min-width: 0;
}

.tutorial-explanation {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 18px;
  align-items: baseline;
  margin-bottom: 22px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 10px 24px var(--shadow);
}

.tutorial-explanation .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.tutorial-explanation h3 {
  margin: 0;
  color: var(--ink);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -.04em;
}

.tutorial-explanation > p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.opm-paper {
  display: grid;
  grid-template-columns: 1.05fr 1.75fr .9fr;
  grid-template-rows: 74px 130px 108px 106px 98px 78px 74px;
  gap: 6px;
  padding: 10px;
  border: 10px solid #25364a;
  border-radius: 4px;
  background: #f7f3e9;
  box-shadow: 0 18px 35px var(--shadow);
}

.opm-region {
  min-width: 0;
  padding: 10px;
  overflow: hidden;
  border: 1px solid #92a9b8;
  color: #172334;
  background: #fff;
  font: 11px 'DM Mono', monospace;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.opm-region:hover,
.opm-region.active {
  z-index: 1;
  border-color: #5b5fc7;
  background: #e9eaff;
  box-shadow: 0 0 0 3px rgba(91, 95, 199, .22);
  transform: translateY(-2px);
}

.opm-region strong,
.opm-region span {
  display: block;
}

.opm-matrix {
  overflow: auto;
}

.opm-task-matrix {
  min-width: 560px;
  margin-top: 6px;
  color: #50677a;
  font-size: 7px;
  text-align: center;
}

.opm-matrix-head,
.opm-matrix-row {
  display: grid;
  grid-template-columns: minmax(150px, 2fr) repeat(12, 16px) 42px;
  align-items: center;
  gap: 2px;
}

.opm-matrix-head {
  padding-bottom: 4px;
  border-bottom: 1px solid #92a9b8;
  color: #25364a;
  font-size: 6px;
  font-weight: 700;
}

.opm-matrix-head span:first-child,
.opm-matrix-row span:first-child {
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opm-matrix-row {
  min-height: 12px;
  border-bottom: 1px dotted #d0dce2;
}

.opm-matrix-row > span {
  display: block;
  color: #50677a;
  font-size: 6px;
  line-height: 1.1;
}

.opm-matrix-row i {
  width: 7px;
  height: 7px;
  justify-self: center;
  border: 1px solid #50677a;
  border-radius: 50%;
}

.opm-matrix-row i.opm-cell-filled {
  border-color: #5b5fc7;
  background: #5b5fc7;
}

.opm-matrix-row i.opm-cell-current {
  box-shadow: 0 0 0 2px #e3b84d;
}

.opm-task-rows {
  display: grid !important;
  gap: 2px;
  max-height: 88px;
  margin-top: 4px;
  overflow: hidden;
}

.opm-task-rows i {
  display: block;
  overflow: hidden;
  color: #50677a;
  font-size: 7px;
  font-style: normal;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opm-region strong {
  margin-bottom: 8px;
  color: #25364a;
  font-size: 11px;
  letter-spacing: -.02em;
}

.opm-region span {
  color: #50677a;
  font-size: 9px;
  line-height: 1.55;
}

.opm-header {
  grid-column: 1 / -1;
  color: #fff;
  background: #2d5874;
  font-size: 13px;
  font-weight: 600;
}

.opm-header small {
  display: block;
  margin-top: 8px;
  color: #d9eaf1;
  font: 9px 'DM Mono', monospace;
}

.opm-owners { grid-column: 3; grid-row: 2 / 4; background: #dbeaf0; }
.opm-matrix { grid-column: 2; grid-row: 2 / 4; background: #fff; }
.opm-objectives { grid-column: 1; grid-row: 2 / 4; background: #dbeaf0; }
.opm-tasks { grid-column: 1; grid-row: 4; background: #f2dfb0; }
.opm-alignment { grid-column: 2; grid-row: 4; background: #fff; }
.opm-dates { grid-column: 3; grid-row: 4; background: #dbeaf0; }
.opm-schedule { grid-column: 1 / 3; grid-row: 5; background: #fff; }
.opm-owner-grid { grid-column: 3; grid-row: 5; background: #dbeaf0; }
.opm-risks { grid-column: 1 / 3; grid-row: 6; background: #dbeaf0; }
.opm-costs { grid-column: 3; grid-row: 6; background: #f2dfb0; }
.opm-summary { grid-column: 1 / -1; grid-row: 7; background: #fff; }

.traffic-lights {
  display: flex !important;
  gap: 6px;
  margin-top: 14px;
}

.traffic-lights i {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #62a77e;
}

.traffic-lights i:nth-child(2) { background: #e3b84d; }
.traffic-lights i:nth-child(3) { background: #c75c62; }

@media (max-width: 800px) {
  .examples-grid {
    grid-template-columns: 1fr;
  }

  .traditional-clone .mode-grid {
    animation-name: traditional-grid-lift-mobile;
  }

  #traditional.traditional-clone-view::before {
    top: 52px;
    left: -18vw;
    animation-name: traditional-grid-converge-mobile;
  }

  .traditional-workspace {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    min-height: 420px;
    margin-top: 24px;
  }

  .traditional-window {
    width: min(288px, calc(100% - 24px));
  }

  .example-card img {
    height: auto;
    max-height: 420px;
  }

  .tutorial-heading {
    display: block;
  }

  .tutorial-progress {
    display: inline-block;
    margin-top: 18px;
  }

  .tutorial-layout {
    grid-template-columns: 1fr;
  }

  .tutorial-steps {
    position: static;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .tutorial-step {
    flex: 0 0 auto;
    width: 150px;
  }

  .tutorial-explanation {
    display: block;
  }

  .tutorial-explanation h3 {
    margin: 8px 0;
  }

  .opm-paper {
    grid-template-columns: 1fr 1.5fr .85fr;
    gap: 3px;
    padding: 5px;
    border-width: 6px;
  }

  .opm-region {
    padding: 6px;
  }

  .opm-region strong {
    font-size: 8px;
  }

  .opm-region span,
  .opm-header small {
    font-size: 7px;
  }

  .opm-task-rows i {
    font-size: 6px;
  }

  .opm-task-matrix {
    min-width: 540px;
  }

  .workspace-view {
    min-height: auto;
  }

  .workspace-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .workspace-menu {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 28px;
  }

  .workspace-intro {
    max-width: 520px;
  }

  .workspace-actions {
    margin-top: 12px;
  }

  .workspace-grid-cards {
    grid-template-columns: 1fr;
  }

  .workspace-grid-cards .workspace-wide {
    grid-column: auto;
  }

  .workspace-flow b {
    font-size: 16px;
  }
}

@keyframes traditional-grid-lift-mobile { from { margin-top: 52px; } to { margin-top: 0; } }

.book-figure {
  margin: 32px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  text-align: center;
  white-space: normal;
}

.book-figure img {
  display: block;
  width: 100%;
  max-height: 680px;
  object-fit: contain;
  margin: 0 auto;
}

.book-figure figcaption {
  margin-top: 12px;
  color: var(--muted);
  font: 12px 'DM Mono', monospace;
  letter-spacing: .04em;
}

.agentic .mode-icon.agentic-bot { width: 70px; height: 70px; }

/* Traditional tutorial: mirror the integrated OPPM sheet from the reference PDF. */
.opm-paper {
  grid-template-columns: minmax(108px, .72fr) minmax(210px, 1.65fr) minmax(330px, 3.25fr) minmax(116px, .92fr);
  grid-template-rows: 76px 292px 112px 118px 86px;
  gap: 0; padding: 0; border: 7px solid #182c40; border-radius: 2px; background: #fff;
}
.opm-region { border: 0; border-right: 1px solid #9bb0c0; border-bottom: 1px solid #9bb0c0; border-radius: 0; padding: 8px; background: #fff; }
.opm-region:hover, .opm-region.active { border-color: #5b5fc7; background: #eef0ff; }
.opm-header { grid-column: 1 / -1; grid-row: 1; border-bottom: 4px solid #182c40; padding: 8px 10px; color: #172334; background: #fff; text-align: left; }
.opm-header strong { color: #172334; font-family: Inter, system-ui, sans-serif; font-size: 12px; }
.opm-header span { display: inline; margin-left: 10px; color: #172334; font: 11px Inter, system-ui, sans-serif; font-weight: 700; }
.opm-header small { margin-top: 7px; color: #172334; font: 9px Inter, system-ui, sans-serif; font-weight: 700; line-height: 1.35; }
.opm-objectives { grid-column: 1; grid-row: 2; background: #eef4f8; }
.opm-tasks { grid-column: 2; grid-row: 2; text-align: left; }
.opm-schedule { grid-column: 3; grid-row: 2; overflow: hidden; text-align: left; }
.opm-owners { grid-column: 4; grid-row: 2; background: #eef4f8; }
.opm-alignment { grid-column: 1; grid-row: 3; background: #eef4f8; }
.opm-dates { grid-column: 2; grid-row: 3; background: #f6f7f8; }
.opm-risks { grid-column: 3; grid-row: 3; background: #eef4f8; }
.opm-owner-grid { grid-column: 4; grid-row: 3; background: #eef4f8; }
.opm-costs { grid-column: 3 / 5; grid-row: 4 / 6; background: #f6f7f8; }
.opm-summary { grid-column: 1 / 3; grid-row: 4 / 6; border-bottom: 0; }
.opm-paper .opm-region strong { margin-bottom: 6px; color: #172334; font-family: Inter, system-ui, sans-serif; font-size: 10px; font-weight: 800; letter-spacing: -.02em; }
.opm-paper .opm-region span, .opm-paper .opm-region small { color: #40566a; font-family: Inter, system-ui, sans-serif; font-size: 8px; line-height: 1.35; }
.opm-task-list { display: grid; gap: 2px; margin-top: 4px; }
.opm-task-list span { display: block; overflow: hidden; border-bottom: 1px dotted #c2ced7; color: #172334 !important; font-size: 7px !important; font-weight: 700; line-height: 1.4 !important; text-overflow: ellipsis; white-space: nowrap; }
.opm-schedule-caption { margin: -1px 0 4px; color: #50677a; font: 7px 'DM Mono', monospace; }
.opm-schedule .opm-task-matrix { min-width: 0; margin-top: 2px; }
.opm-schedule .opm-matrix-head, .opm-schedule .opm-matrix-row { grid-template-columns: repeat(12, minmax(12px, 1fr)); gap: 2px; }
.opm-schedule .opm-matrix-head span:first-child, .opm-schedule .opm-matrix-head span:last-child, .opm-schedule .opm-matrix-row span:first-child, .opm-schedule .opm-matrix-row span:last-child { display: none; }
.opm-schedule .opm-matrix-head { color: #172334; font-size: 6px; text-transform: uppercase; }
.opm-schedule .opm-matrix-row { min-height: 10px; }
.opm-schedule .opm-matrix-row i { width: 7px; height: 7px; }
.opm-owner-list { display: grid; gap: 9px; margin: 12px 0 10px; color: #172334; font: 8px 'DM Mono', monospace; }
.opm-owner-list span::before { content: 'A'; display: inline-grid; width: 13px; height: 13px; margin-right: 5px; place-items: center; color: #fff; background: #5b8fd8; font-size: 7px; }
.opm-owners small { display: block; font-size: 7px !important; }
.opm-alignment-lines { display: grid; gap: 11px; margin-top: 14px; }
.opm-alignment-lines i { display: block; height: 1px; background: #7799b0; }
.opm-dates small { display: block; margin-top: 12px; }
.opm-risks .traffic-lights { margin-top: 13px; }
.opm-owner-grid span { display: block; margin-top: 9px; font-size: 7px !important; }
.opm-costs { display: grid; grid-template-columns: auto 1fr; gap: 5px 16px; align-content: start; }
.opm-costs strong { grid-column: 1 / -1; }
.opm-summary { display: grid; align-content: center; background: #fff; }
.opm-summary span { max-width: 430px; }

@media (max-width: 800px) {
  .opm-paper { grid-template-columns: minmax(72px, .72fr) minmax(150px, 1.65fr) minmax(210px, 3.25fr) minmax(86px, .92fr); grid-template-rows: 76px 292px 120px 118px 86px; overflow-x: auto; }
}
