/* Airstars visual explainers | 2026-11-29 */
.viz {
  margin: 1.75rem 0;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #FFFDF8;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(11, 34, 57, .04);
}
.viz-head {
  padding: 1.05rem 1.25rem .7rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #FFFDF8 0%, #FBF7EE 100%);
}
.viz-eyebrow {
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 800;
}
.viz-title {
  font-family: var(--font-display);
  font-size: 1.16rem;
  line-height: 1.3;
  color: var(--ink);
  margin: .28rem 0 0;
  font-weight: 700;
}
.viz-body {
  padding: 1.15rem 1.25rem 1.25rem;
}
.viz-caption {
  font-size: .8rem;
  line-height: 1.55;
  color: #5A7184;
  margin: .85rem 0 0;
}
.viz-note {
  font-size: .78rem;
  line-height: 1.5;
  color: #5A7184;
  background: #F7F2E7;
  border-left: 3px solid var(--amber);
  padding: .65rem .8rem;
  border-radius: 0 .5rem .5rem 0;
  margin: .9rem 0 0;
}
.viz-icon {
  width: 1.45rem;
  height: 1.45rem;
  flex: 0 0 auto;
  color: var(--amber);
}

/* Form schema */
.viz-form {
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: #FFFFFF;
  overflow: hidden;
}
.viz-form-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1rem;
  background: var(--navy);
  color: #FFFFFF;
}
.viz-form-top strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: .02em;
  color: #FFFFFF;
}
.viz-form-top span {
  font-size: .72rem;
  color: #DBE6F2;
  text-align: right;
}
.viz-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
  padding: .9rem;
}
.viz-field {
  border: 1px solid var(--line);
  border-radius: .55rem;
  padding: .6rem .7rem;
  background: #FFFDF8;
}
.viz-field.wide {
  grid-column: 1 / -1;
}
.viz-field-label {
  font-size: .66rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6B7280;
  font-weight: 800;
}
.viz-field-value {
  font-size: .88rem;
  line-height: 1.4;
  color: var(--ink);
  font-weight: 600;
  margin-top: .18rem;
}

/* Timeline */
.viz-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
  position: relative;
  margin: .4rem 0 .2rem;
}
.viz-step {
  position: relative;
  padding-top: 1.25rem;
}
.viz-step::before {
  content: "";
  position: absolute;
  top: .34rem;
  left: 0;
  right: -.75rem;
  height: 2px;
  background: #E5E7EB;
}
.viz-step:last-child::before {
  right: 0;
}
.viz-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: .75rem;
  height: .75rem;
  border-radius: 50%;
  background: var(--amber);
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 0 2px var(--amber);
}
.viz-step h4 {
  font-size: .86rem;
  line-height: 1.3;
  margin: 0 0 .22rem;
  color: var(--ink);
  font-weight: 700;
}
.viz-step p {
  font-size: .76rem;
  line-height: 1.45;
  color: #5A7184;
  margin: 0;
}

/* Bars */
.viz-bars {
  display: grid;
  gap: .55rem;
  margin: .5rem 0 .2rem;
}
.viz-bar-row {
  display: grid;
  grid-template-columns: 9.5rem 1fr 5.8rem;
  gap: .6rem;
  align-items: center;
}
.viz-bar-label {
  font-size: .8rem;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.3;
}
.viz-bar-track {
  height: 1.5rem;
  background: #F1EDE4;
  border-radius: .35rem;
  overflow: hidden;
}
.viz-bar-fill {
  height: 100%;
  background: var(--navy);
  border-radius: .35rem;
}
.viz-bar-fill.gold {
  background: var(--amber);
}
.viz-bar-fill.sage {
  background: #6E7F6A;
}
.viz-bar-fill.walnut {
  background: #3B2A20;
}
.viz-bar-value {
  font-size: .82rem;
  font-weight: 700;
  color: var(--ink);
  text-align: right;
  white-space: nowrap;
}
.viz-bar-row.total {
  border-top: 2px solid var(--navy);
  padding-top: .45rem;
  margin-top: .15rem;
}

