.dm5-guide .dm-article-content {
  --dm5-ink: #26352f;
  --dm5-deep: #193b34;
  --dm5-leaf: #597667;
  --dm5-cream: #f7f1e8;
  --dm5-paper: #fffdf8;
  --dm5-clay: #853e2c;
  --dm5-clay-decor: #b86343;
  --dm5-gold: #d0a756;
}

.dm5-hero-marker {
  display: block;
  height: 1px;
}

.dm5-editorial-image,
.dm5-visual {
  width: 100%;
  max-width: 100% !important;
  margin: clamp(2.6rem, 7vw, 5.4rem) 0 !important;
  transform: none;
}

.dm5-editorial-image {
  position: relative;
}

.dm5-editorial-image img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid rgba(73, 86, 74, 0.16);
  border-radius: clamp(20px, 3vw, 34px);
  box-shadow: 0 28px 70px rgba(35, 47, 39, 0.16);
}

.dm5-editorial-image figcaption {
  position: relative;
  width: min(760px, 92%);
  margin: -1.4rem auto 0;
  padding: 1rem 1.25rem;
  color: #4e5b54;
  line-height: 1.6;
  background: rgba(255, 253, 248, 0.94);
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(35, 47, 39, 0.12);
}

.dm5-editorial-image figcaption strong {
  display: block;
  color: var(--dm5-deep);
  font-family: var(--wp--preset--font-family--serif, Georgia, serif);
  font-size: 1.12rem;
}

.dm5-visual {
  position: relative;
  overflow: hidden;
  padding: clamp(1.35rem, 4vw, 3rem);
  background:
    radial-gradient(circle at 90% 0, rgba(208, 167, 86, 0.16), transparent 30%),
    linear-gradient(145deg, #fffdf8, #f3eee3);
  border: 1px solid rgba(82, 103, 88, 0.18);
  border-radius: clamp(24px, 4vw, 40px);
  box-shadow: 0 26px 72px rgba(38, 53, 47, 0.12);
}

.dm5-visual::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.25) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent 62%);
}

.dm5-visual > * {
  position: relative;
}

.dm5-visual__header {
  max-width: 760px;
  margin-bottom: 1.5rem;
}

