/* Static public pages: features, pricing, about, contact, FAQ, guide, articles, privacy, terms. Menu styles live in menu.css. */
:root { --green: #17634b; --deep: #0f4a37; --ink: #203b33; --muted: #5d6e66; --soft: #edf5ef; --line: #dce5dd; --paper: #f7f9f6; --orange: #d9631e; --radius: 18px; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Vazirmatn, "Segoe UI", Tahoma, system-ui, sans-serif; font-size: 1.0625rem; line-height: 2; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
html[lang="en"] body { line-height: 1.75; }
a { color: var(--green); }
p, li { text-wrap: pretty; }
h1, h2, h3 { font-weight: 800; text-wrap: balance; margin: 0; }
img, svg { max-width: 100%; }
.ico { display: inline-block; flex: none; vertical-align: middle; }
.skip { position: absolute; inset-inline-start: -999px; }
.skip:focus { inset-inline-start: 1rem; top: 1rem; z-index: 100; background: #fff; padding: .5rem 1rem; border-radius: 8px; }
:focus-visible { outline: 3px solid #f5b400; outline-offset: 2px; border-radius: 6px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgb(247 249 246 / .88); backdrop-filter: blur(10px); border-bottom: 1px solid rgb(220 229 221 / .7); }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; max-width: 1200px; margin: auto; padding: .6rem 1.5rem; min-height: 68px; }
.brand img { display: block; }
.site-header nav { display: flex; align-items: center; gap: .2rem 1.2rem; flex-wrap: wrap; font-size: .95rem; font-weight: 500; }
.site-header nav > a:not(.primary), .menu > summary { color: var(--ink); text-decoration: none; }
.site-header nav > a:not(.primary):hover, .menu > summary:hover, .menu[open] > summary { color: var(--green); }
.lang { border: 1px solid var(--line); border-radius: 999px; padding: .1rem .85rem; background: #fff; }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 42px; padding: .5rem 1.2rem; border-radius: 12px; background: var(--green); color: #fff !important; font-weight: 700; text-decoration: none; box-shadow: 0 6px 16px rgb(23 99 75 / .22); transition: transform .15s, background .15s; }
.primary:hover { background: var(--deep); transform: translateY(-1px); }

/* hero */
.hero { position: relative; overflow: hidden; background: linear-gradient(135deg, #e8f3ec 0%, #f6f9f4 55%, #fff4ea 100%); border-bottom: 1px solid var(--line); }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hero::before { width: 26rem; height: 26rem; inset-inline-end: -8rem; top: -12rem; background: radial-gradient(circle, rgb(23 99 75 / .13), transparent 70%); }
.hero::after { width: 18rem; height: 18rem; inset-inline-start: -5rem; bottom: -9rem; background: radial-gradient(circle, rgb(217 99 30 / .13), transparent 70%); }
.hero .wrap { position: relative; padding-block: 2.4rem 2.6rem; }
.hero h1 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); line-height: 1.5; margin: .5rem 0 .6rem; }
html[lang="en"] .hero h1 { line-height: 1.2; letter-spacing: -.02em; }
.hero .lead { margin: 0; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .15rem .8rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--c, var(--green)); font-size: .88rem; font-weight: 700; text-decoration: none; }
.meta { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; margin-top: 1rem; color: var(--muted); font-size: .9rem; }
.crumbs { font-size: .88rem; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--green); text-decoration: underline; }
.lead { color: var(--muted); font-size: 1.15rem; max-width: 46rem; }

/* layout */
.wrap { max-width: 1120px; margin: 0 auto; padding: 1.5rem 1.5rem 3rem; }
.layout { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr) 13.5rem; gap: 2.2rem; align-items: start; }
.layout.legal { grid-template-columns: 15.5rem minmax(0, 1fr); }
.sticky { position: sticky; top: 5.5rem; max-height: calc(100vh - 7rem); overflow: auto; }
.side-title { margin: 0 0 .5rem; color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .04em; }
.side-list { list-style: none; margin: 0 0 1.4rem; padding: 0; display: grid; gap: .15rem; }
.side-list a { display: block; padding: .4rem .8rem; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: .92rem; line-height: 1.7; border-inline-start: 3px solid transparent; }
.side-list a:hover { background: #fff; }
.side-list a[aria-current], .side-list a.active { background: #fff; color: var(--c, var(--green)); font-weight: 700; border-inline-start-color: var(--c, var(--green)); box-shadow: 0 2px 8px rgb(32 59 51 / .06); }
.main { min-width: 0; }
@media (max-width: 1100px) { .layout { grid-template-columns: 15rem minmax(0, 1fr); } .layout .toc-side { display: none; } }
@media (max-width: 860px) { .layout, .layout.legal { grid-template-columns: minmax(0, 1fr); } .layout .sticky-side { display: none; } }

/* steps (timeline) */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 1.8rem; padding-inline-start: 3.6rem; }
.steps li::before { content: counter(step, decimal); position: absolute; inset-inline-start: 0; top: .2rem; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 50%; background: var(--c, var(--green)); color: #fff; font-weight: 800; box-shadow: 0 6px 14px rgb(23 99 75 / .25); }
html[lang="fa"] .steps li::before { content: counter(step, persian); }
.steps li::after { content: ""; position: absolute; inset-inline-start: 1.2rem; top: 2.9rem; bottom: .3rem; width: 2px; background: linear-gradient(var(--c, var(--green)), var(--line)); opacity: .45; }
.steps li:last-child { padding-bottom: .5rem; }
.steps li:last-child::after { display: none; }
.steps h2 { font-size: 1.2rem; line-height: 1.7; margin: 0 0 .15rem; }
.steps p { margin: 0; color: #3a5148; }

/* callouts, FAQ, cards */
.tips { margin: 1.5rem 0; padding: 1.1rem 1.4rem; border-radius: var(--radius); background: #fffaf0; border: 1px solid #f1dfb8; border-inline-start: 5px solid #e0a423; }
.tips h2 { font-size: 1.05rem; margin-bottom: .3rem; color: #7a5a0c; }
.tips ul { margin: 0; padding-inline-start: 1.3rem; }
.faq { margin: 2rem 0; }
.faq > h2 { font-size: 1.4rem; margin-bottom: .8rem; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; margin: .55rem 0; padding: 0 1.2rem; transition: border-color .15s, box-shadow .15s; }
.faq details[open] { border-color: #b7d3c1; box-shadow: 0 6px 18px rgb(32 59 51 / .07); }
.faq summary { cursor: pointer; list-style: none; padding: .85rem 0; font-weight: 700; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 1.7rem; height: 1.7rem; display: grid; place-items: center; border-radius: 50%; background: var(--soft); color: var(--green); font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 1rem; color: var(--muted); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.5rem; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: 0 12px 30px rgb(32 59 51 / .09); transform: translateY(-2px); }
.card h2 { font-size: 1.15rem; line-height: 1.7; margin-bottom: .3rem; }
.card p { margin: 0; color: #3a5148; }
.card .num { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 12px; background: var(--soft); color: var(--green); font-weight: 800; margin-bottom: .6rem; }

/* guide hub */
.search { display: flex; align-items: center; gap: .6rem; margin-top: 1.4rem; max-width: 34rem; padding: .35rem 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 24px rgb(32 59 51 / .08); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1.02rem; padding: .55rem 0; color: var(--ink); }
.search .ico { color: var(--muted); }
.topic-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .9rem; margin: 1.6rem 0 .5rem; }
.tile { display: grid; gap: .25rem; padding: 1.1rem 1.2rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); border-top: 4px solid var(--c); transition: transform .2s, box-shadow .2s; }
.tile:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgb(32 59 51 / .1); }
.tile .ico { width: 1.7rem; height: 1.7rem; color: var(--c); }
.tile strong { font-size: 1.05rem; line-height: 1.6; }
.tile span { font-size: .85rem; color: var(--muted); line-height: 1.7; }
.guide-group { margin: 2.4rem 0; }
.guide-group > h2 { display: flex; align-items: center; gap: .6rem; font-size: 1.5rem; color: var(--c); }
.guide-group > p { margin: .1rem 0 1rem; color: var(--muted); }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1rem; }
.guide-card { display: grid; gap: .4rem; align-content: start; padding: 1.15rem 1.3rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); position: relative; transition: transform .2s, box-shadow .2s, border-color .2s; }
.guide-card::before { content: ""; position: absolute; inset-inline-start: 0; top: 1.2rem; bottom: 1.2rem; width: 4px; border-radius: 4px; background: var(--c, var(--green)); }
.guide-card:hover, .guide-card:focus-visible { transform: translateY(-3px); border-color: #b7d3c1; box-shadow: 0 14px 30px rgb(32 59 51 / .1); }
.guide-card strong { line-height: 1.7; }
.guide-card span { font-size: .92rem; color: var(--muted); line-height: 1.8; }
.guide-card em { font-style: normal; font-size: .8rem; color: var(--orange); }
.empty { display: none; padding: 2rem; text-align: center; color: var(--muted); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2rem 0; }
.pager a { display: grid; gap: .1rem; padding: 1rem 1.2rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color .2s, transform .2s; }
.pager a:hover { border-color: var(--green); transform: translateY(-2px); }
.pager small { color: var(--muted); }
.pager .next { text-align: end; }
.related > h2 { font-size: 1.3rem; margin-bottom: .8rem; }

/* on-page contents */
.toc-side a { display: block; padding: .25rem .8rem; color: var(--muted); text-decoration: none; font-size: .88rem; line-height: 1.7; border-inline-start: 2px solid var(--line); }
.toc-side a:hover, .toc-side a.active { color: var(--c, var(--green)); border-inline-start-color: var(--c, var(--green)); }

/* legal */
.doc-section { padding: 1.4rem 0; border-top: 1px solid var(--line); }
.doc-section:first-of-type { border-top: 0; padding-top: .4rem; }
.doc-section h2 { display: flex; align-items: center; gap: .7rem; font-size: 1.3rem; margin-bottom: .5rem; }
.doc-section h2 span { display: inline-grid; place-items: center; min-width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--soft); color: var(--green); font-size: .95rem; }
.doc-section p { margin: .4rem 0; }
.doc-section ul { margin: .4rem 0; padding-inline-start: 1.4rem; }
.doc-section li { margin: .3rem 0; }
.contact-box { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; padding: 1rem 1.3rem; margin: 0 0 1.5rem; border: 1px solid #cfe3d3; border-radius: 14px; background: var(--soft); }
.contact-box a { font-weight: 800; direction: ltr; }
.other-doc { margin: 2rem 0 0; font-weight: 700; }

/* call to action and footer */
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin: 2.5rem 0 0; padding: 1.6rem 1.8rem; border-radius: 22px; background: linear-gradient(135deg, var(--green), var(--deep)); color: #fff; box-shadow: 0 18px 40px rgb(23 99 75 / .25); }
.cta strong { font-size: 1.25rem; }
.cta p { margin: .2rem 0 0; opacity: .92; max-width: 34rem; }
.cta a:not(.primary) { color: #fff; }
.cta .primary { background: #fff; color: var(--green) !important; box-shadow: none; }
@media (max-width: 760px) { .pager { grid-template-columns: 1fr; } .site-header-inner { padding-inline: 1rem; } .wrap { padding-inline: 1rem; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .cta, .sticky-side, .toc-side, .pager { display: none; } body { background: #fff; } .layout { display: block; } }
/* P278: feature landing pages */
.feature-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; margin-top: 1.3rem; }
.feature-actions .secondary { color: var(--green); font-weight: 700; text-decoration: none; border-bottom: 1px solid currentColor; }
.feature-actions .secondary:hover { color: var(--deep); }
.feature-layout .doc-section h2 span { background: var(--soft); color: var(--c, var(--green)); }
.feature-start { padding: 1.4rem 0 .4rem; border-top: 1px solid var(--line); }
.feature-start > h2 { font-size: 1.3rem; margin-bottom: 1rem; }
.steps h3 { font-size: 1.12rem; line-height: 1.7; margin: 0 0 .15rem; }
.feature-layout .related { margin-top: 2rem; }
.feature-links { margin-top: 2rem; }
