/* dragonlock.app v3: the comparisons (/compare/). Loaded after site.css and blog.css on /compare/ pages only: a
   comparison is read like a guide, and this adds what a comparison needs and a guide doesn't. The disclosure under the
   byline; the verdict's two sides inside the short answer; the side-by-side table (a <tbody> per row group, its head
   row in view while you read down it, Dragonlock's own column lightly lit so you can find it, a plain "Yes" in moss)
   which turns into one card per row when its column is narrow; the "Checked" stamp; a year's cost per app; captures
   from the app as screens; the trademark line; and on the hub, the comparison cards and the house rules. */

/* ------------------------------------------------------------------ the disclosure: who's writing, and their stake */
.disclosure { max-width: 36rem; margin: 1.6rem 0 0; padding: .95rem 1.15rem 1rem; border-radius: var(--r); background: var(--paper-2);
  font: 400 1rem/1.55 var(--body); color: var(--fg-2); text-wrap: pretty; }
.disclosure b { display: block; margin: 0 0 .2rem; font: 600 1rem/1.3 var(--display); font-variant-caps: all-small-caps; letter-spacing: .09em; color: var(--fg); }

/* ------------------------------------------------------------------ the verdict: the short answer, then both sides */
.verdict { container: verdict / inline-size; }
.verdict .sides { display: grid; gap: .75rem; margin-top: 1.25rem; }
.verdict .side { padding: 1rem 1.15rem 1.1rem; border-radius: var(--r); background: var(--paper); box-shadow: inset 0 0 0 1px var(--hair); }
.verdict .side-head { margin: 0 0 .55rem; font: 700 1.1rem/1.3 var(--display); color: var(--fg); text-wrap: balance; }
.verdict .side ul { margin: 0; padding-left: 1.2em; font: 400 1.04rem/1.5 var(--body); color: var(--fg-2); }
.verdict .side li { margin: .35em 0 0; }
.verdict .side li::before { top: .62em; }
@container verdict (min-width: 34rem) {
  /* side by side; the two heads share a row so both lists start on the same line */
  .verdict .sides { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; column-gap: .9rem; row-gap: 0; }
  .verdict .side { display: grid; grid-row: span 2; grid-template-rows: subgrid; }
  .verdict .side-head .nobr { white-space: nowrap; }
}

/* a roundup's short answer: what you want, then the app for it, joined by a dotted leader; stacked when narrow */
.prose .picks { margin: 1rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--hair); }
.prose .picks > li { display: grid; gap: .1rem; margin: 0; padding: .7rem 0; border-bottom: 1px solid var(--hair); }
.prose .picks > li::before { content: none; }
.picks .want { font: 400 1.04rem/1.45 var(--body); color: var(--fg-2); }
.picks .pick { font: 700 1.12rem/1.3 var(--display); }
.picks .pick a { color: var(--link); text-decoration: none; }
.picks .pick a::after { content: " →"; font-weight: 400; }
.picks .pick a:hover { text-decoration: underline; }
.verdict .after-picks { margin: 1rem 0 0; font: 400 1rem/1.55 var(--body); color: var(--fg-3); }
@container verdict (min-width: 32rem) {
  .prose .picks > li { grid-template-columns: auto 1fr auto; align-items: baseline; gap: .75rem; padding: .6rem 0; }
  .picks .want { grid-column: 1; }
  .picks > li::after { content: ""; grid-column: 2; grid-row: 1; align-self: end; margin-bottom: .38em; border-bottom: 1.5px dotted var(--line-2); }
  .picks .pick { grid-column: 3; text-align: right; }
}

/* ------------------------------------------------------------------ the table: what you want, and how each side does it.
   A <tbody> per group, each opened by a rowgroup header. Fixed columns, so a long cell wraps instead of widening the
   table; on a wide page it reaches into the margin right of the text. Its head row stays under the site's header
   while you read down it. Dragonlock's column (th.us, its cells by data-label) is lightly lit to find it at a glance;
   both sides are set in the same type. */
.vs-table { --us: color-mix(in srgb, var(--lamp) 11%, var(--card-2)); --us-edge: color-mix(in srgb, var(--lamp) 55%, transparent);
  container: ledger / inline-size; overflow: visible; margin-right: calc(-1 * var(--bleed)); }
