/* Colour tokens from the prototype (light and dark looks). Font: Figtree (Google Fonts), weights 400-800. */
body{margin:0}

[data-theme="light"]{--bg:#F3F3F6;--panel:#FFFFFF;--soft:#F5F5F8;--line:#E9E9EF;--line2:#F0F0F4;--line3:#D6D6DF;--ink:#15151C;--muted:#62626F;--primary:#7B61FF;--pill:#15151C;--footer:#15151C;--neutral-soft:#EEEEF3;--neutral-ink:#4A4A57;--pos:#5DB894;--pos-ink:#1D7A4C;--pos-soft:#E2F4EA;--neg-ink:#C3333B;--neg-soft:#FDECEC;--warn-ink:#985F00;--warn-soft:#FCF0DA;--info-ink:#2F59CF;--info-soft:#E9EEFD;--mag-ink:#9A2A84;--mag-soft:#F9E8F4;--teal-ink:#0D786E;--teal-soft:#E0F3F0;--org-ink:#B3510E;--org-soft:#FDEBDD;--c-inc:#5DB894;--c-exp:#E26D8D;--tip:#15151C}

[data-theme="dark"]{--bg:#0C0C10;--panel:#15151C;--soft:#1C1C25;--line:#262631;--line2:#21212B;--line3:#363642;--ink:#F2F2F6;--muted:#A2A2B3;--primary:#8B6CFF;--pill:#8B6CFF;--footer:#1C1C25;--neutral-soft:#262630;--neutral-ink:#CACAD7;--pos:#4CC38A;--pos-ink:#64D6A0;--pos-soft:rgba(100,214,160,0.14);--neg-ink:#FF8086;--neg-soft:rgba(255,128,134,0.15);--warn-ink:#F4BB63;--warn-soft:rgba(244,187,99,0.15);--info-ink:#93B2FF;--info-soft:rgba(147,178,255,0.15);--mag-ink:#EB8FD6;--mag-soft:rgba(235,143,214,0.15);--teal-ink:#62D3C5;--teal-soft:rgba(98,211,197,0.15);--org-ink:#FFA36B;--org-soft:rgba(255,163,107,0.15);--c-inc:#8B6CFF;--c-exp:#F59E42;--tip:#2A2A36}

a{color:var(--primary)}

input::placeholder,textarea::placeholder{color:var(--muted)}


/* --- accessible variants of the brand purple ----------------------------
 *
 * RAISED FOR THE OWNER. Section 11 asks for two things that conflict here:
 * the prototype's colours, and WCAG 2.2 AA contrast in both looks. Measured
 * against design/tokens.css:
 *
 *   white on --primary, light look   4.20:1   AA normal text needs 4.5:1
 *   white on --primary, dark look    3.69:1
 *   --primary link on --bg, light    3.80:1
 *
 * design/tokens.css is the owner's design and is manifest-protected, so it is
 * not touched. These derived shades keep the same hue and are used only where
 * normal-size text sits on or in the brand colour. --primary itself is still
 * used for the focus ring, which is a non-text control and needs 3:1.
 *
 * The owner decides whether to adopt these in the prototype or to accept the
 * prototype's values; recorded in docs/decisions.md.
 */
:root[data-theme="light"]{--primary-fill:#765DF5;--primary-text:#6F57E5}
:root[data-theme="dark"]{--primary-fill:#7A5FE0;--primary-text:var(--primary)}

/* --- shell ------------------------------------------------------------- */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:'Figtree',system-ui,-apple-system,Arial,sans-serif;
  background:var(--bg);
  color:var(--ink);
  -webkit-text-size-adjust:100%;
  /* Content clears the notch and the home indicator (section 11, Screen edges). */
  padding:env(safe-area-inset-top) env(safe-area-inset-right)
          env(safe-area-inset-bottom) env(safe-area-inset-left);
}
/* Full height without the viewport unit that is wrong on iPhone (section 11, Screen height). */
.page{min-height:100svh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;padding:24px 16px}
.card{width:100%;max-width:420px;background:var(--panel);border:1px solid var(--line);border-radius:24px;padding:28px 24px;display:flex;flex-direction:column;gap:20px}
.brand{display:flex;align-items:center;gap:12px}
.brand img{width:48px;height:48px;border-radius:15px}
.brand-name{font-size:20px;font-weight:800;letter-spacing:-0.02em}
.brand-sub{font-size:13px;color:var(--muted)}
h1{margin:0;font-size:26px;font-weight:800;letter-spacing:-0.02em;line-height:1.2}
p{margin:0;font-size:15px;line-height:1.5;color:var(--muted)}
label{font-size:14px;font-weight:600}
/* 16px or larger, or iPhone Safari zooms the page (section 11, Typing). */
input{font-family:inherit;font-size:16px;min-height:48px;padding:0 14px;border-radius:12px;border:1px solid var(--line3);background:var(--panel);color:var(--ink);width:100%}
input:focus-visible,button:focus-visible,a:focus-visible{outline:3px solid var(--primary);outline-offset:2px}
/* Apple's guideline, and R15: at least 44 by 44. */
.btn{font-family:inherit;min-height:48px;padding:0 20px;border-radius:14px;border:0;font-size:16px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none;width:100%}
.btn-primary{background:var(--primary-fill);color:#FFFFFF}
.btn-secondary{background:var(--soft);color:var(--ink);border:1px solid var(--line)}
.field{display:flex;flex-direction:column;gap:8px}
.note{font-size:13px;line-height:1.5;color:var(--muted)}
.look{display:inline-flex;padding:4px;border-radius:14px;background:var(--soft);border:1px solid var(--line);gap:3px}
.look button{font-family:inherit;min-height:44px;min-width:72px;padding:0 14px;border-radius:10px;border:0;background:transparent;color:var(--ink);font-size:14px;font-weight:600;cursor:pointer}
.look button[aria-pressed="true"]{background:var(--panel)}
.foot{font-size:12px;color:var(--muted);text-align:center;line-height:1.5}
