/* Landing pages (resources/views/site). Plain CSS, no build step, so it also works on cPanel as is.
   Logical properties (inline-start/end) keep RTL (fa, ar) and LTR (en) in one stylesheet. */

@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/vazirmatn-arabic-400-normal.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/vazirmatn-arabic-700-normal.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/vazirmatn-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/vazirmatn-latin-700-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* «studio» tokens, the same as the builder's (src/styles.css, end of file). The older names (--line, --soft,
   --tint) stay as aliases for the rules below. */
:root {
  --primary: #3847d6;
  --primary-dark: #2a37b0;
  --primary-tint: #eceefd;
  --focus: rgba(56, 71, 214, 0.22);
  --bg: #f3f5fb;
  --border: #e6e9f2;
  --field: #f2f4fa;
  --ink: #0f1b36;
  --heading: #0f1b36;
  --text: #131a2e;
  --muted: #5a6379;
  --line: var(--border);
  --soft: var(--bg);
  --tint: var(--primary-tint);
  --radius: 18px;
  --shadow: 0 1px 2px rgba(16, 24, 48, 0.05), 0 12px 32px -16px rgba(16, 24, 48, 0.22);
  --shadow-hover: 0 2px 4px rgba(16, 24, 48, 0.06), 0 18px 40px -16px rgba(16, 24, 48, 0.3);
  --wrap: 1140px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Roboto, Tahoma, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text);
  background: #fff;
}
[lang='en'] body,
body:lang(en) {
  line-height: 1.65;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--primary);
}
h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.35;
  margin: 0 0 0.5em;
}
h1 {
  font-size: clamp(1.9rem, 4.2vw, 3rem);
}
h2 {
  font-size: clamp(1.45rem, 2.8vw, 2rem);
}
h3 {
  font-size: 1.1rem;
}
p {
  margin: 0 0 1em;
}
:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 20px;
}
.narrow {
  max-width: 820px;
}
.center {
  text-align: center;
}

.skip {
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  background: var(--ink);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 20;
}
.skip:focus {
  top: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.7em 1.3em;
  border-radius: 10px;
  border: 1.5px solid transparent;
  font: inherit;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
}
.btn-ghost {
  border-color: #bfdbfe;
  color: var(--primary-dark);
  background: #fff;
}
.btn-ghost:hover {
  border-color: var(--primary);
}
.btn-light {
  background: #fff;
  color: var(--primary-dark);
}
.btn-sm {
  white-space: nowrap;
  padding: 0.45em 1em;
  font-size: 0.95rem;
}
.btn-lg {
  padding: 0.85em 1.6em;
  font-size: 1.08rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.5) blur(8px);
  border-bottom: 1px solid var(--line);
}
.bar {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 64px;
}
.logo img {
  flex: none;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.nav {
  display: flex;
  gap: 4px;
  margin-inline-start: auto;
}
.nav a {
  color: var(--text);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
}
.nav a:hover {
  background: var(--soft);
  color: var(--ink);
}
.langs {
  position: relative;
}
.langs summary {
  list-style: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
}
.langs .globe svg {
  width: 18px;
  height: 18px;
  vertical-align: -4px;
}
.langs summary::-webkit-details-marker {
  display: none;
}
.langs summary:hover {
  background: var(--soft);
}
.langs ul {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 6px);
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  min-width: 140px;
}
.langs li a {
  display: block;
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
}
.langs li a:hover,
.langs li a[aria-current] {
  background: var(--tint);
  color: var(--primary-dark);
}