/* Stacked bar */
.viz-stack {
  display: flex;
  height: 2.35rem;
  border-radius: .45rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #F1EDE4;
}
.viz-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  font-size: .7rem;
  font-weight: 800;
  color: #FFFFFF;
  overflow: hidden;
  white-space: nowrap;
}
.viz-seg.navy { background: var(--navy); }
.viz-seg.gold { background: var(--amber); }
.viz-seg.sage { background: #6E7F6A; }
.viz-seg.walnut { background: #3B2A20; }
.viz-seg.cream { background: #E8DFCF; color: var(--ink); }
.viz-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem 1rem;
  margin: .65rem 0 0;
  font-size: .76rem;
  color: #5A7184;
}
.viz-swatch {
  display: inline-block;
  width: .7rem;
  height: .7rem;
  border-radius: .15rem;
  margin-right: .32rem;
  vertical-align: -.05rem;
}

/* Comparison cards */
.viz-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin: .4rem 0 .2rem;
}
.viz-col {
  border: 1px solid var(--line);
  border-radius: .7rem;
  background: #FFFFFF;
  padding: .85rem .9rem;
}
.viz-col h4 {
  font-size: .84rem;
  line-height: 1.3;
  margin: 0 0 .35rem;
  color: var(--ink);
}
.viz-col .big {
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1.1;
  color: var(--navy);
}
.viz-col .small {
  font-size: .76rem;
  line-height: 1.45;
  color: #5A7184;
  margin-top: .25rem;
}
.viz-col.highlight {
  background: #FFF7E0;
  border-color: #F0D9A8;
}

/* Table */
.viz-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .84rem;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: .65rem;
  overflow: hidden;
}
.viz-table th,
.viz-table td {
  padding: .55rem .7rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.viz-table th {
  background: #F3EEE4;
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 800;
}
.viz-table tr:last-child td {
  border-bottom: 0;
}
.viz-table td:last-child {
  text-align: right;
  white-space: nowrap;
  font-weight: 700;
}
.viz-table.fixed {
  table-layout: fixed;
}
.viz-table.fixed th,
.viz-table.fixed td {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.viz-table.fixed td:last-child {
  white-space: normal;
  text-align: left;
}

/* Split panel */
.viz-split {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 1rem;
  align-items: start;
}

/* Checklist */
.viz-check {
  display: grid;
  gap: .45rem;
  margin: .3rem 0 .2rem;
}
.viz-check-item {
  display: flex;
  gap: .55rem;
  align-items: flex-start;
  font-size: .84rem;
  line-height: 1.45;
  color: var(--ink);
}
.viz-check-box {
  width: 1.05rem;
  height: 1.05rem;
  border: 2px solid var(--amber);
  border-radius: .25rem;
  flex: 0 0 auto;
  margin-top: .12rem;
  background: #FFFFFF;
}

/* Decision branches */
.viz-decision {
  display: grid;
  gap: .55rem;
  margin: .3rem 0 .2rem;
}
.viz-decision.two {
  grid-template-columns: 1fr 1fr;
}
.viz-branch {
  border-left: 3px solid var(--amber);
  background: #FFFFFF;
  border-radius: 0 .5rem .5rem 0;
  padding: .55rem .75rem;
}
.viz-branch strong {
  display: block;
  font-size: .8rem;
  color: var(--navy);
  margin-bottom: .15rem;
}
.viz-branch span {
  display: block;
  font-size: .79rem;
  line-height: 1.45;
  color: #5A7184;
}

/* Vertical process flow */
.viz-flow {
  display: grid;
  gap: .5rem;
  margin: .3rem 0 .2rem;
}
.viz-flow-step {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
}
.viz-flow-num {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--navy);
  color: #FFFFFF;
  font-size: .7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.viz-flow-step p {
  font-size: .83rem;
  line-height: 1.45;
  color: var(--ink);
  margin: .12rem 0 0;
}

/* Horizontal scroll for wide matrices */
.viz-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: .65rem;
}
.viz-scroll .viz-table {
  border: 0;
  min-width: 680px;
}

@media (max-width: 720px) {
  .viz-split {
    grid-template-columns: 1fr;
  }
  .viz-decision.two {
    grid-template-columns: 1fr;
  }
  .viz-table.responsive thead {
    display: none;
  }
  .viz-table.responsive,
  .viz-table.responsive tbody,
  .viz-table.responsive tr,
  .viz-table.responsive td {
    display: block;
    width: 100%;
  }
  .viz-table.responsive tr {
    border: 1px solid var(--line);
    border-radius: .6rem;
    margin-bottom: .6rem;
    background: #FFFFFF;
    overflow: hidden;
  }
  .viz-table.responsive td {
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: .55rem .7rem;
    text-align: left !important;
    white-space: normal !important;
  }
  .viz-table.responsive td:last-child {
    border-bottom: 0;
  }
  .viz-table.responsive td::before {
    content: attr(data-label);
    display: block;
    font-size: .63rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #6B7280;
    font-weight: 800;
    margin-bottom: .15rem;
  }
  .viz-grid {
    grid-template-columns: 1fr;
  }
  .viz-timeline {
    grid-template-columns: 1fr;
    gap: .85rem;
  }
  .viz-step {
    padding-top: 0;
    padding-left: 1.2rem;
  }
  .viz-step::before {
    top: 0;
    bottom: -.85rem;
    left: .34rem;
    right: auto;
    width: 2px;
    height: auto;
  }
  .viz-step:last-child::before {
    display: none;
  }
  .viz-dot {
    top: .18rem;
    left: 0;
  }
  .viz-bar-row {
    grid-template-columns: 7.2rem 1fr 4.7rem;
    gap: .4rem;
  }
  .viz-bar-label {
    font-size: .74rem;
  }
  .viz-bar-value {
    font-size: .76rem;
  }
  .viz-compare {
    grid-template-columns: 1fr;
  }
  .viz-form-top {
    align-items: flex-start;
  }
  .viz-form-top span {
    max-width: 55%;
  }
}
