/*
 * The drawn FlyPass "Add card" form (design 2C). Every value is the
 * drawing's own and lives on :root; the family is the system's, because the
 * page loads nothing from anywhere.
 */
:root {
  --ink: #0b1020;
  --card-front: #151c2e;
  --sheet: #f4f6f8;
  --panel: #ffffff;
  --panel-ring: rgba(11, 16, 32, 0.06);
  --hairline: #edeff2;
  --text: #0b1020;
  --muted: #6b7280;
  --lime: #b8f34a;
  --lime-pressed: #a6e035;
  --save-disabled: #e1e5ea;
  --save-disabled-ink: #8a93a1;
  --idle: #b0b7c3;
  --white: #ffffff;
  --on-card: rgba(255, 255, 255, 0.94);
  --on-card-label: rgba(255, 255, 255, 0.5);
  --on-card-value: rgba(255, 255, 255, 0.92);
  --on-card-value-idle: rgba(255, 255, 255, 0.42);
  --on-card-mark-idle: rgba(255, 255, 255, 0.4);
  --off-ring: #c8ced8;
  --danger: #b42318;
  --wash: #5e7cff;
  --focus: #fbfcfd;
  --stage-pad: 6px 26px 46px;
  --card-h: 192px;
  --card-r: 22px;
  --sheet-r: 26px;
  --panel-r: 16px;
  --row-h: 62px;
  --label-w: 74px;
  --save-h: 54px;
  --save-r: 15px;
  --fast: 160ms;
  --standard: cubic-bezier(0.2, 0, 0, 1);
  --ghost-sheet: #e7e9ec;
  --ghost-panel: #f0f1f3;
  --ghost-r: 4px;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
}
body {
  font-family:
    "Mona Sans",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  background: var(--sheet);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
main {
  flex: 1 0 auto;
}
.stage {
  background: var(--ink);
  padding: var(--stage-pad);
  padding-top: calc(6px + env(safe-area-inset-top));
}
.card {
  position: relative;
  height: var(--card-h);
  border-radius: var(--card-r);
  background: var(--card-front);
  overflow: hidden;
  isolation: isolate;
}
.glow,
.wash,
.ring,
.hatch {
  position: absolute;
  pointer-events: none;
}
.glow {
  inset: 0;
  background: radial-gradient(120% 90% at 88% -10%, rgba(184, 243, 74, 0.2), transparent 58%);
}
.wash {
  inset: 0;
  background: radial-gradient(80% 70% at 0% 110%, rgba(94, 124, 255, 0.16), transparent 60%);
}
.ring {
  border-radius: 50%;
}
.r1 {
  width: 366px;
  height: 366px;
  right: -114px;
  top: -126px;
  background: rgba(255, 255, 255, 0.022);
}
.r2 {
  width: 298px;
  height: 298px;
  right: -80px;
  top: -92px;
  background: rgba(255, 255, 255, 0.035);
}
.r3 {
  width: 232px;
  height: 232px;
  right: -47px;
  top: -59px;
  background: rgba(255, 255, 255, 0.07);
}
.hatch {
  left: -30px;
  right: -60px;
  bottom: 0;
  height: 44px;
  background: repeating-linear-gradient(
    112deg,
    rgba(255, 255, 255, 0.06) 0 1px,
    transparent 1px 9px
  );
  -webkit-mask-image: linear-gradient(to top, #000, transparent);
  mask-image: linear-gradient(to top, #000, transparent);
}
.face {
  position: relative;
  height: 100%;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  direction: ltr;
  text-align: left;
}
.top {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mark {
  font-weight: 800;
  font-size: 13px;
  line-height: 17px;
  letter-spacing: 0.16em;
  color: var(--on-card-mark-idle);
}
.mark.on {
  color: var(--white);
}
.chip {
  width: 32px;
  height: 24px;
  border-radius: 5px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, #e8ddbc, #bcab80 48%, #d9cda7);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.26);
}
.chip::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 7px;
  right: 7px;
  border-left: 1px solid rgba(0, 0, 0, 0.26);
  border-right: 1px solid rgba(0, 0, 0, 0.26);
}
.chip::after {
  content: "";
  position: absolute;
  inset: 3px 0;
  background: repeating-linear-gradient(to bottom, transparent 0 5px, rgba(0, 0, 0, 0.2) 5px 6px);
}
.bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.num {
  font-weight: 600;
  font-size: 20px;
  line-height: 25px;
  letter-spacing: 0.13em;
  font-variant-numeric: tabular-nums;
  color: var(--on-card);
  white-space: nowrap;
}
.exp {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.exp .label {
  font-weight: 700;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.13em;
  color: var(--on-card-label);
}
.exp .value {
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
  color: var(--on-card-value-idle);
}
.exp .value.on {
  color: var(--on-card-value);
}
.sheet {
  position: relative;
  background: var(--sheet);
  border-radius: var(--sheet-r) var(--sheet-r) 0 0;
  margin-top: calc(-1 * var(--sheet-r));
  padding: 28px 24px 24px;
}
h1 {
  font-weight: 700;
  font-size: 19px;
  line-height: 25px;
  letter-spacing: -0.018em;
  margin: 0;
}
.body {
  font-weight: 500;
  font-size: 13.5px;
  line-height: 19px;
  letter-spacing: 0.005em;
  color: var(--muted);
  margin: 5px 0 0;
}
.panel {
  margin-top: 18px;
  background: var(--panel);
  border-radius: var(--panel-r);
  border: 1px solid var(--panel-ring);
  overflow: hidden;
}
.row {
  min-height: var(--row-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
}
.row + .row,
.row + .split {
  border-top: 1px solid var(--hairline);
}
.row:focus-within,
.cell:focus-within {
  background: var(--focus);
}
label {
  flex: none;
  font-weight: 600;
  font-size: 13px;
  line-height: 18px;
  letter-spacing: 0.005em;
  color: var(--muted);
}
.row > label {
  width: var(--label-w);
}
input[type="text"] {
  flex: 1;
  min-width: 0;
  height: var(--row-h);
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  outline: none;
  padding: 0;
  border-radius: 0;
}
input::placeholder {
  color: var(--idle);
  opacity: 1;
}
#holder {
  letter-spacing: 0;
}
.split {
  display: flex;
}
.cell {
  flex: 1;
  min-width: 0;
  min-height: var(--row-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
}
.cell + .cell {
  border-inline-start: 1px solid var(--hairline);
}
.cell input[type="text"] {
  letter-spacing: 0.02em;
}
.brand {
  flex: none;
  font-weight: 800;
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 0.08em;
  color: var(--text);
}
.error {
  color: var(--danger);
  font-weight: 500;
  font-size: 13px;
  line-height: 18px;
  margin: 10px 4px 0;
  min-height: 18px;
}
.toggle-panel {
  margin-top: 22px;
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--panel);
  border-radius: var(--panel-r);
  border: 1px solid var(--panel-ring);
}
.toggle-panel .text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.toggle-panel .name {
  font-weight: 600;
  font-size: 16px;
  line-height: 22px;
  letter-spacing: -0.012em;
}
.toggle-panel .meta {
  font-weight: 500;
  font-size: 13px;
  line-height: 18px;
  letter-spacing: 0.005em;
  color: var(--muted);
}
.switch {
  flex: none;
  width: 52px;
  height: 32px;
  border-radius: 16px;
  border: 1.5px solid var(--off-ring);
  background: var(--white);
  position: relative;
  padding: 0;
  cursor: pointer;
  transition:
    background var(--fast) var(--standard),
    border-color var(--fast) var(--standard);
}
.switch .knob {
  position: absolute;
  top: 2px;
  inset-inline-start: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--off-ring);
  transition:
    transform var(--fast) var(--standard),
    background var(--fast) var(--standard);
}
.switch[aria-checked="true"] {
  background: var(--lime);
  border-color: var(--lime);
}
.switch[aria-checked="true"] .knob {
  background: var(--ink);
  transform: translateX(20px);
}
[dir="rtl"] .switch[aria-checked="true"] .knob {
  transform: translateX(-20px);
}
.switch:focus-visible,
.save:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.cta {
  position: sticky;
  bottom: 0;
  background: var(--sheet);
  padding: 12px 24px calc(24px + env(safe-area-inset-bottom));
}
.save {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--save-h);
  border-radius: var(--save-r);
  border: 0;
  font: inherit;
  font-weight: 700;
  font-size: 16.5px;
  letter-spacing: -0.012em;
  background: var(--lime);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
}
.save:active {
  background: var(--lime-pressed);
}
.save:disabled {
  background: var(--save-disabled);
  color: var(--save-disabled-ink);
  cursor: default;
}
.link {
  margin-top: 22px;
}
.state .sheet {
  min-height: 40vh;
}
@media (prefers-reduced-motion: reduce) {
  .switch,
  .switch .knob {
    transition: none;
  }
}
@media (max-width: 344px) {
  .sheet {
    padding-inline: 20px;
  }
  .row > label {
    width: 64px;
  }
  input[type="text"],
  .cell input[type="text"] {
    font-size: 14px;
    letter-spacing: 0;
  }
  .row,
  .cell {
    gap: 10px;
    padding-inline: 14px;
  }
}

/* The loading state: the drawn form as shapes, at the size it will come. */
.ghost {
  display: block;
  flex: none;
  border-radius: var(--ghost-r);
  background: var(--ghost-sheet);
}
.ghost-panel {
  background: var(--ghost-panel);
}
.ghost-title {
  width: 132px;
  height: 19px;
  margin: 3px 0;
  border-radius: 5px;
}
.ghost-line {
  width: 100%;
  height: 13px;
  margin-top: 8px;
}
.ghost-line-short {
  width: 48%;
  margin-top: 6px;
  margin-bottom: 3px;
}
.ghost-label {
  width: 58px;
  height: 13px;
}
.ghost-value {
  width: 150px;
  height: 15px;
}
.ghost-short {
  width: 54px;
  height: 15px;
}
.ghost-name {
  width: 156px;
  height: 16px;
  margin: 3px 0;
}
.ghost-meta {
  width: 190px;
  max-width: 100%;
  height: 13px;
  margin: 2.5px 0;
}
.ghost-switch {
  width: 52px;
  height: 32px;
  border-radius: 16px;
}
.ghost-save {
  width: 100%;
  height: var(--save-h);
  border-radius: var(--save-r);
  background: var(--save-disabled);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
h1:focus {
  outline: none;
}
[hidden] {
  display: none !important;
}
/* The way home beside a retry: the quieter of the two, and still a 48 target. */
.quiet {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 8px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.quiet:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: var(--ghost-r);
}