.lang-hint {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 6px 16px;
  background: var(--ink);
  font-size: 0.95rem;
}
.lang-hint[hidden] {
  display: none;
}
.lang-hint a {
  color: #fff;
}
.lang-hint button {
  background: none;
  border: 0;
  color: #cbd5e1;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}

/* Hero */
.hero {
  background: radial-gradient(1200px 500px at 85% -10%, #e3e9f2 0%, transparent 60%), linear-gradient(#faf8f4, #fff);
  padding: 56px 0 40px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 0 0 4px;
  padding: 0;
  list-style: none;
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 0.95rem;
}
.trust li::before {
  content: '✓';
  color: #16a34a;
  margin-inline-end: 6px;
}
.lead {
  font-size: 1.15rem;
  color: var(--text);
  max-width: 62ch;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 12px;
}
.actions.center {
  justify-content: center;
}
.note {
  font-size: 0.93rem;
  color: var(--muted);
}
.continue a {
  font-weight: 700;
}
.hero-art {
  position: relative;
  height: 470px;
}
.sheet {
  position: absolute;
  width: 300px;
  border-radius: 6px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  background: #fff;
}
.sheet-0 {
  inset-inline-start: 0;
  top: 40px;
  transform: rotate(-5deg);
}
.sheet-1 {
  inset-inline-end: 0;
  top: 30px;
  transform: rotate(5deg);
}
.sheet-0,
.sheet-1 {
  width: 250px;
}
.sheet-2 {
  inset-inline-start: 50%;
  top: 0;
  translate: -50% 0;
  z-index: 2;
}
[dir='rtl'] .sheet-2 {
  translate: 50% 0;
}

/* Sections */
.section {
  padding: 72px 0;
}
.section.tight {
  padding-top: 24px;
}
.section.alt {
  background: #f8fafc;
  border-block: 1px solid var(--line);
}
.section > .wrap > h2 {
  text-align: center;
}
.section-lead {
  text-align: center;
  color: var(--muted);
  max-width: 680px;
  margin: 0 auto 36px;
}

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.features li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.features .icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--tint);
  color: var(--primary);
  margin-bottom: 12px;
}
.features p {
  margin: 0;
  font-size: 0.97rem;
}

.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}
.steps li {
  counter-increment: step;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.steps li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  margin-bottom: 12px;
}
[lang='fa'] .steps li::before {
  content: counter(step, persian);
}
[lang='ar'] .steps li::before {
  content: counter(step, arabic-indic);
}
.steps p {
  margin: 0;
}

/* Template cards */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}
.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.card-img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  margin-bottom: 12px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card-img:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.card h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}
.card h3 a {
  color: var(--ink);
  text-decoration: none;
}
.card h3 a:hover {
  color: var(--primary);
}
.card p {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: var(--muted);
}
.card .best {
  color: var(--text);
}
.card .btn {
  margin-top: auto;
}

.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
}
.checks {
  margin: 0;
  padding: 0;
  list-style: none;
}
.checks li {
  position: relative;
  padding-inline-start: 30px;
  margin-bottom: 8px;
}
.checks li::before {
  content: '✓';
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  color: #16a34a;
  font-weight: 700;
}
.checks.cols {
  columns: 2;
  gap: 32px;
  margin-top: 24px;
}
.lang-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.lang-links a {
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 2px 14px;
  text-decoration: none;
}

.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  font-size: 1.5rem;
  line-height: 1;
  color: var(--primary);
}
.faq details[open] summary::after {
  content: '−';
}
.faq summary h3 {
  margin: 0;
  font-size: 1.05rem;
}
.faq p {
  margin: 0 0 18px;
}

