@import url('/assets/tdx-options-library.css');

body.etf-library-page {
  background: #f6f3ec;
  color: #221d15;
}

.etf-library-page .options-hero {
  background:
    radial-gradient(circle at 18% 18%, rgba(201, 169, 97, 0.16), transparent 40%),
    linear-gradient(135deg, #102d23 0%, #194433 58%, #275947 100%);
}

.etf-library-page .options-kicker {
  background: rgba(255, 255, 255, 0.08);
}

.etf-library-page .options-section,
.etf-library-page .options-panel {
  background: #fffdf8;
}

.etf-library-page .options-card__meta {
  display: inline-flex;
  width: max-content;
  padding: 0.34rem 0.62rem;
  border-radius: 999px;
  background: #efe4cb;
  color: #7a5a1b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.etf-library-page .options-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.55rem;
}

.etf-library-page .options-card__links a,
.etf-library-page .options-linklist a {
  color: #1b4a38;
  font-weight: 700;
  text-decoration: none;
}

.etf-library-page .options-linklist {
  display: grid;
  gap: 0.7rem;
}

.etf-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.etf-filter-grid--wide {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.etf-preset-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.etf-preset-btn,
.etf-compare-toggle,
.etf-clear-btn,
.etf-selector-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid #d7ccb5;
  background: #fff;
  color: #17382c;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.etf-preset-btn:hover,
.etf-compare-toggle:hover,
.etf-clear-btn:hover,
.etf-selector-link:hover {
  transform: translateY(-1px);
  border-color: #b79345;
  box-shadow: 0 10px 24px rgba(16, 45, 35, 0.09);
}

.etf-preset-btn.is-active,
.etf-compare-toggle.is-selected {
  border-color: #b79345;
  background: #17382c;
  color: #fff7e6;
}

.etf-compare-toggle[disabled] {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.etf-filter-grid label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.83rem;
  font-weight: 700;
  color: #17382c;
}

.etf-filter-grid input,
.etf-filter-grid select {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid #d7ccb5;
  border-radius: 12px;
  background: #fff;
  color: #221d15;
  font: inherit;
}

.etf-filter-grid input:focus,
.etf-filter-grid select:focus {
  outline: 2px solid rgba(195, 154, 58, 0.28);
  border-color: #b79345;
}

.etf-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin: 1rem 0 0.7rem;
}

.etf-result-count {
  font-size: 0.95rem;
  font-weight: 700;
  color: #17382c;
}

.etf-result-note {
  color: #6a6254;
  font-size: 0.9rem;
}

.etf-selector-brief {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 1.2rem;
}

.etf-selector-summary {
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid #d8cfbc;
  background: linear-gradient(180deg, #fffaf0 0%, #f5ecdb 100%);
}

.etf-selector-summary strong {
  color: #17382c;
}

.etf-selector-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.etf-selector-card {
  padding: 1.05rem 1.1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid #e1d5be;
  background: #fffdf8;
  box-shadow: 0 12px 28px rgba(16, 45, 35, 0.05);
}

.etf-selector-card h3 {
  margin: 0.15rem 0 0;
  color: #17382c;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.15rem;
}

.etf-selector-card p {
  margin: 0.55rem 0 0;
  color: #5f584b;
}

.etf-selector-reason {
  display: inline-flex;
  width: max-content;
  padding: 0.34rem 0.62rem;
  border-radius: 999px;
  background: #efe4cb;
  color: #7a5a1b;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.etf-selector-actions,
.etf-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.etf-tool-grid,
.etf-result-grid {
  display: grid;
  gap: 1rem;
}

.etf-result-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.etf-result-card,
.etf-framework,
.etf-table-card {
  padding: 1.15rem 1.15rem 1.2rem;
  border-radius: 16px;
  border: 1px solid #e2d7c0;
  background: linear-gradient(180deg, #ffffff 0%, #fbf7ef 100%);
  box-shadow: 0 12px 30px rgba(16, 45, 35, 0.06);
}

.etf-result-card.is-selected {
  border-color: #b79345;
  box-shadow: 0 16px 34px rgba(16, 45, 35, 0.11);
}

.etf-result-head,
.etf-framework__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.etf-result-head h3,
.etf-framework__head h3 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  color: #17382c;
  font-size: 1.2rem;
  line-height: 1.2;
}

.etf-result-head p,
.etf-framework__head p {
  margin: 0.35rem 0 0;
  color: #5f584b;
}

.etf-pill,
.etf-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.34rem 0.62rem;
  border-radius: 999px;
  background: #efe4cb;
  color: #7a5a1b;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.etf-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.etf-result-grid dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
  margin: 1rem 0 0;
}

.etf-result-grid dt,
.etf-framework dt {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #98742c;
}

.etf-result-grid dd,
.etf-framework dd {
  margin: 0.2rem 0 0;
  color: #2a241a;
  line-height: 1.55;
}

.etf-framework-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.etf-framework ul,
.etf-table-card ul {
  margin: 0.85rem 0 0;
  padding-left: 1.1rem;
  color: #5a5447;
}

.etf-framework li + li,
.etf-table-card li + li {
  margin-top: 0.45rem;
}

.etf-table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
}

.etf-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.etf-table th,
.etf-table td {
  padding: 0.85rem 0.95rem;
  text-align: left;
  border-bottom: 1px solid #e9e0ce;
  vertical-align: top;
}

.etf-table th {
  background: #17382c;
  color: #fff7e6;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.etf-table td strong {
  color: #17382c;
}

.etf-table td p {
  margin: 0.25rem 0 0;
}

.etf-warning {
  margin-top: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid #e1b08d;
  background: #fff3ea;
  color: #663319;
}

.etf-highlight {
  margin-top: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid #b9d3c3;
  background: #eef8f1;
  color: #214836;
}

.etf-source-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.etf-source-list a {
  color: #17382c;
  font-weight: 700;
  text-decoration: none;
}

.etf-empty {
  padding: 1.3rem 1.35rem;
  border-radius: 16px;
  border: 1px dashed #ccb98f;
  background: #fbf7ef;
  color: #5f584b;
}

.etf-compare-tray {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px dashed #cdbd94;
  background: linear-gradient(180deg, #fbf7ef 0%, #f7efde 100%);
}

.etf-compare-tray.is-active {
  border-style: solid;
  border-color: #b79345;
}

.etf-compare-tray__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.etf-compare-tray__head h3 {
  margin: 0;
  color: #17382c;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.15rem;
}

.etf-compare-tray__head p {
  margin: 0.25rem 0 0;
  color: #5f584b;
}

.etf-compare-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.9rem;
}

.etf-compare-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: #17382c;
  color: #fff7e6;
  font-weight: 700;
}

.etf-compare-chip button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.etf-compare-card {
  margin-top: 1rem;
}

.etf-compare-status {
  margin-top: 0.8rem;
  color: #6a6254;
  font-size: 0.92rem;
}

.etf-compare-table th:first-child,
.etf-compare-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
}

.etf-compare-table th:first-child {
  background: #17382c;
}

.etf-compare-table td:first-child {
  background: #fffdf8;
  font-weight: 700;
  color: #17382c;
}

.etf-rail-list {
  margin: 0.85rem 0 0;
  padding-left: 1.15rem;
  color: #5a5447;
}

.etf-rail-list li + li {
  margin-top: 0.45rem;
}

.etf-compare-footnote {
  margin-top: 1rem;
  color: #6a6254;
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .etf-filter-grid,
  .etf-filter-grid--wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .etf-result-grid,
  .etf-framework-grid,
  .etf-selector-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .etf-filter-grid,
  .etf-filter-grid--wide {
    grid-template-columns: 1fr;
  }

  .etf-result-head,
  .etf-framework__head,
  .etf-compare-tray__head {
    flex-direction: column;
  }

  .etf-result-grid dl {
    grid-template-columns: 1fr;
  }
}
