/* Briarlock pricing page.
   Uses the shared theme tokens (--bg, --surface, --line, --accent, --ok, --text,
   --heading, --muted) defined in ext/styles.css + web.css, so the page matches
   the rest of the site in both light and dark themes automatically. */
body.is-pricing { color: var(--text); }

body.is-pricing .site-nav .wordmark {
  gap: 10px;
  text-decoration: none;
}
body.is-pricing .site-nav .wordmark .shield-mark {
  width: 36px;
  height: 40px;
}
body.is-pricing .site-nav .wordmark span {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
body.is-pricing .site-nav .wordmark-product .wordmark-name,
body.is-pricing .site-nav .wordmark-product .wordmark-product-label {
  line-height: 1;
}
.wordmark-product-rule {
  display: block;
  width: 1px;
  height: 1em;
  align-self: center;
  flex: none;
  border-radius: 1px;
  background: color-mix(in srgb, var(--heading) 38%, transparent);
}
body.is-pricing .site-nav .wordmark-product .wordmark-product-label {
  font-weight: 300;
  color: var(--heading);
}

body.is-pricing .site-nav .home-switch { margin-left: auto; flex: none; }
body.is-pricing .site-nav .home-switch a[aria-current="page"] { color: var(--text); }

body.is-pricing.is-plans {
  --site-col: min(1000px, calc(100% - 40px));
}
.pricing-main {
  width: var(--site-col, min(760px, calc(100% - 40px)));
  max-width: 100%;
  margin: 0 auto;
  padding: 12px 0 64px;
}
.pricing-hero { text-align: center; padding: 8px 0 32px; }
.pricing-eyebrow { color: var(--accent); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; margin: 0 0 10px; }
.pricing-hero h1 { font-size: clamp(32px, 6vw, 48px); font-weight: 500; margin: 0 0 14px; letter-spacing: -.03em; color: var(--heading); }
.pricing-sub { max-width: 680px; margin: 0 auto; font-size: 18px; line-height: 1.6; color: var(--muted); }

.pricing-grid {
  width: 100%;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px;
  margin: -20px auto 0;
  padding: 36px 14px 18px;
}
.pricing-card {
  position: relative; background: var(--surface); border: 2px solid var(--line); border-radius: 18px;
  padding: 28px 24px; box-shadow: 0 8px 28px rgba(0, 0, 0, .08);
  z-index: 0;
  transform: scale(1) translateY(0);
  transform-origin: center center;
  transition:
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.32s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.pricing-card:focus { outline: none; }
.pricing-card:focus-visible {
  outline: 2px solid var(--ok);
  outline-offset: 3px;
}
.pricing-card:focus,
.pricing-card:focus-within,
.pricing-card:active {
  z-index: 2;
  border-color: color-mix(in srgb, var(--ok) 42%, var(--line));
  box-shadow:
    0 22px 48px -26px rgba(0, 0, 0, 0.55),
    0 0 0 1px color-mix(in srgb, var(--ok) 16%, transparent);
  transform: scale(1.045) translateY(-6px);
}
.pricing-card:active { z-index: 3; transform: scale(1.02) translateY(-3px); }
.pricing-card.is-premium:focus,
.pricing-card.is-premium:focus-within,
.pricing-card.is-premium:active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 22px 48px -18px color-mix(in srgb, var(--accent) 36%, transparent);
}
@media (hover: hover) {
  .pricing-card:hover {
    z-index: 2;
    border-color: color-mix(in srgb, var(--ok) 42%, var(--line));
    box-shadow:
      0 22px 48px -26px rgba(0, 0, 0, 0.55),
      0 0 0 1px color-mix(in srgb, var(--ok) 16%, transparent);
    transform: scale(1.045) translateY(-6px);
  }
  .pricing-card:hover:active { z-index: 3; transform: scale(1.02) translateY(-3px); }
  .pricing-card.is-premium:hover,
  .pricing-card.is-premium:hover:active {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), 0 22px 48px -18px color-mix(in srgb, var(--accent) 36%, transparent);
  }
  .pricing-card.is-premium:hover:active { transform: scale(1.02) translateY(-3px); }
}
@media (prefers-reduced-motion: reduce) {
  .pricing-card,
  .pricing-card:focus,
  .pricing-card:focus-within,
  .pricing-card:active,
  .pricing-card:hover {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    transform: none;
  }
}
.pricing-card.is-premium { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 18px 48px color-mix(in srgb, var(--accent) 22%, transparent); }
.pricing-card.is-business { border-color: color-mix(in srgb, var(--heading) 22%, var(--line)); }
.pricing-flag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background-color: var(--accent); background-image: var(--accent-grad); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  padding: 6px 14px; border-radius: 999px; text-transform: uppercase; white-space: nowrap;
}
.pricing-card h2 { margin: 0 0 6px; font-size: 22px; color: var(--heading); }
.pricing-tagline { margin: 0 0 16px; color: var(--muted); font-size: 14.5px; }
.pricing-price { display: flex; align-items: center; gap: 8px; margin: 0; }
.pricing-amount { font-size: 40px; font-weight: 500; letter-spacing: -.03em; line-height: 1; color: var(--heading); }
.pricing-per { color: var(--muted); font-weight: 600; font-size: 14px; line-height: 1.15; white-space: nowrap; }
.pricing-yearly { margin: 0; min-height: 1.15em; font-size: 13px; line-height: 1.15; color: var(--ok); font-weight: 700; white-space: nowrap; }
.pricing-choose {
  display: block; text-align: center; text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 12px; border-radius: 999px; border: 1px solid var(--line); color: inherit; margin-bottom: 20px;
}
.pricing-choose:hover { border-color: var(--accent); }
.pricing-choose.is-primary {
  background-color: var(--accent);
  background-image: var(--accent-grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
.pricing-choose.is-primary:hover { filter: brightness(1.05); }
.pricing-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.pricing-features li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.pricing-features svg { color: var(--ok); flex: none; margin-top: 1px; width: 16px; height: 16px; }

@media (min-width: 760px) {
  @supports (grid-template-rows: subgrid) {
    .pricing-grid { grid-template-rows: auto auto auto auto 1fr; }
    .pricing-card {
      display: grid;
      grid-template-rows: subgrid;
      grid-row: span 5;
    }
    .pricing-card > .plan-price-stack { align-self: start; }
    .pricing-card > .pricing-choose,
    .pricing-card > .pricing-features { align-self: start; width: 100%; }
  }
}

.pricing-main .home-compare { margin: 36px 0 0; }
.pricing-main .home-compare h3 { margin: 0 0 8px; text-align: center; font-size: 22px; font-weight: 500; letter-spacing: -.015em; color: var(--heading); }
.pricing-main .home-compare-sub { margin: 0 auto 18px; text-align: center; max-width: 640px; font-size: 15px; color: var(--muted); line-height: 1.5; }
.pricing-main .home-compare-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.pricing-main .home-compare-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.pricing-main .home-compare-table th,
.pricing-main .home-compare-table td { padding: 12px 16px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--line); }
.pricing-main .home-compare-table thead th {
  font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700;
}
.pricing-main .home-compare-table thead th:nth-child(n+2),
.pricing-main .home-compare-table td { text-align: center; width: 18%; }
.pricing-main .home-compare-table tbody th { font-weight: 600; }
.pricing-main .home-compare-table tbody tr:last-child th,
.pricing-main .home-compare-table tbody tr:last-child td { border-bottom: 0; }
.pricing-main .home-compare-yes { display: inline-flex; color: var(--ok); }
.pricing-main .home-compare-yes svg { display: block; }
.pricing-main .home-compare-no { color: var(--muted); opacity: .55; font-weight: 600; }
@media (max-width: 560px) {
  .pricing-main .home-compare-wrap { overflow-x: hidden; }
  .pricing-main .home-compare-table,
  .pricing-main .home-compare-table th,
  .pricing-main .home-compare-table td { box-sizing: border-box; }
  .pricing-main .home-compare-table th,
  .pricing-main .home-compare-table td { padding: 10px 6px; font-size: 12px; }
  .pricing-main .home-compare-table thead th {
    font-size: 10px;
    letter-spacing: 0.02em;
    padding: 8px 3px;
  }
  .pricing-main .home-compare-table thead th:first-child,
  .pricing-main .home-compare-table tbody th { width: 40%; overflow-wrap: break-word; }
  .pricing-main .home-compare-table thead th:nth-child(n+2),
  .pricing-main .home-compare-table td {
    width: 20%;
    padding-left: 2px;
    padding-right: 2px;
    font-size: 10px;
    letter-spacing: -0.02em;
    line-height: 1.2;
  }
  .pricing-main .home-compare-table .compare-detail { max-width: 100%; }
}
.pricing-faq { margin: 48px auto 0; }
.pricing-business {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(680px, 100%);
  margin: 22px auto 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.pricing-business h2 { margin: 0 0 4px; font-size: 20px; font-weight: 600; color: var(--heading); }
.pricing-business p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.pricing-business p a { color: var(--accent); font-weight: 650; text-underline-offset: 2px; }
.pricing-business .pricing-choose { margin: 0; white-space: nowrap; }
.pricing-features a { color: var(--accent); font-weight: 700; }
.pricing-faq h2 { text-align: center; font-size: 26px; font-weight: 500; margin: 0 0 22px; color: var(--heading); }
.pricing-faq h3 { margin: 0 0 6px; font-size: 17px; color: var(--heading); }
.pricing-faq p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 15px; }
.pricing-faq-list {
  width: 100%;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}
.pricing-faq-list .pricing-faq-item { border-bottom: 1px solid var(--line); }
@media (min-width: 880px) {
  .pricing-faq-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 48px;
    align-items: start;
    border-top: 0;
  }
  .pricing-faq-list .pricing-faq-item:nth-child(-n + 2) { border-top: 1px solid var(--line); }
}
.pricing-faq-item { outline: none; }
.pricing-faq-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}
.pricing-faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 2px;
  color: var(--heading);
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.35;
}
.pricing-faq-item:hover .pricing-faq-q { color: var(--accent); }
.pricing-faq-list .faq-mark {
  position: relative;
  flex: none;
  width: 18px;
  height: 18px;
  color: currentColor;
}
.pricing-faq-list .faq-mark::before,
.pricing-faq-list .faq-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: currentColor;
  border-radius: 1px;
  transform: translate(-50%, -50%);
}
.pricing-faq-list .faq-mark::before { width: 14px; height: 1.5px; }
.pricing-faq-list .faq-mark::after {
  width: 1.5px;
  height: 14px;
  transition: transform 160ms ease, opacity 160ms ease;
}
.pricing-faq-item:hover .faq-mark::after,
.pricing-faq-item:focus-within .faq-mark::after {
  transform: translate(-50%, -50%) scaleY(0);
  opacity: 0;
}
.pricing-faq-clip {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 160ms ease;
}
.pricing-faq-list .pricing-faq-a {
  overflow: hidden;
  visibility: hidden;
  min-height: 0;
  padding: 0 28px 0 2px;
}
.pricing-faq-item:hover .pricing-faq-clip,
.pricing-faq-item:focus-within .pricing-faq-clip { grid-template-rows: 1fr; }
.pricing-faq-item:hover .pricing-faq-a,
.pricing-faq-item:focus-within .pricing-faq-a {
  visibility: visible;
  padding-bottom: 16px;
}
.pricing-faq-list .pricing-faq-a p { max-width: 68ch; }
.pricing-faq-list .pricing-faq-a p + p { margin-top: 10px; }
@media (prefers-reduced-motion: reduce) {
  .pricing-faq-list .faq-mark::after,
  .pricing-faq-clip { transition: none; }
}
.pricing-faq code, .pricing-business code, .dev-steps code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }
.dev-steps { list-style: none; margin: 0 auto; padding: 0; width: min(680px, 100%); display: grid; gap: 10px; }
.dev-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.dev-steps h3 { margin: 0 0 4px; font-size: 16px; font-weight: 600; color: var(--heading); }
.dev-steps p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.dev-step-num { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 999px; background: var(--bg); color: var(--heading); font-size: 13px; font-weight: 700; }

