/* Web app and Mac app: the pair, and the /download/ pages. Rendered by inc/app-download.php.
   Loaded on any page that shows a pair, marketing shell or catalogue, so the marketing rules
   below read the shell's tokens and the catalogue rules carry their own colours. */

.app-pair { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; align-items: center; }
.app-pair .app-ico { flex: none; }
.app-pair-block { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.app-pair-note { margin: 0; font-size: 14px; color: var(--muted, rgba(0,0,0,.6)); text-align: center; }
.hero-more { margin-top: 18px; text-align: center; font-size: 15px; }
.hero-more a { color: var(--text, inherit); text-decoration: underline; text-underline-offset: 3px; }

/* Header, marketing shell: the pair sits in the nav row; inside the mobile menu it is the
   last two entries, full width. `.nav-links a` outranks `.btn-ghost`, so its colour is said here. */
.app-pair-header { display: inline-flex; gap: 8px; flex-wrap: nowrap; }
.nav-links > a, .app-pair-header .btn { white-space: nowrap; }
/* The header holds two buttons now, so the shell's menu folds into ☰ at 1080px (it was
   860px in marketing.css), the row is set a little tighter, and just above the fold the
   two icons give way so the longest language (Spanish) still fits on one line. */
@media (min-width: 1081px) {
  .nav-links { gap: 16px; }
  .app-pair-header .btn-sm { padding: 8px 12px; }
}
@media (min-width: 1081px) and (max-width: 1200px) {
  .app-pair-header .app-ico { display: none; }
}
.nav-links a.btn-ghost, .nav-links a.btn-ghost:hover { color: var(--text); }
@media (max-width: 1080px) {
  .app-pair-header { display: contents; }
  .nav-links .app-pair-header .btn + .btn { margin-top: 10px; }
}

/* Header, catalogue: same pair, the catalogue header's own colours. */
.app-pair-catalog { display: contents; }
.tracy-sitehead .sh-btn + .sh-btn { margin-left: -10px; }
.tracy-sitehead .sh-btn.sh-btn-ghost { background: rgba(255,255,255,.6); color: rgba(0,0,0,.85) !important; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
.tracy-sitehead .sh-btn.sh-btn-ghost:hover { background: #fff; }
@media (max-width: 1000px) {
  .tracy-sitehead .sh-btn + .sh-btn { margin-left: 0; margin-top: 10px; }
}

/* Pricing card: the pair fills the card's width. */
.panel .app-pair-block, .card .app-pair-block { align-items: stretch; }
.panel .app-pair, .card .app-pair { flex-direction: column; align-items: stretch; }
.panel .app-pair .btn, .card .app-pair .btn { justify-content: center; }

/* On the terracotta CTA card: filled = the light panel, outlined = white outline. */
.cta-card .app-pair .btn-primary, .cta-card .app-pair .btn-primary:hover { background: var(--panel-solid); color: var(--primary); }
.cta-card .app-pair .btn-ghost { background: transparent; color: var(--on-primary); border-color: rgba(255,255,255,.65); }
.cta-card .app-pair .btn-ghost:hover { background: rgba(255,255,255,.12); color: var(--on-primary); }
.cta-card .app-pair-note { margin: 0; color: var(--on-primary); }
.cta-card .hero-more { margin: 16px auto 0; }
.cta-card .hero-more a { color: var(--on-primary); }

/* /download/ and /download/thanks/. */
.btn-lg { padding: 15px 26px; font-size: 16px; }
.mac-hero { text-align: center; }
.mac-get { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 30px; }
.mac-get[hidden], .mac-browser[hidden], .mac-note[hidden] { display: none; }
.mac-version { margin: 0; font-size: 14px; color: var(--text); font-weight: 500; }
.mac-req { margin: 0; font-size: 14px; color: var(--muted); }
.mac-note { margin: 14px auto 0; max-width: 520px; color: var(--muted); }
.mac-adds { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.mac-add { padding: 22px; }
.mac-add h3, .mac-step h3 { margin: 0 0 6px; font-size: 17px; }
.mac-add p, .mac-step p { margin: 0; color: var(--muted); }
.mac-browser { text-align: center; }
.mac-browser .muted { margin: 8px 0 18px; }
.mac-steps { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: 14px; max-width: 640px; }
.mac-step { display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; }
.mac-step-n { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-weight: 600; }
.mac-retry { text-align: center; margin-top: 22px; }


/* The two SmartScreen screenshots, side by side, each with its step number. */
.smartscreen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: 760px; margin: 0 auto; }
.smartscreen figure { margin: 0; }
.smartscreen img { display: block; width: 100%; height: auto; border-radius: 8px; box-shadow: var(--shadow); }
.smartscreen figcaption { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; font-weight: 500; color: var(--text); }
@media (max-width: 560px) { .smartscreen { grid-template-columns: 1fr; } }
.mac-steps + .smartscreen { margin-top: 22px; }

/* /download/: one card, a tab per system (after cherryai.com/download). */
.dl-hero { text-align: center; }
.dl-meta { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.dl-card { max-width: 760px; margin: 34px auto 0; text-align: left; }
/* The tabs stand on the page itself; the open one joins the panel under it into one sheet. */
.dl-panel { position: relative; background: var(--panel-solid); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.dl-tabs { position: relative; z-index: 2; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 190px); justify-content: start; gap: 0; padding: 0 18px; margin-bottom: -1px; }
/* Chrome tabs: the open one has rounded top corners, is the colour of the panel below it so the two
   read as one sheet, and curves out at its feet; the others sit on the page, split by a thin line
   that disappears next to the open tab. */
.dl-tab { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px 12px; border: 0; border-radius: 10px 10px 0 0; background: transparent; color: var(--muted); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.dl-tab + .dl-tab::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 12px; width: 1px; background: var(--border-strong); }
.dl-tab[aria-selected="true"]::before, .dl-tab[aria-selected="true"] + .dl-tab::before { display: none; }
.dl-tab svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.dl-tab:hover { color: var(--text); background: color-mix(in srgb, var(--panel-solid) 45%, transparent); }
.dl-tab[aria-selected="true"] { z-index: 1; background: var(--panel-solid); color: var(--text); box-shadow: inset 1px 1px 0 var(--border), inset -1px 0 0 var(--border); }
.dl-tab[aria-selected="true"]::after { content: ""; position: absolute; bottom: 0; left: -10px; right: -10px; height: 10px; pointer-events: none;
  background: radial-gradient(circle at 0 0, transparent 9.5px, var(--panel-solid) 10px) left bottom / 10px 10px no-repeat,
              radial-gradient(circle at 100% 0, transparent 9.5px, var(--panel-solid) 10px) right bottom / 10px 10px no-repeat; }
.dl-tab:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.dl-arch { color: var(--muted); font-weight: 400; }
.dl-arch:empty { display: none; }
.dl-panel[hidden] { display: none; }
.dl-main { display: flex; justify-content: center; padding: 30px 20px 26px; }
.dl-main .btn-lg { min-width: 300px; justify-content: center; gap: 10px; border-radius: 999px; }
.dl-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-top: 1px solid var(--border); color: var(--text); background: var(--panel-2); font-size: 15px; font-weight: 500; }
.dl-row:hover { background: var(--panel); color: var(--text); }
.dl-row .app-ico { color: var(--muted); }
.dl-req, .dl-note { margin: 0; padding: 12px 20px; border-top: 1px solid var(--border); font-size: 13.5px; color: var(--muted); text-align: center; }
.dl-note { padding-top: 0; border-top: 0; }
.dl-links { margin-top: 22px; font-size: 14.5px; }
.dl-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.dl-links a:hover { color: var(--text); }
.dl-adds .mac-add { padding: 4px 0; }
@media (max-width: 560px) {
  .dl-tabs { grid-auto-columns: minmax(0, 1fr); padding: 0 12px; }
  .dl-tab { flex-direction: column; gap: 4px; padding: 8px 4px 10px; font-size: 13px; }
  .dl-arch { display: none; }
  .dl-main .btn-lg { min-width: 0; width: 100%; }
}
