/* Product system: graphite ground, warm off-white ink, muted lime for actions and focus.
   Loaded only by the product page; the /demo/ concept keeps its own palette from style.css. */
@font-face {
  font-family: "Instrument Sans";
  src: url("assets/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
}
:root {
  --ground: #121212;
  --ink: #ffffff;
  --muted: #a7a7a7;
  --lilac: #cdff47; /* legacy name: the one accent, electric lime */
  --lime-hover: #dcff7a;
  --coral: #ff7a6b;
  --edge: #2a2a2a;
  --panel: #1c1c1c;
  --raised: #262626;
  --quiet-line: #242424;
  --field-line: #3a3a3a;
  --control: 52px;
  --radius: 16px;
  --text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  scrollbar-color: #3a3a3a var(--ground);
}
body { font-size: 1rem; line-height: 1.5; -webkit-font-smoothing: antialiased; }
::selection { color: var(--ground); background: var(--lilac); }
:focus-visible { outline: 2px solid var(--lilac); outline-offset: 2px; border-radius: 4px; }

/* Masthead and footer share the page gutter; every view starts on the same left rail. */
.product-nav { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 32px); }
.product-nav a, .product-nav button { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); white-space: nowrap; text-decoration: none; font-size: .9375rem; }
.product-nav a[aria-current] { color: var(--ink); }
.product-nav a:hover, .product-nav button:hover { color: var(--ink); text-decoration: underline; }
.product-nav button { cursor: pointer; background: transparent; border: 0; padding: 0; }
.product-nav button[hidden] { display: none; }
.product #main { flex: 1; }
.product-footer { min-height: 64px; }
.product .credit, .product-footer a { font-size: .875rem; color: var(--muted); }

/* Type: one display size for the homepage, one calm size for every flow page. */
.product h1 { font-weight: 600; letter-spacing: -.03em; }
.product h1 em { font-style: normal; color: var(--lilac); }
.flow h1 { font-size: clamp(2rem, 3.6vw, 2.75rem); line-height: 1.1; }
.flow h1 em { color: inherit; }
.form-section h2, .result-section h2, .reference h2, .decision-panel h2, .match-row h2 { margin: 0; font-size: 1.125rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }

