#content.benchmarks-content {
  grid-template: "article" auto / minmax(0, 1fr);
  article > h2 { margin-top: 3.5rem; }
  article > h2:first-child { margin-top: 0; }
  article > p:last-child { margin-top: 2.5rem; }
  .benchmarks-table {
    width: 100%;
    overflow-x: auto;
  }
  .benchmarks-table table {
    table-layout: auto;
    margin-top: 1.5rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    th, td { padding: .7rem .7rem; }
    th:first-child, td:first-child { width: auto; }
    th:not(:first-child), td:not(:first-child) { text-align: right; }
    @media (width < 600px){
      display: table;
    }
  }
  .benchmarks-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 28rem), 1fr));
    gap: 0 4rem;
    margin-top: 3.5rem;
    h2 {
      margin: 0 0 1em;
      font-size: 2rem;
    }
    p { margin: 1.4em 0; }
    ul {
      padding-left: 1.2rem;
      margin: 0;
    }
    li + li { margin-top: .7rem; }
    table {
      table-layout: auto;
      margin-top: 0;
      th:first-child, td:first-child { width: 30%; }
    }
    @media (width < 1000px){
      h2 { margin-top: 3.5rem; }
    }
    @media (width < 600px){
      table, tbody, tr, td { display: block; }
      thead { display: none; }
      tr {
        padding: .9rem 0;
        border-bottom: 1px solid #e2e4f0;
      }
      td {
        padding: 0;
        border: 0;
      }
      table td:first-child {
        width: auto;
        font-weight: 600;
      }
      td:nth-child(2) {
        margin: .1rem 0 .4rem;
        font-size: .85rem;
        color: #5f6b85;
      }
    }
  }
}

