.password-auth-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin: 18px 0;
  border-radius: 12px;
  background: #f4f7fb;
}
.password-auth-tabs button {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 8px 6px;
  border: 0;
  border-radius: 9px;
  font: inherit;
  font-size: 14px;
  color: #647281;
  background: transparent;
  cursor: pointer;
}
.password-auth-tabs button[aria-pressed="true"] {
  background: #e8f5fd;
  color: #177aa4;
  font-weight: 700;
}
.password-auth-tabs button:focus-visible,
[data-password-settings] button:focus-visible {
  outline: 2px solid #177aa4;
  outline-offset: 2px;
}
[data-password-entry] .text-input,
[data-password-settings-form] .text-input { margin-bottom: 16px; }
[data-password-forgot], [data-password-return] { margin-top: 12px; font-size: 14px; }
[data-auth-note]:empty { display: none; }
[data-password-code-destination] { overflow-wrap: anywhere; }
.password-auth-resend { margin-bottom: 16px; font-size: 14px; }
[data-password-register-code] { margin-top: 16px; }
[data-password-settings-form] .field-label { margin-top: 16px; }
[data-password-settings-note]:empty { display: none; }
[data-password-settings-form] { margin-top: 16px; }
[data-password-settings] .note { overflow-wrap: anywhere; }
[data-screen="profile"] .profile-head > div { min-width: 0; }
[data-screen="profile"] [data-user-name],
[data-screen="profile"] [data-user-username] { overflow-wrap: anywhere; min-width: 0; }
[data-screen="profile"] .profile-meta dt { flex-shrink: 0; }
[data-screen="profile"] .profile-meta dd { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 360px) {
  .password-auth-tabs button { font-size: 12px; }
}

