/*
 * /print-my-part only. Loaded after /styles/home.css, which supplies the page
 * base and the shared .hm-* blocks (steps, three-up rows, questions), and
 * before /styles/site.css, which supplies the tokens, bands, type and buttons.
 * A rule here that overrides a shared .dz-* class therefore carries one more
 * class than the rule it overrides.
 *
 * The form's markup comes from scripts/remediation/06-print-my-part.mjs and
 * its states from public/scripts/print-my-part.js; this file styles the class
 * names they use (.pmp-form, .pmp-field, .pmp-hint, .pmp-submit, .pmp-hp,
 * .pmp-status, .pmp-flash, .pmp-error, .pmp-done) and changes none of them.
 *
 * Calm rules: no new text styles beyond the home page's eight; white bands,
 * with the steps on the one Ink band and the form on the one snow band.
 * Mobile first: the base rules are the 320px layout.
 */

/* ---------- Hero: the offer, then the four jobs ---------- */

.hm .dz-band.pmp-hero {
  padding-bottom: var(--hm-band);
}
.pmp-hero .dz-display {
  max-width: 15ch;
  font-size: clamp(36px, 6.4vw, 76px);
}
.pmp-jobs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 16px;
  width: 100%;
  max-width: 1040px;
  margin-top: var(--hm-gap);
}
.pmp-jobs img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--dz-radius-md);
}
.pmp-jobs figcaption {
  margin-top: 8px;
}
@media (min-width: 860px) {
  .pmp-jobs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
  }
}

/* ---------- The form beside what happens next ---------- */

.pmp-send {
  display: grid;
  gap: 40px;
}
@media (min-width: 960px) {
  .pmp-send {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 72px;
    align-items: start;
  }
}
.pmp-aside ul {
  display: grid;
  gap: 24px;
  margin-top: 24px;
}
.pmp-aside li {
  padding-top: 20px;
  border-top: 1px solid var(--dz-line-strong);
}
.pmp-aside h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}
.pmp-aside .hm-sub {
  margin-top: 4px;
}
.pmp-aside a {
  display: inline-block;
  padding: 10px 0;
  margin: -10px 0;
}

/* ---------- Form ---------- */

.pmp-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  padding: 28px 20px;
  background: var(--dz-white);
  border-radius: var(--dz-radius-lg);
}
.pmp-form > h2 {
  font-family: var(--dz-font-display);
  font-weight: 700;
  font-synthesis: none;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.pmp-form > h2,
.pmp-form > .pmp-form-lead,
.pmp-form > .pmp-status,
.pmp-field--wide,
.pmp-submit {
  grid-column: 1 / -1;
}
.pmp-form-lead {
  margin-top: -12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--dz-steel);
}
.pmp-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pmp-field label {
  font-weight: 700;
  line-height: 1.4;
}
.pmp-field abbr {
  color: var(--dz-brand-ink);
  text-decoration: none;
}
.pmp-field input,
.pmp-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--dz-steel-light);
  border-radius: var(--dz-radius-md);
  background: var(--dz-white);
  color: var(--dz-ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  transition: border-color var(--dz-fast) var(--dz-ease);
}
.pmp-field input:hover,
.pmp-field textarea:hover {
  border-color: var(--dz-steel);
}
.pmp-field input:focus-visible,
.pmp-field textarea:focus-visible {
  border-color: var(--dz-ink);
}
.pmp-field input::placeholder,
.pmp-field textarea::placeholder {
  color: var(--dz-steel);
  opacity: 1;
}
.pmp-field input[type='file'] {
  padding: 10px 12px;
  font-size: 14px;
}
.pmp-field textarea {
  min-height: 96px;
  resize: vertical;
}
.pmp-hint {
  font-size: 14px;
  line-height: 1.5;
  color: var(--dz-steel);
}
.pmp-hint a {
  display: inline-block;
  padding: 10px 0;
  margin: -10px 0;
  color: var(--dz-ink);
  text-decoration: underline;
  text-decoration-color: var(--dz-link-line);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.pmp-hint a:hover {
  text-decoration-color: currentColor;
}
.pmp-submit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 4px;
}
.pmp-submit button {
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: var(--dz-radius-full);
  background: var(--dz-ink);
  color: var(--dz-white);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background-color var(--dz-fast) var(--dz-ease), transform var(--dz-fast) var(--dz-ease);
}
.pmp-submit button:hover {
  background: var(--dz-ink-2);
  transform: translateY(-1px);
}
.pmp-submit button:active {
  transform: none;
}
.pmp-submit button[disabled] {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}
@media (min-width: 640px) {
  .pmp-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 40px;
  }
}

/* ---------- Form states ---------- */

/* Honeypot: off-screen, not display:none, so simple bots still fill it. */
.pmp-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.pmp-status,
.pmp-flash {
  padding: 14px 16px;
  border-left: 4px solid var(--dz-danger);
  border-radius: var(--dz-radius);
  background: var(--dz-white);
}
.pmp-form > .pmp-status {
  background: var(--dz-snow);
}
/* The script shows this one by clearing its hidden attribute. */
.pmp-status[hidden] {
  display: none;
}
/* Shown only when the server redirects back to #sent or #not-sent. */
.pmp-flash {
  display: none;
  margin-bottom: 16px;
}
.pmp-flash:target {
  display: block;
}
.pmp-flash--ok {
  border-left-color: var(--dz-success);
}
.pmp-error {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--dz-danger);
}
.pmp-field [aria-invalid='true'] {
  border-color: var(--dz-danger);
}
/* The panel the script swaps in for the form once the drawing has arrived. */
.pmp-done {
  display: block;
  border-left: 4px solid var(--dz-success);
}
.pmp-done h2 {
  font-family: var(--dz-font-display);
  font-weight: 700;
  font-synthesis: none;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.pmp-done p {
  margin-top: 12px;
  color: var(--dz-steel);
}

@media (prefers-reduced-motion: reduce) {
  .pmp-submit button:hover {
    transform: none;
  }
}
