/* ===========================================================================
   AppSec Rating RU — ranking sheet
   The page's organising idea is the verification token: a solid lime bar means
   the claim was matched against a public register, a dashed hollow bar means it
   is the company's own word. Every table cell, card and criterion reuses it.
   =========================================================================== */

/* ---------------------------------------------------------------- opening */
.ar-open {
  position: relative;
  background: var(--ar-coal) url('../images/weave.svg') center / cover no-repeat;
  color: #C6CBCE;
  overflow: hidden;
}
.ar-open .ar-hold {
  position: relative;
  padding-block: clamp(2.75rem, 7vw, 5rem) clamp(2.5rem, 6vw, 4.25rem);
}
.ar-open h1 { color: var(--ar-paper); max-width: 25ch; }
.ar-open .ar-tag { color: var(--ar-paper-dim); }
.ar-open .ar-tag::before { background: var(--ar-lime); }
.ar-open-lede {
  margin-top: 1.25rem;
  max-width: 58ch;
  font-size: clamp(1.03rem, 1.5vw, 1.18rem);
  line-height: 1.65;
  color: #C6CBCE;
}
.ar-open-acts { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.75rem; }

/* the independence declaration, stated where it cannot be missed */
.ar-writ {
  margin-top: 2.25rem;
  border: 1px solid #333A3F;
  border-radius: var(--ar-r-lg);
  background: rgba(12,14,16,.55);
  backdrop-filter: blur(2px);
  padding: 1.15rem 1.25rem;
  display: grid; gap: .85rem;
}
.ar-writ dl { margin: 0; display: grid; gap: .7rem; }
.ar-writ-row { display: flex; align-items: baseline; gap: .8rem; }
.ar-writ dt {
  font-family: var(--ar-face-data);
  font-size: 1.5rem; font-weight: 500; line-height: 1;
  color: var(--ar-lime); flex: none; min-width: 2.4ch;
}
.ar-writ dd { margin: 0; font-size: .88rem; line-height: 1.5; color: #AEB4B8; }

/* the token legend, introduced once and used sitewide afterwards */
.ar-legend {
  border-top: 1px solid #333A3F;
  padding-top: .85rem;
  display: flex; flex-wrap: wrap; gap: .6rem 1.4rem;
  font-size: .8rem; color: #AEB4B8;
}
.ar-legend span { display: inline-flex; align-items: center; gap: .5rem; }

/* -------------------------------------------------------- the token itself */
.ar-tok { display: inline-flex; align-items: center; gap: .45rem; }
.ar-tok::before {
  content: ''; flex: none;
  width: 22px; height: 6px; border-radius: 3px;
  background: var(--ar-lime-deep);
}
.ar-tok-open::before {
  background: none;
  border: 1.6px dashed #9AA0A4;
  height: 8px;
  width: 22px;
}
.ar-open .ar-tok::before, .ar-slab-coal .ar-tok::before { background: var(--ar-lime); }
.ar-open .ar-tok-open::before, .ar-slab-coal .ar-tok-open::before { background: none; border-color: #767D6E; }

/* --------------------------------------------------------- threat tiles */
.ar-risks {
  list-style: none; margin: 2rem 0 0; padding: 0;
  display: grid; gap: 1rem;
}
.ar-risk {
  background: var(--ar-sheet);
  border: 1px solid var(--ar-rule);
  border-radius: var(--ar-r-lg);
  padding: 1.35rem;
  box-shadow: var(--ar-lift-1);
  transition: transform var(--ar-easy), box-shadow var(--ar-easy);
}
.ar-risk:hover { transform: translateY(-3px); box-shadow: var(--ar-lift-2); }
.ar-risk svg { width: 26px; height: 26px; color: var(--ar-ink); display: block; }
.ar-risk h3 { margin: .85rem 0 .45rem; font-size: 1.04rem; }
.ar-risk p { font-size: .91rem; line-height: 1.6; color: var(--ar-ink-soft); margin: 0; }

/* ------------------------------------------------------------- criteria */
.ar-crit { list-style: none; margin: 2.25rem 0 0; padding: 0; display: grid; gap: 0; }
.ar-crit > li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .35rem 1.1rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--ar-rule);
}
.ar-crit > li:last-child { border-bottom: 1px solid var(--ar-rule); }
.ar-crit-no {
  font-family: var(--ar-face-data);
  font-size: .78rem; font-weight: 500; letter-spacing: .06em;
  color: var(--ar-lime-deep);
  padding-top: .3rem;
}
.ar-crit h3 { grid-column: 2; }
.ar-crit p { grid-column: 2; margin: .5rem 0 0; color: var(--ar-ink-soft); font-size: .96rem; }