/* Compact entry surface; private cabinet and password settings keep their layout. */
.app-shell.auth-mode {
  width: min(100%, 360px);
}
.auth-screen {
  min-height: 0;
  align-content: start;
  gap: 8px;
  padding-block: clamp(12px, 3vh, 24px) 8px;
}
.auth-card {
  --auth-field-gap: 4px;
  margin: 0;
  padding: 12px;
  border-radius: 14px;
  text-align: left;
  box-shadow: 0 6px 18px rgba(30, 75, 115, 0.07);
}
.auth-card [data-auth-title] {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.auth-card .password-auth-tabs {
  margin: 0 0 8px;
  padding: 2px;
  border-radius: 10px;
}
.auth-card .password-auth-tabs button {
  flex: 0 0 calc((100% - 4px) * 0.42);
  padding: 6px 4px;
  overflow-wrap: anywhere;
  text-wrap: balance;
  line-height: 1.2;
  border-radius: 8px;
  color: #536579;
}
.auth-card .password-auth-tabs button[data-password-mode="register"] { flex: 1; }
.auth-card .password-auth-tabs button[aria-pressed="true"] {
  color: #146f99;
  background: #e8f5fd;
}
.auth-card [data-auth-intro] {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.4;
}
.auth-card .field-label {
  margin: 0 0 2px;
  color: #536579;
  font-size: 13px;
  font-weight: 600;
}
.auth-card .text-input {
  display: block;
  height: 44px;
  min-height: 44px;
  margin: 0 0 var(--auth-field-gap);
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 16px;
}
.auth-card .text-input::placeholder { color: #5d6d7e; }
.auth-card .primary-button,
.auth-card .secondary-button {
  display: block;
  min-height: 44px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.25;
}
.auth-card .primary-button { background: #177da7; }
.auth-card [data-password-forgot],
.auth-card [data-password-return] {
  margin-top: 0;
  color: #146f99;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
}
.auth-card [data-password-register-extra] .note {
  margin: 0 0 8px;
  font-size: 12px;
}
.auth-screen > .auth-consent-copy {
  margin: 0 4px;
  text-align: center;
  font-size: 11px;
}
.auth-card [data-auth-note] {
  margin: 12px 0 0;
  text-align: left;
}
.auth-card .password-auth-resend { margin-bottom: 12px; }
.auth-card .auth-code-row,
.auth-card [data-password-register-code] { margin-top: 12px; }
.auth-brand-label { font-size: 13px; font-weight: 700; }
.auth-brand { gap: 8px; }
.auth-brand-app-icon { width: 28px; height: 28px; border-radius: 8px; }
.auth-brand-app-icon + .auth-brand-app-icon { margin-left: -6px; }
.auth-header { gap: 8px; padding: 0; }
@media (max-width: 360px) {
  .auth-card { padding: 12px; }
  .auth-brand-label { font-size: 12px; }
  .auth-service-status { font-size: 10px; }
}
@media (max-height: 620px) {
  .auth-screen { padding-top: 16px; }
}

/* Informational services section. Authentication and cabinet styles stay scoped. */
.auth-ai {
  min-width: 0;
  margin-top: 0;
  padding-top: 12px;
  border-top: 1px solid #d8e3ec;
  text-align: left;
  color: #1e3444;
}
.auth-ai-header { margin-bottom: 28px; }
.auth-ai-header h2 {
  margin: 0 0 12px;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.auth-ai-header p {
  max-width: 48ch;
  margin: 0;
  color: #536579;
  font-size: 15px;
  line-height: 1.55;
}
.auth-ai-body { display: grid; gap: 28px; }
.auth-ai-tools { margin-bottom: 32px; }
.auth-ai-tools h3 { margin: 0 0 8px; font-size: 16px; line-height: 1.4; }
.auth-ai-tools p { max-width: 68ch; margin: 0; font-size: 14px; line-height: 1.55; color: #536579; }
.auth-ai-tools ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.auth-ai-tools li {
  padding: 6px 12px;
  border: 1px solid #d4e2ec;
  border-radius: 8px;
  background: #fff;
  color: #23475e;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}
.auth-ai-start { min-width: 0; border-block: 1px solid #d8e3ec; }
.auth-ai-start summary {
  display: list-item;
  min-height: 44px;
  padding: 12px 4px;
  color: #146f99;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
}
.auth-ai-start summary:focus-visible { outline: 2px solid #146f99; outline-offset: 3px; }
.auth-ai-start ol { margin: 4px 0 16px; padding-left: 24px; font-size: 14px; line-height: 1.55; color: #536579; }
.auth-ai-start li + li { margin-top: 12px; }
.auth-ai-start strong { color: #1e3444; }
.auth-ai-services { display: grid; gap: 24px; min-width: 0; }
.auth-ai-service {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}
.auth-ai-service svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #146f99;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.auth-ai-service h3,
.auth-ai-pricing h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.4;
}
.auth-ai-service p,
.auth-ai-server-note,
.auth-ai-pricing p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #536579;
}
.auth-ai-server-note { padding-top: 4px; }
.auth-ai-pricing {
  min-width: 0;
  align-self: start;
  padding: 20px;
  border-radius: 16px;
  background: #e8f5fd;
}
.auth-ai-pricing dl { margin: 20px 0; }
.auth-ai-pricing dl > div + div {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #c4dfed;
}
.auth-ai-pricing dt { margin: 0 0 8px; font-size: 13px; color: #466274; }
.auth-ai-pricing dd {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.auth-ai-pricing dd span {
  display: block;
  margin-top: 4px;
  color: #466274;
  font-size: 13px;
  font-weight: 400;
}
.auth-ai-pricing p { color: #466274; }
.auth-ai-budget strong { display: block; margin-bottom: 8px; color: #1e3444; font-size: 16px; }
.auth-ai-budget span { display: block; }
.auth-ai-examples { min-width: 0; padding-top: 8px; }
.auth-ai-examples h3 { margin: 0 0 8px; font-size: 16px; line-height: 1.4; }
.auth-ai-examples .auth-ai-example-note {
  margin: 0 0 16px;
  font-size: 12px;
  line-height: 1.5;
  color: #536579;
}
.auth-ai-example-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.auth-ai-example-grid figure { min-width: 0; margin: 0; }
.auth-ai-example-grid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 8px;
  background: #e8eff4;
}
.auth-ai-example-grid figcaption { margin-top: 8px; font-size: 12px; line-height: 1.5; }
.auth-ai-example-grid figcaption strong { display: block; }
.auth-ai-example-grid figcaption span { display: block; color: #536579; }
.auth-ai-entry {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 20px;
  padding: 8px 12px;
  border: 1px solid #a9ccdf;
  border-radius: 10px;
  background: #fff;
  color: #146f99;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
}
.auth-ai-entry:hover { background: #f4faff; }
.auth-ai-entry:focus-visible { outline: 2px solid #146f99; outline-offset: 3px; }
.auth-card:focus { outline: none; }
.auth-card:focus-visible { outline: 2px solid #146f99; outline-offset: 4px; }
.auth-ai-logos {
  margin: 0 0 8px;
}
.auth-ai-logos h2 { margin: 0 0 16px; font-size: 16px; line-height: 1.4; text-align: center; }
.auth-ai-logo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.auth-ai-logo-grid li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #23475e;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}
.auth-ai-logo-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid #d8e3ec;
  border-radius: 12px;
  background: #fff;
}
.auth-ai-logo-mark img { display: block; width: 28px; height: 28px; object-fit: contain; }
.auth-ai-logo-mark--claude { background: #faf0e9; border-color: #eddbce; }
.auth-ai-logo-mark--codex { background: #e8f5fd; border-color: #c4dfed; }
@media (min-width: 768px) {
  .app-shell.auth-mode { width: min(100%, 960px); }
  .auth-screen > :not(.auth-ai) { width: 328px; justify-self: center; }
  .auth-screen > .auth-consent-copy { width: 320px; }
  .auth-ai { margin-top: 0; padding: 12px 24px 0; }
  .auth-ai-header h2 { font-size: 32px; }
  .auth-ai-body { grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; }
  .auth-ai-logo-grid { gap: 16px; }
  .auth-ai-logo-grid li { gap: 12px; font-size: 14px; }
  .auth-ai-logo-mark { width: 64px; height: 64px; border-radius: 16px; }
  .auth-ai-logo-mark img { width: 36px; height: 36px; }
}
