/* rs140 Reply etched in glass (INV-18, stage 1, A2480). Restyle only of rs060: handOff, HAND = 4000, the Send label,
   id="kjy-reply" and every field are as forked (D-156). Fields are engraved lines, answers and Send are patches cut into the
   glass. At Send the card glides to its new height and its slab changes cut (W1.4, below). */
.rs140 {
  --rs140-ink: var(--c-secondary); /* the signed name and the answer ring */
  --rs140-well: transparent; /* A2040: no box (A2032: white .42; mocha: rgb(22 14 9 / .46)) */
  --rs140-rim: var(--sgl-etched-groove, inset 0 -1px 0 rgb(58 42 32 / .45)); /* A2044: an engraved groove (A2040: an ink line) */
  --rs140-rim-on: var(--sgl-etched-groove-on, inset 0 -1.5px 0 var(--c-secondary));
  /* A2047: a dropdown's chevron, engraved: a thin ink stroke over a lit lip 1 px below (ink #3A2A20 for the light
     ground; a dark ground would swap the two colours) */
  --rs140-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1.2 1.6 6 6.3l4.8-4.7' fill='none' stroke='%233A2A20' stroke-opacity='.82' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --rs140-chev-lip: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1.2 1.6 6 6.3l4.8-4.7' fill='none' stroke='%23FFFFFF' stroke-opacity='.8' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --rs140-pad: clamp(22px, 6vw, 56px);
  --rs140-hair: var(--sgl-hair, rgb(58 42 32 / .25)); /* mocha: rgb(255 255 255 / .2) */
  position: relative; padding: var(--k-section-pad) 0;
  background: var(--k-dark, transparent); color: var(--k-on-dark); text-align: center;
}

/* ---- the glass pane (see-through: no transform, filter, contain or container-type on it or above it) ---- */
.rs140 .rs140__card { margin: 0 auto; color: var(--k-on-dark); text-shadow: var(--sgl-text-shadow); }
.rs140 .rs140__body { padding: 0; }

/* ---- the title side: "Kindly reply", the reply-by date, the guest's own reply, the plain button ---- */
.rs140 .rs140__side { display: flex; flex-direction: column; align-items: center; }
.rs140 .rs140__title { margin: 0; }
.rs140 .rs140__rule { width: 170px; margin-top: 8px; }
.rs140 .rs140__by { margin-top: 18px; font: 400 1.0625rem/1.6 var(--k-font-display); color: var(--k-on-dark); }
.rs140 .rs140__by b { display: inline-block; margin-top: 8px; font: 300 clamp(1rem, 4.2vw, 1.3rem)/1.4 var(--k-font-display);
  letter-spacing: .08em; text-transform: uppercase; color: var(--k-on-dark); }
.rs140 .rs140__by--none { margin-top: 20px; }
.rs140 .rs140__rule--end { width: 140px; margin-top: 22px; }
.rs140 .rs140-mine { margin-top: 24px; }
.rs140 .rs140-mine__t { margin: 0 0 14px; font: 400 1.0625rem/1.6 var(--k-font-display); color: var(--k-on-dark); }
.rs140 .rs140-change { margin: 0 0 4px; }
.rs140 .rs140__plain { margin-top: 28px; }
.rs140 .rs140-mine[hidden], .rs140 .rs140__plain[hidden], .rs140 .rs140-form[hidden], .rs140 .rs140-field[hidden],
.rs140 .rs140-yes[hidden], .rs140 .rs140-thanks[hidden], .rs140 .rs140-extra:empty { display: none; }

/* ---- the form ---- */
.rs140 .rs140-form { display: grid; gap: 22px; margin-top: 30px; text-align: left; container-type: inline-size; }
.rs140 .rs140__ink, .rs140 .rs140-yes, .rs140 .rs140-extra { display: grid; gap: 22px; min-width: 0; }
.rs140 .rs140-field { display: block; min-width: 0; }
.rs140 .rs140-field__l { display: block; margin: 0 0 8px; padding: 0; font: 400 .75rem/1.4 var(--k-font-body);
  letter-spacing: .24em; text-transform: uppercase; color: var(--k-on-dark);
  -webkit-mask: var(--sgl-text-tex); mask: var(--sgl-text-tex); } /* a label's words: the grain by hand (the label holds the field) */
.rs140 .rs140-field__l i { font-style: normal; letter-spacing: .1em; text-transform: none; color: var(--k-on-dark-soft); }
/* a field: an etched line on the glass (A2040; was an inset well); the champagne line marks the one in use */
.rs140 .rs140-input { display: block; width: 100%; min-height: 48px; margin: 0; padding: 11px 2px; border: 0; border-radius: 0;
  background: var(--rs140-well); box-shadow: var(--rs140-rim); -webkit-appearance: none; appearance: none;
  font: 400 1.0625rem/1.4 var(--k-font-body); color: var(--k-on-dark); text-shadow: none; }
