/* Resume gate — the request dialog behind every "resume" control.
   Same drawing-sheet material as the rest of the site: panel fill, pale
   linework, mono labels, one redline accent. */

/* The triggers are <button> now, not <a>. Strip the UA chrome and re-apply the
   link rules they inherited before, hover affordances included — nothing about
   these should look or behave differently for having stopped being links. */
.nav-resume,
.tblock .tb-value.link[data-resume-gate] {
  font: inherit; background: none; border: 0; padding: 0;
  cursor: pointer; text-align: left;
}

/* nav: white mono label with the wipe-in underline of its siblings */
.nav .nav-resume {
  position: relative; padding: 4px 0;
  color: #fff; font-size: 12px; letter-spacing: .08em;
}
.nav .nav-resume::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: #fff; transform: scaleX(0); transform-origin: left;
  transition: transform .28s cubic-bezier(.6, 0, .2, 1);
}
.nav .nav-resume:hover::after, .nav .nav-resume:focus-visible::after { transform: scaleX(1); }

/* title block: keeps the ruled underline and the redline hover of .tb-value.link */
.tblock .tb-value.link[data-resume-gate] {
  color: inherit;
  font-size: 13px; letter-spacing: .06em;  /* the `font: inherit` reset above
                                              would otherwise take body size */
  border-bottom: 1px solid var(--line);
  width: fit-content;
}
.tblock .tb-value.link[data-resume-gate]:hover,
.tblock .tb-value.link[data-resume-gate]:focus-visible {
  color: var(--redline); border-color: var(--redline);
}

.rg-scrim {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: max(16px, 4vh) var(--gutter);
  background: rgba(10, 11, 13, .82);
  overflow-y: auto;
  animation: rg-fade .18s ease-out;
}
.rg-scrim[hidden] { display: none; }
@keyframes rg-fade { from { opacity: 0; } to { opacity: 1; } }

.rg-sheet {
  position: relative;
  width: min(680px, 100%);
  margin: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 2px solid var(--redline);
  border-radius: 2px;
  padding: clamp(24px, 4vw, 40px);
  animation: rg-rise .22s cubic-bezier(.2, .7, .3, 1);
}
@keyframes rg-rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .rg-scrim, .rg-sheet { animation: none; }
}

.rg-close {
  position: absolute; top: 12px; right: 12px;
  background: none; border: 0; cursor: pointer;
  font-size: 10px; letter-spacing: .14em; color: var(--dim);
  padding: 6px 8px;
}
.rg-close:hover, .rg-close:focus-visible { color: var(--white); }

.rg-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(28px, 4vw, 40px); line-height: .95;
  text-transform: uppercase; color: var(--white);
  margin-top: 12px;
}
.rg-lede { margin-top: 10px; color: var(--dim); font-size: 15px; max-width: 58ch; }

.rg-form {
  margin-top: 22px; padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.rg-form label {
  display: flex; flex-direction: column; gap: 8px;
  font-size: 10.5px; letter-spacing: .14em; color: var(--dim);
}
.rg-opt { color: #566070; letter-spacing: .12em; }
.rg-note-field { grid-column: 1 / -1; }
.rg-form input, .rg-form textarea {
  background: var(--panel-deep); color: var(--text);
  border: 1px solid var(--line); border-radius: 2px;
  padding: 12px 14px; font: inherit; font-size: 14px;
  letter-spacing: .02em; resize: vertical;
}
.rg-form input:focus-visible, .rg-form textarea:focus-visible {
  outline: none; border-color: var(--redline);
}
.rg-form input.rg-bad, .rg-form textarea.rg-bad { border-color: var(--redline); }
.rg-form ::placeholder {
  color: rgba(159, 180, 200, .3);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
}

.rg-actions {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.rg-alt {
  font-size: 10px; letter-spacing: .12em; color: var(--dim);
  text-decoration: none; border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}
.rg-alt:hover, .rg-alt:focus-visible { color: var(--text); border-color: var(--steel); }

.rg-status {
  grid-column: 1 / -1;
  font-size: 10.5px; letter-spacing: .12em; color: var(--steel);
  margin: 0; min-height: 1em;
}
.rg-status.rg-err { color: var(--redline); }
.rg-fine { grid-column: 1 / -1; margin: 0; }

/* done state — the form is replaced by a receipt, not cleared */
.rg-done { grid-column: 1 / -1; }
.rg-done .rg-done-h {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(24px, 3.2vw, 34px); line-height: 1; color: var(--white);
}
.rg-done p { margin-top: 10px; color: var(--dim); font-size: 15px; }
.rg-done .rg-retry {
  display: inline-block; margin-top: 14px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em;
  color: var(--dim); background: none; border: 0; cursor: pointer;
  border-bottom: 1px solid var(--line); padding: 0 0 2px;
}
.rg-done .rg-retry:hover, .rg-done .rg-retry:focus-visible {
  color: var(--text); border-color: var(--steel);
}

.rg-noscript {
  margin: 0; padding: 14px var(--gutter);
  border-top: 1px solid var(--line);
  font-size: 10px; letter-spacing: .12em; color: var(--dim);
  background: var(--panel-deep);
}
.rg-noscript a { color: var(--text); }

@media (max-width: 640px) {
  .rg-form { grid-template-columns: 1fr; }
  .rg-sheet { padding: 28px 20px; }
  /* thumb-sized targets take priority over fitting the dialog on one screen —
     the scrim scrolls on a phone anyway */
  .rg-form input, .rg-form textarea { min-height: 44px; padding: 12px 14px; font-size: 16px; }
  .rg-form textarea { min-height: 72px; }
  .rg-actions .demo-btn { min-height: 46px; width: 100%; }
  .rg-close { padding: 10px 12px; }
}

/* laptop-height screens: the whole dialog, submit button included, has to sit
   inside the viewport without a scroll */
@media (max-height: 880px) and (min-width: 641px) {
  .rg-sheet { padding: 22px clamp(20px, 3vw, 32px) 24px; }
  .rg-title { font-size: clamp(26px, 3.4vw, 34px); margin-top: 8px; }
  .rg-lede { font-size: 14px; margin-top: 8px; }
  .rg-form { margin-top: 16px; padding-top: 16px; gap: 12px; }
  .rg-form label { gap: 6px; }
  .rg-form input, .rg-form textarea { padding: 9px 12px; font-size: 13.5px; }
}