.final {
  background: linear-gradient(135deg, var(--primary), #2f5a96);
  color: #e0e7ff;
  text-align: center;
  padding: 64px 0;
}
.final .final-title {
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.4;
}

/* "Online builder or Word?" table on the home page */
.table-scroll {
  overflow-x: auto;
}
.vs {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.95rem;
}
.vs th,
.vs td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: start;
  vertical-align: top;
}
.vs thead th {
  background: var(--soft);
  color: var(--ink);
}
.vs thead th:last-child,
.vs td:last-child {
  color: var(--primary-dark);
  font-weight: 700;
}
.vs tbody th {
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

/* Privacy policy and terms */
.section > .wrap.legal > h2 {
  text-align: start;
  font-size: 1.3rem;
  margin: 32px 0 8px;
  scroll-margin-top: 16px;
}
.legal p {
  max-width: 70ch;
}
.legal-toc {
  background: var(--soft);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.legal-toc ol {
  margin: 0;
  padding-inline-start: 20px;
  columns: 2 220px;
}
:lang(fa) .legal-toc ol {
  list-style-type: persian;
}
:lang(ar) .legal-toc ol {
  list-style-type: arabic-indic;
}
.legal-toc li {
  margin: 2px 0;
}
.legal-other {
  margin-top: 40px;
  font-weight: 700;
}

/* Gallery and template pages */
.page-head {
  padding: 36px 0 8px;
  background: linear-gradient(#f8fbff, #fff);
}
.crumbs {
  font-size: 0.93rem;
  color: var(--muted);
  margin-bottom: 12px;
}
.crumbs a {
  color: var(--muted);
}
.tpl {
  display: grid;
  grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.tpl-img {
  margin: 0;
  position: sticky;
  top: 84px;
}
.tpl-img img {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.tpl-img figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 8px;
  text-align: center;
}
.tpl-text .btn {
  margin: 8px 0 12px;
}
.tpl-text h2 {
  font-size: 1.25rem;
  margin-top: 28px;
}
.best strong {
  color: var(--ink);
}

/* Job sample pages */
.sample-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  grid-template-areas: 'head carousel' 'more carousel';
  /* The heading row hugs its text, so the buttons follow the lead instead of sitting below the fold. */
  grid-template-rows: auto 1fr;
  column-gap: 48px;
  align-items: start;
}
.sample-head {
  grid-area: head;
}
.sample-more {
  grid-area: more;
  display: flex;
  flex-direction: column;
}
/* Laptops: the edit/PDF buttons right under the lead, before the intro paragraphs. */
.sample-more > .actions {
  order: -1;
  margin-top: 4px;
}
.sample-more > .after-pdf {
  order: -1;
}
/* Phones and tablets: a «دانلود PDF» link right under the carousel (the buttons come after the intro there). */
.carousel-pdf {
  display: none;
  margin: 4px 0 0;
  text-align: center;
  font-weight: 700;
}
.sample-top .carousel {
  grid-area: carousel;
}
.after-pdf {
  font-weight: 700;
}
.byline {
  color: var(--muted);
  font-size: 0.9rem;
  margin: -6px 0 12px;
}
.carousel {
  min-width: 0;
}
.slides {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  border-radius: 8px;
}
.slides::-webkit-scrollbar {
  display: none;
}
.slides:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}
.slide {
  flex: 0 0 100%;
  margin: 0;
  scroll-snap-align: center;
}
.slide img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: #fff;
}
.carousel-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.carousel-nav .arrow {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
}
.carousel-nav .arrow:disabled {
  opacity: 0.35;
  cursor: default;
}
[dir='rtl'] .carousel-nav .arrow {
  transform: scaleX(-1);
}
.chips.tpl-chips {
  flex: 1;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0;
  padding: 2px;
}
.tpl-chips::-webkit-scrollbar {
  display: none;
}
.tpl-chips li {
  flex: none;
}
.tpl-chips a {
  display: block;
  color: var(--text);
  text-decoration: none;
}
.chips li:has(a[aria-current]) {
  background: var(--primary);
  border-color: var(--primary);
}
.tpl-chips a[aria-current] {
  color: #fff;
  font-weight: 700;
}
.full-text {
  margin: 28px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 18px;
  background: #fff;
}
.full-text summary {
  cursor: pointer;
  color: var(--primary);
}
.full-text summary h2 {
  display: inline;
  font-size: 1.1rem;
  color: inherit;
}
.resume-text .rt-h {
  margin: 16px 0 4px;
}
.sticky-cta {
  display: none;
}
.steps-list li {
  margin-bottom: 8px;
}

.sample-text h3 {
  font-size: 1.05rem;
  margin: 18px 0 4px;
  color: var(--ink);
}
.sample-text .example {
  margin: 0 0 12px;
  padding: 12px 16px;
  background: var(--tint);
  border-inline-start: 4px solid var(--primary);
  border-radius: 8px;
}
.sample-text .bullets li {
  margin-bottom: 6px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.chips li {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.93rem;
}
.crosses {
  margin: 0;
  padding: 0;
  list-style: none;
}
.crosses li {
  position: relative;
  padding-inline-start: 30px;
  margin-bottom: 8px;
}
.crosses li::before {
  content: '✗';
  position: absolute;
  inset-inline-start: 0;
  color: #dc2626;
  font-weight: 700;
}
.sample-text .faq {
  margin-bottom: 20px;
}

.missing .big {
  font-size: 5rem;
  font-weight: 700;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.2;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: #cbd5e1;
  padding: 48px 0 20px;
  font-size: 0.95rem;
}
.site-footer a {
  color: #e2e8f0;
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
}
.site-footer .logo {
  color: #fff;
  margin-bottom: 8px;
}
.foot {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}
.foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.foot li {
  margin-bottom: 6px;
}
.copy {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid #1e293b;
  font-size: 0.85rem;
  color: #94a3b8;
}

/* Tablets */
@media (max-width: 980px) {
  .sample-top {
    grid-template-columns: 1fr;
    grid-template-areas: 'head' 'carousel' 'more';
    grid-template-rows: none;
    row-gap: 16px;
  }
  .sample-more > .actions,
  .sample-more > .after-pdf {
    order: 0;
  }
  .carousel-pdf {
    display: block;
  }
  .features,
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-grid,
  .tpl {
    grid-template-columns: 1fr;
  }
  .hero-art {
    height: 400px;
    max-width: 520px;
    width: 100%;
    margin-inline: auto;
  }
  .sheet {
    width: 250px;
  }
  .sheet-0,
  .sheet-1 {
    width: 210px;
  }
  .tpl-img {
    position: static;
    max-width: 480px;
    margin-inline: auto;
  }
}

/* Phones */
@media (max-width: 700px) {
  body {
    font-size: 1rem;
  }
  .nav {
    display: none;
  }
  .langs {
    margin-inline-start: auto;
  }
  .bar {
    gap: 8px;
  }
  .logo {
    font-size: 1rem;
  }
  .hero {
    padding-top: 32px;
  }
  .hero-art {
    height: 300px;
  }
  .sheet {
    width: 190px;
  }
  .sheet-0,
  .sheet-1 {
    width: 160px;
  }
  .actions .btn {
    flex: 1 1 100%;
  }
  .section {
    padding: 52px 0;
  }
  .steps,
  .duo,
  .foot {
    grid-template-columns: 1fr;
  }
  .cards {
    gap: 16px;
  }
  .checks.cols {
    columns: 1;
  }
  .panel {
    padding: 22px;
  }
}
@media (max-width: 420px) {
  .features {
    grid-template-columns: 1fr;
  }
  .lang-name {
    display: none;
  }
  .logo {
    font-size: 0.95rem;
  }
  .bar .btn-sm {
    padding-inline: 0.8em;
    font-size: 0.88rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn,
  .card-img {
    transition: none;
  }
}
@media (max-width: 520px) {
  .trust {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .card .btn {
    width: 100%;
    font-size: 0.9rem;
  }
}

.logo-mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 9px;
}
/* Privacy policy / terms */
.legal h1 {
  margin: 12px 0 4px;
}
.legal h1,
.legal h2 {
  text-align: start;
}
.legal h2 {
  margin: 28px 0 8px;
  font-size: 1.15rem;
}
.legal p {
  line-height: 1.9;
  margin: 0 0 10px;
}
.legal-updated {
  color: var(--muted, #6b7280);
  font-size: 0.9rem;
}
.legal-contact {
  margin-top: 28px !important;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f4f1ea;
}

@media (max-width: 800px) {
  .sticky-cta {
    display: block;
    position: sticky;
    bottom: 0;
    z-index: 5;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--line);
  }
  .sticky-cta.off {
    visibility: hidden;
  }
  .sticky-cta .btn {
    display: block;
    width: 100%;
    text-align: center;
  }
}

/* Home: «what is your job title?» start box */
.start {
  margin: 24px 0 0;
  max-width: 560px;
}
.start label {
  display: block;
  font-weight: 800;
  color: var(--ink);
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.start-row {
  display: flex;
  gap: 8px;
}
.start input[type='text'],
.start input:not([type]) {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 1.05rem;
  padding: 0.75em 1em;
  border: 1.5px solid #bfdbfe;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
.start input:not([type]):focus {
  outline: 3px solid #bfdbfe;
  border-color: var(--primary);
}
.actions.start-more {
  margin-top: 12px;
}
.start-hint {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.start-sample {
  margin: 4px 0 0;
  font-size: 0.9rem;
}
.start-more {
  align-items: center;
}
.start-more .start-skip {
  font-weight: 700;
}

/* Sample page: the same resume for another specialty (builder only) */
.variants {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 4px 0 12px;
  font-weight: 700;
  color: var(--ink);
}
.variants .chip {
  padding: 8px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #fff;
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 600;
}
.variants .chip:hover {
  border-color: var(--primary);
}

/* Sample page: version switch above the carousel («باسابقه / تازه‌کار»; shown only with JavaScript) */
.level-switch {
  display: none;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0 0 12px;
  font-weight: 700;
  color: var(--ink);
  font-size: 0.95rem;
}
.js .level-switch {
  display: flex;
}
.level-pill {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
}
.level-pill button {
  font: inherit;
  font-weight: 500;
  min-height: 44px;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text);
  cursor: pointer;
}
.level-pill button[aria-pressed='true'] {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Templates list: filters (shown only with JavaScript) */
.tpl-filter {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  font-weight: 700;
  color: var(--ink);
}
.js .tpl-filter {
  display: flex;
}
.tpl-filter button {
  font: inherit;
  font-weight: 500;
  font-size: 0.95rem;
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #fff;
  color: var(--primary-dark);
  cursor: pointer;
}
.tpl-filter button[aria-pressed='true'] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
}
.tpl-count {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.9rem;
}
.card[hidden] {
  display: none;
}

/* Phones: the breadcrumb's last item repeats the H1 below it; leave it out so the page starts higher. */
@media (max-width: 480px) {
  .crumbs > [aria-current],
  .crumbs > span[aria-hidden]:has(+ [aria-current]) {
    display: none;
  }
}

/* Articles (/guides/<slug>) */
.prose h2 {
  margin: 36px 0 10px;
}
.prose h3 {
  font-size: 1.05rem;
  margin: 22px 0 6px;
  color: var(--ink);
}
.prose p,
.prose li {
  line-height: 1.95;
}
.prose ul,
.prose ol {
  padding-inline-start: 1.4em;
}
.prose blockquote {
  margin: 12px 0;
  padding: 12px 16px;
  background: var(--tint);
  border-inline-start: 4px solid var(--primary);
  border-radius: 8px;
}
.prose blockquote p {
  margin: 0;
}
.prose table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.95rem;
}
.prose th,
.prose td {
  border: 1px solid var(--line);
  padding: 8px 12px;
  text-align: start;
  vertical-align: top;
}
.prose th {
  background: var(--soft);
}
.section > .wrap.prose > h2 {
  text-align: start;
}
.toc {
  margin: 20px 0 8px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}
.section > .wrap.prose > .toc .toc-title,
.toc-title {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
  text-align: start;
}
.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.toc li {
  line-height: 1.8;
}
.prose h2[id] {
  scroll-margin-top: 80px;
}
@media (max-width: 480px) {
  .article-head .crumbs {
    display: none;
  }
}

/* ================= «studio» look (same as the builder; later rules win) =================
   Dark ink header with a white CTA pill and a ≡ menu below 900px, cool canvas, borderless cards on soft shadows,
   filled inputs, pill buttons, indigo for actions. Sections on the home page alternate white and the canvas. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main {
  flex: 1 0 auto;
}
h1,
h2,
h3 {
  color: var(--heading);
  font-weight: 800;
  text-wrap: balance;
}
:focus-visible {
  outline: 3px solid rgba(56, 71, 214, 0.5);
  outline-offset: 2px;
}

/* Buttons: pills */
.btn {
  border-radius: 999px;
  border: 0;
  font-weight: 700;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 20px -10px rgba(56, 71, 214, 0.85);
}
.btn-primary:hover {
  background: var(--primary-dark);
}
.btn-light,
.btn-ghost {
  background: var(--primary-tint);
  color: var(--primary-dark);
  border: 0;
}
.btn-light:hover,
.btn-ghost:hover {
  background: #dfe3fc;
}
.btn-block {
  display: flex;
  width: 100%;
}

/* Header: one dark bar */
.site-header {
  background: var(--ink);
  border-bottom: 0;
  backdrop-filter: none;
  color: #fff;
}
.site-header :focus-visible {
  outline-color: #fff;
}
.bar {
  gap: 12px;
}
.site-header .logo {
  color: #fff;
}
.logo-mark {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.nav {
  gap: 2px;
}
.nav a {
  color: rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  padding: 6px 14px;
}
.nav a:hover,
.nav a[aria-current] {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}
.langs summary {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  padding: 6px 12px;
}
.langs summary:hover {
  background: rgba(255, 255, 255, 0.16);
}
.langs ul {
  border: 0;
  border-radius: 14px;
  color: var(--text);
}
.langs li a {
  border-radius: 10px;
}
.btn-cta {
  background: #fff;
  color: var(--ink);
}
.btn-cta:hover {
  background: #e9ecf7;
}

/* ≡ menu (phones and tablets): a <details>, so it works without JavaScript */
.menu {
  display: none;
}
.menu-btn {
  list-style: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  cursor: pointer;
}
.menu-btn::-webkit-details-marker {
  display: none;
}
.menu[open] .menu-btn {
  background: rgba(255, 255, 255, 0.2);
}
.menu-sheet {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  max-height: calc(100vh - 56px);
  overflow-y: auto;
  padding: 6px 20px 20px;
  background: #fff;
  color: var(--text);
  border-radius: 0 0 18px 18px;
  box-shadow: var(--shadow), 0 24px 48px -12px rgba(16, 24, 48, 0.35);
}
.menu-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.menu-links svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--primary);
}
.menu-links a[aria-current] {
  color: var(--primary);
}
.menu-langs {
  display: flex;
  gap: 4px;
  margin: 16px 0;
  padding: 4px;
  background: var(--bg);
  border-radius: 999px;
}
.menu-langs a {
  flex: 1;
  min-height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.menu-langs a[aria-current] {
  background: var(--primary-tint);
  color: var(--primary-dark);
  font-weight: 700;
}
@media (max-width: 899px) {
  .site-header .nav,
  .site-header .langs {
    display: none;
  }
  .menu {
    display: block;
  }
  .btn-cta {
    margin-inline-start: auto;
  }
  .bar {
    min-height: 56px;
    gap: 8px;
  }
}

/* Hero: one main action in a start card */
.hero {
  background: radial-gradient(900px 420px at 85% -10%, #e3e7fd, transparent 60%), var(--bg);
  padding: 56px 0 48px;
}
[dir='rtl'] .hero {
  background: radial-gradient(900px 420px at 15% -10%, #e3e7fd, transparent 60%), var(--bg);
}
.hero-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}
.hero-text {
  min-width: 0;
}
.hero h1 {
  font-size: clamp(2rem, 4.4vw, 3rem);
}
.hero .lead {
  margin-bottom: 0;
}
.continue {
  margin: 0 0 12px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  padding: 4px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: var(--shadow);
}
.badge::before {
  content: '✓';
  color: #16a34a;
}
.start-card {
  max-width: 560px;
  margin-top: 22px;
  padding: 20px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.start {
  margin: 0;
  max-width: none;
}
.start label {
  font-size: 1.05rem;
}
.start input:not([type]) {
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  background: var(--field);
}
.start input:not([type]):focus {
  outline: 0;
  background: #fff;
  box-shadow: 0 0 0 3px var(--focus), inset 0 0 0 1px var(--primary);
}
.start-row .btn {
  min-height: 52px;
  white-space: nowrap;
}
.hero-more {
  margin: 16px 0 8px;
  font-weight: 700;
}
.hero-more a {
  text-decoration: none;
}
.trust {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.9rem;
}
@media (max-width: 480px) {
  .start-row {
    flex-direction: column;
  }
  .start-row .btn {
    width: 100%;
  }
}

/* Sections */
.section {
  padding: 64px 0;
}
.section.alt,
.home > section.section:nth-of-type(odd) {
  background: var(--bg);
  border: 0;
}
.page-head {
  background: var(--bg);
  padding: 32px 0 20px;
}
.page-head + .section.tight {
  padding-top: 32px;
}

/* Cards: no borders, soft shadows */
.features li,
.steps li,
.panel {
  border: 0;
  box-shadow: var(--shadow);
}
.features .icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-tint);
}
.features .icon svg {
  width: 20px;
  height: 20px;
}
.lang-links a {
  border: 0;
  background: var(--primary-tint);
  color: var(--primary-dark);
  font-weight: 700;
  padding: 4px 16px;
}

/* Template and sample cards: the whole card is the link */
.card {
  position: relative;
  padding: 12px 12px 16px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.card-img {
  position: relative;
  aspect-ratio: 360 / 300;
  border: 0;
  border-radius: 12px;
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--border);
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.card-img::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 32%;
  background: linear-gradient(rgba(255, 255, 255, 0), #fff);
}
.card-img:hover {
  box-shadow: inset 0 0 0 1px var(--border);
  transform: none;
}
.card h3,
.card p {
  padding-inline: 4px;
}
.card > p:not(.best) {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--radius);
}
.card-link:focus-visible {
  outline: 0;
}
.card:has(.card-link:focus-visible) {
  outline: 3px solid rgba(56, 71, 214, 0.5);
  outline-offset: 3px;
}
.cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 980px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.card .btn.card-use {
  white-space: normal;
  text-align: center;
  position: relative;
  z-index: 2;
  margin: auto 4px 0;
}
@media (hover: hover) and (min-width: 900px) {
  .card-use {
    opacity: 0;
    transition: opacity 0.15s;
  }
  .card:hover .card-use,
  .card:focus-within .card-use {
    opacity: 1;
  }
}

/* Guide cards (home strip, /guides) */
.guide-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}
.guide-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}
.guide-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.guide-card h2,
.guide-card h3 {
  font-size: 1.12rem;
  margin: 0 0 8px;
}
.guide-card a {
  color: var(--heading);
  text-decoration: none;
}
.guide-card a::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}
.guide-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.95rem;
}
.guide-more {
  margin-top: auto;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.95rem;
}

