/* Online vs Offline edition offer, Offline Edition page, and auth intent.
 * Markup: partials/edition_choice.tera, partials/edition_compare_table.tera,
 * paywall.tera, offline.tera, pricing.tera, login.tera.
 * Reuses the marketing tokens from 10-product.css / 12-marketing-system.css. */

:root {
  --ed-surface: #111722;
  --ed-surface-2: #182233;
  --ed-line: rgba(119, 230, 255, .18);
  --ed-online: #77e6ff;
  --ed-offline: var(--sf-lime, #d4e55f);
  --ed-warm: var(--sf-orange, #f07e34);
  --ed-copy: var(--marketing-copy, #deddd8);
  --ed-muted: var(--marketing-copy-muted, #aaa9a6);
  --ed-success: #9fe08a;
  --ed-error: #ffb3a1;
}

/* ---------- Hero (paywall + offline) ---------- */
.ed-hero {
  padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1rem, 5vw, 5rem) clamp(2rem, 4vw, 3rem);
  background: radial-gradient(circle at 80% 10%, rgba(212,229,95,.08), transparent 40%), linear-gradient(130deg, #0a0d14 0%, #111826 100%);
}
.ed-hero h1 { max-width: 16ch; }
.ed-hero-lede {
  max-width: 60ch;
  margin: 0;
  color: var(--ed-muted);
  font: 1.12rem/1.7 Inter, system-ui, sans-serif;
}
.ed-trust {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.5rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--ed-copy);
  font: .8rem/1.4 Inter, system-ui, sans-serif;
}
.ed-trust li::before { content: "✓"; margin-right: .5rem; color: var(--ed-offline); font-weight: 700; }

/* ---------- Sections ---------- */
.ed-section { padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 5vw, 5rem); }
.ed-section--choice { padding-top: clamp(1.5rem, 3vw, 2.5rem); background: #0b1018; }
.ed-section-title,
.paywall-page .ed-section-title {
  margin: 0 0 clamp(1.5rem, 3vw, 2.25rem);
  color: #fff;
  font: 400 clamp(1.8rem, 3.6vw, 3.2rem)/1.08 SFPixel, monospace;
}
.ed-section-title em { color: var(--ed-offline); font-style: normal; }

/* ---------- Edition cards ---------- */
.ed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  max-width: 1040px;
}
.sf-main .ed-grid,
.product-pricing-page .ed-grid { margin-inline: auto; }
.ed-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(1.35rem, 3vw, 2.25rem);
  border: 1px solid var(--ed-line);
  background: linear-gradient(180deg, var(--ed-surface-2) 0%, var(--ed-surface) 100%);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, .35);
  color: var(--ed-copy);
  text-align: left;
}
.ed-card--online { border-top: 3px solid var(--ed-online); }
.ed-card--offline { border-top: 3px solid var(--ed-offline); }
.ed-card.is-selected { border-color: var(--ed-warm); border-top-color: var(--ed-warm); box-shadow: 6px 6px 0 rgba(240, 126, 52, .25); }
.ed-badge {
  position: absolute;
  top: -.8rem;
  right: 1.25rem;
  padding: .3rem .6rem;
  background: var(--ed-offline);
  color: #12140a;
  font: .7rem/1 SFPixel, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ed-label {
  margin: 0 0 .75rem;
  color: var(--ed-online);
  font: .72rem/1.3 SFPixel, monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.ed-card--offline .ed-label { color: var(--ed-offline); }
.ed-title,
.paywall-page .ed-title,
.sf-section .ed-title {
  margin: 0 0 1.1rem;
  color: #fff;
  font: 400 clamp(1.4rem, 2.4vw, 2rem)/1.1 SFPixel, monospace;
}
.ed-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem; margin: 0; color: #fff; }
.ed-amount { font: 700 clamp(2.6rem, 5vw, 3.6rem)/1 SFPixel, monospace; }
.ed-period { color: var(--ed-muted); font: .95rem Inter, system-ui, sans-serif; }
.ed-price-note { margin: .5rem 0 0; color: var(--ed-muted); font: .82rem/1.5 Inter, system-ui, sans-serif; }
.ed-list {
  display: grid;
  gap: .6rem;
  margin: 1.4rem 0 1.6rem;
  padding: 1.2rem 0 0;
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.ed-list li { position: relative; padding-left: 1.5rem; color: var(--ed-copy); font: .93rem/1.5 Inter, system-ui, sans-serif; }
.ed-list li::before { content: "✓"; position: absolute; left: 0; color: var(--ed-online); font-weight: 700; }
.ed-card--offline .ed-list li::before { color: var(--ed-offline); }
.ed-action { margin-top: auto; }
.ed-cta { width: 100%; min-height: 54px; font-size: 15px; }
.ed-cta[disabled] { cursor: not-allowed; opacity: .7; transform: none; }
.ed-cta[aria-busy="true"] { cursor: progress; opacity: .85; }
.ed-cta-note { margin: .7rem 0 0; color: var(--ed-muted); font: .8rem/1.5 Inter, system-ui, sans-serif; text-align: center; }
.ed-cta-note a { color: var(--ed-offline); }
.ed-status { min-height: 1.4em; max-width: 1040px; margin: 1rem 0 0; color: var(--ed-copy); font: .9rem/1.5 Inter, system-ui, sans-serif; }
.ed-status:empty { min-height: 0; margin: 0; }
.ed-status[data-kind="error"] { color: var(--ed-error); }
.ed-status[data-kind="success"] { color: var(--ed-success); }
.sf-main .ed-status { margin-inline: auto; text-align: center; }

/* Keyboard focus that reads against dark surfaces. */
.ed-card a:focus-visible,
.ed-card button:focus-visible,
.off-page a:focus-visible,
.off-page button:focus-visible,
.off-page input:focus-visible,
.ed-table-wrap:focus-visible { outline: 3px solid var(--ed-warm); outline-offset: 3px; }

/* ---------- "Which one?" guide ---------- */
.ed-guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; max-width: 1040px; }
.ed-guide-grid > div { padding: 1.4rem 1.5rem; border: 1px solid var(--ed-line); background: #0f1520; }
.ed-guide-grid h3 { margin: 0 0 .8rem; color: #fff; font: 400 1.15rem/1.2 SFPixel, monospace; }
.ed-guide-grid ul { margin: 0; padding-left: 1.1rem; color: var(--ed-muted); font: .93rem/1.7 Inter, system-ui, sans-serif; }

/* ---------- Comparison table ---------- */
.ed-table-wrap { max-width: 1040px; margin: 2rem auto 0; overflow-x: auto; border: 1px solid var(--ed-line); }
.ed-table { width: 100%; min-width: 520px; border-collapse: collapse; background: #0f1520; color: var(--ed-copy); font: .92rem/1.45 Inter, system-ui, sans-serif; }
.ed-table caption { padding: .9rem 1rem; color: var(--ed-muted); font: .72rem SFPixel, monospace; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
.ed-table th,
.ed-table td { padding: .85rem 1rem; border-top: 1px solid rgba(255, 255, 255, .08); text-align: left; vertical-align: top; }
.ed-table thead th { color: #fff; font: .85rem SFPixel, monospace; }
.ed-table thead th:nth-child(2) { color: var(--ed-online); }
.ed-table thead th:nth-child(3) { color: var(--ed-offline); }
.ed-table tbody th { color: var(--ed-copy); font-weight: 500; }
.ed-yes { color: var(--ed-success); font-weight: 600; }
.ed-yes::before { content: "✓ "; }
.ed-no { color: var(--ed-muted); }
.ed-no::before { content: "— "; }

/* ---------- Offline Edition page ---------- */
.off-banner {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1rem;
  padding: 1rem clamp(1rem, 5vw, 5rem);
  border-bottom: 1px solid var(--ed-line);
  background: #182233;
  color: var(--ed-copy);
  font: .95rem/1.5 Inter, system-ui, sans-serif;
}
.off-banner strong { color: #fff; }
.off-banner--success { background: #1b2a1d; border-color: rgba(159, 224, 138, .4); }
.off-banner [data-kind="error"] { color: var(--ed-error); }
.off-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
  padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1rem, 5vw, 5rem);
  background: radial-gradient(circle at 78% 20%, rgba(212,229,95,.1), transparent 38%), linear-gradient(130deg, #0a0d14 0%, #121926 100%);
  border-bottom: 1px solid var(--ed-line);
}
.off-hero-copy { min-width: 0; }
.off-steps { background: #0d121b; }
.off-step-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.off-step-grid li { min-width: 0; padding: 1.5rem; border: 1px solid var(--ed-line); background: #121a26; }
.off-step-grid span { color: var(--ed-warm); font: .8rem SFPixel, monospace; }
.off-step-grid h3 { margin: 1rem 0 .55rem; color: #fff; font: 400 1.3rem/1.15 SFPixel, monospace; }
.off-step-grid p { margin: 0; color: var(--ed-muted); font: .92rem/1.65 Inter, system-ui, sans-serif; }
.off-activate { background: #090c12; scroll-margin-top: 1rem; }
.off-activate:focus { outline: none; }
.off-activate-intro { max-width: 62ch; }
.off-activate-intro p:not(.sf-kicker) { color: var(--ed-muted); font: 1rem/1.65 Inter, system-ui, sans-serif; }
.off-activate-intro p[data-kind="success"] { color: var(--ed-success); }
.off-activate-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.off-activate-panels[hidden] { display: none; }
.off-panel { min-width: 0; padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--ed-line); background: #111722; color: var(--ed-copy); font: .95rem/1.6 Inter, system-ui, sans-serif; }
.off-panel h3 { margin: 0 0 .8rem; color: #fff; font: 400 1.2rem/1.2 SFPixel, monospace; }
.off-panel p { margin: 0 0 1rem; }
.off-panel .auth-field { margin-bottom: 1rem; }
.off-panel .form-label { display: block; margin-bottom: .4rem; color: #fff; font: 600 .85rem Inter, system-ui, sans-serif; }
.off-panel .form-input { width: 100%; min-height: 46px; padding: .7rem .8rem; border: 1px solid #4b5a70; background: #0a0f17; color: #fff; font: .9rem ui-monospace, SFMono-Regular, Menlo, monospace; box-sizing: border-box; }
.off-panel .form-input[aria-invalid="true"] { border-color: var(--ed-error); }
.off-panel .sf-button { width: 100%; margin-top: .5rem; }
.off-replace { display: flex; gap: .6rem; align-items: flex-start; color: var(--ed-copy); font: .9rem/1.45 Inter, system-ui, sans-serif; cursor: pointer; }
.off-replace input { margin-top: .2rem; width: 1.05rem; height: 1.05rem; accent-color: var(--ed-warm); }
.off-note { color: var(--ed-muted) !important; font-size: .82rem !important; }
.off-downloads { display: grid; gap: .6rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.off-download { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 52px; padding: .75rem 1rem; border: 1px solid #4b5a70; background: #0d131d; color: #fff; text-decoration: none; }
.off-download:hover { border-color: var(--ed-offline); }
.off-download strong { font: 400 .95rem SFPixel, monospace; }
.off-download span { color: var(--ed-muted); font-size: .8rem; }
.off-downloads details { margin: .3rem 0 0; color: var(--ed-muted); font-size: .75rem; }
.off-downloads summary { cursor: pointer; }
.off-downloads code { display: block; margin-top: .3rem; overflow-wrap: anywhere; font-size: .72rem; }
.ed-faq { width: auto; margin: 0; padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 5vw, 5rem); background: #0d121b; border: 0; }
.ed-faq details p a { color: var(--ed-offline); }

/* ---------- Auth intent (login/signup context) ---------- */
.auth-intent {
  display: grid;
  gap: .35rem;
  margin: 0 0 1rem;
  padding: .85rem 1rem;
  border: 1px solid rgba(212, 229, 95, .28);
  border-left: 3px solid var(--ed-offline);
  background: rgba(212, 229, 95, .06);
  color: var(--ed-copy);
  font: .88rem/1.5 Inter, system-ui, sans-serif;
}
.auth-intent strong { color: #fff; font-weight: 600; }
.auth-intent span { color: var(--ed-muted); font-size: .8rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1300px) {
  .off-hero { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .off-activate-panels { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .ed-grid,
  .ed-guide-grid,
  .off-step-grid { grid-template-columns: 1fr; }
  .ed-hero,
  .off-hero,
  .ed-section,
  .ed-faq { padding-inline: var(--marketing-gutter, 1rem); }
  .ed-hero h1,
  .off-hero h1 { font-size: clamp(2.5rem, 12vw, 4rem); }
  .ed-card { box-shadow: 4px 4px 0 rgba(0, 0, 0, .35); }
  .ed-trust { flex-direction: column; gap: .5rem; }
  .off-download { flex-direction: column; align-items: flex-start; gap: .25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ed-card *,
  .off-page * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Landing / nav touches ---------- */
a.sf-announcement { text-decoration: none; transition: color .15s, background .15s; }
a.sf-announcement:hover,
a.sf-announcement:focus-visible { color: #fff; background: #141416; }
a.sf-announcement b { color: #fff; font-weight: 400; }
.ed-compare-link { margin: 1.25rem 0 0; text-align: center; }
.sf-pricing .sf-section-heading > p:not(.sf-kicker) { max-width: 470px; color: #b9b8b4; font-size: 16px; line-height: 1.7; margin: 20px 0 0; }
.sf-nav-block span { font-size: 10px; color: var(--ed-offline); }
@media (max-width: 720px) {
  .sf-topbar-optional { display: none; }
}
.off-hero h1,
.ed-hero h1 { font-size: clamp(2.6rem, 5.2vw, 5.4rem); overflow-wrap: anywhere; }
.off-hero h1 { font-size: clamp(2.25rem, 3.6vw, 4.5rem); overflow-wrap: normal; }
@media (max-width: 600px) {
  .ed-table { min-width: 0; table-layout: fixed; font-size: .8rem; }
  .ed-table th,
  .ed-table td { padding: .65rem .5rem; overflow-wrap: anywhere; }
  .ed-table thead th:first-child,
  .ed-table tbody th { width: 40%; }
  .ed-table caption { padding: .75rem .5rem; }
}
.off-panel #device-name { font-family: Inter, system-ui, sans-serif; }
/* Explicit purchase consent stays readable beside the one-time offer. */
.off-consent { display: flex; align-items: flex-start; gap: .65rem; margin: 1rem 0; font-size: .85rem; line-height: 1.55; }
.off-consent input { flex: 0 0 auto; margin-top: .25rem; }
.off-seller { white-space: pre-line; }
