@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');
:root {
  --bg: #f6f7f3;
  --white: #fff;
  --green: #184c43;
  --accent: #dcebc9;
  --muted: #70796f;
  --line: #e2e6dd;
  --ink: #24372e;
  --warm: #f6eedf;
  --red: #a43632;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    15px 'DM Sans',
    system-ui,
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: var(--green);
  text-underline-offset: 3px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #b88435;
  outline-offset: 4px;
}
h1,
h2,
h3,
.brand {
  font-family: 'Manrope', system-ui, sans-serif;
}
h1 {
  font-size: 34px;
  letter-spacing: -1.2px;
  line-height: 1.2;
  margin: 10px 0 14px;
}
h2 {
  font-size: 22px;
  letter-spacing: -0.6px;
  margin: 0 0 10px;
}
h3 {
  font-size: 16px;
  margin: 0 0 8px;
}
p {
  line-height: 1.65;
  margin: 0 0 14px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.7px;
  font-size: 11px;
  font-weight: 700;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 236px;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 30px 22px;
  display: flex;
  flex-direction: column;
  z-index: 3;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--green);
  text-decoration: none;
}
.brand img {
  width: 37px;
}
.brand-sub {
  font-size: 10px;
  letter-spacing: 1.7px;
  margin: 9px 0 37px 47px;
  color: var(--muted);
}
nav {
  display: grid;
  gap: 7px;
}
nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #6b746e;
  padding: 12px 14px;
  border-radius: 9px;
  font-weight: 500;
}
nav a.active {
  background: #edf3e7;
  color: var(--green);
  font-weight: 700;
}
nav a:hover {
  background: #f4f6f0;
}
.ico {
  width: 20px;
  height: 20px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.side-note {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px;
  background: #fafbf7;
}
.side-note .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #59824d;
  border-radius: 100%;
  margin-right: 5px;
}
.sidebar footer {
  font-size: 10px;
  color: var(--muted);
  padding: 18px 0 0;
  line-height: 1.7;
}
.main {
  margin-left: 236px;
}
.topbar {
  height: 80px;
  padding: 0 40px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  gap: 15px;
}
.topbar span {
  font-size: 12px;
  color: var(--muted);
}
.topbar .edition {
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 8px 12px;
  color: var(--green);
}
main {
  max-width: 1240px;
  margin: auto;
  padding: 34px 40px 44px;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.page-head p {
  margin: 0;
  color: var(--muted);
}
.page-head h1 {
  font-size: 29px;
  margin: 0 0 8px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--green);
  color: white;
  text-decoration: none;
  padding: 12px 18px;
  font-weight: 600;
  font-size: 13px;
  min-height: 43px;
}
.button:hover {
  filter: brightness(1.12);
}
.button.secondary {
  background: #fff;
  color: var(--green);
  border-color: var(--line);
}
.button.soft {
  background: var(--accent);
  color: var(--green);
}
.button:disabled {
  background: #edf0e9;
  color: #8b9389;
  cursor: not-allowed;
  filter: none;
}
.link-button {
  border: 0;
  background: none;
  color: var(--green);
  font-weight: 600;
  padding: 6px 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.hero {
  background: var(--green);
  border-radius: 17px;
  padding: 35px 38px;
  position: relative;
  overflow: hidden;
  color: white;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 15px;
}
.hero .eyebrow {
  color: #bfd6bf;
}
.hero h1 {
  font-size: 36px;
  max-width: 500px;
}
.hero p {
  color: #d0ded3;
  max-width: 490px;
  font-size: 14px;
}
.hero .button {
  background: #e2edcb;
  color: var(--green);
  margin-top: 5px;
}
.hero-art {
  align-self: center;
  justify-self: center;
  width: 180px;
  height: 180px;
  border: 1px solid #ffffff25;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
}
.hero-art:before {
  content: '';
  position: absolute;
  inset: 18px;
  border: 1px solid #ffffff25;
  border-radius: 50%;
}
.hero-art .ico {
  width: 72px;
  height: 72px;
  color: #dcebc9;
  stroke-width: 1;
}
.float-tag {
  position: absolute;
  background: #eff4e7;
  color: var(--green);
  padding: 8px 12px;
  box-shadow: 0 4px 15px #0001;
  border-radius: 9px;
  font-size: 11px;
  bottom: 9px;
  right: -25px;
  transform: rotate(-6deg);
}
.hero-art:after {
  content: '+';
  position: absolute;
  top: 4px;
  left: 10px;
  color: #dfb975;
  font-size: 38px;
  font-weight: 400;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin: 22px 0 30px;
}
.stat {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  padding: 18px 19px;
}
.stat .label {
  color: var(--muted);
  font-size: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.stat strong {
  display: block;
  font:
    800 29px 'Manrope',
    system-ui;
  margin: 9px 0 5px;
  letter-spacing: -1px;
}
.stat small {
  font-size: 11px;
  color: var(--muted);
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 10px;
}
.section-head h2 {
  margin: 0;
  font-size: 19px;
}
.section-head a {
  font-size: 12px;
  text-decoration: none;
  font-weight: 700;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 17px;
}
.card,
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}
.card {
  display: flex;
  flex-direction: column;
  align-items: start;
}
.card p {
  color: var(--muted);
  font-size: 13px;
  flex: 1;
}
.card .button {
  margin-top: 8px;
}
.icon-box {
  width: 41px;
  height: 41px;
  border-radius: 11px;
  background: #eef3e7;
  color: var(--green);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}
.icon-box.gold {
  background: #f8f0df;
  color: #a67d37;
}
.icon-box.lilac {
  background: #efedf6;
  color: #83729e;
}
.bottom-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 20px;
  margin-top: 28px;
}
.progress-track {
  height: 6px;
  background: #edf0e9;
  border-radius: 20px;
  overflow: hidden;
  margin: 10px 0 14px;
}
.progress-fill {
  height: 100%;
  background: #709468;
  border-radius: 20px;
}
.pill {
  font-size: 10px;
  border: 1px solid #d6e3cc;
  background: #f0f6e9;
  border-radius: 5px;
  padding: 4px 7px;
  color: #4a6d40;
  display: inline-block;
  font-weight: 600;
}
.pill.amber {
  background: #faf3e5;
  color: #94702d;
  border-color: #eedfc3;
}
.notice {
  padding: 15px 18px;
  border-radius: 10px;
  background: #f3efe5;
  border: 1px solid #e9e0cd;
  font-size: 12px;
  color: #736346;
  line-height: 1.65;
  margin: 22px 0;
}
.notice a {
  color: inherit;
}
.fact-row {
  display: flex;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  gap: 12px;
}
.fact-row:last-child {
  border: 0;
}
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.filters input {
  flex: 1;
  min-width: 180px;
}
.filters input,
.filters select,
select {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
}
.topic-list {
  display: grid;
  gap: 10px;
}
.topic {
  padding: 18px 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  grid-template-columns: 45px 1fr auto;
  gap: 16px;
  align-items: center;
}
.topic-code {
  background: #eef3e7;
  border-radius: 8px;
  padding: 12px 4px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
}
.topic h3 {
  font-size: 14px;
}
.topic p {
  font-size: 12px;
  margin: 0;
  color: var(--muted);
}
.topic details {
  font-size: 12px;
  line-height: 1.7;
  margin-top: 8px;
}
.topic.empty {
  background: #fafbf8;
}
.topic.empty .topic-code {
  background: #eee;
  color: #858a81;
}
.session {
  max-width: 900px;
  margin: auto;
}
.session-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
}
.session-top h2 {
  margin: 0;
}
.clock {
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--line);
  background: white;
  padding: 10px 14px;
  border-radius: 7px;
  color: var(--green);
  font-weight: 700;
}
.question {
  padding: 30px;
}
.question h2 {
  line-height: 1.55;
  margin: 22px 0;
  font-size: 23px;
}
.answers {
  display: grid;
  gap: 11px;
}
.answer {
  display: flex;
  align-items: center;
  gap: 15px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 15px;
  background: white;
  color: var(--ink);
  line-height: 1.5;
  width: 100%;
}
.answer .letter {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-width: 30px;
  height: 30px;
  font-size: 12px;
}
.answer.selected {
  background: #edf4e8;
  border-color: #6c8c62;
}
.answer.correct {
  background: #edf6ea;
  border-color: #5c8d50;
}
.answer.wrong {
  background: #fff0ee;
  border-color: #c5766b;
}
.answer:disabled {
  cursor: default;
  color: var(--ink);
}
.rationale {
  border-left: 3px solid #72995f;
  background: #f0f6ec;
  padding: 18px;
  margin-top: 22px;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  line-height: 1.7;
}
.rationale a {
  font-size: 12px;
}
.session-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.question-map {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px;
}
.question-map button {
  width: 33px;
  height: 33px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--muted);
  font-size: 12px;
}
.question-map button.done {
  background: #e4edda;
  color: var(--green);
}
.question-map button.current {
  border: 2px solid var(--green);
  color: var(--green);
  font-weight: bold;
}
.result-hero {
  text-align: center;
  padding: 35px;
  background: #edf3e7;
  border-radius: 13px;
  margin: 24px 0;
}
.result-hero strong {
  font:
    800 54px 'Manrope',
    system-ui;
  letter-spacing: -2px;
  display: block;
  color: var(--green);
}
.review {
  margin: 15px 0;
}
.review summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
}
.review p {
  font-size: 13px;
  margin-top: 15px;
}
.result-status {
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 5px;
  background: #eef2e8;
}
.source {
  margin-bottom: 14px;
}
.source p {
  font-size: 12px;
  color: var(--muted);
  margin: 7px 0 0;
}
.empty-state {
  text-align: center;
  padding: 45px 20px;
}
.empty-state .ico {
  width: 40px;
  height: 40px;
  color: #8b9d7e;
  margin-bottom: 12px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}
