/* Sophy brand: obsidian glass.
   Every surface and control in the app is built from these tokens and classes, so new pages match the
   home screen, the chat and the side menu without restyling. The written guide is BRAND.md. */
/* Colour tokens. Every gold and violet in the app is one of these, named by its colour in the gold theme, so a
   theme is one table. The platinum table is the same set turned cool: chrome for the metal, pale cyan and sea green for the accents. */
:root{--c-0e0c13:14 12 19;--c-161019:22 16 25;--c-16130e:22 19 14;--c-18161d:24 22 29;--c-272019:39 32 25;--c-282231:40 34 49;--c-383043:56 48 67;--c-473154:71 49 84;--c-534362:83 67 98;--c-6a4fd0:106 79 208;--c-8772be:135 114 190;--c-967544:150 117 68;--c-a99b7e:169 155 126;--c-aaa28f:170 162 143;--c-b08a4c:176 138 76;--c-b4a27d:180 162 125;--c-b6a37a:182 163 122;--c-b98d47:185 141 71;--c-c4b596:196 181 150;--c-d0cbc1:208 203 193;--c-d3b988:211 185 136;--c-d4bb82:212 187 130;--c-d6b76b:214 183 107;--c-d6cfc3:214 207 195;--c-dac9a3:218 201 163;--c-dbd5cb:219 213 203;--c-dcc08a:220 192 138;--c-ddc99a:221 201 154;--c-e4dfd5:228 223 213;--c-e6c784:230 199 132;--c-e6d6ae:230 214 174;--c-e7d6ff:231 214 255;--c-e7d7ff:231 215 255;--c-e8cb8c:232 203 140;--c-e9d9b3:233 217 179;--c-e9e6de:233 230 222;--c-f1ead9:241 234 217;--c-f1ede4:241 237 228;--c-f3dfae:243 223 174;--c-f3e3bb:243 227 187;--c-f3e7c9:243 231 201;--c-f4dfab:244 223 171;--c-f6e2ad:246 226 173;--c-f7eed8:247 238 216;--c-fff0c9:255 240 201;--c-fff1cc:255 241 204;--c-fff8e6:255 248 230}
:root[data-theme="platinum"]{--c-0e0c13:15 16 16;--c-161019:20 21 21;--c-16130e:21 22 23;--c-18161d:25 26 26;--c-272019:35 37 38;--c-282231:40 42 43;--c-383043:56 58 59;--c-473154:64 67 69;--c-534362:80 83 85;--c-6a4fd0:150 162 172;--c-8772be:147 153 157;--c-967544:106 116 124;--c-a99b7e:150 155 158;--c-aaa28f:161 164 166;--c-b08a4c:123 134 142;--c-b4a27d:154 160 165;--c-b6a37a:153 160 164;--c-b98d47:141 153 164;--c-c4b596:176 181 184;--c-d0cbc1:207 209 210;--c-d3b988:174 182 188;--c-d4bb82:223 229 234;--c-d6b76b:214 222 228;--c-d6cfc3:211 213 214;--c-dac9a3:193 199 203;--c-dbd5cb:218 219 220;--c-dcc08a:179 188 194;--c-ddc99a:189 196 201;--c-e4dfd5:228 229 230;--c-e6c784:180 190 197;--c-e6d6ae:205 211 215;--c-e7d6ff:233 235 236;--c-e7d7ff:234 235 236;--c-e8cb8c:185 195 202;--c-e9d9b3:209 215 218;--c-e9e6de:235 236 237;--c-f1ead9:236 238 239;--c-f1ede4:242 243 244;--c-f3dfae:211 217 222;--c-f3e3bb:255 255 255;--c-f3e7c9:227 231 233;--c-f4dfab:210 216 221;--c-f6e2ad:212 218 223;--c-f7eed8:238 240 242;--c-fff0c9:234 237 239;--c-fff1cc:236 238 240;--c-fff8e6:251 251 252;
  --cream:#e4e9ee;--text:#eef3f7;--text-soft:#a9b4be;--muted:#8a96a1;--aspect-blue:#cfd8df;--aspect-rose:#7d8a96;
  --metal:linear-gradient(180deg,#ffffff 10%,#f1f7fb 30%,#a7b5c0 48%,#5b6a77 53%,#e4ecf2 58%,#bcc8d1 80%,#6c7a87 98%);
  --metal-text:linear-gradient(180deg,#ffffff 18%,#eef3f7 44%,#c3ced7 70%,#93a1ad 96%)}
:root{
  /* Colour */
  --black:#000;--ink:#09090c;--obsidian:#050507;
  --cream:rgb(var(--c-e9e6de));--text:rgb(var(--c-f1ede4));--text-soft:#b8b1a6;--muted:#9c968c;
  --gold:rgb(var(--c-d4bb82));--gold-bright:rgb(var(--c-f3e3bb));--gold-deep:rgb(var(--c-b98d47));--violet:rgb(var(--c-6a4fd0));
  --aspect-gold:rgb(var(--c-d6b76b));--aspect-blue:#7ea7c7;--aspect-rose:#be7a8a;--danger:#dba997;
  --line:rgb(var(--c-d4bb82)/0.11);--hairline:#ffffff0b;
  /* Glass fills */
  --glass-clear:linear-gradient(155deg,#ffffff14,#ffffff05 42%,#ffffff03 70%,#ffffff0d);
  --glass-gold:linear-gradient(155deg,rgb(var(--c-f4dfab)/0.11),#ffffff05 55%,rgb(var(--c-f4dfab)/0.051));
  --glass-card:linear-gradient(150deg,#ffffff0f,#ffffff05);
  --glass-obsidian:linear-gradient(150deg,#141317e0,#050507f0);
  --glass-sheet:linear-gradient(160deg,#ffffff14,#0000003d 30%,#00000061);
  --glass-field:#ffffff0a;
  /* Glass edges, highlights and shadows */
  --edge:#ffffff24;--edge-soft:#ffffff17;--edge-gold:rgb(var(--c-d4bb82)/0.251);
  --shine:inset 0 1px 0 #ffffff4d,inset 1px 0 0 #ffffff14,inset 0 -1px 0 #ffffff12;
  --shine-soft:inset 0 1px 0 #ffffff21;
  --shine-sheet:inset 0 1px 0 #ffffff66,inset 1px 0 0 #ffffff24,inset 0 -1px 0 #ffffff1a;
  --shadow-float:0 10px 28px #0000004d;--shadow-deep:0 14px 36px #00000066;--shadow-sheet:0 26px 70px #000000b3;
  /* Blur: clear glass keeps the scene visible, obsidian darkens it, sheets soften it. */
  --blur-clear:blur(6px) saturate(1.7) brightness(1.06);
  --blur-obsidian:blur(22px) saturate(1.2) brightness(.6);
  --blur-sheet:blur(6px) saturate(1.5) brightness(.95);
  --blur-panel:blur(30px) saturate(1.3);
  /* Champagne metal: the finish shared by the app icon, the mark and the wordmark. */
  --metal:linear-gradient(180deg,rgb(var(--c-fff8e6)) 16%,rgb(var(--c-f3dfae)) 36%,rgb(var(--c-dcc08a)) 62%,rgb(var(--c-b08a4c)) 94%);
  /* The wordmark's lettering wears a paler cut of the same metal: mostly cream, warming to gold only at the foot. */
  --metal-text:linear-gradient(180deg,#fffdf7 20%,rgb(var(--c-f7eed8)) 46%,rgb(var(--c-e9d9b3)) 72%,rgb(var(--c-d3b988)) 96%);
  --metal-depth:drop-shadow(0 1.4px 1.6px #000000b8);
  /* Shape and type */
  --radius-field:16px;--radius-card:22px;--radius-pill:27px;--radius-sheet:34px;
  --font-display:Manrope,sans-serif;--font-body:DM,Arial,sans-serif;
}

/* Surfaces */
.glass{border:1px solid var(--edge);background:var(--glass-clear);box-shadow:var(--shine),var(--shadow-float);backdrop-filter:var(--blur-clear);-webkit-backdrop-filter:var(--blur-clear)}
.glass-gold{border:1px solid var(--edge-gold);background:var(--glass-gold);box-shadow:var(--shine),var(--shadow-float);backdrop-filter:var(--blur-clear);-webkit-backdrop-filter:var(--blur-clear)}
.glass-obsidian{border:1px solid #ffffff14;background:var(--glass-obsidian);box-shadow:inset 0 1px 0 #ffffff12,0 10px 34px #000000a0;backdrop-filter:var(--blur-obsidian);-webkit-backdrop-filter:var(--blur-obsidian)}
.glass-card{border:1px solid var(--edge-soft);border-radius:var(--radius-card);background:var(--glass-card);box-shadow:var(--shine-soft),var(--shadow-deep)}
.stack{display:grid;gap:12px;padding:24px}

/* Controls */
.primary,.secondary{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:44px;padding:0 24px;border-radius:var(--radius-pill);font:500 14px var(--font-body);text-decoration:none;margin:0;transition:filter .15s,background .15s}
/* The main button is black obsidian with a glass rim. Gold is kept for the mark, never for buttons. */
.primary{color:var(--text);background:linear-gradient(104deg,#ffffff00 16%,#ffffff17 31%,#ffffff00 47%),linear-gradient(180deg,#2c2c33 0%,#111114 34%,#030304 100%);border:1px solid #000;border-radius:10px;box-shadow:inset 0 1px 0 #ffffff66,inset 0 -2px 0 #000000e6,inset 1px 0 0 #ffffff1a,inset -1px 0 0 #ffffff1a,0 2px 0 #000,0 4px 10px #00000073;transition:transform .06s,box-shadow .06s,filter .15s}
.secondary{border-radius:10px}.primary:active{transform:translateY(2px);box-shadow:inset 0 1px 0 #ffffff24,inset 0 -1px 0 #000000d9,0 0 0 #000}
.primary:hover{filter:brightness(1.3)}.primary:disabled,.secondary:disabled{opacity:.55}
.secondary{color:var(--text);border:1px solid var(--edge);background:var(--glass-clear);box-shadow:var(--shine)}
.secondary:hover{background:#ffffff14}
.wide{width:100%}
.eyebrow{font:500 10px var(--font-display);letter-spacing:1.5px;text-transform:uppercase;color:var(--muted)}
.form-field{display:grid;gap:8px;margin:0;font-size:13px;color:var(--text-soft)}
.form-field input{width:100%;min-width:0;min-height:52px;padding:0 16px;border:1px solid var(--edge-soft);border-radius:var(--radius-field);background:var(--glass-field);box-shadow:inset 0 1px 6px #00000059;color:var(--cream);font:16px var(--font-body);outline:none;transition:border-color .15s}
.form-field input::placeholder{color:#6f6b65}.form-field input:focus{border-color:rgb(var(--c-d4bb82)/0.451)}
/* Google's standard light button: white, grey outline, the four-colour G. Its colours are Google's, not ours. */
.google-button{color:#1f1f1f;background:#fff;border:1px solid #747775;box-shadow:none;text-shadow:none;font:500 14px/20px Roboto,system-ui,-apple-system,'Segoe UI',Arial,sans-serif}.google-button:hover{background:#f6f6f6}/* The G keeps Google's four flat colours: no outline from the app's icon stroke. */
.google-g{width:20px;height:20px;flex-shrink:0;stroke:none;stroke-width:0}

/* Liquid glass: Apple's clear material in black. Very transparent, a light blur so the scene stays readable through it,
   a brighter, more bent band of light just inside the edge, and a hairline specular rim that is strongest at the
   top-left and bottom-right. Built from layers because true edge refraction is not available in every browser. */
.liquid{position:relative;isolation:isolate;border:0;border-radius:var(--radius-sheet);background:linear-gradient(165deg,#ffffff0f,#00000059 26%,#0000007a);
  backdrop-filter:blur(3.5px) saturate(1.3) brightness(.9);-webkit-backdrop-filter:blur(3.5px) saturate(1.3) brightness(.9);
  box-shadow:inset 0 1px 0 #ffffff30,inset 0 0 12px #ffffff08,0 30px 80px #0000008c}
.liquid::before,.liquid::after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:-1;
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0)}
/* the lens: a band inside the edge where the scene is bent brighter and softer */
.liquid::before{padding:4px;backdrop-filter:blur(8px) brightness(1.35) saturate(1.6);-webkit-backdrop-filter:blur(8px) brightness(1.35) saturate(1.6);opacity:.6}
/* the specular rim */
.liquid::after{padding:0;z-index:1;background:linear-gradient(135deg,#ffffffd9,#ffffff33 22%,#ffffff0d 50%,#ffffff2b 78%,#ffffffa6)}

/* Layout law (ui-grid skill). The spacing scale every margin, padding and gap uses, and the one master grid that sets
   outer width and margins: 4 columns on phones, 8 from 640px, 12 from 1024px. Views only choose columns. */
:root{
  --space-1:.25rem;--space-2:.5rem;--space-3:.75rem;--space-4:1rem;--space-6:1.5rem;--space-8:2rem;--space-12:3rem;--space-16:4rem;--space-24:6rem;--space-32:8rem;
  --margin:clamp(1rem,.5rem + 2.5vw,4rem);--cols:4;--gutter:var(--space-4);--max:90rem;--measure:65ch;
}
@media (width >= 40rem){:root{--cols:8;--gutter:var(--space-6)}}
@media (width >= 64rem){:root{--cols:12;--gutter:var(--space-6)}}
.page-grid{
  --m:max(var(--margin),env(safe-area-inset-left),env(safe-area-inset-right));
  --col:calc((var(--max) - (var(--cols) - 1) * var(--gutter)) / var(--cols));
  display:grid;column-gap:var(--gutter);
  grid-template-columns:[full-start] minmax(max(0px,var(--m) - var(--gutter)),1fr) [content-start] repeat(var(--cols),[col-start] minmax(0,var(--col))) [content-end] minmax(max(0px,var(--m) - var(--gutter)),1fr) [full-end];
}
.page-grid>*{grid-column:content;min-width:0}
.page-grid>.full{grid-column:full}
