/* The account pages' one stylesheet: the desktop app's tokens (packages/app's style.css), the
   system font, light by default and dark when the system is. Every colour is a token on :root
   that the dark block redefines. No inline style anywhere: the policy forbids it. */
:root {
  --ground: #FFFFFF; --panel: #F5F5F7; --surface: #FFFFFF; --ink: #1D1D1F; --secondary: #5E5E66; --tone: rgba(29, 29, 31, 0.06);
  --line: rgba(29, 29, 31, 0.1); --edge: #84848C; --high: #B42318; --ok: #067647; --warn: #93370D; --on-ink: #FFFFFF;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #1C1C1E; --panel: #2C2C2E; --surface: #242426; --ink: #F5F5F7; --secondary: #A8A8B0; --tone: rgba(245, 245, 247, 0.08);
    --line: rgba(245, 245, 247, 0.12); --edge: #7C7C84; --high: #FFB4A6; --ok: #9EE2B0; --warn: #FFD08A; --on-ink: #1C1C1E;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 15px/1.47 -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
[hidden] { display: none !important; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--line); }
.top nav { display: flex; gap: 18px; flex-wrap: wrap; }
.top nav a { color: var(--secondary); text-decoration: none; }
.top nav a:hover { color: var(--ink); }
.brand { font-weight: 700; text-decoration: none; }

.main { max-width: 760px; margin: 0 auto; padding: 40px 16px 64px; display: flex; flex-direction: column; gap: 20px; }
.main.narrow { max-width: 480px; padding-top: 72px; }
.title { font-size: 30px; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.subtitle { color: var(--secondary); font-size: 17px; }
.quiet { color: var(--secondary); font-size: 13px; }
.error { color: var(--high); font-weight: 500; }
.error:empty { display: none; }
.ok { color: var(--ok); font-size: 13px; }
.warn { color: var(--warn); font-size: 13px; }
.mono { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
.callout { background: var(--panel); border-radius: 12px; padding: 10px 14px; }

.panel { background: var(--panel); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.panel h2 { font-size: 17px; }
.panel.danger h2 { color: var(--high); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span:first-child { font-weight: 500; }
input, select { min-height: 44px; padding: 0 12px; border: 1px solid var(--edge); border-radius: 10px; background: var(--surface); width: 100%; }
select { width: auto; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; font-weight: 500; cursor: pointer; text-decoration: none; }
.button.primary { background: var(--ink); color: var(--on-ink); min-height: 44px; font-weight: 600; }
.button.secondary { background: var(--tone); }
.button.secondary:hover { background: var(--line); }
.button:disabled { opacity: 0.4; cursor: default; }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 8px 12px; text-decoration: none; color: var(--secondary); border-bottom: 2px solid transparent; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }

.cards { display: flex; flex-direction: column; gap: 8px; }
.card { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.card-link { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.members { display: flex; flex-direction: column; }
.member { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.member strong { overflow-wrap: anywhere; }
.pill { background: var(--tone); border-radius: 999px; padding: 2px 10px; font-size: 13px; }
.ids { display: flex; flex-direction: column; gap: 4px; }