.dev-guide .pricing-hero { text-align: left; padding-bottom: 8px; }
.dev-guide .pricing-hero h1 { max-width: none; }
.dev-guide .pricing-sub { margin: 0; max-width: 62ch; }
.dev-guide .pricing-faq { margin-top: 36px; }
.dev-guide .pricing-faq h2 { text-align: left; font-size: 22px; margin-bottom: 12px; }
.dev-guide .dev-steps { width: 100%; }

.dev-toc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin: 18px 0 0;
}
.dev-toc a {
  text-decoration: none;
  color: inherit;
  font-size: 15px;
  font-weight: 600;
  opacity: 0.82;
}
.dev-toc a:hover { opacity: 1; color: var(--accent); }

.dev-facts {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.dev-facts li {
  margin: 0;
  padding: 14px 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.dev-facts strong { display: block; margin: 0 0 4px; font-size: 14px; font-weight: 650; color: var(--heading); }
.dev-facts span { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.45; }

.dev-table-wrap {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}
.dev-table { width: 100%; border-collapse: collapse; }
.dev-table th, .dev-table td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.45;
}
.dev-table th {
  border-top: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.dev-table td { color: var(--text); }
.dev-table td:first-child { font-weight: 650; color: var(--heading); white-space: nowrap; }
.dev-alert { display: inline-flex; align-items: center; gap: 8px; }
.dev-alert i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--muted);
  flex: none;
}
.dev-alert.is-bad i { background: var(--danger); }
.dev-alert.is-warn i { background: var(--accent); }

