:root {
  --accent: #216d66;
  --accent-soft: #e6f0e9;
  --ink: #253b38;
  --paper: #fcfaf6;
  --muted: #687670;
  --line: #e0e6df;
}
html {
  scroll-behavior: smooth;
}
.hero h1 {
  max-width: 700px;
}
.hero-note {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 16px;
  margin-bottom: 0;
}
.compass-art {
  background: #e7eee6;
  border-radius: 50% 50% 38px 38px;
  aspect-ratio: 1;
  padding: 0;
  color: var(--accent);
}
.orbit {
  position: absolute;
  border: 1px solid #216d6620;
  border-radius: 50%;
  width: 85%;
  height: 85%;
  top: 7.5%;
  left: 7.5%;
}
.orbit-two {
  width: 70%;
  height: 70%;
  top: 15%;
  left: 15%;
  background: #fcfaf680;
}
.compass-center {
  width: 72%;
  transform: rotate(32deg);
  position: relative;
}
.direction {
  position: absolute;
  font-family: Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.03em;
}
.direction.r {
  top: 7%;
  left: 47%;
}
.direction.i {
  top: 25%;
  right: 11%;
}
.direction.a {
  bottom: 28%;
  right: 11%;
}
.direction.s {
  bottom: 12%;
  left: 47%;
}
.direction.e {
  bottom: 28%;
  left: 11%;
}
.direction.c {
  top: 25%;
  left: 11%;
}
.art-label {
  position: absolute;
  bottom: 5%;
  font-size: 0.76rem;
  color: var(--muted);
}
.boundary {
  margin-bottom: 38px;
}
.workbench-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 25px 0;
}
.tabs {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 5px;
  background: white;
  gap: 4px;
  flex-wrap: wrap;
}
.tabs button {
  border: 0;
  padding: 11px 15px;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 0.83rem;
}
.tabs button.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}
.backup-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  align-items: center;
}
.import-label {
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 9px 5px;
}
.quiz-intro {
  margin-bottom: 28px;
}
.quiz-intro h2 {
  margin-bottom: 14px;
}
.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
}
.question-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  margin: 17px 0;
}
.question-number {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
}
.question-card legend {
  font-weight: 600;
  font-size: 1.02rem;
  margin-bottom: 18px;
  line-height: 1.6;
  width: 100%;
}
.rating-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.rating-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 78px;
  gap: 5px;
  cursor: pointer;
  padding: 8px 5px;
  background: #fbfcf9;
}
.rating-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.rating-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.rating-option:has(input:focus-visible) {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.rating-option strong {
  font-size: 1.1rem;
  font-weight: 600;
}
.rating-option span {
  font-size: 0.72rem;
  text-align: center;
  line-height: 1.35;
}
.question-bottom {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 13px;
}
.unknown-option {
  font-size: 0.82rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.unknown-option input {
  accent-color: var(--accent);
}
.clear-answer {
  margin-left: auto;
  border: 0;
  background: transparent;
  text-decoration: underline;
  font-size: 0.73rem;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
}
.quiz-pager {
  justify-content: space-between;
  margin: 26px 0 38px;
}
.result-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  align-items: stretch;
}
.compact.section-title {
  margin: 0 0 20px;
}
.compact h3 {
  margin: 0;
}
.interest-score {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.interest-score:last-child {
  border-bottom: 0;
}
.score-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 9px;
  font-size: 0.9rem;
}
.score-code {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-right: 8px;
}
.score-meta {
  font-size: 0.73rem;
  color: var(--muted);
  margin-top: 6px;
}
.score-track {
  height: 9px;
  border-radius: 20px;
  background: #eff1eb;
  overflow: hidden;
}
.score-track span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 20px;
}
.interest-score.provisional .score-track span {
  opacity: 0.4;
}
.signals-panel {
  background: #e9f0e8;
  border-color: transparent;
}
.signals-panel h3 {
  font-size: 1.55rem;
  line-height: 1.6;
  font-weight: 600;
  margin: 14px 0 20px;
}
.signal-tie {
  display: inline-block;
  font-size: 0.73rem;
  font-weight: 500;
  padding: 4px 10px;
  background: #fff;
  border-radius: 20px;
  color: var(--muted);
  margin: 0 0 12px;
}
.coverage {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.73rem;
}
.coverage .pill {
  background: #fff;
}
.report-panel .actions {
  margin-top: 14px;
}
.interest-toggles {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0 18px;
}
.interest-toggle {
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 0.83rem;
  cursor: pointer;
}
.interest-toggle:has(input:checked) {
  background: var(--accent-soft);
  border-color: #a6c4b9;
}
.interest-toggle input {
  accent-color: var(--accent);
}
.family-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 20px 0;
}
.family-toolbar .field {
  flex: 1;
  max-width: 450px;
  margin: 0;
}
.saved-filter {
  font-size: 0.85rem;
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}
.saved-filter input {
  accent-color: var(--accent);
}
.family-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 25px;
}
.family-card h3 {
  font-size: 1.22rem;
  margin: 14px 0 8px;
}
.family-card .description {
  font-size: 0.88rem;
  line-height: 1.65;
  margin-bottom: 14px;
  color: var(--muted);
}
.family-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.family-score {
  font-size: 0.72rem;
  color: var(--muted);
}
.save-family {
  border: 1px solid var(--line);
  background: white;
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 0.77rem;
  color: var(--ink);
}
.save-family[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
}
.pattern-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.pattern-badges .pill {
  font-size: 0.67rem;
  padding: 4px 8px;
  background: #f1f4ed;
  color: var(--muted);
}
.try-it {
  margin: 18px 0;
  background: #f7f8f1;
  border-radius: 14px;
  padding: 14px;
  font-size: 0.86rem;
  line-height: 1.7;
}
.try-it strong {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  margin-bottom: 5px;
  color: var(--accent);
}
.source-link {
  margin-top: auto;
  font-size: 0.75rem;
}
.family-card details {
  font-size: 0.74rem;
  margin: 12px 0;
  color: var(--muted);
}
.methods-panel {
  margin: 55px 0 24px;
}
.methods-panel h2 {
  font-size: 2rem;
}
.methods-panel h3 {
  font-size: 1rem;
}
.methods-panel p {
  font-size: 0.86rem;
}
.source-entry {
  margin: 10px 0;
  font-size: 0.82rem;
  line-height: 1.6;
}
.source-note {
  margin-bottom: 18px;
}
.empty {
  padding: 40px 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 20px;
  color: var(--muted);
  grid-column: 1/-1;
}
dialog {
  width: min(700px, calc(100vw - 32px));
  max-height: 90vh;
  overflow: auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 20px 80px #253b3830;
}
dialog::backdrop {
  background: #183c355c;
  backdrop-filter: blur(4px);
}
dialog h2 {
  font-size: 1.65rem;
}
#text-output {
  font-size: 0.88rem;
  line-height: 1.7;
}
.print-only {
  display: none;
}
@media (max-width: 900px) {
  .workbench-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .result-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    gap: 30px;
  }
  .rating-option span {
    font-size: 0.67rem;
  }
}
@media (max-width: 760px) {
  .hero-art {
    max-width: 330px;
    aspect-ratio: 1;
  }
  .tabs {
    width: 100%;
    flex-wrap: nowrap;
  }
  .tabs button {
    flex: 1;
    padding: 10px 6px;
    font-size: 0.74rem;
  }
  .question-card {
    padding: 19px 16px;
  }
  .rating-options {
    gap: 5px;
  }
  .rating-option {
    min-height: 74px;
    padding: 7px 3px;
  }
  .rating-option span {
    font-size: 0.66rem;
  }
  .question-card legend {
    font-size: 0.95rem;
  }
  .family-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .family-toolbar .field {
    width: 100%;
    max-width: none;
  }
  .backup-actions {
    gap: 8px;
  }
  .hero h1 {
    font-size: 2.75rem;
  }
  .compass-art .direction {
    font-size: 1.2rem;
  }
  .signals-panel h3 {
    font-size: 1.4rem;
  }
  .quiz-pager .button {
    padding: 11px 15px;
  }
  .question-bottom {
    gap: 8px;
  }
  .progress-head {
    font-size: 0.78rem;
  }
  .progress-head .button {
    font-size: 0.72rem;
  }
  .panel h3 {
    font-size: 1rem;
  }
}
@media print {
  #quiz-view,
  #explore-view,
  #method,
  .boundary,
  #storage-warning,
  .workbench-head,
  #edit-answers,
  .report-panel {
    display: none !important;
  }
  #results-view[hidden] {
    display: block !important;
  }
  .result-grid {
    display: block;
  }
  .result-grid > .panel {
    margin-bottom: 16px;
  }
  .score-track {
    border: 1px solid #ddd;
  }
  .score-track span {
    print-color-adjust: exact;
  }
  .hero {
    display: none !important;
  }
  .signals-panel {
    background: white !important;
  }
  .shell {
    width: 100%;
  }
  .print-only {
    display: block;
  }
  #evidence-notice {
    background: white;
    border: 1px solid #ddd;
  }
  .score-meta,
  .muted {
    color: #444;
  }
  body {
    font-size: 12px;
  }
  .panel {
    padding: 20px;
  }
  .section-title {
    margin: 18px 0;
  }
  .section-title h2 {
    font-size: 26px;
  }
}
