/* cysec-theme: sign-in and join pages (cysec_core templates/cysec/flow.html).
   Text on the left, the fingerprint at full strength on the right (on phones
   the shade comes from the top and the fingerprint sits lower). The page
   slides in and its parts rise one after another. Same bans as cysec.css. */

/* The slide-in starts 28px to the right. Clip it, so a phone never sees a
   wider page while it moves. */
.cy-stage.cy-flow {
  overflow-x: clip;
}
.cy-flow-screen {
  width: min(520px, 100%);
  animation: cy-slide .5s var(--ease) both;
}
.cy-flow-screen.cy-flow-hero {
  width: min(600px, 100%);
}
.cy-flow-screen.cy-flow-wide {
  width: min(640px, 100%);
}
@keyframes cy-slide {
  from { opacity: 0; transform: translateX(28px); }
}

/* ---------- type ---------- */
.cy-flow h1 {
  margin: 0 0 14px;
  font-size: 44px;
  line-height: 1.04;
  letter-spacing: -.03em;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.cy-flow-hero h1 {
  font-size: 54px;
  line-height: 1.02;
  letter-spacing: -.035em;
  margin-bottom: 16px;
}
.cy-flow h2 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -.01em;
  font-weight: 700;
}
.cy-flow p {
  margin: 0 0 18px;
  color: var(--mid);
  font-size: 16px;
  line-height: 1.55;
}
.cy-flow p b {
  color: var(--fg);
}
.cy-flow .cy-lead {
  font-size: 17px;
  margin-bottom: 24px;
  max-width: 52ch;
}
.cy-flow .cy-small {
  margin: 0 0 10px;
  color: var(--dim);
  font-size: 14px;
  line-height: 1.5;
}
.cy-flow .cy-small a,
.cy-flow .cy-help a,
.cy-check a {
  color: var(--mid);
}
.cy-flow .cy-small a:hover,
.cy-check a:hover {
  color: var(--fg);
}
.cy-flow .cy-form + .cy-small {
  margin-top: 22px;
}
.cy-flow .cy-foot {
  margin-top: 28px;
}
.cy-flow .cy-err {
  color: var(--bad);
  font-weight: 600;
}
.cy-flow .cy-ok {
  color: var(--acc);
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 6px;
}
.cy-break {
  overflow-wrap: anywhere;
}

/* ---------- step line and progress ---------- */
.cy-steps {
  margin-bottom: 22px;
}
.cy-flow .cy-step {
  margin: 0 0 10px;
  color: var(--dim);
  font-size: 14px;
  font-weight: 600;
}
.cy-prog {
  display: block;
  height: 3px;
  border-radius: 2px;
  overflow: hidden;
  background: var(--track);
}
.cy-prog i {
  display: block;
  height: 100%;
  background: var(--grad);
  transform-origin: left center;
  transform: scaleX(var(--to, 0));
  animation: cy-prog .9s var(--ease) .25s both;
}
@keyframes cy-prog {
  from { transform: scaleX(var(--from, 0)); }
}
/* Step N of M as classes (no style attribute, so no need for
   style-src 'unsafe-inline'). */
.cy-prog .o2.s1 { --from: 0; --to: 0.5; }
.cy-prog .o2.s2 { --from: 0.5; --to: 1; }
.cy-prog .o3.s1 { --from: 0; --to: 0.3333; }
.cy-prog .o3.s2 { --from: 0.3333; --to: 0.6667; }
.cy-prog .o3.s3 { --from: 0.6667; --to: 1; }
.cy-prog .o4.s1 { --from: 0; --to: 0.25; }
.cy-prog .o4.s2 { --from: 0.25; --to: 0.5; }
.cy-prog .o4.s3 { --from: 0.5; --to: 0.75; }
.cy-prog .o4.s4 { --from: 0.75; --to: 1; }
.cy-prog .o5.s1 { --from: 0; --to: 0.2; }
.cy-prog .o5.s2 { --from: 0.2; --to: 0.4; }
.cy-prog .o5.s3 { --from: 0.4; --to: 0.6; }
.cy-prog .o5.s4 { --from: 0.6; --to: 0.8; }
.cy-prog .o5.s5 { --from: 0.8; --to: 1; }

