/* George web chat · "Y Blue, quiet" theme. The header button cycles Light, Dark and Auto (time of day, the default); data-theme on <html> holds the result.
   Brand blue, teal and purple are darkened slightly so text on them meets WCAG AA (4.5:1 or better). */
:root {
  --bg: #f7f8fa; --surface: #ffffff; --surface-2: #eef1f4; --line: #dde2e8; --ink: #1c1f23; --ink-2: #555c66;
  --accent: #0067a0; --accent-ink: #ffffff; --accent-soft: #e3eff7;
  --t1: #0067a0; --t1-soft: #e3eff7; --t2: #00796b; --t2-soft: #e0f2ef; --t3: #6b2d8f; --t3-soft: #f1e9f6; --t4: #555c66; --t4-soft: #eef1f4;
  --hero: #eef3f8; --hero-ink: #12263a; --hero-ink-2: #44505d; --hero-line: #dde2e8;
  --link: #0067a0; --ok: #1b6e3e; --note: #8a3b00; --note-soft: #fff1e6; --err: #8a1f1f; --err-soft: #fdecec;
  --warn: #7a4b00; --warn-soft: #fff6e5; --focus: #0072ce; --shadow: 0 2px 10px rgba(20, 30, 45, .05);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #121417; --surface: #1b1e22; --surface-2: #24282d; --line: #343a41; --ink: #eceef1; --ink-2: #a9b0b9;
  --accent: #6cbaf0; --accent-ink: #08223a; --accent-soft: #15324a;
  --t1: #7cc4ff; --t1-soft: #15324a; --t2: #5fd3c0; --t2-soft: #123430; --t3: #d1a9ee; --t3-soft: #2e2140; --t4: #a9b0b9; --t4-soft: #24282d;
  --hero: #172331; --hero-ink: #eaf2fa; --hero-ink-2: #b2c0cf; --hero-line: #2a3a4b;
  --link: #7cc4ff; --ok: #79d39c; --note: #ffb98a; --note-soft: #3a2416; --err: #f2a7a7; --err-soft: #3a1a1a;
  --warn: #f3cf8a; --warn-soft: #3a2d12; --focus: #7cc4ff; --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }  /* no automatic text enlarging on phones */
body { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font); display: flex; flex-direction: column; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); color: var(--link); padding: 6px 10px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
.muted { color: var(--ink-2); }
.spacer { flex: 1; }
.link { border: 0; background: none; padding: 0; color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.btn { border: 0; border-radius: 12px; padding: 8px 18px; font-weight: 600; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.small { padding: 6px 14px; border-radius: 999px; font-size: 14px; }
.pill { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 12px; font-size: 13px; }
.pill:hover { border-color: var(--accent); }

/* Header */
.theme-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; width: 34px; height: 34px; display: grid; place-items: center; font-size: 16px; color: var(--ink-2); flex: none; }
.theme-btn:hover { border-color: var(--accent); color: var(--ink); }
.top { display: flex; align-items: center; gap: 14px; padding: 10px 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.mark { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: 17px; flex: none; }
.brand { font-weight: 700; font-size: 17px; }
.tabs { display: flex; gap: 4px; margin-left: 12px; }
.tabs button { border: 0; background: none; padding: 6px 12px; border-radius: 999px; font-size: 14px; color: var(--ink-2); }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.persona { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.persona select { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 3px 6px; font-size: 13px; }
.dev-tag { font-weight: 600; background: var(--warn-soft); color: var(--warn); border-radius: 999px; padding: 1px 8px; font-size: 12px; }
.account { position: relative; }
.account-btn { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 2px; border-radius: 999px; text-align: right; font-size: 14px; line-height: 1.25; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; display: grid; place-items: center; box-shadow: 0 0 0 1px var(--line); flex: none; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 30px rgba(0, 0, 0, .18); padding: 8px; z-index: 20; display: grid; gap: 2px; }
.menu.left { left: 0; right: auto; }
.menu button { border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 10px; font-size: 14px; display: flex; gap: 10px; align-items: center; }
.menu button:hover, .menu button[aria-checked="true"] { background: var(--surface-2); }
.menu button[aria-checked="true"]::after { content: "✓"; margin-left: auto; color: var(--accent); font-weight: 700; }
.menu-name { margin: 4px 10px 6px; font-weight: 600; overflow-wrap: anywhere; }
.banner { margin: 12px 24px 0; padding: 10px 14px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: 14px; }

main { flex: 1; overflow-y: auto; min-height: 0; }
main:focus { outline: none; }
.view { display: none; }
body[data-view="home"] [data-view-of="home"], body[data-view="chat"] [data-view-of="chat"], body[data-view="help"] [data-view-of="help"] { display: block; }

/* Skill tones (assigned per skill in app.js) */
.tone-1 { --c: var(--t1); --cs: var(--t1-soft); }
.tone-2 { --c: var(--t2); --cs: var(--t2-soft); }
.tone-3 { --c: var(--t3); --cs: var(--t3-soft); }
.tone-4 { --c: var(--t4); --cs: var(--t4-soft); }
.ic { width: 40px; height: 40px; border-radius: 12px; background: var(--cs, var(--accent-soft)); color: var(--c, var(--accent)); display: grid; place-items: center; font-weight: 800; font-size: 15px; flex: none; }

/* Home */
.hero { background: var(--hero); color: var(--hero-ink); padding: 40px 24px 70px; border-bottom: 1px solid var(--hero-line); }
.wrap { max-width: 960px; margin: 0 auto; }
.hero h1 { font-size: 32px; margin: 0 0 6px; letter-spacing: -.01em; line-height: 1.2; }
.hero p { margin: 0 0 22px; color: var(--hero-ink-2); max-width: 560px; }
.ask { display: flex; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 8px; box-shadow: 0 6px 20px rgba(0, 0, 0, .07); max-width: 720px; }
.ask input { flex: 1; border: 0; background: none; color: var(--ink); font-size: 16px; padding: 8px 10px; outline: none; min-width: 0; }
.ask:focus-within { box-shadow: 0 0 0 3px var(--focus), 0 6px 20px rgba(0, 0, 0, .07); }
.sign-in-box { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sign-in-box p { margin: 0; }
.sign-in-box .btn { padding: 10px 20px; }
.wrap2 { max-width: 960px; margin: -44px auto 0; padding: 0 24px 32px; }
.sect { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 12px; color: var(--hero-ink); font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.skill { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.skill h3 { margin: 0; font-size: 17px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.skill p { margin: 0; color: var(--ink-2); font-size: 14px; }
.skill ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.skill li button { width: 100%; text-align: left; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 7px 10px; font-size: 13.5px; }
.skill li button:hover { border-color: var(--accent); }
.skill .go { margin-top: auto; border: 1px solid var(--line); background: var(--surface); color: var(--accent); font-weight: 700; border-radius: 10px; padding: 9px; }
.skill .go:hover { border-color: var(--accent); }
.lock { font-size: 11px; font-weight: 700; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; }
.card-note { background: var(--surface); border: 1px dashed var(--line); border-radius: 18px; padding: 18px; margin: 0; grid-column: 1 / -1; }
.foot { margin-top: 24px; font-size: 12.5px; color: var(--ink-2); }

/* Conversation */
.chat { max-width: 800px; margin: 0 auto; padding: 18px 24px 8px; }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: -18px 0 18px; padding: 12px 0 10px; flex-wrap: wrap; position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
.scope { position: relative; }
.scopechip { display: inline-flex; gap: 6px; align-items: center; border-radius: 999px; padding: 3px 10px 3px 4px; font-weight: 600; background: var(--cs, var(--accent-soft)); color: var(--c, var(--accent)); }
.scopechip .ic, .menu .ic { width: 22px; height: 22px; border-radius: 50%; font-size: 10px; background: var(--c, var(--accent)); color: var(--surface); }
.empty { text-align: center; color: var(--ink); padding: 8vh 0 0; }
.empty p { margin: 0 0 6px; }
.empty .empty-title { font-weight: 700; font-size: 18px; }
.empty .muted { font-size: 13px; margin-top: 14px; }
.log { display: flex; flex-direction: column; }
.q { margin-left: auto; width: fit-content; max-width: 80%; background: var(--surface-2); padding: 10px 14px; border-radius: 18px 18px 4px 18px; margin-bottom: 18px; white-space: pre-wrap; overflow-wrap: anywhere; }
.a { margin-bottom: 26px; }
.a .who { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.a .who .mark { width: 26px; height: 26px; font-size: 13px; }
.body { overflow-wrap: anywhere; }
.body p { margin: 6px 0 10px; font-size: 15.5px; }
.body ul, .body ol { margin: 0 0 10px; padding-left: 22px; }
.body hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.source { background: var(--surface); border-left: 3px solid var(--accent); border-radius: 8px; padding: 8px 12px; margin: 6px 0 8px; font-size: 14px; white-space: pre-wrap; }
.approval { color: var(--ok); font-size: 12.5px; display: block; margin: -4px 0 10px; }
.cite, sup.c { font-size: 11px; font-weight: 700; color: var(--accent); vertical-align: super; line-height: 0; }
.cards { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.sc { flex: 0 0 260px; scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; font-size: 13.5px; color: var(--ink); text-decoration: none; display: block; }
a.sc:hover { border-color: var(--accent); }
.sc .n { font-size: 12px; font-weight: 700; color: var(--accent); }
.sc b { display: block; margin: 2px 0; overflow-wrap: anywhere; }
a.sc b { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.sc small { color: var(--ink-2); font-size: 12px; }
.sc small .ok { color: var(--ok); font-weight: 600; }
.tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; color: var(--ink-2); }
.tools button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; color: var(--ink-2); }
.a.notice .body { background: var(--note-soft); border-radius: 16px; padding: 12px 14px; }
.notice-label { display: block; color: var(--note); font-weight: 700; font-size: 13px; margin-bottom: 2px; }
.a.error .body { background: var(--err-soft); color: var(--err); border-radius: 16px; padding: 12px 14px; }
/* Waiting for an answer: four dots in George's skill colours rise and brighten in turn. */
.typing { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 4px 0; }
.typing span { width: 9px; height: 9px; border-radius: 50%; background: var(--t1); opacity: .5;
  animation: think 1.4s ease-in-out infinite; }
.typing span:nth-child(2) { background: var(--t2); animation-delay: .15s; }
.typing span:nth-child(3) { background: var(--t3); animation-delay: .3s; }
.typing span:nth-child(4) { background: var(--accent); animation-delay: .45s; }
@keyframes think { 0%, 60%, 100% { transform: translateY(0) scale(.9); opacity: .5; }
  30% { transform: translateY(-5px) scale(1.1); opacity: 1; } }

/* The newest answer arrives with a moving gradient outline and a soft glow, then settles to the normal style.
   JS adds .fresh to the latest answer only and removes it when the animation ends. */
.a { position: relative; }
.a.fresh { isolation: isolate; }  /* keeps the glow behind this answer's text, not behind the page */
.a.fresh::before, .a.fresh::after { content: ""; position: absolute; inset: -10px -14px; border-radius: 18px; pointer-events: none;
  background: linear-gradient(115deg, var(--t1), var(--t2), var(--t3), var(--accent), var(--t1)); background-size: 300% 100%; }
.a.fresh::before { padding: 2px;  /* the outline: the gradient shows only in a 2px ring */
  -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);
  animation: glow-move 1.8s linear, glow-out 2.2s ease-out forwards; }
.a.fresh::after { z-index: -1; filter: blur(14px); opacity: 0;  /* the glow behind it */
  animation: glow-move 1.8s linear, glow-soft 2.2s ease-out forwards; }
@keyframes glow-move { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@keyframes glow-out { 0% { opacity: 0; } 12% { opacity: 1; } 65% { opacity: 1; } 100% { opacity: 0; } }
@keyframes glow-soft { 0% { opacity: 0; } 15% { opacity: .22; } 60% { opacity: .18; } 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .typing span { animation: none; opacity: .7; transform: none; }
  .a.fresh::before, .a.fresh::after { display: none; }
  .hero-orb img, .hero-orb::before { animation: none !important; }
}

.composer { padding: 10px 24px 16px; display: none; }
.composer form { max-width: 752px; margin: 0 auto; display: flex; gap: 8px; align-items: flex-end; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 6px 6px 6px 18px; box-shadow: var(--shadow); }
.composer form:focus-within { border-color: var(--accent); }
.composer textarea { flex: 1; border: 0; background: none; resize: none; outline: none; padding: 8px 0; max-height: 180px; overflow-y: hidden; min-width: 0; }
.composer button { border: 0; background: var(--accent); color: var(--accent-ink); border-radius: 50%; width: 40px; height: 40px; flex: none; }
.composer p { max-width: 752px; margin: 6px auto 0; text-align: center; font-size: 12px; color: var(--ink-2); }

/* Help */
.help { max-width: 720px; margin: 0 auto; padding: 28px 24px 40px; }
.help h1 { font-size: 26px; margin: 0 0 8px; }
.help h2 { font-size: 17px; margin: 22px 0 4px; }
.help p { margin: 0 0 8px; color: var(--ink-2); }

.bottomnav { display: none; }

@media (max-width: 760px) {
  .top { padding: 8px 14px; gap: 10px; }
  .tabs, .account-btn .who, .wide-only { display: none; }
  .persona .dev-tag { display: none; }
  .hero { padding: 24px 16px 60px; }
  .hero h1 { font-size: 25px; }
  .wrap2 { padding: 0 14px 20px; }
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .skill { padding: 14px; }
  .skill li:nth-child(n+2) { display: none; }
  .chat { padding: 12px 14px 8px; }
  .crumb { margin-top: -12px; }
  .q { max-width: 90%; }
  .sc { flex-basis: 78%; }
  .composer { padding: 6px 10px 8px; }
  .composer p { display: none; }
  .bottomnav { display: flex; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .bottomnav button { flex: 1; border: 0; background: none; padding: 6px 0 8px; font-size: 11.5px; color: var(--ink-2); display: grid; justify-items: center; gap: 1px; }
  .bottomnav button span { font-size: 18px; line-height: 1.2; }
  .bottomnav button[aria-current="page"] { color: var(--accent); font-weight: 700; }
  .help { padding: 20px 16px 28px; }
  .banner { margin: 8px 12px 0; }
}
@media (min-width: 761px) and (max-width: 980px) { .grid { grid-template-columns: repeat(2, 1fr); } }

/* Answer formatting: headings, inline code, links */
.a .body h4.md-h { font-size: 15px; font-weight: 700; margin: 14px 0 4px; }
.a .body h4.md-h:first-child { margin-top: 0; }
.a .body code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; background: var(--surface-2, rgba(127,127,127,.12)); padding: 1px 5px; border-radius: 5px; }
.a .body a { color: var(--accent); text-decoration: underline; }

/* Icon buttons under each answer (copy, helpful, not helpful) */
.tools .icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); cursor: pointer; }
.tools .icon-btn:hover { background: var(--surface-2, rgba(127,127,127,.12)); color: var(--ink); }
.tools .icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tools .icon-btn.on { color: var(--accent); }
.tools .icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tools .searched { margin-left: 6px; }
.tools .thanks { color: var(--accent); }

/* ===== Wave look =====
   A second look people can switch to from the header (sparkle button): soft blue-violet waves, the orb logo,
   illustrated skill cards. Classic stays the default. Everything here is scoped to html[data-look="wave"];
   light/dark still comes from data-theme, so each look has both. */
.wave-only { display: none !important; }
:root[data-look="wave"] .classic-only { display: none !important; }
:root[data-look="wave"] .wave-only { display: revert !important; }
:root[data-look="wave"] .brand-sub.wave-only { display: block !important; }
:root[data-look="wave"] .art.wave-only { display: block !important; }
:root[data-look="wave"] .hero-orb.wave-only { display: block !important; }
.theme-btn svg { width: 17px; height: 17px; fill: currentColor; }
#theme-btn .tm { display: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; width: 19px; height: 19px; }
#theme-btn[data-mode="light"] .tm-light, #theme-btn[data-mode="dark"] .tm-dark, #theme-btn[data-mode="auto"] .tm-auto { display: block; }
.theme-btn[aria-pressed="true"] svg { color: var(--accent); }

:root[data-look="wave"] {
  --bg: #f4f6fc; --surface: #ffffff; --surface-2: #eef1fb; --line: #e0e5f3; --ink: #111a35; --ink-2: #4b5674;
  --accent: #0b5ea8; --accent-ink: #ffffff; --accent-soft: #e2edfa;
  --t1: #1f6fd1; --t1-soft: #e3eefc; --t2: #0b7f96; --t2-soft: #dff4f8; --t3: #7140c9; --t3-soft: #eee6fb; --t4: #4b5674; --t4-soft: #eef1fb;
  --link: #0b5ea8; --focus: #4a6cf0; --shadow: 0 10px 30px rgba(40, 60, 140, .08);
  --glass: rgba(255, 255, 255, .62); --glass-line: rgba(255, 255, 255, .7);
  --font: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
:root[data-look="wave"][data-theme="dark"] {
  --bg: #0d1126; --surface: #161b36; --surface-2: #1f2547; --line: #2b335e; --ink: #eef0fb; --ink-2: #aab2d6;
  --accent: #86b9ff; --accent-ink: #0a1834; --accent-soft: #1d2d58;
  --t1: #86b9ff; --t1-soft: #1d2d58; --t2: #63dbee; --t2-soft: #143845; --t3: #c6a6ff; --t3-soft: #2e2457; --t4: #aab2d6; --t4-soft: #1f2547;
  --link: #8fc0ff; --focus: #9fb4ff; --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --glass: rgba(16, 20, 44, .62); --glass-line: rgba(120, 140, 220, .18);
}

/* Page: the wave picture in light, the same colours as soft light in dark. main scrolls, the page doesn't,
   so the waves stay put behind the content. */
:root[data-look="wave"] { --day-wash: transparent; }  /* Auto theme: a dusk tint laid over the page background */
:root[data-look="wave"] body { background: linear-gradient(var(--day-wash), var(--day-wash)), var(--bg) url("img/waves.webp") center top / cover no-repeat; }
:root[data-look="wave"][data-theme="dark"] body {
  background:
    linear-gradient(var(--day-wash), var(--day-wash)),
    radial-gradient(55% 45% at 12% 28%, rgba(60, 150, 255, .20), transparent 70%),
    radial-gradient(50% 45% at 88% 32%, rgba(150, 95, 255, .20), transparent 70%),
    radial-gradient(40% 30% at 50% 6%, rgba(90, 220, 255, .12), transparent 70%),
    var(--bg);
}

/* Header */
:root[data-look="wave"] .top { background: var(--glass); border-bottom: 1px solid var(--glass-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding: 12px 28px; }
:root[data-look="wave"] .mark { background: url("img/orb.webp") center / cover no-repeat; color: transparent; width: 44px; height: 44px; }
:root[data-look="wave"] .a .who .mark { width: 26px; height: 26px; }
/* Top-left logo: the Y, colour on light, white on dark. Answers keep the orb. */
:root[data-look="wave"] .top .mark { background: url("img/y-logo-light.webp") center / contain no-repeat; border-radius: 0; width: 52px; height: 40px; }
:root[data-look="wave"][data-theme="dark"] .top .mark { background-image: url("img/y-logo-dark.webp"); }
:root[data-look="wave"] .brand { line-height: 1.1; white-space: nowrap; }
:root[data-look="wave"] .account-btn .who { white-space: nowrap; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
:root[data-look="wave"] .brand-name { display: block; width: 116px; height: 26px; font-size: 0; color: transparent;
  background: url("img/georgeai-light.webp") left center / contain no-repeat; }  /* the "GeorgeAI" wordmark; the text stays for screen readers */
:root[data-look="wave"][data-theme="dark"] .brand-name { background-image: url("img/georgeai-dark.webp"); }
:root[data-look="wave"] .brand-sub { font-size: 12.5px; font-weight: 500; color: var(--ink-2); margin-top: 2px; }
:root[data-look="wave"] .tabs { margin-left: 24px; gap: 6px; }
:root[data-look="wave"] .tabs button { padding: 7px 16px; font-size: 15px; display: inline-flex; align-items: center; gap: 7px; }
/* Flat line icons (inline SVG in index.html) for the menu, Change skill and New conversation; they take the text colour. */
.nav-ic, .bn-ic { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:root[data-look="wave"] .nav-ic.wave-only { display: inline-block !important; width: 18px; height: 18px; }
:root[data-look="wave"] #scope-btn, :root[data-look="wave"] #new-chat { display: inline-flex; align-items: center; gap: 6px; }
.bottomnav .bn-ic { width: 22px; height: 22px; display: block; }
:root[data-look="wave"] .theme-btn { width: 40px; height: 40px; background: var(--surface); border-color: var(--line); box-shadow: 0 2px 8px rgba(40, 60, 140, .08); }
:root[data-look="wave"] .avatar { width: 40px; height: 40px; box-shadow: none; }
:root[data-look="wave"] .account-btn .who { font-weight: 600; }
:root[data-look="wave"] .menu { border-radius: 18px; }

/* Home */
:root[data-look="wave"] .hero { background: none; border: 0; text-align: center; padding: 34px 24px 6px; color: var(--ink); }
:root[data-look="wave"] .hero-orb { position: relative; width: 128px; height: 128px; margin: 0 auto 22px; }
/* Home orb ("Breathe + Alive"): the orb picture breathes, and a soft colour halo turns and swells behind it.
   The halo starts right behind the orb (no gap), so there's no ring of background around it. */
:root[data-look="wave"] .hero-orb img { position: relative; z-index: 1; display: block; width: 100%; height: 100%;
  animation: orb-breathe 4.5s ease-in-out infinite; }
:root[data-look="wave"] .hero-orb::before { content: ""; position: absolute; inset: -22%; border-radius: 50%; z-index: 0;
  background: conic-gradient(from 0deg, #00dcff, #2563ff, #7b2ff7, #c81cf2, #00dcff); filter: blur(22px); opacity: .55;
  animation: orb-spin 9s linear infinite, orb-halo 4.5s ease-in-out infinite; }
:root[data-look="wave"][data-theme="dark"] .hero-orb::before { opacity: .7; }
@keyframes orb-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes orb-spin { to { rotate: 360deg; } }
@keyframes orb-halo { 0%, 100% { scale: .9; } 50% { scale: 1.06; } }
:root[data-look="wave"] .hero h1 { font-size: 46px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 8px; }
:root[data-look="wave"] #greeting::after { content: " 👋"; content: " 👋" / ""; }
:root[data-look="wave"] .hero-q { font-size: 24px; color: var(--ink-2); margin: 0 auto 34px; max-width: none; }
:root[data-look="wave"] #hero-text { display: none; }
:root[data-look="wave"] .ask { max-width: 1010px; margin: 0 auto; align-items: center; gap: 12px; padding: 10px 10px 10px 22px; border-radius: 24px;
  border: 2px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(100deg, #b9e3ff, #c9c2ff 55%, #e0c8ff) border-box;
  box-shadow: 0 0 0 5px rgba(175, 195, 255, .18), 0 14px 44px rgba(110, 130, 255, .22), 0 0 34px rgba(120, 210, 255, .18); }
:root[data-look="wave"] .ask:focus-within { box-shadow: 0 0 0 3px var(--focus), 0 14px 44px rgba(110, 130, 255, .26); }
:root[data-look="wave"] .ask input { font-size: 18px; padding: 12px 4px; }
:root[data-look="wave"] .ask input::placeholder { color: var(--ink-2); }
.sparkle { width: 28px; height: 28px; flex: none; fill: none; stroke: var(--t1); stroke-width: 1.4; stroke-linejoin: round; }
:root[data-look="wave"] .ask .btn { width: 54px; height: 50px; padding: 0; border-radius: 14px; display: grid; place-items: center; flex: none; }
:root[data-look="wave"] .ask .btn svg { width: 24px; height: 24px; fill: currentColor; }
:root[data-look="wave"] .sign-in-box { justify-content: center; }
:root[data-look="wave"] .wrap2 { max-width: 1180px; margin: 56px auto 0; }
:root[data-look="wave"] .sect { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Cards wrap in centred rows, so one, two or four skills sit in the middle, not to the left. */
:root[data-look="wave"] .grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 30px; }
:root[data-look="wave"] .grid > .skill { flex: 0 1 340px; min-width: 0; }
:root[data-look="wave"] .grid > .card-note { flex: 1 1 100%; }
/* Loading placeholders: same box as a real card (picture area + title line) with a slow light sweep. */
.skel { pointer-events: none; }
.skel .skel-art, .skel .skel-line { border-radius: 14px; background: var(--surface-2);
  background-image: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .55) 50%, transparent 80%);
  background-size: 200% 100%; background-repeat: no-repeat; animation: skel-sweep 1.6s ease-in-out infinite; }
:root[data-theme="dark"] .skel .skel-art, :root[data-theme="dark"] .skel .skel-line {
  background-image: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .07) 50%, transparent 80%); }
.skel .skel-art { width: 100%; max-width: 300px; aspect-ratio: 16 / 9; margin: 0 auto; }
.skel .skel-line { width: 55%; height: 24px; border-radius: 8px; margin: 6px auto 7px; }  /* margins make up the title's line height */
@keyframes skel-sweep { from { background-position: 150% 0; } to { background-position: -50% 0; } }
@media (prefers-reduced-motion: reduce) { .skel .skel-art, .skel .skel-line { animation: none; } }
:root[data-look="wave"] .skill { position: relative; border: 1px solid var(--glass-line); border-radius: 24px; padding: 26px 20px 30px; align-items: center; text-align: center;
  gap: 16px; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
:root[data-look="wave"] .skill:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(40, 60, 140, .14); }
:root[data-look="wave"] .skill .ic, :root[data-look="wave"] .skill > p, :root[data-look="wave"] .skill ul { display: none; }
:root[data-look="wave"] .skill h3 { font-size: 24px; font-weight: 800; justify-content: center; letter-spacing: -.01em; }
:root[data-look="wave"][data-theme="dark"] .art .soft { opacity: .28; }
:root[data-look="wave"] .art img { display: block; width: 100%; max-width: 300px; height: auto; aspect-ratio: 16 / 9; object-fit: contain; margin: 0 auto; }
:root[data-look="wave"] .art svg { display: block; width: 100%; max-width: 280px; height: auto; margin: 0 auto; }
/* The whole card is the button: the "Ask …" button stretches over it (its text stays for screen readers). */
:root[data-look="wave"] .skill .go { position: absolute; inset: 0; margin: 0; border: 0; border-radius: 24px; background: transparent;
  color: transparent; font-size: 0; overflow: hidden; }
:root[data-look="wave"] .skill .go:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
:root[data-look="wave"] .card-note { background: var(--glass); border-color: var(--line); text-align: center; }
:root[data-look="wave"] .foot { text-align: center; }

/* Conversation */
:root[data-look="wave"] .crumb { background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--glass-line);
  margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; border-radius: 0 0 16px 16px; }
:root[data-look="wave"] .q { background: var(--accent-soft); border-radius: 20px 20px 6px 20px; }
:root[data-look="wave"] .q { box-shadow: 0 4px 14px rgba(40, 60, 140, .06); }
/* Each answer is one card: name, text, sources and the copy/feedback row sit together on a single surface. */
:root[data-look="wave"] .a { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 14px 18px 10px; box-shadow: var(--shadow); }
:root[data-look="wave"] .a .who { margin-bottom: 2px; }
:root[data-look="wave"] .a .sc { background: var(--surface-2); border-color: transparent; }
:root[data-look="wave"] .a .tools { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
:root[data-look="wave"] .a.fresh::before { inset: -3px; border-radius: 24px; }
/* The soft glow goes outside the card here (a blurred layer would tint the white card from inside). */
:root[data-look="wave"] .a.fresh::after { display: none; }
:root[data-look="wave"] .a.fresh { animation: wave-glow 2.2s ease-out; }
@keyframes wave-glow { 0% { box-shadow: var(--shadow); } 15% { box-shadow: 0 0 34px rgba(110, 120, 255, .35), var(--shadow); }
  60% { box-shadow: 0 0 28px rgba(90, 190, 255, .28), var(--shadow); } 100% { box-shadow: var(--shadow); } }
:root[data-look="wave"] .empty { background: var(--glass); border-radius: 20px; padding: 28px 16px; margin-top: 6vh; }
:root[data-look="wave"] .composer form { border-radius: 24px; border: 2px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(100deg, #b9e3ff, #c9c2ff 55%, #e0c8ff) border-box;
  box-shadow: 0 10px 30px rgba(110, 130, 255, .18); }
:root[data-look="wave"] .composer button { border-radius: 14px; }
:root[data-look="wave"][data-theme="dark"] .ask,
:root[data-look="wave"][data-theme="dark"] .composer form {
  background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(100deg, #2f6fb0, #5146a8 55%, #7a46b8) border-box; }
:root[data-look="wave"] .help { background: var(--glass); border-radius: 24px; margin-top: 24px; margin-bottom: 24px; }
:root[data-look="wave"] .bottomnav { background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }

@media (prefers-reduced-motion: reduce) {
  :root[data-look="wave"] .skill { transition: none; }
  :root[data-look="wave"] .a.fresh { animation: none; }
  :root[data-look="wave"] .skill:hover { transform: none; }
}
@media (max-width: 1100px) {
  :root[data-look="wave"] .top { gap: 10px; padding: 10px 16px; }
  :root[data-look="wave"] .tabs { margin-left: 4px; }
  :root[data-look="wave"] .tabs button { padding: 6px 12px; }
  :root[data-look="wave"] .account-btn .who { max-width: 140px; }
}
@media (max-width: 980px) {
  :root[data-look="wave"] .grid { gap: 18px; }
  :root[data-look="wave"] .brand-sub.wave-only { display: none !important; }
}
@media (max-width: 760px) {
  :root[data-look="wave"] .top { padding: 8px 14px; }
  :root[data-look="wave"] .mark { width: 36px; height: 36px; }
  :root[data-look="wave"] .top .mark { width: 42px; height: 32px; }
  :root[data-look="wave"] .brand-name { width: 100px; height: 22px; }
  :root[data-look="wave"] .theme-btn, :root[data-look="wave"] .avatar { width: 34px; height: 34px; }
  :root[data-look="wave"] .hero { padding: 22px 16px 4px; }
  :root[data-look="wave"] .hero-orb { width: 84px; height: 84px; margin-bottom: 14px; }
  :root[data-look="wave"] .hero h1 { font-size: 30px; }
  :root[data-look="wave"] .hero-q { font-size: 18px; margin-bottom: 22px; }
  :root[data-look="wave"] .ask { padding: 6px 6px 6px 14px; gap: 8px; }
  :root[data-look="wave"] .ask input { font-size: 16px; padding: 10px 2px; }
  :root[data-look="wave"] .sparkle { width: 22px; height: 22px; }
  :root[data-look="wave"] .ask .btn { width: 46px; height: 44px; }
  :root[data-look="wave"] .wrap2 { margin-top: 30px; }
  :root[data-look="wave"] .grid > .skill { flex: 1 1 100%; }
  :root[data-look="wave"] .skill { flex-direction: row; text-align: left; padding: 14px 16px; gap: 14px; border-radius: 20px; }
  :root[data-look="wave"] .art svg, :root[data-look="wave"] .art img { width: 110px; flex: none; }
  :root[data-look="wave"] .skel .skel-art { width: 110px; flex: none; margin: 0; }
  :root[data-look="wave"] .skel .skel-line { width: 45%; margin: 0; }
  :root[data-look="wave"] .skill h3 { font-size: 19px; justify-content: flex-start; }
  :root[data-look="wave"] .crumb { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
}
@media (max-width: 420px) {
  :root[data-look="wave"] .brand-sub.wave-only { display: none !important; }
}


/* ===== Chat bar and phone layout =====
   The skill chip is the skill picker (one control instead of chip + "Change skill"); Home is a quiet back link,
   not an underlined one. On phones the bar is a single slim row: the bottom bar already has Home, and
   "New conversation" shrinks to its icon. */
.crumb-home { border: 0; background: none; display: inline-flex; align-items: center; gap: 2px; padding: 4px 10px 4px 2px;
  border-radius: 999px; color: var(--ink-2); font-weight: 500; font-size: 14px; }
.crumb-home .nav-ic { display: inline-block; width: 18px; height: 18px; }
.crumb-home:hover { color: var(--ink); background: var(--surface-2); }
button.scopechip { border: 0; cursor: pointer; font-size: 14px; max-width: 100%; }
button.scopechip:hover { filter: brightness(.97); }
.scopechip #scope-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scopechip .caret { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; margin-left: -2px; }
.scope { min-width: 0; }
/* Inputs at 16px: iPhone Safari zooms the page in when you tap a smaller text field, and the page then drifts. */
.composer textarea, .ask input { font-size: 16px; }
@media (max-width: 760px) {
  .crumb { flex-wrap: nowrap; padding-top: 8px; padding-bottom: 8px; margin-bottom: 12px; }
  .crumb-home { display: none; }
  #new-chat .new-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #new-chat { width: 36px; height: 36px; padding: 0; justify-content: center; flex: none; }
  :root[data-look="wave"] #new-chat .nav-ic { width: 19px; height: 19px; }
  .q { margin-bottom: 12px; }
  .a { margin-bottom: 16px; }
  :root[data-look="wave"] .a { padding: 12px 14px 8px; border-radius: 18px; }
  :root[data-look="wave"] .top { padding: 6px 12px; }
  .composer { padding: 6px 8px 6px; }
}
