/* Supershoot v4 pages (kit, help, legal, 404). Loads after assets/site.css and any page <style>.
   Same language as the 3D hero: a space gray stage, light paper sheets lifted off it, copper as the accent.
   Palette stays the four brand colors plus white; depth comes from rgba of those colors and black shadows.
   Contrast: copper text only on paper (ghost or white) at 24px+. On the stage, text is white, ghost or blue. */

.v4p {
  --hair: rgba(244, 244, 249, 0.14);
  --hair-2: rgba(244, 244, 249, 0.24);
  --glass: rgba(244, 244, 249, 0.055);
  --glass-2: rgba(244, 244, 249, 0.09);
  --ink-hair: rgba(57, 61, 63, 0.13);
  --r-sheet: clamp(22px, 2.6vw, 34px);
  --r-card: 18px;
  --sheet-x: clamp(8px, 1.4vw, 20px);
  --lift: 0 1px 0 rgba(57, 61, 63, 0.05), 0 10px 24px rgba(57, 61, 63, 0.07);
  --lift-dark: 0 30px 70px rgba(0, 0, 0, 0.32), 0 6px 16px rgba(0, 0, 0, 0.18);
  background: var(--gun);
  color: var(--ghost);
}
.v4p :focus-visible { outline-color: var(--blue); }
.v4p .paper :focus-visible, .v4p .doc :focus-visible { outline-color: var(--gun); }

/* the stage: the hero's dark ground with a soft overhead light */
.v4p .stage, .v4p .page-top {
  background:
    radial-gradient(80% 120% at 50% -10%, rgba(244, 244, 249, 0.1), rgba(244, 244, 249, 0) 60%),
    var(--gun);
  color: var(--ghost);
}
.v4p .stage h1, .v4p .stage h2, .v4p .stage h3, .v4p .page-top h1 { color: var(--white); }

/* top bar, same as the home page */
.v4p .topnav { position: relative; z-index: 6; background: var(--gun); color: var(--ghost); border-bottom: 1px solid rgba(244, 244, 249, 0.08); }
.v4p .topnav .bar { padding-block: 12px; }
.v4p .topnav nav { gap: 4px; }
.v4p .topnav nav a:not(.btn) { font-size: 17px; font-weight: 600; color: var(--ghost); text-decoration: none; padding-inline: 12px; }
.v4p .topnav nav a:not(.btn):hover { color: var(--white); }
.v4p .topnav .pill, .v4p .topnav .btn-small { border-radius: 999px; min-height: 44px; padding: 8px 20px; font-size: 17px; margin-left: 8px; color: var(--white); }
.v4p .topnav .mark img { height: 24px; }
@media (max-width: 440px) {
  .v4p .topnav nav a:not(.btn) { font-size: 16px; padding-inline: 8px; }
  .v4p .topnav .pill, .v4p .topnav .btn-small { font-size: 16px; padding: 8px 14px; margin-left: 0; }
  .v4p .topnav .mark img { height: 20px; }
}

/* buttons: one pill shape everywhere. Primary is copper, the quiet one is gunmetal on paper. */
.v4p .btn { border-radius: 999px; padding-inline: 28px; }
.v4p .btn-blue { background: var(--copper); border-color: var(--copper); color: var(--white); }
.v4p .btn-copper, .v4p .btn-blue { box-shadow: 0 8px 22px rgba(205, 83, 59, 0.28); }
.v4p .btn:hover { filter: brightness(1.06); }
@media (prefers-reduced-motion: no-preference) {
  .v4p .btn { transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease; }
  .v4p .btn:hover { transform: translateY(-1px); }
  .v4p .btn-copper:hover, .v4p .btn-blue:hover { box-shadow: 0 12px 28px rgba(205, 83, 59, 0.36); }
}

/* page header for help, legal and 404 */
.v4p .page-top { position: relative; padding-block: clamp(44px, 7vw, 96px) clamp(76px, 9vw, 120px); overflow: hidden; }
.v4p .page-top::after { content: ""; position: absolute; left: 50%; bottom: 0; width: min(900px, 90vw); height: 140px; transform: translateX(-50%); background: radial-gradient(50% 70% at 50% 100%, rgba(205, 83, 59, 0.16), rgba(205, 83, 59, 0) 75%); pointer-events: none; }
.v4p .page-top h1 { font-size: clamp(2.3rem, 5vw, 4.25rem); line-height: 1.06; letter-spacing: -0.03em; margin-bottom: 0.32em; text-wrap: balance; max-width: 15em; }
.v4p .page-top .sub { font-size: clamp(18px, 1.55vw, 22px); line-height: 1.45; font-weight: 500; color: var(--ghost); max-width: 30em; text-wrap: pretty; }
.v4p .page-top .stamp { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; font-size: 15px; font-weight: 600; color: var(--blue); }
.v4p .page-top .stamp::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--copper); box-shadow: 0 0 0 4px rgba(205, 83, 59, 0.2); }
.v4p .page-top .wrap { position: relative; z-index: 1; }

