/* The account page (/account/): signed out, a hero with the way in; signed in, the embed (preview and code) on the
   left, the settings in cards on the right; one column on a phone. Cards in the Try panel's look. */
.acct { padding: 34px 0 80px; }
.acct-loading { color: var(--dim); padding: 80px 0; }

/* signed out */
.acct-hero { max-width: 720px; padding: 40px 0 20px; }
.acct-hero h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); }
.acct-hero .lede { margin-top: 1.1rem; }
.acct-points { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.acct-points li { padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(13, 22, 48, .55);
  color: var(--muted); font-size: 0.93rem; line-height: 1.5; }
.acct-points b { color: var(--text); font-weight: 600; }

/* signed in */
.acct-top h1 { font-size: clamp(2rem, 4vw, 3rem); }
.acct-top .lede.small { margin-top: 0.7rem; }
.acct-grid { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 28px; }
.acct-side { position: sticky; top: 84px; }
.acct-main { display: grid; gap: 18px; min-width: 0; }
.acct-card { padding: 20px 22px; border-radius: 20px; border: 1px solid var(--line-2); background: rgba(13, 22, 48, .55); min-width: 0; }
.acct-card h2 { margin: 0 0 4px; font-size: 1.3rem; max-width: none; }
.acct-card h3 { margin: 18px 0 10px; font-size: 0.78rem; font-family: var(--mono); font-weight: 500; letter-spacing: .14em;
  text-transform: uppercase; color: var(--dim); }
.acct-intro { margin: 0 0 14px; color: var(--muted); font-size: 0.93rem; line-height: 1.55; }
.acct-fine { margin: 10px 0 0; color: var(--dim); font-size: 0.84rem; line-height: 1.5; }
.acct-fine a, .acct-intro a { color: var(--muted); }
.acct-warn { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(253, 230, 138, .3);
  background: rgba(253, 230, 138, .06); color: #fde68a; font-size: 0.88rem; line-height: 1.45; }
.acct-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.acct-status { margin: 8px 0 0; font-size: 0.88rem; }
.acct-status:empty { display: none; }
.acct-status.bad { color: #fca5a5; }
.acct-status.good { color: #34d399; }
.acct-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.acct-card .btn:disabled { opacity: .6; cursor: progress; transform: none; }

/* the embed */
.acct-preview { display: grid; place-items: center; margin-top: 12px; padding: 10px; border-radius: 16px; border: 1px solid var(--line);
  background: radial-gradient(70% 60% at 50% 42%, rgba(99, 102, 241, .16), transparent 70%), var(--night-2); }
.acct-preview iframe { display: block; width: 360px; max-width: 100%; height: 460px; border: 0; color-scheme: normal; }   /* matches the embed: a transparent frame */
.acct-seg { display: flex; flex-wrap: wrap; gap: 4px; }
.acct-seg button { border: 1px solid var(--line-2); background: rgba(13, 22, 48, .55); color: var(--muted); border-radius: 9px;
  padding: 6px 10px; font: 500 0.82rem var(--body); cursor: pointer; }
.acct-seg button.on { color: var(--text); border-color: rgba(34, 211, 238, .8); background: rgba(34, 211, 238, .1); }
.acct-code { width: 100%; margin-top: 10px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line-2);
  background: #050916; color: #c7d2fe; font: 0.78rem/1.55 var(--mono); resize: vertical; }
.acct-copied { color: var(--cyan); font-size: 0.88rem; }

/* usage */
.acct-usage { display: flex; flex-wrap: wrap; gap: 8px 28px; color: var(--muted); }
.acct-usage b { font: 600 1.6rem var(--display); color: var(--text); }
.acct-meter { --v: 0; height: 8px; margin-top: 12px; border-radius: 999px; background: rgba(148, 163, 184, .16); overflow: hidden; }
.acct-meter span { display: block; height: 100%; width: calc(var(--v) * 100%); border-radius: inherit; background: var(--grad); }
.acct-meter.full span { background: #f87171; }

/* the face */
.acct-face { display: flex; gap: 16px; align-items: center; margin-top: 10px; }
.acct-face img { flex: none; width: 72px; height: 72px; border-radius: 16px; object-fit: cover; border: 1px solid var(--line-2); background: #0a1226; }
.acct-face dl, .acct-facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; flex: 1; min-width: 0; }
.acct-face dt, .acct-facts dt { color: var(--dim); font-size: 0.78rem; }
.acct-face dd, .acct-facts dd { margin: 2px 0 0; color: var(--text); font-size: 0.93rem; }
.acct-facts { margin-top: 16px; }
.acct-swatch { display: inline-block; width: 26px; height: 26px; border-radius: 50%; vertical-align: middle;
  background: linear-gradient(135deg, var(--a) 50%, var(--b) 50%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.acct-field { display: block; margin-top: 16px; }
.acct-field span { font-size: 0.86rem; font-weight: 500; color: var(--text); }
.acct-card select, .acct-card input[type="text"] { flex: 1 1 220px; min-width: 0; height: 40px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line-2); background: #070d1f; color: var(--text); font: 400 0.95rem var(--body); }
.acct-card textarea#acct-personality { display: block; width: 100%; margin-top: 8px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line-2); background: #070d1f; color: var(--text); font: 400 0.95rem/1.55 var(--body); resize: vertical; }
.acct-card select:focus-visible, .acct-card input:focus-visible, .acct-card textarea:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; }
.acct-card input::placeholder { color: var(--dim); }

/* personality */
.acct-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--dim); font-size: 0.85rem; }
.acct-presets > span { margin-right: 4px; }
.acct-chip { border: 1px solid var(--line-2); background: rgba(13, 22, 48, .55); color: var(--muted); border-radius: 999px;
  padding: 6px 12px; font: 500 0.84rem var(--body); cursor: pointer; }
.acct-chip:hover { color: var(--text); border-color: rgba(34, 211, 238, .5); }
.acct-count { margin-left: auto; color: var(--dim); font: 500 0.8rem var(--mono); }

/* domains */
.acct-domains { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.acct-domains li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px;
  border-radius: 12px; border: 1px solid var(--line); background: rgba(5, 9, 22, .5); font: 500 0.9rem var(--mono); color: var(--text);
  overflow-wrap: anywhere; }
.acct-domains li.acct-empty { font-family: var(--body); color: var(--dim); font-weight: 400; }
.acct-remove { border: 0; padding: 2px 4px; background: none; color: var(--muted); font: 500 0.84rem var(--body); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; }
.acct-remove:hover { color: #fca5a5; }

/* conversations */
.acct-convs { display: grid; gap: 8px; }
.acct-empty { margin: 0; color: var(--dim); font-size: 0.9rem; }
.acct-conv { border-radius: 12px; border: 1px solid var(--line); background: rgba(5, 9, 22, .5); }
.acct-conv summary { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 10px 14px; cursor: pointer; color: var(--muted); font-size: 0.88rem; }
.acct-conv summary .acct-when { color: var(--text); font-weight: 500; margin-right: auto; }
.acct-conv[open] summary { border-bottom: 1px solid var(--line); }
.acct-lines { padding: 10px 14px 12px; display: grid; gap: 8px; }
.acct-line { margin: 0; color: var(--text); font-size: 0.92rem; line-height: 1.5; }
.acct-line b { display: inline-block; margin-right: 8px; padding: 2px 6px; border-radius: 6px; font: 500 0.68rem/1.4 var(--mono);
  letter-spacing: .1em; text-transform: uppercase; vertical-align: 1px; color: var(--cyan); background: rgba(34, 211, 238, .1); }
.acct-line.you { color: var(--muted); }
.acct-line.you b { color: #fde68a; background: rgba(253, 230, 138, .1); }
.acct-lines .acct-remove { justify-self: start; margin-top: 4px; }

/* the account */
.acct-link { border: 0; padding: 2px; background: none; color: var(--muted); font: 500 0.88rem var(--body); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; }
.acct-link.danger:hover { color: #fca5a5; }
.acct-danger { margin-top: 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(248, 113, 113, .4); background: rgba(248, 113, 113, .06); }
.acct-danger p { margin: 0; color: #fecaca; font-size: 0.9rem; line-height: 1.5; }
.acct-delete { color: #fff; background: #dc2626; border-color: #dc2626; }
.acct-delete:hover { background: #b91c1c; }
.acct-danger[hidden], .acct-link[hidden] { display: none; }

@media (max-width: 900px) {
  .acct-grid { grid-template-columns: minmax(0, 1fr); }
  .acct-side { position: static; }
  .acct-points { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .acct-card { padding: 16px; }
  .acct-face { align-items: flex-start; }
  .acct-face dl, .acct-facts { grid-template-columns: minmax(0, 1fr); }
  .acct-preview iframe { height: 420px; }
}