/* ---------- buttons ---------- */
.cy-flow .cy-row {
  margin: 22px 0 0;
}
.cy-google {
  padding: 13px 22px 13px 18px;
}
.cy-g {
  flex: none;
  display: block;
}
.cy-signin-opts {
  margin-bottom: 8px;
}
.cy-flow .cy-small + .cy-signin-opts {
  margin-top: 24px;
}
.cy-signin-opts .cy-row {
  margin: 0 0 16px;
}

/* "Use an email code instead": opens the email form in place, no script. */
.cy-alt {
  margin: 4px 0 0;
}
.cy-alt summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--mid);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.cy-alt summary::-webkit-details-marker {
  display: none;
}
.cy-alt summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s var(--ease);
}
.cy-alt[open] summary::after {
  transform: translateY(1px) rotate(-135deg);
}
.cy-alt summary:hover {
  color: var(--fg);
}
.cy-alt summary:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
  border-radius: 2px;
}
.cy-alt[open] > :not(summary) {
  animation: cy-rise var(--rise) var(--ease) both;
}
.cy-alt[open] > p {
  margin-top: 14px;
}
.cy-alt-open {
  margin-top: 8px;
}
/* Google stays the one white button. The email form's button is quieter. */
.cy-alt .cy-btn.p {
  background: var(--track);
  color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--line2);
}
.cy-alt .cy-btn.p:hover {
  background: var(--line);
  color: var(--fg);
}
.cy-flow .cy-ok + .cy-small {
  margin-bottom: 26px;
}

