/* ── 07 · Got permit comments? ────────────────────────────
   Contained dark card (so it doesn't merge with the dark section after it), a marked-up
   sheet whose red reviewer comments get fixed in green, then six common rejection reasons. */
.cmt { padding-block: var(--msp-section-y); background: #fff; }
.cmt__card {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center;
  gap: clamp(32px, 5vw, 80px);
  padding: clamp(28px, 5vw, 72px);
  border-radius: 32px;
  background: var(--msp-secondary); color: var(--msp-on-dark-muted);
}
.cmt__card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgb(255 255 255 / .05) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .05) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(70% 80% at 100% 50%, #000, transparent 70%);
  mask-image: radial-gradient(70% 80% at 100% 50%, #000, transparent 70%);
}
.cmt__title { max-width: 14ch; margin-top: 20px; font-size: var(--msp-fs-h2-alt); line-height: 1.06; color: #fff; }
.cmt__lead { max-width: 50ch; margin-top: 22px; font-size: var(--msp-fs-lead); line-height: 1.6; color: rgb(255 255 255 / .8); }
.cmt__steps { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.cmt__steps li { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border: 1px solid var(--msp-on-dark-line); border-radius: var(--msp-radius-pill); font-size: 15px; font-weight: 400; color: #fff; }
.cmt__step-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--msp-primary); color: var(--msp-secondary); font-size: 13px; font-weight: 700; }
.cmt__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* Marked-up sheet */
.cmt__visual { perspective: 1200px; }
.cmt-sheet { transform: rotate(-2deg); border-radius: 8px; box-shadow: 0 50px 80px -40px rgb(0 0 0 / .65); transition: transform .8s var(--msp-ease-out); }
.cmt__card:hover .cmt-sheet { transform: rotate(0deg); }
.cmt-sheet svg { width: 100%; height: auto; }
.cmt-sheet text { font-family: var(--msp-font); }
.cm-paper { fill: #fff; }
.cm-frame { fill: none; stroke: var(--msp-secondary); stroke-width: 1.2; }
.cm-red ellipse, .cm-red circle, .cm-red path { fill: none; stroke: var(--msp-redline, #D43C2E); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cm-note rect { fill: #FFF4F2; stroke: var(--msp-redline, #D43C2E); stroke-width: 1.6; }
.cm-note text { font-size: 11px; font-weight: 700; letter-spacing: .05em; fill: var(--msp-redline, #D43C2E); }
.cm-fix text { font-size: 13px; font-weight: 700; fill: var(--msp-accent); paint-order: stroke; stroke: #fff; stroke-width: 4px; }
.cm-fix .cm-fix__label { font-size: 11px; letter-spacing: .1em; fill: var(--msp-secondary); stroke: none; }
.cm-fix__dim { fill: none; stroke: var(--msp-accent); stroke-width: 1.6; }
.cm-fix__north { fill: #fff; stroke: var(--msp-accent); stroke-width: 1.6; }
.cm-fix g path { fill: var(--msp-accent); }
.cm-check circle { fill: var(--msp-primary); stroke: #fff; stroke-width: 2.5; }
.cm-check path { fill: none; stroke: var(--msp-secondary); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.cm-stamp rect { fill: rgb(155 213 5 / .14); stroke: var(--msp-accent); stroke-width: 2.4; }
.cm-stamp text { font-size: 16px; font-weight: 800; letter-spacing: .18em; fill: var(--msp-accent); }
.cm-stamp .cm-stamp__sub { font-size: 8.5px; font-weight: 700; letter-spacing: .14em; }

/* Story on reveal: redlines → fixes → checks → stamp. All visible without motion. */
.js-motion .cmt__card .cm-red, .js-motion .cmt__card .cm-note,
.js-motion .cmt__card .cm-fix, .js-motion .cmt__card .cm-check, .js-motion .cmt__card .cm-stamp {
  transform-box: fill-box; transform-origin: center;
  transition: opacity .5s var(--msp-ease-out), transform .5s var(--msp-ease-out);
}
.js-motion .cmt__card:not(.is-revealed) .cm-red,
.js-motion .cmt__card:not(.is-revealed) .cm-note,
.js-motion .cmt__card:not(.is-revealed) .cm-fix { opacity: 0; }
.js-motion .cmt__card:not(.is-revealed) .cm-check,
.js-motion .cmt__card:not(.is-revealed) .cm-stamp { opacity: 0; transform: scale(.5); }
.js-motion .cmt__card .cm-red, .js-motion .cmt__card .cm-note { transition-delay: calc(.5s + var(--k) * .25s); }
.js-motion .cmt__card .cm-fix { transition-delay: calc(1.7s + var(--k) * .3s); }
.js-motion .cmt__card .cm-check { transition-delay: calc(1.9s + var(--k) * .3s); }
.js-motion .cmt__card .cm-stamp { transition-delay: 3s; }
.js-motion .cmt__card .cm-stamp { transform: rotate(-7deg); }
.js-motion .cmt__card:not(.is-revealed) .cm-stamp { transform: rotate(-7deg) scale(.5); }

/* Common reasons */
.cmt__reasons { margin-top: clamp(56px, 6vw, 88px); }
.cmt__reasons-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 24px; }
.cmt__reasons-title { font-size: var(--msp-fs-h3); line-height: 1.15; }
.cmt__reasons-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--msp-accent); }
.cmt__reasons-link .icon { width: 17px; height: 17px; transition: transform .3s var(--msp-ease-out); }
.cmt__reasons-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.cmt__reasons-link:hover .icon { transform: translateX(3px); }
.cmt__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.cmt-reason { padding: 24px; border: 1px solid var(--msp-divider); border-radius: var(--msp-radius-md); background: #fff; transition: border-color .3s, background-color .3s; }
.cmt-reason:hover { border-color: rgb(8 17 25 / .18); background: var(--msp-surface); }
.cmt-reason__n {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--msp-redline, #D43C2E); color: var(--msp-redline, #D43C2E);
  font-size: 13px; font-weight: 700;
}
.cmt-reason h4 { margin-top: 18px; font-size: 19px; line-height: 1.25; }
.cmt-reason p { margin-top: 8px; font-size: 15px; line-height: 1.55; }

@media (max-width: 1023px) {
  .cmt__card { grid-template-columns: 1fr; }
  .cmt__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .cmt__card { border-radius: 24px; }
  .cmt__actions .btn { flex: 1 1 100%; }
  .cmt__actions .btn--icon { justify-content: space-between; padding-left: 26px; }
  .cmt__grid { grid-template-columns: 1fr; }
  .cmt-sheet { transform: none; }
}
