/* bidagora. sign in. Page styles only; shared tokens and components come from site.css.
   Type direction B (Bebas Neue + Hanken Grotesk), clay substrate, no borders.
   States emerge from and sink back into the clay: opacity, soft blur and lift. Never a cut. */

.si-page {
  --emerge: opacity .55s var(--ease), filter .55s var(--ease), transform .55s var(--ease), visibility 0s linear 0s;
  --sink: opacity .4s var(--ease), filter .4s var(--ease), transform .4s var(--ease), visibility 0s linear .4s;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.si-page main { flex: 1; }
.si-page h1, .si-page h2 { font-weight: 400; }

.si-main { padding-top: clamp(28px, 6vh, 72px); padding-bottom: clamp(56px, 8vh, 96px); }
.si-grid {
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

/* The card is clay raised out of the ground. */
.si-card {
  position: relative;
  background: var(--p);
  border-radius: var(--r-lg);
  box-shadow: var(--ds-raised-card);
  padding: clamp(26px, 4vw, 44px);
}
.si-top { display: grid; gap: 18px; margin-bottom: 26px; }
.si-eyebrow {
  font-family: var(--display); font-size: 20px; letter-spacing: .08em; line-height: 1;
  color: var(--ink2); margin: 0;
}
.si-title {
  font-family: var(--display); font-size: clamp(56px, 8vw, 84px); line-height: .88; letter-spacing: .006em;
  margin: 0; color: var(--ink);
}
.si-title:focus { outline: none; }
.si-sub { margin: 0; color: var(--ink2); font-size: var(--fs-body); line-height: 1.5; max-width: 40ch; }

/* Who is signing in: the shared pill, filled to the card width. */
.si-role { width: 100%; flex-wrap: nowrap; }
.si-role button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; }
.si-role .i { width: 18px; height: 18px; }

/* Step stack: every step shares one cell; only the active one is present. */
.si-stack { position: relative; transition: height .5s var(--ease); }
.si-step {
  position: absolute; top: 0; left: 0; right: 0;
  display: grid; gap: 18px; align-content: start;
  opacity: 0; visibility: hidden; filter: blur(8px); transform: translateY(10px) scale(.985);
  transition: var(--sink);
  pointer-events: none;
}
.si-step.on {
  position: relative;
  opacity: 1; visibility: visible; filter: none; transform: none;
  transition: var(--emerge); transition-delay: .12s;
  pointer-events: auto;
}
.si-step h2 { font-family: var(--display); font-size: clamp(40px, 5vw, 52px); line-height: .92; margin: 0; letter-spacing: .01em; }
.si-step h2:focus, .si-step h2:focus-visible, .si-title:focus-visible { outline: none !important; box-shadow: none !important; }
.si-step p { margin: 0; }
.si-muted { color: var(--ink2); }
.si-muted a { color: var(--bt); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.si-muted a:hover { text-decoration-thickness: 2px; }
.si-muted[role="note"] { margin-top: 18px; line-height: 1.55; }
.si-step .btn { width: 100%; }
.si-step .field input { font-size: 17px; }

.si-or { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; color: var(--ink2); font-size: var(--fs-small); }
.si-or::before, .si-or::after { content: ""; height: 2px; border-radius: 2px; background: var(--w); box-shadow: inset 0 1px 1px var(--ds-sc); }

.si-google .g { width: 20px; height: 20px; }

/* Messages: a pressed well tinted by meaning, never an outline. */
.si-well { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 14px 16px; border-radius: var(--r-sm); background: var(--w); box-shadow: var(--press); font-size: var(--fs-small); line-height: 1.45; }
.si-well .i { width: 22px; height: 22px; margin-top: 1px; }
.si-well strong { display: block; font-size: 15px; margin-bottom: 2px; }
.si-well.err { background: #f3dcd6; color: #7d2419; }
.si-well.err .i { color: var(--err); }
.si-well.ok { background: var(--olp); color: var(--old); }
.si-well.info { background: var(--grp); color: var(--grd); }
.si-well[hidden] { display: none !important; }

/* Six-digit code: six small wells. */
.si-code { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(6px, 1.6vw, 12px); }
.si-code input {
  width: 100%; aspect-ratio: 4 / 5; min-height: 0; padding: 0; border: 0; border-radius: var(--r-sm);
  background: var(--w); box-shadow: var(--press);
  font-family: var(--display); font-size: clamp(30px, 6vw, 40px); text-align: center; color: var(--ink);
  caret-color: var(--b); transition: box-shadow .25s var(--ease), background-color .3s;
}
.si-code input:focus-visible { outline: none; box-shadow: var(--press), var(--ring); }
.si-code.bad input { background: #f3dcd6; color: #7d2419; }
.si-code.good input { background: var(--olp); color: var(--old); }
.si-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; font-size: var(--fs-small); }
.si-txt { border: 0; background: none; padding: 6px 0; font: inherit; font-weight: 600; color: var(--grd); cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.si-txt:disabled { color: var(--ink2); cursor: default; text-decoration: none; font-weight: 500; }
.si-email { font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }

/* Mail glyph that rises from the clay on the code step. */
.si-mail { width: 72px; height: 72px; border-radius: 24px; display: grid; place-items: center; background: var(--p2); box-shadow: var(--lift-sm); color: var(--b); }
.si-mail .i { width: 34px; height: 34px; }

/* Choose a workspace: two raised tiles. */
.si-tiles { display: grid; gap: 14px; }
.si-tile {
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; text-align: left;
  border: 0; border-radius: var(--r); padding: 18px 20px; background: var(--p2); box-shadow: var(--lift-sm);
  color: var(--ink); font: inherit; cursor: pointer; transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.si-tile:hover { transform: translateY(-2px); }
.si-tile:active { transform: scale(.985); box-shadow: var(--press); }
.si-tile:focus-visible { outline: none; box-shadow: var(--lift-sm), var(--ring); }
.si-tile b { display: block; font-size: 18px; }
.si-tile span { color: var(--ink2); font-size: var(--fs-small); }
.si-tile .ico { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--w); box-shadow: var(--press); color: var(--b); }
.si-tile .ico .i { width: 24px; height: 24px; }
.si-tile > .i { width: 20px; height: 20px; color: var(--ink2); }
.si-badge { display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px; background: var(--grp); color: var(--grd); font-size: 12px; font-weight: 700; letter-spacing: .02em; vertical-align: 2px; }

/* Invite only: a three-stop path drawn in clay. */
.si-path { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; position: relative; padding: 4px 0; }
.si-path::before { content: ""; position: absolute; left: 16.6%; right: 16.6%; top: 27px; height: 4px; border-radius: 4px; background: var(--w); box-shadow: inset 0 1px 2px var(--ds-sc); }
.si-path div { position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; font-size: 13px; font-weight: 600; color: var(--ink2); }
.si-path i { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--p2); box-shadow: var(--lift-sm); color: var(--ink); font-style: normal; }
.si-path div:first-child i { background: var(--b); color: #fff; }
.si-path .i { width: 22px; height: 22px; }

.si-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.si-chips button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--p2); box-shadow: var(--lift-sm); font: inherit; font-size: var(--fs-small); font-weight: 600; color: var(--ink2); cursor: pointer; transition: box-shadow .3s var(--ease), background-color .3s, color .3s; }
.si-chips button[aria-pressed="true"] { background: var(--w); box-shadow: var(--press); color: var(--bt); }
.si-chips button[aria-pressed="true"]::before { content: "+ "; color: var(--ol); font-weight: 800; }
.si-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Done: a small view of the workspace, emerging. */
.si-done-mark { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--olp); color: var(--old); box-shadow: var(--lift-sm); }
.si-done-mark .i { width: 36px; height: 36px; }
.si-mini { display: grid; gap: 8px; padding: 14px; border-radius: var(--r); background: var(--w); box-shadow: var(--press); }
.si-mini div { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r-sm); background: var(--p); font-size: var(--fs-small); }
.si-mini div::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--dot, var(--ol)); }
.si-mini b { font-weight: 700; }
.si-mini em { font-style: normal; font-family: var(--display); font-size: 22px; line-height: 1; color: var(--ink); }

