/* WhatsApp display names guide (the "WhatsApp display names and the blue tick" page). Built on the templates guide's
   patterns and tokens: Mint for where the name appears, Periwinkle behind the blue tick, Sky behind what Flowella
   does; the rules and the review sit on the ground as surface cards. Logical properties, so Arabic pages mirror. */
.dn-head { display: grid; gap: 16px; max-width: 780px; margin-bottom: clamp(32px, 4vw, 52px); }
.dn-prose { display: grid; gap: 14px; font-size: 18px; line-height: 1.6; color: var(--ink-soft); max-width: 62ch; }
.dn-prose p { text-wrap: pretty; }
.dn-prose a, .dn-note a {
  font-weight: 700; color: var(--accent-ink);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.25em;
}
@media not all and (pointer: coarse) {
  :is(.dn-prose, .dn-note) a:hover { text-decoration-thickness: 3px; }
}
.dn-ic {
  flex: none; display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs);
}
.dn-ic .i { width: 19px; height: 19px; }
.dn-source { font-size: 14px; line-height: 1.45; color: var(--ink-soft); text-wrap: pretty; }
.dn-note { font-size: 15px; line-height: 1.5; color: var(--ink-soft); max-width: 70ch; text-wrap: pretty; }
.dn-block-title { margin-bottom: 4px; font: 800 1.15rem/1.3 var(--text); }

/* What a display name is: the definition beside where it appears */
.dn-intro-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px clamp(32px, 5vw, 80px); align-items: start; }
.dn-intro-copy { display: grid; gap: 22px; }
.dn-parts { --field: var(--field-mint); gap: 6px; padding: clamp(22px, 2.6vw, 32px); }
.dn-parts-title { font: 800 15px/1.2 var(--text); color: var(--ink); }
.dn-parts-list { display: grid; }
.dn-part { display: grid; gap: 4px; padding-block: 16px; border-top: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); }
.dn-part:first-child { border-top: 0; padding-top: 10px; }
.dn-part dt { display: flex; align-items: center; gap: 12px; font: 800 1.12rem/1.3 var(--text); }
.dn-part dd { margin: 0; padding-inline-start: 48px; font-size: 16px; line-height: 1.5; color: var(--ink-soft); text-wrap: pretty; }

/* The In Flowella tag: three states that differ in fill, icon and words, never colour alone */
.dn-status { white-space: normal; min-height: 28px; padding-block: 4px; padding-inline: 9px 12px; text-align: start; }
.dn-status .i { flex: none; width: 15px; height: 15px; }
.dn-status.is-yes { background: var(--field-green); color: var(--ink); }
.dn-status.is-partly { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.dn-status.is-no { background: var(--surface); color: var(--ink-soft); box-shadow: inset 0 0 0 1px var(--line); }
.dn-status-note { font-size: 13.5px; line-height: 1.45; color: var(--ink-soft); text-wrap: pretty; }
.dn-tagline { display: grid; justify-items: start; align-content: start; gap: 6px; margin: 0; }

/* Screens: the phones as the templates guide draws them, and the chat-header crops a step smaller */
.dn-shot, .dn-strip {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm);
}
.dn-shot { border-radius: calc(26px * var(--sq-scale, 1)); corner-shape: var(--sq-shape, round); }
.dn-strip { max-width: 420px; border-radius: calc(16px * var(--sq-scale, 1)); corner-shape: var(--sq-shape, round); }

/* What the customer sees: two phones beside the order WhatsApp follows */
.dn-views-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px clamp(32px, 5vw, 80px); align-items: start; }
.dn-phones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); align-items: start; }
.dn-phone { display: grid; gap: 14px; margin: 0; }
.dn-phone figcaption { display: grid; gap: 4px; font-size: 15px; line-height: 1.45; color: var(--ink-soft); text-wrap: pretty; }
.dn-phone figcaption strong { font: 800 1.05rem/1.3 var(--text); color: var(--ink); text-wrap: balance; }
.dn-ladder { display: grid; margin-top: 8px; }
.dn-rung { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 16px; padding-block: 22px; border-top: 1px solid var(--line); }
.dn-rung:first-child { border-top: 0; padding-top: 12px; }
.dn-rung-body { display: grid; gap: 6px; align-content: start; }
.dn-rung h4 { font: 800 1.12rem/1.3 var(--text); text-wrap: balance; }
.dn-rung p { font-size: 16px; line-height: 1.5; color: var(--ink-soft); text-wrap: pretty; max-width: 52ch; }
.dn-rung .dn-strip { margin-top: 8px; }
.dn-views-note { margin-top: clamp(32px, 4vw, 48px); }

