/* ==========================================================================
   RaiseTheNorth — AI Investor Match, "Dawn" styling
   Extends the shared design system (css/styles.css). Linked only by match.html.
   All match-app.js hooks (ids + class names) are preserved; only presentation
   changes. Warm paper ground, white rounded cards, one maple accent.
   ========================================================================== */

body { display: flex; flex-direction: column; min-height: 100vh; }

.page-body { flex: 1; min-width: 0; display: flex; flex-direction: column; width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 28px; }

/* ─── Form view ──────────────────────────────────────────────────────────── */
#view-input { flex: 1; min-width: 0; }

.match-hero { max-width: 920px; margin: 0; padding: 3.25rem 0 .25rem; }
.match-hero .eyebrow { display: inline-flex; align-items: center; gap: .4rem; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; color: var(--live); margin-bottom: 1rem; }
.match-hero h1 { font-family: var(--exp); font-size: clamp(2.4rem, 5.5vw, 4rem); font-weight: 800; letter-spacing: -.035em; line-height: 1; color: var(--ink); max-width: 20ch; margin-bottom: 1.1rem; }
.match-hero-sub { font-size: 1rem; color: var(--ink-2); line-height: 1.55; max-width: 60ch; }
@media (max-width: 620px) { .match-hero { padding: 2rem 0 .25rem; } .page-body { padding: 0 1.1rem; } }

.match-form-wrap {
  max-width: 920px; margin: 2.25rem 0 4rem;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 16px; box-shadow: var(--shadow); overflow: hidden;
}

.form-section { padding: 1.5rem 1.75rem; border-top: 1px solid var(--line); }
.form-section:first-child { border-top: none; }
.form-section-title { font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 1.25rem; }

.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-col { flex: 1; min-width: 150px; }
.form-label { display: block; font-size: .78rem; font-weight: 500; color: var(--ink-2); margin-bottom: .4rem; }

.form-input, .form-select, .form-textarea {
  width: 100%; font-family: var(--sans); font-size: .88rem; color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--line-2); border-radius: 10px;
  padding: .6rem .8rem; outline: none; appearance: none; letter-spacing: -.01em;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.form-select { -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239a9186'%3E%3Cpath d='M6 8L2 4h8z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .7rem center; padding-right: 1.8rem; }
