/* Get Starred: design tokens taken from the design canvas (Oct 2026) */
:root {
  --navy: #0A1633;
  --navy-2: #13244D;
  --navy-3: #2A3E70;
  --blue: #1F5BF0;
  --blue-dark: #123A9C;
  --blue-soft: #DCE6FF;
  --gold: #FFC53D;
  --gold-edge: #B07A00;
  --green: #0B7A4B;
  --red: #B42318;

  --bg: #F4F7FC;
  --surface: #FFFFFF;
  --surface-2: #E3EAF8;
  --line: #D5DDEE;
  --line-strong: #C3CDE3;
  --ink: #0A1633;
  --ink-2: #2C3A5C;
  --ink-3: #4A5878;
  --nav-bg: #FFFFFF;
  --strong-bg: #0A1633;
  --strong-ink: #FFFFFF;
  --pill-info-ink: #123A9C;

  --font-head: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --radius: 16px;
  --nav-h: 76px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A1633;
    --surface: #13244D;
    --surface-2: #1C2F5E;
    --line: #2A3E70;
    --line-strong: #3A5089;
    --ink: #FFFFFF;
    --ink-2: #D9E2F7;
    --ink-3: #A9B9DD;
    --nav-bg: #0A1633;
    --blue-soft: #1C2F5E;
    --strong-bg: #FFFFFF;
    --strong-ink: #0A1633;
    --pill-info-ink: #C9D8FF;
    --error-ink: #FF9C93;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A1633;
  --surface: #13244D;
  --surface-2: #1C2F5E;
  --line: #2A3E70;
  --line-strong: #3A5089;
  --ink: #FFFFFF;
  --ink-2: #D9E2F7;
  --ink-3: #A9B9DD;
  --nav-bg: #0A1633;
  --blue-soft: #1C2F5E;
  --strong-bg: #FFFFFF;
  --strong-ink: #0A1633;
  --pill-info-ink: #C9D8FF;
  --error-ink: #FF9C93;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: #050B1C;
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The app column: full screen on a phone, a phone-width column on a laptop */
.app {
  position: relative;
  max-width: 440px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  overflow-x: hidden;
}
.screen {
  min-height: 100dvh;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.screen.no-nav { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }

/* Type */
h1, h2, h3, .head { font-family: var(--font-head); margin: 0; letter-spacing: -0.3px; }
h1 { font-weight: 800; font-size: 30px; line-height: 1.05; }
h2 { font-weight: 800; font-size: 20px; }
h3 { font-weight: 800; font-size: 17px; }
p { margin: 0; line-height: 1.45; }
.muted { color: var(--ink-3); font-size: 14px; }
.small { font-size: 13px; }
.lead { font-size: 15px; line-height: 1.45; color: var(--ink-2); }

/* Brand */
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 800; font-size: 22px; letter-spacing: -0.5px; }
.star { display: inline-block; flex-shrink: 0; }

/* Top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 22px; border: none;
  background: var(--surface-2); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; position: relative; text-decoration: none; flex-shrink: 0;
}
.badge-dot { position: absolute; top: 8px; right: 9px; width: 10px; height: 10px; border-radius: 5px; background: var(--gold); border: 2px solid var(--navy); }

/* Buttons */
.btn {
  min-height: 52px; padding: 0 22px; border-radius: 26px; border: none;
  background: var(--blue); color: #FFFFFF; font-weight: 700; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.navy { background: var(--strong-bg); color: var(--strong-ink); }
.btn.ghost { background: transparent; color: var(--ink); border: 2px solid var(--line-strong); }
.btn.danger { background: var(--red); }
.btn.good { background: var(--green); }
.btn.sm { min-height: 40px; padding: 0 16px; font-size: 14px; border-radius: 20px; }
.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }
.push-bottom { margin-top: auto; }

/* Chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  min-height: 38px; padding: 0 14px; border-radius: 19px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font-size: 14px; display: inline-flex; align-items: center; gap: 6px;
}
.chip[aria-pressed="true"] { background: var(--strong-bg); border-color: var(--strong-bg); color: var(--strong-ink); font-weight: 700; }
.tag { padding: 4px 10px; border-radius: 12px; font-size: 13px; font-weight: 700; background: #FFFFFF; color: var(--navy); }
.tag.blue { background: var(--blue); color: #FFFFFF; }
.tag.glass { background: rgba(255,255,255,0.16); color: #FFFFFF; font-weight: 500; }

/* Status pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 14px; font-size: 12px; font-weight: 700; }
.pill.ok { background: #D7F5E6; color: #075A37; }
.pill.wait { background: #FFF1CC; color: #6B4A00; }
.pill.no { background: #FDE2DF; color: #8A1A12; }
.pill.info { background: var(--blue-soft); color: var(--pill-info-ink); }

/* Cards and forms */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.card.tight { padding: 12px; gap: 8px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; }
.field .hint { font-weight: 400; color: var(--ink-3); font-size: 13px; }
.input, .select, .textarea {
  min-height: 50px; border-radius: 14px; border: 1px solid var(--line-strong);
  background: var(--surface); padding: 0 14px; font-size: 16px; color: var(--ink); width: 100%;
}
.textarea { padding: 12px 14px; min-height: 96px; resize: vertical; line-height: 1.4; }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.error { color: var(--error-ink, var(--red)); font-size: 13px; font-weight: 500; }

.notice { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; font-size: 14px; line-height: 1.45; }
.notice svg { flex-shrink: 0; color: var(--blue); }
.notice.gold { background: #FFF6DB; border-color: #F1D489; color: #3D2C00; }
.notice.gold svg { color: var(--gold-edge); }

/* Progress (sign-up) */
.steps { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 6px; }
.steps span { height: 6px; border-radius: 3px; background: var(--line); }
.steps span.on { background: var(--ink); }

/* Big choice tiles (sign-up skills) */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  min-height: 64px; border-radius: 16px; border: 2px solid var(--line-strong); background: var(--surface);
  font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--ink);
}
.tile[aria-pressed="true"] { background: var(--strong-bg); border-color: var(--strong-bg); color: var(--strong-ink); }

