/* InFrame · shared styles (from Magali 03) */
:root {
  --bg: #F7F6F2;
  --card: #FFFFFF;
  --ink: #1A1B1F;
  --ink2: #3E4250;
  --muted: #5C6070;
  --line: #E4E1D9;
  --soft: #F1EFE9;
  --tabs: #ECEAE4;
  --err: #B42318;
  --ok: #15803D;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); }
a:hover { color: #000; }
input, button { font: inherit; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); height: 6px; }
.strip i:nth-child(1) { background: #FF7A59; } .strip i:nth-child(2) { background: #3D7BFF; }
.strip i:nth-child(3) { background: #14B8A6; } .strip i:nth-child(4) { background: #FFC233; }
.strip i:nth-child(5) { background: #8B5CF6; } .strip i:nth-child(6) { background: #EC4899; }

.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px max(24px, env(safe-area-inset-right)) 20px max(24px, env(safe-area-inset-left)); }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 20px; text-decoration: none; }
.top nav { display: flex; gap: 8px; }

.page { max-width: 440px; margin: 0 auto; padding: 32px 24px 64px; display: flex; flex-direction: column; gap: 24px; }
h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 40px; letter-spacing: -0.03em; line-height: 1.05; text-wrap: balance; }
.lede { margin: 0; font-size: 16px; color: var(--ink2); }
.head { display: flex; flex-direction: column; gap: 8px; }

.stack { display: flex; flex-direction: column; gap: 14px; }
/* Same height on Create account and Log in, so the page doesn't jump between tabs */
.flow { min-height: 310px; }
.flow .head { margin-bottom: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: 14px; font-weight: 600; }
.field .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.input { height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 0 14px; font-size: 16px; width: 100%; }
.input:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.input[aria-invalid="true"] { border-color: var(--err); }
/* Chrome's auto-fill: keep our font, size and white box instead of its own */
.input:-webkit-autofill, .input:-webkit-autofill:hover, .input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink); -webkit-box-shadow: 0 0 0 1000px var(--card) inset; box-shadow: 0 0 0 1000px var(--card) inset;
  caret-color: var(--ink); transition: background-color 9999s ease-out 0s;
}
.input:-webkit-autofill::first-line { font-family: var(--body); font-size: 16px; }
.input.code { height: 56px; font-size: 24px; letter-spacing: 0.4em; text-align: center; }
.fixed { display: flex; align-items: center; min-height: 48px; padding: 0 14px; border-radius: 12px; background: var(--soft); overflow-wrap: anywhere; }
.hint { font-size: 12px; color: var(--muted); }
.note { font-size: 13px; color: var(--muted); }
.error { font-size: 13px; font-weight: 600; color: var(--err); }
.okmsg { font-size: 14px; font-weight: 600; color: var(--ok); }

.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 52px; border-radius: 14px; border: 0; background: var(--ink); color: #fff; font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { color: #fff; background: #000; }
.btn:focus-visible, .link:focus-visible, .tab:focus-visible { outline: 2px solid #3D7BFF; outline-offset: 2px; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); height: 40px; width: auto; padding: 0 16px; font-size: 14px; border-radius: 999px; }
.btn.ghost:hover { background: var(--soft); color: var(--ink); }
.links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; }
.link { padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; }
.link.quiet { color: var(--ink2); font-weight: 400; text-decoration: underline; }
.link:hover { text-decoration: underline; }

.tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: var(--tabs); }
.tab { display: flex; align-items: center; justify-content: center; height: 44px; border-radius: 10px; font-size: 15px; font-weight: 600; text-decoration: none; }
.tab[aria-current="page"] { background: var(--card); }

.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.45; color: var(--ink2); cursor: pointer; }
.check input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--ink); }

.safe { display: flex; align-items: center; gap: 10px; margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink2); font-size: 14px; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.fade { animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fade, .spin { animation: none; } }

.pw { position: relative; }
.pw .input { padding-right: 52px; }
.eye { position: absolute; top: 0; right: 0; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 12px; }
.eye:hover { color: var(--ink); }
.eye:focus-visible { outline: 2px solid #3D7BFF; outline-offset: -4px; }
.eye .c { display: none; }
.eye[aria-pressed="true"] .o { display: none; }
.eye[aria-pressed="true"] .c { display: inline; }

/* Legal pages */
.legal { max-width: 720px; margin: 0 auto; padding: 16px 24px 80px; }
.legal h1 { font-size: 36px; margin-bottom: 8px; }
.legal h2 { font-family: var(--display); font-size: 20px; margin: 32px 0 8px; }
.legal p, .legal li { color: var(--ink2); }
.draft { padding: 10px 12px; border-radius: 10px; background: #FFF4D6; color: #5C4300; font-size: 14px; margin: 16px 0 0; }
@media (max-width: 480px) { h1 { font-size: 34px; } .page { padding-top: 16px; } }
