
.clearly-tool {
  max-width: 960px;
  margin: 1.5rem auto;
  padding: 1.75rem 1.5rem 2rem;
  border-radius: 16px;
  background: #ffffff;
  border: none;
  box-shadow: none;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #222222;
  box-sizing: border-box;
}

.clearly-tool h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.6rem;
  color: #571580;
}

.clearly-tool h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  font-size: 1.3rem;
  color: #571580;
}

.clearly-tool h4 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: #571580;
}

.disclaimer {
  font-size: 0.85rem;
  line-height: 1.5;
  border-radius: 10px;
  padding: 0.85rem 0.9rem;
  margin-bottom: 1.25rem;
}

.disclaimer.primary {
  background: #f4f0fa;
  border-left: 4px solid #571580;
}

.disclaimer.secondary {
  background: #f7f7fc;
  border-left: 3px solid #999;
  margin-top: 1rem;
}

.clearly-form {
  margin-top: 0.75rem;
}

.field-group {
  margin-bottom: 1.25rem;
}

.field-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.help-text {
  margin: 0.3rem 0 0;
  font-size: 0.85rem;
  color: #555;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.6rem;
}

.option-grid--compact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.option-card {
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  border: 1px solid #ddd;
  background: #faf9ff;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  font-size: 0.9rem;
}

.option-card input[type="radio"] {
  margin-top: 0.2rem;
}

.option-card:hover {
  border-color: #571580;
  box-shadow: 0 0 0 1px rgba(87, 21, 128, 0.15);
}

.option-title {
  font-weight: 600;
  display: block;
  margin-bottom: 0.1rem;
}

.option-text {
  display: block;
  font-size: 0.82rem;
  color: #555;
}

.chip {
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  border: 1px solid #ccc;
  background: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  font-size: 0.85rem;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.chip input[type="radio"] {
  margin: 0;
}

.chip:hover {
  border-color: #571580;
  background: #f4f0fa;
}

.text-input {
  width: 100%;
  max-width: 260px;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.results {
  margin-top: 1.5rem;
}

.hidden {
  display: none;
}

.allocation-summary {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.layout-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 1.2rem;
  align-items: flex-start;
}

.panel {
  background: #fafafe;
  border-radius: 12px;
  padding: 0.9rem 0.9rem 1rem;
  border: 1px solid #e2e3f5;
}

#portfolioChart {
  max-width: 100%;
  height: 260px;
}

#portfolioTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 0.3rem;
}

#portfolioTable th,
#portfolioTable td {
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid #e0e0ee;
  text-align: left;
}

#portfolioTable th {
  font-weight: 600;
  background: #f1effd;
}

#portfolioTable tbody tr:nth-child(even) {
  background: #f9f8ff;
}

/* Asset class subheadings inside the table */
#portfolioTable tbody tr.group-row {
  background: #571580;
}

#portfolioTable tbody tr.group-row td {
  color: #ffffff;
  font-weight: 600;
  border-bottom: 0;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

.footnote {
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.4rem;
}

@media (max-width: 768px) {
  .clearly-tool {
    padding: 1.25rem 1rem 1.5rem;
  }
  .layout-two-col {
    grid-template-columns: 1fr;
  }
  #portfolioChart {
    height: 220px;
  }
}