/* Buttons and fields: 48px controls, 16px text. */
.product .button { min-height: var(--control); padding: 10px 20px; font-weight: 600; font-size: 1rem; border-radius: 8px; }
.product .primary { color: #141512; background: var(--lilac); }
.product .primary:hover { background: var(--lime-hover); }
.product .primary:disabled { color: #8a8c82; background: #262823; }
.product .secondary { color: var(--ink); border-color: var(--field-line); }
.product .secondary:hover { background: #22241f; }
.product .secondary:disabled { color: var(--muted); opacity: .55; cursor: default; background: transparent; }
.product .text-button { min-height: 44px; padding-inline: 0; color: var(--ink); text-decoration-color: var(--lilac); }
.product .text-button:hover { color: var(--lilac); }
.product .text-button.danger { color: var(--coral); text-decoration-color: currentColor; }
.product input:not([type="checkbox"]), .product select { min-height: var(--control); font: inherit; font-size: 1rem; color: var(--ink); border: 1px solid var(--field-line); border-radius: 8px; background: var(--panel); padding: 10px 12px; }
.product select { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.product select:disabled { opacity: .55; }
.product input:not([type="checkbox"]):hover, .product select:not(:disabled):hover { border-color: #6a6c63; }
.product input::placeholder { color: #85837a; }
.product input[type="checkbox"] { accent-color: var(--lilac); width: 20px; height: 20px; margin: 2px 0 0; flex: none; }
.product input[type="file"] { display: block; width: 100%; max-width: 100%; padding: 6px; }
.product input[type="file"]::file-selector-button { min-height: 34px; padding: 6px 12px; margin-right: 10px; color: var(--ink); background: #2a2c26; border: 0; border-radius: 6px; font: inherit; cursor: pointer; }
.manual-link { border-color: var(--field-line); }

/* Flow pages */
.flow { width: min(100%, 720px); padding-block: clamp(32px, 6vh, 64px); }
.flow.with-reference { width: min(100%, 1080px); }
.flow-header { margin-bottom: 24px; }
.flow-header p { color: var(--muted); max-width: 56ch; margin: 12px 0 0; line-height: 1.5; font-size: 1.0625rem; }
.form-section { padding: 20px 0 24px; border-top: 1px solid var(--quiet-line); }
.field-note { color: var(--muted); font-size: .9375rem; margin: 4px 0 12px; line-height: 1.45; }
.section-label, .reference label { display: block; font-weight: 600; margin: 16px 0 8px; }
.field-wide, .reference input[type="url"] { width: 100%; }
.product-feedback { color: var(--coral); margin: 12px 0 0; line-height: 1.45; }
.product-feedback[hidden] { display: none; }
.muted { color: var(--muted); }

/* Intake: picks first, optional reference beside (desktop) or below (phone), Review on the form's left edge. */
.pick-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); column-gap: clamp(24px, 4vw, 56px); align-items: start; }
.pick-layout .pick-form { grid-column: 1; grid-row: 1; }
.pick-layout aside { grid-column: 2; grid-row: 1 / span 2; padding-top: 20px; }
.pick-layout > .form-actions { grid-column: 1; grid-row: 2; margin-top: 0; }
.picker-line { display: flex; gap: 8px; }
.picker-line select { flex: 1; min-width: 0; }
.picker-line .button, .compact-action { min-height: var(--control); padding-inline: 16px; flex: none; }
.selected-list, .match-list { list-style: none; margin: 16px 0 0; padding: 0; }
.selected-list li { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 4px 0; border-bottom: 1px solid var(--quiet-line); }
.selected-list li:first-child { border-top: 1px solid var(--quiet-line); }
.rank { color: var(--lilac); flex: 0 0 18px; font-variant-numeric: tabular-nums; font-weight: 600; }
.pick-name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 500; line-height: 1.35; }
.pick-controls { display: flex; flex: none; align-self: center; }
.pick-controls button { min-height: 44px; min-width: 44px; padding: 0 8px; background: transparent; border: 0; border-radius: 6px; color: var(--muted); cursor: pointer; font-size: .875rem; }
.pick-controls button:hover { color: var(--ink); background: #22241f; }
.pick-controls button:disabled { visibility: hidden; }
.reference { padding: 16px 18px; border: 1px solid var(--edge); border-radius: 12px; background: var(--panel); }
.reference summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 600; color: var(--ink); }
.reference summary { list-style: none; justify-content: space-between; gap: 12px; }
.reference summary::-webkit-details-marker { display: none; }
.reference summary::after { content: '+'; color: var(--lilac); font-size: 1.375rem; font-weight: 400; line-height: 1; }
.reference[open] summary::after { content: '−'; }
.reference[open] summary { margin-bottom: 4px; }
.reference .button { margin-top: 12px; }
.reference [hidden] { display: none; }
.reference-image { display: block; max-height: 420px; width: 100%; object-fit: contain; margin-top: 12px; border-radius: 8px; }
.reference-image[hidden] { display: none; }
.form-actions { display: flex; gap: 12px 16px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.review-list { margin: 8px 0 0; padding-inline-start: 24px; line-height: 1.6; }
.choice { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; line-height: 1.5; cursor: pointer; }
.choice + .choice { border-top: 1px solid var(--quiet-line); }

/* Results and exchange */
.result-section, .decision-panel { padding: 20px 0; border-top: 1px solid var(--quiet-line); }
.result-section p, .decision-panel p { margin: 8px 0 16px; line-height: 1.5; }
.match-list { margin-bottom: 16px; }
.match-list { display: grid; gap: 12px; }
.match-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px 24px; background: var(--panel); border: 1px solid var(--edge); border-radius: 12px; padding: 18px 20px; }
.match-row h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.match-row h2::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--lilac); }
.match-evidence-title { padding-top: 12px; border-top: 1px solid var(--edge); }
.profile-actions { margin: 4px 0 24px; }
.match-row p { color: var(--muted); margin: 4px 0; line-height: 1.5; }
.match-evidence-title { margin: 12px 0 2px; color: var(--lilac); font-size: 1rem; font-weight: 600; }
.swap-note { background: var(--panel); border: 1px solid var(--edge); border-radius: 12px; padding: 18px; margin: 0 0 16px; }
.swap-note p { margin: 0 0 12px; line-height: 1.5; }
.swap-note p:last-child { margin-bottom: 0; }
.popover-area { max-width: 43ch; margin-top: 8px; }
.popover-area summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--muted); }
.popover-area summary:hover { color: var(--ink); }
.popover-area summary { list-style: none; gap: 8px; }
.popover-area summary::-webkit-details-marker { display: none; }
.popover-area summary::after { content: '+'; color: var(--lilac); font-size: 1.25rem; line-height: 1; }
.popover-area[open] summary::after { content: '−'; }
.swap-note:has(> .button:only-child) { background: none; border: 0; padding: 0; }
.follow-up { margin-top: 24px; }
.stacked-fields { display: grid; gap: 4px; }
.stacked-fields[hidden] { display: none; }
.contact-value { overflow-wrap: anywhere; }