.dev-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.dev-split article {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.dev-split h3 { margin: 0 0 8px; font-size: 14px; font-weight: 650; color: var(--heading); }
.dev-split ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.dev-split li + li { margin-top: 4px; }

.dev-command {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  overflow-x: auto;
}
.dev-command code { font-size: 13px; color: var(--heading); }

.dev-callout {
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}
.dev-callout p { margin: 0; color: var(--text); font-size: 14.5px; line-height: 1.5; }

@media (max-width: 720px) {
  .dev-facts, .dev-split { grid-template-columns: 1fr; }
  .dev-table thead { display: none; }
  .dev-table, .dev-table tbody, .dev-table tr, .dev-table td { display: block; width: auto; }
  .dev-table tr { padding: 12px 14px; border-top: 1px solid var(--line); }
  .dev-table td { border: 0; padding: 0; white-space: normal; }
  .dev-table td + td { margin-top: 6px; }
  .dev-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.02em;
    color: var(--muted);
  }
}

/* Footer uses the shared .legal-footer.settings-legal partial (see web.css) so
   it matches every other page; we only add the page's top spacing here. */
.pricing-main .legal-footer { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); }

@media (max-width: 640px) {
  body.is-pricing .site-nav-inner {
    flex-wrap: nowrap;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  body.is-pricing .site-nav .wordmark {
    gap: 8px;
    flex: 0 1 auto;
    min-width: 0;
  }
  body.is-pricing .site-nav .wordmark .shield-mark { width: 28px; height: 32px; }
  body.is-pricing .site-nav .wordmark span {
    font-size: 19px;
    white-space: nowrap;
  }
  body.is-pricing:has(.dev-guide) .site-nav-inner {
    flex-wrap: wrap;
    row-gap: 8px;
  }
  body.is-pricing .site-nav .home-switch {
    min-width: 0;
    flex: 1 1 auto;
    justify-content: flex-end;
  }
}

@media (max-width: 560px) {
  .pricing-main { padding: 8px 0 48px; }
  .pricing-hero { padding: 4px 0 24px; }
  .pricing-sub { font-size: 16px; }
  .pricing-card { padding: 24px 20px; }
  .pricing-amount { font-size: 36px; }
  .pricing-faq { margin-top: 48px; }
}