.dm5-kicker,
.dm5-card-grid__label,
.dm5-compare__flag {
  margin: 0 0 0.45rem;
  color: var(--dm5-clay);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.dm5-visual__header h3 {
  margin: 0.15rem 0 0.6rem !important;
  color: var(--dm5-deep) !important;
  font-size: clamp(1.7rem, 4vw, 3.15rem) !important;
  line-height: 1.02 !important;
}

.dm5-visual__header > p:last-child {
  margin: 0;
  color: #536159;
  font-size: 1.02rem;
  line-height: 1.65;
}

.dm5-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.dm5-card-grid article {
  min-height: 170px;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(83, 103, 89, 0.16);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(38, 53, 47, 0.06);
}

.dm5-field-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.dm5-field-grid article {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(83, 103, 89, 0.16);
  border-radius: 17px;
}

.dm5-field-grid h4,
.dm5-layouts h4,
.dm5-decision h4 {
  margin: 0.15rem 0 0.45rem !important;
  color: var(--dm5-deep) !important;
  font-size: 1.02rem !important;
}

.dm5-field-grid article > p:last-child,
.dm5-layouts article > p:last-child,
.dm5-decision li > p:last-child {
  margin: 0;
  color: #56625b;
  font-size: 0.94rem;
  line-height: 1.5;
}

.dm5-note-fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.dm5-note-fields label {
  display: grid;
  gap: 0.45rem;
  color: var(--dm5-deep);
  font-weight: 750;
}

.dm5-note-fields input {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.8rem;
  color: var(--dm5-ink);
  background: #fff;
  border: 1px solid rgba(25, 59, 52, 0.32);
  border-radius: 12px;
}

.dm5-layouts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.dm5-layouts article {
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(83, 103, 89, 0.16);
  border-radius: 18px;
}

.dm5-mini-plan {
  position: relative;
  min-height: 145px;
  margin-bottom: 0.8rem;
  overflow: hidden;
  background: #f8f5ee;
  border: 2px solid rgba(25, 59, 52, 0.36);
  border-radius: 12px;
}

.dm5-mini-plan span {
  position: absolute;
  display: block;
}

.dm5-mini-plan__door {
  bottom: -2px;
  left: 9%;
  width: 29%;
  height: 24%;
  border-top: 3px solid var(--dm5-clay);
  border-right: 3px solid var(--dm5-clay);
  border-radius: 0 100% 0 0;
}

.dm5-mini-plan__seat {
  top: 14%;
  right: 9%;
  width: 47%;
  height: 28%;
  background: #c6d2c7;
  border: 2px solid #597667;
  border-radius: 7px;
}

.dm5-mini-plan__table {
  top: 48%;
  right: 22%;
  width: 19%;
  aspect-ratio: 1;
  background: #d8af75;
  border: 2px solid #946642;
  border-radius: 50%;
}

.dm5-mini-plan__route {
  bottom: 14%;
  left: 10%;
  width: 70%;
  border-top: 4px dashed var(--dm5-clay);
}

.dm5-mini-plan__route::after {
  position: absolute;
  top: -6px;
  right: -2px;
  content: "";
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 10px solid var(--dm5-clay);
}

.dm5-mini-plan--2 .dm5-mini-plan__seat { top: 10%; right: auto; left: 8%; width: 28%; height: 67%; }
.dm5-mini-plan--2 .dm5-mini-plan__table { top: 15%; right: 35%; }
.dm5-mini-plan--3 .dm5-mini-plan__seat { top: 8%; right: 8%; width: 70%; height: 24%; }
.dm5-mini-plan--3 .dm5-mini-plan__table { top: 38%; right: 10%; }
.dm5-mini-plan--4 .dm5-mini-plan__seat { top: 12%; right: 10%; width: 34%; height: 34%; border-radius: 50%; }
.dm5-mini-plan--4 .dm5-mini-plan__table { top: 50%; right: 18%; }
.dm5-mini-plan--5 .dm5-mini-plan__seat { top: 10%; right: auto; left: 8%; width: 68%; height: 22%; }
.dm5-mini-plan--5 .dm5-mini-plan__table { top: 38%; right: auto; left: 18%; width: 55%; aspect-ratio: auto; height: 16%; border-radius: 5px; }
.dm5-mini-plan--6 .dm5-mini-plan__seat { top: 10%; right: 8%; width: 29%; height: 28%; }
.dm5-mini-plan--6 .dm5-mini-plan__table { top: 50%; right: 14%; }

.dm5-decision {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.dm5-decision li {
  position: relative;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(83, 103, 89, 0.17);
  border-radius: 17px;
}

.dm5-decision li:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -1.05rem;
  color: var(--dm5-clay);
  font-size: 1.4rem;
  font-weight: 900;
  content: "→";
  transform: translateY(-50%);
}

.dm5-card-grid h4,
.dm5-compare h4,
.dm5-plan h4,
.dm5-duoplan h4 {
  margin: 0.2rem 0 0.55rem !important;
  color: var(--dm5-deep) !important;
  font-size: 1.15rem !important;
}

.dm5-card-grid article > p:last-child,
.dm5-compare article > p:last-child {
  margin: 0;
  color: #56625b;
  line-height: 1.58;
}

.dm5-plan {
  position: relative;
  display: grid;
  grid-template-rows: repeat(6, minmax(42px, auto));
  grid-template-columns: repeat(6, 1fr);
  gap: 0.65rem;
  min-height: 390px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.58);
  border: 2px solid rgba(25, 59, 52, 0.32);
  border-radius: 22px;
}

.dm5-plan__cell {
  z-index: 2;
  padding: 1rem;
  background: rgba(255, 253, 248, 0.95);
  border: 1px solid rgba(83, 103, 89, 0.2);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(38, 53, 47, 0.07);
}

.dm5-plan__cell p:last-child {
  margin: 0;
  color: #56625b;
  line-height: 1.48;
}

.dm5-plan__cell--1 { grid-area: 1 / 1 / 3 / 4; }
.dm5-plan__cell--2 { grid-area: 1 / 4 / 4 / 7; }
.dm5-plan__cell--3 { grid-area: 4 / 1 / 7 / 3; }
.dm5-plan__cell--4 { grid-area: 5 / 3 / 7 / 7; }

.dm5-plan__route {
  position: absolute;
  z-index: 1;
  top: 57%;
  right: 12%;
  left: 13%;
  height: 0;
  border-top: 4px dashed var(--dm5-clay);
  transform: rotate(-9deg);
}

.dm5-plan__route::after {
  position: absolute;
  top: -9px;
  right: -2px;
  content: "";
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 14px solid var(--dm5-clay);
}

.dm5-plan__route span {
  position: absolute;
  top: -2rem;
  left: 40%;
  padding: 0.25rem 0.55rem;
  color: #8f4b35;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #fff7ef;
  border-radius: 999px;
}

