/* Sign-in and account pages. Tokens, fonts and base controls come from brand.css (light and dark).
   The sign-in card follows Google's calm layout: heading on the left, form on the right on wide
   screens, stacked on phones; Curee's colours and type throughout. */

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.icon.xs { width: 14px; height: 14px; }
.icon.sm { width: 16px; height: 16px; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.muted { color: var(--c-muted); }

/* ── Sign-in shell ─────────────────────────────────────────────────────── */

.signin {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 40px 24px 24px;
}

.card {
  width: 100%;
  border: 1px solid var(--c-border);
  border-radius: 20px;
  background: var(--c-surface);
  box-shadow: var(--shadow-card);
}

.card.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px 48px;
  max-width: 1000px;
  min-height: 384px;
  padding: 40px 44px 36px;
}

.signin.wide .card.split {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

.card-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.card-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-top: 8px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 22px;
  border-radius: 13px;
  background: var(--c-ink-strong);
  color: var(--c-on-ink);
}

.brand-mark .mark {
  width: 24px;
  height: 22px;
}

.card h1 {
  font-size: 34px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.sub {
  margin: 12px 0 0;
  color: var(--c-muted);
  font-size: 15px;
  line-height: 1.55;
}

.sub strong { color: var(--c-ink); font-weight: 600; }

.intro-note {
  margin: 18px 0 0;
  color: var(--c-subtle);
  font-size: 13px;
  line-height: 1.5;
}

.product-line {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  padding: 4px 11px 4px 4px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  color: var(--c-ink);
  font-size: 13px;
  font-weight: 500;
}

.app-tile { flex: none; border-radius: 7px; }

/* Who is signing in: an initial and the email, with a way to switch. */
.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  margin-top: 20px;
  padding: 4px 6px 4px 4px;
  border: 1px solid var(--c-border-strong);
  border-radius: 999px;
  color: var(--c-ink);
  font-size: 14px;
  font-weight: 500;
}

.chip-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--c-blue-bg);
  color: var(--c-blue);
  font: 600 12px/1 var(--font-sans);
}

.chip-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip-switch {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: var(--c-muted);
}

.chip-switch:hover { background: var(--c-hover); color: var(--c-ink); }

/* Forms */
.stack {
  display: grid;
  gap: 18px;
}

.stack.tight { gap: 10px; }

.field { gap: 7px; }

.field label { color: var(--c-ink); }

.input { height: 48px; padding: 0 14px; font-size: 15px; }

.code-input {
  font-family: var(--font-mono);
  font-size: 20px;
  letter-spacing: 0.16em;
}

.hint {
  color: var(--c-muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.checkbox.reveal { margin-top: 2px; }

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 18px;
  padding: 11px 13px;
  border-radius: var(--radius);
  font-size: 13.5px;
  line-height: 1.45;
}

.alert .icon { flex: none; margin-top: 1px; }
.alert a { color: inherit; font-weight: 600; }
.alert.error { background: var(--c-red-bg); color: var(--c-red); }
.alert.info { background: var(--c-blue-bg); color: var(--c-blue); }
.alert.success { background: var(--c-green-bg); color: var(--c-green); }

.text-link {
  align-self: center;
  color: var(--c-blue);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}

.text-link.left { justify-self: start; align-self: flex-start; }
.text-link:hover { text-decoration: underline; }

.card-actions {
  display: flex;
  /* The primary button is first in the page (so Enter submits it) and shown on the right. */
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.card-actions .btn-primary { min-width: 104px; height: 42px; border-radius: 999px; padding: 0 22px; }
.card-actions .btn-ghost { height: 42px; padding: 0 14px; border-radius: 999px; color: var(--c-blue); font-weight: 600; }
.card-actions .btn-secondary { border-radius: 999px; }

.card-links {
  display: flex;
  justify-content: flex-start;
  margin-top: 18px;
}

.help-box {
  display: flex;
  gap: 10px;
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--c-panel);
  color: var(--c-muted);
  font-size: 13px;
  line-height: 1.5;
}

.help-box p { margin: 0; }
.help-box .icon { flex: none; margin-top: 2px; }
.help-box strong { color: var(--c-ink); }

.code {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--c-panel);
  color: var(--c-muted);
  font: 12.5px/1.5 var(--font-mono);
  overflow-wrap: anywhere;
}

