/* GENERATED from src/styles/edwis/controls.css by scripts/checks/edwis-design-sync.mjs --write. Do not edit here. */
/* =============================================================
   EDWIS · controls — buttons, logo, fields, password, checkbox,
   alerts, one-time code, password rules and choice cards.
   Shared by the website and the app. Needs tokens.css first.
   Source of truth: src/styles/edwis/controls.css (website copy is
   generated; see tokens.css).

   Scope: rules are class-namespaced (.ew-*) and work under either
   root — body.ew on the website, .ew-app in the React app.
   ============================================================= */

/* The ring follows --ew-primary, so a college accent set on any
   ancestor re-tints focus rings and button glow with it. */
:where(.ew, .ew-app, .ew-auth) { --ew-ring: color-mix(in srgb, var(--ew-primary) 15%, transparent); }

:where(.ew, .ew-app) [hidden] { display: none !important; }
:where(.ew, .ew-app) :where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--ew-primary);
  outline-offset: 3px;
  border-radius: 8px;
}
:where(.ew, .ew-app) :where(button, input, select, textarea) { font-family: inherit; }
.ew-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- buttons ---------- */
.ew-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 20px;
  border-radius: 12px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; letter-spacing: -0.005em; white-space: nowrap;
  cursor: pointer; touch-action: manipulation;
  transition: background var(--ew-dur) var(--ew-ease), border-color var(--ew-dur) var(--ew-ease),
              box-shadow var(--ew-dur) var(--ew-ease), transform var(--ew-fast) var(--ew-ease), color var(--ew-dur) ease;
}
.ew-btn:active { transform: translateY(0) scale(.98); }
.ew-btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.ew-btn--lg { min-height: 50px; padding: 0 24px; font-size: 15.5px; border-radius: 12px; }

.ew-btn--primary { background: var(--ew-primary); color: #fff; box-shadow: 0 1px 2px color-mix(in srgb, var(--ew-primary) 25%, transparent); }
.ew-btn--primary:hover { background: var(--ew-primary-hover); transform: translateY(-1px); box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--ew-primary) 55%, transparent); }

.ew-btn--outline { background: var(--ew-surface); color: var(--ew-ink); border-color: var(--ew-line-2); }
.ew-btn--outline:hover { border-color: var(--ew-ink-3); }

.ew-btn--ghost { background: transparent; color: var(--ew-ink); border-color: var(--ew-line-2); }
.ew-btn--ghost:hover { background: var(--ew-tint); }

.ew-btn--white { background: #fff; color: var(--ew-ink); }
.ew-btn--white:hover { transform: translateY(-1px); box-shadow: 0 16px 30px -16px rgba(0, 0, 0, .6); }

.ew-btn--glass { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .28); }
.ew-btn--glass:hover { background: rgba(255, 255, 255, .16); }

.ew-ar { display: inline-block; transition: transform var(--ew-dur) var(--ew-ease); }
.ew-btn:hover .ew-ar, .ew-link-arrow:hover .ew-ar { transform: translateX(3px); }

