body { background: var(--bg); }

.syn2-page { max-width: 760px; margin: 0 auto; padding: 40px 24px 80px; }
.syn2-head { margin-bottom: 26px; }
.syn2-head .brand { margin-top: 14px; }
.syn2-head h1 { font-family: var(--serif); font-size: 26px; margin: 0; }
.syn2-head .brand p:last-child { color: var(--ink-dim); font-size: 14px; margin-top: 4px; max-width: 46ch; }

.syn2-pickers {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px;
  padding: 18px; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.syn2-pick { display: flex; flex-direction: column; gap: 4px; }
.syn2-pick span {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint);
}
.syn2-pick select {
  font: inherit; font-size: 14px; padding: 8px 30px 8px 12px; min-width: 200px;
  background: var(--bg) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" fill="none" stroke="%2386828d" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/></svg>') no-repeat right 11px center;
  color: var(--ink); appearance: none; -webkit-appearance: none;
  border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer;
}
.syn2-pick select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
.syn2-x { color: var(--ink-faint); font-size: 15px; padding-bottom: 9px; }
.syn2-go {
  font: inherit; font-size: 14px; font-weight: 600; color: #fff; cursor: pointer;
  padding: 10px 20px; border: none; border-radius: var(--r-pill);
  background: var(--cta-gradient);
  transition: transform .15s var(--ease-soft), box-shadow .15s var(--ease-soft);
}
.syn2-go:hover { transform: translateY(-1px); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent-2) 25%, transparent); }
.syn2-go:disabled { opacity: .5; cursor: wait; transform: none; box-shadow: none; }

#syn2-note { margin: 12px 0 0; }
#syn2-note.is-error { color: var(--accent-2); }

.syn2-result { margin-top: 24px; }
.syn2-empty { color: var(--ink-faint); font-size: 13.5px; }

.syn2-heads {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  margin-bottom: 20px; font-family: var(--serif); font-size: 17px;
}
.syn2-head-name { color: var(--ink); }
.syn2-head-a { color: var(--accent); }
.syn2-head-b { color: var(--accent-2); }
.syn2-heads-x { color: var(--ink-faint); font-size: 14px; }

.syn2-save-row { display: flex; justify-content: center; margin: -8px 0 18px; }
.syn2-save {
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  padding: 6px 14px; border-radius: var(--r-pill);
  background: var(--bg-2); border: 1px solid var(--line); color: var(--ink-dim);
  transition: border-color .15s var(--ease-soft), color .15s var(--ease-soft);
}
.syn2-save:hover:not(:disabled) { border-color: color-mix(in srgb, var(--accent-2) 45%, var(--line)); color: var(--ink); }
.syn2-save.is-saved { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 40%, var(--line)); cursor: default; }

/* the overview: a plain read of the aspect list's own shape, before any
   filtering — what's actually there, computed from the data itself
   rather than generated prose */
.syn2-overview {
  margin-bottom: 18px; padding: 14px 16px; border-radius: var(--r-md);
  background: var(--bg-2); border: 1px solid var(--line);
}
.syn2-overview-line { margin: 0 0 10px; font-size: 13.5px; line-height: 1.6; color: var(--ink-dim); }
.syn2-overview-counts { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.syn2-ov-count { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.syn2-ov-count[data-role="dynamic"] { color: var(--dynamic); }
.syn2-ov-count[data-role="flowing"] { color: var(--flowing); }
.syn2-ov-count[data-role="friction"] { color: var(--friction); }
.syn2-ov-count[data-role="neutral"] { color: var(--neutral); }

.syn2-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.syn2-filter {
  font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer;
  padding: 5px 12px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--bg-2); color: var(--ink-dim);
}
.syn2-filter.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* compatibility modes: a second, independent lens (which bodies/houses,
   not which aspect type) — each mode carries its own color via
   --mode-color, set inline per button/row rather than one hardcoded hue */
.syn2-modes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.syn2-mode {
  font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer;
  padding: 5px 12px; border-radius: var(--r-pill);
  border: 1px solid color-mix(in srgb, var(--mode-color) 35%, var(--line));
  background: var(--bg-2); color: var(--mode-color);
  transition: background .15s var(--ease-soft), color .15s var(--ease-soft);
}
.syn2-mode:hover { background: color-mix(in srgb, var(--mode-color) 10%, var(--bg-2)); }
.syn2-mode.is-active { background: var(--mode-color); border-color: var(--mode-color); color: #fff; }

.syn2-list { display: flex; flex-direction: column; gap: 6px; }
.syn2-row {
  display: grid; grid-template-columns: 1fr auto 1fr auto; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--r-sm);
  background: var(--bg-2); border: 1px solid var(--line-soft);
}
.syn2-row[data-role="dynamic"] { border-left: 3px solid var(--dynamic); }
.syn2-row[data-role="flowing"] { border-left: 3px solid var(--flowing); }
.syn2-row[data-role="friction"] { border-left: 3px solid var(--friction); }
.syn2-row[data-role="neutral"] { border-left: 3px solid var(--neutral); }
.syn2-row.is-compat { background: color-mix(in srgb, var(--mode-color) 6%, var(--bg-2)); }
.syn2-body { display: flex; align-items: center; gap: 7px; font-size: 13.5px; }
.syn2-body-a { justify-content: flex-end; text-align: right; color: var(--accent); }
.syn2-body-b { color: var(--accent-2); }
.syn2-glyph { font-family: var(--serif); font-size: 16px; }
.syn2-aspect { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.syn2-aspect-glyph { font-size: 14px; color: var(--ink-dim); }
.syn2-orb { font-family: var(--mono); font-size: 10.5px; color: var(--ink-faint); }
.syn2-romance-mark { font-size: 12px; color: var(--mode-color, var(--ink-faint)); text-align: center; transition: transform .2s var(--ease); }
.syn2-row.is-foldable { cursor: pointer; }
.syn2-row.is-open .syn2-romance-mark { transform: rotate(180deg); }

/* the heaviest (tightest-orb) aspects get real written synthesis — the
   row keeps its own shape, the synthesis text attaches directly below it
   inside the same wrapper so the two read as one unit */
.syn2-row-wrap.has-synthesis .syn2-row { border-radius: var(--r-sm) var(--r-sm) 0 0; border-bottom: none; }
.syn2-synthesis {
  margin: 0; padding: 10px 14px 12px;
  border: 1px solid var(--line-soft); border-top: 1px dashed var(--line);
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  background: color-mix(in srgb, var(--accent) 4%, var(--bg-2));
  font-size: 12.5px; line-height: 1.6; font-style: italic; color: var(--ink-dim);
}

@media (max-width: 600px) {
  .syn2-row { display: flex; flex-wrap: wrap; align-items: center; row-gap: 4px; }
  .syn2-body-a { justify-content: flex-start; text-align: left; }
  .syn2-aspect { flex-direction: row; gap: 5px; }
  .syn2-row > span:last-child { display: none; }
}
