:root {
  color-scheme: light;
  --ink: #172a2b;
  --muted: #536b68;
  --line: #d5dfd9;
  --paper: #f4f7f4;
  --white: #fff;
  --green: #087f5b;
  --green-dark: #075a43;
  --soft-green: #e4f2ea;
  --brand-forest: #073d34;
  --brand-mint: #cce8b7;
  --red: #b42318;
}

* { box-sizing: border-box; }
html { background: var(--paper); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); font: 400 16px/1.65 IRANSansX, Vazirmatn, Tahoma, sans-serif; }
a { color: inherit; }
button, input { font: inherit; }
button { touch-action: manipulation; }
.skip-link { position: absolute; inset-block-start: 8px; inset-inline-start: 8px; z-index: 10; padding: 10px 16px; color: #fff; background: var(--green-dark); border-radius: 8px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.topbar { width: min(1120px, calc(100% - 48px)); margin: 0 auto; padding: 25px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 650 19px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: -.06em; }
.brand-wordmark { display: block; width: 78px; height: 68px; object-fit: contain; }
.hero-wordmark { display: block; width: 112px; height: 112px; object-fit: contain; margin: 0 0 15px; filter: drop-shadow(0 12px 20px rgba(7,90,67,.12)); }
.showcase-mark { display: block; width: 62px; height: 62px; object-fit: contain; margin: 0 auto 12px; }
.local-badge { display: inline-flex; align-items: center; gap: 9px; min-height: 38px; padding: 5px 13px; color: var(--green-dark); background: var(--soft-green); border-radius: 999px; font-size: 13px; font-weight: 600; }
.topbar-link { min-height: 44px; display: inline-flex; align-items: center; padding: 7px 12px; color: var(--green-dark); border-radius: 8px; font-size: 13px; font-weight: 650; text-decoration: none; }
.topbar-link:hover { background: var(--soft-green); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.layout { width: min(1120px, calc(100% - 48px)); min-height: calc(100dvh - 150px); margin: 0 auto; padding: clamp(36px, 6vw, 76px) 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 470px); align-items: center; gap: clamp(42px, 8vw, 116px); }
.intro { max-width: 530px; }
.eyebrow { margin: 0 0 14px; color: var(--green); font-size: 13px; font-weight: 700; letter-spacing: .01em; }
h1, h2, p { margin-block-start: 0; }
h1 { margin-block-end: 22px; font-size: clamp(36px, 5.3vw, 64px); line-height: 1.22; letter-spacing: -.04em; font-weight: 700; }
h1 span { color: var(--green); }
.lead { max-width: 52ch; color: var(--muted); font-size: 17px; line-height: 1.9; }
.features { display: grid; gap: 14px; padding: 0; margin: 34px 0; list-style: none; }
.features li { display: flex; align-items: flex-start; gap: 13px; color: #314746; }
.feature-icon { flex: 0 0 29px; height: 29px; display: grid; place-items: center; border: 1px solid #abcdbb; border-radius: 9px; color: var(--green); font: 600 11px/1 ui-monospace, monospace; }
code { direction: ltr; display: inline-block; color: var(--green-dark); font: 500 .92em/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.dev-note { display: flex; align-items: flex-start; gap: 13px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.55); }
.note-icon { flex: 0 0 22px; color: var(--green); }
.note-icon svg { display: block; width: 22px; height: 22px; }
.dev-note strong { display: block; margin: 0 0 2px; font-size: 14px; }
.dev-note p { margin: 0; color: var(--muted); font-size: 13px; }
.demo-card { padding: clamp(22px, 3vw, 34px); background: var(--white); border: 1px solid #e0e8e2; border-radius: 18px; box-shadow: 0 12px 32px rgba(23,42,43,.06); }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.card-heading .eyebrow { margin-bottom: 5px; }
h2 { margin-bottom: 0; font-size: 23px; line-height: 1.4; letter-spacing: -.02em; }
.step-count { margin-top: 6px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); font: 600 13px/1.6 ui-monospace, monospace; }
.step-count span { color: #8a9a93; }
.card-copy { margin: 13px 0 23px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.field { margin-bottom: 17px; }
.field label { display: block; margin-bottom: 7px; color: #293e3c; font-size: 14px; font-weight: 600; }
.field input { width: 100%; min-height: 49px; padding: 10px 13px; color: var(--ink); background: #fff; border: 1px solid #b9cbc2; border-radius: 9px; outline: none; transition: border-color 160ms ease, box-shadow 160ms ease; }
.field input::placeholder { color: #879892; }
.field input:focus-visible { border-color: var(--green); box-shadow: 0 0 0 3px rgba(8,127,91,.17); }
.widget-frame { min-height: 82px; margin: 4px 0 17px; padding: 13px 14px; border: 1px solid #d4e2da; border-radius: 10px; background: #f8fbf9; }
.submit-button { width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; color: #fff; background: var(--green-dark); border: 1px solid var(--green-dark); border-radius: 10px; font-weight: 650; cursor: pointer; touch-action: manipulation; transition: background 180ms ease, border-color 180ms ease; }
.submit-button svg { width: 21px; height: 21px; transform: rotate(180deg); }
.submit-button:hover:not(:disabled) { background: #064a38; border-color: #064a38; }
.submit-button:active:not(:disabled) { background: #033d2d; }
.submit-button:disabled { opacity: .62; cursor: progress; }
.submit-button:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.form-result { min-height: 1.6em; margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.form-result[data-state="success"] { color: var(--green-dark); }
.form-result[data-state="error"] { color: var(--red); }
.privacy-note { display: flex; align-items: flex-start; gap: 8px; padding-top: 14px; margin-top: 16px; border-top: 1px solid #e7ede9; color: #647773; font-size: 12px; }
.privacy-note svg { flex: 0 0 17px; width: 17px; height: 17px; margin-top: 3px; }
.footer { width: min(1120px, calc(100% - 48px)); margin: 0 auto; padding: 18px 0 24px; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: #70827d; font-size: 12px; }
.footer code { color: #536b68; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.showcase { width: min(1120px, calc(100% - 48px)); margin: 0 auto; padding: 48px 0 76px; border-top: 1px solid var(--line); }
.showcase-heading { max-width: 680px; margin: 0 auto 22px; text-align: center; }
.showcase-heading .eyebrow { margin-bottom: 7px; }
.showcase-heading h2 { margin-bottom: 10px; font-size: clamp(26px, 3.6vw, 36px); }
.showcase-heading > p:last-child { margin: 0; color: var(--muted); }
.showcase-notice { display: flex; align-items: center; gap: 12px; max-width: 820px; padding: 14px 18px; margin: 0 auto 24px; border: 1px solid #eadab3; border-radius: 11px; background: #fff9eb; color: #634d1d; font-size: 13px; }
.showcase-notice strong { flex: 0 0 auto; }
.showcase-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sample-card { min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.82); }
.sample-card-live { background: #f7fbf8; border-color: #b9d8c5; }
.sample-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.sample-icon { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #abcdbb; border-radius: 9px; color: var(--green); font: 650 11px/1 ui-monospace, monospace; }
.sample-badge { display: inline-flex; align-items: center; min-height: 29px; padding: 4px 9px; border-radius: 999px; background: #eef2ef; color: #475951; font-size: 12px; font-weight: 650; }
.sample-badge-live { color: var(--green-dark); background: var(--soft-green); }
.sample-card h3 { margin: 0 0 8px; font-size: 18px; line-height: 1.5; }
.sample-card > p:not(.sample-status) { min-height: 3.4em; margin: 0 0 16px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.sample-action, .small-action { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px; border: 1px solid #abcdbb; border-radius: 8px; color: var(--green-dark); background: #fff; font-size: 13px; font-weight: 650; text-decoration: none; cursor: pointer; touch-action: manipulation; }
.sample-action:hover, .small-action:hover { background: var(--soft-green); }
.image-samples { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.image-tile { min-width: 0; min-height: 60px; display: grid; place-items: center; padding: 5px; border: 1px solid #cbd8d0; border-radius: 8px; background: #f9fbf9; cursor: pointer; touch-action: manipulation; }
.image-tile svg { width: 100%; max-width: 64px; height: 44px; }
.image-tile[aria-pressed="true"] { border: 2px solid var(--green); background: var(--soft-green); box-shadow: inset 0 0 0 2px #fff; }
.sample-status { min-height: 2.8em; margin: 12px 0 0; color: #566b62; font-size: 12px; line-height: 1.7; }
.text-preview { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; }
.math-question { min-height: 46px; display: flex; align-items: center; padding-inline: 12px; border: 1px dashed #abcdbb; border-radius: 8px; color: var(--green-dark); background: #f7fbf8; font: 650 19px/1.2 ui-monospace, monospace; }
.text-preview input { width: 76px; min-height: 44px; padding: 8px; border: 1px solid #b9cbc2; border-radius: 8px; }
.slider-label { display: block; margin-bottom: 5px; color: #293e3c; font-size: 13px; font-weight: 600; }
.sample-range { width: 100%; min-height: 44px; accent-color: var(--green); cursor: pointer; }
.slider-math-preview { display: grid; gap: 7px; }
.slider-math-preview .math-question { justify-content: center; }
.jigsaw-scene { position: relative; height: 132px; overflow: hidden; margin: 4px 0 12px; border: 1px solid #b9cbc2; border-radius: 10px; background: #eaf1e8; }
.jigsaw-landscape { position: absolute; inset: 0; width: 100%; height: 100%; }
.jigsaw-target { position: absolute; top: 50%; left: 72%; width: 42px; height: 42px; border: 2px dashed #fff; border-radius: 11px; background: rgba(23,42,43,.18); transform: translate(-50%, -50%); box-shadow: 0 0 0 1px rgba(23,42,43,.2); }
.jigsaw-piece { position: absolute; top: 50%; left: var(--piece-position, 19.6%); width: 48px; height: 48px; padding: 0; border: 0; border-radius: 10px; background: transparent; transform: translate(-50%, -50%); filter: drop-shadow(0 2px 3px rgba(23,42,43,.25)); cursor: grab; touch-action: none; user-select: none; transition: left 80ms linear; }
.jigsaw-piece.is-dragging { cursor: grabbing; transition: none; }
.jigsaw-piece svg { display: block; width: 100%; height: 100%; }
.match-grid { width: min(100%, 220px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-inline: auto; }
.match-cell { aspect-ratio: 1; min-width: 44px; display: grid; place-items: center; border: 1px solid #d5dfd9; border-radius: 9px; background: #f7faf7; font-size: 27px; cursor: pointer; touch-action: manipulation; transition: transform 120ms ease, background 120ms ease, border-color 120ms ease; }
.match-cell:hover { transform: translateY(-1px); }
.match-cell[aria-pressed="true"] { border: 2px solid var(--green); background: var(--soft-green); box-shadow: inset 0 0 0 2px #fff; }
.match-circle { color: #397da0; }.match-diamond { color: var(--green); }.match-star { color: #c18a24; }.match-triangle { color: #c5683b; }
.checkbox-preview { min-height: 48px; display: flex; align-items: center; gap: 11px; padding: 8px 12px; border: 1px solid #cbd8d0; border-radius: 8px; background: #f9fbf9; cursor: pointer; }
.checkbox-preview input { width: 22px; height: 22px; accent-color: var(--green); }
.audio-preview { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.audio-bars { height: 34px; display: flex; align-items: center; gap: 4px; }
.audio-bars i { width: 4px; height: 12px; border-radius: 4px; background: #79a98e; }
.audio-bars i:nth-child(2n) { height: 22px; }.audio-bars i:nth-child(3n) { height: 30px; }
.risk-steps { display: flex; gap: 7px; padding: 0; margin: 0; list-style: none; counter-reset: step; }
.risk-steps li { flex: 1; min-height: 52px; display: flex; align-items: center; justify-content: center; padding: 6px; border: 1px solid #cbd8d0; border-radius: 7px; background: #f9fbf9; color: #465b51; font-size: 12px; text-align: center; }
.mock-panel { min-height: 54px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #cbd8d0; border-radius: 9px; background: #f9fbf9; color: #465b51; font-size: 13px; }
.mock-spinner { width: 19px; height: 19px; border: 2px solid #cbd8d0; border-top-color: var(--green); border-radius: 50%; }
.mock-dots { margin-inline-start: auto; color: var(--green); font-size: 22px; letter-spacing: 2px; line-height: 1; }
.mock-checkbox { width: 22px; height: 22px; border: 1px solid #8ca49a; border-radius: 4px; background: #fff; }
.showcase > .showcase-heading h1 { margin: 0 0 10px; font-size: clamp(30px, 4vw, 42px); }

@media (max-width: 800px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 35px; max-width: 580px; }
  .intro { max-width: none; }
  h1 { font-size: clamp(36px, 9vw, 54px); }
  .showcase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .showcase-grid > .sample-card:last-child { grid-column: 1 / -1; max-width: calc((100% - 16px) / 2); justify-self: center; }
}
@media (max-width: 480px) {
  .topbar, .layout, .showcase, .footer { width: calc(100% - 32px); }
  .topbar { padding: 14px 0; flex-wrap: wrap; }
  .local-badge { min-height: 34px; padding-inline: 10px; font-size: 11px; }
  .topbar-link { margin-inline-start: auto; padding-inline: 8px; font-size: 12px; }
  .layout { min-height: auto; padding: 32px 0 38px; gap: 28px; }
  .lead { font-size: 16px; }
  .features { margin: 24px 0; gap: 11px; font-size: 14px; }
  .demo-card { padding: 20px 16px; border-radius: 14px; }
  .showcase { padding: 38px 0 50px; }
  .showcase-heading { text-align: start; }
  .showcase-notice { align-items: flex-start; flex-direction: column; gap: 4px; padding: 12px 14px; }
  .showcase-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .showcase-grid > .sample-card:last-child { grid-column: auto; max-width: none; }
  .sample-card { padding: 18px; }
  .sample-card > p:not(.sample-status) { min-height: 0; }
  .footer { align-items: flex-start; flex-direction: column; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