/* chips for on-page navigation */
.v4p .jump, .v4p .crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.v4p .crumbs { margin-top: 12px; }
.v4p .jump a, .v4p .crumbs a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border-radius: 999px; background: var(--glass); border: 1px solid var(--hair);
  font-size: 16px; font-weight: 600; color: var(--ghost); text-decoration: none; white-space: nowrap;
}
.v4p .jump a:hover, .v4p .crumbs a:hover { background: var(--glass-2); border-color: var(--hair-2); color: var(--white); }
.v4p .crumbs a { background: transparent; border-color: rgba(184, 219, 217, 0.35); color: var(--blue); }
.v4p-formatting .crumbs a[href="/help/formatting/"], .v4p-troubleshooting .crumbs a[href="/help/troubleshooting/"] { background: var(--blue); border-color: var(--blue); color: var(--gun); }

/* a real 3D phone still beside the page header (help pages). Wide screens only, positioned so it never moves the text. */
.v4p .top-phone { display: none; }
@media (min-width: 1240px) {
  .v4p .top-phone { display: block; position: absolute; z-index: 3; top: clamp(40px, 5vw, 72px); left: calc(50% + 420px); width: clamp(176px, 14vw, 216px); margin: 0; pointer-events: none; filter: drop-shadow(0 34px 40px rgba(0, 0, 0, 0.38)); }
  .v4p .top-phone img { width: 100%; height: auto; }
}

/* paper: a light sheet lifted off the stage */
.v4p .doc, .v4p .paper {
  position: relative; z-index: 2;
  background: var(--ghost); color: var(--gun);
  margin: calc(var(--r-sheet) * -1.4) var(--sheet-x) var(--sheet-x);
  border-radius: var(--r-sheet);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.5) inset, var(--lift-dark);
}
.v4p .doc { padding-block: clamp(40px, 6vw, 80px) clamp(48px, 7vw, 88px); margin-inline: max(var(--sheet-x), calc((100% - 1080px) / 2)); }
.v4p .doc h2, .v4p .doc h3, .v4p .paper h2, .v4p .paper h3 { color: var(--gun); }
.v4p .doc section { border-top: 1px solid var(--ink-hair); padding-block: 30px; }
.v4p .doc section:first-child { border-top: 0; padding-top: 0; }
.v4p .doc h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.02em; }
.v4p .doc a { text-decoration-color: rgba(205, 83, 59, 0.7); }
.v4p .doc a:hover { text-decoration-color: var(--copper); }
.v4p .doc ul.list li::before, .v4p .paper ul.list li::before { background: var(--copper); width: 10px; border-radius: 2px; }
.v4p .doc ol.list li::before { color: var(--gun); font-variant-numeric: tabular-nums; }
.v4p .doc .callout, .v4p .doc .soon {
  border: 0; border-radius: var(--r-card); background: var(--white); box-shadow: var(--lift);
  padding: 20px 22px 20px 26px; position: relative; overflow: hidden;
}
.v4p .doc .callout::before, .v4p .doc .soon::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--copper); }
.v4p .doc dl { background: var(--white); border-radius: var(--r-card); box-shadow: var(--lift); padding: 6px 22px; }
.v4p .doc dt { margin-top: 0; padding-top: 14px; }
.v4p .doc dd { padding-bottom: 14px; border-bottom: 1px solid var(--ink-hair); }
.v4p .doc dd:last-child { border-bottom: 0; }

/* code and prompts: little dark stages inside the sheet */
.v4p .doc code { background: rgba(57, 61, 63, 0.08); border-radius: 6px; padding: 1px 6px; }
.v4p .doc pre.block, .v4p .doc pre.prompt {
  background: var(--gun); color: var(--ghost); border: 0; border-radius: 16px;
  padding: 18px 20px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 14px 30px rgba(57, 61, 63, 0.22);
}
.v4p .doc pre.prompt { background: var(--gun); }
.v4p .doc pre :focus-visible { outline-color: var(--blue); }
.v4p .doc .msg { border-left: 0; position: relative; padding: 12px 16px 12px 22px; background: var(--white); border-radius: 12px; box-shadow: var(--lift); }
.v4p .doc .msg::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 12px 0 0 12px; background: var(--copper); }
.v4p .copy-status:not(:empty) { border-left: 0; padding-left: 0; color: var(--gun); }