/* «Online builder or Word?»: a table with the Resumeha column tinted; stacked cards on phones */
.vs {
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.vs thead th {
  background: #fff;
  border-bottom: 2px solid var(--border);
}
.vs tbody th {
  white-space: normal;
}
.vs thead th:last-child,
.vs td:last-child {
  background: var(--primary-tint);
}
.vs-cta {
  margin-top: 28px;
}
@media (max-width: 600px) {
  .vs,
  .vs tbody,
  .vs tr,
  .vs th,
  .vs td {
    display: block;
  }
  .vs {
    background: none;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
  }
  .vs thead {
    display: none;
  }
  .vs tr {
    margin-bottom: 12px;
    padding: 14px 16px;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow);
  }
  .vs th,
  .vs td {
    border: 0;
    padding: 0;
  }
  .vs tbody th {
    margin-bottom: 6px;
  }
  .vs td::before {
    content: attr(data-label) ': ';
    font-weight: 700;
    color: var(--muted);
  }
  .vs td:last-child {
    margin-top: 6px;
    padding: 6px 10px;
    border-radius: 10px;
  }
  .vs td:last-child::before {
    content: '✓ ' attr(data-label) ': ';
    color: var(--primary-dark);
  }
}

/* FAQ */
.faq summary h3 {
  font-weight: 700;
}