/* -------------------------------------------------------------- matrix */
.ar-scroll {
  overflow-x: auto;
  border: 1px solid var(--ar-rule);
  border-radius: var(--ar-r-lg);
  background: var(--ar-sheet);
  box-shadow: var(--ar-lift-1);
  -webkit-overflow-scrolling: touch;
}
.ar-matrix { width: 100%; border-collapse: collapse; font-size: .89rem; min-width: 900px; }
.ar-matrix caption {
  caption-side: top; text-align: left;
  padding: 1rem 1.1rem .25rem;
  font-family: var(--ar-face-data); font-size: .7rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ar-ink-mute);
}
.ar-matrix th, .ar-matrix td {
  padding: .82rem 1.1rem;
  text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--ar-rule);
}
.ar-matrix thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--ar-paper-2);
  font-family: var(--ar-face-data);
  font-size: .68rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ar-ink-soft);
  border-bottom: 1px solid var(--ar-rule-firm);
  line-height: 1.45;
}
.ar-matrix thead th:first-child { width: 44px; min-width: 44px; }
.ar-matrix thead th:nth-child(2) { min-width: 178px; }
.ar-matrix tbody tr:last-child th, .ar-matrix tbody tr:last-child td { border-bottom: 0; }
.ar-matrix tbody tr:hover { background: #FBFCF8; }
.ar-matrix-no {
  font-family: var(--ar-face-data); font-size: .84rem; font-weight: 500;
  color: var(--ar-ink-mute);
}
.ar-matrix-firm { font-weight: 600; font-size: .94rem; }
.ar-matrix-firm a { text-decoration: none; }
.ar-matrix-firm a:hover { text-decoration: underline; }
.ar-matrix code {
  font-family: var(--ar-face-data); font-size: .76rem;
  color: var(--ar-ink-soft); white-space: nowrap;
}

/* --------------------------------------------------------------- cards */
.ar-firms { display: grid; gap: 1.15rem; margin-top: 2.25rem; }

.ar-firm {
  background: var(--ar-sheet);
  border: 1px solid var(--ar-rule);
  border-radius: var(--ar-r-lg);
  padding: 1.4rem;
  box-shadow: var(--ar-lift-1);
  transition: transform var(--ar-easy), box-shadow var(--ar-easy), border-color var(--ar-easy);
}
.ar-firm:hover { transform: translateY(-3px); box-shadow: var(--ar-lift-2); border-color: var(--ar-rule-firm); }

.ar-firm-top { display: flex; align-items: flex-start; gap: .9rem; }
.ar-firm-top img { width: 44px; height: 44px; flex: none; border-radius: var(--ar-r-md); }
.ar-firm-rank {
  font-family: var(--ar-face-data);
  font-size: .74rem; font-weight: 500; letter-spacing: .1em;
  color: var(--ar-ink-mute);
  display: block; margin-bottom: .2rem;
}
.ar-firm-top h3 { font-size: clamp(1.18rem, 2.2vw, 1.42rem); }
.ar-firm-site {
  display: inline-block; margin-top: .3rem;
  font-family: var(--ar-face-data); font-size: .76rem;
  color: var(--ar-ink-mute); text-decoration: none;
  border-bottom: 1px solid var(--ar-rule-firm);
  transition: color var(--ar-quick), border-color var(--ar-quick);
}
.ar-firm-site:hover { color: var(--ar-ink); border-color: var(--ar-ink); }

.ar-firm-body { margin-top: 1.05rem; }
.ar-firm-body p { font-size: .95rem; line-height: 1.68; color: var(--ar-ink-soft); }

.ar-firm-facts {
  margin: 1.05rem 0 0; padding: .95rem 0 0;
  border-top: 1px solid var(--ar-rule);
  display: grid; gap: .6rem;
  font-size: .87rem;
}
.ar-firm-facts div { display: grid; grid-template-columns: 1fr; gap: .1rem; }
.ar-firm-facts dt {
  font-family: var(--ar-face-data);
  font-size: .66rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ar-ink-mute);
}
.ar-firm-facts dd { margin: 0; color: var(--ar-ink-soft); }
.ar-firm-facts code { font-family: var(--ar-face-data); font-size: .78rem; }

/* five segments, one per methodology criterion, identical on all ten cards */
.ar-strip { display: flex; align-items: center; gap: .3rem; margin-top: .15rem; }
.ar-strip i {
  display: block; width: 26px; height: 6px; border-radius: 3px;
  background: var(--ar-lime-deep);
}
.ar-strip i[data-off] { background: none; border: 1.5px dashed var(--ar-rule-firm); height: 8px; }
.ar-strip-note {
  font-family: var(--ar-face-data); font-size: .7rem;
  color: var(--ar-ink-mute); margin-left: .35rem;
}

