/* Describe a part: page layout for the email composer. Components (.options, .opt, .field, .panel, .card, .btn-*, .badge) are in site.css.
   Page CSS stays free of external resources, as site.css is. */

.dsc > section { padding-block: clamp(32px, 5vw, 56px); }
.dsc .eyebrow { margin-bottom: var(--space-3); }
.dsc h2 { margin-bottom: var(--space-4); }
.dsc .measure { margin-bottom: var(--space-5); }

/* ---- Hero ---- */
.dsc-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(32px, 6vw, 80px); align-items: center; padding-top: clamp(40px, 7vw, 96px); padding-bottom: clamp(16px, 3vw, 32px); }
.dsc-hero .display { margin: 0 0 var(--space-4); font-size: clamp(2.75rem, 1.2rem + 5.6vw, 5rem); }
.dsc-hero .lead { margin-bottom: var(--space-4); }
.dsc-write { max-width: 56ch; margin: 0; }
.dsc-deal { margin: 0; }
.dsc-ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); }
.dsc-ticks li { position: relative; padding-left: 32px; color: var(--text); font-size: .9375rem; line-height: 1.55; }
.dsc-ticks li::before { content: ""; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 6px; background: rgba(52, 211, 153, .1); border: 1px solid rgba(52, 211, 153, .32); }
.dsc-ticks li::after { content: ""; position: absolute; left: 7px; top: 5px; width: 5px; height: 9px; border: solid var(--good); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.dsc-ticks .num { color: var(--text); font-weight: 500; }

/* ---- The composer: form on the left, the live email on the right ---- */
.dsc-compose { padding-top: clamp(24px, 4vw, 48px); }
.dsc-compose > h2 { margin-bottom: var(--space-2); }
.dsc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: var(--space-6); align-items: start; margin-top: var(--space-5); }
.dsc-form { margin-top: 0; }
.dsc-form fieldset { gap: var(--space-4); }
.dsc-form .field { max-width: none; margin: 0; }
.dsc-form textarea { min-height: 0; }
.dsc-form legend { margin-bottom: var(--space-1); }
.dsc-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.dsc-opts .opt { min-width: 0; }
.dsc-opts .opt .helper { margin: 2px 0 0; }
.dsc-form .dsc-note { margin: 0; }
.dsc-row { display: grid; grid-template-columns: minmax(0, 160px) minmax(0, 1fr); gap: var(--space-4); }
.dsc-photos { margin-top: var(--space-1); }
.dsc-photos .helper { margin-top: 2px; }

/* The email preview. Sticky on wide, tall screens so it stays in view while the form is filled in (on a short window it would not fit, so it scrolls with the page). */
@media (min-width: 1001px) and (min-height: 760px) { .dsc-side { position: sticky; top: calc(var(--hdr-h) + var(--space-4)); } }
.mail { margin: 0; }
.mail .panel-head .badge { height: 22px; }
.mail-meta { display: grid; gap: 8px; margin: 0 0 var(--space-4); padding-bottom: var(--space-4); border-bottom: 1px solid var(--line); }
.mail-meta > div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--space-3); align-items: baseline; }
.mail-meta dt { font: 500 var(--fs-mono-s)/1.4 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.mail-meta dd { margin: 0; min-width: 0; font: 500 .8125rem/1.5 var(--font-mono); color: var(--text); overflow-wrap: anywhere; }
.mail-scroll { max-height: min(40vh, 400px); margin: 0 0 var(--space-4); overflow: auto; border-radius: var(--r-sm); border: 1px solid var(--line); background: rgba(5, 8, 15, .6); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35); }
.mail-scroll:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; border-radius: var(--r-sm); }
.mail-body { margin: 0; padding: 16px; font: 400 .8125rem/1.65 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }
.mail-body .mh { color: var(--text); font-weight: 500; }
.mail-body .md { color: var(--text-3); font-style: italic; }
.mail .btns { margin-bottom: var(--space-3); }
.mail .btns > * { flex: 1 1 auto; white-space: normal; text-align: center; }
.dsc-status { min-height: 1.55em; margin: 0 0 var(--space-3); }
.dsc-status.is-good { color: var(--good); }
.dsc-status.is-warn { color: var(--wait); }
.dsc-status.is-bad { color: var(--bad); }
.dsc-priv { margin: 0; padding-top: var(--space-3); border-top: 1px solid var(--line); }

/* Without JS the composer cannot work, so it is hidden and a plain email link takes its place. html.no-js is swapped for html.js by ui.js. */
.dsc .nojs-only { display: none; margin-top: var(--space-5); }
.no-js .dsc .nojs-only { display: block; animation: dsc-late .01s linear .4s backwards; }
@keyframes dsc-late { from { opacity: 0; visibility: hidden; } }   /* holds the fallback back for a moment so a visitor with JS never sees it flash */
.no-js .dsc .composer { display: none; }
.dsc .nojs-only .btns { margin: 0; }

/* ---- What makes a good request ---- */
.dsc-cards { list-style: none; margin: var(--space-5) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.dsc-cards .card { display: flex; flex-direction: column; gap: 0; }
.dsc-cards h3 { margin-bottom: var(--space-2); }
.dsc-cards p { margin: 0; font-size: .9375rem; }
.dsc-n { display: inline-grid; place-items: center; align-self: flex-start; min-width: 36px; height: 28px; padding: 0 8px; margin-bottom: var(--space-4); border-radius: 7px; font: 500 .8125rem/1 var(--font-mono); color: var(--signal-hi); background: rgba(255, 107, 26, .08); border: 1px solid rgba(255, 107, 26, .3); }

.dsc-file { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-5) var(--space-6); align-items: center; }
.dsc-file h2 { margin-bottom: var(--space-2); font-size: clamp(1.375rem, 1.2rem + .8vw, 1.75rem); }
.dsc-file .muted { max-width: 60ch; margin: 0; }
.dsc-file .btns { margin: 0; }

/* ---- Narrow screens ---- */
@media (max-width: 1000px) {
  .dsc-grid { grid-template-columns: minmax(0, 1fr); }
  .dsc-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .dsc-hero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .dsc-opts { grid-template-columns: minmax(0, 1fr); }
  .dsc-row { grid-template-columns: minmax(0, 1fr); }
  .dsc-cards { grid-template-columns: minmax(0, 1fr); }
  .dsc-file { grid-template-columns: minmax(0, 1fr); }
  .dsc-file .btns > * { flex: 1 1 100%; }
  .mail .btns > * { flex: 1 1 100%; }
  .mail-scroll { max-height: 340px; }
}