/* Bottom nav */
.nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 440px; z-index: 20;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding: 8px 6px env(safe-area-inset-bottom);
  background: var(--nav-bg); border-top: 1px solid var(--line);
  display: flex; justify-content: space-around; align-items: flex-start;
}
.nav.on-dark { background: var(--navy); border-top-color: rgba(255,255,255,0.1); }
.nav a {
  min-width: 60px; min-height: 52px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--ink-3); text-decoration: none; font-size: 12px; font-weight: 500; position: relative;
}
.nav.on-dark a { color: #8FA3CC; }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.nav.on-dark a[aria-current="page"] { color: #FFFFFF; }
.nav .count { position: absolute; top: -2px; right: 10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--gold); color: var(--navy); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* Feed (TikTok-style) */
/* Pinned to the screen edges like the bottom bar, so a slide is always exactly the visible height (100dvh is wrong inside some in-app browsers). */
.feed { position: fixed; top: 0; bottom: 0; left: 0; right: 0; width: 100%; max-width: 440px; margin: 0 auto; overflow-y: auto; scroll-snap-type: y mandatory; background: var(--navy); color: #FFFFFF; overscroll-behavior: contain; }
.feed-top { position: fixed; top: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 440px; z-index: 10; padding: calc(16px + env(safe-area-inset-top)) 18px 0; display: flex; flex-direction: column; gap: 12px; pointer-events: none; }
.feed-top > * { pointer-events: auto; }
.feed-top .icon-btn { background: rgba(255,255,255,0.14); color: #FFFFFF; }
.feed-tabs { display: flex; gap: 8px; }
.feed-tab { height: 40px; padding: 0 18px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.35); background: rgba(10,22,51,0.35); color: #FFFFFF; font-weight: 500; font-size: 15px; display: inline-flex; align-items: center; text-decoration: none; }
.feed-tab[aria-current="page"] { background: #FFFFFF; color: var(--navy); font-weight: 700; border-color: #FFFFFF; }
.slide { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; }
.slide-video { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.slide-video .play { display: flex; flex-direction: column; align-items: center; gap: 10px; color: rgba(255,255,255,0.85); font-size: 14px; text-shadow: 0 1px 3px rgba(0,0,0,0.4); }
.slide-shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(10,22,51,0.55) 0%, rgba(10,22,51,0) 25%, rgba(10,22,51,0) 50%, rgba(10,22,51,0.85) 100%); pointer-events: none; }
.slide-actions { position: absolute; right: 14px; bottom: calc(var(--nav-h) + 120px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; align-items: center; }
.slide-action { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; color: #FFFFFF; text-decoration: none; }
.round { width: 56px; height: 56px; border-radius: 28px; border: none; background: rgba(255,255,255,0.16); color: #FFFFFF; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.round.starred { background: var(--blue); }
.slide-info { position: absolute; left: 18px; right: 90px; bottom: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.avatar { overflow: hidden; width: 48px; height: 48px; border-radius: 24px; border: 2px solid #FFFFFF; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 800; font-size: 18px; flex-shrink: 0; }
.slide-name { font-family: var(--font-head); font-weight: 600; font-size: 20px; }
.slide-sub { font-size: 14px; color: #C9D5F2; }
.feed-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 32px; text-align: center; }

/* Profile */
.profile { min-height: 100dvh; padding: calc(18px + env(safe-area-inset-top)) 18px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }
.profile .icon-btn { background: var(--chip); color: var(--on); }
.profile-head { display: flex; gap: 16px; align-items: center; }
.headshot { width: 112px; height: 140px; border-radius: 16px; border: 3px solid #FFFFFF; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 13px; flex-shrink: 0; overflow: hidden; }
.headshot img { width: 100%; height: 100%; object-fit: cover; }
.cv { background: #FFFFFF; color: var(--navy); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.cv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.cv-label { font-size: 12px; color: #4A5878; }
.cv-value { font-size: 15px; font-weight: 700; }
.cv-section { border-top: 1px solid #E3E8F2; padding-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.videos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.video-tile { height: 132px; border-radius: 14px; border: none; display: flex; flex-direction: column; justify-content: space-between; padding: 10px; font-size: 13px; font-weight: 700; text-align: left; }

/* Search grid */
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.p-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); position: relative; }
.p-card .shot { height: 128px; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 800; font-size: 34px; }
.p-card .body { padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.p-card .star-btn { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 20px; border: none; background: rgba(10,22,51,0.85); display: flex; align-items: center; justify-content: center; }
.p-card .star-btn.starred { background: var(--blue); }
.searchbar { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line); }
.searchbar input { flex: 1; border: none; outline: none; background: transparent; font-size: 16px; min-height: 48px; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.filters .select { min-height: 44px; font-size: 15px; }

/* Bottom sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(10,22,51,0.5); z-index: 40; display: flex; justify-content: center; align-items: flex-end; animation: fade 0.15s ease-out; }
.sheet { width: 100%; max-width: 440px; max-height: 88dvh; overflow-y: auto; background: var(--surface); color: var(--ink); border-radius: 24px 24px 0 0; padding: 12px 20px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; animation: up 0.2s ease-out; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); align-self: center; }
.folder-btn { min-height: 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 10px; padding: 0 14px; text-align: left; width: 100%; }
.folder-btn[aria-pressed="true"] { border-color: var(--blue); border-width: 2px; font-weight: 700; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--navy); color: #FFFFFF; padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 500; z-index: 60; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; max-width: 360px; width: max-content; box-shadow: 0 6px 20px rgba(0,0,0,0.25); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Colour wheel */
.wheel { position: relative; width: 210px; height: 210px; border-radius: 50%; border: none; padding: 0; cursor: crosshair; touch-action: none; align-self: center;
  background: radial-gradient(closest-side, #FFFFFF, rgba(255,255,255,0)), conic-gradient(#FF0000, #FFFF00, #00FF00, #00FFFF, #0000FF, #FF00FF, #FF0000);
  box-shadow: 0 0 0 1px var(--line); }
.wheel-shade { position: absolute; inset: 0; border-radius: 50%; background: #000000; pointer-events: none; }
.wheel-knob { position: absolute; width: 30px; height: 30px; border-radius: 15px; border: 4px solid #FFFFFF; box-shadow: 0 0 0 1px var(--navy), 0 2px 6px rgba(10,22,51,0.35); pointer-events: none; }
.swatches { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.swatch { width: 40px; height: 40px; border-radius: 20px; border: 2px solid var(--line-strong); }
.range { width: 100%; height: 32px; accent-color: var(--blue); }

/* Welcome */
.welcome { min-height: 100dvh; background: var(--navy); color: #FFFFFF; padding: calc(28px + env(safe-area-inset-top)) 22px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 22px; }
.welcome .hero { font-family: var(--font-head); font-weight: 800; font-size: 44px; line-height: 0.98; letter-spacing: -1px; }
.welcome .hero em { font-style: normal; color: var(--gold); }
.welcome .btn.ghost { color: #FFFFFF; border-color: rgba(255,255,255,0.4); }
.welcome .muted { color: #A9B9DD; }
.welcome a:not(.btn) { color: #9DB8FF; }

/* Review queue */
.review-media { height: 180px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; }

/* Notifications */
.alert { display: flex; gap: 12px; align-items: flex-start; }
.alert .ico { width: 40px; height: 40px; border-radius: 20px; background: var(--blue-soft); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.alert.unread .ico { background: var(--blue); }
.time { font-size: 12px; color: var(--ink-3); }

.demo-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.demo-bar .chip { justify-content: center; padding: 0 6px; font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* iPhone date boxes otherwise ignore the width and spill off the screen. */
.input[type="date"] { -webkit-appearance: none; appearance: none; display: block; width: 100%; min-width: 0; max-width: 100%; text-align: left; }
.input[type="date"]::-webkit-date-and-time-value { text-align: left; }
fieldset.card { min-width: 0; }