.status-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 22px;
  border-radius: 50%;
}

.status-icon .icon { width: 22px; height: 22px; }
.status-icon.green { background: var(--c-green-bg); color: var(--c-green); }
.status-icon.amber { background: var(--c-amber-bg); color: var(--c-amber); }
.status-icon.red { background: var(--c-red-bg); color: var(--c-red); }
.status-icon.blue { background: var(--c-blue-bg); color: var(--c-blue); }

.eyebrow { margin: 0 0 6px; }

/* Lists of accounts and ways to sign in */
.rows {
  display: grid;
  gap: 0;
  margin: 0 -12px;
  padding: 0;
  list-style: none;
}

.rows > li + li { border-top: 1px solid var(--c-border); }

.row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
}

a.row,
button.row { cursor: pointer; }

a.row:hover,
button.row:hover { background: var(--c-hover); }

.rows.static { margin: 0; }
.rows.static .row { padding: 10px 0; border-radius: 0; }
.row.compact { min-height: 52px; }

.row-text {
  display: grid;
  flex: 1;
  min-width: 0;
}

.row-title {
  color: var(--c-ink);
  font-weight: 500;
}

.row-sub {
  overflow: hidden;
  color: var(--c-muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-note {
  margin-top: 2px;
  color: var(--c-amber);
  font-size: 12px;
  font-weight: 500;
}

.row-note.muted { color: var(--c-subtle); }
.row-icon { color: var(--c-subtle); }
.row-lead { flex: none; width: 22px; height: 22px; color: var(--c-muted); }

.avatar.ghost {
  border: 1px dashed var(--c-border-strong);
  background: transparent;
  color: var(--c-muted);
}

.avatar.xl { width: 88px; height: 88px; font-size: 30px; }

.account-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

/* 2-Step Verification setup */
.setup-steps {
  display: grid;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.setup-steps > li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 14px;
}

.step-number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--c-panel-strong);
  color: var(--c-ink);
  font: 600 13px/1 var(--font-sans);
}

.step-title { margin: 3px 0 4px; color: var(--c-ink); font-weight: 600; }
.step-text { margin: 0; color: var(--c-muted); font-size: 13.5px; line-height: 1.5; }

.qr {
  display: inline-block;
  margin: 10px 0 6px;
  padding: 12px;
  border: 1px solid var(--c-border);
  border-radius: 14px;
  background: #ffffff;
  line-height: 0;
}

.qr-code { display: block; width: 176px; height: 176px; }

.disclosure { margin-top: 8px; }

.disclosure > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--c-blue);
  font-size: 13.5px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure[open] > summary .icon { transform: rotate(90deg); }
.disclosure > p { margin: 10px 0 0; }

.secret {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.secret code,
.codes code {
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--c-panel);
  color: var(--c-ink-strong);
  font: 600 14px/1.4 var(--font-mono);
  letter-spacing: 0.06em;
  overflow-wrap: anywhere;
}

.backup-codes {
  padding: 16px;
  border: 1px dashed var(--c-border-strong);
  border-radius: 14px;
}

.codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.codes code { display: block; text-align: center; background: var(--c-surface-soft); }

.button-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Footer: theme switch and the service line */
.signin-foot,
.account-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  width: 100%;
  max-width: 1000px;
  margin: 16px auto 0;
  padding: 4px 4px 0;
}

.account-foot { justify-content: center; max-width: 1120px; padding: 8px 24px 24px; }

.foot-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--c-muted);
  font-size: 12.5px;
}

.theme-switch {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: var(--c-surface);
}

.theme-switch button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--c-muted);
  font: 500 12.5px/1 var(--font-sans);
  cursor: pointer;
}

.theme-switch button:hover { color: var(--c-ink); }

.theme-switch button.active {
  background: var(--c-ink-strong);
  color: var(--c-on-ink);
}