/* Sending state on a button: the label fades to three clay dots. */
.btn.busy { pointer-events: none; }
.btn .dots { display: none; gap: 6px; }
.btn.busy .lbl { display: none; }
.btn.busy .dots { display: inline-flex; }
.btn .dots i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .35; animation: si-dot 1s var(--ease) infinite; }
.btn .dots i:nth-child(2) { animation-delay: .15s; }
.btn .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes si-dot { 50% { opacity: 1; transform: translateY(-3px); } }

/* Under the card: trust line and help. */
.si-trust { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; margin-top: 22px; padding: 0 6px; font-size: var(--fs-small); color: var(--ink2); line-height: 1.5; }
.si-trust .i { width: 22px; height: 22px; color: var(--ol); }
.si-trust a { color: var(--grd); font-weight: 600; }

/* The side: graphics that change with who is signing in. */
.si-side { position: sticky; top: calc(var(--nav-h) + 24px); display: grid; gap: 22px; padding-top: 8px; }
.si-side .si-scene { display: grid; }
.si-scene > section { grid-area: 1 / 1; display: grid; gap: 22px; align-content: start; opacity: 0; visibility: hidden; filter: blur(10px); transform: translateY(14px); transition: var(--sink); }
.si-scene > section.on { opacity: 1; visibility: visible; filter: none; transform: none; transition: var(--emerge); transition-delay: .1s; }
.si-big { font-family: var(--display); font-size: clamp(64px, 7.4vw, 120px); line-height: .86; margin: 0; letter-spacing: .005em; }
.si-big span { color: var(--b); }