#benchmarks-explorer {
  --ink: #12324b;
  --muted: #5f6b85;
  --line: #e3e7f1;
  --blue: #0590e2;
  --pink: #ff4370;
  box-sizing: border-box;
  padding: 2.5rem max((100% - 1200px) / 2 + 2rem, 2rem) 0;
  color: var(--ink);

  .benchmarks-answer {
    max-width: 54rem;
    margin: 0 0 1rem;
    font-size: 1.2rem;
    line-height: 1.6;
  }

  .benchmarks-answer-points {
    max-width: 54rem;
    margin: 0 0 2rem;
    padding-left: 1.2rem;
    line-height: 1.6;
    li {
      margin: .3rem 0;
    }
  }

  .benchmarks-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 1rem;
    margin: 0 0 2rem;
    div {
      padding: 1.2rem 1.4rem;
      border: 1px solid var(--line);
      border-radius: .9rem;
      background: linear-gradient(180deg, white, #f7f9fd);
    }
    dt {
      font-size: .85rem;
      font-weight: 600;
      color: var(--muted);
    }
    dd {
      margin: .4rem 0 0;
      color: var(--muted);
      strong {
        margin-right: .3rem;
        font-size: 2.2rem;
        line-height: 1;
        letter-spacing: -.02em;
        color: var(--ink);
        font-variant-numeric: tabular-nums;
      }
    }
    .range {
      font-size: .85rem;
      font-variant-numeric: tabular-nums;
    }
  }

  .benchmarks-panel {
    padding: 1.6rem 1.8rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: white;
    box-shadow: 0 1.5rem 4rem -1.5rem #12324b26;
  }

  form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 1rem 1.5rem;
    transition: opacity .2s;
  }
  &:not(.ready) form { opacity: .4; pointer-events: none; }
  fieldset {
    min-width: 0;
    padding: 0;
    margin: 0;
    border: 0;
  }
  legend, .benchmarks-field > span {
    display: block;
    padding: 0;
    margin: 0 0 .4rem;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .benchmarks-field[hidden] { display: none; }

  .benchmarks-segmented {
    display: inline-flex;
    max-width: 100%;
    padding: 3px;
    border-radius: .65rem;
    background: #eef1f8;
    label { display: block; cursor: pointer; }
    input {
      position: absolute;
      opacity: 0;
      pointer-events: none;
    }
    span {
      display: block;
      padding: .5rem .9rem;
      border-radius: .5rem;
      font-size: .9rem;
      font-weight: 500;
      line-height: 1.25rem;
      color: var(--muted);
      white-space: nowrap;
      transition: background-color .15s, color .15s, box-shadow .15s;
    }
    label:hover span { color: var(--ink); }
    input:checked + span {
      color: var(--ink);
      background: white;
      box-shadow: 0 1px 3px #12324b26;
    }
    input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 1px; }
  }

  select {
    appearance: none;
    box-sizing: border-box;
    display: block;
    height: calc(2.25rem + 6px);
    min-width: 10.5rem;
    padding: 0 2.4rem 0 .9rem;
    margin: 0;
    border: 1px solid #d3d9e8;
    border-radius: .65rem;
    background: white right .8rem center / .7rem no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%2312324b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    font: inherit;
    font-size: .9rem;
    font-weight: 500;
    line-height: 1.25rem;
    color: var(--ink);
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
    &:hover { border-color: #9fb0cf; }
    &:focus-visible {
      border-color: var(--blue);
      outline: 0;
      box-shadow: 0 0 0 3px #0590e233;
    }
  }

  .benchmarks-switch {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .9rem;
    font-weight: 500;
    color: var(--ink);
    cursor: pointer;
    input {
      appearance: none;
      position: relative;
      width: 2.4rem;
      height: 1.4rem;
      margin: 0;
      border-radius: 1rem;
      background: #c9d1e3;
      cursor: pointer;
      transition: background-color .15s;
      &::after {
        content: "";
        position: absolute;
        inset: 3px auto 3px 3px;
        width: calc(1.4rem - 6px);
        border-radius: 50%;
        background: white;
        box-shadow: 0 1px 2px #12324b40;
        transition: translate .15s;
      }
      &:checked { background: var(--blue); }
      &:checked::after { translate: 1rem; }
      &:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
    }
  }

  .benchmarks-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1.6rem;
    padding: 0;
    margin: 1.4rem 0 0;
    list-style: none;
    font-size: .9rem;
    color: var(--muted);
    li {
      display: flex;
      align-items: center;
      gap: .5rem;
    }
    li::before {
      content: "";
      width: .65rem;
      height: .65rem;
      border-radius: 2px;
      background: var(--color, var(--blue));
    }
    .median::before {
      box-sizing: border-box;
      border: 2px solid var(--ink);
      border-radius: 50%;
      background: white;
    }
    .bottom::before { background: var(--pink); }
    .labels { margin-left: auto; }
    .labels::before { content: none; }
    .own::before {
      width: 1.3rem;
      height: 2px;
      background: var(--ink);
    }
    .own a {
      color: #0577c0;
      font-weight: 600;
      text-underline-offset: .2em;
    }
  }

  .benchmarks-charts { margin-top: 1.4rem; }
  figure {
    position: relative;
    padding: 1.6rem 0 1rem;
    margin: 0;
    border-top: 1px solid var(--line);
  }
  figcaption {
    display: flex;
    align-items: center;
    gap: .7rem;
    font-size: 1.2rem;
    font-weight: 600;
    small {
      padding: .15rem .55rem;
      border-radius: 1rem;
      background: #eef1f8;
      font-size: .7rem;
      font-weight: 600;
      letter-spacing: .04em;
      text-transform: uppercase;
      color: var(--muted);
    }
  }
  .benchmarks-headline {
    margin: .5rem 0 0;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    strong {
      font-size: 2rem;
      line-height: 1.1;
      letter-spacing: -.02em;
      color: var(--ink);
    }
    span {
      margin-left: .6rem;
      font-size: .9rem;
    }
  }
  svg {
    display: block;
    width: 100%;
    height: auto;
    margin-top: .6rem;
    &[hidden] { display: none; }
    .tick {
      font-size: 11px;
      fill: #7a859d;
    }
    .value {
      font-size: 11px;
      font-weight: 500;
      fill: var(--ink);
    }
    .bar:hover rect:first-child { fill: #0590e20f; }
  }
  .benchmarks-note {
    margin: .8rem 0 0;
    font-size: .9rem;
    color: var(--muted);
  }
  .benchmarks-tooltip {
    position: absolute;
    z-index: 1;
    display: grid;
    gap: .25rem;
    min-width: 10rem;
    padding: .7rem .9rem;
    border-radius: .6rem;
    background: var(--ink);
    color: white;
    font-size: .8rem;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 .6rem 1.5rem #12324b40;
    pointer-events: none;
    translate: 1.2rem -50%;
    &.left { translate: calc(-100% - 1.2rem) -50%; }
    &[hidden] { display: none; }
    strong { margin-bottom: .2rem; }
    span {
      display: flex;
      justify-content: space-between;
      gap: 1rem;
      color: #c6d3e6;
    }
    b { color: white; }
  }

  .benchmarks-signup {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    padding: 1.6rem 2rem;
    margin: 2rem 0;
    border-radius: 1rem;
    color: white;
    background: linear-gradient(100deg, #00274c, #0b4a7d);
    p {
      max-width: 44rem;
      margin: 0;
      line-height: 1.5;
    }
    a {
      padding: .75rem 1.3rem;
      border-radius: .6rem;
      background: white;
      color: var(--ink);
      font-weight: 600;
      text-decoration: none;
      white-space: nowrap;
      transition: translate .15s, box-shadow .15s;
      &:hover {
        translate: 0 -1px;
        box-shadow: 0 .4rem 1rem #0006;
      }
    }
  }

  .benchmarks-milestone {
    h2 {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: .6rem;
      margin: 0 0 1rem;
      font-size: 1.2rem;
    }
    select { min-width: 8.5rem; font-weight: 600; }
    .benchmarks-legend li::before { border-radius: 50%; }
  }

  @media (width < 700px){
    padding-inline: 1rem;
    .benchmarks-panel { padding: 1.2rem 1rem; }
    .benchmarks-legend .labels { margin-left: 0; }
    .benchmarks-headline span { display: block; margin: .2rem 0 0; }
    .benchmarks-segmented span { padding-inline: .6rem; font-size: .85rem; }
    fieldset, .benchmarks-field, select { width: 100%; }
    .benchmarks-segmented { display: flex; }
    .benchmarks-segmented label { flex: 1; text-align: center; }
  }
}