.rs140 .rs140-input:focus { outline: none; box-shadow: var(--rs140-rim-on); }
/* the note: a patch etched into the glass to write in (A2044; A2040 had a hairline frame: a line alone reads badly for
   three lines) */
.rs140 .rs140-input--note { min-height: 108px; resize: none; padding: 12px 14px; border-radius: var(--sgl-etched-radius, 4px);
  background: var(--sgl-etched-fill, rgb(255 255 255 / .3)); box-shadow: var(--sgl-etched-cut, inset 0 0 0 1px rgb(58 42 32 / .25)); }
.rs140 .rs140-input--note:focus { box-shadow: var(--sgl-etched-cut-deep, none), inset 0 0 0 1.5px var(--c-secondary); }
/* a dropdown (A2047; owner: "the dropdowns should match the overall theme as well"): a patch etched into the glass like
   the answers, with an engraved chevron (was a groove line and a solid triangle) */
.rs140 select.rs140-input { padding: 11px 40px 11px 14px; cursor: pointer; border-radius: var(--sgl-etched-radius, 4px);
  background: var(--rs140-chev-lip) calc(100% - 16px) calc(50% + 1px) / 12px 8px no-repeat, var(--rs140-chev) calc(100% - 16px) 50% / 12px 8px no-repeat,
    var(--sgl-etched-fill, rgb(255 255 255 / .3));
  box-shadow: var(--sgl-etched-cut, inset 0 0 0 1px rgb(58 42 32 / .25)); text-shadow: var(--sgl-etched-text, none); }
.rs140 select.rs140-input:focus { box-shadow: var(--sgl-etched-cut-deep, none), inset 0 0 0 1.5px var(--c-secondary); }
.rs140 .rs140-input option { color: var(--k-ink); background: var(--k-paper); }
.rs140 .rs140-input[name="one"], .rs140 .rs140-input[name="all"] { width: min(100%, 12rem); font-variant-numeric: lining-nums; }
.rs140 .rs140-input:-webkit-autofill { -webkit-text-fill-color: var(--k-on-dark); transition: background-color 600000s 0s; }

/* the signature: the field's own text is invisible; the mirror shows the name in the script face */
.rs140 .rs140-sig { --rs140-sfs: clamp(1.664rem, 6.72vw, 1.984rem); /* W2: x .8; W3: x .8 */
  position: relative; display: block; height: max(48px, calc(var(--rs140-sfs) * 1.3)); border-radius: 0;
  background: var(--rs140-well); box-shadow: var(--rs140-rim); font-size: calc(var(--rs140-sfs) * var(--rs140-k, 1)); }
.rs140 .rs140-sig:focus-within { box-shadow: var(--rs140-rim-on); }
.rs140 .rs140-sig__in, .rs140 .rs140-sig__ink { position: absolute; left: 0; top: 0; height: 100%; margin: 0; padding: 0 .3em 0 .45em; border: 0;
  font: 400 1em/max(48px, calc(var(--rs140-sfs) * 1.3)) var(--k-font-script); letter-spacing: 0; }
.rs140 .rs140-sig__in { width: 100%; border-radius: 0; background: transparent; color: transparent; -webkit-text-fill-color: transparent;
  caret-color: var(--rs140-ink); }
.rs140 .rs140-sig__in:focus { outline: none; }
.rs140 .rs140-sig__in:-webkit-autofill { -webkit-text-fill-color: transparent; transition: background-color 600000s 0s; }
.rs140 .rs140-sig__ink { pointer-events: none; white-space: pre; color: var(--rs140-ink); clip-path: inset(-.6em -.8em -.6em -.8em); }

/* the answer: two patches etched into the glass like the page's Map / Add to calendar (A2044; A2040: flat outline
   buttons); the chosen one is cut deeper and tinted champagne, with the tick */
.rs140 .rs140-choice { display: grid; gap: 16px 18px; min-width: 0; margin: 0; padding: 0; border: 0; }
.rs140 .rs140-opt { position: relative; display: flex; align-items: center; justify-content: center; min-height: 54px; padding: 10px 22px;
  border-radius: var(--sgl-etched-radius, 4px); background: var(--sgl-etched-fill, rgb(255 255 255 / .3)); box-shadow: var(--sgl-etched-cut, inset 0 0 0 1px rgb(58 42 32 / .45));
  text-shadow: var(--sgl-etched-text, none); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: box-shadow .2s; }
