/* XSN Archive Viewer: product page styles on top of /assets/aphex.css (Aphex Coding "Nocne studio" standard: tokens,
   components, motion). Only the product scene (.xsn template + .xml forms -> form preview -> PDF / CSV / attachments /
   report), page sections and guide pages live here. No url references, no web fonts from other hosts, no inline
   styles: delays and positions that the shared CSS reads from style="--x" are set here by classes.
   style.css next to this file is the LEGACY sheet of the legal pages (privacy, eula, about) and must not change. */

/* ---------- Base tweaks ---------- */
code { padding: .08em .35em; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); font-size: .86em; overflow-wrap: anywhere; }
.narrow { max-width: 46rem; }
.note, .small { font-size: var(--fs-small); color: var(--text-3); }
.center { text-align: center; justify-content: center; }
main p a:not(.btn), .doc li a:not(.btn), .faq a { text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: .22em; }
main p a:not(.btn):hover, .faq a:hover { color: var(--accent-text); }
/* "coming soon" placeholders (only while sales are closed) */
.btn-soon { cursor: default; color: var(--text-2); background: var(--surface-2); border: 1px dashed var(--line-3); }
.btn-soon:hover { transform: none; }
/* Microsoft Store badge: the official file 1:1, native 161 x 44 px */
.store-badge { display: inline-flex; flex: none; align-items: center; min-height: 44px; border-radius: 9px; }
.store-badge img { display: block; width: 161px; height: 44px; max-width: none; }
.alt-download { margin-top: .8rem; font-size: var(--fs-small); color: var(--text-3); }

/* motion delays by class (no inline style) */
.d1 { --d: 1; } .d2 { --d: 2; } .d3 { --d: 3; } .d4 { --d: 4; } .d5 { --d: 5; }
.i1 { --i: 1; } .i2 { --i: 2; } .i3 { --i: 3; }
.beam.b1 { --x: 4; --dur: 9s; }
.beam.b2 { --x: 12; --dur: 11s; --delay: 3s; }
.beam.h.b3 { --y: 3; --dur: 12s; --delay: 1.5s; }
.log li:nth-child(1) { --i: 0; }
.log li:nth-child(2) { --i: 1; }
.log li:nth-child(3) { --i: 2; }
.log li:nth-child(4) { --i: 3; }
.log li:nth-child(5) { --i: 4; }

/* ---------- Navigation (header.nav.site-header) ---------- */
.site-header .brand img, .foot-brand .brand img { width: 28px; height: 28px; border-radius: 8px; }
.site-header .brand span { white-space: nowrap; }
@media (max-width: 400px) { .site-header .brand { font-size: .95rem; } .nav .btn { padding-inline: .9rem; } }

