/*
 * TORECANOMICS
 * CARD DETAIL
 * UI U-4
 *
 * Dense market-intelligence layout with readable typography.
 */

:root {
  --text-soft: #c2ccd4;
  --text-dim: #94a5b1;
}

/* =========================================================
 * General readability
 * ========================================================= */

main.container {
  padding-top: 32px;
  padding-bottom: 84px;
}

.breadcrumb {
  color: #91a2ad;
  font-size: 12px;
  line-height: 1.5;
}

.series {
  color: #82d1e5;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 800;
}

.summary h1 {
  margin-top: 0;
  margin-bottom: 9px;

  font-size:
    clamp(
      42px,
      4.3vw,
      62px
    );

  line-height: 1.04;
  letter-spacing: -.025em;
}

.card-number {
  color: #b7c3cc;

  font-size: 14px;
  line-height: 1.5;
}

.tags {
  gap: 8px;
}

.tag {
  padding: 7px 10px;

  color: #c2ccd3;

  font-size: 12px;
  line-height: 1.2;
}

.quick-label {
  color: #9dabb5;
  font-size: 12px;
}

.quick-value {
  font-size: 18px;
}

.image-caption {
  color: #98a8b3;

  font-size: 12px;
  line-height: 1.5;
}

/* =========================================================
 * Card presentation
 * ========================================================= */

.card-frame {
  border-color:
    rgba(255,255,255,.10);

  background:
    radial-gradient(
      circle at 50% 28%,
      rgba(117,200,222,.055),
      transparent 52%
    ),
    linear-gradient(
      150deg,
      rgba(15,31,44,.97),
      rgba(8,20,30,.97)
    );

  box-shadow:
    0 22px 60px rgba(0,0,0,.18),
    inset 0 1px 0 rgba(255,255,255,.025);
}

.card-image {
  filter:
    drop-shadow(
      0 15px 18px rgba(0,0,0,.20)
    );
}

.illustration-switch {
  margin-top: 15px;
}

.illustration-switch-head {
  margin-bottom: 10px;
}

.illustration-switch-title {
  color: #f5f7f8;

  font-size: 15px;
  line-height: 1.4;
  font-weight: 820;
}

.illustration-switch-note {
  margin-top: 3px;

  color: #9cabb5;

  font-size: 12px;
  line-height: 1.55;
}

.card-stage .variant-card {
  border-color:
    rgba(255,255,255,.09);

  background:
    rgba(255,255,255,.025);
}

.card-stage .variant-card.active {
  border-color:
    rgba(224,189,112,.68);

  background:
    rgba(224,189,112,.095);
}

.variant-key {
  color: #b9c5cd;

  font-size: 12px;
  line-height: 1.35;
}

/* =========================================================
 * Market information
 * ========================================================= */

.market-preview {
  margin-top: 24px;

  padding: 20px 22px;

  border-color:
    rgba(117,200,222,.15);

  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(117,200,222,.07),
      transparent 25rem
    ),
    linear-gradient(
      140deg,
      rgba(13,29,41,.96),
      rgba(8,20,29,.96)
    );
}

.market-copy strong {
  margin-bottom: 7px;

  color: #f6f8f9;

  font-size: 16px;
  line-height: 1.35;
}

.market-copy span {
  color: #aebbc4;

  font-size: 13px;
  line-height: 1.7;
}

.market-status {
  padding: 8px 11px;

  color: #c0cad2;

  font-size: 12px;
}

.price-condition-list {
  gap: 12px;
}

.price-condition {
  padding: 15px;

  background:
    rgba(0,0,0,.14);
}

.price-condition-name {
  color: #c0cad2;

  font-size: 12px;
}

.price-evidence {
  color: #9eacb6;

  font-size: 11px;
}

.price-main-label {
  color: #9aaab5;

  font-size: 11px;
}

.price-main {
  font-size: 30px;
}

.price-lowest {
  color: #9cabb5;

  font-size: 12px;
}

.price-sources {
  color: #b5c1c9;

  font-size: 12px;
  line-height: 1.6;
}

.price-disclaimer {
  color: #98a8b3;

  font-size: 11px;
  line-height: 1.7;
}

.price-basis {
  font-size: 11px;
  line-height: 1.65;
}

.price-evidence-detail summary {
  color: #bbc6ce;

  font-size: 11px;
}

.price-evidence-copy {
  color: #9aaab5;

  font-size: 11px;
  line-height: 1.75;
}

.market-insights {
  margin-top: 13px;

  padding: 17px 19px;

  background:
    rgba(255,255,255,.028);
}

.market-insights-title {
  margin-bottom: 10px;

  font-size: 14px;
  line-height: 1.4;
}

.market-insight {
  color: #b7c3cb;

  font-size: 13px;
  line-height: 1.7;
}

.official-button {
  min-height: 44px;

  padding: 11px 15px;

  font-size: 13px;
}

/* =========================================================
 * Detail panels
 * ========================================================= */

.content-grid {
  gap: 14px;
}

.panel {
  padding: 22px;

  border-color:
    rgba(255,255,255,.09);

  background:
    linear-gradient(
      150deg,
      rgba(20,39,55,.84),
      rgba(13,29,42,.84)
    );

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.02);
}

.panel-title {
  margin-bottom: 18px;

  font-size: 18px;
  line-height: 1.4;
}

.data-row {
  min-height: 44px;
}

dt {
  color: #9babb5;

  font-size: 13px;
  line-height: 1.55;
}

dd {
  color: #dce3e8;

  font-size: 14px;
  line-height: 1.6;
}