.rs140 .rs140-opt:has(input:checked) { background: linear-gradient(var(--sgl-etched-tint, rgb(138 104 68 / .2)) 0 0), var(--sgl-etched-fill, rgb(255 255 255 / .3));
  box-shadow: var(--sgl-etched-cut-deep, inset 0 0 0 1.5px var(--c-secondary)); }
.rs140 .rs140-opt input { position: absolute; left: 50%; top: 50%; width: 1px; height: 1px; margin: 0; opacity: 0; }
.rs140 .rs140-opt__t { font: 400 .8125rem/1.3 var(--k-font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--k-on-dark);
  -webkit-mask: var(--sgl-text-tex); mask: var(--sgl-text-tex); }
/* the tick before the chosen answer (two strokes, champagne) */
.rs140 .rs140-opt:has(input:checked) .rs140-opt__t::before { content: ""; display: inline-block; width: .95em; height: .48em; margin-right: .75em;
  border-left: 1.5px solid var(--c-secondary); border-bottom: 1.5px solid var(--c-secondary); transform: translateY(-.28em) rotate(-45deg); }
/* the focus ring sits outside the words' box, where the grain's mask would hide it: no grain while it shows */
.rs140 .rs140-opt input:focus-visible ~ .rs140-opt__t { outline: 2px solid var(--c-secondary); outline-offset: 5px; -webkit-mask: none; mask: none; }
/* A2040: the hand-drawn ring is hidden (owner: "the choice selection encircling is looking a bit weird"); markup kept */
.rs140 .rs140-ring { display: none; }
@container (min-width: 470px) { .rs140 .rs140-choice { grid-template-columns: 1fr 1fr; } }

/* the counts: one row per event (name and time, then the count), champagne day headings when the events span days */
.rs140 .rs140-help { margin: -10px 0 0; font: 400 .875rem/1.5 var(--k-font-body); color: var(--k-on-dark-soft); }
.rs140 .rs140-evs { margin: 0; }
.rs140 .rs140-ev { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 14px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--rs140-hair); }
.rs140 .rs140-ev__n { grid-column: 1; grid-row: 1; font: 300 1.125rem/1.35 var(--k-font-display); color: var(--k-on-dark); text-wrap: balance; } /* W3: no lonely word (a name, so balance: pretty leaves a 2-line orphan) */
.rs140 .rs140-ev__d { grid-column: 1; grid-row: 2; font: 400 .8125rem/1.5 var(--k-font-body); letter-spacing: .04em; white-space: nowrap; color: var(--k-on-dark-soft); }
.rs140 .rs140-ev__n, .rs140 .rs140-ev__d { -webkit-mask: var(--sgl-text-tex); mask: var(--sgl-text-tex); } /* text in spans: the grain by hand */
/* the count fits "Can't come" at 16 px (no zoom on a phone) and leaves the event's name room */
.rs140 select.rs140-ev__c { grid-column: 2; grid-row: 1 / span 2; width: 9rem; padding: 11px 36px 11px 12px; font-size: 1rem; font-variant-numeric: lining-nums; } /* A2047: the etched patch's padding; 9rem (was 8.5) keeps "Can't come" whole */
.rs140 .rs140-day { margin: 20px 0 0; padding-bottom: 8px; border-bottom: 1px solid var(--rs140-hair); font: 400 .75rem/1.4 var(--k-font-body);
  letter-spacing: .24em; text-transform: uppercase; font-variant-numeric: lining-nums; color: var(--c-secondary); }
.rs140 .rs140-day:first-child { margin-top: 4px; }

/* send, and the lines around it */
.rs140 .rs140-send { justify-self: center; min-width: min(100%, 220px); margin-top: 6px; }
.rs140 .rs140-small { margin: -8px 0 0; text-align: center; font: 400 .8125rem/1.5 var(--k-font-body); letter-spacing: .04em; color: var(--k-on-dark-soft); }
.rs140 .rs140-thanks { margin: 4px 0 0; text-align: center; font: 400 1.125rem/1.6 var(--k-font-display); color: var(--k-on-dark); }
.rs140 .rs140-late { margin: 0; text-align: center; font: 400 1.0625rem/1.5 var(--k-font-display); color: var(--c-secondary); }
.rs140 .rs140-err { margin: 0; padding: 10px 14px; border-radius: 4px; text-align: center; font: 400 .9375rem/1.5 var(--k-font-body);
  color: var(--k-on-dark); background: rgb(var(--c-primary-rgb, 168 94 54) / .5); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .5);
  -webkit-mask: none; mask: none; } /* a box with a 1 px rim: no grain */
.rs140 .rs140-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rs140 .rs140__card select, .rs140 .rs140__card button { min-height: 44px; }