/* Final band and footer: ink */
.final {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.75);
}
.final .btn-light {
  background: #fff;
  color: var(--ink);
}
.final .btn-light:hover {
  background: #e9ecf7;
}
.site-footer {
  color: rgba(255, 255, 255, 0.72);
}
.site-footer a {
  color: rgba(255, 255, 255, 0.72);
}
.site-footer a:hover {
  color: #fff;
}
.foot {
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
}
.foot:not(:has(> div:nth-child(4))) {
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
}
.foot-about p {
  margin: 0 0 8px;
}
.foot-title {
  margin: 0 0 10px;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}
.copy {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 24px;
  border-top-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.55);
}
.copy p {
  margin: 0;
}
.foot-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.foot-langs a {
  padding: 2px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

/* Template page: H1 and the button first (phones show them before the image) */
.tpl {
  grid-template-areas: 'img head' 'img text';
  grid-template-rows: auto 1fr;
  row-gap: 0;
}
.tpl-head {
  grid-area: head;
}
.tpl-img {
  grid-area: img;
}
.tpl-text {
  grid-area: text;
}
.tpl-head .btn {
  margin: 8px 0 12px;
}
.tpl-img img,
.slide img {
  border: 0;
  border-radius: 12px;
}

/* About page */
.section > .wrap.about > h2 {
  text-align: start;
  font-size: 1.3rem;
  margin: 32px 0 8px;
}
.about .panel h2 {
  font-size: 1.2rem;
}
.about .contact {
  margin-top: 32px;
}
.contact-email {
  font-size: 1.2rem;
  font-weight: 700;
}

/* Articles: related guides at the end */
.related {
  margin-top: 40px;
  padding: 16px 20px;
  background: var(--bg);
  border-radius: var(--radius);
}
.related ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.related li {
  line-height: 2;
}

/* 404: where to go instead, and the start box */
.missing {
  background: var(--bg);
}
.missing .big {
  color: #c9cff0;
}
.missing-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}
.missing-links a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 10px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--heading);
  font-weight: 700;
  text-decoration: none;
}
.missing-links svg {
  color: var(--primary);
}
.missing .start-card {
  margin-inline: auto;
  text-align: start;
}
.missing-home {
  margin-top: 20px;
  font-weight: 700;
}