.effect-text {
  color: #e0e6ea;

  font-size: 15px;
  line-height: 1.9;
}

.source-note {
  color: #8fa0ab;

  font-size: 12px;
  line-height: 1.75;
}

/* =========================================================
 * Desktop: use the empty right-hand space
 * ========================================================= */

@media (min-width: 901px) {

  main.container {
    width:
      min(
        1280px,
        calc(100% - 48px)
      );

    display: grid;

    grid-template-columns:
      minmax(320px, 382px)
      minmax(0, 1fr);

    column-gap: 42px;
    row-gap: 20px;

    align-items: start;
  }

  main.container > .breadcrumb {
    grid-column: 1 / -1;
    grid-row: 1;

    margin-bottom: 0;
  }

  main.container > .hero {
    display: contents;
  }

  .card-stage {
    grid-column: 1;
    grid-row: 2 / span 3;

    position: sticky;
    top: 94px;
  }

  .summary {
    grid-column: 2;
    grid-row: 2;
  }

  main.container > .content-grid {
    grid-column: 2;
    grid-row: 3;

    margin-top: 2px;

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

  main.container > .source-note {
    grid-column: 2;
    grid-row: 4;

    margin-top: 0;
  }

  .card-frame,
  .illustration-switch {
    width: 100%;
    max-width: 382px;
  }

  .card-frame {
    padding: 17px;
  }

  .card-stage .variant-list {
    gap: 7px;
  }

  .card-stage .variant-card {
    padding: 5px;
  }

}

/* =========================================================
 * Mobile / tablet:
 * Identity first, image second, market third.
 * ========================================================= */

@media (max-width: 900px) {

  main.container {
    display: block;

    width:
      min(
        100% - 28px,
        720px
      );

    padding-top: 22px;
  }

  .hero {
    display: grid;
    grid-template-columns: 1fr;

    gap: 0;
  }

  /*
   * Flatten only the visual wrapper.
   * Semantic HTML remains unchanged.
   */
  .summary {
    display: contents;
  }

  .summary > .series {
    order: 1;

    margin:
      0 0
      7px;
  }

  .summary > h1 {
    order: 2;

    margin:
      0 0
      8px;

    font-size:
      clamp(
        34px,
        9.2vw,
        46px
      );

    line-height: 1.07;
  }

  .summary > .card-number {
    order: 3;

    margin-bottom: 13px;
  }

  .summary > .tags {
    order: 4;

    margin-bottom: 0;
  }

  .summary > .quick-specs {
    order: 5;

    margin:
      18px 0
      0;
  }

  .card-stage {
    order: 6;

    position: static;

    margin-top: 24px;
  }

  .summary > .market-preview {
    order: 7;

    margin-top: 26px;
  }

  .summary > .market-insights {
    order: 8;

    margin-top: 12px;
  }

  .summary > .official-button {
    order: 9;

    margin-top: 13px;
  }

  .card-frame {
    width:
      min(
        100%,
        430px
      );

    margin-inline: auto;
  }

  .illustration-switch {
    width:
      min(
        100%,
        430px
      );

    margin:
      14px auto
      0;
  }

  .content-grid {
    margin-top: 28px;

    grid-template-columns: 1fr;
  }

}

/* =========================================================
 * Phone refinement
 * ========================================================= */

@media (max-width: 620px) {

  main.container {
    width:
      calc(100% - 24px);

    padding-top: 18px;
    padding-bottom: 60px;
  }

  .breadcrumb {
    margin-bottom: 18px;

    font-size: 11px;
  }

  .series {
    font-size: 13px;
  }

  .summary > h1 {
    font-size:
      clamp(
        34px,
        10.2vw,
        42px
      );
  }

  .card-number {
    font-size: 13px;
  }

  .tag {
    padding: 7px 9px;

    font-size: 11px;
  }

  .quick-label {
    font-size: 11px;
  }

  .quick-value {
    font-size: 16px;
  }

  .image-caption {
    font-size: 11px;
  }

  .illustration-switch-title {
    font-size: 14px;
  }

  .illustration-switch-note {
    font-size: 11px;
  }

  .variant-key {
    font-size: 11px;
  }

  .market-preview {
    padding: 17px;
  }

  .market-copy strong {
    font-size: 15px;
  }

  .market-copy span {
    font-size: 12.5px;
  }

  .market-status {
    font-size: 11px;
  }

  .market-insights {
    padding: 15px 16px;
  }

  .market-insights-title {
    font-size: 13px;
  }

  .market-insight {
    font-size: 12px;
  }

  .panel {
    padding: 18px;

    border-radius: 18px;
  }

  .panel-title {
    font-size: 17px;
  }

  dt {
    font-size: 12px;
  }

  dd {
    font-size: 13.5px;
  }

  .effect-text {
    font-size: 14px;
    line-height: 1.85;
  }

  .source-note {
    font-size: 11px;
  }

  .price-basis,
  .price-evidence-detail summary,
  .price-evidence-copy,
  .price-disclaimer {
    font-size: 11px;
  }

}

/* =========================================================
 * Very narrow phones
 * ========================================================= */

@media (max-width: 390px) {

  main.container {
    width:
      calc(100% - 18px);
  }

  .summary > h1 {
    font-size: 35px;
  }

  .card-stage {
    margin-top: 20px;
  }

  .card-stage .variant-list {
    gap: 6px;
  }

  .data-row {
    grid-template-columns:
      minmax(82px, 31%)
      minmax(0,1fr);
  }

}