/* ---------- forms ---------- */
.cy-form {
  margin: 0;
}
.cy-form label,
.cy-flow .cy-label {
  display: block;
  margin: 16px 0 6px;
  color: var(--fg);
  font-size: 14px;
  font-weight: 600;
}
.cy-form > input[type="hidden"] + label,
.cy-form > input[type="hidden"] + .cy-label {
  margin-top: 0;
}
/* :where keeps this at low weight, so .cy-code and friends can change it. */
.cy-form :where(input:not([type="checkbox"]):not([type="hidden"]), textarea) {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line2);
  border-radius: 6px;
  background: var(--track);
  color: var(--fg);
  font: 500 16px var(--font);
  line-height: 1.4;
}
.cy-form textarea {
  resize: vertical;
  min-height: 112px;
}
.cy-form input::placeholder,
.cy-form textarea::placeholder {
  color: var(--dim);
  opacity: 1;
}
.cy-form input:focus,
.cy-form textarea:focus {
  outline: 2px solid var(--acc);
  outline-offset: 1px;
  border-color: transparent;
}
.cy-form input.cy-code {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.cy-form input.cy-code::placeholder {
  letter-spacing: .08em;
}
.cy-form input.cy-code-short {
  width: min(220px, 100%);
  letter-spacing: .3em;
}
.cy-form input.cy-narrow {
  width: min(160px, 100%);
}
.cy-flow .cy-help {
  margin: 6px 0 0;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.45;
}
.cy-under {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.cy-under .cy-help {
  flex: 1;
}
.cy-flow .cy-count {
  flex: none;
  margin: 6px 0 0 auto;
  color: var(--dim);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  transition: color .2s var(--ease);
}
.cy-flow .cy-count.ok {
  color: var(--acc);
  font-weight: 600;
}

/* Class from the code: shown, never picked. A plain row between hairlines
   (no box), with the "set by your class code" line under the value. */
.cy-locked {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cy-locked b {
  font-size: 16px;
  overflow-wrap: anywhere;
}
.cy-locked span {
  color: var(--dim);
  font-size: 13px;
  line-height: 1.45;
}

/* radio group and plain line list on the offer page: no box, no bullets */
.cy-form fieldset.cy-pick {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.cy-pick legend {
  padding: 0;
  color: var(--dim);
  font-size: 14px;
  font-weight: 600;
}
.cy-flow .cy-lines {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  border-top: 1px solid var(--line);
}
.cy-flow .cy-lines li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.cy-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
}
.cy-check input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--acc);
}
.cy-form .cy-check label a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cy-form .cy-check label {
  margin: 0;
  color: var(--mid);
  font-weight: 500;
  line-height: 1.45;
}

/* ---------- team choice: rows on hairlines ---------- */
.cy-choices {
  margin: 4px 0 0;
  border-top: 1px solid var(--line);
}
.cy-choices form {
  margin: 0;
}
.cy-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: none;
  color: var(--fg);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.cy-choice:hover {
  color: var(--fg);
}
.cy-choice b {
  display: block;
  font-size: 18px;
  font-weight: 700;
  transition: color .15s var(--ease);
}
.cy-choice > span > span {
  display: block;
  margin-top: 2px;
  color: var(--mid);
  font-size: 14px;
  line-height: 1.45;
}
.cy-choice i {
  flex: none;
  color: var(--dim);
  font-style: normal;
  font-size: 18px;
  transition: transform .15s var(--ease), color .15s var(--ease);
}
.cy-choice:hover b,
.cy-choice:focus-visible b,
.cy-choice:hover i {
  color: var(--acc);
}
.cy-choice:hover i {
  transform: translateX(4px);
}

/* ---------- authenticator setup ---------- */
.cy-setup {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.cy-setup > li {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.cy-setup > li > p {
  margin-bottom: 8px;
}
.cy-qr svg {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}
.cy-flow .cy-mono {
  font-family: var(--mono);
  color: var(--fg);
  overflow-wrap: anywhere;
  word-break: break-all;
}
.cy-flow .cy-key {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .06em;
}
.cy-flow .cy-uri {
  font-size: 13px;
  color: var(--mid);
}

/* ---------- facts (semester correction) ---------- */
.cy-facts-list {
  margin: 0 0 24px;
  border-top: 1px solid var(--line);
}
.cy-facts-list > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.cy-facts-list dt {
  color: var(--dim);
  font-weight: 600;
  font-size: 14px;
}
.cy-facts-list dd {
  margin: 0;
  color: var(--fg);
  font-weight: 700;
  text-align: right;
}

/* ---------- reading page (privacy) ---------- */
.cy-flow-screen.cy-read {
  width: min(720px, 100%);
}
.cy-read section {
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
}
.cy-read p {
  max-width: 68ch;
  line-height: 1.65;
}

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .cy-facts-list > div {
    flex-direction: column;
    gap: 2px;
  }
  .cy-facts-list dd {
    text-align: left;
    overflow-wrap: anywhere;
  }
  .cy-flow h1 {
    font-size: 34px;
  }
  .cy-flow-hero h1 {
    font-size: 38px;
  }
  .cy-flow .cy-lead {
    font-size: 16px;
  }
  .cy-flow .cy-row .cy-btn {
    justify-content: center;
  }
  .cy-signin-opts .cy-google {
    width: 100%;
  }
  .cy-under {
    flex-direction: column;
    gap: 0;
  }
  .cy-flow .cy-count {
    margin-left: 0;
  }
}

/* ---------- reduced motion: nothing moves ---------- */
@media (prefers-reduced-motion: reduce) {
  .cy-flow-screen,
  .cy-prog i,
  .cy-alt[open] > :not(summary) {
    animation: none;
  }
  .cy-alt summary::after,
  .cy-flow .cy-count,
  .cy-choice b,
  .cy-choice i {
    transition: none;
  }
  .cy-choice:hover i {
    transform: none;
  }
}

.cy-qr {
  width: 100%;
  max-width: 280px;
  height: auto;
  margin: 0 0 16px;
}
.cy-qr svg {
  display: block;
  width: 100%;
  height: auto;
}
