/* Scoped template foundations. The existing canvas, header and four service cards stay shared. */
.template-card-visual { display:flex; align-items:center; justify-content:center; gap:16px; width:100%; min-height:160px; margin-block:0 22px; padding:12px; border:1px solid var(--ks-line); border-radius:20px; background:var(--ks-surface-2); }
.template-card-visual img { display:block; object-fit:contain; height:144px; width:auto; max-width:70%; border-radius:8px; }
.template-card-visual img:first-child { max-width:27%; }
.template-card-prices { margin-block:auto 22px; width:100%; }
.template-prices { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px; font-size:clamp(20px,2vw,26px); font-weight:700; line-height:1.4; color:var(--ks-text); }
.template-prices > span:last-child { white-space:nowrap; }
.template-breadcrumbs { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding-block:12px 24px; color:var(--ks-muted); font-size:14px; }
.template-foundation-hero { max-width:840px; padding-block:24px 36px; }
.template-foundation-hero h1 { font-size:clamp(34px,5vw,64px); line-height:1.1; letter-spacing:-.03em; overflow-wrap:anywhere; margin:12px 0 24px; }
.template-draft-note { padding:18px 22px; border-inline-start:3px solid var(--visual-accent); border-radius:0 16px 16px 0; background:var(--visual-tint); color:var(--ks-muted); line-height:1.7; }
[dir="rtl"] .template-draft-note { border-radius:16px 0 0 16px; }
.template-foundation-products { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.template-product-foundation { display:flex; flex-direction:column; align-items:flex-start; gap:16px; padding:32px; border:1px solid var(--ks-line); border-radius:26px; background:var(--ks-surface); min-width:0; }
.template-product-foundation:last-child { grid-column:1 / -1; background:var(--ks-surface-2); }
.template-product-foundation h2 { font-size:clamp(24px,3vw,34px); margin:0; overflow-wrap:anywhere; }
.template-product-price { font-size:34px; font-weight:700; color:var(--ks-text); margin:0 0 12px; }
.template-route-links { display:flex; flex-wrap:wrap; gap:12px; margin-block:32px; }
.template-route-links .services-button { white-space:normal; text-align:start; }
@media (max-width:620px) {
  .template-foundation-products { grid-template-columns:minmax(0,1fr); gap:16px; }
  .template-product-foundation { padding:24px; }
  .template-route-links { flex-direction:column; align-items:stretch; }
}

/* Product pages use real screen captures as the primary visual evidence. */
.android-templates-content { --template-gap:clamp(24px,4vw,64px); }
.android-templates-content :is(h1,h2,h3,p,li,th,td) { overflow-wrap:anywhere; }
.template-visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.template-mobile-model { display:none; }
.template-hero { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:center; gap:var(--template-gap); padding-block:24px 56px; }
.template-hero-copy { min-width:0; }
.template-hero h1 { font-size:clamp(38px,4.5vw,64px); line-height:1.08; letter-spacing:-.035em; text-wrap:balance; margin-block:16px 24px; }
.template-hero h1 bdi { display:block; }
.template-hero .services-lead { font-size:clamp(19px,2vw,24px); line-height:1.5; margin-block:0 18px; }
.template-hero-copy > p:not(.services-eyebrow):not(.services-lead):not(.template-payment) { color:var(--ks-muted); line-height:1.8; font-size:16px; }
.template-hero-links { display:flex; flex-wrap:wrap; gap:12px; margin-block-start:26px; }
.template-kicker { display:block; font-size:12px; font-weight:650; line-height:1.7; color:var(--visual-accent); margin:0 0 8px; }
.template-note { color:var(--ks-muted); font-size:14px; line-height:1.8; max-width:85ch; margin-block:24px; }
.template-hero-purchase { display:flex; flex-wrap:wrap; align-items:center; gap:24px; margin-block:26px 14px; }
.template-main-price { font-size:clamp(38px,4vw,52px); font-weight:750; line-height:1.15; margin:0; letter-spacing:-.025em; }
.template-payment { font-size:13px; font-weight:650; line-height:1.7; color:var(--visual-accent); }
.template-buy { min-height:54px; padding:15px 24px; font-size:16px; }
.template-buy .ui-icon { width:20px; height:20px; flex:none; }
.template-stage { position:relative; display:flex; align-items:center; justify-content:center; min-width:0; height:430px; gap:18px; padding:28px; border:1px solid var(--ks-line); border-radius:32px; background:var(--surface-feature); overflow:hidden; isolation:isolate; }
.template-stage::after { content:''; position:absolute; inset:0; background:url('../brand/package-lines.svg') center/cover no-repeat; opacity:.09; pointer-events:none; z-index:-1; }
.template-stage::before { content:''; position:absolute; width:280px; aspect-ratio:1; border:1px solid var(--ks-line); border-radius:50%; inset-block-start:12%; inset-inline-start:25%; z-index:-1; pointer-events:none; }
.template-device { flex:none; border:5px solid #252b39; border-radius:19px; overflow:hidden; box-shadow:0 16px 28px rgba(0,0,0,.18); background:#101318; }
.template-device img { display:block; width:100%; height:auto; }
.template-device--paid-language { width:140px; transform:translateY(-15px) rotate(-7deg); }
.template-device--paid-theme { width:156px; transform:translateY(18px) rotate(6deg); }
.template-device--free-settings { width:76%; max-width:400px; transform:translate(-5px,-20px) rotate(-3deg); }
.template-device--free-theme { width:118px; margin-inline-start:-85px; transform:translateY(60px) rotate(5deg); }
.template-stage--bundle { gap:8px; }
.template-stage--bundle .template-device--paid-language { width:125px; position:relative; z-index:1; }
.template-stage--bundle .template-device--free-settings { width:65%; margin-inline-start:-55px; transform:translateY(-20px) rotate(2deg); }
.template-stage--bundle .template-device--free-theme { width:100px; margin-inline-start:-95px; }
.template-section { margin-block:48px 64px; }
.template-section-heading { display:flex; align-items:baseline; gap:18px; margin-block-end:22px; }
.template-section-heading .services-section-label { margin:0; flex:none; color:var(--visual-accent); }
.template-section-heading h2 { font-size:clamp(27px,3vw,40px); line-height:1.2; letter-spacing:-.025em; margin:0; text-wrap:balance; }
.template-section-lead { max-width:75ch; color:var(--ks-muted); line-height:1.8; margin-block:0 26px; }
.template-products { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.template-tile { display:flex; flex-direction:column; min-width:0; padding:clamp(24px,3vw,36px); border:1px solid var(--ks-line); border-radius:28px; background:var(--surface-quiet); }
.template-tile-copy { display:flex; flex-direction:column; align-items:flex-start; flex:1; min-width:0; }
.template-tile h3 { font-size:clamp(26px,2.8vw,34px); line-height:1.15; letter-spacing:-.02em; margin-block:10px 18px; }
.template-tile-copy > p:not(.template-kicker):not(.template-savings) { color:var(--ks-muted); line-height:1.8; margin:0 0 22px; }
.template-tile-price { display:flex; align-items:baseline; flex-wrap:wrap; gap:14px; width:100%; margin-block:auto 20px; }
.template-tile-price > span { color:var(--ks-muted); font-size:13px; }
.template-tile-price > bdi { font-size:36px; line-height:1.2; font-weight:750; margin-inline-start:auto; }
.template-tile .services-button { width:100%; margin-block-end:26px; }
.template-tile .template-stage { height:280px; padding:20px; border-radius:20px; width:100%; flex:none; }
.template-tile .template-device--paid-language { width:88px; }
.template-tile .template-device--paid-theme { width:100px; }
.template-tile .template-device--free-theme { width:82px; }
.template-tile .template-device--free-settings { max-width:300px; }
.template-tile--free-lifetime-pro { background:var(--surface-gradient); }
.template-tile--bundle { grid-column:1/-1; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:32px; align-items:center; background:var(--surface-feature); }
.template-tile--bundle .template-stage { height:320px; }
.template-tile--bundle .services-button { width:auto; margin-block-end:0; }
.template-tile--bundle .template-device--paid-language { width:104px; }
.template-savings { display:flex; align-items:center; flex-wrap:wrap; gap:8px; color:var(--ks-muted); font-size:14px; line-height:1.6; margin:0 0 24px; }
.template-savings > span { color:var(--visual-accent); font-weight:700; border:1px solid var(--visual-border); padding:4px 10px; border-radius:8px; margin-inline-start:8px; }
.template-comparison { border:1px solid var(--ks-line); border-radius:22px; overflow:hidden; background:var(--surface-quiet); }
.template-comparison table { width:100%; border-collapse:collapse; table-layout:fixed; text-align:start; font-size:14px; line-height:1.65; }
.template-comparison th,.template-comparison td { padding:17px 20px; border-block-end:1px solid var(--ks-line); vertical-align:middle; text-align:start; }
.template-comparison thead { background:var(--visual-tint); }
.template-comparison th:first-child { width:48%; }
.template-comparison tbody th { font-weight:500; }
.template-comparison tbody tr:last-child :is(th,td) { border:0; }
.template-feature-true { color:var(--visual-accent); font-weight:650; }
.template-feature-false { color:var(--ks-muted); }
.template-audience { display:grid; grid-template-columns:minmax(0,.6fr) minmax(0,1fr); gap:32px; padding-block:32px; border-block:1px solid var(--ks-line); }
.template-audience h2 { font-size:26px; line-height:1.4; margin:0; }
.template-audience p { margin:0; line-height:1.85; color:var(--ks-muted); }
.template-gallery { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; align-items:start; }
.template-screen { min-width:0; border:1px solid var(--ks-line); border-radius:20px; background:var(--surface-quiet); overflow:hidden; }
.template-screen summary { display:block; cursor:pointer; list-style:none; }
.template-screen summary::-webkit-details-marker { display:none; }
.template-screen summary:hover { background:var(--visual-tint); }
.android-templates-content .template-screen summary:focus-visible { outline-offset:-4px; border-radius:18px; }
.template-screen-thumb { display:flex; align-items:center; justify-content:center; height:330px; padding:24px; background:var(--living-panel); }
.template-screen-thumb img { display:block; width:auto; height:auto; max-width:100%; max-height:100%; border:1px solid var(--ks-line); border-radius:10px; object-fit:contain; }
.template-screen-label { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 16px; font-size:16px; font-weight:650; padding:18px 22px; line-height:1.6; }
.template-screen-action { font-size:12px; font-weight:500; color:var(--visual-accent); }
.template-screen-action--collapse,.template-screen[open] .template-screen-action--expand { display:none; }
.template-screen[open] .template-screen-action--collapse { display:inline; }
.template-screen[open] { grid-column:1/-1; }
.template-screen[open] .template-screen-thumb { display:none; }
.template-screen-expanded { padding:0 22px 24px; }
.template-screen-expanded img { display:block; width:auto; max-width:100%; height:auto; max-height:900px; margin-inline:auto; border-radius:10px; }
.template-pro-note { grid-column:1/-1; margin:0; padding:18px 24px; border-inline-start:2px solid var(--visual-border); }
.template-feature-grid { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.template-feature-grid li { display:flex; align-items:center; gap:14px; padding:18px 20px; border:1px solid var(--ks-line); border-radius:14px; background:var(--surface-quiet); line-height:1.65; font-size:15px; }
.template-feature-grid .ui-icon { width:24px; height:24px; flex:none; color:var(--visual-accent); }
.template-customize { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:28px; margin:0; padding-inline-start:24px; }
.template-customize li { padding-inline-start:6px; line-height:1.85; color:var(--ks-muted); }
.template-customize li::marker { color:var(--visual-accent); font-weight:700; }
.template-delivery { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:36px; padding:32px; border:1px solid var(--ks-line); border-radius:22px; background:var(--surface-gradient); }
.template-delivery h2 { font-size:28px; line-height:1.25; margin-block:0 18px; }
.template-delivery p,.template-delivery li { line-height:1.8; color:var(--ks-muted); }
.template-delivery p { margin:0; }
.template-delivery ul { margin:0; padding-inline-start:22px; }
.template-delivery li + li { margin-block-start:12px; }
.template-update-note { margin-block:22px 40px; }
.template-how .template-payment { margin-block:0 24px; }
.template-buy-steps { list-style:none; padding:0; margin:0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; counter-reset:none; }
.template-buy-steps li { min-width:0; padding:24px; border:1px solid var(--ks-line); border-radius:18px; background:var(--surface-quiet); }
.template-step-number { display:block; color:var(--visual-accent); font-size:13px; font-weight:700; margin-block-end:18px; }
.template-buy-steps p { line-height:1.75; margin:0; font-size:15px; }
.template-purchase { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:32px; align-items:center; padding:clamp(26px,4vw,48px); border:1px solid var(--visual-border); border-radius:28px; background:var(--surface-feature); margin-block:48px; }
.template-purchase h2 { font-size:clamp(28px,3vw,40px); line-height:1.2; margin-block:12px 20px; text-wrap:balance; }
.template-purchase p:not(.template-kicker):not(.template-payment) { color:var(--ks-muted); line-height:1.8; max-width:66ch; }
.template-purchase-action { display:flex; flex-direction:column; align-items:center; gap:24px; }
.template-development { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:36px; padding-block:32px; border-block-start:1px solid var(--ks-line); }
.template-development h2 { font-size:24px; line-height:1.4; margin:0 0 12px; }
.template-development p:not(.template-development-price) { color:var(--ks-muted); line-height:1.8; max-width:75ch; margin:0; font-size:14px; }
.template-development-price { color:var(--ks-muted); font-size:22px; font-weight:650; margin:0 0 12px; text-align:center; }
.template-development .services-button { font-size:14px; }
@media (max-width:1000px) {
  .template-hero { gap:28px; }
  .template-hero h1 { font-size:42px; }
  .template-stage { height:370px; padding:20px; }
  .template-device--paid-language { width:112px; }
  .template-device--paid-theme { width:124px; }
  .template-stage--bundle .template-device--paid-language { width:104px; }
  .template-stage--bundle .template-device--free-theme { width:86px; }
  .template-device--free-theme { width:98px; margin-inline-start:-64px; }
  .template-customize { grid-template-columns:1fr; gap:16px; }
  .template-buy-steps { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:700px) {
  .template-hero { grid-template-columns:minmax(0,1fr); padding-block:10px 32px; gap:30px; }
  .template-hero h1 { font-size:clamp(34px,8vw,48px); }
  .template-hero .template-stage { height:360px; }
  .template-hero .template-device--paid-language { width:122px; }
  .template-hero .template-device--paid-theme { width:134px; }
  .template-products { grid-template-columns:minmax(0,1fr); gap:18px; }
  .template-tile--bundle { grid-template-columns:minmax(0,1fr); gap:24px; }
  .template-tile--bundle .services-button { width:100%; }
  .template-audience,.template-delivery,.template-purchase,.template-development { grid-template-columns:minmax(0,1fr); gap:20px; }
  .template-section { margin-block:36px 44px; }
  .template-section-heading { gap:12px; }
  .template-comparison th,.template-comparison td { padding:13px 10px; font-size:12px; line-height:1.6; }
  .template-comparison th:first-child { width:44%; }
  .template-feature-grid,.template-gallery { grid-template-columns:minmax(0,1fr); }
  .template-screen-thumb { height:340px; }
  .template-delivery { padding:24px; }
  .template-purchase-action { align-items:stretch; gap:20px; }
  .template-purchase-action .template-main-price { text-align:start; }
  .template-development-price { text-align:start; }
}
@media (max-width:400px) {
  .template-buy-steps { grid-template-columns:minmax(0,1fr); }
  .template-buy-steps li { display:flex; align-items:baseline; gap:16px; padding:20px; }
  .template-step-number { margin:0; flex:none; }
  .template-hero-purchase .template-buy { width:100%; }
  .template-tile { padding:22px; }
}
@media (forced-colors:active) { .template-device { border-color:CanvasText; } .template-stage::before { display:none; } }

/* License copy stays adjacent to each manual purchase action. */
.template-buy-wrap { min-width:0; max-width:340px; }
.template-buy-wrap .template-buy { width:100%; }
.template-terms-notice { margin:12px 0 0; font-size:12px; line-height:1.65; color:var(--ks-muted); }
.template-terms-notice a,.template-text-link { color:var(--ks-text); text-underline-offset:4px; text-decoration:underline; }
.template-purchase-action .template-buy-wrap { width:100%; }
.template-license-summary { margin-block:42px; padding:30px; border:1px solid var(--ks-line); border-radius:26px; background:var(--ks-surface); }
.template-license-summary h2,.template-important>h2,.template-faq>h2 { margin:0 0 18px; font-size:clamp(25px,3vw,34px); line-height:1.25; }
.template-license-summary ul { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; margin:0 0 24px; padding:0; list-style:none; }
.template-license-summary li { display:flex; align-items:flex-start; gap:12px; font-size:15px; line-height:1.6; }
.template-license-summary li>svg { width:22px; height:22px; flex:none; color:var(--visual-accent); }
.template-important>div { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
.template-important article { border-block-start:1px solid var(--ks-line); padding-block-start:20px; }
.template-important h3 { font-size:20px; line-height:1.4; margin:0 0 12px; }
.template-important p { color:var(--ks-muted); font-size:14px; line-height:1.75; margin:0; }
.template-faq details { border-block-end:1px solid var(--ks-line); }
.template-faq summary { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:20px 4px; cursor:pointer; font-size:17px; font-weight:600; line-height:1.55; list-style:none; }
.template-faq summary::-webkit-details-marker { display:none; }
.template-faq summary>svg { width:20px; height:20px; flex:none; transform:rotate(90deg); }
.template-faq details[open] summary>svg { transform:rotate(-90deg); }
.template-faq details p { max-width:860px; margin:0; padding:0 4px 24px; color:var(--ks-muted); line-height:1.8; }
.template-faq summary:focus-visible { outline-offset:2px; border-radius:6px; }
.template-license-hero { max-width:850px; margin-block:20px 36px; }
.template-license-hero h1 { margin:0 0 22px; font-size:clamp(34px,5vw,62px); line-height:1.12; overflow-wrap:anywhere; }
.template-license-toc { padding:28px; background:var(--ks-surface); border:1px solid var(--ks-line); border-radius:24px; margin-block-end:42px; }
.template-license-toc h2 { margin:0 0 18px; font-size:24px; }
.template-license-toc ol { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 36px; margin:0; padding-inline-start:22px; }
.template-license-toc a { color:var(--ks-text); text-decoration:underline; text-underline-offset:4px; }
.template-license-body { max-width:900px; }
.template-license-section { margin-block:0 34px; scroll-margin-top:10px; }
.template-license-section h2 { margin:0 0 14px; font-size:clamp(23px,3vw,30px); line-height:1.4; }
.template-license-section p { color:var(--ks-muted); font-size:17px; line-height:1.85; margin:0; }
.template-license-contact { border-block-start:1px solid var(--ks-line); padding-block:24px; overflow-wrap:anywhere; line-height:1.8; }
@media(max-width:900px) { .template-license-summary ul,.template-important>div { grid-template-columns:minmax(0,1fr); gap:20px; } }
@media(max-width:700px) {
 .template-hero-purchase { align-items:flex-start; }
 .template-buy-wrap { max-width:none; }
 .template-hero-purchase>.template-buy-wrap { flex:1 1 100%; }
 .template-license-summary,.template-license-toc { padding:24px; }
 .template-license-toc ol { grid-template-columns:minmax(0,1fr); }
 .template-faq summary { font-size:16px; padding-block:19px; }
 .template-license-section p { font-size:16px; }
 .template-comparison table,.template-comparison tbody { display:block; }
 .template-comparison thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
 .template-comparison tbody tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); border-block-end:1px solid var(--ks-line); }
 .template-comparison tbody tr:last-child { border:0; }
 .template-comparison th:first-child { grid-column:1 / -1; width:auto; padding:18px 18px 8px; border:0; font-size:15px; }
 .template-comparison td { padding:8px 18px 18px; border:0; font-size:14px; line-height:1.55; }
 .template-mobile-model { display:block; color:var(--ks-muted); font-size:11px; font-weight:500; margin-block-end:5px; }
}