.dm5-steps {
  display: grid;
  gap: 0.75rem;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.dm5-steps li {
  display: grid;
  grid-template-columns: minmax(96px, 0.5fr) 2fr;
  gap: 1rem;
  align-items: start;
  padding: 1rem 1.15rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(83, 103, 89, 0.14);
  border-radius: 18px;
}

.dm5-steps span {
  color: var(--dm5-deep);
  font-weight: 850;
}

.dm5-steps p {
  margin: 0;
  color: #56625b;
}

.dm5-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.dm5-compare__panel {
  padding: clamp(1.15rem, 3vw, 1.7rem);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(83, 103, 89, 0.15);
  border-radius: 22px;
}

.dm5-compare__panel.is-friction {
  background: linear-gradient(145deg, #fff9f4, #f4e2d7);
}

.dm5-compare__panel.is-better {
  background: linear-gradient(145deg, #f9fff9, #e4eee5);
}

.dm5-compare__flag {
  display: inline-flex;
  padding: 0.35rem 0.6rem;
  background: rgba(184, 99, 67, 0.1);
  border-radius: 999px;
}

.dm5-compare__panel.is-better .dm5-compare__flag {
  color: #315d4d;
  background: rgba(49, 93, 77, 0.1);
}

.dm5-duoplan {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.dm5-duoplan__panel {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(83, 103, 89, 0.17);
  border-radius: 22px;
}

.dm5-duoplan__canvas {
  position: relative;
  min-height: 270px;
  margin-bottom: 1rem;
  overflow: hidden;
  background: #fbf8f1;
  border: 3px solid rgba(25, 59, 52, 0.55);
  border-radius: 15px;
}

.dm5-duoplan__canvas span {
  position: absolute;
  display: block;
}

.dm5-duoplan__door {
  bottom: -3px;
  left: 8%;
  width: 31%;
  height: 25%;
  border-top: 3px solid var(--dm5-deep);
  border-right: 3px solid var(--dm5-deep);
  border-radius: 0 100% 0 0;
}

.dm5-duoplan__fixed {
  background: #dce4dc;
  border: 2px solid #597667;
  border-radius: 8px;
}

.dm5-duoplan__fixed--one { top: 8%; left: 8%; width: 31%; height: 23%; }
.dm5-duoplan__fixed--two { top: 8%; right: 8%; width: 23%; height: 40%; }
.dm5-duoplan__fixed--three { right: 8%; bottom: 8%; width: 29%; height: 22%; }

.dm5-duoplan__route {
  bottom: 24%;
  left: 12%;
  width: 69%;
  border-top: 6px dashed var(--dm5-clay);
  transform: rotate(-23deg);
}

.dm5-duoplan__route::after {
  position: absolute;
  top: -7px;
  right: -4px;
  content: "";
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 10px solid currentColor;
}

.dm5-duoplan__movable {
  bottom: 18%;
  left: 38%;
  width: 25%;
  height: 22%;
  background: repeating-linear-gradient(135deg, #efc5b4 0 8px, #f8dfd4 8px 16px);
  border: 3px solid var(--dm5-clay);
  border-radius: 8px;
  transform: rotate(-6deg);
}

.dm5-duoplan__panel.is-better .dm5-duoplan__route {
  border-color: #315d4d;
  transform: rotate(-15deg);
}

.dm5-duoplan__panel.is-better .dm5-duoplan__movable {
  top: 38%;
  right: 9%;
  bottom: auto;
  left: auto;
  width: 16%;
  height: 17%;
  background: #e4eee5;
  border-color: #315d4d;
  transform: none;
}

.dm5-duoplan__panel > p:last-child {
  margin: 0;
  color: #56625b;
  line-height: 1.55;
}

.dm5-swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
}

.dm5-swatch-photo {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(180px, 0.65fr);
  gap: 1rem;
  align-items: end;
  margin: 0 0 1rem;
}

.dm5-swatch-photo img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 20px;
}

.dm5-swatch-photo figcaption {
  color: #56625b;
  line-height: 1.55;
}

.dm5-swatches > div {
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(83, 103, 89, 0.14);
  border-radius: 18px;
}

.dm5-swatches span {
  display: block;
  aspect-ratio: 1.2;
  background: var(--dm5-swatch);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(25, 59, 52, 0.12);
}

.dm5-swatches strong,
.dm5-swatches small {
  display: block;
}

.dm5-swatches strong {
  margin-top: 0.65rem;
  color: var(--dm5-deep);
}

.dm5-swatches small {
  color: #66736b;
}

.dm5-checklist {
  display: grid;
  gap: 0.65rem;
}

.dm5-checklist__progress {
  color: var(--dm5-deep);
  font-weight: 800;
}

.dm5-checklist label {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(83, 103, 89, 0.14);
  border-radius: 15px;
}

.dm5-checklist input {
  flex: 0 0 auto;
  width: 1.3rem;
  height: 1.3rem;
  margin: 0.1rem 0 0;
  accent-color: var(--dm5-deep);
}

.dm5-checklist label:has(input:checked) {
  color: #315245;
  background: #e7f0e8;
}

.dm5-checklist button {
  justify-self: start;
  margin-top: 0.5rem;
  padding: 0.65rem 0.9rem;
  color: var(--dm5-deep);
  font-weight: 750;
  cursor: pointer;
  background: transparent;
  border: 1px solid rgba(25, 59, 52, 0.25);
  border-radius: 999px;
}

.dm5-outcomes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin: 0.75rem 0 0;
  padding: 1rem;
  border: 1px solid rgba(83, 103, 89, 0.2);
  border-radius: 16px;
}

.dm5-outcomes legend {
  padding: 0 0.4rem;
  color: var(--dm5-deep);
  font-weight: 800;
}

.dm5-outcomes label {
  min-height: 54px;
}

.dm5-evidence-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.dm5-evidence-fields label {
  display: grid;
  gap: 0.45rem;
  color: var(--dm5-deep);
  font-weight: 750;
}

.dm5-evidence-fields input,
.dm5-scorecard input {
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 0.65rem;
  color: var(--dm5-ink);
  background: #fff;
  border: 1px solid rgba(25, 59, 52, 0.36);
  border-radius: 9px;
}

.dm5-scorecard {
  max-width: 100%;
  overflow: auto;
  border: 1px solid rgba(83, 103, 89, 0.22);
  border-radius: 16px;
}

.dm5-scorecard table {
  min-width: 940px;
  margin: 0;
  background: rgba(255, 255, 255, 0.72);
  border-collapse: collapse;
}

.dm5-scorecard caption {
  padding: 0.85rem 1rem;
  color: #45534b;
  font-weight: 650;
  text-align: left;
  background: #f3eee3;
}

.dm5-scorecard th,
.dm5-scorecard td {
  padding: 0.55rem;
  border: 1px solid rgba(83, 103, 89, 0.18);
}

.dm5-scorecard th {
  color: var(--dm5-deep);
  background: #eef2eb;
}

.dm5-scorecard__result {
  margin: 0.9rem 0 0;
  padding: 0.85rem 1rem;
  color: var(--dm5-deep);
  background: #e7f0e8;
  border-radius: 14px;
}

.dm5-table-wrap {
  max-width: 100%;
  overflow: auto;
  border: 1px solid rgba(83, 103, 89, 0.18);
  border-radius: 16px;
}

.dm5-table-wrap table {
  min-width: 640px;
  margin: 0;
}

.dm5-table-wrap:focus-visible {
  outline: 3px solid var(--dm5-deep);
  outline-offset: 3px;
}

.dm5-scorecard:focus-visible,
.dm5-checklist input:focus-visible,
.dm5-checklist button:focus-visible,
.dm5-note-fields input:focus-visible,
.dm5-evidence-fields input:focus-visible,
.dm5-scorecard input:focus-visible {
  outline: 3px solid var(--dm5-deep);
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .dm5-card-grid,
  .dm5-compare,
  .dm5-duoplan {
    grid-template-columns: 1fr;
  }

  .dm5-field-grid,
  .dm5-note-fields,
  .dm5-layouts,
  .dm5-decision {
    grid-template-columns: 1fr;
  }

  .dm5-decision li:not(:last-child)::after {
    top: auto;
    right: 50%;
    bottom: -1.35rem;
    content: "↓";
    transform: translateX(50%);
  }

  .dm5-swatches {
    grid-template-columns: repeat(2, 1fr);
  }

  .dm5-swatch-photo,
  .dm5-outcomes,
  .dm5-evidence-fields {
    grid-template-columns: 1fr;
  }

  .dm5-steps li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .dm5-plan {
    display: grid;
    grid-template-rows: none;
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .dm5-plan__cell--1,
  .dm5-plan__cell--2,
  .dm5-plan__cell--3,
  .dm5-plan__cell--4 {
    grid-area: auto;
  }

  .dm5-plan__route {
    display: none;
  }

  .dm5-editorial-image,
  .dm5-visual {
    width: 100%;
  }

  .dm5-editorial-image img {
    height: auto;
    aspect-ratio: auto 3 / 2;
    object-fit: contain;
  }

  .dm5-visual {
    padding: 1.15rem;
    border-radius: 22px;
  }

  .dm5-card-grid article {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .dm5-visual,
  .dm5-editorial-image {
    animation: dm5-enter 0.55s ease-out both;
    animation-timeline: view();
    animation-range: entry 8% cover 28%;
  }

  @keyframes dm5-enter {
    from { opacity: 0.75; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (prefers-contrast: more) {
  .dm5-visual,
  .dm5-card-grid article,
  .dm5-compare__panel,
  .dm5-plan {
    border-color: currentColor;
  }

  .dm5-visual::before {
    display: none;
  }
}
