/* The way in (signin.html) and the privacy page (privacy.html).
   Only what is special to these two pages lives here: everything else comes from portal.css.
   No colors and no font names in this file. Font sizes are in rem (decision 7 of Oct 15): the
   browser's own font-size setting makes them larger or smaller. 1rem is 16px at the browser's default. */

/* ==========================================================================
   signin.html: one card in the middle of the art, one card per state
   ========================================================================== */

/* For the picture tool only (mark=1 in the address): the page is as long as its card, so a
   whole-page picture can be cut where the card ends. On a real screen the card stands in the
   middle of the window. */
.is-picture .page.center {
  min-height: 0;
}

.page.center.sign-page {
  padding-top: 28px;
  padding-bottom: 28px;
}

.panel.card.sign-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px 44px 34px;
}

/* the two engraved looks: a second, fine line just inside the frame of the card, as on the
   framed card of his sign-in picture. Drawn as an outline, so it moves nothing. */
[data-theme^="engraved"] .sign-card {
  outline: 1px solid var(--rule);
  outline-offset: -7px;
}

/* no lone last word on a line of its own ("... your welcome letter went / to.") */
.sign-card p,
#pop-privacy p,
#pop-privacy li {
  text-wrap: pretty;
}

/* a heading that got the focus after a press: no ring around plain words */
.sign-card h1:focus {
  outline: none;
}

/* ---- the front door: firm mark, name, "Client login", all in the middle (his sign-in picture) ---- */
@media (min-width: 700px) {
  .panel.card.sign-front {
    width: min(100%, 700px);
    padding: 30px 100px 28px;
  }
}

.sign-head {
  display: grid;
  justify-items: center;
  gap: 2px;
  text-align: center;
}

.sign-head .firm-logo {
  margin-bottom: 12px;
}

.sign-name {
  font-size: clamp(2.5rem, 6.4vw, 3.125rem);
  line-height: 1.1;
}

.sign-sub {
  font-size: 1.625rem;
}

.sign-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sign-form > .btn {
  margin-top: 4px;
}

/* the Show button is as tall as the box beside it. Its width is fixed, so the box does not move
   when the word turns into Hide. */
.sign-card {
  --show-w: 150px;
}

[data-theme^="engraved"] .sign-card {
  --show-w: 164px;
}

.sign-card .pass-show {
  width: var(--show-w);
  min-height: var(--field-h);
  padding-left: 0;
  padding-right: 0;
}

/* what was typed and does not fit in its box, whole, as wrapped words under the box
   (signin.js shows it only then) */
.sign-whole {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.sign-whole b {
  color: var(--ink);
}

/* a few words or one quiet button, in the middle */
.sign-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}

.sign-never {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
}

/* short lines in the middle: break them into even halves, not one long line and one last word */
.sign-center p,
.sign-never p,
.sign-moment p,
.sign-moment .h1 {
  text-wrap: balance;
}

/* under the Sign in button: the quiet button sits close to it, the lines for new clients close to that */
.sign-front .sign-center {
  margin-top: -8px;
}

/* ---- every other state: Back on the left, the firm on the right, then the words ---- */
.sign-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sign-top .brand {
  flex: none;
  gap: 12px;
  min-height: 0;
}

.sign-top .brand-name {
  width: min-content;
  font-size: 1.375rem;
  line-height: 1.08;
}