/* ---------- Hero ---------- */
.hero .lead { margin-bottom: 2rem; }
.hero .cta { align-items: center; }
.hero .small { margin-top: .9rem; max-width: 34rem; }
/* .facts = .meta-row of the standard (class name kept: build tests slice the hero up to class="facts") */
.facts { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin: 1.8rem 0 0; padding: 0; list-style: none; font-size: var(--fs-small); color: var(--text-3); }
.facts li { display: inline-flex; align-items: center; gap: .5rem; }
.facts li::before { content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

/* ---------- Scene: .xsn template + .xml forms -> form preview -> outputs (illustration) ---------- */
.hero .stage { padding-top: 3.5rem; }
.hero .obj { --size: 104px; top: -6.25rem; right: -1.75rem; transform: translateZ(140px); }
@media (min-width: 981px) { .hero .hero-grid { padding-top: 8rem; } }
@media (min-width: 981px) and (max-width: 1199px) { .hero .obj { right: 1rem; } }
@media (min-width: 521px) and (max-width: 980px) { .hero .stage { padding-top: 6rem; } .hero .obj { top: -3rem; right: 5rem; } }
.xsn-files { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: .8rem 1.1rem .2rem; list-style: none; font-size: .7rem; }
.xsn-files li { padding: .12rem .55rem; border-radius: 6px; border: 1px solid var(--win-line); color: var(--win-text-2); white-space: nowrap; }
.xsn-files li.tpl { color: var(--win-accent); border-color: color-mix(in srgb, var(--win-accent) 40%, transparent); }
.xsn-files li.on { color: var(--win-text); border-color: color-mix(in srgb, var(--win-accent) 55%, transparent); background: color-mix(in srgb, var(--win-accent) 12%, transparent); }
.xsn-view { padding: .8rem 1.1rem .9rem; border-bottom: 1px solid var(--win-line); }
/* the "page": a light sheet like the printed form, stays light in both schemes */
.sheet {
  position: relative; padding: .8rem .9rem .7rem; border-radius: 6px; background: #f7f8fa; color: #1b2430;
  font-family: var(--font-sans); font-size: .68rem; line-height: 1.45; box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .9);
  animation: sheet-in 12s var(--ease-out) infinite backwards;
}
@keyframes sheet-in { 0%, 2% { opacity: 0; transform: translateY(8px); } 8%, 90% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }
.sheet-title { margin: 0 0 .5rem; padding-bottom: .35rem; border-bottom: 2px solid #1a62bd; font-weight: 650; font-size: .82rem; color: #0b1a2e; }
.sheet-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem .8rem; margin: 0 0 .5rem; }
.sheet-fields div { display: flex; gap: .4rem; min-width: 0; }
.sheet-fields dt { color: #4a5563; white-space: nowrap; }
.sheet-fields dd { margin: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-items { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.sheet-items td { padding: .14rem .3rem; border-top: 1px solid #dde2e8; }
.sheet-items td:nth-child(1) { width: 100%; }
.sheet-items td:nth-child(n + 2) { text-align: right; white-space: nowrap; }
.sheet-items tr.sum td { border-top: 1.5px solid #1b2430; font-weight: 650; }
.sheet-status { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 0; }
.sheet-status span { padding: .02rem .45rem; border-radius: 5px; background: #e3f1e7; color: #13532c; font-weight: 600; }
.sheet-status .att { background: #e4ecf7; color: #123c70; font-family: var(--font-mono); font-weight: 500; }
.log li:nth-child(n + 2) .ok { color: #3fd36f; border-color: rgba(63, 211, 111, .4); background: rgba(63, 211, 111, .1); }
.hero .stage figcaption { text-align: left; line-height: 1.55; }
@media (max-width: 520px) {
  .hero .obj { --size: 64px; top: -2.75rem; right: .75rem; }
  .win .tab { display: none; }
  .win { transform: none; }
  .xsn-view, .xsn-files { padding-inline: .8rem; }
  .xsn-files li:nth-child(n + 4) { display: none; }
  .sheet-fields { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Sections ---------- */
.band { background: linear-gradient(180deg, transparent, var(--bg-2) 18%, var(--bg-2) 82%, transparent); }
main > .section h2 { font-size: var(--fs-h2); letter-spacing: var(--track-h2); line-height: 1.08; }
main > .section .narrow > h2 { margin-bottom: 1.6rem; }
main > .section .narrow > h2 .dim { font-weight: 500; }
main > .section .narrow > p { color: var(--text-2); }
main > .section .narrow > p + p { margin-top: 1rem; }

/* Bento: feature tiles with mini-scenes */
.bento > .card .card-body h3 { margin: 0; }
.bento .note { margin-top: auto; }
.pdf-shot { aspect-ratio: 16 / 9; }
.pdf-shot picture, .pdf-shot img { display: block; width: 100%; height: 100%; }
.pdf-shot img { object-fit: cover; object-position: top center; }
.mini-csv {
  position: absolute; inset: 16cqw 10cqw auto; display: grid; grid-template-columns: 1.4fr 1fr .8fr; gap: 1.6cqw;
}
.mini-csv i { display: block; height: 5.5cqw; border-radius: 1.2cqw; background: color-mix(in srgb, var(--scene-ink) 26%, transparent); }
.mini-csv i.h { background: color-mix(in srgb, var(--c) 55%, transparent); }
.mini-csv i:nth-child(n + 4) { animation: cell 7s var(--ease-in-out) infinite; }
.mini-csv i:nth-child(n + 7) { animation-delay: .5s; }
.mini-csv i:nth-child(n + 10) { animation-delay: 1s; }
@keyframes cell { 0%, 100% { opacity: 1; } 45% { opacity: .6; } }
.mini-files { position: absolute; inset: 18cqw 10cqw auto; display: grid; gap: 3cqw; font-family: var(--font-mono); font-size: 4.2cqw; color: var(--scene-ink); }
.mini-files span { padding: 2cqw 3cqw; border-radius: 2cqw; border: 1px solid color-mix(in srgb, var(--scene-ink) 22%, transparent); background: color-mix(in srgb, var(--scene-ink) 6%, transparent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-files .dir { color: var(--c); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.mini-files .f1 { margin-left: 8cqw; animation: drop 6s var(--ease-out) infinite; }
@keyframes drop { 0%, 8% { opacity: 0; transform: translateY(-3cqw); } 20%, 85% { opacity: 1; transform: none; } 95%, 100% { opacity: 0; } }
.mini-report { position: absolute; inset: 14cqw 12cqw auto; display: grid; gap: 2.4cqw; font-family: var(--font-mono); font-size: 3cqw; }
.mini-report .r { position: relative; display: flex; align-items: center; justify-content: flex-end; height: 7cqw; padding: 0 2cqw; border-radius: 1.6cqw; color: var(--scene-ink); background: color-mix(in srgb, var(--scene-ink) 8%, transparent); }
.mini-report .r::before { content: ""; position: absolute; left: 2cqw; width: 2.4cqw; height: 2.4cqw; border-radius: 50%; }
.mini-report .ok::before { background: #2fb760; }
.mini-report .skip::before { background: #d39b2a; }
.mini-report .fail::before { background: #d6455a; }
.mini-report .ok { animation: cell 8s var(--ease-in-out) infinite; }

/* Output folder + forms.csv */
.outputs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 1rem; margin-top: 1rem; }
.out-card { min-width: 0; padding: 1.4rem 1.5rem; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.out-card h3 { margin-bottom: .9rem; font-size: var(--fs-h3); letter-spacing: var(--track-h3); }
.tree { margin: 0; padding: 1rem 1.1rem; overflow-x: auto; border-radius: var(--r); background: var(--win-bg); color: var(--win-text); border: 1px solid rgba(255, 255, 255, .1); font-size: .78rem; line-height: 1.7; }
.tree code { padding: 0; border: 0; background: none; font-size: inherit; overflow-wrap: normal; }
.table-scroll { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); }
.table-scroll:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.csv { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: .68rem; white-space: nowrap; }
.csv th, .csv td { padding: .55rem .5rem; text-align: left; border-bottom: 1px solid var(--line); color: var(--text-2); }
.csv th { color: var(--text); background: var(--surface-2); font-weight: 600; }
.csv tbody tr:last-child td { border-bottom: 0; }
.out-card .note { margin-top: .7rem; }
@media (max-width: 900px) { .outputs { grid-template-columns: minmax(0, 1fr); } }

/* How it works: three numbered cards */
.steps {
  counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem;
  margin: 0; padding: 0; list-style: none;
}
.steps li {
  counter-increment: step; position: relative; padding: 1.5rem; border-radius: var(--r-l);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-card);
}
.steps li::before {
  content: "0" counter(step); display: inline-grid; place-items: center; width: 38px; height: 38px; margin-bottom: 1rem;
  border-radius: 11px; font: 600 .85rem/1 var(--font-mono); color: var(--accent-text);
  background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.steps h3 { font-size: var(--fs-h3); letter-spacing: var(--track-h3); margin-bottom: .6rem; }
.steps p { color: var(--text-2); font-size: .95rem; }
#how > .wrap > .note { margin-top: 1.6rem; }
@media (max-width: 860px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* Pricing: article.plan (free trial) + article.plan.plan-main (license); .plans-3 with the 1 PC card */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: stretch; }
.plans.plans-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plan {
  display: flex; flex-direction: column; align-items: flex-start; gap: .9rem; padding: 1.6rem 1.6rem 1.7rem;
  border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-card);
}
.plan h3 { font-size: 1.3rem; letter-spacing: var(--track-h3); }
.plan .price { font-size: 2.2rem; font-weight: 650; letter-spacing: -.03em; line-height: 1; color: var(--text); }
.plan .price span { font-size: .95rem; font-weight: 500; letter-spacing: 0; color: var(--text-3); }
.plan ul { display: grid; gap: .5rem; margin: 0 0 auto; padding: 0; list-style: none; color: var(--text-2); font-size: .95rem; }
.plan li { position: relative; padding-left: 1.3rem; }
.plan li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--line-3); }
.plan-main { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, var(--surface)), var(--surface)); }
.plan-main li::before { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.plan .small { line-height: 1.55; }
.plan .alt-download { margin-top: 0; }
@media (max-width: 1023px) { .plans.plans-3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .plans { grid-template-columns: minmax(0, 1fr); } }

/* FAQ uses .faq from aphex.css */
.faq details > p { font-size: .96rem; color: var(--text-2); }
.faq details > p + p { margin-top: .8rem; }

/* Guides on the home page (slot:guides) */
.home-guides .guide-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: 1.6rem 0; padding: 0; list-style: none; }
.home-guides .guide-list h3 { font-size: 1rem; letter-spacing: var(--track-h3); line-height: 1.35; margin-bottom: .35rem; }
.home-guides .guide-list p { font-size: .9rem; }
@media (max-width: 760px) { .home-guides .guide-list { grid-template-columns: minmax(0, 1fr); } }

/* Closing panel: requirements + the same download/buy block */
.req { display: grid; gap: .45rem; max-width: 34rem; margin: 1.4rem auto 0; padding: 0; list-style: none; color: var(--text-2); text-align: left; }
.req li { position: relative; padding-left: 1.4rem; }
.req li::before { content: "✓"; position: absolute; left: 0; top: 0; font: 600 .9rem/1.6 var(--font-mono); color: var(--accent-text); }
.cta-panel .cta { align-items: center; }
.cta-panel .alt-download { margin-top: 1rem; }

/* ---------- Footer (footer.site-footer = .footer of the standard) ---------- */
footer.site-footer { position: relative; overflow: clip; border-top: 1px solid var(--line); padding-top: clamp(3rem, 6vw, 4.5rem); background: linear-gradient(var(--bg), var(--bg-2)); }
.foot { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
@media (max-width: 520px) { .foot { grid-template-columns: minmax(0, 1fr); } }
.foot ul.footer-links { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; }
.footer-links a:hover { color: var(--accent-text); }
.legal a { text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: .22em; }
.legal .tm { max-width: 60rem; line-height: 1.6; }

/* ---------- Guides and the guide list (shell, main.doc) ---------- */
.doc { padding-block: clamp(2.5rem, 5vw, 4.5rem) var(--section); }
.doc h1 { font-size: clamp(2rem, 1.2rem + 2.6vw, 3rem); letter-spacing: var(--track-h2); line-height: 1.1; margin: 1rem 0 1rem; }
.doc h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); letter-spacing: var(--track-h3); margin: 2.4rem 0 .8rem; }
.doc h3 { font-size: var(--fs-h3); margin: 1.8rem 0 .6rem; }
.doc p, .doc li { color: var(--text-2); }
.doc p + p { margin-top: 1rem; }
.doc .lead { margin-bottom: 1rem; }
.doc ol, .doc ul { padding-left: 1.3rem; margin: 1rem 0; }
.doc li + li { margin-top: .4rem; }
.doc strong { color: var(--text); }
.doc pre { margin: 1.2rem 0; padding: 1rem 1.1rem; overflow-x: auto; border-radius: var(--r); background: var(--win-bg); color: var(--win-text); font-size: .8rem; }
.doc pre code { padding: 0; border: 0; background: none; color: inherit; overflow-wrap: normal; }
.crumbs { font-size: var(--fs-small); color: var(--text-3); }
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--accent-text); }
.updated { font-size: var(--fs-small); color: var(--text-3); font-family: var(--font-mono); }
.doc .table-wrap { overflow-x: auto; margin: 1.2rem 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.doc th, .doc td { padding: .6rem .7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; color: var(--text-2); }
.doc th { color: var(--text); font-weight: 600; }
.product-box {
  position: relative; isolation: isolate; overflow: hidden; margin: 3rem 0; padding: 1.8rem; border-radius: var(--r-l);
  background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line-2); box-shadow: var(--shadow-card);
}
.product-box::after { content: ""; position: absolute; z-index: -1; right: -20%; bottom: -60%; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, var(--glow), transparent 65%); pointer-events: none; }
.doc .product-box h2 { margin-top: 0; }
.product-box p + p { margin-top: 1.2rem; }
.product-box .cta { align-items: center; }
.doc .product-box a.btn, .doc .store-badge { text-decoration: none; }
.trial-lead { margin-bottom: .2rem; }
.doc ul.guide-list { display: grid; gap: .75rem; margin: 1.5rem 0; padding: 0; list-style: none; }
.guide-list li {
  margin: 0; padding: 1.15rem 1.3rem; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  transition: border-color var(--t), background-color var(--t);
}
.guide-list li:hover { border-color: var(--line-2); background: var(--surface-2); }
.doc .guide-list h2 { font-size: var(--fs-h3); letter-spacing: var(--track-h3); margin: 0 0 .35rem; line-height: 1.3; }
.guide-list h2 a, .guide-list h3 a { color: var(--text); }
.guide-list h2 a:hover, .guide-list h3 a:hover { color: var(--accent-text); }
.guide-list p { font-size: .94rem; color: var(--text-2); }
.related ul { padding-left: 1.2rem; }
.site-footer .wordmark { font-size: clamp(2rem, 9.4vw, 8.5rem); }
