/* Sparkship app: the signed-in screens, sign-in and legal pages, built from the same tokens as site.css */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.nav-space { margin-right: auto; }
.nav-in > .btn + .btn { margin-left: -24px; }

/* App nav */
.app-links a[aria-current="page"] { color: var(--ink); background: rgba(23,16,58,.06); }
.nav-me { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--acc-soft); color: var(--acc-ink); font-weight: 600; font-size: 15px; box-shadow: inset 0 0 0 1px rgb(var(--acc-rgb) / .18); transition: background .15s; }
.nav-me:hover, .nav-me[aria-current="page"] { background: var(--acc); color: #fff; }
.tabbar { display: none; }

.app-main { padding: 112px 0 72px; min-height: calc(100vh - 80px); }
.app .wrap { max-width: 1200px; }
.app-foot { border-top: 1px solid var(--line); padding: 20px 0 24px; font-size: 13.5px; color: var(--muted); }
.app-foot-in { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.app-foot a, .app-foot .linkish { color: var(--muted); margin-left: 16px; font-size: 13.5px; font-weight: 400; }
.app-foot a:hover, .app-foot .linkish:hover { color: var(--ink); }

/* Page heads */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 32px; }
.page-head h1 { font-size: clamp(32px, 3.4vw, 44px); line-height: 1.05; letter-spacing: -0.04em; }
.page-head .lead { margin-top: 12px; font-size: 17px; max-width: 60ch; }
.page-head > .btn { flex: none; }
.crumb { font-size: 14px; margin-bottom: 12px; }
.crumb a { color: var(--muted); }
.crumb a::before { content: "← "; }
.crumb a:hover { color: var(--ink); }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; font-size: 14.5px; }
.link-inline { font-weight: 600; color: var(--acc-ink); text-decoration: underline; text-decoration-color: rgb(var(--acc-rgb) / .35); text-underline-offset: 4px; }
.link-inline:hover { text-decoration-color: var(--acc); }
.pitch { white-space: pre-line; }
.last-note { margin-top: 12px; font-size: 14.5px; color: var(--ink-2); max-width: 70ch; }