/* answers: each one a card */
.v4p .doc details, .v4p .paper details {
  background: var(--white); border: 0; border-radius: var(--r-card);
  box-shadow: var(--lift); margin: 0 0 10px; padding: 0 20px;
}
.v4p .doc details:last-of-type, .v4p .paper details:last-of-type { border-bottom: 0; }
.v4p summary { font-size: 19px; min-height: 64px; padding: 16px 0; }
.v4p summary::after {
  content: "+"; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(205, 83, 59, 0.12); color: var(--copper); font-size: 24px; font-weight: 500; line-height: 1;
}
.v4p details[open] summary::after { content: "+"; transform: rotate(45deg); }
.v4p details > div { padding-bottom: 22px; }
@media (prefers-reduced-motion: no-preference) { .v4p summary::after { transition: transform 0.25s ease; } }
.v4p .help-group { margin-bottom: 52px; }
.v4p .help-group h2 { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.v4p .help-group h2::before, .v4p .doc section > h2:first-child::before { content: ""; flex: none; width: 22px; height: 4px; border-radius: 2px; background: var(--copper); }
.v4p .doc section > h2:first-child { display: flex; align-items: center; gap: 12px; }

/* "Still stuck" and other closing bands sit on the stage */
.v4p .band.on-blue { background: transparent; color: var(--ghost); padding-block: clamp(40px, 6vw, 72px) clamp(56px, 8vw, 96px); }
.v4p .band.on-blue h2 { color: var(--white); }
.v4p .band.on-blue .wrap { background: var(--glass); border: 1px solid var(--hair); border-radius: var(--r-sheet); padding: clamp(26px, 4vw, 44px); }
.v4p .band.on-blue .lead { color: var(--ghost); }
.v4p .band.on-blue .btn-gun { background: var(--copper); border-color: var(--copper); }

/* forms: rounded fields, the same on paper and on the stage */
.v4p .wl input[type="email"] {
  min-height: 56px; border-radius: 14px; border: 1.5px solid rgba(57, 61, 63, 0.28);
  background: var(--white); box-shadow: inset 0 1px 2px rgba(57, 61, 63, 0.08); padding-inline: 16px;
}
.v4p .wl input[type="email"]:focus { border-color: var(--gun); }
.v4p .wl input[type="email"][aria-invalid="true"] { border-color: var(--copper); border-width: 2px; }
.v4p .wl .check input { accent-color: var(--copper); }
.v4p .wl-msg:not(:empty) { border-left-color: var(--copper); }
.v4p .stage .wl label.field, .v4p .stage .wl .check, .v4p .glass .wl label.field { color: var(--ghost); }
.v4p .stage .wl input[type="email"], .v4p .glass .wl input[type="email"] {
  background: rgba(244, 244, 249, 0.07); color: var(--white); border-color: var(--hair-2); box-shadow: none;
}
.v4p .stage .wl input[type="email"]::placeholder, .v4p .glass .wl input[type="email"]::placeholder { color: rgba(244, 244, 249, 0.55); }
.v4p .stage .wl input[type="email"]:focus { border-color: var(--blue); }
.v4p .stage .wl-msg:not(:empty) { border-left-color: var(--blue); color: var(--white); }

/* 404: the links as cards on the stage */
.v4p-404 .page-top { padding-bottom: clamp(32px, 4vw, 48px); text-align: center; }
.v4p-404 .page-top .wrap, .v4p-404 .doc .wrap { display: flex; flex-direction: column; align-items: center; }
.v4p-404 .page-top::after { display: none; }
.v4p-404 .doc { background: transparent; box-shadow: none; margin-top: 0; padding-top: 0; color: var(--ghost); }
.v4p-404 .doc ul.list { display: grid; gap: 12px; width: 100%; max-width: 640px; }
.v4p-404 .doc ul.list li {
  padding: 20px 22px; border-radius: var(--r-card); background: var(--glass); border: 1px solid var(--hair);
  max-width: none; color: var(--ghost);
}
.v4p-404 .doc ul.list li::before { display: none; }
.v4p-404 .doc ul.list a { color: var(--white); text-decoration-color: var(--copper); }
.v4p-404 main { background: radial-gradient(70% 60% at 50% 30%, rgba(244, 244, 249, 0.07), rgba(244, 244, 249, 0) 70%); }

/* footer */
.v4p .foot { background: var(--gun); border-top: 1px solid rgba(244, 244, 249, 0.08); }
.v4p .foot a { color: var(--ghost); text-decoration: none; }
.v4p .foot a:hover { color: var(--white); text-decoration: underline; text-decoration-thickness: 1px; }
.v4p .foot .co { color: rgba(244, 244, 249, 0.8); }