/* The numbered tiles of the order and the review (the order is the point) */
.dn-num {
  justify-self: start; display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: calc(14px * var(--sq-scale, 1));
  background: var(--mint); color: var(--on-bright);
  font: 800 22px/1 var(--display); font-variant-numeric: tabular-nums;
  rotate: -4deg;
  corner-shape: var(--sq-shape, round);
}
:is(.dn-rung, .dn-step):nth-child(2) .dn-num { background: var(--sky); rotate: 3deg; }
:is(.dn-rung, .dn-step):nth-child(3) .dn-num { background: var(--green); rotate: -3deg; }
:is(.dn-rung, .dn-step):nth-child(4) .dn-num { background: var(--coral); rotate: 4deg; }

/* What Meta looks for: three surface cards, their rows shared (subgrid), then the reasons as rows */
.dn-kind-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 20px; }
.dn-kind {
  display: grid; grid-row: span 3; grid-template-rows: subgrid; align-content: start; gap: 12px;
  padding: 24px 22px 26px; border-radius: calc(24px * var(--sq-scale, 1));
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  corner-shape: var(--sq-shape, round);
}
@supports not (grid-template-rows: subgrid) {
  .dn-kind { grid-row: auto; }
}
.dn-kind-ic {
  justify-self: start; display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: calc(14px * var(--sq-scale, 1));
  background: var(--coral); color: var(--on-bright); rotate: -4deg;
  corner-shape: var(--sq-shape, round);
}
.dn-kind-ic .i { width: 22px; height: 22px; }
.dn-kind:nth-child(2) .dn-kind-ic { background: var(--sky); rotate: 3deg; }
.dn-kind:nth-child(3) .dn-kind-ic { background: var(--mint); rotate: -3deg; }
.dn-kind h3 { font: 800 1.3rem/1.25 var(--text); }
.dn-kind p { font-size: 16px; line-height: 1.5; color: var(--ink); text-wrap: pretty; }
.dn-more { margin-top: clamp(48px, 5vw, 72px); max-width: 920px; }
.dn-rules-note { margin-top: clamp(24px, 3vw, 36px); }

/* Rows: a name and what it means; Meta's codes in the code face, as code */
.dn-rows { display: grid; }
.dn-rowline {
  display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); align-items: start; gap: 6px 24px;
  padding-block: 16px; border-top: 1px solid var(--line);
}
.dn-rowline:first-child { border-top: 0; }
.dn-rowline dt { display: grid; justify-items: start; gap: 6px; font: 700 16px/1.4 var(--text); color: var(--ink); }
.dn-rowline dd { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink-soft); text-wrap: pretty; }
.dn-codes { display: flex; flex-wrap: wrap; gap: 6px; }
.dn-code {
  max-width: 100%; padding: 2px 8px; border-radius: 6px; overflow-wrap: anywhere;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
  font: 600 12.5px/1.5 var(--mono); color: var(--ink); letter-spacing: 0;
}

/* Changing a name and usernames: a sticky head beside the rules */
.dn-split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 32px clamp(32px, 5vw, 80px); align-items: start; }
.dn-sticky { position: sticky; top: 104px; margin-bottom: 0; }
.dn-sticky .dn-tagline { margin-top: 4px; }
.dn-split-rows .dn-rowline { grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); }

/* The review: four steps in a row */
.dn-step-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.dn-step {
  display: grid; grid-template-rows: subgrid; grid-row: span 3; align-content: start; gap: 12px;
  padding: 24px 22px 26px; border-radius: calc(24px * var(--sq-scale, 1));
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  corner-shape: var(--sq-shape, round);
}
@supports not (grid-template-rows: subgrid) {
  .dn-step { grid-row: auto; }
}
.dn-step h3 { font: 800 1.15rem/1.3 var(--text); text-wrap: balance; }
.dn-step p { font-size: 16px; line-height: 1.5; color: var(--ink-soft); text-wrap: pretty; }
.dn-steps-note { margin-top: clamp(24px, 3vw, 36px); max-width: 70ch; }