/* ---------- logo ---------- */
.ew-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ew-ink); flex-shrink: 0; }
.ew-logo img { width: 28px; height: 28px; }
.ew-logo-word { font-size: 23px; font-weight: 800; letter-spacing: -0.045em; line-height: 1; }
.ew-logo--on-dark { color: #fff; }


.ew-field { display: grid; gap: 6px; align-content: start; }
.ew-field label, .ew-interest legend { font-size: 14px; font-weight: 600; color: var(--ew-ink); }
.ew-req { color: var(--ew-bad); margin-left: 2px; }
.ew-opt { margin-left: 6px; font-size: 12.5px; font-weight: 500; color: var(--ew-ink-3); }

.ew-field input, .ew-field select, .ew-field textarea {
  width: 100%; min-height: 46px; padding: 11px 14px;
  font: inherit; font-size: 16px; color: var(--ew-ink);
  background: var(--ew-surface);
  border: 1px solid var(--ew-line-2); border-radius: 12px;
  transition: border-color var(--ew-fast) ease, box-shadow var(--ew-fast) ease;
}
.ew-field textarea { min-height: 112px; resize: vertical; line-height: 1.55; }
.ew-field select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A6683' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}
.ew-field ::placeholder { color: #8A94AD; }
.ew-field input:hover, .ew-field select:hover, .ew-field textarea:hover { border-color: var(--ew-ink-3); }
.ew-field input:focus, .ew-field select:focus, .ew-field textarea:focus {
  outline: none; border-color: var(--ew-primary);
  box-shadow: 0 0 0 4px var(--ew-ring);
}
.ew-field.is-invalid input, .ew-field.is-invalid textarea { border-color: var(--ew-bad); }
.ew-field.is-invalid input:focus, .ew-field.is-invalid textarea:focus { box-shadow: 0 0 0 4px rgba(194, 49, 42, .14); }
.ew-field-hint { font-size: 13px; color: var(--ew-ink-3); }
.ew-field-err { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ew-bad); }
.ew-field-err::before {
  content: "!"; display: grid; place-items: center; flex-shrink: 0;
  width: 16px; height: 16px; border-radius: 50%; background: var(--ew-bad); color: #fff;
  font-size: 11px; font-weight: 800;
}
.ew-field-err[hidden] { display: none; }
.ew-field.is-invalid .ew-field-hint { display: none; }

/* ---------- field extras, password, checkbox, button states ---------- */

.ew-field-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ew-field-top a { font-size: 13.5px; font-weight: 600; color: var(--ew-primary); text-decoration: none; }
.ew-field-top a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ew-field-top .ew-link { font-size: 13.5px; font-weight: 600; }
.ew-field input[readonly] { background: var(--ew-bg); color: var(--ew-ink-2); }

/* password with reveal toggle */
.ew-pass { position: relative; }
.ew-pass input { width: 100%; padding-right: 52px; }
.ew-pass-toggle {
  position: absolute; top: 50%; right: 4px; transform: translateY(-50%);
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; background: none; border-radius: 10px; cursor: pointer;
  color: var(--ew-ink-3);
}
.ew-pass-toggle:hover { color: var(--ew-ink); background: var(--ew-tint); }
.ew-pass-toggle svg { width: 18px; height: 18px; }
.ew-pass-toggle .ew-eye-off { display: none; }
.ew-pass-toggle[aria-pressed="true"] .ew-eye-on { display: none; }
.ew-pass-toggle[aria-pressed="true"] .ew-eye-off { display: block; }

/* checkbox */
.ew-check { display: inline-flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ew-ink-2); cursor: pointer; user-select: none; }
.ew-check input {
  appearance: none; -webkit-appearance: none; margin: 0; flex-shrink: 0;
  width: 20px; height: 20px; border: 1.5px solid var(--ew-line-2); border-radius: 6px;
  background: var(--ew-surface) center / 14px no-repeat;
  transition: background-color var(--ew-fast) ease, border-color var(--ew-fast) ease;
  cursor: pointer;
}
.ew-check input:hover { border-color: var(--ew-ink-3); }
.ew-check input:checked {
  background-color: var(--ew-primary); border-color: var(--ew-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E");
}
.ew-check input:focus-visible { outline: 3px solid var(--ew-primary); outline-offset: 2px; }

.ew-btn--block { width: 100%; }
.ew-btn:disabled, .ew-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.ew-btn-ic { width: 18px; height: 18px; flex-shrink: 0; }

/* loading state: label stays for width, spinner overlays */
.ew-btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.ew-btn.is-loading::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.2px solid rgba(255, 255, 255, .45); border-top-color: #fff;
  animation: ew-spin .7s linear infinite;
}
.ew-btn--outline.is-loading::after { border-color: var(--ew-line-2); border-top-color: var(--ew-ink); }
@keyframes ew-spin { to { transform: rotate(360deg); } }

.ew-or {
  display: flex; align-items: center; gap: 14px;
  margin: 4px 0; font-size: 13px; color: var(--ew-ink-3);
}
.ew-or::before, .ew-or::after { content: ""; flex: 1; height: 1px; background: var(--ew-line); }

