/* DMO Sign landing: product stories. Large visual stories plus small supporting details. */

.dsl-stories-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.25rem; grid-auto-rows: auto; }
.dsl-story-a { grid-column: span 5; grid-row: span 2; }
.dsl-story-b { grid-column: span 7; }
.dsl-story-c { grid-column: span 7; }
.dsl-details { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }

.dsl-story { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: clamp(1.4rem, 2vw, 2rem); display: flex; flex-direction: column; gap: 1rem; overflow: hidden; min-width: 0; box-shadow: var(--shadow-card); }
.dsl-story-copy { display: grid; gap: .6rem; }
.dsl-story-h { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.35rem, 1.1rem + .8vw, 1.8rem); letter-spacing: -.015em; line-height: 1.15; margin: 0; }
.dsl-story p { color: var(--muted); margin: 0; }
.dsl-story-visual { margin-top: auto; padding-top: .5rem; }

/* A: signer on a phone, on a soft lavender stage */
.dsl-story-a { background: linear-gradient(180deg, var(--surface) 0%, var(--brand-soft) 100%); }
.dsl-story-a .dsl-story-visual { display: flex; align-items: flex-end; justify-content: center; padding-top: 1rem; margin-bottom: calc(-1 * clamp(1.4rem, 2vw, 2rem)); }
.dsl-phone { width: min(100%, 270px); aspect-ratio: 9 / 18.5; margin: 0 auto; border-radius: 34px 34px 0 0; border: 7px solid var(--side); border-bottom: 0; background: var(--bg); box-shadow: 0 30px 50px -30px rgba(36,27,51,.5); display: flex; flex-direction: column; overflow: hidden; }
.dsl-phone-head { padding: .7rem .8rem; background: var(--surface); border-bottom: 1px solid var(--line); }
.dsl-phone-title { font-family: var(--font-display); font-weight: 500; font-size: .85rem; }
.dsl-phone-sub { font-size: .62rem; line-height: 1.35; color: var(--muted); margin-top: .15rem; }
.dsl-phone-body { flex: 1; min-height: 0; padding: .7rem; display: flex; }
.dsl-phone-paper { flex: 1; padding: .6rem; font-size: .62rem; box-shadow: 0 1px 3px rgba(36,27,51,.12); display: flex; flex-direction: column; justify-content: flex-start; }
.dsl-phone-paper .dsl-paper-lines { gap: .35rem; margin: .1rem 0 .8rem; }
.dsl-phone-paper .dsl-paper-line { height: .34rem; }
.dsl-phone-field { min-height: 2.1rem; margin-bottom: .5rem; }
.dsl-phone-next { box-shadow: 0 0 0 3px rgba(240,180,0,.28); }
.dsl-phone-name { font-family: var(--font-text); font-size: .82rem; font-weight: 600; color: var(--ink); } /* a typed field, as on the real signing page */
.dsl-phone-bar { background: var(--surface); border-top: 1px solid var(--line); padding: .55rem .7rem .7rem; display: grid; gap: .4rem; }
.dsl-phone-bar-text { font-size: .62rem; color: var(--muted); font-weight: 600; }
.dsl-phone-bar .dsl-fake-btn { min-height: 2.1rem; }

/* B: request list */
.dsl-reqlist { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.dsl-req { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem .75rem; padding: .7rem .9rem; border: 1px solid var(--line); background: var(--bg); border-radius: 14px; }
.dsl-req-title { font-size: .9rem; font-weight: 600; line-height: 1.25; }
.dsl-req-sub { font-size: .75rem; color: var(--muted); }

/* C: templates */
.dsl-story-c .dsl-story-visual { display: grid; gap: .6rem; }
.dsl-tpl { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: .8rem .9rem; display: grid; grid-template-columns: 1fr auto; gap: .5rem .75rem; align-items: center; }
.dsl-tpl-name { font-weight: 650; }
.dsl-tpl-meta { font-size: .75rem; color: var(--muted); overflow-wrap: anywhere; }
.dsl-tpl-actions { display: flex; gap: .4rem; }

/* D: details */
.dsl-detail { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.25rem 1.3rem; display: grid; grid-template-columns: 40px 1fr; gap: .9rem; align-items: start; min-width: 0; }
.dsl-detail-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; }
.dsl-detail-h { font-family: var(--font-text); font-size: 1.05rem; font-weight: 700; margin: 0 0 .3rem; }
.dsl-detail p { font-size: .95rem; color: var(--muted); margin: 0; }

/* tablet: A and B share a row, C goes wide with text left and templates right */
@media (max-width: 1023px) {
  .dsl-story-a { grid-column: span 6; grid-row: span 1; }
  .dsl-story-b { grid-column: span 6; }
  .dsl-story-c { grid-column: span 12; flex-direction: row; align-items: center; gap: 2rem; }
  .dsl-story-c .dsl-story-copy { flex: 1 1 40%; align-self: center; }
  .dsl-story-c .dsl-story-visual { flex: 1 1 60%; margin-top: 0; padding-top: 0; }
  .dsl-story-b .dsl-story-visual { flex: 1; display: flex; flex-direction: column; margin-top: .5rem; }
  .dsl-story-b .dsl-reqlist { flex: 1; grid-auto-rows: 1fr; }
  .dsl-details { gap: 1rem; }
  .dsl-detail { grid-template-columns: 1fr; gap: .7rem; align-content: start; }
}

@media (max-width: 859px) {
  .dsl-stories-grid { grid-template-columns: minmax(0, 1fr); }
  .dsl-story-a, .dsl-story-b, .dsl-story-c, .dsl-details { grid-column: 1 / -1; }
  .dsl-story-c { flex-direction: column; align-items: stretch; gap: 1rem; }
  .dsl-story-c .dsl-story-visual { margin-top: auto; }
  .dsl-story-b .dsl-story-visual { flex: none; }
  .dsl-story-b .dsl-reqlist { flex: none; grid-auto-rows: auto; }
  .dsl-details { grid-template-columns: minmax(0, 1fr); }
  .dsl-detail { grid-template-columns: 40px 1fr; }
}

@media (max-width: 639px) {
  .dsl-story { border-radius: 22px; }
  .dsl-tpl { grid-template-columns: 1fr; }
  .dsl-tpl-edit { box-shadow: none; padding: 0 .5rem; }
  .dsl-detail { padding: 1.1rem 1.1rem; }
}
