/* Plain CSS, no framework: keeps the CSP's script-src to 'self' with no CDN
   exception needed, and there is no unused framework weight to ship for a
   two-step wizard.

   Colors: renaissance.com's light-mode chrome (white header, black text,
   cream secondary surfaces, red accent) is NOT its only look -- the site
   swaps to a dark navy background with a gold accent and white text under
   `@media (prefers-color-scheme: dark)`. Both variants below use the exact
   design tokens read out of renaissance.com's own stylesheet (as lch()
   values, their native color space), not an approximation, so this page
   matches whichever mode the visitor's OS is actually in -- the same way
   their own site does.

   Font: renaissance.com sets body/heading text in "proxima-nova", served to
   them through a domain-licensed Adobe Fonts (Typekit) kit. That kit is
   locked to renaissance.com's own authorized domains, so it isn't embedded
   here -- doing so without that authorization would be a licensing problem,
   not just a styling one. "proxima-nova" is still named first in the stack
   below: if a browser has it available another way, or the kit is later
   authorized for this app's domain, it's picked up for free; otherwise the
   fallbacks render a close, ungated system-font equivalent. */

:root {
  color-scheme: light dark;

  /* Light (default): matches renaissance.com's :root tokens. */
  --bg-standard: #ffffff;
  --bg-alternate: #f1efe3; /* Beige, PMS 9226 C -- lch(98.3% 3.13 91.54) */
  --ink: #000000; /* PMS Black -- lch(1.11% .39 287) */
  --muted: #54585e; /* Dark Grey, PMS Cool Grey 8 C */
  --border: #dddee0; /* Light Grey, PMS Cool Grey 2 C */
  --accent: #cf3a4e; /* Accessible hyperlink red -- lch(48.73% 64.51 22.72) */
  --accent-ink: #ffffff;

  /* Warning (the blocked-sign-in banner). Not from renaissance.com's own
     tokens -- their palette has no amber -- so this is the same kind of
     exception .verified-check's green already is, for the same reason: the
     brand tokens carry no "caution" colour.

     Both modes use one treatment: a restrained fill carrying a vivid amber
     border and text, rather than a saturated fill. That is what stops the
     dark variant reading as a muddy brown panel (see the dark block), and
     keeping the light variant on the same recipe means the banner is
     recognisably the same component in either mode instead of two
     differently-conceived boxes. --warning-ink on --warning-bg is 9.2:1,
     well clear of WCAG AA for the body-size text this box holds, and the
     border clears the 3:1 non-text threshold at 3.3:1 -- which the obvious
     brighter amber (#c8820a) does not, at 2.92:1. */
  --warning-bg: #fdf6e0;
  --warning-border: #bd7a09;
  --warning-ink: #5c3d00;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark: renaissance.com's own @media (prefers-color-scheme: dark)
       tokens, reused verbatim as lch() rather than hand-converted to hex,
       so this is an exact match rather than an approximation. */
    --bg-standard: lch(20.6% 12.96 287);
    --bg-alternate: lch(15.72% 12.96 287);
    --ink: lch(98.34% 1.49 285.34);
    --muted: lch(75% 3 287);
    --border: lch(36.18% 0.39 287);
    --accent: lch(87.67% 17.76 95.19);
    --accent-ink: lch(20.6% 12.96 287);

    /* Hue ~80, deliberately off --accent's hue 95. In dark mode gold is the
       brand accent itself -- it fills .card-button-label, .button,
       .option-card-icon and .modal-error-icon -- so a banner on that hue
       would read as ordinary accent chrome and "yellow = caution" would
       carry no signal at all.

       The separation comes from chroma as much as hue: --accent is a pale,
       desaturated cream (chroma 17.76), while the border and text here are
       vivid amber (chroma 70 and 40). An earlier attempt put that
       saturation into the FILL instead and simply read as brown -- the fill
       is kept dark and low-chroma for exactly that reason. The banner's own
       icon is what stops the meaning resting on colour at all.
       --warning-ink on --warning-bg is 9.2:1, the border 5.5:1. */
    --warning-bg: lch(23% 14 78);
    --warning-border: lch(72% 70 80);
    --warning-ink: lch(90% 40 85);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    "proxima-nova",
    -apple-system,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  color: var(--ink);
  background: var(--bg-standard);
}