/* The blue tick: one Periwinkle Field card, the chat header and tag beside what Meta asks for, then what to know */
.dn-badge-card { --field: var(--field-blue); gap: 0; padding: clamp(26px, 4vw, 56px); }
.dn-badge-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px clamp(32px, 5vw, 72px); align-items: start; }
.dn-badge-main { display: grid; gap: 24px; align-content: start; }
.dn-badge-main .dn-head { margin-bottom: 0; }
.dn-badge-fig { display: grid; gap: 10px; margin: 0; }
.dn-badge-fig figcaption { font-size: 14px; line-height: 1.45; color: var(--ink-soft); }
.dn-badge-side { display: grid; gap: 12px; align-content: start; }
.dn-badge-side .dn-block-title:not(:first-child) { margin-top: 18px; }
.dn-checks, .dn-ways { display: grid; }
.dn-checks li {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start;
  padding-block: 12px; border-top: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  font-size: 16px; line-height: 1.5; color: var(--ink-soft); text-wrap: pretty;
}
.dn-checks li:first-child { border-top: 0; padding-top: 6px; }
.dn-checks strong, .dn-ways strong { color: var(--ink); font-weight: 800; }
.dn-check {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--surface); color: var(--accent-ink); box-shadow: var(--shadow-xs);
}
.dn-check .i { width: 16px; height: 16px; }
.dn-ways { counter-reset: dn-way; gap: 10px; }
.dn-ways li {
  counter-increment: dn-way; position: relative; display: grid; gap: 2px;
  padding-block: 14px; padding-inline: 52px 16px; border-radius: calc(14px * var(--sq-scale, 1));
  background: var(--surface); box-shadow: var(--shadow-xs);
  font-size: 15.5px; line-height: 1.5; color: var(--ink-soft); text-wrap: pretty;
  corner-shape: var(--sq-shape, round);
}
.dn-ways li::before {
  content: counter(dn-way); position: absolute; inset-inline-start: 14px; top: 14px;
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--field-blue); color: var(--ink); font: 800 14px/1 var(--display);
}
.dn-facts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 clamp(20px, 2.6vw, 36px);
  margin-top: clamp(32px, 4vw, 48px); padding-top: clamp(20px, 2.4vw, 28px);
  border-top: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
}
.dn-fact { display: grid; gap: 4px; align-content: start; }
.dn-fact dt { font: 800 1rem/1.3 var(--text); }
.dn-fact dd { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-soft); text-wrap: pretty; }

/* What Flowella does: one Sky Field card, the notes two across */
.dn-notes-card { --field: var(--field-sky); padding: clamp(26px, 4vw, 56px); }
.dn-notes-card .dn-head { margin-bottom: clamp(20px, 2.6vw, 32px); }
.dn-note-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(28px, 4vw, 56px); }
.dn-note-item { display: grid; align-content: start; gap: 6px; padding-block: 18px; border-top: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); }
.dn-note-item dt { display: flex; align-items: center; gap: 12px; font: 800 1.08rem/1.3 var(--text); }
.dn-note-item dd { margin: 0; padding-inline-start: 48px; font-size: 16px; line-height: 1.5; color: var(--ink-soft); text-wrap: pretty; }
.dn-note-item .dn-tagline { padding-top: 4px; }

/* Where to go next: three whole-card links */
.dn-next-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: clamp(28px, 3.4vw, 44px); }
.dn-next-card { gap: 10px; padding-bottom: 60px; }
.dn-next-card .card-title { font: 800 1.2rem/1.3 var(--text); text-wrap: balance; }
.dn-next-card p { font-size: 16px; line-height: 1.5; color: var(--ink-soft); }
.dn-go {
  position: absolute; inset-inline-start: clamp(20px, 2.4vw, 28px); bottom: 20px;
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--field-sky); color: var(--accent-ink);
}
.dn-go .i { width: 18px; height: 18px; }

@media (max-width: 1179px) {
  .dn-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px clamp(20px, 2.6vw, 36px); }
}
@media (max-width: 1023px) {
  .dn-intro-grid, .dn-split, .dn-views-grid, .dn-badge-grid { grid-template-columns: minmax(0, 1fr); }
  .dn-sticky { position: static; }
  .dn-phones { max-width: 620px; }
  .dn-kind-list { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .dn-kind { grid-row: auto; grid-template-rows: none; }
  .dn-step-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dn-next-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 899px) {
  .dn-note-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 719px) {
  .dn-prose { font-size: 17px; }
  .dn-step-list, .dn-facts { grid-template-columns: minmax(0, 1fr); }
  .dn-rowline, .dn-split-rows .dn-rowline { grid-template-columns: minmax(0, 1fr); }
}
/* On a phone the two screens become a row to swipe, one and a bit in view, so the second one shows there is more */
@media (max-width: 559px) {
  .dn-phones {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 76%;
    column-gap: 16px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) 16px; scroll-padding-inline: var(--gutter);
    scrollbar-width: thin;
  }
  .dn-phones > li { scroll-snap-align: start; }
  .dn-rung { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