.sign-title {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* an address that is filled in and cannot be changed: the dashed box of the kit, but as plain
   words, so a long email address wraps on a phone instead of being cut off by a box to type in */
.sign-fixed {
  display: flex;
  align-items: center;
  border-style: dashed;
  background: none;
  overflow-wrap: anywhere;
}

/* a notice that names an email address ("This code was sent to ...", "You are signed in as ..."): a long
   address breaks rather than push the card wider than a phone (Oct 24: it made the page 415 wide at 390) */
.sign-card .notice > p {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* the email address the 6 numbers went to: on its own line, so it is easy to check.
   The full stop of the sentence stays with it. */
.sign-mail {
  display: block;
  margin: 2px 0;
  overflow-wrap: anywhere;
}



/* ---- three steps in a row: done, now, next ---- */
.numbered.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

.numbered.steps > li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
  color: var(--quiet);
  font-size: var(--text-quiet);
  line-height: 1.25;
  text-align: center;
}

.numbered.steps > li > :last-child {
  padding-top: 0;
}

/* the thin line from one ring to the next */
.numbered.steps > li + li::before {
  content: "";
  position: absolute;
  top: 20px;
  left: calc(-50% + 30px);
  right: calc(50% + 30px);
  height: 1px;
  background: var(--line);
}

.numbered.steps > li[aria-current] {
  color: var(--ink);
  font-weight: var(--w-strong);
}

.numbered.steps > li[aria-current] .n {
  border-width: 3px;
}

.numbered.steps > li.is-done {
  color: var(--soft);
}

.numbered.steps .is-done .n {
  border-color: var(--good-line);
  color: var(--good);
}

.numbered.steps .n .icon {
  width: 22px;
  height: 22px;
  stroke-width: 2.3;
}

/* ---- the 6 numbers: six boxes as wide as the card ---- */
.sign-card .code-boxes {
  max-width: none;
}

.sign-again {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sign-again .btn {
  align-self: flex-start;
}

/* a notice that also carries its next step */
.sign-card [data-code] .actions,
#setup-problem .actions {
  margin-top: 2px;
}

/* "One moment": the firm's mark in the middle, the words under it */
#s-wait .firm-logo {
  margin-bottom: 4px;
}

#s-wait .stack {
  align-items: center;
}

/* one login, more than one business: one wide button per business, the name as its words */
.sign-pick .btn {
  justify-content: flex-start;
  text-align: left;
}

/* ---- a short moment: "You are in." ---- */
.sign-moment {
  align-items: center;
  text-align: center;
}

.sign-moment .ring {
  width: 88px;
  height: 88px;
}

.sign-moment .ring .icon {
  width: 48px;
  height: 48px;
}

.sign-moment .sign-title {
  align-items: center;
}

/* ---- phone ---- */
@media (max-width: 699px) {
  .panel.card.sign-card {
    gap: 18px;
    padding: 22px 20px 26px;
  }

  .sign-name {
    font-size: 2rem;
  }

  .sign-sub {
    font-size: 1.375rem;
  }

  .sign-head .firm-logo {
    width: 84px;
    height: 84px;
    margin-bottom: 10px;
  }

  /* Show sits in the row of the label, on the right, so the password box is as wide as the card:
     a shown password of about 30 letters fits (beside the box it was cut after 17) */
  .sign-card {
    --show-w: 122px;
  }

  [data-theme^="engraved"] .sign-card {
    --show-w: 128px;
  }

  .pass-field {
    position: relative;
  }

  .pass-field > .label {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding-right: calc(var(--show-w) + 12px);
  }

  .pass-field .send-row.keep {
    display: block;
  }

  .sign-card .pass-show {
    position: absolute;
    top: 0;
    right: 0;
    min-height: 48px;
    height: 48px;
    gap: 8px;
  }

  .sign-top .brand-name {
    font-size: 1.25rem;
  }

  /* "Sign out" gives up its drawing on a phone, so the firm's name still fits beside it */
  .sign-top .btn .icon.is-out {
    display: none;
  }

  .sign-again .btn {
    align-self: stretch;
  }

  .sign-moment .ring {
    width: 76px;
    height: 76px;
  }
}

/* the narrowest phones: Back keeps its word and gives up its arrow, so the firm's name still fits
   beside it; and the Business code still shows whole in its box */
@media (max-width: 389px) {
  .sign-top .btn .icon {
    display: none;
  }

  .sign-card .input.code {
    padding-left: 8px;
    padding-right: 8px;
    letter-spacing: .05em;
  }
}

