/* HOOKED production app: the brand, calmer – white cards on lavender. */
:root {
  --bg: #f3dcf8;
  --bg2: #e2a9f0;
  --card: #ffffff;
  --ink: #1d1230;
  --muted: #6b5a7d;
  --peri: #6f78f0;
  --peri-soft: #e6e8ff;
  --line: #ead6f1;
  --ok: #1f8a5b;
  --ok-bg: #dff5ea;
  --warn: #9a6200;
  --warn-bg: #fff1d6;
  --bad: #b3263a;
  --bad-bg: #ffe1e5;
  --radius: 16px;
  --px: "Silkscreen", ui-monospace, monospace;
  --sans: "Space Grotesk", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1426; --bg2: #2a1d3a; --card: #261c33; --ink: #f4ecfa; --muted: #b9a8c9; --peri: #9aa1ff; --peri-soft: #2f2f55;
    --line: #3a2c4a; --ok: #6fd3a3; --ok-bg: #173a2b; --warn: #f0c060; --warn-bg: #3d3014; --bad: #ff8a99; --bad-bg: #44202a;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: linear-gradient(180deg, var(--bg2) 0, var(--bg) 220px) var(--bg); background-color: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); min-height: 100vh; }
a { color: var(--peri); }
h1 { font: 700 30px/1.1 var(--px); margin: 8px 0 18px; color: var(--peri); }
h2 { font-size: 19px; margin: 0 0 12px; }
h3 { font-size: 16px; margin: 16px 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.loading { padding: 40px; text-align: center; color: var(--muted); }

.bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px; padding: 10px 20px; padding-top: max(10px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg2) 88%, transparent); backdrop-filter: blur(8px); }
.logo { font: 700 22px var(--px); color: #fff; text-decoration: none; text-shadow: 2px 2px 0 var(--peri); }
.bar nav { display: flex; gap: 4px; flex-wrap: wrap; margin-right: auto; }
.bar nav a, .me { padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 500; }
.bar nav a.on { background: var(--card); color: var(--peri); }
.me { background: var(--card); }

main { max-width: 1100px; margin: 0 auto; padding: 16px 20px 80px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: 0 4px 18px rgba(80, 40, 110, 0.07); }
.card + .card { margin-top: 16px; }
.grid .card + .card { margin-top: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.stack > * + * { margin-top: 10px; }

.btn { font: 700 15px var(--sans); border: 2px solid var(--peri); background: var(--peri); color: #fff; padding: 9px 16px; border-radius: 999px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn.ghost { background: transparent; color: var(--peri); }
.btn.small { padding: 5px 12px; font-size: 14px; }
.btn.danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid var(--peri); outline-offset: 2px; }

label { display: block; font-size: 14px; font-weight: 500; color: var(--muted); }
input, select, textarea { width: 100%; font: 16px var(--sans); color: var(--ink); background: var(--card); border: 2px solid var(--line); border-radius: 10px; padding: 9px 11px; margin-top: 4px; }
textarea { min-height: 120px; resize: vertical; }
input[type="checkbox"] { width: auto; margin: 0 6px 0 0; }
.form { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.form .wide { grid-column: 1 / -1; }

.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--peri-soft); color: var(--peri); white-space: nowrap; }
.pill.submitted { background: var(--warn-bg); color: var(--warn); }
.pill.approved { background: var(--peri-soft); color: var(--peri); }
.pill.paid, .pill.granted { background: var(--ok-bg); color: var(--ok); }
.pill.rejected, .pill.declined { background: var(--bad-bg); color: var(--bad); }

.note { padding: 10px 14px; border-radius: 12px; margin: 0 0 8px; font-size: 15px; }
.note.bad { background: var(--bad-bg); color: var(--bad); }
.note.warn { background: var(--warn-bg); color: var(--warn); }
.note.todo { background: var(--peri-soft); color: var(--ink); }

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 500; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.group td { font-weight: 700; background: color-mix(in srgb, var(--peri-soft) 60%, transparent); }
.scroll { overflow-x: auto; }

.bar-track { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; min-width: 80px; }
.bar-fill { height: 100%; background: var(--peri); }
.bar-fill.warn { background: var(--warn); }
.bar-fill.over { background: var(--bad); }
.stat { font: 700 26px var(--px); color: var(--peri); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button { font: 500 15px var(--sans); border: 0; background: var(--card); color: var(--ink); padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.tabs button.on { background: var(--peri); color: #fff; }

.phase { border-left: 4px solid var(--peri); }
.phase.now { box-shadow: 0 0 0 3px var(--peri-soft), 0 4px 18px rgba(80, 40, 110, 0.07); }
.task { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.task:last-child { border: 0; }
.task.done .t { text-decoration: line-through; color: var(--muted); }
.task input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.who { font-size: 13px; color: var(--muted); }

.people { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--peri); color: #fff; display: grid; place-items: center; font: 700 20px var(--px); flex: none; object-fit: cover; }
.media-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.media-grid figure { margin: 0; background: var(--card); border-radius: 12px; padding: 8px; }
.media-grid img, .media-grid video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--line); }
.media-grid figcaption { font-size: 13px; margin: 6px 2px; overflow-wrap: anywhere; }

.auth { max-width: 420px; margin: 8vh auto; }
.auth .logo { font-size: 44px; display: block; text-align: center; margin-bottom: 4px; }
.auth .sub { text-align: center; font-family: var(--px); color: var(--peri); margin: 0 0 24px; }
.link-box { font: 14px ui-monospace, monospace; background: var(--peri-soft); padding: 8px 10px; border-radius: 8px; overflow-wrap: anywhere; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--card); padding: 10px 18px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity 0.2s; max-width: 90vw; z-index: 20; }
#toast.show { opacity: 1; }

@media (max-width: 720px) {
  .bar { flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
  .bar nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .bar nav a { white-space: nowrap; }
  main { padding: 12px 16px 80px; }
  h1 { font-size: 24px; }
}

/* ---------- people colours, calendar, timeline ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px 2px 8px; margin: 2px 3px 2px 0; border-radius: 999px; font: 500 13px var(--sans);
  background: color-mix(in srgb, var(--c, var(--peri)) 16%, var(--card)); color: var(--ink); border: 1.5px solid var(--c, var(--peri)); white-space: nowrap; }
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--peri)); }
button.chip { cursor: pointer; }
.chip.on { background: var(--c, var(--peri)); color: #fff; }
.chip.on::before { background: #fff; }
.chip.all::before { display: none; }
.legend { display: flex; flex-wrap: wrap; gap: 2px; margin: 0 0 12px; }
.kinds { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 12px; }
.pill[style*="--k"] { background: color-mix(in srgb, var(--k) 18%, var(--card)); color: var(--k); }
.month { font: 700 16px var(--px); color: var(--peri); min-width: 170px; text-align: center; }
.dim { opacity: .22; }

.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 10px; }
.cal .wk { font-size: 12px; color: var(--muted); text-align: center; padding-bottom: 4px; }
.cal .day { min-height: 104px; border-radius: 10px; background: color-mix(in srgb, var(--bg) 45%, var(--card)); padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal .day.out { opacity: .45; }
.cal .day.today { box-shadow: inset 0 0 0 2px var(--peri); }
.cal .n { font: 700 12px var(--px); color: var(--muted); padding: 0 2px; }
.cal .ev { display: flex; justify-content: space-between; gap: 2px; border: 0; cursor: pointer; text-align: left; width: 100%; padding: 2px 5px; border-radius: 5px;
  background: var(--c); color: #fff; font: 600 11.5px/1.3 var(--sans); overflow: hidden; }
.cal .ev span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .ev .dots { display: flex; gap: 1px; flex: none; align-items: center; }
.cal .ev .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px #fff; }
.cal .more-ev { font-size: 11px; color: var(--muted); }
.tbc { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.28) 0 5px, transparent 5px 10px); }

.agenda { display: grid; gap: 4px; }
.ev-row { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; border: 0; background: none; color: inherit; font: inherit; padding: 8px 6px; border-radius: 10px; cursor: pointer; }
.ev-row:hover { background: var(--peri-soft); }
.ev-row > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ev-row .chips { display: flex; flex-wrap: wrap; }
.date-badge { flex: none; width: 48px; text-align: center; border-radius: 10px; padding: 4px 0; background: color-mix(in srgb, var(--c) 16%, var(--card)); color: var(--c); font-size: 11px; text-transform: uppercase; }
.date-badge b { display: block; font: 700 20px var(--px); }

.tl { overflow-x: auto; padding: 0; }
.tl-inner { position: relative; }
.tl-row { display: flex; border-bottom: 1px solid var(--line); min-height: 44px; }
.tl-row.head { position: sticky; top: 0; z-index: 2; background: var(--card); min-height: 30px; }
.tl-label { position: sticky; left: 0; z-index: 1; width: 230px; flex: none; padding: 6px 12px; background: var(--card); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: center; gap: 2px; font-size: 14px; }
.tl-label span { font-size: 12px; color: var(--muted); }
.tl-label .chip { align-self: flex-start; font-size: 13px; color: var(--ink); }
.tl-track { position: relative; flex: none; background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px); }
.tl-month { position: absolute; top: 0; bottom: 0; padding: 6px 6px; font: 700 11px var(--px); color: var(--muted); border-left: 1px solid var(--line); }
.tl-today { position: absolute; top: 0; height: 100vh; border-left: 2px solid #ff2d55; z-index: 1; pointer-events: none; }
.tl-today span { position: absolute; top: 4px; left: 4px; font: 700 10px var(--px); color: #ff2d55; }
.tl-lane { position: relative; height: 34px; }
.tl-row:not(.person) .tl-track { height: 44px; }
.tl-bar { position: absolute; top: 7px; height: 28px; border: 0; border-radius: 7px; background: var(--c); color: #fff; cursor: pointer; padding: 0 8px;
  display: flex; align-items: center; gap: 8px; font: 600 12px var(--sans); white-space: nowrap; overflow: visible; min-width: 10px; }
.tl-lane .tl-bar { top: 3px; height: 28px; overflow: hidden; }
.tl-bar .tl-title { overflow: hidden; text-overflow: ellipsis; }
.tl-row:not(.person) .tl-bar .tl-title { overflow: visible; }
.tl-chips { display: inline-flex; gap: 3px; position: relative; left: 100%; margin-left: 10px; }
.tl-row:not(.person) .tl-bar { overflow: visible; }
.tl-row:not(.person) .tl-chips { position: absolute; left: calc(100% + 8px); }
.tl-row:not(.person) .tl-bar .tl-title { position: absolute; left: calc(100% + 8px); top: -9px; color: var(--ink); font-weight: 700; display: none; }
.tl-chips i { font-style: normal; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--c); color: #fff; }
.tl-row:not(.person) .tl-bar { color: transparent; }
.tl-row.dim .tl-bar, .tl-bar.dim { opacity: .2; }

.ev-dialog { border: 0; border-radius: 18px; padding: 22px; width: min(560px, calc(100vw - 32px)); background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(29,18,48,.35); }
.ev-dialog::backdrop { background: rgba(29,18,48,.45); }
.who-pick { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.who-pick legend { font-size: 14px; color: var(--muted); margin-bottom: 6px; padding: 0; }
.chip.pick { cursor: pointer; }
.chip.pick input { margin: 0 2px 0 0; }
.chip.pick::before { display: none; }
input[type="color"] { height: 42px; padding: 4px; }

@media (max-width: 720px) {
  .cal { gap: 2px; padding: 6px; }
  .cal .day { min-height: 64px; padding: 2px; }
  .cal .ev { font-size: 0; height: 8px; padding: 0; }
  .cal .ev .dots { display: none; }
  .tl-label { width: 140px; padding: 6px 8px; }
}

.tl-bar.tbc, .cal .ev.tbc { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.35) 0 5px, transparent 5px 10px); }

/* long bars carry their name tags inside */
.tl-row:not(.person) .tl-bar.inside { overflow: hidden; display: flex; align-items: center; padding: 0 6px; }
.tl-row:not(.person) .tl-bar.inside .tl-chips { position: static; left: auto; margin: 0; flex-wrap: nowrap; }
.tl-bar.inside .tl-chips i { box-shadow: 0 0 0 1.5px #fff; }

/* calendar: week view */
.tabs a { font: 500 15px var(--sans); background: var(--card); color: var(--ink); padding: 7px 14px; border-radius: 999px; text-decoration: none; }
.tabs a.on { background: var(--peri); color: #fff; }
.wkv { padding: 10px; }
.wk-spans { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 8px; }
.wk-span { display: flex; align-items: center; gap: 8px; min-width: 0; border: 0; border-radius: 8px; padding: 5px 8px; background: var(--c); color: #fff; font: inherit; font-size: 13px; text-align: left; cursor: pointer; overflow: hidden; }
.wk-span strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; }
.wk-span .tl-chips { position: static; margin: 0; flex: none; }
.wk-span .tl-chips i, .wk-ev .tl-chips i { box-shadow: 0 0 0 1.5px #fff; }
.wk-span.cont-l { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.wk-span.cont-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.wk-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.wk-day { min-height: 200px; border-radius: 10px; background: color-mix(in srgb, var(--bg) 45%, var(--card)); padding: 6px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wk-day.weekend { background: color-mix(in srgb, var(--bg) 70%, var(--card)); }
.wk-day.today { box-shadow: inset 0 0 0 2px var(--peri); }
.wk-head { display: flex; align-items: baseline; gap: 6px; color: var(--muted); font-size: 12px; }
.wk-head b { font: 700 16px var(--px); color: var(--ink); }
.wk-day.today .wk-head b { color: var(--peri); }
.wk-ev { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; border: 0; border-left: 4px solid var(--c); border-radius: 8px; background: var(--card); color: var(--ink); font: inherit; font-size: 13px; text-align: left; padding: 6px 8px; cursor: pointer; }
.wk-ev .tl-chips { position: static; margin: 0; flex-wrap: wrap; }
.wk-span.dim, .wk-ev.dim { opacity: .2; }
.wk-span.tbc { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.35) 0 5px, transparent 5px 10px); }
.wk-ev.tbc { border-left-style: dashed; }
@media (max-width: 700px) {
  .wk-spans { grid-template-columns: 1fr; }
  .wk-span { grid-column: 1 / -1 !important; }
  .wk-days { grid-template-columns: 1fr; }
  .wk-day { min-height: 0; }
}
.wk-span { flex-wrap: wrap; row-gap: 4px; }
.wk-span strong { flex: 1 1 100%; }
.wk-span .tl-chips { flex-wrap: wrap; }
@media (min-width: 701px) { .wk-span strong { flex: 0 1 auto; } }
.wk-ev { width: 100%; min-width: 0; overflow-wrap: break-word; hyphens: auto; font-size: 12.5px; }
/* plan: one timeline with year, month and week zoom */
.plan-bar { margin: 4px 0 10px; flex-wrap: wrap; }
a.tl-month { text-decoration: none; }
a.tl-month:hover { color: var(--peri); background: var(--peri-soft); }
.tl-dayh { position: absolute; top: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border-left: 1px solid var(--line); text-decoration: none; color: var(--muted); }
.tl-dayh b { font: 700 11px var(--px); color: var(--ink); }
.tl-dayh span { font-size: 10px; }
.tl-dayh.we { background: color-mix(in srgb, var(--bg) 60%, transparent); }
.tl-dayh.now b { color: #ff2d55; }
.tl-dayh:hover { background: var(--peri-soft); }
.tl.zoom-month .tl-row.head { min-height: 38px; }
.tl.zoom-month .tl-track { background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px); }
.tl-bar.cont-l { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.tl-bar.cont-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.tl-row:not(.person):not(.head) .tl-track { height: auto; min-height: 44px; }

/* receipts: hand in and review */
.drop input[type=file] { padding: 14px; border: 2px dashed var(--peri); border-radius: 12px; background: var(--peri-soft); width: 100%; }
.review-grid { display: grid; grid-template-columns: 180px 1fr; gap: 18px; align-items: start; }
.doc-img { width: 100%; max-height: 320px; object-fit: contain; border-radius: 10px; background: var(--bg); }
.doc-pdf { display: grid; place-items: center; aspect-ratio: 3 / 4; border-radius: 10px; background: var(--peri-soft); color: var(--peri); font: 700 20px var(--px); text-decoration: none; text-align: center; }
.ai { background: color-mix(in srgb, var(--peri-soft) 60%, var(--card)); border-radius: 12px; padding: 10px 12px; margin: 8px 0 12px; }
.ai p { margin: 4px 0; }
.ai.reading { animation: pulse 1.4s ease-in-out infinite; }
.ai.bad { background: #ffe3e8; }
@keyframes pulse { 50% { opacity: .5; } }
@media (max-width: 700px) { .review-grid { grid-template-columns: 1fr; } .doc-img { max-height: 240px; } }

/* first login: profile questionnaire */
.welcome { max-width: 760px; margin: 0 auto; }
.welcome .lead { font-size: 20px; font-weight: 700; }
.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 16px; flex-wrap: wrap; }
.steps a { display: flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border-radius: 999px; background: var(--card); color: var(--muted); text-decoration: none; font-size: 13px; }
.steps li.on a { background: var(--peri); color: #fff; }
.steps li.past a { color: var(--ink); }
@media (max-width: 700px) { .steps li:not(.on) a span { display: none; } }
.ticks { padding-left: 0; list-style: none; }
.ticks li { padding-left: 26px; position: relative; margin: 6px 0; }
.ticks li::before { content: "✦"; position: absolute; left: 4px; color: var(--peri); }
.upload .files { list-style: none; padding: 0; margin: 8px 0 0; }
.upload .files li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.upload .files li a { font-weight: 500; overflow-wrap: anywhere; }
.upload .files li button { margin-left: auto; }
.counter { display: block; text-align: right; }
dl.summary { display: grid; grid-template-columns: 140px 1fr; gap: 6px 14px; margin: 0 0 12px; }
dl.summary dt { color: var(--muted); font-size: 14px; }
dl.summary dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { dl.summary { grid-template-columns: 1fr; } dl.summary dd { margin-bottom: 8px; } }
.person-data { scroll-margin-top: 90px; }

/* the tour */
.tour { position: fixed; inset: 0; z-index: 100; }
.tour.center { background: rgba(29, 18, 48, .55); }
.tour-hole { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(29, 18, 48, .55), 0 0 0 3px var(--peri); transition: all .35s ease; pointer-events: none; }
.tour-card { position: fixed; overflow: auto; background: var(--card); color: var(--ink); border-radius: 18px; padding: 18px 20px; box-shadow: 0 24px 60px rgba(29, 18, 48, .4); transition: left .35s ease, top .35s ease; }
.tour-card h2 { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .tour-hole, .tour-card { transition: none; } }

/* go-live bits */
details.privacy { background: var(--peri-soft); border-radius: 12px; padding: 10px 14px; margin: 12px 0; }
details.privacy summary { cursor: pointer; font-weight: 700; }
details.privacy p { font-size: 14px; }
label.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.danger-text { color: var(--bad, #c0263d); }

/* privacy promise and legal pages */
.promise { background: var(--ok-bg, #e3f6ec); border-radius: 12px; padding: 10px 14px; }
.legal h3 { margin: 18px 0 4px; }
.legal ul { padding-left: 20px; }
.legal-links { text-align: center; margin-top: 14px; }
.auth .card.legal { text-align: left; }

/* phone setup */
.phone-banner { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 2px dashed var(--peri); }
.setup-step { border-left: 3px solid var(--line); padding: 2px 0 8px 14px; margin: 14px 0; }
.setup-step.done { border-color: var(--ok, #2e9e6b); }
.setup-step h3 { margin: 0 0 6px; display: flex; gap: 8px; align-items: center; }
.setup-step .num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--peri); color: #fff; font: 700 12px var(--px); }
.setup-step.done .num { background: var(--ok, #2e9e6b); }
.how { padding-left: 20px; }
.tabs.scope button.on { background: var(--ink); color: var(--card); }

/* money step */
fieldset.choice { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
fieldset.choice legend { font-weight: 600; margin-bottom: 4px; padding: 0; }

/* plan: list and folded filters */
.plan-filters { margin: 10px 0; }
.plan-filters > summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 4px 0; }
.plan-filters[open] > summary { margin-bottom: 6px; }
.plan-list .list-month { font: 700 12px var(--px); text-transform: uppercase; letter-spacing: .06em; color: var(--peri); margin: 18px 0 6px; }
.plan-list .list-month:first-child { margin-top: 0; }

/* Me: the website card */
.web-card { display: flex; gap: 14px; align-items: flex-start; margin: 8px 0; }
.web-card img, .web-card .initial { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; flex: none; }
.web-card .initial { display: grid; place-items: center; background: var(--peri); color: #fff; font: 700 28px var(--px); }
.web-card p { margin: 6px 0 0; }
fieldset.choice label.check { justify-content: flex-start; text-align: left; }
fieldset.choice input[type=radio] { width: auto; flex: none; margin: 3px 0 0; padding: 0; min-height: 0; }
#my-colour { width: 56px; height: 36px; padding: 2px; flex: none; }

/* ---------- ideas ---------- */
.search input { min-width: 0; width: 180px; padding: 6px 12px; }
.map-card { padding: 8px; }
.map-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mind-map { display: block; width: 100%; min-width: 680px; height: auto; font-family: inherit; }
.map-line { fill: none; stroke-width: 2.5; opacity: .45; }
.map-line.top { stroke-width: 4; opacity: .6; }
.map-hub circle { fill: var(--ink, #1d1b2f); }
.map-hub .hub-title { fill: #fff; font: 700 17px var(--px); letter-spacing: .04em; }
.map-hub .hub-sub { fill: #e2a9f0; font: 500 13px var(--px); }
.map-node rect { fill: color-mix(in srgb, var(--c) 16%, white); stroke: var(--c); stroke-width: 2; transition: fill .15s; }
.map-node text { fill: var(--ink, #1d1b2f); font-size: 13px; font-weight: 500; }
.map-node .count { font-size: 11px; font-weight: 700; fill: var(--c); }
.map-node.top rect { fill: var(--c); }
.map-node.top text { fill: #fff; font-size: 16px; font-weight: 700; }
.map-node:hover rect, .map-node:focus rect { fill: color-mix(in srgb, var(--c) 35%, white); }
.map-node.top:hover rect, .map-node.top:focus rect { fill: color-mix(in srgb, var(--c) 80%, black); }
.topic-tree { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tree-kids { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.topic-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 2px solid var(--c, var(--peri));
  background: color-mix(in srgb, var(--c, #6f78f0) 12%, white); color: var(--ink, #1d1b2f); text-decoration: none; font-size: 14px; font: inherit; cursor: pointer; }
.topic-pill b { font-size: 11px; color: var(--c); }
.topic-pill.big { background: var(--c); color: #fff; font-weight: 700; }
.topic-pill.big b { color: #fff; opacity: .85; }
.topic-pill.add { border-style: dashed; --c: #9aa0b4; background: transparent; }
.topic-pill.tiny { padding: 1px 8px; font-size: 12px; border-width: 1px; }
.sub-topics { margin: 4px 0 14px; gap: 6px; flex-wrap: wrap; }
.crumbs { margin: 0 0 4px; }
.topic-title { border-left: 8px solid var(--c); padding-left: 12px; }
.composer { border: 2px solid color-mix(in srgb, var(--c) 45%, white); }
.composer textarea { width: 100%; resize: vertical; border: 0; background: transparent; font: inherit; padding: 4px 0; }
.composer textarea:focus { outline: none; }
.composer.drag { border-style: dashed; background: color-mix(in srgb, var(--c) 10%, white); }
.file-btn { cursor: pointer; }
.pending { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.pending-item { display: inline-flex; align-items: center; gap: 6px; background: #f4f0fb; border-radius: 10px; padding: 4px 8px; font-size: 13px; max-width: 100%; }
.pending-item img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; }
.pending-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.pending-item button { border: 0; background: none; font-size: 16px; cursor: pointer; }
.notes { columns: 260px; column-gap: 14px; }
.note { break-inside: avoid; background: var(--card, #fff); border-radius: 16px; padding: 12px 14px; margin: 0 0 14px; box-shadow: 0 2px 10px rgba(60, 30, 90, .08); position: relative; }
.card .note { border: 1px solid #eee6f6; box-shadow: none; }
.note.pinned { outline: 2px solid #f08c00; }
.note .pin { position: absolute; top: 6px; right: 8px; }
.note-img img { display: block; width: 100%; height: auto; border-radius: 10px; background: #f4f0fb; }
.note-file { display: block; background: #f4f0fb; border-radius: 10px; padding: 10px 12px; text-decoration: none; overflow-wrap: anywhere; }
.note-link { display: grid; gap: 2px; background: #f4f0fb; border-radius: 10px; padding: 10px 12px; text-decoration: none; color: inherit; }
.note-link span { font-size: 12px; color: #6b6880; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-body { margin: 8px 0 0; overflow-wrap: anywhere; }
.note-body:first-child { margin-top: 0; }
.note footer { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.note-acts { margin-left: auto; display: flex; gap: 2px; }
.note-acts button { border: 0; background: none; cursor: pointer; padding: 4px 6px; border-radius: 8px; color: #9aa0b4; font: inherit; }
.note-acts button:hover { background: #f4f0fb; }
.note-acts .like.on { color: #d6409f; }
.sketch-dialog { width: min(96vw, 900px); }
.sketch-dialog canvas { width: 100%; height: auto; aspect-ratio: 3 / 2; border: 2px solid #eee6f6; border-radius: 12px; touch-action: none; cursor: crosshair; background: #fff; display: block; margin: 8px 0; }
.inks { gap: 6px; }
.ink { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #ddd; background: var(--c); cursor: pointer; font-size: 13px; }
.ink.on { outline: 3px solid var(--peri); outline-offset: 2px; }
@media (max-width: 700px) {
  .search input { width: 130px; }
  .notes { columns: 1; }
}