.flash { margin-bottom: 20px; padding: 12px 16px; border-radius: var(--r-md); font-size: 14.5px; font-weight: 500; }
.flash-ok { background: var(--live-soft); color: var(--live-ink); }
.flash-alert { background: #fdecec; color: #9b1c1c; }
.callout { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; padding: 14px 18px; border-radius: var(--r-lg); background: var(--acc-pale); box-shadow: inset 0 0 0 1px rgb(var(--acc-rgb) / .14); font-size: 14.5px; color: var(--ink-2); }
.empty { padding: 28px; font-size: 15px; color: var(--muted); }

/* Cards and blocks */
.block { overflow: hidden; }
.block > .card-title, .side-card > .card-title, .form-card > .card-title { display: block; }
h2.card-title { font-size: 15px; letter-spacing: -0.015em; display: flex; align-items: center; gap: 10px; }
.sub-title { margin-top: 28px; }
.two-col { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: start; }
.form-card, .side-card { padding: 24px 28px; }
.side-note { margin-top: 8px; font-size: 14px; color: var(--body); line-height: 1.5; }

/* Forms */
.form { display: flex; flex-direction: column; gap: 16px; margin-top: 18px; }
.form-tight { gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.field input, .field textarea, .field select {
  width: 100%; min-height: 44px; padding: 10px 14px; border: 0; border-radius: 12px; background: #fff;
  font: inherit; font-size: 16px; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2), var(--sh-1);
}
.field textarea { resize: vertical; line-height: 1.5; }
.field select { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field input:hover, .field textarea:hover, .field select:hover { box-shadow: inset 0 0 0 1px #b4bac5, var(--sh-1); }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--acc); outline-offset: 1px; box-shadow: inset 0 0 0 2px var(--acc), 0 0 0 4px rgb(var(--acc-rgb) / .14); }
.field ::placeholder { color: #8a909c; }
.field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form > .btn { align-self: flex-start; }
.btn-block { width: 100%; }
.form > .btn-block { align-self: stretch; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-danger { background: #fff; color: #9b1c1c; box-shadow: inset 0 0 0 1px #f0c4c4, var(--sh-1); }
.btn-danger:hover { background: #fdecec; }
button.btn { border: 0; cursor: pointer; font-family: inherit; }
.inline-form { display: inline; }
.linkish { display: inline-flex; align-items: center; min-height: 44px; border: 0; background: none; padding: 0 2px; font: inherit; font-size: 14.5px; font-weight: 500; color: var(--acc-ink); cursor: pointer; text-decoration: underline; text-decoration-color: rgb(var(--acc-rgb) / .35); text-underline-offset: 4px; }
.check-line { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ink-2); min-height: 44px; }
.check-line input { width: 18px; height: 18px; accent-color: var(--acc); }

/* Sign-in */
.auth { position: relative; display: grid; place-items: center; min-height: 100vh; padding: 120px 20px 64px; }
.auth::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(23,16,58,.14) 1px, transparent 1.4px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(50% 50% at 50% 50%, #000 0%, transparent 80%); mask-image: radial-gradient(50% 50% at 50% 50%, #000 0%, transparent 80%);
}
.auth-card { position: relative; width: 100%; max-width: 440px; padding: 36px 32px 28px; box-shadow: 0 0 0 1px var(--line), var(--sh-3); }
.auth-card h1 { font-size: 30px; letter-spacing: -0.04em; line-height: 1.1; }
.auth-lead { margin: 10px 0 22px; font-size: 15.5px; color: var(--body); line-height: 1.5; overflow-wrap: anywhere; }
.auth-card .form { margin-top: 0; }
.code-input { font-size: 24px !important; letter-spacing: .3em; text-align: center; font-weight: 600; }
.auth-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 18px; font-size: 14px; }
.auth-foot { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); line-height: 1.5; }
.auth-foot a { text-decoration: underline; text-underline-offset: 3px; }

/* Legal */
.legal { max-width: 760px; padding-top: 136px; padding-bottom: 96px; }
.legal h1 { font-size: clamp(36px, 4vw, 52px); letter-spacing: -0.045em; line-height: 1.05; }
.legal-date { margin-top: 12px; font-size: 14px; color: var(--muted); }
.legal h2 { margin: 40px 0 12px; font-size: 22px; letter-spacing: -0.03em; }
.legal p, .legal li { font-size: 16.5px; line-height: 1.6; color: var(--body); max-width: 56ch; }
.legal p + p, .legal ul + p, .legal ol + p { margin-top: 14px; }
.legal > p:first-of-type { margin-top: 0; }
.legal-date + p { margin-top: 28px !important; }
.legal ul, .legal ol { margin: 12px 0 0 0; padding-left: 22px; }
.legal ul { list-style: disc; }
.legal ol { list-style: decimal; }
.legal li + li { margin-top: 6px; }
.legal strong { color: var(--ink); font-weight: 600; }
.legal a { color: var(--acc-ink); text-decoration: underline; text-underline-offset: 3px; }

/* Portfolio table */
.pf-app th, .pf-app td { padding: 0 18px; height: 64px; }
.pf-app th:first-child, .pf-app td:first-child { padding-left: 28px; }
.pf-app th:last-child, .pf-app td:last-child { padding-right: 28px; }
.pf-app thead th { height: 44px; white-space: nowrap; }
.pf-app td { font-size: 14.5px; color: var(--ink-2); white-space: nowrap; }
.pf-name { display: inline-block; padding: 2px 0; min-height: 24px; font-weight: 600; letter-spacing: -0.015em; }
.pf-name:hover { color: var(--acc-ink); text-decoration: underline; text-underline-offset: 4px; }
.pf-url { display: block; font-size: 13px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.pf-app tbody th { padding-top: 10px; padding-bottom: 10px; }
.pf-app .bar { width: 72px; }
.pf-num { font-weight: 500; }
.pf-sub { margin-left: 8px; font-size: 13px; color: var(--muted); }
.pf-when { color: var(--body); }
.pf-last { display: block; }
.pf-note { display: block; font-size: 13px; color: var(--muted); max-width: 26ch; white-space: normal; line-height: 1.4; }
a.tag-acc:hover { background: #ddd5ff; }

/* Project page */
.proj-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 16px; align-items: start; }
.proj-main, .proj-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.big-num { margin-top: 12px; font-size: 40px; font-weight: 600; letter-spacing: -0.045em; line-height: 1; }
.side-meter { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 14px; font-weight: 600; }
.side-meter .bar { flex: 1; width: auto; margin: 0; }
.warn-line { margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.decision-now { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 14px; }

.asks > li { padding: 22px 28px; }
.asks > li + li { border-top: 1px solid var(--line); }
.ask-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; }
.ask-q { margin-top: 10px; font-size: 16px; font-weight: 500; color: var(--ink); line-height: 1.5; max-width: 70ch; }
.ask-closed .ask-q { color: var(--ink-2); font-weight: 400; }
.ask-a { margin-top: 10px; font-size: 14.5px; color: var(--body); }
.ask-a strong { color: var(--ink); }
.ask-form { margin-top: 14px; }
.choices { border: 0; display: flex; flex-direction: column; gap: 8px; }
.choice { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line-2); font-size: 15px; cursor: pointer; transition: box-shadow .15s, background .15s; }
.choice:hover { background: var(--paper); }
.choice:has(input:checked) { background: var(--acc-pale); box-shadow: inset 0 0 0 2px var(--acc); }
.choice input { width: 18px; height: 18px; flex: none; accent-color: var(--acc); }
.choice span:first-of-type { flex: 1; min-width: 0; }

.stage-list { padding: 8px 0; }
.stage-row { padding: 14px 28px; }
.stage-row + .stage-row { border-top: 1px solid var(--line); }
.stage-row.is-current { background: var(--acc-pale); }
.stage-top { display: flex; align-items: center; gap: 12px; }
.stage-name { flex: 1; min-width: 0; font-weight: 600; font-size: 15.5px; letter-spacing: -0.015em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stage-count { font-size: 14px; color: var(--body); white-space: nowrap; }
.stage-row > .bar { display: block; width: 100%; margin: 10px 0 0; }
.rows { margin-top: 10px; }
.rows summary, .edit-more summary { cursor: pointer; font-size: 14px; font-weight: 500; color: var(--acc-ink); min-height: 44px; display: flex; align-items: center; }
.table-scroll { overflow-x: auto; margin-top: 8px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.rows-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rows-table th { text-align: left; font-weight: 500; color: var(--muted); background: var(--paper); padding: 8px 12px; }
.rows-table td { padding: 8px 12px; border-top: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.rows-table td:first-child { white-space: nowrap; }
.rows-table .ev { color: var(--body); min-width: 240px; }

.events { padding: 8px 28px 16px; }
.events li { padding: 10px 0; font-size: 14.5px; color: var(--body); line-height: 1.5; }
.events li + li { border-top: 1px solid var(--line); }
.ev-who { font-weight: 600; color: var(--ink); }

.link-list { margin-top: 12px; }
.link-list li { display: flex; flex-direction: column; padding: 8px 0; font-size: 14.5px; }
.link-list li + li { border-top: 1px solid var(--line); }
.link-list a { font-weight: 600; color: var(--acc-ink); }
.link-list .muted { font-size: 13px; overflow-wrap: anywhere; }
.edit-more { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.edit-more .form-tight { border-top: 0; padding-top: 0; margin-top: 8px; }

/* Ideas */
.idea-list li { padding: 18px 28px; }
.idea-list li + li { border-top: 1px solid var(--line); }
.idea-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.idea-name { font-weight: 600; font-size: 16px; letter-spacing: -0.015em; }
.idea-name:hover { color: var(--acc-ink); }
.idea-pitch { margin-top: 6px; font-size: 14.5px; color: var(--body); line-height: 1.5; }
.idea-meta { margin-top: 6px; font-size: 13px; }

/* Toolset */
.stages { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.stages .rk { width: 26px; height: 26px; font-size: 12.5px; }
.skill-list { padding: 6px 0; }
.skill-list li { display: flex; gap: 14px; padding: 12px 28px; }
.skill-list li + li { border-top: 1px solid var(--line); }
.skill-n { flex: none; width: 28px; padding-top: 1px; font-size: 13px; font-weight: 600; color: var(--muted); }
.skill-t { font-size: 15px; font-weight: 600; letter-spacing: -0.015em; }
.skill-d { margin-top: 2px; font-size: 14px; color: var(--body); line-height: 1.45; }
.app .subhead { margin: 56px 0 20px; }
.tool-h { margin-top: 16px; font-size: 18px; letter-spacing: -0.03em; }

/* Dataset */
.search { display: grid; grid-template-columns: minmax(0, 1fr) 260px auto; gap: 12px; align-items: end; padding: 20px; border-radius: 24px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.result-line { margin: 20px 0 16px; font-size: 14.5px; color: var(--body); }
.rule-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.rule-id { font-size: 13px; font-weight: 500; color: var(--muted); }
.rule-h { margin-top: 14px; font-size: 20px; letter-spacing: -0.03em; line-height: 1.2; }
.rule dd { min-width: 0; overflow-wrap: anywhere; }
.pager { display: flex; justify-content: center; gap: 12px; margin-top: 28px; }

/* Team */
.member-list { padding: 4px 0; }
.member-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 28px; }
.member-list li + li { border-top: 1px solid var(--line); }
.form-card .member-list li { padding: 12px 0; }
.member-name { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.member-list .muted { font-size: 13.5px; overflow-wrap: anywhere; }
.form-card .member-list + .inline-form .btn, .form-card > form.inline-form, .form-card > .inline-form { margin-top: 12px; }
.danger { box-shadow: 0 0 0 1px #f3d2d2, var(--sh-2); }

/* Bars: widths as classes, since the CSP allows no inline styles */
.w-0 { width: 0%; }
.w-1 { width: 1%; }
.w-2 { width: 2%; }
.w-3 { width: 3%; }
.w-4 { width: 4%; }
.w-5 { width: 5%; }
.w-6 { width: 6%; }
.w-7 { width: 7%; }
.w-8 { width: 8%; }
.w-9 { width: 9%; }
.w-10 { width: 10%; }
.w-11 { width: 11%; }
.w-12 { width: 12%; }
.w-13 { width: 13%; }
.w-14 { width: 14%; }
.w-15 { width: 15%; }
.w-16 { width: 16%; }
.w-17 { width: 17%; }
.w-18 { width: 18%; }
.w-19 { width: 19%; }
.w-20 { width: 20%; }
.w-21 { width: 21%; }
.w-22 { width: 22%; }
.w-23 { width: 23%; }
.w-24 { width: 24%; }
.w-25 { width: 25%; }
.w-26 { width: 26%; }
.w-27 { width: 27%; }
.w-28 { width: 28%; }
.w-29 { width: 29%; }
.w-30 { width: 30%; }
.w-31 { width: 31%; }
.w-32 { width: 32%; }
.w-33 { width: 33%; }
.w-34 { width: 34%; }
.w-35 { width: 35%; }
.w-36 { width: 36%; }
.w-37 { width: 37%; }
.w-38 { width: 38%; }
.w-39 { width: 39%; }
.w-40 { width: 40%; }
.w-41 { width: 41%; }
.w-42 { width: 42%; }
.w-43 { width: 43%; }
.w-44 { width: 44%; }
.w-45 { width: 45%; }
.w-46 { width: 46%; }
.w-47 { width: 47%; }
.w-48 { width: 48%; }
.w-49 { width: 49%; }
.w-50 { width: 50%; }
.w-51 { width: 51%; }
.w-52 { width: 52%; }
.w-53 { width: 53%; }
.w-54 { width: 54%; }
.w-55 { width: 55%; }
.w-56 { width: 56%; }
.w-57 { width: 57%; }
.w-58 { width: 58%; }
.w-59 { width: 59%; }
.w-60 { width: 60%; }
.w-61 { width: 61%; }
.w-62 { width: 62%; }
.w-63 { width: 63%; }
.w-64 { width: 64%; }
.w-65 { width: 65%; }
.w-66 { width: 66%; }
.w-67 { width: 67%; }
.w-68 { width: 68%; }
.w-69 { width: 69%; }
.w-70 { width: 70%; }
.w-71 { width: 71%; }
.w-72 { width: 72%; }
.w-73 { width: 73%; }
.w-74 { width: 74%; }
.w-75 { width: 75%; }
.w-76 { width: 76%; }
.w-77 { width: 77%; }
.w-78 { width: 78%; }
.w-79 { width: 79%; }
.w-80 { width: 80%; }
.w-81 { width: 81%; }
.w-82 { width: 82%; }
.w-83 { width: 83%; }
.w-84 { width: 84%; }
.w-85 { width: 85%; }
.w-86 { width: 86%; }
.w-87 { width: 87%; }
.w-88 { width: 88%; }
.w-89 { width: 89%; }
.w-90 { width: 90%; }
.w-91 { width: 91%; }
.w-92 { width: 92%; }
.w-93 { width: 93%; }
.w-94 { width: 94%; }
.w-95 { width: 95%; }
.w-96 { width: 96%; }
.w-97 { width: 97%; }
.w-98 { width: 98%; }
.w-99 { width: 99%; }
.w-100 { width: 100%; }

@media (max-width: 1100px) {
  .proj-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .pf-app thead th:nth-child(6), .pf-app td:nth-child(6) { display: none; }
}
@media (max-width: 960px) {
  .nav-in > .btn + .btn { margin-left: -4px; }
  .tabbar {
    position: fixed; z-index: 50; left: 10px; right: 10px; bottom: 10px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    height: 60px; padding: 6px; border-radius: 20px; background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 0 0 1px rgba(23,16,58,.08), 0 10px 30px -12px rgba(23,16,58,.3);
  }
  .tabbar a { display: grid; place-items: center; border-radius: 14px; font-size: 13px; font-weight: 500; color: var(--body); }
  .tabbar a[aria-current="page"] { background: var(--acc-soft); color: var(--acc-ink); font-weight: 600; }
  .app { padding-bottom: 80px; }
  .app-main { padding-top: 96px; }
  .two-col, .proj-grid, .stages { grid-template-columns: minmax(0, 1fr); }
  .search { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .search .search-field { grid-column: 1 / -1; }
  .pf-app thead th:nth-child(6), .pf-app td:nth-child(6) { display: table-cell; }
}
@media (max-width: 800px) {
  .pf-app thead { display: none; }
  .pf-app, .pf-app tbody, .pf-app tr, .pf-app th, .pf-app td { display: block; }
  .pf-app tbody tr { padding: 16px 20px; }
  .pf-app tbody tr + tr { border-top: 1px solid var(--line); }
  .pf-app th, .pf-app td, .pf-app th:first-child, .pf-app td:first-child, .pf-app th:last-child, .pf-app td:last-child { height: auto; padding: 0; border: 0 !important; }
  .pf-app tbody th { font-size: 16px; margin-bottom: 8px; padding: 0; }
  .pf-app td, .pf-app td:nth-child(6) { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 34px; font-size: 14.5px; white-space: normal; }
  .pf-app td::before { content: attr(data-l); color: var(--muted); font-size: 13.5px; margin-right: auto; }
  .pf-app .bar { width: 72px; margin: 0 4px 0 12px; }
  .pf-last { text-align: right; }
  .pf-note { max-width: 24ch; margin-left: auto; }
}
@media (max-width: 640px) {
  .page-head { flex-direction: column; align-items: stretch; gap: 16px; margin-bottom: 24px; }
  .page-head > .btn { align-self: flex-start; }
  .form-card, .side-card { padding: 20px; }
  .asks > li, .stage-row, .idea-list li, .member-list li, .skill-list li { padding-left: 20px; padding-right: 20px; }
  .events { padding: 8px 20px 12px; }
  .empty { padding: 20px; }
  .field-pair, .search { grid-template-columns: minmax(0, 1fr); }
  .search .btn { width: 100%; }
  .auth-card { padding: 28px 22px 22px; }
  .idea-top { align-items: flex-start; }
  .member-list li { flex-wrap: wrap; }
  .legal { padding-top: 112px; padding-bottom: 64px; }
  .legal p, .legal li { font-size: 16px; }
}
@media (max-width: 560px) {
  .nav-signin { height: 40px; }
}

/* Tap targets: the pitch's small nav button is 40px; on phones every control reaches 44px. */
@media (max-width: 640px) {
  .nav .btn, .btn-sm { height: 44px; min-height: 44px; }
}