th,
td {
  padding: 14px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
th {
  color: var(--muted);
  font-weight: 500;
}
.table-wrap {
  overflow: auto;
}
.bar-row {
  display: grid;
  grid-template-columns: 1fr 90px;
  gap: 20px;
  align-items: center;
  margin: 16px 0;
  font-size: 12px;
}
.footer-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 28px;
  line-height: 1.7;
}
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: white;
  border-radius: 8px;
  padding: 13px 20px;
  box-shadow: 0 4px 18px #0002;
  z-index: 10;
  display: none;
  font-size: 13px;
  max-width: 90vw;
}
.form-row {
  margin: 18px 0;
  display: grid;
  gap: 8px;
}
.form-row label {
  font-size: 13px;
}
.meta-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.danger {
  color: var(--red);
}
.resume {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
  background: #fff9e9;
  border: 1px solid #eadcba;
  padding: 16px 20px;
  border-radius: 10px;
}
.resume p {
  margin: 0;
  font-size: 13px;
}
.menu-toggle {
  display: none;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  max-width: 440px;
  padding: 28px;
  color: var(--ink);
  box-shadow: 0 20px 70px #0003;
}
dialog::backdrop {
  background: #18372b66;
}
dialog .toolbar {
  justify-content: end;
}
@media (min-width: 1450px) {
  main {
    padding-top: 44px;
  }
  .hero {
    padding: 42px;
  }
  .stats {
    margin: 25px 0 35px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 205px;
    padding: 25px 16px;
  }
  .main {
    margin-left: 205px;
  }
  main {
    padding: 28px 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .hero {
    grid-template-columns: 1fr 145px;
    padding: 30px;
  }
  .hero-art {
    width: 135px;
    height: 135px;
  }
  .hero h1 {
    font-size: 30px;
  }
  .card {
    padding: 20px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 15px;
  }
  .bottom-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 780px) {
  .sidebar {
    position: static;
    width: auto;
    padding: 16px;
    border: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    font-size: 22px;
  }
  .brand-sub,
  .side-note,
  .sidebar footer {
    display: none;
  }
  nav {
    display: flex;
    overflow: auto;
    gap: 3px;
    margin-top: 15px;
  }
  nav a {
    padding: 10px;
    white-space: nowrap;
    font-size: 12px;
    gap: 6px;
  }
  nav .ico {
    width: 16px;
    height: 16px;
  }
  .main {
    margin: 0;
  }
  .topbar {
    height: 52px;
    padding: 0 20px;
  }
  .topbar span {
    font-size: 10px;
  }
  main {
    padding: 25px 18px;
  }
  .hero {
    padding: 25px;
    grid-template-columns: 1fr 90px;
  }
  .hero h1 {
    font-size: 28px;
  }
  .hero-art {
    width: 100px;
    height: 100px;
  }
  .hero-art .ico {
    width: 45px;
    height: 45px;
  }
  .float-tag {
    display: none;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 25px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 22px;
  }
  .bottom-grid {
    grid-template-columns: 1fr;
  }
  .page-head h1 {
    font-size: 25px;
  }
  .topic {
    grid-template-columns: 36px 1fr;
    padding: 15px;
    gap: 12px;
  }
  .topic > .button {
    grid-column: 2;
    justify-self: start;
  }
  .question {
    padding: 22px 18px;
  }
  .question h2 {
    font-size: 20px;
  }
  .session-top h2 {
    font-size: 17px;
  }
  .resume {
    align-items: start;
  }
  .section-head h2 {
    font-size: 18px;
  }
  .page-head {
    align-items: start;
  }
  .page-head > .button {
    font-size: 11px;
    padding: 10px;
  }
  .hero .eyebrow {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .button,
  .answer {
    transition:
      background 0.15s,
      filter 0.15s;
  }
  .hero-art {
    animation: enter 0.6s ease-out;
  }
  @keyframes enter {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
@media (max-width: 480px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-art {
    display: none;
  }
}
.question-map button.reserve {
  background: #fcf3df;
  border-color: #ddc58f;
}
.form-row input[type='number'] {
  width: 160px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
}
.form-row input[type='checkbox'] {
  accent-color: var(--green);
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 8px;
}
.statements {
  margin: 0 0 22px;
  padding: 0 0 0 26px;
  display: grid;
  gap: 10px;
  line-height: 1.5;
}
.statements li {
  padding-left: 6px;
}
.statements li::marker {
  font-weight: 700;
  color: var(--green);
}
.review .statements {
  margin: 12px 0;
}
.evidence {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 4px 0 6px;
}
.evidence-title {
  width: 100%;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
}
.evidence-link {
  display: inline-block;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--green);
}
.evidence-link:hover {
  background: var(--accent);
}
.evidence .small {
  width: 100%;
}
.sync-panel {
  margin: 0 0 20px;
}
.sync-panel h2 {
  margin-top: 0;
}
.sync-panel .toolbar {
  margin: 12px 0;
}
.sync-join {
  margin-top: 16px;
}
.sync-join .toolbar {
  flex-wrap: wrap;
}
.input {
  flex: 1 1 200px;
  min-width: 0;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}
.input::placeholder {
  color: #9aa197;
}
.input:focus {
  outline: 2px solid var(--accent);
  border-color: var(--green);
}
/* Sync and friend codes: fixed-width letters so the groups line up, sized to the code */
.input.code-input {
  flex: 0 1 auto;
  font-family: ui-monospace, Menlo, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.input.code-input[data-code-length='16'] {
  width: 25ch;
}
.input.code-input[data-code-length='10'] {
  width: 17ch;
}
.sync-code code {
  display: inline-block;
  padding: 10px 14px;
  border: 1px dashed var(--green);
  border-radius: 8px;
  font-size: clamp(16px, 4.6vw, 22px);
  letter-spacing: 0.1em;
  color: var(--green);
  background: var(--accent);
  word-break: break-all;
}
/* Same select look in every browser (Safari otherwise draws a small native control and ignores padding) */
select,
.filters select {
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  font-size: 14px;
  line-height: 1.3;
  min-height: 46px;
  padding: 12px 38px 12px 12px;
  max-width: 100%;
  text-overflow: ellipsis;
  background: white
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23184c43' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat right 14px center;
  cursor: pointer;
}
select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.filters select {
  flex: 0 0 auto;
}
.topic > .button {
  white-space: nowrap;
}
.form-row small {
  font-size: 12px;
  line-height: 1.5;
}
/* Topic picker in "Configurar mi test" */
.label-like {
  font-size: 13px;
}
.topic-picker {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.topic-picker summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 38px 12px 12px;
  font-size: 14px;
  min-height: 46px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topic-picker summary::-webkit-details-marker {
  display: none;
}
.topic-picker summary::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  border: solid var(--green);
  border-width: 0 1.8px 1.8px 0;
  transform: translateY(-70%) rotate(45deg);
}
.topic-picker[open] summary {
  border-bottom: 1px solid var(--line);
}
.topic-picker[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}
.topic-picker-body {
  padding: 4px 14px 14px;
  max-height: 420px;
  overflow: auto;
}
.topic-group {
  border: 0;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 4px 16px;
}
.topic-group legend {
  font-weight: 700;
  font-size: 13px;
  padding: 0;
  margin-bottom: 6px;
}
.topic-check {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.topic-check:hover {
  background: var(--bg);
}
.topic-check small {
  color: var(--muted);
}
.topic-picker input[type='checkbox'] {
  accent-color: var(--green);
  width: 16px;
  height: 16px;
  margin: 0;
}
.topic-group legend input {
  margin-right: 6px;
  vertical-align: -2px;
}
.form-row select {
  width: 100%;
  min-width: 0;
}
/* Per-topic metrics */
.focus-panel {
  margin-top: 20px;
  border-color: #e9d9b8;
  background: #fffaf0;
}
.focus-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.focus-item {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 4px;
  font-size: 13px;
}
.focus-item span {
  color: var(--muted);
  font-size: 12px;
}
.sort-label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sort-label select {
  min-height: 38px;
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 13px;
}
table.metrics td,
table.metrics th {
  white-space: nowrap;
}
table.metrics td:first-child {
  white-space: normal;
  min-width: 200px;
}
.mini-bar {
  display: inline-block;
  width: 48px;
  height: 6px;
  border-radius: 3px;
  background: #edf0e9;
  margin-right: 8px;
  vertical-align: middle;
  overflow: hidden;
}
.mini-bar span {
  display: block;
  height: 100%;
  background: var(--green);
}
.up {
  color: #2f7a3b;
  font-weight: 600;
}
.down {
  color: var(--red);
  font-weight: 600;
}
/* Friends */
.social-panel {
  margin-top: 20px;
}
.social-h {
  font-size: 14px;
  margin: 18px 0 8px;
}
.social-form .toolbar {
  flex-wrap: wrap;
}
.friend-list {
  display: grid;
  gap: 8px;
}
.friend-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: white;
}
.friend-row p {
  margin: 4px 0 0;
}
.friend-row .toolbar {
  margin: 0;
}
dialog .input {
  width: 100%;
}
.friend-list + .social-form,
.social-panel p + .social-form {
  margin-top: 18px;
}
.backup-panel {
  margin-top: 20px;
}
.backup-panel summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--green);
}
.backup-panel[open] summary {
  margin-bottom: 8px;
}