/* ------------------------------------------------------- split deep dive */
.ar-versus { display: grid; gap: 1rem; margin-top: 2.25rem; }
.ar-versus > div {
  border: 1px solid #333A3F;
  border-radius: var(--ar-r-lg);
  padding: 1.35rem;
  background: rgba(255,255,255,.028);
}
.ar-versus h3 { font-size: 1.08rem; margin-bottom: .7rem; }
.ar-versus ul { list-style: none; margin: .85rem 0 0; padding: 0; display: grid; gap: .55rem; font-size: .9rem; }
.ar-versus li { display: flex; gap: .6rem; align-items: baseline; }
.ar-versus li::before {
  content: ''; flex: none; width: 14px; height: 2px; margin-top: .62rem;
  border-radius: 2px; background: var(--ar-lime);
}
.ar-versus-cold li::before { background: none; border-top: 1.6px dashed #767D6E; height: 0; }

/* ------------------------------------------------------------- callout */
.ar-note {
  margin: 1.75rem 0 0;
  border-left: 3px solid var(--ar-lime-deep);
  background: var(--ar-lime-wash);
  border-radius: 0 var(--ar-r-md) var(--ar-r-md) 0;
  padding: 1.1rem 1.25rem;
  font-size: .95rem; line-height: 1.65;
}
.ar-slab-coal .ar-note {
  background: rgba(201,242,77,.07);
  border-left-color: var(--ar-lime);
  color: #D6DBDD;
}

/* --------------------------------------------------------- number inset */
.ar-figures {
  list-style: none; margin: 2rem 0 0; padding: 0;
  display: grid; gap: 1.25rem;
  border-top: 1px solid var(--ar-rule);
  padding-top: 1.75rem;
}
.ar-figures dt {
  font-family: var(--ar-face-display);
  font-size: clamp(2rem, 5vw, 2.9rem); font-weight: 600; letter-spacing: -0.04em;
  line-height: 1; color: var(--ar-ink);
}
.ar-figures dd { margin: .6rem 0 0; font-size: .9rem; line-height: 1.55; color: var(--ar-ink-mute); max-width: 30ch; }

/* ---------------------------------------------------------------- rules */
.ar-rules { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 760px; }
.ar-rules th, .ar-rules td {
  padding: .82rem 1.1rem; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--ar-rule);
}
.ar-rules thead th {
  background: var(--ar-paper-2);
  font-family: var(--ar-face-data);
  font-size: .68rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ar-ink-soft);
  border-bottom: 1px solid var(--ar-rule-firm);
}
.ar-rules tbody th { font-weight: 600; white-space: nowrap; }
.ar-rules tbody tr:last-child th, .ar-rules tbody tr:last-child td { border-bottom: 0; }

/* ------------------------------------------------------------------ FAQ */
.ar-asks { margin-top: 2rem; border-top: 1px solid var(--ar-rule); }
.ar-ask { border-bottom: 1px solid var(--ar-rule); }
.ar-ask summary {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1.15rem .25rem;
  cursor: pointer; list-style: none;
}
.ar-ask summary::-webkit-details-marker { display: none; }
.ar-ask summary h3 { flex: 1; font-size: 1.04rem; letter-spacing: -0.015em; }
.ar-ask summary::after {
  content: ''; flex: none; width: 13px; height: 13px; margin-top: .35rem;
  border-right: 2px solid var(--ar-ink-mute);
  border-bottom: 2px solid var(--ar-ink-mute);
  transform: rotate(45deg);
  transition: transform var(--ar-easy);
}
.ar-ask[open] summary::after { transform: rotate(-135deg); }
.ar-ask summary:hover h3 { color: var(--ar-ink); }
.ar-ask-say {
  padding: 0 2.4rem 1.35rem .25rem;
  font-size: .95rem; line-height: 1.7; color: var(--ar-ink-soft);
}

/* ------------------------------------------------------------ 768+ */
@media (min-width: 768px) {
  .ar-open .ar-hold {
    display: grid;
    grid-template-columns: 1.35fr .9fr;
    gap: 3rem;
    align-items: end;
    padding-block: clamp(4rem, 8vw, 6.5rem) clamp(3.5rem, 7vw, 5rem);
  }
  .ar-open-head { grid-column: 1; }
  .ar-writ { grid-column: 2; margin-top: 0; }

  .ar-risks { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
  .ar-crit > li { grid-template-columns: auto minmax(0, 22ch) 1fr; gap: 0 1.75rem; align-items: start; }
  .ar-crit h3 { grid-column: 2; }
  .ar-crit p { grid-column: 3; margin-top: 0; }

  .ar-firm { padding: 1.75rem; }
  .ar-versus { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .ar-figures { grid-template-columns: repeat(4, 1fr); gap: 1.75rem; }
}

@media (min-width: 1024px) {
  .ar-risks { grid-template-columns: repeat(4, 1fr); }
  .ar-firm-top img { width: 52px; height: 52px; }
  /* Two columns keep the card body near a 65-character measure; a single
     full-width card ran past 130 and stopped reading like prose. */
  .ar-firms { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
}
