/* Account, sign-in and consent pages, after styles.css. Turn 8 of the Conclave design: "The account page on the web". */

/* ---- Header ---- */
.site-nav .nav-guide { padding-bottom: 3px; border-bottom: 1px solid var(--dashed); }

/* ---- Account: head ---- */
.account-page { padding-top: 52px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 34px; }
.account-message:empty { display: none; }
.account-message { padding: 14px 18px; border: 1px solid var(--plum); border-left-width: 4px; font-size: 16px; line-height: 1.5; color: var(--body); }
.account-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 32px; flex-wrap: wrap; }
.account-head .who { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.account-head h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.04; letter-spacing: -.01em; }
.account-head .identity { min-height: 1.5em; font-family: var(--mono); font-size: 13px; letter-spacing: .01em; color: var(--muted); overflow-wrap: anywhere; }
.stats { margin: 0; padding-bottom: 6px; display: flex; gap: 40px; }
.stats div { display: flex; flex-direction: column; gap: 4px; }
.stats dt { font-family: var(--display); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.stats dd { margin: 0; font-size: 34px; line-height: 1; }

/* ---- Account: the connector hand-off, the reason the page exists ---- */
.handoff { padding: 38px 40px; background: var(--ink); color: var(--on-ink); display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.handoff .pitch { display: flex; flex-direction: column; gap: 16px; }
.handoff h2 { font-size: 33px; line-height: 1.1; text-wrap: balance; }
.handoff .pitch p { font-size: 18px; line-height: 1.45; color: var(--on-ink-muted); text-wrap: pretty; }
.handoff .connect { align-self: flex-start; margin-top: 6px; padding: 14px 24px; background: var(--on-ink); border-color: var(--on-ink); color: var(--ink); font-weight: 600; }
.handoff .connect:hover { background: var(--plum-light); border-color: var(--plum-light); color: var(--ink); }
.handoff .server { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.handoff .server-label { font-family: var(--display); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: oklch(65% 0.02 60); }
.handoff .server p { font-size: 15px; font-style: italic; line-height: 1.45; color: oklch(68% 0.02 60); text-wrap: pretty; }
.handoff :focus-visible { outline: 2px solid var(--plum-light); outline-offset: 2px; }
.copy-field { display: flex; align-items: stretch; border: 1px solid var(--on-ink-border); }
.copy-field span { flex: 1; min-width: 0; padding: 14px 16px; font-family: var(--mono); font-size: 14px; color: oklch(88% 0.01 80); overflow-wrap: anywhere; }
.copy-field button { padding: 0 20px; border: 0; border-left: 1px solid var(--on-ink-border); background: transparent; color: inherit; font-family: var(--display); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; cursor: pointer; }
.copy-field button:hover { background: oklch(28% 0.02 60); }

/* ---- Account: saved conversations ---- */
.account-body { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 40px; align-items: start; }
.conversations { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.list-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.list-head h2 { font-size: 26px; }
.list-order, .filter-toggle { font-family: var(--display); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.filter-toggle { display: none; padding: 0; border: 0; background: none; cursor: pointer; }
.list-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: var(--card); border: 1px solid var(--hairline); color: var(--muted); }
.search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-family: var(--serif); font-size: 17px; color: var(--ink); }
.search input::placeholder { color: var(--muted); }
.filters { display: flex; gap: 12px; flex-wrap: wrap; }
.chip { padding: 11px 16px; border: 1px solid var(--hairline); background: transparent; color: var(--muted); font-family: var(--display); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; cursor: pointer; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--on-ink); }
.list-empty { padding: 52px 32px; border: 1px dashed var(--dashed); text-align: center; font-size: 18px; font-style: italic; color: var(--muted); text-wrap: pretty; }
.conversation-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 18px; transition: opacity .2s; }
.conversation-list[aria-busy="true"] { opacity: .6; }

.conversation { background: var(--card); border: 1px solid var(--hairline-card); border-left: 3px solid var(--hairline); }
.conversation.summarized { border-left-color: var(--plum); }
.conversation .row { padding: 22px 24px; display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.conversation .info { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.title-line { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.conversation h3 { font-size: 23px; line-height: 1.2; }
.tag { padding: 3px 7px; border: 1px solid var(--hairline); color: var(--muted); font-family: var(--display); font-size: 10px; line-height: 1.4; letter-spacing: .16em; text-transform: uppercase; }
.conversation.summarized .tag { border-color: var(--plum-light); color: var(--plum); }
.conversation .when { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.conversation .people { font-size: 16px; font-style: italic; color: oklch(40% 0.02 60); }
.excerpt { margin: 4px 0 0; padding-left: 14px; border-left: 2px solid var(--plum-light); font-size: 17px; line-height: 1.45; color: oklch(32% 0.02 60); text-wrap: pretty; overflow-wrap: anywhere; }
.card-note:empty { display: none; }
.card-note { font-size: 15px; font-style: italic; color: var(--plum); }
.actions { flex-shrink: 0; width: 176px; display: flex; flex-direction: column; gap: 8px; }
.act { padding: 10px 14px; border: 1px solid var(--ink); background: transparent; color: var(--ink); font-family: var(--display); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; text-align: center; cursor: pointer; }
.act:hover { background: oklch(88% 0.01 80); }
.act.primary { background: var(--ink); color: var(--on-ink); }
.act.primary:hover { background: var(--plum); border-color: var(--plum); }
.act.quiet { border-color: transparent; color: var(--muted); }
.act.quiet:hover { background: transparent; color: oklch(40% 0.16 25); }
.act:disabled, .chip:disabled, .revoke:disabled, .more-turns:disabled { opacity: .55; cursor: progress; }

.reader { padding: 24px; display: flex; flex-direction: column; gap: 18px; border-top: 1px solid oklch(86% 0.01 80); background: oklch(94% 0.007 80); }
.views { display: flex; gap: 18px; }
.views button { padding: 0 0 4px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--ink); font-family: var(--display); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; cursor: pointer; }
.views button[aria-pressed="true"] { border-bottom-color: var(--ink); }
.transcript-view { max-width: 660px; display: flex; flex-direction: column; gap: 16px; }
.turns { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; }
.turn { display: grid; grid-template-columns: 138px minmax(0, 1fr); gap: 18px; align-items: baseline; }
.turn .who { text-align: right; font-family: var(--display); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.turn.you .who { color: var(--muted); }
.turn time { display: block; margin-top: 3px; font-family: var(--mono); font-size: 11px; letter-spacing: 0; text-transform: none; color: oklch(55% 0.02 60); }
.turn p { font-size: 17px; line-height: 1.5; color: oklch(28% 0.02 60); white-space: pre-wrap; overflow-wrap: anywhere; text-wrap: pretty; }
.turn-empty { font-style: italic; color: var(--muted); }
.more-turns { align-self: flex-start; margin-left: 156px; padding: 0 0 3px; border: 0; border-bottom: 1px solid var(--plum-light); background: none; color: var(--plum); font-family: var(--display); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; cursor: pointer; }
.summary-text { max-width: 640px; font-size: 18px; line-height: 1.55; color: oklch(28% 0.02 60); white-space: pre-wrap; text-wrap: pretty; }
.list-foot { padding-top: 6px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.list-foot .btn { padding: 13px 22px; font-size: 11px; }
.list-foot .btn:hover { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.list-foot .meta { margin-left: auto; }

/* ---- Account: panels ---- */
.panels { display: flex; flex-direction: column; gap: 22px; }
.panel { padding: 24px; display: flex; flex-direction: column; gap: 14px; background: var(--card); border: 1px solid var(--hairline-card); }
.panel.plain { padding: 22px 24px; gap: 10px; background: transparent; }
.panel h2 { font-family: var(--display); font-size: 11px; line-height: 1.5; letter-spacing: .2em; text-transform: uppercase; }
.panel.plain h2 { color: var(--muted); }
.panel-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.panel-copy { min-height: 1.45em; font-size: 17px; line-height: 1.45; color: var(--body); text-wrap: pretty; }
.panel-note { font-size: 15px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.panel .divided { padding-top: 16px; border-top: 1px solid var(--hairline-row); }
.panel-link { align-self: flex-start; font-family: var(--display); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--plum); }
.panel-link:hover { color: var(--ink); }
.switch { position: relative; flex-shrink: 0; width: 52px; height: 28px; padding: 0; border: 0; border-radius: 14px; background: oklch(80% 0.01 80); cursor: pointer; transition: background .18s; }
.switch[aria-checked="true"] { background: var(--plum); }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--card); transition: left .18s; }
.switch[aria-checked="true"] .knob { left: 27px; }
.switch:disabled { opacity: .6; cursor: progress; }
.switch:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.apps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; }
.apps:empty { display: none; }
.apps li { padding-bottom: 16px; display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; border-bottom: 1px solid var(--hairline-row); }
.app { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.app-name { font-size: 19px; }
.app-callback { font-family: var(--mono); font-size: 11px; color: oklch(48% 0.02 60); overflow-wrap: anywhere; }
.app-since { font-size: 14px; font-style: italic; color: oklch(48% 0.02 60); }
.revoke { padding: 4px 0 0; border: 0; background: none; color: var(--muted); font-family: var(--display); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; cursor: pointer; }
.revoke:hover { color: oklch(40% 0.16 25); }
.plan-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; min-height: 1.5em; }
.plan-line span:first-child { font-size: 19px; }
.plan-line .mono { color: var(--muted); }
.meter { position: relative; height: 5px; background: var(--hairline-row); }
.meter span { position: absolute; top: 0; bottom: 0; left: 0; width: 0; background: var(--plum); }
.account-closing { padding-top: 26px; border-top: 1px solid var(--hairline); font-size: 15px; font-style: italic; color: var(--muted); text-wrap: pretty; }

/* ---- Sign in and consent ---- */
.sign-page { padding-top: 52px; padding-bottom: 96px; }
.sign-column { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.sign-column h1 { font-size: clamp(30px, 5vw, 38px); line-height: 1.08; text-wrap: balance; }
.sign-column p { font-size: 18px; line-height: 1.45; color: var(--text); text-wrap: pretty; }
.sign-column .sign-account { font-family: var(--mono); font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.sign-column .sign-note { margin-top: -8px; font-size: 15px; color: var(--muted); }
.sign-column .sign-fine { font-size: 15px; font-style: italic; color: var(--muted); text-align: center; }
.sign-column .btn.apple { margin-top: 4px; border-radius: 0; }
.callback { padding: 14px 16px; background: var(--card); border: 1px solid var(--hairline-card); font-family: var(--mono); font-size: 12px; color: oklch(42% 0.02 60); overflow-wrap: anywhere; }
.sign-actions { margin-top: 4px; display: flex; flex-direction: column; gap: 10px; }
.sign-message:empty { display: none; }
.sign-column .sign-message, .sign-page > .sign-message { padding: 14px 18px; border: 1px solid var(--plum); border-left-width: 4px; font-size: 16px; line-height: 1.5; color: var(--body); }
.sign-page > .sign-message { max-width: 520px; margin: 0 auto 20px; }
.reviewer { padding-top: 16px; border-top: 1px solid var(--hairline); }
.reviewer summary { font-family: var(--display); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.reviewer form { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.reviewer form p { font-size: 15px; }
.reviewer label { display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--muted); }
.reviewer input { padding: 11px 14px; border: 1px solid var(--hairline); background: var(--card); color: var(--ink); font-family: var(--serif); font-size: 17px; }
.reviewer input:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.reviewer .btn { align-self: flex-start; }

/* ---- Confirmation dialog ---- */
dialog.modal { width: min(480px, calc(100vw - 32px)); max-width: none; padding: 0; border: 0; background: transparent; }
dialog.modal::backdrop { background: oklch(20% 0.01 60 / .55); }
.dialog-sheet { position: relative; padding: 40px; display: flex; flex-direction: column; gap: 18px; background: var(--card); box-shadow: 0 40px 90px oklch(10% 0.01 60 / .45); }
.dialog-sheet::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--plum); }
.dialog-sheet h2 { font-size: 30px; line-height: 1.1; text-wrap: balance; }
.dialog-sheet p { font-size: 17px; line-height: 1.5; color: var(--lede); text-wrap: pretty; }
.dialog-actions { margin-top: 6px; display: flex; flex-direction: column; gap: 10px; }
.btn.primary.danger { background: var(--plum); border-color: var(--plum); color: var(--on-plum); }
.btn.primary.danger:hover { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }

@media (prefers-reduced-motion: reduce) {
  .switch, .switch .knob, .conversation-list { transition: none; }
}

@media (max-width: 1000px) {
  .account-body { grid-template-columns: minmax(0, 1fr); }
  .handoff { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

/* Narrow screens: the list stacks and the hand-off stays first. */
@media (max-width: 600px) {
  .site-nav .nav-secondary { display: none; }
  .account-page { padding-top: 28px; padding-bottom: 64px; gap: 24px; }
  .stats { gap: 24px; }
  .stats dd { font-size: 26px; }
  .handoff { padding: 24px 20px; display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
  .handoff .pitch, .handoff .server { display: contents; }
  .handoff .pitch p, .handoff .server p, .handoff .server-label { display: none; }
  .handoff h2 { font-size: 23px; line-height: 1.14; }
  .handoff .connect { order: 1; margin-top: 4px; padding: 12px 18px; font-size: 11px; }
  .copy-field span { padding: 11px 13px; font-size: 12px; }
  .list-head h2 { font-size: 21px; }
  .list-order { display: none; }
  .filter-toggle { display: inline-block; }
  .list-tools { display: none; }
  .conversations.filters-open .list-tools { display: flex; }
  .list-empty { padding: 32px 20px; }
  .conversation .row { padding: 16px 18px; flex-direction: column; gap: 12px; }
  .conversation h3 { font-size: 20px; }
  .actions { width: auto; margin-top: 2px; flex-direction: row; flex-wrap: wrap; gap: 16px; }
  .act, .act.primary { padding: 0 0 2px; border: 0; border-bottom: 1px solid var(--dashed); background: none; color: var(--ink); font-size: 10px; }
  .act:hover, .act.primary:hover { background: none; border-color: var(--plum); color: var(--plum); }
  .act.quiet { border-bottom: 0; color: var(--muted); }
  .reader { padding: 18px; }
  .turn { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .turn .who { text-align: left; }
  .turn time { display: inline; margin: 0 0 0 10px; }
  .more-turns { margin-left: 0; }
  .sign-page { padding-top: 36px; padding-bottom: 64px; }
  .dialog-sheet { padding: 32px 24px; }
}