.site-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: var(--bg-standard);
  border-bottom: 1px solid var(--border);
}

.site-logo {
  height: 26px;
  width: auto;
}

.wizard {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 20px 64px;
  text-align: center;
}

/* The first step (#wizard-panes): a full-width page section rather than a
   card -- no border, fill or box of its own, just the main column's width.
   Only the #verify-credential button inside it is interactive (see
   index.html's comment), so it carries none of .verification-card's hover
   affordance. */
.verify-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0 32px;
}

.verify-page .card-image {
  width: 160px;
}

/* The page's one primary action, so a size up from the ordinary .button.
   Scoped under .verify-page so it outranks .button, which comes later. */
.verify-page .verify-primary {
  margin: 28px 0 0;
  padding: 14px 40px;
  font-size: 1.1rem;
  font-weight: 600;
}

.verify-page .verify-primary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Kept to a readable measure and centred as a block, while the list's own
   text stays left-aligned (.steps). */
.verify-page .steps {
  width: 100%;
  max-width: 440px;
  margin-top: 32px;
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .verify-page .card-image {
    width: 120px;
  }

  .verify-page .verify-primary {
    width: 100%;
  }
}

.wizard h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.message-wrapper {
  display: none;
  margin: 16px 0 28px;
}

#message {
  font-size: 1rem;
  color: var(--muted);
}

/* The blocked-sign-in banner (#signin-blocked-warning). Left-aligned
   against the wizard's centred text: it is a paragraph to read, not a
   heading, and centring would wrap it into a ragged stack -- the same
   reason .steps and .apps-wrapper ul opt out of the centring. 8px radius
   and a uniform 1px border to match .verification-card, and the same 20px
   bottom margin, so the gap to the cards below is the gap the cards
   already keep from each other. */
.warning-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 20px;
  color: var(--warning-ink);
  font-size: 0.95rem;
  line-height: 1.45;
}

/* Carries the "this is a caution" meaning independently of the box's
   colour, so it survives both a reader who can't separate the amber from
   the gold accent and the dark mode where those two are closest. Stroked in
   currentColor at the text's own weight rather than given
   .modal-error-icon's 56px filled-circle treatment -- that badge is the
   centrepiece of a modal's error view, whereas this sits inline with one
   paragraph. */