/* Private and the organization (D11): which context the access page shows. */
.context-switch {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 2px;
  margin: 0 0 20px;
  padding: 3px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: var(--c-surface);
  max-width: 100%;
}

.context-switch a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--c-muted);
  font: 500 13px/1 var(--font-sans);
  text-decoration: none;
}

.context-switch a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.context-switch a:hover { color: var(--c-ink); }
.context-switch a.active { background: var(--c-ink-strong); color: var(--c-on-ink); }

/* ── Account pages ─────────────────────────────────────────────────────── */

.account-top {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid var(--c-border);
  background: color-mix(in srgb, var(--c-canvas) 90%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
}

.wordmark-product {
  margin-left: 4px;
  color: var(--c-muted);
  font-weight: 500;
}

.top-actions { display: flex; align-items: center; gap: 12px; }

.menu-root { position: relative; }
.menu-root > summary { list-style: none; }
.menu-root > summary::-webkit-details-marker { display: none; }

.account-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
}

.account-button:hover,
.menu-root[open] > .account-button { background: var(--c-hover); }

.menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  padding: 6px;
  border: 1px solid var(--c-border);
  border-radius: 16px;
  background: var(--c-surface);
  box-shadow: var(--shadow-menu);
}

.menu-head { display: flex; align-items: center; gap: 12px; padding: 12px 10px 14px; }
.menu-name { margin: 0; font-weight: 600; }
.menu-email { margin: 0; color: var(--c-muted); font-size: 12.5px; }
.menu-section { padding: 6px 4px; border-top: 1px solid var(--c-border); }
.menu-label { margin: 6px 6px 6px; color: var(--c-subtle); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }

.menu-account,
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 6px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--c-ink);
  font: 500 13.5px/1.3 var(--font-sans);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.menu-account:hover,
.menu-item:hover { background: var(--c-hover); }

.account-layout {
  display: grid;
  flex: 1;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 32px;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 24px 24px;
}

.account-nav {
  position: sticky;
  top: 92px;
  display: grid;
  align-self: start;
  gap: 2px;
}

.account-nav .nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--c-muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.account-nav .nav-item:hover { background: var(--c-hover); color: var(--c-ink); }

.account-nav .nav-item.current {
  background: var(--c-blue-bg);
  color: var(--c-blue);
}

.account-main { display: grid; gap: 20px; align-content: start; min-width: 0; }

.account-head h1,
.home-head h1 { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; }

.lede { margin: 8px 0 0; color: var(--c-muted); font-size: 15px; line-height: 1.55; }
.lede.muted { color: var(--c-muted); font-size: 14px; }

.home-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0 8px;
  text-align: center;
}

.home-head .avatar { margin-bottom: 16px; }

.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.panel {
  padding: 20px 22px;
  border: 1px solid var(--c-border);
  border-radius: 18px;
  background: var(--c-surface);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.panel-sub { margin: 4px 0 0; color: var(--c-muted); font-size: 13.5px; line-height: 1.5; }

.panel-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.panel-foot form { margin: 0; }

.settings { display: grid; margin: 0 -10px; }

.setting {
  display: grid;
  grid-template-columns: 32px minmax(110px, 0.8fr) minmax(0, 2fr) 20px;
  gap: 12px;
  align-items: center;
  min-height: 56px;
  padding: 8px 10px;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
}

.settings > .setting + .setting { border-top: 1px solid var(--c-border); border-radius: 0; }
a.setting:hover { background: var(--c-hover); }

.setting.edit { grid-template-columns: 32px minmax(110px, 0.8fr) minmax(0, 2fr) auto; }
.setting.edit .input { height: 40px; }

.setting-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c-panel);
  color: var(--c-muted);
}

.setting-label { color: var(--c-muted); font-size: 13px; font-weight: 500; }
.setting-value { display: grid; justify-items: start; gap: 2px; min-width: 0; color: var(--c-ink); overflow-wrap: anywhere; }
.setting-note { color: var(--c-subtle); font-size: 12.5px; }