@media (max-width: 860px) {
  .pick-layout { grid-template-columns: minmax(0, 1fr); }
  .pick-layout .pick-form, .pick-layout aside, .pick-layout > .form-actions { grid-column: 1; grid-row: auto; }
  .pick-layout aside { padding-top: 4px; }
  .pick-layout > .form-actions { margin-top: 20px; }
}
@media (max-width: 700px) {
  .product .masthead { min-height: 56px; }
  .product-nav { gap: 16px; }
    .flow { padding-block: 28px 40px; }
  .flow-header { margin-bottom: 20px; }
  .flow-header p { font-size: 1rem; }
  .pick-layout > .form-actions .button, .form-actions > .primary { flex: 1 1 100%; }
  .match-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .match-row .button { justify-self: start; }
}
@media (max-width: 360px) {
  .product .masthead { flex-wrap: wrap; row-gap: 0; padding-top: 6px; }
  .product-nav { gap: 12px; }
  .product-nav a, .product-nav button { font-size: .875rem; }
  .picker-line .button { padding-inline: 12px; }
  .pick-controls button { min-width: 40px; padding: 0 6px; }
}

/* Twin flow */
.upload-drop { display: grid; justify-items: start; gap: 10px; padding: 28px 24px; border: 1px dashed var(--field-line); border-radius: 16px; background: var(--panel); cursor: pointer; }
.upload-drop:hover { border-color: var(--lilac); }
.upload-panel:has(input:focus-visible) .upload-drop { outline: 2px solid var(--lilac); outline-offset: 2px; }
.upload-panel:has(input:disabled) .upload-drop { opacity: .6; cursor: progress; }
.upload-title { font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; }
.upload-drop .field-note { max-width: 46ch; margin: 0 0 6px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.field-pair[hidden], #track-fields[hidden] { display: none; }
.segmented { display: inline-flex; gap: 4px; padding: 4px; margin-top: 12px; border: 1px solid var(--edge); border-radius: 10px; background: var(--panel); }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 7px; color: var(--muted); font-weight: 500; }
.segmented input:checked + span { background: var(--lilac); color: #141512; }
.segmented input:focus-visible + span { outline: 2px solid var(--lilac); outline-offset: 2px; }
.twin-found, .twin-waiting { padding: 20px; margin-bottom: 20px; border: 1px solid var(--edge); border-radius: 12px; background: var(--panel); }
.twin-found { border-color: color-mix(in srgb, var(--lilac) 45%, var(--edge)); }
.twin-found h2, .twin-waiting h2 { margin: 0; font-size: 1.125rem; font-weight: 600; }
.twin-found .form-actions, .twin-waiting .form-actions { margin-top: 12px; }

/* Homepage map */
.map-section { padding: 32px 0 48px; border-top: 1px solid var(--edge); }
.map-section h2 { margin: 0; font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 600; letter-spacing: -.02em; }
.twin-map { margin-top: 20px; }
.world { display: block; width: 100%; height: auto; }
.world .land { fill: #23251f; stroke: var(--ground); stroke-width: .5; }
.world .level-1 { fill: #4d5a33; } .world .level-2 { fill: #7b9149; } .world .level-3 { fill: #a9c26c; } .world .level-4 { fill: var(--lilac); }
.world [data-country] { cursor: pointer; }
.world [data-country]:hover, .world .selected { stroke: var(--ink); stroke-width: 1.2; }
.map-detail:not(:empty) { margin-top: 16px; padding: 16px 18px; border: 1px solid var(--edge); border-radius: 12px; background: var(--panel); }
.map-detail h3 { margin: 0; font-size: 1.125rem; font-weight: 600; }
.map-detail p { margin: 4px 0 8px; }
.artist-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.artist-chips li { padding: 6px 12px; border-radius: 999px; background: #262823; font-size: .9375rem; }
.map-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 16px 0 0; padding: 0; }
.map-list button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--edge); border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; }
.map-list button:hover, .map-list .selected { border-color: var(--lilac); }
.map-list small { color: var(--muted); font-size: .8125rem; }
@media (max-width: 700px) {
  .field-pair { grid-template-columns: 1fr; }
  .upload-drop .button { width: 100%; }
  .segmented { display: flex; } .segmented label { flex: 1; } .segmented span { justify-content: center; width: 100%; }
}
.product input.visually-hidden { width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; }
.world .pulse { fill: var(--lilac); stroke: #13141299; stroke-width: 1; cursor: pointer; animation: twin-pulse 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.world .pulse.selected { fill: var(--ink); }
@keyframes twin-pulse { 50% { opacity: .55; transform: scale(1.35); } }
.world { max-height: 560px; }

/* Flat ground, white pills, one accent. */
:root { --lilac: #1ed760; --accent: #1ed760; --ground: #0e0e0e; --ink: #ffffff; --body: #c8c8c8; --muted: #8f8f8f; --panel: #181818; --raised: #232323; --edge: #262626; --field-line: #353535; --control: 44px; --radius: 14px; --outside: clamp(16px, 3vw, 40px); }
body { color: var(--body); font-size: .9375rem; }
.page { max-width: 1440px; }
.product .masthead { min-height: 56px; border-bottom: 0; justify-content: flex-end; }
.product-nav { gap: 4px; }
.product-nav a, .product-nav button { min-height: 44px; padding: 0 12px; border-radius: 999px; color: var(--body); font-size: .875rem; font-weight: 500; text-decoration: none; }
.product-nav a:hover, .product-nav button:hover, .product-nav a[aria-current] { color: var(--ink); background: #1c1c1c; text-decoration: none; }
.product-footer { border-top: 0; min-height: 56px; }
.product h1, .product h2, .product h3 { color: var(--ink); font-weight: 500; }
.product h1 em { font-style: normal; color: inherit; }
.dot { color: var(--lilac); }
.product .button { min-height: var(--control); border-radius: 999px; padding: 0 20px; font-size: .9375rem; font-weight: 500; border: 0; transition: transform .1s ease, background-color .15s; }
.product .button:active { transform: scale(.97); }
.product .primary { color: #0e0e0e; background: #ffffff; }
.product .primary:hover { background: #e6e6e6; }
.product .primary:disabled { color: #6b6b6b; background: #232323; }
.product .secondary { color: var(--ink); background: #353535; }
.product .secondary:hover { background: #404040; }
.product .text-button { color: var(--ink); background: transparent; padding: 0; text-decoration: underline; text-decoration-color: #555; }
.product input:not([type="checkbox"]):not([type="radio"]), .product select { min-height: 48px; border-radius: 12px; background-color: var(--raised); border: 1px solid transparent; font-size: 1rem; }
.product input:not([type="checkbox"]):not([type="radio"]):focus, .product select:focus { border-color: #8f8f8f; }
.product input[type="checkbox"] { accent-color: #ffffff; }
.form-section, .result-section, .decision-panel { border-top: 0; background: var(--panel); border-radius: var(--radius); padding: 16px; margin-bottom: 8px; }
.reference, .swap-note, .match-row, .twin-found, .twin-waiting, .map-detail:not(:empty), .upload-drop { border-radius: var(--radius); border-color: transparent; background: var(--panel); }
.selected-list li, .selected-list li:first-child, .choice + .choice { border-color: var(--edge); }
.rank, .match-evidence-title, .segmented input:checked + span { color: var(--ink); }
.match-row h2::before { background: var(--lilac); }
.segmented input:checked + span { background: #353535; }
.flow { width: min(100%, 560px); margin-inline: auto; padding-block: 16px 40px; }
.flow.with-reference { width: min(100%, 1000px); }
.flow-header { margin-bottom: 16px; }
.flow h1 { font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.05; letter-spacing: -.035em; }
.flow-header p { color: var(--body); font-size: .9375rem; margin-top: 8px; }
.field-note { color: var(--muted); font-size: .875rem; }
.form-section h2, .result-section h2, .decision-panel h2, .match-row h2, .twin-found h2, .twin-waiting h2 { font-size: 1.0625rem; font-weight: 500; }
.upload-drop { border: 1px dashed #3a3a3a; padding: 20px; }
.upload-title { font-size: 1.0625rem; font-weight: 500; color: var(--ink); }

/* Homepage: intro left, map right (the map is the work). Phone: intro, button, map. */
.home { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 40px; align-items: start; padding-block: 8px 40px; }
.intro { position: sticky; top: 16px; }
.intro h1 { font-size: clamp(2.5rem, 4vw, 3.25rem); line-height: 1; letter-spacing: -.04em; }
.intro p { margin: 16px 0 20px; line-height: 1.55; max-width: 38ch; }
.intro strong { color: var(--ink); font-weight: 600; }
.map-section { padding: 0; border-top: 0; }
.map-section h2 { margin: 10px 0 12px; font-size: .9375rem; font-weight: 500; }
.twin-map { margin: 0; }
.world { max-height: none; }
.world .land { fill: #262626; stroke: var(--ground); }
.world .level-1 { fill: #0f5c2b; } .world .level-2 { fill: #138a3d; } .world .level-3 { fill: #19b44f; } .world .level-4 { fill: var(--accent); }
.world .pulse { fill: var(--accent); stroke: #0e0e0e; }
.map-scroll { overflow-x: auto; scrollbar-width: none; border-radius: var(--radius); background: #121212; }
.map-scroll::-webkit-scrollbar { display: none; }
:focus-visible { outline-color: var(--accent); }
.twin-found { }
.match-row h2::before { background: var(--accent); }
.rank { color: var(--accent); }
.map-list .selected { box-shadow: inset 0 0 0 1px var(--accent); }
.map-list button { border-color: transparent; background: var(--panel); font-size: .875rem; }
.map-list button:hover, .map-list .selected { background: #262626; border-color: transparent; }
.artist-chips li { background: #262626; font-size: .875rem; }
@media (max-width: 860px) {
  .home { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .intro { position: static; }
  .intro h1 { font-size: clamp(2.25rem, 10.5vw, 3rem); }
  .map-scroll { margin-inline: calc(-1 * var(--outside)); border-radius: 0; }
  .world { height: min(44svh, 320px); width: auto; max-width: none; }
}

/* Twin flow v3 */
.back-link { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 4px; color: var(--body); font-size: .9375rem; text-decoration: none; }
.back-link:hover { color: var(--ink); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 9 / 14; overflow: hidden; border-radius: var(--radius); background: var(--panel); cursor: pointer; }
.tile:hover { background: #1f1f1f; }
.tile:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.tile-plus { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -60%); font-size: 2.5rem; font-weight: 300; color: var(--muted); }
.tile-text { position: relative; display: grid; gap: 2px; padding: 12px; background: linear-gradient(transparent, #0e0e0ecc 40%); }
.tile-text strong { color: var(--ink); font-weight: 500; font-size: .9375rem; }
.tile-text span { color: var(--body); font-size: .8125rem; }
.tile.is-reading .tile-text span { animation: blink 1.2s ease-in-out infinite; }
.tile.is-read { box-shadow: inset 0 0 0 2px var(--accent); }
.tile.is-read .tile-text span { color: var(--accent); }
@keyframes blink { 50% { opacity: .4; } }
.summary-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; margin-bottom: 8px; border-radius: var(--radius); background: var(--panel); }
.summary-card dl { display: grid; gap: 10px; margin: 0; }
.summary-card dt { color: var(--muted); font-size: .8125rem; }
.summary-card dd { margin: 2px 0 0; color: var(--ink); font-size: 1.0625rem; font-weight: 500; overflow-wrap: anywhere; }
.summary-card .button { flex: none; min-height: 40px; }
.form-section[hidden] { display: none; }
.subhead { margin-top: 20px !important; }
.reveal { animation: reveal .5s ease-out both; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 860px) { .flow .form-actions > .primary { flex: 1 1 100%; } }
@media (prefers-reduced-motion: reduce) { .reveal, .tile.is-reading .tile-text span { animation: none; } }

/* Headline stack: three fixed lines, the last one is the punchline */
.intro h1 span { display: block; }
.intro h1 .punch { color: var(--accent); }
.intro h1 { font-size: clamp(3rem, 5.2vw, 4.5rem); line-height: .95; letter-spacing: -.045em; }
.intro p { font-size: 1rem; color: var(--muted); }
.intro p strong { color: var(--body); }
@media (max-width: 860px) { .intro h1 { font-size: clamp(3rem, 15vw, 4.25rem); } }

/* My matches */
.matches-content { --match-inset: clamp(16px, 3vw, 24px); display: grid; gap: 12px; }
.matches-content > :is(.result-section, .twin-waiting, .twin-found), .matches-content .match-row {
  padding: var(--match-inset);
  margin: 0;
  border: 0;
}
.matches-content h2 { margin: 0; font-weight: 600; }
.matches-content > :is(.twin-waiting, .twin-found, #similar-listeners) h2 { font-size: 1.1875rem; }
.matches-content > section > p { margin: 6px 0 0; font-size: .9375rem; }
.matches-content h2 + p { color: var(--body); }
.matches-content > section > p + p { margin-top: 12px; }
.matches-content .form-actions { gap: 8px 12px; margin: 12px 0 0; }
.matches-content > .form-actions { margin: 0; }
.matches-content .match-list { gap: 12px; margin: 0; }
.matches-content section > .match-list { margin-top: 12px; }
.matches-content .match-row h2::before { content: none; }
.matches-content > section > p + .button { margin-top: 12px; }
.matches-content .choice { min-height: var(--control); padding: 10px 0 0; margin-top: 12px; }
.kin-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.person { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 12px; padding: 12px; background: var(--raised); border-radius: 10px; }
.person-art { display: block; width: 56px; height: 56px; border-radius: 8px; object-fit: cover; object-position: center 27%; }
.person-copy h3 { margin: 0; font-size: 1rem; line-height: 1.3; font-weight: 600; }
.person-copy p { margin: 4px 0 0; font-size: .875rem; line-height: 1.45; overflow-wrap: anywhere; }
.person-copy strong { color: var(--ink); font-weight: 600; }
.person-copy p + p { margin-top: 6px; }
.person .button { margin-top: 10px; padding-inline: 16px; font-size: .875rem; }
.new-tag { margin-left: 6px; color: var(--accent); font-size: .75rem; font-weight: 600; }
.clerk-mount .cl-rootBox, .clerk-mount .cl-cardBox { width: 100%; max-width: none; }
.tile-text strong { font-size: .875rem; line-height: 1.2; } .tile-text span { font-size: .75rem; }
.tile-plus { top: 32%; }
.add-all { width: 100%; margin-bottom: 8px; cursor: pointer; }
.upload-panel:has(#card-all:focus-visible) .add-all, .add-all:has(+ #card-all:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Homepage hero and participation map */
.has-hero .product { max-width: 1176px; --outside: clamp(18px, 4vw, 52px); }
.has-hero .product .masthead { min-height: 64px; }
.home { display: block; padding-block: 4px 40px; }
.intro { position: static; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: clamp(32px, 6vw, 96px); }
.hero-pic { grid-column: 2; grid-row: 1; margin: 0; overflow: hidden; border-radius: 16px; aspect-ratio: 1.15; background: #1a1a1a; }
.hero-pic img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.intro-copy { grid-column: 1; grid-row: 1; min-width: 0; }
.intro h1 { font-size: clamp(3.1rem, 5.2vw, 4.5rem); line-height: .96; letter-spacing: -.04em; }
.intro p { color: var(--body); max-width: 36ch; margin: 20px 0 22px; }
.product .intro .button { min-height: 48px; padding-inline: 24px; }
.map-section { margin-top: 44px; border: 0; border-radius: 16px; background: #191919; padding: 4px 20px 20px; }
.map-section h2 { display: flex; align-items: center; min-height: 60px; margin: 0; font-size: clamp(1rem, 2vw, 1.25rem); font-weight: 600; }
.map-scroll { aspect-ratio: 25 / 9; overflow: auto; touch-action: manipulation; }
.map-scroll .world { width: calc(max(100%, var(--map-min-width, 0px)) * var(--map-zoom, 1)); height: auto; max-height: none; max-width: none; }
.world .map-marker-target { fill: transparent; stroke: none; }
.map-tools { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin-top: 8px; }
.map-zoom { display: flex; margin-left: auto; border: 1px solid #3a3a3a; border-radius: 8px; background: #242424; }
.map-zoom button { width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink); font-size: 1.25rem; cursor: pointer; }
.map-zoom button + button { border-left: 1px solid #3a3a3a; }
.map-zoom button:disabled { color: #858585; cursor: default; }
.map-swipe { display: none; }
.map-list button { background: #242424; }
.map-list button:hover, .map-list button.selected { background: #2d2d2d; }
.story-preview { display: block; width: min(100%, 180px); height: auto; aspect-ratio: 9 / 16; border-radius: 12px; }
.story-preview[hidden], #story-status:empty { display: none; }
@media (max-width: 860px) {
  .has-hero .product .masthead { min-height: 56px; }
  .home { padding-top: 6px; }
  .intro { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .hero-pic, .intro-copy { grid-column: 1; grid-row: auto; }
  .hero-pic { aspect-ratio: 1.26; border-radius: 12px; }
  .hero-pic img { object-position: 50% 17%; }
  .intro h1 { font-size: clamp(2.6rem, 12.4vw, 3.65rem); }
  .intro p { margin: 13px 0 16px; font-size: .9375rem; line-height: 1.48; }
  .map-section { margin-top: 24px; border-radius: 12px; padding: 0 12px 12px; }
  .map-scroll { margin-inline: 0; border-radius: 10px; }
  .world { width: 100%; height: auto; }
  .map-list { margin-top: 10px; }
}
@media (max-width: 560px) {
  .map-scroll { --map-min-width: 650px; height: 234px; aspect-ratio: auto; }
  .map-swipe { display: block; margin: 0 2px; }
}
