/* Shared styles of the static corax.ir pages (index.html, guide/index.html).
   Served by Caddy (infra/Caddyfile: corax.ir), no build step. */
/* The dashboard's own Vazirmatn (fonts/, OFL), the dashboard studio palette
   as plain values (apps/dashboard/app/studio.css --cs-*). Every link goes
   somewhere real. */
  @font-face {
    font-family: "Vazirmatn";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("/fonts/vazirmatn-arabic-wght-normal.woff2") format("woff2-variations");
    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-display: swap;
    font-weight: 100 900;
    src: url("/fonts/vazirmatn-latin-wght-normal.woff2") format("woff2-variations");
    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;
  }

  :root {
    --bg: #f0f1f4;
    --surface: #ffffff;
    --inset: #f7f8fa;
    --ink: #24262d;
    --muted: #6b7180;
    --line: #e3e6ec;
    --dark: #282a30;
    --on-dark: #f0f1f4;
    --on-dark-muted: #b9bfcb;
    --green: #3f5e44;
    --sage: #e9eee5;
    --accent: #de806d;
    --brand: #8b1e1e;
    --mark: #0e0e0f;
    --focus: #4476be;
    --shadow: 0 18px 48px rgba(36, 48, 71, 0.08);
    color-scheme: light;
  }
  @media (prefers-color-scheme: dark) {
    :root {
      --bg: #17191e;
      --surface: #22252c;
      --inset: #292d35;
      --ink: #f0f1f4;
      --muted: #a5adbb;
      --line: #343944;
      --dark: #0f1114;
      --green: #c0d4b3;
      --sage: #2e3c32;
      --accent: #eea08d;
      --mark: #f0f1f4;
      --focus: #a6caff;
      --shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
      color-scheme: dark;
    }
  }

  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Vazirmatn", Tahoma, sans-serif;
    font-size: 16px;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
  }
  a { color: inherit; }
  a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 12px; }
  .wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

  /* header */
  .top { padding: 20px 0; }
  .top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
  .brand svg { width: 34px; height: 36px; }
  .brand b { font-size: 20px; font-weight: 800; letter-spacing: 1.5px; font-family: "Vazirmatn", sans-serif; }
  .brand small { display: block; font-size: 11px; color: var(--muted); letter-spacing: 0; font-weight: 500; margin-top: -4px; }

  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px; padding: 0 22px; border-radius: 999px;
    font: 700 15px/1 "Vazirmatn", sans-serif; text-decoration: none;
    border: 1px solid transparent; transition: transform .15s ease, background .15s ease;
  }
  .btn:hover { transform: translateY(-1px); }
  @media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover { transform: none; } }
  .btn-dark { background: var(--dark); color: var(--on-dark); }
  .btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
  .btn-ghost:hover { background: var(--surface); }
  .btn svg { width: 18px; height: 18px; }

  /* hero */
  .hero { padding: 36px 0 72px; }
  .hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
  .badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px; border-radius: 999px; background: var(--sage); color: var(--green);
    font-size: 13px; font-weight: 700;
  }
  .badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
  h1 { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.35; font-weight: 800; margin: 18px 0 16px; letter-spacing: -0.5px; }
  h1 em { font-style: normal; color: var(--brand); }
  @media (prefers-color-scheme: dark) { h1 em { color: var(--accent); } }
  .lead { font-size: 18px; color: var(--muted); margin: 0 0 28px; max-width: 34em; }
  .cta { display: flex; flex-wrap: wrap; gap: 12px; }
  .hint { margin: 18px 0 0; font-size: 13px; color: var(--muted); }

  /* product mock (decorative) */
  .mock {
    background: var(--dark); color: var(--on-dark); border-radius: 28px; padding: 22px;
    box-shadow: var(--shadow); position: relative; overflow: hidden;
  }
  .mock::before {
    content: ""; position: absolute; inset: auto -20% -40% auto; width: 70%; aspect-ratio: 1;
    background: radial-gradient(circle, rgba(131, 155, 96, 0.28), transparent 65%); pointer-events: none;
  }
  .mock-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; font-size: 13px; color: var(--on-dark-muted); }
  .mock-head b { color: var(--on-dark); font-size: 15px; letter-spacing: 1px; }
  .dot { width: 8px; height: 8px; border-radius: 50%; background: #8fbf7a; display: inline-block; margin-inline-start: 6px; }
  .bubble {
    margin-inline-start: auto; width: fit-content; max-width: 85%;
    background: #3a3d45; padding: 10px 14px; border-radius: 16px 16px 4px 16px; font-size: 14px;
  }
  .card {
    margin-top: 14px; background: #33363e; border: 1px solid #454953; border-radius: 18px; padding: 16px;
  }
  .card-title { font-size: 13px; color: var(--on-dark-muted); margin-bottom: 10px; }
  .row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 8px 0; border-top: 1px solid #454953; }
  .row:first-of-type { border-top: 0; }
  .row s { color: var(--on-dark-muted); }
  .row strong { color: #c0d4b3; }
  .mock-actions { display: flex; gap: 8px; margin-top: 12px; }
  .chip { padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; }
  .chip-ok { background: #c0d4b3; color: #1f2a20; }
  .chip-no { border: 1px solid #5a5e68; color: var(--on-dark-muted); }
  .mock-foot { margin-top: 12px; font-size: 12px; color: var(--on-dark-muted); }

  /* sections */
  section.block { padding: 72px 0; }
  .eyebrow { font-size: 13px; font-weight: 700; color: var(--green); letter-spacing: .5px; }
  h2 { font-size: clamp(26px, 3.2vw, 36px); line-height: 1.4; margin: 8px 0 12px; font-weight: 800; }
  .sub { color: var(--muted); margin: 0 0 36px; max-width: 40em; }
  .grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .feature {
    background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 26px;
    box-shadow: 0 1px 0 rgba(0,0,0,0.02);
  }
  .feature .ic {
    width: 46px; height: 46px; border-radius: 14px; background: var(--sage); color: var(--green);
    display: grid; place-items: center; margin-bottom: 16px;
  }
  .feature .ic svg { width: 22px; height: 22px; }
  .feature h3 { margin: 0 0 6px; font-size: 17px; font-weight: 800; }
  .feature p { margin: 0; color: var(--muted); font-size: 14.5px; }

  .steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: step; }
  .step { position: relative; padding: 26px; border-radius: 22px; background: var(--inset); border: 1px solid var(--line); }
  .step::before {
    counter-increment: step; content: counter(step, persian);
    display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
    background: var(--dark); color: var(--on-dark); font-weight: 800; margin-bottom: 14px;
  }
  @media (prefers-color-scheme: dark) { .step::before { background: var(--green); color: #1f2a20; } }
  .step h3 { margin: 0 0 6px; font-size: 16px; font-weight: 800; }
  .step p { margin: 0; color: var(--muted); font-size: 14.5px; }

  .band {
    background: var(--dark); color: var(--on-dark); border-radius: 28px; padding: 40px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  }
  .band h2 { margin: 0 0 4px; font-size: clamp(22px, 2.6vw, 28px); }
  .band p { margin: 0; color: var(--on-dark-muted); }
  .band .btn-light { background: var(--on-dark); color: #24262d; }

  .top-actions { display: flex; gap: 8px; align-items: center; }
  .hint a { color: var(--ink); font-weight: 700; }
  .contacts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .contact {
    display: flex; align-items: center; gap: 14px; padding: 22px; text-decoration: none;
    background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
    transition: border-color .15s ease, transform .15s ease;
  }
  .contact:hover { border-color: var(--green); transform: translateY(-1px); }
  @media (prefers-reduced-motion: reduce) { .contact { transition: none; } .contact:hover { transform: none; } }
  .contact .ic {
    flex: none; width: 48px; height: 48px; border-radius: 14px; background: var(--sage); color: var(--green);
    display: grid; place-items: center;
  }
  .contact .ic svg { width: 22px; height: 22px; }
  .contact b { display: block; font-size: 15px; }
  .contact bdi { display: block; color: var(--muted); font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
  .foot-links { display: inline-flex; gap: 18px; flex-wrap: wrap; }
  footer { padding: 36px 0 48px; color: var(--muted); font-size: 13px; }
  footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 24px; }
  footer a { text-decoration: none; font-weight: 700; color: var(--ink); }

  @media (max-width: 900px) {
    .contacts { grid-template-columns: 1fr; }
    .hero .wrap { grid-template-columns: 1fr; gap: 36px; }
    .grid, .steps { grid-template-columns: 1fr 1fr; }
  }
  @media (max-width: 600px) {
    .hero { padding: 16px 0 48px; }
    .lead { font-size: 16px; }
    .grid, .steps { grid-template-columns: 1fr; }
    section.block { padding: 48px 0; }
    .band { padding: 28px 22px; }
    .cta .btn { flex: 1 1 auto; }
    .top .btn { padding: 0 14px; min-height: 42px; font-size: 14px; }
    .top .btn svg { display: none; }
    .brand small { display: none; }
  }

/* ── header nav (both pages) ── */
.nb, .btn { white-space: nowrap; }
@media (max-width: 600px) { .top-link.hide-sm { display: none; } }
.top-link { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 700; font-size: 14px; color: var(--muted); padding: 0 10px; border-radius: 12px; }
.top-link:hover, .top-link[aria-current="page"] { color: var(--ink); }

/* ── guide (guide/index.html) ──
   Desktop: sticky contents column + one column of task sections.
   Mobile: contents become a 2-column grid of task tiles above the sections.
   Every section has the same shape: head → «با دستیار» → «از منو» → tip. */
.g-hero { padding: 28px 0 32px; max-width: 760px; }
.g-hero h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.35; margin: 14px 0 10px; font-weight: 800; }
.g-hero .lead { margin-bottom: 22px; }
.g-search { position: relative; }
.g-search input {
  width: 100%; height: 54px; padding: 0 52px 0 18px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 500 16px "Vazirmatn", sans-serif; box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
.g-search input::placeholder { color: var(--muted); }
.g-search input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.g-search svg { position: absolute; right: 18px; top: 50%; translate: 0 -50%; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }

.g-how { background: var(--dark); color: var(--on-dark); border-radius: 24px; padding: 28px; margin-bottom: 40px; }
.g-how h2 { margin: 0 0 4px; font-size: 21px; font-weight: 800; }
.g-how > p { margin: 0 0 20px; color: var(--on-dark-muted); font-size: 15px; }
.g-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.g-steps li { display: flex; flex-direction: column; gap: 6px; background: #33363e; border: 1px solid #454953; border-radius: 16px; padding: 16px; font-size: 14px; color: var(--on-dark-muted); line-height: 1.75; }
.g-steps li b { display: flex; align-items: center; gap: 10px; color: var(--on-dark); font-size: 15px; }
.g-steps li b span { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #c0d4b3; color: #1f2a20; display: grid; place-items: center; font-size: 13px; }

.g-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; align-items: start; padding-bottom: 24px; }
.g-toc { position: sticky; top: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 12px; }
.g-toc h2 { margin: 4px 8px 8px; font-size: 13px; color: var(--muted); font-weight: 700; }
.g-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.g-toc a { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 6px 10px; border-radius: 12px; text-decoration: none; font-size: 14.5px; font-weight: 600; }
.g-toc a:hover { background: var(--inset); }
.g-toc a[aria-current="true"] { background: var(--sage); color: var(--green); }
.g-toc .ic { flex: none; width: 28px; height: 28px; border-radius: 9px; background: var(--inset); color: var(--green); display: grid; place-items: center; }
.g-toc .ic svg { width: 16px; height: 16px; }
.g-toc li[hidden] { display: none; }

.g-tasks { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.g-task { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px; scroll-margin-top: 20px; }
.g-task[hidden] { display: none; }
.g-task:target { border-color: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 18%, transparent); }
.g-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.g-head .ic { flex: none; width: 46px; height: 46px; border-radius: 14px; background: var(--sage); color: var(--green); display: grid; place-items: center; }
.g-head .ic svg { width: 22px; height: 22px; }
.g-head h2 { margin: 0; font-size: 19px; line-height: 1.5; font-weight: 800; }
.g-head p { margin: 0; font-size: 14px; color: var(--muted); }
.g-block + .g-block { margin-top: 18px; }
.g-label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 800; color: var(--green); }
.g-say { display: grid; gap: 8px; }
.g-line {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 8px 8px 16px;
  background: var(--inset); border: 1px solid var(--line); border-radius: 14px;
}
.g-line span { flex: 1; font-weight: 600; font-size: 15px; line-height: 1.7; padding-right: 6px; }
.g-copy {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 72px; height: 36px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 600 13px "Vazirmatn", sans-serif; cursor: pointer;
}
.g-copy svg { width: 15px; height: 15px; }
.g-copy:hover { border-color: var(--green); }
.g-copy:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.g-copy[data-done] { color: var(--green); border-color: var(--green); }
.g-path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.g-path span { background: var(--inset); border: 1px solid var(--line); border-radius: 9px; padding: 3px 12px; font-size: 14px; font-weight: 700; line-height: 1.8; }
.g-path i { font-style: normal; color: var(--muted); font-size: 15px; }
.g-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: g; }
.g-list li { position: relative; padding-right: 36px; font-size: 15px; line-height: 1.85; }
.g-list li::before {
  counter-increment: g; content: counter(g, persian);
  position: absolute; right: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--inset); border: 1px solid var(--line); color: var(--ink);
  display: grid; place-items: center; font-size: 12.5px; font-weight: 800; line-height: 1;
}
.g-list.dots li::before { content: ""; width: 8px; height: 8px; top: 11px; right: 8px; background: var(--green); border: 0; }
.g-sub { margin: 0 0 8px; font-size: 14.5px; font-weight: 800; }
.g-block > * + .g-sub { margin-top: 18px; }
/* A menu path and the line(s) under it read as one unit; the next path starts a new one. */
.g-list + .g-path, .g-list + .g-list { margin-top: 16px; }
.g-path + .g-list.dots li { padding-right: 22px; }
.g-tip { margin: 18px 0 0; padding: 12px 16px; border-radius: 14px; background: var(--sage); color: var(--ink); font-size: 14px; line-height: 1.85; }
.g-none { display: none; text-align: center; padding: 28px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 22px; }
.g-help { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 24px 0 8px; padding: 24px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); scroll-margin-top: 20px; }
.g-help p { margin: 0; line-height: 1.9; }
.g-help .cta { flex-wrap: wrap; }

@media (max-width: 960px) {
  .g-layout { grid-template-columns: 1fr; gap: 20px; }
  .g-toc { position: static; padding: 14px; }
  .g-toc ol { grid-template-columns: 1fr 1fr; gap: 8px; }
  .g-toc a { background: var(--inset); min-height: 48px; font-size: 14px; line-height: 1.5; }
  .g-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .g-hero { padding: 12px 0 24px; }
  .g-how { padding: 22px 18px; margin-bottom: 28px; }
  .g-steps { grid-template-columns: 1fr; }
  .g-task { padding: 18px 16px; border-radius: 20px; }
  .g-head h2 { font-size: 17.5px; }
  .g-line { flex-wrap: wrap; padding: 10px 12px; }
  .g-line span { flex-basis: 100%; padding: 0; }
  .g-copy { margin-inline-start: auto; }
  .g-help { padding: 20px 18px; }
  .g-help .cta, .g-help .cta .btn { width: 100%; }
}