.form-input:focus, .form-select:focus, .form-textarea:focus { background: var(--surface); border-color: #d8b7ae; box-shadow: 0 0 0 4px rgba(220,38,38,.08); }
.form-textarea { resize: vertical; min-height: 150px; line-height: 1.6; }
.form-textarea::placeholder, .form-input::placeholder { color: var(--ink-3); }

/* Input tabs */
.input-tabs { display: flex; gap: 0; margin-bottom: 1.25rem; border-bottom: 1px solid var(--line-2); }
.input-tab { display: flex; align-items: center; gap: .35rem; padding: .5rem .85rem; font-family: var(--sans); font-size: .78rem; font-weight: 500; color: var(--ink-3); background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; margin-bottom: -1px; transition: color var(--transition), border-color var(--transition); }
.input-tab:hover { color: var(--ink-2); }
.input-tab.active { color: var(--ink); border-bottom-color: var(--live); font-weight: 700; }
.input-panel { display: none; }
.input-panel.active { display: block; }

/* Raise */
.raise-row { display: flex; align-items: center; gap: .5rem; }
.raise-sep { font-size: .88rem; font-weight: 500; color: var(--ink-2); white-space: nowrap; }

/* Stage + identity pills */
.stage-grid, .check-grid { display: flex; gap: .35rem; flex-wrap: wrap; }
.stage-pill, .check-pill {
  display: inline-flex; align-items: center; gap: .3rem; padding: .35rem .75rem;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px;
  font-family: var(--sans); font-size: .74rem; font-weight: 500; color: var(--ink-2);
  cursor: pointer; transition: all var(--transition); user-select: none;
}
.check-pill input { display: none; }
.stage-pill:hover, .check-pill:hover { border-color: #cdbfae; color: var(--ink); }
.stage-pill.selected, .check-pill.checked { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Drop zone */
.drop-zone { border: 1px dashed var(--line-2); border-radius: 12px; padding: 2.5rem 1.5rem; text-align: center; cursor: pointer; transition: all var(--transition); position: relative; background: var(--paper-2); }
.drop-zone:hover, .drop-zone.dragover { border-color: var(--live); background: #fdeee9; }
.drop-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-zone-icon { font-size: 2rem; margin-bottom: .5rem; }
.drop-zone-label { font-size: .88rem; font-weight: 500; color: var(--ink); margin-bottom: .25rem; }
.drop-zone-hint { font-size: .72rem; color: var(--ink-3); }

/* Warning */
.alert-warning { background: #fdebe9; border: 1px solid #f3c7c1; border-radius: 10px; padding: .6rem .9rem; font-size: .8rem; color: #8a2a20; margin-bottom: .75rem; }

/* Submit */
.btn-submit {
  width: 100%; padding: .85rem; background: var(--live); color: #fff; border: none;
  border-radius: 10px; font-family: var(--sans); font-size: .92rem; font-weight: 700;
  letter-spacing: -.01em; cursor: pointer; display: flex; align-items: center;
  justify-content: center; gap: .5rem; transition: background var(--transition), transform .12s var(--ease); margin-top: .25rem;
}
.btn-submit:hover:not(:disabled) { background: var(--live-ink); }
.btn-submit:active:not(:disabled) { transform: translateY(1px); }
.btn-submit:disabled { opacity: .4; cursor: not-allowed; }
.btn-submit svg { transition: transform var(--transition); }
.btn-submit:hover:not(:disabled) svg { transform: translateX(3px); }

/* How the data powers the match */
.how-match { max-width: 920px; margin: 0; padding: 2.25rem 0 3.5rem; border-top: 1px solid var(--line); }
.how-match .k { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; color: var(--ink-3); margin-bottom: 1.4rem; }
.how-match .how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.how-match .step .sn { font-family: var(--mono); font-size: .8rem; font-weight: 600; color: var(--live); }
.how-match .step h5 { font-family: var(--exp); font-size: 1rem; font-weight: 700; margin: .4rem 0 .3rem; letter-spacing: -.02em; color: var(--ink); }
.how-match .step p { font-size: .82rem; color: var(--ink-2); line-height: 1.5; }
@media (max-width: 620px) { .how-match .how-grid { grid-template-columns: 1fr; gap: 1.2rem; } .how-match { padding: 1.75rem 0 2.5rem; } }

/* Market-context panel */
.market-context { margin-top: 2.25rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
.market-context .mc-head { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-3); margin-bottom: .35rem; }
.market-context .mc-sub { font-size: .85rem; color: var(--ink-2); line-height: 1.5; margin-bottom: 1.25rem; max-width: 60ch; }
.market-context .mc-card { border: 1px solid var(--line-2); border-left: 3px solid var(--live); border-radius: 10px; padding: .95rem 1.1rem; margin: 0 0 .8rem; background: var(--surface); box-shadow: var(--shadow); }
.market-context .mc-title { font-size: .92rem; font-weight: 700; letter-spacing: -.01em; color: var(--ink); margin-bottom: .35rem; }
.market-context .mc-text { font-size: .87rem; color: var(--ink-2); line-height: 1.55; margin-bottom: .55rem; }
.market-context .mc-src { font-size: .72rem; color: var(--ink-3); }
.market-context .mc-src a { color: var(--ink-2); text-decoration: underline; }
.market-context .mc-geo { display: inline-block; font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: .08rem .4rem; border-radius: 4px; margin-right: .45rem; background: var(--paper-2); color: var(--ink-2); }
.market-context .mc-geo.us { background: #fef3c7; color: #92400e; }

/* Sharpen bar */
.sharpen-bar { position: relative; overflow: hidden; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); padding: 1.2rem 1.3rem; margin-bottom: 1.25rem; }
.sharpen-bar[hidden] { display: none; }
.sharpen-bar::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--live); }
.sharpen-bar::after { content: ''; position: absolute; top: 0; bottom: 0; width: 45%; left: -70%; background: linear-gradient(100deg, transparent, rgba(220,38,38,.08), transparent); animation: fa-shine 4s ease-in-out infinite; pointer-events: none; }
@keyframes fa-shine { 0% { left: -70%; } 55%, 100% { left: 130%; } }
.sharpen-bar .sh-head, .sharpen-bar .sh-tabs, .sharpen-bar .sh-body, .sharpen-bar .sh-foot { position: relative; z-index: 1; }
.sh-head { margin-bottom: .9rem; }
.sh-title { font-family: var(--exp); font-size: .98rem; font-weight: 700; letter-spacing: -.02em; color: var(--ink); display: flex; align-items: center; gap: .4rem; }
.sh-spark { color: var(--live); display: inline-block; animation: sh-twinkle 1.9s ease-in-out infinite; }
@keyframes sh-twinkle { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .sharpen-bar::after, .sh-spark { animation: none; } }
.sh-sub { font-size: .82rem; color: var(--ink-2); margin-top: .25rem; line-height: 1.45; }
.sh-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line-2); margin-bottom: .9rem; }
.sh-tab { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .7rem; font-family: var(--sans); font-size: .76rem; font-weight: 500; color: var(--ink-3); background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; transition: color var(--transition), border-color var(--transition); }
.sh-tab:hover { color: var(--ink-2); }
.sh-tab.active { color: var(--ink); border-bottom-color: var(--live); font-weight: 700; }
.sh-tab svg { flex-shrink: 0; }
.sh-text, .sh-line { width: 100%; font-family: var(--sans); font-size: .85rem; color: var(--ink); background: var(--paper-2); border: 1px solid var(--line-2); border-radius: 10px; padding: .7rem .8rem; outline: none; letter-spacing: -.01em; }
.sh-text { min-height: 84px; resize: vertical; line-height: 1.5; display: block; }
.sh-text[hidden], .sh-line[hidden], .sh-drop[hidden] { display: none; }
.sh-text::placeholder, .sh-line::placeholder { color: var(--ink-3); }
.sh-text:focus, .sh-line:focus { background: var(--surface); border-color: #d8b7ae; box-shadow: 0 0 0 4px rgba(220,38,38,.08); }
.sh-drop { display: block; border: 1px dashed var(--line-2); border-radius: 10px; background: var(--paper-2); padding: 1.2rem 1rem; text-align: center; cursor: pointer; font-size: .8rem; color: var(--ink-2); line-height: 1.5; transition: border-color var(--transition), color var(--transition); }
.sh-drop:hover { border-color: var(--live); color: var(--ink); }
.sh-drop.has-file { border-style: solid; border-color: var(--live); color: var(--ink); }
.sh-drop input { display: none; }
.sh-foot { display: flex; align-items: center; gap: .9rem; margin-top: .9rem; }
.sh-btn { background: var(--live); color: #fff; border: none; border-radius: 9px; padding: .6rem 1.1rem; font-family: var(--sans); font-weight: 700; font-size: .82rem; display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; transition: background var(--transition), gap var(--transition); }
.sh-btn:hover:not(:disabled) { background: var(--live-ink); gap: .6rem; }
.sh-btn:disabled { opacity: .4; cursor: not-allowed; }
.sh-status { font-size: .78rem; color: var(--ink-2); }
.sh-status.ok { color: #16794a; }
.sh-adjust { position: relative; z-index: 1; margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--line-2); }
.sh-adjust-k { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-3); margin-bottom: .6rem; }
.sh-adjust .stage-grid { margin-bottom: .6rem; }
.sh-adjust-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.sh-adjust-row .form-select, .sh-adjust-row .form-input { flex: 1; min-width: 150px; }

/* ─── Loading ────────────────────────────────────────────────────────────── */
.match-loading { display: none; flex-direction: column; align-items: center; justify-content: center; padding: 5rem 1.5rem; min-height: 360px; text-align: center; }
.match-loading.active { display: flex; }
.loading-ring { width: 36px; height: 36px; border: 2px solid var(--line-2); border-top-color: var(--live); border-radius: 50%; animation: spin .9s linear infinite; margin-bottom: 1.5rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-step { font-family: var(--exp); font-size: 1rem; font-weight: 700; color: var(--ink); margin-bottom: .4rem; }
.loading-sub { font-size: .82rem; color: var(--ink-2); }

/* ─── Results ────────────────────────────────────────────────────────────── */
.match-results { display: none; max-width: 1060px; margin: 0; padding: 2rem 0 4rem; gap: 1.5rem; width: 100%; }
.match-results.active { display: grid; grid-template-columns: 230px 1fr; }

.match-sidebar { position: relative; }
.sidebar-sticky { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: .75rem; }
.sidebar-card { background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); padding: 1.25rem; }
.sidebar-card-title { font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .85rem; }
.profile-summary { font-size: .84rem; font-weight: 700; color: var(--ink); line-height: 1.45; margin-bottom: .85rem; padding-bottom: .85rem; border-bottom: 1px solid var(--line); }
.profile-row { display: flex; align-items: flex-start; justify-content: space-between; gap: .4rem; margin-bottom: .45rem; font-size: .74rem; }
.profile-key { color: var(--ink-3); font-weight: 400; flex-shrink: 0; min-width: 60px; }
.profile-val { color: var(--ink); font-weight: 700; text-align: right; }
.profile-tags { display: flex; flex-wrap: wrap; gap: .25rem; justify-content: flex-end; }
.profile-tag { font-size: .62rem; font-weight: 500; padding: .1rem .4rem; border-radius: 5px; border: 1px solid var(--line-2); color: var(--ink-2); background: var(--paper-2); }
.btn-restart { width: 100%; padding: .6rem; background: var(--surface); border: 1px solid var(--line-2); border-radius: 9px; font-family: var(--sans); font-size: .74rem; font-weight: 500; color: var(--ink-2); cursor: pointer; transition: all var(--transition); }
.btn-restart:hover { border-color: #cdbfae; color: var(--ink); }

.match-count { font-size: .74rem; font-weight: 500; color: var(--ink-3); margin-bottom: .75rem; }
.match-list { display: flex; flex-direction: column; gap: .75rem; }

/* Warm intro finder */
.warm-intro-bar { border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); padding: .95rem 1.1rem; margin-bottom: 1rem; }
.warm-intro-bar.active { border-color: var(--live); }
.wi-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wi-main { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.wi-icon { font-size: 1.1rem; flex: none; }
.wi-title { font-size: .88rem; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.wi-sub { font-size: .74rem; color: var(--ink-2); line-height: 1.4; }
.wi-actions { display: flex; align-items: center; gap: .75rem; flex: none; }
.wi-btn { font-size: .76rem; font-weight: 600; cursor: pointer; white-space: nowrap; background: var(--ink); color: #fff; border-radius: 8px; padding: .5rem .85rem; transition: background var(--transition); }
.wi-btn:hover { background: var(--live); }
.wi-forget { font-size: .72rem; color: var(--ink-3); background: none; border: none; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; padding: 0; }
.wi-forget:hover { color: var(--ink); }
.wi-help-toggle { display: inline-flex; align-items: center; gap: .35rem; margin-top: .45rem; background: none; border: none; padding: 0; cursor: pointer; font-size: .72rem; font-weight: 600; color: var(--ink-2); transition: color var(--transition); }
.wi-help-toggle:hover { color: var(--ink); }
.wi-chev { flex: none; transition: transform var(--transition); }
.wi-help-toggle[aria-expanded="true"] .wi-chev { transform: rotate(90deg); }
.wi-help { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.wi-help.open { max-height: 36rem; }
.wi-help-inner { margin-top: .85rem; padding-top: .85rem; border-top: 1px solid var(--line); }
.wi-steps { margin: 0; padding-left: 1.2rem; }
.wi-steps li { font-size: .8rem; color: var(--ink-2); line-height: 1.55; margin-bottom: .5rem; }
.wi-steps a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.wi-steps strong { font-weight: 700; color: var(--ink); }
.wi-note { font-size: .72rem; color: var(--ink-3); line-height: 1.5; margin-top: .6rem; }
.wi-note strong { color: var(--ink-2); }

/* Warm paths inside a match card */
.wp-badge { font-size: .66rem; font-weight: 700; color: var(--live); border: 1px solid var(--live); padding: .1rem .45rem; border-radius: 999px; white-space: nowrap; }
.warm-paths { border: 1px solid var(--line-2); border-radius: 10px; background: var(--paper-2); padding: .85rem 1rem; margin-bottom: 1rem; }
.warm-paths-title { font-size: .6rem; text-transform: uppercase; letter-spacing: .12em; color: var(--live); font-weight: 700; margin-bottom: .6rem; }
.warm-path { display: flex; gap: .6rem; align-items: flex-start; font-size: .82rem; color: var(--ink-2); line-height: 1.45; padding: .35rem 0; }
.wp-tag { flex: none; margin-top: .1rem; font-size: .58rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: .1rem .4rem; border-radius: 4px; border: 1px solid var(--line-2); color: var(--ink-2); }
.wp-tag.wp-at-fund { background: var(--live); color: #fff; border-color: var(--live); }
.wp-tag.wp-portfolio { border-color: var(--ink); color: var(--ink); }
.wp-body { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.wp-text { min-width: 0; }
.wp-draft-btn { align-self: flex-start; font-size: .68rem; font-weight: 600; cursor: pointer; background: var(--surface); border: 1px solid var(--line-2); border-radius: 7px; color: var(--ink-2); padding: .25rem .6rem; transition: border-color var(--transition), color var(--transition); }
.wp-draft-btn:hover { border-color: var(--ink); color: var(--ink); }
.wp-draft-btn:disabled { opacity: .55; cursor: default; }
.wp-draft-text { white-space: pre-wrap; font-size: .8rem; color: var(--ink-2); line-height: 1.55; background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; padding: .75rem; }
.wp-copy { align-self: flex-start; margin-top: .4rem; font-size: .68rem; font-weight: 600; cursor: pointer; background: var(--ink); color: #fff; border: none; border-radius: 7px; padding: .3rem .7rem; transition: background var(--transition); }
.wp-copy:hover { background: var(--live); }
.warm-path-more { font-size: .72rem; color: var(--ink-3); margin-top: .35rem; }
.warm-none { font-size: .78rem; color: var(--ink-2); margin-bottom: 1rem; }
.warm-none strong { color: var(--ink); font-weight: 700; }

/* ─── Match cards ────────────────────────────────────────────────────────── */
.match-card { background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; transition: transform .14s var(--ease), box-shadow .15s, border-color var(--transition); }
.match-card:hover { border-color: #d9ccbd; box-shadow: var(--shadow-lg); }
.match-card.tier-strong { border-left: 3px solid var(--live); }
.match-card.wildcard { border-style: dashed; }
.match-card-top { display: flex; align-items: center; gap: .85rem; padding: 1rem 1.25rem; cursor: pointer; }
.match-logo { width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--line-2); background: var(--paper-2); }
.match-logo img { width: 100%; height: 100%; object-fit: contain; }
.match-card-info { flex: 1; min-width: 0; }
.match-name-row { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-bottom: .15rem; }
.match-card-name { font-size: .92rem; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.tier-badge { display: inline-flex; align-items: center; gap: .2rem; padding: .1rem .4rem; border-radius: 5px; font-size: .6rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; flex-shrink: 0; border: 1px solid var(--line-2); color: var(--ink-3); background: transparent; }
.tier-badge.tier-strong { background: var(--live); color: #fff; border-color: var(--live); }
.tier-badge.tier-good { background: transparent; color: var(--ink-2); border-color: var(--line-2); }
.tier-badge.tier-possible { background: transparent; color: var(--ink-3); border-color: var(--line); }
.tier-badge.tier-wildcard { background: transparent; color: var(--ink-2); border-color: var(--line-2); border-style: dashed; }
.match-card-hq { font-size: .7rem; color: var(--ink-3); font-weight: 400; }
.match-scores { display: flex; flex-direction: column; gap: .3rem; min-width: 110px; flex-shrink: 0; }
.score-row { display: flex; align-items: center; gap: .4rem; }
.score-label { font-size: .58rem; font-weight: 700; color: var(--ink-3); width: 42px; flex-shrink: 0; text-align: right; letter-spacing: .04em; text-transform: uppercase; }
.score-track { flex: 1; height: 4px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.score-fill { height: 100%; background: var(--ink-3); border-radius: 99px; transition: width .6s cubic-bezier(.4,0,.2,1); }
.score-fill.fill-red { background: var(--live); }
.score-pct { font-family: var(--mono); font-size: .6rem; font-weight: 600; color: var(--ink-2); width: 26px; text-align: right; }
.match-chevron { color: var(--ink-3); flex-shrink: 0; transition: transform var(--transition); }
.match-card.expanded .match-chevron { transform: rotate(180deg); }

/* Badge strip */
.match-card-strip { display: flex; align-items: center; gap: .3rem; padding: 0 1.25rem .85rem; flex-wrap: wrap; }
.badge { display: inline-block; padding: .12rem .45rem; border-radius: 5px; font-size: .62rem; font-weight: 600; letter-spacing: .02em; border: 1px solid var(--line-2); color: var(--ink-2); background: var(--paper-2); }
.badge-other { color: var(--ink-3); background: transparent; border-color: var(--line); }
.tag { display: inline-block; padding: .12rem .4rem; border-radius: 5px; font-size: .62rem; font-weight: 500; border: 1px solid var(--line-2); color: var(--ink-2); background: transparent; }

/* Expanded body */
.match-card-body { border-top: 1px solid var(--line); padding: 1.25rem; display: none; flex-direction: column; gap: 1rem; }
.match-card.expanded .match-card-body { display: flex; }
.explanation-area { font-size: .84rem; line-height: 1.7; color: var(--ink-2); }
.explanation-area .loading-pulse { height: 10px; background: var(--line-2); border-radius: 4px; margin-bottom: .5rem; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.fund-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem 1rem; font-size: .78rem; }
.fund-detail-row { display: contents; }
.fund-detail-key { color: var(--ink-3); font-weight: 400; }
.fund-detail-val { color: var(--ink); font-weight: 700; }
.match-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.btn-pitch { flex: 1; min-width: 120px; padding: .55rem .85rem; background: var(--ink); color: #fff; border: none; border-radius: 9px; font-family: var(--sans); font-size: .78rem; font-weight: 700; cursor: pointer; transition: all var(--transition); display: flex; align-items: center; justify-content: center; gap: .3rem; }
.btn-pitch:hover { background: #000; }
.btn-pitch.loading { opacity: .45; pointer-events: none; }
.btn-visit { padding: .55rem .85rem; background: var(--surface); color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 9px; font-family: var(--sans); font-size: .78rem; font-weight: 500; cursor: pointer; text-decoration: none; transition: all var(--transition); display: flex; align-items: center; gap: .3rem; }
.btn-visit:hover { border-color: var(--ink); color: var(--ink); }
.pitch-drawer { background: var(--paper-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 1rem; font-size: .82rem; line-height: 1.75; display: none; white-space: pre-wrap; color: var(--ink-2); }
.pitch-drawer.active { display: block; }
.pitch-drawer strong, .pitch-drawer b { font-weight: 700; color: var(--ink); }
.wildcard-label { display: flex; align-items: center; gap: .3rem; font-size: .65rem; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; padding: .4rem 1.25rem; background: var(--paper-2); border-top: 1px solid var(--line); }
.match-empty { text-align: left; padding: 2.5rem 1rem; color: var(--ink-3); }
.match-empty h3 { font-family: var(--exp); font-size: 1rem; font-weight: 700; color: var(--ink); margin-bottom: .35rem; }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .match-results.active { grid-template-columns: 1fr; }
  .match-sidebar .sidebar-sticky { position: static; }
}
@media (max-width: 600px) {
  .wi-row { flex-direction: column; align-items: stretch; }
  .form-row { flex-direction: column; }
  .match-scores { display: none; }
  .fund-detail-grid { grid-template-columns: 1fr; }
}