/* Buyer scene: one list becomes three quotes. */
.si-flow { display: grid; grid-template-columns: 1.1fr auto 1fr; gap: 18px; align-items: center; }
.si-list, .si-quotes > div { background: var(--p); border-radius: var(--r); padding: 18px; box-shadow: var(--ds-raised-card); }
.si-list { display: grid; gap: 10px; }
.si-list p { margin: 0 0 4px; font-family: var(--display); font-size: 24px; line-height: 1; }
.si-list span { display: block; height: 10px; border-radius: 6px; background: var(--w); box-shadow: inset 1px 1px 3px var(--ds-sc); }
.si-list span:nth-child(3) { width: 82%; } .si-list span:nth-child(4) { width: 64%; } .si-list span:nth-child(5) { width: 74%; }
.si-arrow { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--p2); box-shadow: var(--lift-sm); color: var(--b); }
.si-arrow .i { width: 22px; height: 22px; }
.si-quotes { display: grid; gap: 10px; }
.si-quotes > div { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 12px; padding: 12px 16px; }
.si-quotes b { font-size: 14px; }
.si-quotes em { font-style: normal; font-family: var(--display); font-size: 26px; line-height: 1; }
.si-quotes small { grid-column: 1 / -1; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.si-quotes .up, .si-quotes .dn { color: var(--ink2); } /* neutral marks: facts, not judgement */
.si-quotes > div.pick { background: var(--p2); box-shadow: var(--lift-sm), 0 0 0 3px rgba(138,138,46,.35); }

/* Supplier scene: private, private, private. */
.si-vault { position: relative; display: grid; place-items: center; min-height: 260px; border-radius: var(--r-lg); background: var(--w); box-shadow: var(--well); overflow: hidden; }
.si-vault .ring { position: absolute; border-radius: 50%; background: var(--g); box-shadow: var(--ds-raised-card); }
.si-vault .r1 { width: 220px; height: 220px; } .si-vault .r2 { width: 150px; height: 150px; box-shadow: var(--press); background: var(--w); } .si-vault .r3 { width: 96px; height: 96px; background: var(--p2); }
.si-vault .lock { position: relative; color: var(--ink); width: 44px; height: 44px; }
.si-vault .tag { position: absolute; padding: 8px 14px; border-radius: 999px; background: var(--p2); box-shadow: var(--lift-sm); font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.si-vault .tag.t1 { left: 7%; top: 16%; } .si-vault .tag.t2 { right: 6%; top: 34%; } .si-vault .tag.t3 { left: 12%; bottom: 14%; }
.si-vault .tag i { font-style: normal; color: var(--ol); font-weight: 800; margin-right: 4px; }
.si-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.si-points li { display: grid; gap: 4px; padding: 16px; border-radius: var(--r); background: var(--p); font-size: 13px; color: var(--ink2); line-height: 1.4; }
.si-points b { font-family: var(--display); font-size: 26px; font-weight: 400; line-height: 1; color: var(--ink); letter-spacing: .01em; }

/* Role copy that swaps with the pill. */
[data-for] { transition: opacity .4s var(--ease), filter .4s var(--ease); }
[data-for][hidden] { display: none !important; }

.si-page .nav-act { margin-left: auto; }

@media (max-width: 980px) {
  .si-grid { grid-template-columns: minmax(0, 1fr); }
  .si-card { max-width: 560px; width: 100%; margin: 0 auto; }
  .si-side { position: static; max-width: 560px; width: 100%; margin: 0 auto; }
  .si-trust { max-width: 560px; margin-inline: auto; }
}
@media (max-width: 560px) {
  .si-main { padding-top: 18px; }
  .si-card { padding: 24px 20px; border-radius: 28px; }
  .si-title { font-size: 60px; }
  .si-role button { font-size: 14px; padding: 0 10px; }
  .si-two { grid-template-columns: 1fr; }
  .si-flow { grid-template-columns: 1fr; }
  .si-arrow { transform: rotate(90deg); justify-self: center; }
  .si-points { grid-template-columns: 1fr; }
  .si-vault { min-height: 220px; }
  .si-vault .tag { font-size: 12px; }
  .si-page .nav-act .btn-ghost { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .si-step, .si-step.on, .si-scene > section, .si-scene > section.on, .si-stack { transition: none !important; filter: none !important; transform: none !important; }
  .btn .dots i { animation: none; opacity: .8; }
}

/* Round 8: one account does both sides; the line under the pill says so. Phones: the pill fits at 360px, no scrollers. */
.si-both { display: flex; align-items: center; gap: 8px; margin: -6px 0 0; font-size: var(--fs-small); line-height: 1.4; color: var(--ink2); }
.si-both .i { width: 18px; height: 18px; color: var(--bt); }
.si-both b { color: var(--ink); font-weight: 700; }
.si-role { overflow: hidden; }
@media (max-width: 420px) {
  .si-role { gap: 4px; padding: 5px; }
  .si-role button { padding: 0 8px; gap: 6px; font-size: 14px; min-width: 0; }
  .si-role .i { width: 16px; height: 16px; }
}
@media (max-width: 370px) { .si-role .i { display: none; } }
@media (max-width: 560px) {
  .si-side { gap: 16px; }
  .si-big { font-size: 56px; }
}
.si-both b { white-space: nowrap; }

.si-vault .tag i { display: inline-grid; place-items: center; margin-right: 6px; }
.si-vault .tag i .i { width: 13px; height: 13px; }
/* Round 8 AD: same lock and tag layout as the front-page vault. */
.si-vault .lock { color: var(--old); width: 48px; height: 48px; overflow: visible; }
.si-vault .lock .kh { fill: var(--p2); }
.si-vault .tag { display: inline-flex; align-items: center; font-size: 13px; }
.si-vault .tag.t1 { left: 7%; top: 20%; }
.si-vault .tag.t2 { right: 7%; top: calc(50% - 17px); }
.si-vault .tag.t3 { left: 7%; bottom: 20%; top: auto; }
/* Round 8 AD: once verified, the role question is asked by the workspace step itself, so the pill and its note fade away instead of asking twice. */
.si-role, .si-both { max-height: 120px; transition: opacity .3s var(--ease, ease), max-height .45s var(--ease, ease), margin .45s var(--ease, ease), visibility 0s linear 0s; }
body:is([data-step="workspace"], [data-step="done"]) :is(.si-role, .si-both) { opacity: 0; max-height: 0; margin-top: 0; margin-bottom: 0; overflow: hidden; visibility: hidden; transition: opacity .3s var(--ease, ease), max-height .45s var(--ease, ease), margin .45s var(--ease, ease), visibility 0s linear .45s; }
@media (prefers-reduced-motion: reduce) { .si-role, .si-both { transition: none; } }
body:is([data-step="workspace"], [data-step="done"]) :is(.si-role, .si-both) { position: absolute; inset-inline: 0; pointer-events: none; }
body:is([data-step="workspace"], [data-step="done"]) .si-role { padding-top: 0; padding-bottom: 0; border-width: 0; box-shadow: none; }
body:is([data-step="workspace"], [data-step="done"]) .si-top { position: relative; margin-bottom: 40px; }

/* Round 9 dark */
:root[data-theme="dark"] :is(.si-big span, .si-mail, .si-tile .ico, .si-arrow) { color: var(--bt); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.si-big span, .si-mail, .si-tile .ico, .si-arrow) { color: var(--bt); } }