/* sent: the signed name and the circled answer stay; the other fields fold away (as forked) */
.rs140 .rs140-form.is-sent > .rs140-field, .rs140 .rs140-form.is-sent > .rs140-send, .rs140 .rs140-form.is-sent > .rs140-small,
.rs140 .rs140-form.is-sent .rs140__ink > .rs140-field:not(.rs140-field--sig), .rs140 .rs140-form.is-sent .rs140-field--sig > .rs140-field__l,
.rs140 .rs140-form.is-sent .rs140-choice > .rs140-field__l, .rs140 .rs140-form.is-sent .rs140-opt:not(.is-chosen),
.rs140 .rs140-form.is-sent > .rs140-yes, .rs140 .rs140-form.is-sent > .rs140-late, .rs140 .rs140-form.is-sent > .rs140-err { display: none; }
/* W1.4 (A2597), the owner on W1.3: "when you submit, the text comes down, but the empty space remains on the top … the
   contracting after the submission is a bit glitchy". section.js glide(): the fields that go fade (.45 s, is-closing);
   the card eases to its new height on one clock with the page (1.4 s); the words that stay travel with it; the slab's two
   cuts cross-fade, each at its own size pinned to the card's foot (is-swapping: ::before is the old cut, ::after the new);
   what arrives (the thank-you, "You replied on …") fades in as the card lands. "Change your reply" runs it the other way. */
.rs140.is-closing .rs140-form > .rs140-field, .rs140.is-closing .rs140-form > .rs140-send, .rs140.is-closing .rs140-form > .rs140-small,
.rs140.is-closing .rs140__ink > .rs140-field:not(.rs140-field--sig), .rs140.is-closing .rs140-field--sig > .rs140-field__l,
.rs140.is-closing .rs140-choice > .rs140-field__l, .rs140.is-closing .rs140-opt:not(:has(input:checked)),
.rs140.is-closing .rs140-form > .rs140-yes, .rs140.is-closing .rs140-form > .rs140-late, .rs140.is-closing .rs140-form > .rs140-err,
.rs140.is-opening .rs140-thanks { opacity: 0; transition: opacity .45s ease; }
.rs140 .is-arriving { animation: rs140-arrive .8s cubic-bezier(.22, 1, .36, 1) calc(var(--rs140-glide, 1400ms) * .85) both; }
@keyframes rs140-arrive { from { opacity: 0; translate: 0 6px; } }
.rs140 .rs140__card.is-gliding::after { top: auto; bottom: var(--rs140-nb); height: var(--rs140-nh); }
.rs140 .rs140__card.is-swapping::after { animation: rs140-slab-in calc(var(--rs140-glide) * .75) cubic-bezier(.45, 0, .55, 1) calc(var(--rs140-glide) * .15) both; }
.rs140 .rs140__card.is-swapping::before { content: ""; position: absolute; z-index: -1; pointer-events: none; left: var(--rs140-gl); bottom: var(--rs140-gb);
  width: var(--rs140-gw); height: var(--rs140-gh); background: var(--rs140-gpic) center / 100% 100% no-repeat;
  animation: rs140-slab-out calc(var(--rs140-glide) * .7) cubic-bezier(.45, 0, .55, 1) both; }
@keyframes rs140-slab-in { from { opacity: 0; } }
@keyframes rs140-slab-out { to { opacity: 0; } }
.rs140 .rs140-form.is-sent { gap: 16px; }
.rs140 .rs140-form.is-sent .rs140-choice { grid-template-columns: minmax(0, 22rem); justify-content: center; }

/* desktop: a wide pane; the title and date centred on top, the fields in two columns below, never a phone column
   (D-030). Many events: the signature, the answer and the note on the left, the counts on the right. One event: the
   signature and the answer on the left, the guest count and the note on the right. A "no": the note beside the answer.
   A sent card narrows to one centred column. */
@media (min-width: 1000px) {
  .rs140 .rs140__body { padding: 0; }
  .rs140 .rs140-form { width: 100%; max-width: 640px; margin: 40px auto 0; }
  /* W1 (A2545): the card is 640 wide on a laptop, so the form stays one column, as on a tablet (the two columns were for INV-03's wide pane) */
}
/* INV-18: the slab is narrower than INV-03's pane, so an event's time may take two lines on a phone rather than be cut */
@media (max-width: 699.98px) { .rs140 .rs140-ev__d { white-space: normal; } .rs140 select.rs140-ev__c { width: 8.2rem; padding-right: 30px; } }
/* W1.3 (A2589): the objects on the table (scripts/morning_table_props.py), true size, on top, never over a word */
.rs140 .rs140__pen { left: 10%; bottom: -30px; }
.rs140 .rs140__drop { right: 7%; top: -10px; }   /* W1.4 (A2597): a drop of dark honey glass */
@media (min-width: 700px) { .rs140 .rs140__pen { left: 22%; bottom: -40px; } }