/* Legal pages: studio tint */
.legal-contact {
  background: var(--primary-tint);
}

/* Tablets */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .tpl {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'head' 'img' 'text';
    grid-template-rows: none;
  }
  .tpl-img {
    margin-block: 8px 24px;
  }
  .guide-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Phones */
@media (max-width: 700px) {
  .section {
    padding: 40px 0;
  }
  .hero {
    padding: 28px 0 0;
  }
  .hero-grid {
    gap: 20px;
  }
  .badge {
    font-size: 0.85rem;
    padding: 3px 12px;
  }
  .start-card {
    padding: 16px;
  }
  /* A cropped look at the product right under the start card. */
  .hero-art {
    height: 190px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(#000 65%, transparent);
    mask-image: linear-gradient(#000 65%, transparent);
  }
  .hero-art .sheet {
    top: 16px;
    width: 170px;
  }
  .hero-art .sheet-0,
  .hero-art .sheet-1 {
    top: 30px;
    width: 140px;
  }
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .features li {
    padding: 14px;
  }
  .features h3 {
    font-size: 0.98rem;
    margin: 0;
  }
  .features p {
    display: none;
  }
  .steps li {
    padding: 16px 18px;
  }
  .guide-cards {
    grid-template-columns: 1fr;
  }
  .foot,
  .foot:not(:has(> div:nth-child(4))) {
    grid-template-columns: 1fr 1fr;
    gap: 24px 16px;
  }
  .foot-about {
    grid-column: 1 / -1;
  }
  .missing-links {
    grid-template-columns: 1fr;
  }
  .missing-links a {
    flex-direction: row;
    justify-content: center;
  }
}
/* Phones (QA2-15/21/35, UXB-12): `1fr` tracks (= minmax(auto, 1fr)) grew to their content's min-content width —
   the hero start row and the template cards' button — so pages were wider than the screen at 320–412px. */
@media (max-width: 980px) {
  .hero-grid,
  .tpl {
    grid-template-columns: minmax(0, 1fr);
  }
  .features,
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-grid > *,
  .cards > *,
  .card {
    min-width: 0;
  }
  .card .btn {
    white-space: normal;
    text-align: center;
  }
}
/* Very narrow phones: the header keeps the mark, the CTA and the menu button. */
@media (max-width: 360px) {
  .site-header .logo-text {
    display: none;
  }
}
@media (max-width: 420px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .card {
    padding: 8px 8px 12px;
  }
  .start-row {
    flex-wrap: wrap;
  }
  .start-row .btn {
    flex: 1 1 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .card,
  .guide-card,
  .card-use {
    transition: none;
  }
}

/* SEO panel, 2026-10-17. Templates hub: a heading over the grid (the h1 went straight to the cards' h3s). */
.grid-title {
  font-size: 1.2rem;
  margin: 0 0 12px;
  text-align: start;
}
/* Template page on phones: the template's picture right after the heading and the button (searchers want to see
   it), then the longer text — it came last before. */
@media (max-width: 700px) {
  .tpl {
    display: flex;
    flex-direction: column;
  }
  .tpl-head {
    display: contents;
  }
  .tpl-head h1 { order: 1; }
  .tpl-head .btn { order: 2; align-self: flex-start; }
  .tpl-head .note { order: 3; }
  .tpl-img { order: 4; margin-block: 8px 20px; }
  .tpl-head .lead { order: 5; }
  .tpl-head .best { order: 6; }
  .tpl-text { order: 7; }
}