/* The narrow home tiles: label, then the value at the end of the row. */
.tiles .setting { grid-template-columns: 32px minmax(0, 1fr) auto 20px; }
.tiles .setting-value { justify-items: end; text-align: right; }

.setup-steps .code-input,
.narrow .code-input { max-width: 260px; }

.wordmark { white-space: nowrap; }

.empty-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  color: var(--c-muted);
  font-size: 13.5px;
  line-height: 1.5;
}

.empty-note p { margin: 0; }
.empty-note .icon { flex: none; margin-top: 2px; }

.activity,
.device-list,
.benefits {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity li,
.device {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 8px 0;
}

.activity li + li,
.device + .device { border-top: 1px solid var(--c-border); }

.activity-icon,
.device-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--c-panel);
  color: var(--c-muted);
}

.activity-icon.green { background: var(--c-green-bg); color: var(--c-green); }
.activity-icon.amber { background: var(--c-amber-bg); color: var(--c-amber); }
.activity-icon.red { background: var(--c-red-bg); color: var(--c-red); }

.activity-time { flex: none; color: var(--c-subtle); font-size: 12.5px; text-align: right; }

.benefits { gap: 12px; margin-bottom: 4px; }
.benefits li { display: flex; gap: 12px; color: var(--c-ink); font-size: 14px; line-height: 1.5; }
.benefits .icon { flex: none; margin-top: 3px; color: var(--c-green); }

.narrow { max-width: 440px; }

.pill { font-weight: 500; }

/* ── Small screens ─────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .card.split,
  .signin.wide .card.split {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: 24px;
  }

  .account-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 16px; }

  .account-nav {
    position: static;
    display: flex;
    gap: 4px;
    margin: 0 -24px;
    padding: 0 24px 4px;
    overflow-x: auto;
  }

  .account-nav .nav-item { flex: none; height: 38px; padding: 0 14px; gap: 8px; }
  .tiles { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .signin { justify-content: flex-start; padding: 16px 16px 20px; }

  .card.split { padding: 28px 20px 24px; border-radius: 18px; }
  .card h1 { font-size: 28px; }
  .brand-mark, .status-icon { margin-bottom: 16px; }

  .signin-foot, .account-foot { justify-content: center; }
  .foot-more { display: none; }
  .theme-switch button span { display: none; }
  .theme-switch button { padding: 0 10px; }

  .account-top { padding: 0 16px; }
  .top-actions { gap: 6px; }
  .account-layout { padding: 12px 16px 16px; }
  .account-nav { margin: 0 -16px; padding: 0 16px 4px; }
  .panel { padding: 16px; border-radius: 16px; }

  .setting,
  .setting.edit,
  .tiles .setting { grid-template-columns: 32px minmax(0, 1fr) 20px; row-gap: 4px; }
  .setting-icon { grid-row: 1 / span 2; }
  .tiles .setting-value { justify-items: start; text-align: left; }
  .setting-label { grid-column: 2; }
  .setting-value { grid-column: 2; }
  .setting > .icon:last-child { grid-column: 3; grid-row: 1 / span 2; }
  .setting.edit > .btn { grid-column: 2; justify-self: start; }

  .codes code { padding: 6px 4px; font-size: 13px; letter-spacing: 0.04em; }
  .wordmark-product { display: none; }
  .activity-time { display: none; }
  .menu { width: min(320px, calc(100vw - 32px)); }
}

@media print {
  .signin-foot, .account-top, .account-nav, .account-foot, .card-actions, .button-row, .theme-switch { display: none !important; }
  .card, .panel { border: 0; box-shadow: none; }
}

/* Invitations: what the person is invited to. */
.invite-facts {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface-soft);
}

.invite-facts > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.invite-facts dt {
  color: var(--c-muted);
  font-size: 13px;
}

.invite-facts dd {
  margin: 0;
  color: var(--c-ink-strong);
  font-size: 13.5px;
  font-weight: 500;
  text-align: right;
}

@media (max-width: 520px) {
  .invite-facts > div {
    flex-direction: column;
    gap: 2px;
  }

  .invite-facts dd {
    text-align: left;
  }
}
