/* Release page (elliot.onl/release): a form people open from a link, fill
   in, sign with a finger and send. Built by release.js, laid out like the
   contact page: numbered rows with dotted leaders, the field in the
   details column and its action on the right. Phones get .is-phone from
   release.js (same PHONE_QUERY as home.js), so there's one set of rules. */

body:has(.release-page) {
  background: #000000 !important;
  color: #ffffff !important;
}

.page:has(.release-page) {
  min-height: auto !important;
  padding: 0 !important;
}

.page-layout:has(.release-page) {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  align-items: flex-start !important;
  align-content: flex-start !important;
  justify-content: flex-start !important;
}

.page-content:has(.release-page) {
  align-self: flex-start !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 18px clamp(24px, 4.5vw, 72px) 4rem !important;
  text-align: left !important;
  background: transparent !important;
}

html body .release-page,
html body .release-page * {
  box-sizing: border-box;
  color: #ffffff;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
  font-size: 11px !important;
  font-weight: 400 !important;
  font-style: normal !important;
  line-height: 1.65 !important;
  letter-spacing: 0 !important;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html body .release-page a,
html body .release-page a:hover,
html body .release-page a:active {
  border: 0 !important;
  box-shadow: none !important;
  background: none !important;
  text-decoration: none !important;
}

.release-page [hidden] {
  display: none !important;
}

.release-page {
  --row-columns: 4ch minmax(0, 3fr) minmax(0, 2fr) minmax(0, 2fr) minmax(0, 1.2fr) 5ch;
  --row-dim: #8f8f8f;
  --row-faint: rgba(255, 255, 255, 0.42);
  --row-leader: rgba(255, 255, 255, 0.3);
}

/* Name bar, as on the other pages */

.release-page .index-heading.is-built {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 2ch;
  align-items: baseline;
  margin: 0;
}

html body .release-page .site-role {
  color: var(--row-dim) !important;
}

.release-page .site-nav {
  display: flex;
  justify-self: end;
  gap: 2.5ch;
}

html body .release-page .site-nav a {
  border-bottom: 1px solid transparent !important;
}

html body .release-page .site-nav a:hover {
  border-bottom-color: #ffffff !important;
}

/* "Person release" and the explainer link, like "Contact" and the clock */

.release-page .release-tools {
  display: flex;
  justify-content: space-between;
  gap: 0 3ch;
  margin-top: clamp(4rem, 14vh, 9rem);
}

html body .release-page .release-tools a,
html body .release-page .release-intro {
  color: var(--row-dim) !important;
}

html body .release-page .release-tools a:hover {
  color: #ffffff !important;
}

.release-page .release-intro {
  max-width: 62ch;
  margin: 0 0 6px;
}

/* Rows */

.release-page .release-section {
  margin-top: 2.4rem;
}

.release-page .release-columns,
.release-page .release-row {
  display: grid;
  grid-template-columns: var(--row-columns);
  column-gap: 2ch;
  align-items: baseline;
}

html body .release-page .release-columns,
html body .release-page .release-columns * {
  color: var(--row-faint) !important;
}

.release-page .release-columns {
  padding-bottom: 6px;
}

.release-page .release-columns span:nth-child(3) {
  grid-column: 3 / span 2;
}

.release-page .release-row {
  padding: 4px 0;
}

html body .release-page .release-number {
  grid-column: 1;
  color: var(--row-dim) !important;
  font-variant-numeric: tabular-nums;
}

.release-page .release-label,
.release-page .release-value {
  display: flex;
  align-items: baseline;
  min-width: 0;
}

.release-page .release-label {
  grid-column: 2;
}

.release-page .release-value {
  grid-column: 3 / span 2;
}

.release-page .release-label::after,
.release-page .release-value::after {
  flex: 1 1 0;
  min-width: 2ch;
  margin-left: 1ch;
  border-bottom: 1px dotted var(--row-leader);
  content: "";
  transform: translateY(-0.3em);
  transition: border-color 240ms ease;
}

.release-page .release-label-text {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html body .release-page .release-action {
  grid-column: 5 / span 2;
  color: var(--row-dim) !important;
  text-align: right;
  white-space: nowrap;
}

/* Typed fields: no box, just the text, sized to what's in it so the
   leader runs on after it. */

html body .release-page input {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  outline: 0;
  background: transparent !important;
  box-shadow: none !important;
  color: #ffffff !important;
  caret-color: #ffffff;
  -webkit-appearance: none;
  appearance: none;
}

html body .release-page input::placeholder {
  color: var(--row-faint) !important;
  opacity: 1;
}

.release-page .release-row.is-focus .release-value::after,
.release-page .release-row.is-focus .release-label::after {
  border-bottom-color: rgba(255, 255, 255, 0.85);
}

/* Required: a small raised asterisk on the end of the grey hint, like a
   normal one. On typed fields it's drawn over the end of the placeholder
   and goes once something is typed. */
html body .release-page .release-star {
  display: inline-block;
  margin-left: 1px;
  color: var(--row-faint) !important;
  font-size: 9px !important;
  line-height: 0 !important;
  vertical-align: 0.45em;
}

html body .release-page .release-choice:has(+ .release-star) {
  margin-right: 0;
}

.release-page .release-value {
  position: relative;
}

html body .release-page .release-star-at {
  position: absolute;
  top: 0;
  pointer-events: none;
}

.release-page .release-value:has(input:not(:placeholder-shown)) .release-star-at {
  display: none;
}

html body .release-page .release-row.is-missing .release-star {
  color: #ffffff !important;
}

html body .release-page .release-row.is-missing .release-action {
  color: #ffffff !important;
}

/* Choices (age, agree): words, the chosen one white, like the filters */

html body .release-page .release-choice {
  margin: 0 2ch 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--row-faint) !important;
  cursor: pointer;
}

html body .release-page .release-choice.is-on,
html body .release-page .release-choice:hover {
  color: #ffffff !important;
}

.release-page .release-choices {
  grid-column: 3 / span 2;
}

/* Terms: lettered, label then the words, wrapping */

html body .release-page .release-term-text {
  grid-column: 3 / span 4;
  max-width: 78ch;
  color: #d6d6d6 !important;
}

.release-page .release-term {
  padding: 5px 0;
}

/* Signature: the hint on the Signature line like other rows, then a box
   to sign in (Elliot's ask, 6 Oct 2026) underneath, from the details
   column to the right edge, with an × to clear it in its corner */

.release-page .release-pad {
  position: relative;
  grid-column: 3 / -1;
  grid-row: 2;
  height: 120px;
  margin-top: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  touch-action: none;
  cursor: crosshair;
}

.release-page .release-pad canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

html body .release-page .release-pad-hint {
  color: var(--row-faint) !important;
}

.release-page .release-pad-hint::after {
  display: none;
}

.release-page .release-row.release-sign {
  padding-bottom: 12px;
}

html body .release-page .release-pad-clear {
  position: absolute;
  top: 4px;
  right: 1ch;
  margin: 0;
  padding: 0 2px;
  border: 0;
  background: none;
  color: var(--row-dim) !important;
  cursor: pointer;
}

html body .release-page .release-pad-clear:hover {
  color: #ffffff !important;
}

html body .release-page button.release-action {
  justify-self: end;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

html body .release-page button.release-action:hover {
  color: #ffffff !important;
}

/* Send: just "Sign and send →" in the label column (6 Oct 2026) */
html body .release-page .release-send {
  display: inline-block;
  width: auto;
  margin: 2rem 0 0 6ch;
  padding: 10px 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

html body .release-page .release-send-arrow {
  display: inline-block;
  margin-left: 1ch;
  transition: transform 240ms ease;
}

.release-page .release-send:hover .release-send-arrow {
  transform: translateX(0.5ch);
}

html body .release-page .release-send[disabled] * {
  color: var(--row-faint) !important;
}

html body .release-page .release-error {
  grid-column: 2 / span 5;
  min-height: 1.65em;
  color: #ffffff !important;
}

/* Hovering fades the other rows back, as on the other pages */
@media (hover: hover) and (pointer: fine) {
  html body .release-page .release-fields:hover .release-row:not(:hover):not(.is-focus):not(.is-missing) .release-label-text {
    color: var(--row-faint) !important;
  }
}

.release-page .release-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 3ch;
  margin-top: 5rem;
}

html body .release-page .release-footer,
html body .release-page .release-footer * {
  color: var(--row-dim) !important;
}

/* ---------------------------------------------------------------------
   Phones: name bar on one line with just Work; each row is the number,
   the label with its leader and the action, then the field below it.
   --------------------------------------------------------------------- */

.page-content:has(.release-page.is-phone) {
  padding: 16px 20px 3rem !important;
}

.release-page.is-phone .index-heading.is-built {
  grid-template-columns: minmax(0, 1fr) auto;
}

.release-page.is-phone .site-role {
  grid-row: 2;
  grid-column: 1;
}

.release-page.is-phone .site-nav {
  grid-row: 1;
  grid-column: 2;
}

.release-page.is-phone .site-nav .is-contact {
  display: none !important;
}

.release-page.is-phone .release-tools {
  margin-top: 3.5rem;
}

.release-page.is-phone .release-columns {
  grid-template-columns: 4ch minmax(0, 1fr);
}

.release-page.is-phone .release-columns span:nth-child(3) {
  display: none;
}

.release-page.is-phone .release-row {
  grid-template-columns: 4ch minmax(0, 1fr) auto;
  padding: 0.35rem 0 0.3rem;
}

.release-page.is-phone .release-label {
  grid-column: 2;
  grid-row: 1;
}

html body .release-page.is-phone .release-field .release-label-text {
  color: var(--row-dim) !important;
}

html body .release-page.is-phone .release-action {
  grid-column: 3;
  grid-row: 1;
}

.release-page.is-phone .release-value,
.release-page.is-phone .release-choices,
.release-page.is-phone .release-term-text,
.release-page.is-phone .release-pad {
  grid-column: 2 / span 2;
  grid-row: 2;
}

.release-page.is-phone .release-pad {
  grid-row: 3;
  height: 140px;
}

.release-page.is-phone .release-sign .release-label {
  padding-bottom: 0;
}

.release-page.is-phone .release-send {
  padding: 14px 0;
}

.release-page.is-phone .release-error {
  grid-column: 2 / span 2;
}

.release-page.is-phone .release-footer {
  flex-direction: column;
  gap: 0.1rem;
  margin-top: 3rem;
}

/* ---------------------------------------------------------------------
   Writing lines (option B, picked 6 Oct 2026; release.js adds .is-lines):
   each typed field gets a full-width line to write on, brighter while
   you're typing in it, instead of the text sitting in the dotted leader.
   Since 6 Oct 2026 the lines themselves are gone: the field just fills
   the details column.
   --------------------------------------------------------------------- */

html body .release-page.is-lines input {
  flex: 1 1 auto;
  width: 100% !important;
}

/* No underline either (6 Oct 2026): you just type, lined up with the
   other rows' text; a missing field's placeholder turns white. */
html body .release-page.is-lines .release-row.is-missing input::placeholder {
  color: #ffffff !important;
}

.release-page.is-lines .release-field .release-value::after {
  display: none;
}


html body .release-page.is-lines .release-row.is-focus .release-label-text {
  color: #ffffff !important;
}

.release-page.is-lines.is-phone .release-value {
  padding-top: 2px;
}

/* Optional photo of the person or place: a note until one is added, then
   a small thumbnail (tap it, or Change, to pick another) */

html body .release-page .release-photo-note {
  color: var(--row-faint) !important;
  white-space: normal;
  cursor: pointer;
}

html body .release-page .release-photo-note:hover,
html body .release-page .release-photo-note:focus-visible {
  color: #ffffff !important;
  outline: 0;
}

.release-page .release-photo .release-photo-thumb {
  display: block;
  height: 72px;
  width: auto;
  max-width: 100%;
  cursor: pointer;
}

.release-page .release-field .release-photo::after {
  display: none;
}

/* Signed page: the save link sits under the thanks */
html body .release-page .release-copy {
  margin-top: 1rem;
}

/* The explainer link, under the intro: white and underlined, so it reads
   as a link */
html body .release-page .release-explain-link {
  display: inline-block;
  margin-bottom: 14px;
  color: #ffffff !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.6) !important;
}

html body .release-page .release-explain-link:hover {
  border-bottom-color: #ffffff !important;
}

/* The answer opens under the link, sliding down from behind it */
.release-page .release-explainer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 420ms ease;
}

.release-page .release-explainer.is-open {
  grid-template-rows: 1fr;
}

.release-page .release-explainer-inner {
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 320ms ease, transform 420ms ease, visibility 0s linear 420ms;
  visibility: hidden;
}

.release-page .release-explainer.is-open .release-explainer-inner {
  opacity: 1;
  transform: none;
  transition: opacity 320ms ease 80ms, transform 420ms ease;
  visibility: visible;
}

.release-page .release-explainer .release-section {
  margin-top: 0.6rem;
}

html body .release-page .release-explain-close {
  display: inline-block;
  margin: 0.8rem 0 0.4rem calc(4ch + 2ch);
  color: var(--row-dim) !important;
}

html body .release-page .release-explain-close:hover {
  color: #ffffff !important;
}

.release-page.is-phone .release-explain-close {
  margin-left: calc(4ch + 2ch);
}

@media (prefers-reduced-motion: reduce) {
  .release-page .release-explainer,
  .release-page .release-explainer-inner {
    transition: none !important;
  }
}

/* Anything still needed when Send is pressed turns red, label and grey
   hint alike (6 Oct 2026), until it's done */
.release-page {
  --row-missing: #ff5a4f;
}

html body .release-page .release-row.is-missing .release-label-text,
html body .release-page .release-row.is-missing .release-star,
html body .release-page .release-row.is-missing .release-choice,
html body .release-page .release-row.is-missing .release-choice span,
html body .release-page .release-row.is-missing .release-pad-hint,
html body .release-page .release-row.is-missing .release-pad-clear,
html body .release-page .release-error {
  color: var(--row-missing) !important;
}

html body .release-page.is-lines .release-row.is-missing input::placeholder {
  color: var(--row-missing) !important;
}

.release-page .release-row.is-missing .release-label::after {
  border-bottom-color: var(--row-missing);
}

.release-page .release-row.is-missing .release-pad {
  border-color: var(--row-missing);
}