.vs-table table { min-width: 0; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.vs-table caption { border-radius: var(--r) var(--r) 0 0; }
.vs-table { --c-want: 26%; }
.vs-table col.c-want { width: var(--c-want); }
.vs-table th, .vs-table td { overflow-wrap: break-word; }
.vs-table td { color: var(--fg-2); }
.vs-table thead th { color: var(--fg-2); background: var(--paper); }
.vs-table thead th.us { color: var(--fg); background: var(--us); box-shadow: inset 0 2px 0 var(--lamp); }
.vs-table thead th.us::before { content: ""; display: inline-block; width: .45rem; height: .45rem; margin: 0 .45rem .12em 0; border-radius: 50%; background: var(--lamp); vertical-align: middle; }
.vs-table td[data-label$="Dragonlock"], .vs-table tr.us > * { background: var(--us); }
.vs-table tbody tr:hover > td[data-label$="Dragonlock"] { background: color-mix(in srgb, var(--lamp) 16%, var(--card-2)); }
.vs-table .group th { padding: 1.35rem 1.15rem .5rem; font: 600 1rem/1.3 var(--display); font-variant-caps: all-small-caps; letter-spacing: .09em; color: var(--link);
  background: var(--card-2); border-bottom: 1px solid var(--hair-2); }
.vs-table tbody:first-of-type .group th { padding-top: 1rem; }
/* a group's header spans the table: carry Dragonlock's lit column through it (the last column; fixed layout gives
   the first 26% and the other two 37% each), so the column reads as one */
.vs-table:has(thead th.us:last-child) .group th { background: linear-gradient(90deg, var(--card-2) calc(50% + var(--c-want) / 2), var(--us) 0); }
.vs-table strong.yes { color: var(--moss); }
.vs-table strong.yes::before { content: ""; display: inline-block; width: 1.05em; height: 1.05em; margin: 0 .3em .16em 0; vertical-align: middle; border-radius: 50%;
  background: var(--moss) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.4l2.3 2.3 4.7-5.2' fill='none' stroke='%23fff' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
@container ledger (min-width: 30rem) {
  .vs-table thead th { position: sticky; top: var(--head-h); z-index: 2; box-shadow: inset 0 -1px 0 var(--hair-2); }
  .vs-table thead th.us { box-shadow: inset 0 2px 0 var(--lamp), inset 0 -1px 0 var(--hair-2); }
  .vs-table tbody th[scope="row"] { padding-right: 1rem; }
}
/* a narrow column: each row becomes a card, the thing you want first, then each side under its own label */
@container ledger (max-width: 29.99rem) {
  .vs-table table, .vs-table caption, .vs-table tbody, .vs-table tr, .vs-table th, .vs-table td { display: block; }
  .vs-table colgroup { display: none; }
  .vs-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .vs-table tr { padding: 1rem 1.1rem 1.1rem; border-bottom: 1px solid var(--hair); }
  .vs-table tbody:last-child tr:last-child { border-bottom: 0; }
  .vs-table tr.group { padding: 0; border: 0; }
  .vs-table th, .vs-table td { padding: 0; border: 0; }
  .vs-table .group th, .vs-table tbody:first-of-type .group th, .vs-table:has(thead th.us:last-child) .group th { padding: .7rem 1.1rem .55rem; background: var(--paper-2); border: 0; }
  .vs-table tbody th[scope="row"] { font-size: 1.1rem; }
  .vs-table td { margin-top: .6rem; padding: .55rem .8rem .6rem; border-radius: var(--r-s); background: var(--paper); font-size: 1rem; }
  .vs-table td::before { content: attr(data-label); display: block; margin-bottom: .1rem; font: 600 .95rem/1.3 var(--display); font-variant-caps: all-small-caps; letter-spacing: .07em; color: var(--fg-3); }
  .vs-table td[data-label$="Dragonlock"], .vs-table tr.us td { background: var(--us); box-shadow: inset 2px 0 0 var(--lamp); }
  .vs-table td[data-label$="Dragonlock"]::before { color: var(--fg); }
  .vs-table tbody tr:hover > * { background: none; }
  .vs-table tbody tr:hover > td { background: var(--paper); }
  .vs-table tbody tr:hover > td[data-label$="Dragonlock"], .vs-table tr.us:hover td { background: var(--us); }
  .vs-table tr.us { background: color-mix(in srgb, var(--lamp) 6%, var(--card-2)); }
  .vs-table tr.us > th { background: none; }
}

/* a roundup's table: the app's name is its first column */
.apps-table col.c-app { width: 19%; }

/* under the table: the note on whose facts these are, and the date they were checked */
.ledger-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; padding: .85rem 1.15rem 1rem;
  border-top: 1px solid var(--hair-2); border-radius: 0 0 var(--r) var(--r); background: color-mix(in srgb, var(--paper-2) 45%, var(--card-2)); }
.ledger-foot .note { flex: 1 1 17rem; margin: 0; font: 400 .95rem/1.5 var(--body); color: var(--fg-2); }

/* the stamp: when the facts on a page were last checked, a moss check in a pill */
.stamp { display: inline-flex; flex: none; align-items: center; gap: .4rem; margin: 0; padding: .28rem .75rem .28rem .32rem; border-radius: 999px;
  font: 600 .9rem/1.2 var(--body); color: #22603C; background: color-mix(in srgb, var(--moss) 11%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--moss) 26%, transparent); }
.stamp svg { flex: none; width: 1.3rem; height: 1.3rem; }
/* the sprite's rune (#i-rune) is drawn inside <use>, where only inherited values reach it: colour it by custom properties */
.stamp svg { --rune-slab: var(--moss); --rune-tick: #fff; }
.stamp time { white-space: nowrap; }

/* ------------------------------------------------------------------ a year's cost per app: a bar each, on one scale
   (an SVG rect per app, its width in US dollars on a 100-wide track). Every bar is the same; the numbers are text */
.prose > .year-costs { margin: 2rem 0 2.2rem; padding: 1.3rem clamp(1.1rem, 3vw, 1.5rem) 1.2rem; border-radius: var(--r); background: var(--card-2); box-shadow: inset 0 0 0 1px var(--hair); }
.year-costs figcaption { margin: 0 0 .9rem; font: 700 1.05rem/1.35 var(--display); color: var(--fg); text-wrap: balance; }
.prose .year-costs ol { margin: 0; padding: 0; list-style: none; }
.prose .year-costs li { display: grid; grid-template-columns: minmax(6.2rem, 9rem) 1fr 4.4rem; align-items: center; gap: .9rem; margin: 0; padding: .38rem 0; }
.year-costs .name { font: 600 1rem/1.2 var(--body); color: var(--fg); }
.year-costs .bar { display: block; width: 100%; height: .6rem; border-radius: 99px; overflow: hidden; }
.year-costs .track { fill: var(--paper-2); }
.year-costs .fill { fill: var(--ember); }
.year-costs .v { font: 700 1rem/1.2 var(--body); font-variant-numeric: lining-nums tabular-nums; text-align: right; color: var(--fg); }
.year-costs .note { margin: 1rem 0 0; padding-top: .85rem; border-top: 1px solid var(--hair); font: 400 .94rem/1.5 var(--body); color: var(--fg-3); }
@media (max-width: 25em) { .prose .year-costs li { grid-template-columns: 5.8rem 1fr 3.8rem; gap: .55rem; } }

/* ------------------------------------------------------------------ captures from the app, as screens in a rounded bezel */
.prose > .captures { margin: 2.4rem 0 2.6rem; padding: clamp(1.75rem, 4vw, 2.5rem) 1rem clamp(1.25rem, 3vw, 1.75rem); border-radius: var(--r-l);
  background: radial-gradient(80% 70% at 50% 35%, color-mix(in srgb, var(--lamp) 14%, var(--paper-2)), var(--paper-2)); }
.captures .pair { display: flex; justify-content: center; align-items: flex-start; gap: clamp(1rem, 5vw, 2.25rem); }
.captures .phone { container-type: inline-size; width: min(42%, 11rem); }
.captures .phone + .phone { margin-top: 2rem; }
.captures .bezel { padding: 3.2cqw; border-radius: 15cqw; background: #0B0E1A;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 1px 2px rgba(11,14,26,.2), 0 26px 40px -22px rgba(11,14,26,.6); }
.captures .bezel img { display: block; width: 100%; height: auto; border-radius: 12cqw; }
.captures figcaption { max-width: 32rem; margin: 1.4rem auto 0; text-align: center; font: 400 .95rem/1.5 var(--body); color: var(--fg-2); text-wrap: balance; }
.captures figcaption .label { display: inline; margin: 0 .35rem 0 0; font-size: 1rem; }

/* the trademark line, last */
.tm { margin: 2.25rem 0 0; font: 400 .88rem/1.5 var(--body); color: var(--fg-3); }
.author + .tm { padding-top: 1.25rem; border-top: 1px solid var(--hair); }

/* ------------------------------------------------------------------ the hub (/compare/) */
.hub { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 2rem; }
.hub > h2.label { margin: 0 0 1.25rem; font: 700 clamp(1.5rem, 1.25rem + .9vw, 1.9rem)/1.15 var(--display); font-variant-caps: normal; letter-spacing: -.018em; color: var(--fg); }
.hub > .more { margin: 1.4rem 0 0; font: 400 1.02rem/1.55 var(--body); color: var(--fg-3); }

/* a comparison on the hub: the two sides by name, the page's question, one line, the date it was checked. The whole
   card is the link */
.vs-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.vs-card { position: relative; display: flex; flex-direction: column; padding: 1.4rem 1.5rem 1.3rem; border-radius: var(--r-l); background: var(--card-2);
  box-shadow: inset 0 0 0 1px var(--hair), 0 1px 2px rgba(27,24,34,.04); transition: transform .25s var(--settle), box-shadow .25s; }
.vs-card:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--hair-2), 0 22px 40px -26px rgba(27,24,34,.45); }
.vs-card h3 { margin: .75rem 0 0; font-size: clamp(1.25rem, 1.1rem + .45vw, 1.42rem); line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; }
.vs-card h3 a { color: var(--fg); text-decoration: none; }
.vs-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.vs-card:hover h3 a { color: var(--link); }
.vs-card > p:not(.matchup):not(.meta) { margin: .55rem 0 0; font: 400 1rem/1.55 var(--body); color: var(--fg-2); }
.vs-card .meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; margin: 0; margin-top: auto; padding-top: 1.15rem; font: 400 .92rem/1.3 var(--body); color: var(--fg-3); }
.vs-card:has(a:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.vs-card a:focus-visible { outline: none; }
.vs-card .stamp { flex: 0 1 auto; min-width: 0; }

/* the matchup: both names alike, a small "vs" between them */
.matchup, .matchup .pair { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; }
.matchup .pair { flex-wrap: nowrap; } /* "vs" travels with the second name */
.matchup { margin: 0; font: 600 1.02rem/1.25 var(--display); font-variant-caps: all-small-caps; letter-spacing: .08em; color: var(--link); }
.matchup .vs { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; padding-bottom: .12em;
  font: 700 .8rem/1 var(--display); font-variant-caps: normal; letter-spacing: 0; color: var(--lamp-hi); background: var(--night); }

/* how we compare, and the note before any app: side by side under the cards */
.hub > .method, .hub > .try { margin: 3rem 0 0; padding: 1.5rem clamp(1.25rem, 3vw, 1.75rem) 1.4rem; border-radius: var(--r-l); }
.hub > .method { background: var(--card-2); box-shadow: inset 0 0 0 1px var(--hair); }
.hub > .try { background: var(--paper-2); }
.hub h2.label { margin: 0 0 .75rem; color: var(--fg); }
.method ul { margin: 0; padding-left: 1.3em; list-style: none; }
.method li { position: relative; margin: .5rem 0 0; padding-left: .1em; font: 400 1.04rem/1.55 var(--body); color: var(--fg-2); }
.method li::before { content: ""; position: absolute; left: -1.15em; top: .7em; width: .36em; height: .36em; border-radius: 50%; background: var(--accent); }
.hub > .try p { margin: 0; font: 400 1.06rem/1.6 var(--body); color: var(--fg-2); }
.hub > .try a { color: var(--link); }
@media (min-width: 56.25em) {
  .hub { grid-template-columns: 1fr 1fr; }
  .hub > h2.label, .hub > .vs-cards, .hub > .more { grid-column: 1 / -1; }
}
.index-body > .tm { margin-top: 2.5rem; }

/* ------------------------------------------------------------------ high contrast, print */
@media (forced-colors: active) {
  .stamp, .disclosure, .verdict .side, .vs-card, .year-costs, .ledger-foot { outline: 1px solid CanvasText; }
  .year-costs .track { fill: Canvas; } .year-costs .bar { outline: 1px solid CanvasText; } .year-costs .fill { fill: CanvasText; }
  .picks > li::after { border-color: CanvasText; }
  .vs-table thead th.us::before, .vs-table strong.yes::before { forced-color-adjust: none; }
  .matchup .vs { border: 1px solid CanvasText; }
}
@media print {
  .vs-table { margin-right: 0; }
  .vs-table thead th { position: static; }
  .verdict, .vs-table tr, .year-costs { break-inside: avoid; }
  .year-costs .bar { print-color-adjust: exact; }
  .captures { display: none; }
}