.warning-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.verification-card {
  display: block;
  width: 100%;
  background: var(--bg-alternate);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
  min-height: 360px;
  text-align: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.verification-card:hover {
  background: var(--bg-standard);
  border-color: var(--accent);
}

/* The post-verification option cards (get-support-card, generate-tap-card)
   are div[role="button"] (not a real <button>) so the entire card is the
   click target; card-3 (the completion card) stays plain and
   non-interactive. A real <button> was tried first, but Chromium/WebKit
   reserve the native push-button widget's own internal padding for
   multi-block content regardless of display/padding/appearance overrides,
   which doubled the space above this card's content -- a div with an ARIA
   button role sidesteps that native control layout entirely. (That problem
   is specific to multi-block content: #verify-credential holds one line of
   text, so it is a native <button>.) */
.verification-card[role="button"] {
  cursor: pointer;
}

.verification-card[role="button"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* #card-3 shares this class purely for layout (padding/border/radius), not
   affordance -- without this, hovering either option card nested inside it
   (get-support-card / generate-tap-card) would also flip #card-3's own
   background/border-color, since :hover on a descendant applies to its
   ancestors too. */
#card-3:hover {
  background: var(--bg-alternate);
  border-color: var(--border);
}

/* Applied to #generate-tap-card when the verified caller's account is
   disabled. wizard.js also strips the card's role="button"/tabindex, which
   is what actually takes it out of the tab order and makes its click
   handler no-op -- this is only the matching appearance. The :hover
   override has to be here too, because .verification-card:hover would
   otherwise still light the card up under the cursor and undo the whole
   impression. */
.verification-card.card-disabled,
.verification-card.card-disabled:hover {
  background: var(--bg-alternate);
  border-color: var(--border);
  opacity: 0.55;
  cursor: not-allowed;
}

.verification-card.card-disabled .card-button-label {
  background: var(--border);
  color: var(--muted);
}

.card-button-label {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.button {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.95rem;
  cursor: pointer;
  margin-bottom: 8px;
}

.button:hover {
  filter: brightness(1.08);
}

.button:disabled {
  background: var(--border);
  color: var(--muted);
  cursor: not-allowed;
  filter: none;
}

.post-verify-panes {
  display: flex;
  align-items: stretch;
  gap: 20px;
  margin-top: 20px;
}

/* min-height (not the 360px #card-3 uses, which would be mostly
   empty here) rather than a fixed height: get-support-card's ticket panel
   and generate-tap-card's result panel both grow once opened, and a fixed
   height either clipped that content or forced it to scroll inside a small
   box. align-items:stretch on .post-verify-panes still keeps both cards the
   same height as each other -- opening either one grows the whole row
   together rather than scrolling inside just the one that changed.

   max-width + auto inline margins keep a lone card (generate-tap-card is
   currently hidden, leaving get-support-card on its own) at the width it
   has beside a second card and centred, rather than stretched across the
   whole completion card. With both cards shown each is ~385px wide, under
   the cap, so the two-card row is unchanged. */
.post-verify-panes .verification-card {
  flex: 1;
  max-width: 400px;
  margin-inline: auto;
  min-height: 280px;
  margin-bottom: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* The rule above sets display:flex on every option card, which outranks
   the UA stylesheet's [hidden] { display: none } -- without this, the
   hidden attribute on #generate-tap-card would have no effect at all. */
.post-verify-panes .verification-card[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .post-verify-panes {
    flex-direction: column;
  }

  .post-verify-panes .verification-card {
    min-height: 200px;
  }
}

/* Sized and shaped to match the modal's error-state badge
   (.modal-error-icon) rather than the first step's illustration (.card-image)
   -- that is full artwork, not an icon, so matching its
   pixel size would make a plain line glyph look oversized and empty. This
   is the app's other "circular badge + line icon" treatment (see
   .verified-check below), so post-verification's two option cards and the
   verified checkmark now share one consistent icon-badge scale. */
.option-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
}

.option-card-icon-svg {
  width: 28px;
  height: 28px;
}

/* Shared by get-support-card's ticket panel and generate-tap-card's result
   panel -- both are a reveal area below an option card's button. */
.option-card-panel {
  width: 100%;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.option-card-panel input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-standard);
  color: var(--ink);
  font-size: 0.95rem;
  margin-right: 8px;
}

.option-card-panel input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.option-card-panel p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.tap-value {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.skip-button {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

/* The deep link into the wallet is an <a>, not a <button>: a custom scheme
   has to be a real link for iOS to hand it off reliably (see
   requestCreated() in verifiedid.uihandler.js). It still has to look like
   the page's other buttons, so it borrows .button and drops the underline
   an anchor gets by default. */
a.button {
  text-decoration: none;
}

.open-wallet {
  margin: 8px 0 4px;
}

/* The first step's illustration; .verify-page sets its width. */
.card-image {
  height: auto;
  border-radius: 6px;
  /* The artwork's checkmark badge only overlaps its bottom-right corner, so
     its visual weight sits left of the SVG's own canvas center even though
     the box is centered on the page -- nudge right to compensate. */
  transform: translateX(4%);
}

.qrcode {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 16px 0;
}

.steps {
  text-align: left;
  color: var(--muted);
  font-size: 0.85rem;
  padding-left: 20px;
  margin: 20px 0 0;
}

.steps li {
  margin-bottom: 8px;
}

.steps li:last-child {
  margin-bottom: 0;
}

.secured-by {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: var(--bg-standard);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 24px 24px;
  text-align: center;
}

.modal-content h2 {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--ink);
}

.modal-message {
  color: var(--muted);
  font-size: 0.9rem;
  min-height: 1.2em;
}

.modal-error-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 8px auto 16px;
  border-radius: 50%;
  background: var(--accent);
}

.modal-error-message {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 20px;
}

.verified-thankyou {
  font-size: 1.1rem;
  font-weight: 600;
}

/* Same 56px badge scale as .option-card-icon / .modal-error-icon (was 72px)
   -- this was the single largest graphic on either page, out of step with
   every other icon-badge here. */
.verified-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 16px auto;
  border-radius: 50%;
  background: #2e9e50;
}

.apps-wrapper ul {
  list-style: none;
  padding: 0;
  text-align: left;
  display: inline-block;
}

.apps-wrapper li {
  margin-bottom: 6px;
}

.monospace {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  margin-left: 6px;
}