.ew-link {
  color: var(--ew-primary); font-weight: 650; text-decoration: none;
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
}
.ew-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- alerts (inline, above the form — not toasts) ---------- */
.ew-alert {
  display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start;
  padding: 12px 14px; border-radius: 12px;
  font-size: 14px; line-height: 1.5;
  border: 1px solid transparent;
}
.ew-alert svg { width: 20px; height: 20px; margin-top: 1px; }
.ew-alert b { font-weight: 700; }
.ew-alert--bad { background: var(--ew-bad-soft); color: #8E1F19; border-color: #F7C9C5; }
.ew-alert--good { background: var(--ew-good-soft); color: #075A3F; border-color: #BCE8D4; }
.ew-alert--info { background: var(--ew-tint); color: var(--ew-ink-2); border-color: var(--ew-line); }
.ew-alert--warn { background: var(--ew-warn-soft); color: #6E3B00; border-color: #F5D9A8; }

/* ---------- one-time code ---------- */
.ew-otp-set { margin: 0; padding: 0; border: 0; min-width: 0; }
.ew-otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 400px) { .ew-otp { gap: 10px; } }
.ew-otp input {
  width: 100%; min-width: 0; aspect-ratio: 1 / 1.12; max-height: 64px;
  border: 1.5px solid var(--ew-line-2); border-radius: 12px; background: var(--ew-surface);
  text-align: center; font: inherit; font-size: 24px; font-weight: 700; color: var(--ew-ink);
  font-variant-numeric: tabular-nums;
  transition: border-color var(--ew-fast) ease, box-shadow var(--ew-fast) ease;
}
.ew-otp input:hover { border-color: var(--ew-ink-3); }
.ew-otp input:focus { outline: none; border-color: var(--ew-primary); box-shadow: 0 0 0 4px var(--ew-ring); }
.ew-otp.is-invalid input { border-color: var(--ew-bad); }
.ew-otp.is-invalid { animation: ew-shake .32s var(--ew-ease); }
@keyframes ew-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ---------- password strength ---------- */
.ew-strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 4px; }
.ew-strength span { height: 4px; border-radius: 4px; background: var(--ew-line); transition: background-color var(--ew-dur) ease; }
.ew-strength[data-score="1"] span:nth-child(-n+1) { background: var(--ew-bad); }
.ew-strength[data-score="2"] span:nth-child(-n+2) { background: var(--ew-warn); }
.ew-strength[data-score="3"] span:nth-child(-n+3) { background: var(--ew-primary); }
.ew-strength[data-score="4"] span { background: var(--ew-good); }
.ew-pw-rules { display: grid; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--ew-ink-3); }
.ew-pw-rules li { display: flex; align-items: center; gap: 8px; }
.ew-pw-rules li::before {
  content: ""; width: 16px; height: 16px; flex-shrink: 0; border-radius: 50%;
  border: 1.5px solid var(--ew-line-2);
  background: center / 10px no-repeat;
  transition: background-color var(--ew-fast) ease, border-color var(--ew-fast) ease;
}
.ew-pw-rules li.is-met { color: var(--ew-ink-2); }
.ew-pw-rules li.is-met::before {
  border-color: var(--ew-good); background-color: var(--ew-good);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E");
}

/* ---------- choice cards (e.g. workspace picker) ---------- */
.ew-ws { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.ew-ws-opt { position: relative; }
.ew-ws-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ew-ws-opt label {
  display: grid; grid-template-columns: 44px 1fr 20px; gap: 14px; align-items: center;
  padding: 14px 16px; border: 1.5px solid var(--ew-line); border-radius: 16px;
  background: var(--ew-surface); cursor: pointer;
  transition: border-color var(--ew-fast) ease, box-shadow var(--ew-fast) ease, background-color var(--ew-fast) ease;
}
.ew-ws-opt label:hover { border-color: var(--ew-line-2); box-shadow: var(--ew-shadow-1); }
.ew-ws-opt input:focus-visible + label { outline: 3px solid var(--ew-primary); outline-offset: 2px; }
.ew-ws-opt input:checked + label { border-color: var(--ew-primary); background: color-mix(in srgb, var(--ew-primary) 4%, #fff); box-shadow: 0 0 0 3px var(--ew-ring); }
.ew-ws-logo {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  color: #fff; font-size: 14px; font-weight: 800;
}
.ew-ws-name { display: block; font-size: 15px; font-weight: 650; color: var(--ew-ink); }
.ew-ws-meta { display: block; font-size: 13px; color: var(--ew-ink-3); }
.ew-ws-radio { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--ew-line-2); transition: border var(--ew-fast) ease; }
.ew-ws-opt input:checked + label .ew-ws-radio { border: 6px solid var(--ew-primary); }

/* Action cards: one click enters (e.g. "Choose a workspace"). Same card, a button instead of a radio. */
.ew-ws-card {
  display: grid; grid-template-columns: 44px 1fr 20px; gap: 14px; align-items: center;
  width: 100%; padding: 14px 16px; border: 1.5px solid var(--ew-line); border-radius: var(--ew-r);
  background: var(--ew-surface); color: inherit; font: inherit; text-align: left; cursor: pointer;
  transition: border-color var(--ew-fast) ease, box-shadow var(--ew-fast) ease, transform var(--ew-fast) var(--ew-ease);
}
.ew-ws-card:hover { border-color: var(--ew-primary); box-shadow: var(--ew-shadow-1); }
a.ew-ws-card { text-decoration: none; }
.ew-ws-card:active { transform: scale(.99); }
.ew-ws-card:disabled { opacity: .5; cursor: not-allowed; }
.ew-ws-card .ew-ws-go { width: 18px; height: 18px; color: var(--ew-ink-3); transition: transform var(--ew-fast) var(--ew-ease), color var(--ew-fast) ease; }
.ew-ws-card:hover .ew-ws-go { color: var(--ew-primary); transform: translateX(3px); }
.ew-ws-card .ew-ws-name, .ew-ws-card .ew-ws-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ew-ws-card > span:nth-child(2) { min-width: 0; }