/* ---- for the owner: "Every screen of the way in", one row a screen ---- */
.screens {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.screens .h3 {
  margin-top: 16px;
}

.screens .row {
  gap: 14px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.screens .row .icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

/* the focus ring of a row stays inside the row, so the rows above and below do not cut it */
.screens .row:focus-visible {
  outline-offset: -3px;
}

/* ---- the pop-ups of this page ---- */
/* The privacy words are a page of reading, far longer than a window. So here the whole pop-up moves
   over the dimmed page (the card keeps its full length, a little wider than a help pop-up) and its
   title bar with Close stays at the top of the window all the way down. */
#pop-privacy {
  align-items: flex-start;
  overflow-y: auto;
  overscroll-behavior: contain;
}

#pop-privacy .popup-box {
  width: min(100%, 720px);
  max-height: none;
  overflow: visible;
}

#pop-privacy .popup-head {
  border-radius: var(--panel-radius) var(--panel-radius) 0 0;
}

.privacy-done {
  margin-top: 26px;
}

/* On a phone a pop-up of this page is a card over the dimmed page, as tall as its words (a short
   help no longer leaves a quarter of the screen empty). When the words need more room than the
   screen has, the card fills the screen and scrolls inside, with Close always in sight.
   The same rule is asked for portal.css, for every page: once it is there, this one can go. */
@media (max-width: 699px) {
  [data-signed-out] .popup {
    align-items: center;
    padding: 12px;
  }

  [data-signed-out] .popup-box {
    max-height: 100%;
    border: 1px solid var(--panel-line);
    border-radius: var(--panel-radius);
  }
}

/* ---- the two engraved looks on a computer: spruce and mountains on BOTH sides of the card ----
   The engraving is quiet on its left by design (words stand there on the other pages). On this
   page the card stands in the middle, so the shore of the right side is laid a second time,
   mirrored, on the left, as in his sign-in picture. */
.sky-left {
  display: none;
}

@media (min-width: 900px) {
  /* the left part of the sky, a little larger than life, fading out toward the middle */
  [data-theme^="engraved"] .sky-left {
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 48%;
    transform: scale(1.16);
    transform-origin: 0 64%;
    -webkit-mask-image: linear-gradient(90deg, #000 54%, transparent 92%);
    mask-image: linear-gradient(90deg, #000 54%, transparent 92%);
  }

  /* in it: the right end of the engraving, as large as it is drawn behind the page, turned around.
     Larger and lower than the right side, so the two sides are kin, not twins. */
  [data-theme^="engraved"] .sky-left::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--sky-art-wide) right top / max(100vw, calc(1.5 * min(100vh, max(900px, 78vw)))) auto no-repeat;
    transform: scaleX(-1);
  }
}

@media (max-width: 899px) {
  /* no phone bar on the sign-in page, so no room kept for it */
  [data-signed-out] body {
    padding-bottom: 0;
  }
}


/* ==========================================================================
   privacy.html: a reading page for people who are signed in. Its words also show in a pop-up
   on "Set up your login" (signin.html takes them from this page), so these rules serve both.
   ========================================================================== */

.privacy-firm {
  display: flex;
  align-items: center;
  gap: 14px;
}

.privacy .box {
  margin-top: 22px;
}

.privacy-delete > p + p {
  margin-top: 12px;
}

.privacy .tag {
  margin-left: 4px;
  vertical-align: 1px;
}

/* the owner's phone code (change 011): the square needs a white edge to scan on a dark page */
.oc-qr { margin: 8px 0 12px; text-align: center; }
.oc-qr img { display: inline-block; background: #fff; padding: 12px; border-radius: 10px; width: 224px; height: 224px; }
.oc-secret { font-family: Consolas, "Courier New", monospace; word-break: break-all; letter-spacing: 1px; }

/* Privacy and Terms of use under the card (Oct 20 2026, Intuit's live keys) */
/* Oct 24: 18px words and 48px tall presses, the same rule as every other line of this page (they were
   15px and 44px: the measuring tool failed them on every look and size). Under a short card (Which
   business?) the line sat on a bright part of the art (2.15 to 1), so it gets a dark ground of its own.
   Outside the card every look writes light words (the cream look too: its dark words are for its cards). */
.sign-legal { width: fit-content; max-width: 100%; margin: 10px auto 0; padding: 0 10px; border-radius: 12px; background: rgba(7, 18, 30, .78); text-align: center; font-size: 1.125rem; color: var(--soft); }
.sign-legal a { display: inline-block; min-height: 48px; line-height: 48px; padding: 0 8px; }
