/* ericai welcome and profile setup */
.account-dialog {
  --paper: #f8faf7;
  --ink-account: #15291e;
  --sub-account: #53675b;
  --line-account: #d5dfd5;
  --green-account: #16604b;
  width: min(890px, calc(100% - 42px));
  max-height: min(780px, calc(100dvh - 36px));
  margin: auto;
  padding: 0;
  border: 1px solid #b4c5b8;
  border-radius: 26px;
  background: var(--paper);
  color: var(--ink-account);
  color-scheme: light;
  overflow: auto;
  box-shadow: 0 30px 110px #040f16a6;
}
.account-dialog::backdrop { background: #050d14bc; backdrop-filter: blur(10px); }
.account-dialog[open] { animation: account-arrive .35s var(--ease) both; }
@keyframes account-arrive { from { opacity: 0; transform: translateY(8px) scale(.986); } }
.account-layout { display: grid; grid-template-columns: minmax(0, .83fr) minmax(0, 1.17fr); min-height: 570px; }
.account-art {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 27px 27px 31px;
  background: radial-gradient(ellipse at 85% 24%, #81ba9c43, transparent 66%), #143b31;
  color: #e4f6e8;
  overflow: hidden;
}
.account-art::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .29;
  background-image: linear-gradient(#a3c6ad32 1px, transparent 1px), linear-gradient(90deg, #a3c6ad32 1px, transparent 1px);
  background-size: 25px 25px;
  mask-image: linear-gradient(to bottom, transparent, #000 24%, #000 77%, transparent);
}
.account-art-brand { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 740; }
.account-art-brand img { border-radius: 9px; }
.account-radar { position: absolute; top: 48%; left: 50%; transform: translate(-50%, -50%); width: min(78%, 268px); aspect-ratio: 1; display: grid; place-items: center; }
.account-radar i { position: absolute; inset: 0; border: 1px solid #b6e1bf54; border-radius: 50%; }
.account-radar i:nth-child(2) { inset: 14%; }
.account-radar i:nth-child(3) { inset: 29%; }
.account-radar::before, .account-radar::after { content: ""; position: absolute; background: #b6e1bf2e; }
.account-radar::before { height: 1px; width: 100%; }
.account-radar::after { width: 1px; height: 100%; }
.account-radar > span { display: grid; z-index: 1; place-items: center; width: 55px; aspect-ratio: 1; border-radius: 15px; background: #bde9c4; color: #173e2e; box-shadow: 0 0 40px #bcf2c244; transform: rotate(-10deg); }
.account-radar > span .icon { width: 27px; height: 27px; }
.account-radar-pin { position: absolute; display: grid; z-index: 1; place-items: center; width: 35px; aspect-ratio: 1; border-radius: 50%; border: 1px solid #c9efd478; background: #25624f; }
.account-radar-pin .icon { width: 16px; height: 16px; }
.account-radar-pin.pin-1 { top: 13%; left: 23%; }
.account-radar-pin.pin-2 { top: 30%; right: 5%; }
.account-radar-pin.pin-3 { bottom: 10%; left: 30%; }
.account-art-foot { display: grid; gap: 6px; }
.account-art-foot span { font-size: 9px; font-weight: 680; letter-spacing: .19em; color: #c0ddc9; }
.account-art-foot b { font-size: clamp(33px, 5vw, 70px); line-height: .84; letter-spacing: -.073em; }
.account-content { position: relative; min-width: 0; padding: 29px 33px 33px; }
.account-toolbar { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin: 0 0 19px; }
.account-toolbar .lang-switch { background: #eaf0ea; }
.account-toolbar .lang-switch button { color: var(--sub-account); min-width: 28px; height: 25px; }
.account-toolbar .lang-switch button[aria-pressed="true"] { background: white; color: #164c3d; }
.account-close { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 50%; color: var(--sub-account); }
.account-close:hover { background: #e7eee7; }
.account-close .icon { width: 18px; height: 18px; }
.account-dialog :focus-visible { outline: 2px solid #19735b; outline-offset: 2px; }
#account-title:focus-visible { outline: 0; }
.account-kicker { color: var(--green-account); font-size: 10px; font-weight: 820; letter-spacing: .18em; }
.account-content h1 { margin: 9px 0; font-size: clamp(31px, 4.45vw, 56px); font-weight: 770; letter-spacing: -.065em; line-height: 1.05; overflow-wrap: anywhere; }
.account-progress ~ h1 { font-size: clamp(29px, 3.5vw, 43px); }
.account-intro { margin-bottom: 18px; color: var(--sub-account); font-size: 14px; }
.account-alert { margin: 0 0 12px; padding: 8px 10px; border: 1px solid #ead8ba; border-radius: 9px; background: #fbf0de; color: #674918; font-size: 13px; }
.account-paths, .account-form { display: grid; gap: 9px; }
.account-paths > small, .account-caption { color: var(--sub-account); font-size: 11px; }
.account-connection {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid var(--line-account);
  border-radius: 10px;
  color: var(--sub-account);
  font-size: 13px;
}
.account-connection span { display: grid; gap: 1px; }
.account-connection small { font-size: 11px; }
.account-connection a { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 7px; background: #e8f1e9; }
.account-connection a .icon { width: 15px; height: 15px; }
.account-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 13px; border: 1px solid transparent; border-radius: 10px; font-size: 14px; font-weight: 710; text-align: center; }
.account-btn .icon { width: 16px; height: 16px; }
.account-btn.primary { background: #174d3c; color: #fff; }
.account-btn.primary:hover { background: #0d3b2d; }
.account-btn.secondary { border-color: #c0d3c4; background: #e6f0e6; color: #154535; }
.account-btn.secondary:hover, .account-btn.quiet:hover { background: #dfebdf; }
.account-btn.quiet { color: var(--sub-account); }
.account-progress { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-bottom: 17px; }
.account-progress li { padding-top: 5px; border-top: 2px solid #d5e1d7; color: var(--sub-account); font-size: 11px; }
.account-progress li[aria-current="step"] { border-color: #216c54; color: #144b39; font-weight: 790; }
.account-field { display: grid; gap: 4px; color: var(--sub-account); font-size: 12px; font-weight: 700; }
.account-field > input, .account-field > select, .account-known { width: 100%; min-width: 0; min-height: 42px; padding: 7px 9px; border: 1px solid var(--line-account); border-radius: 8px; background: #fff; color: var(--ink-account); font: inherit; font-size: 15px; font-weight: 530; }
.account-known { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 3px 7px; }
.account-tag { display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px; border-radius: 6px; background: #dcefe1; color: #245940; font-size: 11px; white-space: nowrap; }
.account-tag .icon { width: 12px; height: 12px; }
.account-pair, .account-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.account-topics { margin-bottom: 6px; }
.account-topics label { position: relative; cursor: pointer; }
.account-topics input { position: absolute; left: 11px; top: 12px; width: 1px; height: 1px; opacity: 0; }
.account-topics label span { display: grid; grid-template-columns: auto 1fr auto; gap: 7px; align-items: center; min-height: 57px; height: 100%; padding: 8px; border: 1px solid var(--line-account); border-radius: 10px; background: white; font-size: 13px; }
.account-topics label .icon { width: 16px; height: 16px; color: #316954; }
.account-topics label .icon:last-child { opacity: 0; }
.account-topics input:checked + span { border-color: #7bad91; background: #e0f0e3; }
.account-topics input:checked + span .icon:last-child { opacity: 1; }
.account-topics input:focus-visible + span { outline: 2px solid #19735b; outline-offset: 2px; }
.account-actions { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px; margin-top: 10px; }
.account-pass {
  display: grid;
  gap: 4px;
  margin: 16px 0 13px;
  padding: 15px;
  border-radius: 13px;
  background: radial-gradient(ellipse at 90% 0, #5c947652, transparent 58%), #1b493a;
  color: #f2fcf2;
  box-shadow: 0 10px 22px #18322629;
  animation: account-arrive .45s var(--ease) both;
}
.account-pass-head { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-bottom: 13px; color: #d3efd9; font-size: 10px; font-weight: 760; letter-spacing: .16em; }
.account-pass-head .icon { width: 21px; height: 21px; }
.account-pass > b { font-size: 28px; line-height: 1.1; overflow-wrap: anywhere; }
.account-pass p, .account-pass small { overflow-wrap: anywhere; }
.account-pass p { font-size: 13px; }
.account-pass small { color: #d3efd9; font-size: 11px; }
.account-preview { color: var(--sub-account); font-size: 13px; }
.account-preview span { display: flex; align-items: center; gap: 6px; margin-top: 5px; font-size: 12px; }
.account-preview .icon { width: 15px; height: 15px; color: var(--green-account); }
.account-profile-meta { margin: 8px 0 16px; color: var(--ink-2); }
.account-profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.account-btn:disabled { opacity: .55; cursor: wait; }
.account-login-tools { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.account-privacy { margin-top: 20px; line-height: 1.65; }
.account-field > .account-code { padding: 13px; text-align: center; font-size: 29px; font-weight: 700; letter-spacing: .22em; font-variant-numeric: tabular-nums; }
.account-email-address { margin-bottom: 18px; color: var(--ink-2); overflow-wrap: anywhere; }
.account-verifications { display: grid; border: 1px solid var(--hairline); border-radius: 15px; }
.account-verifications > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; font-size: 13px; }
.account-verifications > div + div { border-top: 1px solid var(--hairline); }
.account-verifications span { color: var(--ink-2); }
.account-verifications b { font-size: 12px; }
.account-proof-note { font-size: 12px; line-height: 1.65; }
.profile-chip > span:last-child, #profile-name, #profile-line { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 690px) {
  .account-dialog { width: min(450px, calc(100% - 22px)); max-height: calc(100dvh - 22px); border-radius: 20px; }
  .account-layout { display: block; min-height: 0; }
  .account-art { min-height: 83px; justify-content: center; padding: 15px 19px; }
  .account-art-foot { display: none; }
  .account-radar { left: auto; right: -31px; width: 143px; transform: translateY(-50%); }
  .account-radar > span { width: 29px; border-radius: 8px; }
  .account-radar > span .icon { width: 17px; height: 17px; }
  .account-radar-pin { width: 24px; }
  .account-radar-pin .icon { width: 12px; height: 12px; }
  .account-content { padding: 15px 17px 20px; }
  .account-toolbar { margin-bottom: 9px; }
  .account-intro { margin-bottom: 12px; font-size: 13px; }
  .account-content h1 { font-size: clamp(31px, 9vw, 43px); }
  .account-progress ~ h1 { font-size: clamp(28px, 8vw, 36px); }
  .account-field > input, .account-field > select { font-size: 16px; }
}

/* v6 · plain dialog on shared tokens; no decorative side panel */
.account-dialog {
  --paper: var(--surface); --ink-account: var(--ink); --sub-account: var(--ink-2);
  --line-account: var(--hairline-2); --green-account: var(--accent);
  width: min(460px, calc(100% - 32px)); border: 1px solid var(--hairline); border-radius: 16px;
  color-scheme: inherit; box-shadow: 0 20px 60px rgb(0 0 0 / 18%);
}
.account-dialog::backdrop { background: var(--scrim); backdrop-filter: none; }
.account-layout { display: block; min-height: 0; }
.account-art { display: none; }
.account-content { padding: 18px 22px 24px; }
.account-toolbar { margin-bottom: 8px; }
.account-toolbar .lang-switch { background: var(--surface-2); }
.account-toolbar .lang-switch button { color: var(--ink-3); }
.account-toolbar .lang-switch button[aria-pressed="true"] { background: var(--seg-thumb); color: var(--ink); }
.account-close:hover { background: var(--surface-2); }
.account-dialog :focus-visible { outline-color: var(--accent); }
.account-kicker { color: var(--ink-3); font-size: 12.5px; font-weight: 600; letter-spacing: 0; }
.account-content h1, .account-progress ~ h1 { margin: 4px 0 6px; font-size: 24px; font-weight: 720; letter-spacing: -.03em; line-height: 1.3; }
.account-intro { font-size: 14px; line-height: 1.6; }
.account-alert { border-color: color-mix(in srgb, var(--orange) 30%, transparent); background: color-mix(in srgb, var(--orange) 8%, transparent); color: var(--ink); }
.account-paths > small, .account-caption { color: var(--ink-3); font-size: 12px; line-height: 1.55; }
.account-connection a { background: var(--surface-2); }
.account-btn { border-radius: 11px; font-weight: 620; }
.account-btn.primary { background: var(--cta-bg); color: var(--cta-fg); }
.account-btn.primary:hover { background: var(--cta-bg); opacity: .88; }
.account-btn.secondary { border-color: var(--hairline-2); background: var(--surface); color: var(--ink); }
.account-btn.secondary:hover, .account-btn.quiet:hover { background: var(--surface-2); }
.account-progress li { border-top-color: var(--hairline-2); color: var(--ink-3); }
.account-progress li[aria-current="step"] { border-color: var(--ink); color: var(--ink); font-weight: 650; }
.account-field { color: var(--ink-2); font-weight: 600; }
.account-field > input, .account-field > select, .account-known { border-color: var(--hairline-2); border-radius: 10px; background: var(--surface); color: var(--ink); }
.account-tag { background: var(--accent-soft); color: var(--accent); }
.account-topics label span { border-color: var(--hairline-2); background: var(--surface); }
.account-topics label .icon { color: var(--ink-3); }
.account-topics input:checked + span { border-color: var(--ink); background: var(--surface-2); }
.account-topics input:focus-visible + span { outline-color: var(--accent); }
.account-pass { background: var(--surface-2); color: var(--ink); box-shadow: none; border: 1px solid var(--hairline); }
.account-pass-head { color: var(--ink-3); letter-spacing: 0; font-size: 12px; }
.account-pass small { color: var(--ink-3); }
.account-preview span { display: block; margin-top: 4px; color: var(--ink); }

/* Account pages use the same paper, type and list language as the Agent. */
.personal-header { display:flex; align-items:center; gap:14px; padding:8px 0 14px; }
.personal-header .d-title { margin:2px 0 5px; font-size:25px; }
.personal-avatar { width:58px; height:58px; border-radius:20px; display:grid; place-items:center; background:var(--surface-2); color:var(--ink); font-size:25px; font-weight:700; }
.personal-email { color:var(--ink-2); font-size:13px; overflow-wrap:anywhere; margin:0; }
.personal-tags { display:flex; flex-wrap:wrap; gap:6px; }
.personal-tags span { border:1px solid var(--hairline-2); border-radius:6px; padding:3px 7px; color:var(--ink-2); font-size:11px; }
.personal-stats { display:grid; grid-template-columns:repeat(3,1fr); padding:20px 0 6px; }
.personal-stats > div { display:grid; gap:5px; text-align:center; border-right:1px solid var(--hairline); }
.personal-stats > div:last-child { border:0; }
.personal-stats b { font-size:24px; font-weight:730; font-variant-numeric:tabular-nums; }
.personal-stats small,.settings-note,.account-status { color:var(--ink-2); font-size:12px; line-height:1.65; }
.settings-label { margin:22px 0 9px; font-size:12px; font-weight:600; color:var(--ink-3); }
.settings-note { margin:10px 0 18px; font-size:13px; }
.account-setting-row { min-height:66px; }
.account-setting-row .ic { color:var(--ink-2); background:var(--surface-2); border-radius:9px; }
.account-setting-row .txt b { font-size:14px; }
.account-setting-row .txt small { font-size:11.5px; }
.account-status { margin:17px 0 2px; text-align:center; font-size:11px; }
.account-logout { margin-top:9px; color:var(--ink-3); font-size:13px; }
.account-form select,.account-form textarea { width:100%; min-height:48px; padding:12px; border:1px solid var(--hairline-2); border-radius:11px; background:var(--surface); color:var(--ink); font:inherit; font-size:16px; }
.account-form textarea { resize:vertical; }
.account-form .account-field { min-width:0; }
.account-form .btn.block { margin-top:9px; }
.email-domains { display:flex; gap:6px; flex-wrap:wrap; }
.email-domains:empty { display:none; }
.email-domains button { border:1px solid var(--hairline); border-radius:7px; padding:6px 8px; color:var(--ink-2); background:var(--surface-2); font-size:12px; }
.otp-control { position:relative; min-height:58px; }
.account-form input.otp-input { position:absolute; inset:0; height:58px; width:100%; opacity:.01; z-index:2; cursor:text; caret-color:transparent; }
.otp-cells { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:8px; }
.otp-cells span { display:grid; place-items:center; height:58px; border:1px solid var(--hairline-2); border-radius:10px; background:var(--surface-2); font-size:26px; font-weight:650; font-variant-numeric:tabular-nums; }
.otp-control:focus-within .otp-cells span.current { border:2px solid var(--ink); }
.mail-connect-callout { display:flex; align-items:center; gap:10px; border:1px solid color-mix(in srgb,var(--agent) 24%,var(--hairline)); background:color-mix(in srgb,var(--agent) 5%,var(--surface)); border-radius:14px; padding:13px; margin:14px 0; }
.mail-connect-callout .txt { display:grid; gap:4px; flex:1; min-width:0; }
.mail-connect-callout b { font-size:13px; }
.mail-connect-callout small { color:var(--ink-2); font-size:11px; line-height:1.5; }
.mail-connect-callout .ic { background:none; color:var(--agent); flex-shrink:0; }
.mail-manage,.mail-tutorial { margin:16px 0; font-size:13px; color:var(--ink-2); }
.mail-manage > summary,.mail-tutorial > summary { cursor:pointer; padding:10px 0; color:var(--ink); font-size:13px; }
.mail-tutorial details { margin:9px 0; }
.agent-answer-text { white-space:pre-wrap; line-height:1.8; font-size:14px; }
.agent-citations { display:flex; flex-wrap:wrap; gap:6px; margin:13px 0; }
.citation-chip { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:5px 8px; border:1px solid var(--hairline-2); border-radius:6px; background:var(--surface-2); color:var(--ink-2); font-size:11px; }
.agent-thinking { color:var(--ink-3); }
.conversation-history { margin:5px 0 15px; color:var(--ink-2); font-size:12px; }
.conversation-history summary { cursor:pointer; padding:5px 0; }
.conversation-turn { padding:9px 0; border-bottom:1px solid var(--hairline); }
.conversation-turn small { font-size:10px; color:var(--ink-3); }
.conversation-turn p { margin:4px 0; white-space:pre-wrap; line-height:1.7; }
.match-explanation { font-size:11px; color:var(--ink-2); margin-top:7px; }
.match-explanation summary { cursor:pointer; }
.match-explanation p { margin:8px 0; line-height:1.6; }
.match-source { margin-top:9px; }
.match-source b { font-size:11px !important; font-weight:500 !important; }
.match-source blockquote { margin:6px 0; padding-left:10px; border-left:2px solid var(--hairline-2); white-space:pre-wrap; line-height:1.6; }
.academic-estimate { margin:2px 0 6px; padding:11px; border-radius:10px; background:var(--surface-2); color:var(--ink-2); font-size:12px; line-height:1.65; }
.academic-override { color:var(--ink-2); font-size:12px; }
.academic-override summary { padding:7px 0; cursor:pointer; }
@media (max-width:380px) { .otp-cells { gap:5px; } .mail-connect-callout { padding:10px; } .mail-connect-callout > .ic { display:none; } }
