/* The website's own pages outside the dashboards (service/pages.js, service/team-pages.js): sign-in and
   device approval, Settings and its rail, a team, sharing, the invite and "get Joule" steps. Loaded last. */

/* ---------- sign-in, device approval, short messages (pages.js) ---------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.auth .card { width: min(420px, 100%); padding: 28px 26px; gap: 14px; }
.auth h1 { font-size: 22px; margin: 0; }
.auth p { margin: 0; color: var(--ink-2); line-height: 1.5; }
.auth input { width: 100%; font-size: 16px; padding: 11px 12px; border-radius: calc(12px * var(--sq)); border: 1px solid var(--axis); background: var(--raised); }
.auth button { font-size: 15px; padding: 11px 14px; border-radius: calc(12px * var(--sq)); border: 0; background: var(--ink); color: var(--page); font-weight: 800; cursor: pointer; }
.auth button.ghost { background: var(--wash); color: var(--ink); }
.auth .code { font: 800 30px/1 ui-monospace, Menlo, monospace; letter-spacing: .08em; text-align: center; padding: 14px; border-radius: calc(14px * var(--sq)); background: var(--wash); }
.auth .brand { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 15px; }
.auth .small { font-size: 12px; color: var(--muted); }
.auth [hidden] { display: none !important; }
.auth .row { display: flex; gap: 8px; } .auth .row > * { flex: 1; }
.auth .err { color: var(--critical); font-weight: 700; font-size: 13px; }

/* ---------- Settings, team, sharing, invite (team-pages.js) ---------- */
.tp { max-width: 560px; margin: 0 auto; padding: 12px 16px 60px; display: flex; flex-direction: column; gap: 14px; }
.tp .top { display: flex; align-items: center; gap: 8px; font-weight: 900; }
.tp .top a { font-weight: 700; font-size: 13px; color: var(--ink-2); text-decoration: none; margin-left: 14px; }
.tp .top a:first-of-type { margin-left: auto; }
.tp h1 { font-size: 26px; margin: 6px 0 0; letter-spacing: -0.02em; }
.tp h2 { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 10px 0 0; }
.tp p { margin: 0; color: var(--ink-2); line-height: 1.5; }
.tp .card { padding: 16px; gap: 10px; }
.tp .muted, .tp small { color: var(--muted); }
.tp input[type=text] { width: 100%; font-size: 15px; padding: 10px 12px; border-radius: calc(12px * var(--sq)); border: 1px solid var(--axis); background: var(--raised); color: var(--ink); }
.tp .btn2 { font-size: 14px; padding: 10px 14px; border-radius: calc(12px * var(--sq)); border: 0; background: var(--ink); color: var(--page); font-weight: 800; cursor: pointer; text-decoration: none; display: inline-block; text-align: center; white-space: nowrap; }
.tp .btn2.ghost { background: var(--wash); color: var(--ink); }
.tp .btn2.destroy { background: none; color: var(--critical); box-shadow: inset 0 0 0 1.5px var(--critical); }
.tp .btn2.destroy.armed { background: var(--critical); color: #fff; box-shadow: none; }
.bar .signin-link { font-weight: 800; text-decoration: none; color: var(--ink); margin-right: 4px; }
/* Settings: a title (one primary action at most), cards of rows, a danger zone at the bottom */
.tp .head { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.tp .head h1 { flex: 1; min-width: 0; margin: 0; overflow-wrap: anywhere; }
.tp .srow { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--grid); }
.tp .card > .srow:first-child { border-top: 0; padding-top: 0; }
.tp .card > .srow:last-child { padding-bottom: 0; }
.tp .srow .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tp .srow .txt b { font-size: 14.5px; }
.tp .srow .txt .muted { font-size: 13px; line-height: 1.4; }
.tp .srow .txt .link { margin: 4px 0 2px; }
.tp .srow .txt .muted a { color: var(--ink-2); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.tp .srow .txt.mac-acct { flex-direction: row; align-items: center; gap: 12px; } /* This Mac: an account, its app's mark beside it */
.tp .srow .txt.mac-acct > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tp .srow .acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.tp .srow .acts input[type=text] { width: 220px; }
.tp label.srow { cursor: pointer; }
.tp .toggle { appearance: none; width: 40px; height: 24px; border-radius: calc(12px * var(--sq)); background: var(--axis); position: relative; cursor: pointer; flex: none; transition: background .15s; margin: 0; }
.tp .toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; corner-shape: round; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.tp .toggle:checked { background: var(--good); }
.tp .toggle:checked::after { transform: translateX(16px); }
.tp .nodata { color: var(--warn-ink, #9a6a00); font-weight: 700; }
.tp h2.dz { color: var(--critical); margin-top: 22px; }
.tp .danger-zone { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--critical) 35%, transparent); }
@media (max-width: 520px) { .tp .srow:not(label) { flex-wrap: wrap; } .tp .srow:not(label) .acts { width: 100%; justify-content: flex-start; } .tp .srow .acts input[type=text] { flex: 1; width: auto; min-width: 0; } }
.tp .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tp .row.end { justify-content: flex-end; }
.tp .grow { flex: 1; min-width: 0; }
.tp .err { color: var(--critical); font-weight: 700; font-size: 13px; min-height: 1em; }
.tp .badge { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--wash); }
.tp .badge.team { background: var(--tint-team); color: var(--good-text); }
.tp .link { font: 600 13px ui-monospace, Menlo, monospace; background: var(--wash); padding: 10px 12px; border-radius: calc(12px * var(--sq)); overflow-wrap: anywhere; }
.tp .switch { display: flex; gap: 10px; align-items: center; cursor: pointer; font-weight: 600; }
/* tap rows, as in the app */
.list { display: flex; flex-direction: column; gap: 8px; }
.pick { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 10px 14px; border: 0; border-radius: calc(18px * var(--sq)); background: var(--surface); box-shadow: var(--shadow); text-align: left; cursor: pointer; color: var(--ink); font: inherit; }
.pick .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pick b { font-size: 15px; font-weight: 800; }
.pick small { font-size: 12.5px; }
.pick:not(.on) { background: transparent; box-shadow: inset 0 0 0 1.5px var(--grid); }
.pick:not(.on) .txt, .pick:not(.on) .ico { opacity: .55; }
.pick[disabled] { opacity: .45; cursor: default; }
.ico { width: 32px; height: 32px; border-radius: calc(10px * var(--sq)); display: grid; place-items: center; color: #fff; font-weight: 800; flex: none; background: var(--axis); }
.ico.claude { background: var(--s2); } .ico.codex { background: var(--s1); } .ico.all { background: var(--ink); color: var(--page); }
.tick { width: 24px; height: 24px; border-radius: 50%; corner-shape: round; flex: none; box-shadow: inset 0 0 0 1.5px var(--axis); display: grid; place-items: center; }
.pick.on .tick { background: var(--ink); box-shadow: none; }
.pick.on .tick::after { content: ""; width: 9px; height: 5px; border: solid var(--page); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) translate(1px, -1px); }
.sees { font-size: 13px; color: var(--ink-2); }

/* Settings rail: the sections on the left, the page on the right */
.settings { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 18px; max-width: 900px; margin: 0 auto; padding: 0 16px; }
.settings .tp { margin: 0; padding-left: 0; padding-right: 0; max-width: none; }
.rail { display: flex; flex-direction: column; gap: 2px; padding-top: 18px; position: sticky; top: 60px; align-self: start; }
.rail h3 { margin: 0 0 6px; font-size: 20px; letter-spacing: -0.02em; }
.rail small { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 12px 0 4px 10px; }
.rail a { color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: 14px; padding: 8px 10px; border-radius: calc(10px * var(--sq)); }
.rail a:hover { background: var(--wash); }
.rail a.on { background: var(--ink); color: var(--page); }
.rail a .role { font-weight: 600; font-size: 11.5px; opacity: .7; margin-left: 4px; }
.rail a.new { color: var(--muted); }
@media (max-width: 720px) { .settings { grid-template-columns: 1fr; } .rail { position: static; flex-direction: row; flex-wrap: wrap; padding-top: 10px; } .rail h3, .rail small { display: none; } }

/* Get Joule / invite: numbered steps */
.tp .step[hidden] { display: none; }
.tp .step { display: flex; flex-direction: column; gap: 14px; }
.tp .big { font-size: 16px; padding: 14px 18px; }
.tp ol.how { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; line-height: 1.5; color: var(--ink-2); }
.tp .quiet { background: none; border: 0; color: var(--ink-2); font-family: inherit; font-size: 13px; font-weight: 600; text-decoration: underline; cursor: pointer; padding: 0; align-self: flex-start; }
.tp .who { font-size: 12.5px; color: var(--muted); }
.tp input[type=email] { width: 100%; font-size: 15px; padding: 12px; border-radius: calc(12px * var(--sq)); border: 1px solid var(--axis); background: var(--raised); color: var(--ink); }
