/* Asaan Tools - scoped styles (.st-* = tools, .at-* = homepage and cards).
   Brand colours: change --at-brand / --at-brand-2 below to restyle the whole site. */
.st-wrap, .at-home, .at-standalone {
  --at-brand: #0e7c66;
  --at-brand-2: #12a37f;
  --at-brand-dark: #0a5c4c;
  --at-ink: #14213d;
  --at-muted: #5b6475;
  --at-line: #e3e8ef;
  --at-soft: #f5f8fb;
  --at-radius: 14px;
  --at-shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 8px 24px rgba(20, 33, 61, .07);
  --at-shadow-hover: 0 2px 4px rgba(20, 33, 61, .08), 0 16px 36px rgba(20, 33, 61, .12);
  font-size: 16px;
  line-height: 1.5;
  color: var(--at-ink);
}
.st-wrap *, .at-home *, .at-standalone * { box-sizing: border-box; }

/* Per-tool colours: --c = icon/tint, --c-ink = buttons and text (accessible contrast) */
.at-c-teal   { --c: #14b8a6; --c-ink: #0f766e; --c-soft: #e6f7f5; }
.at-c-violet { --c: #8b5cf6; --c-ink: #6d28d9; --c-soft: #f1ecfe; }
.at-c-amber  { --c: #f59e0b; --c-ink: #b45309; --c-soft: #fef5e4; }
.at-c-green  { --c: #22c55e; --c-ink: #15803d; --c-soft: #e8f8ee; }
.at-c-rose   { --c: #f43f5e; --c-ink: #be123c; --c-soft: #fdecef; }
.at-c-blue   { --c: #3b82f6; --c-ink: #1d4ed8; --c-soft: #eaf1fe; }

.st-ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }

/* ================= Tool shell ================= */
.st-wrap { max-width: 820px; margin: 1.5em auto; }
.st-tool {
  --st-accent: var(--c-ink, var(--at-brand));
  --st-accent-dark: var(--at-ink);
  --st-accent-ink: #fff;
  --st-ink: var(--at-ink);
  --st-muted: var(--at-muted);
  --st-line: var(--at-line);
  --st-soft: var(--c-soft, var(--at-soft));
  --st-error: #b42318;
  --st-radius: 10px;
  background: #fff;
  border: 1px solid var(--at-line);
  border-radius: 18px;
  box-shadow: var(--at-shadow);
  overflow: hidden;
}
.st-band {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px 16px;
  align-items: center;
  padding: 20px 22px;
  background:
    radial-gradient(circle at 100% 0, rgba(255,255,255,.55), transparent 45%),
    linear-gradient(135deg, var(--c-soft), #fff 80%);
  border-bottom: 1px solid var(--at-line);
}
.st-band-ico {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
  background: var(--c); color: #fff; font-size: 26px; box-shadow: 0 6px 16px color-mix(in srgb, var(--c) 35%, transparent);
}
.st-band-text { min-width: 0; }
.st-tool .st-title { margin: 0 !important; font-size: 1.35em !important; line-height: 1.25 !important; color: var(--at-ink) !important; }
.st-urdu { margin: 2px 0 0 !important; color: var(--c-ink) !important; font-size: 1.05em; font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif; text-align: left; }
.st-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0 !important; padding: 0 !important; list-style: none !important; }
.st-badges li { display: inline-flex; align-items: center; gap: 5px; margin: 0 !important; padding: 3px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--at-line); font-size: .8em; font-weight: 600; color: var(--at-muted); }
.st-badges .st-ico { color: var(--c-ink); }
.st-steps { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 0 !important; padding: 0 !important; list-style: none !important; counter-reset: none; }
.st-steps li { display: inline-flex; align-items: center; gap: 8px; margin: 0 !important; padding: 6px 12px 6px 6px; border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgba(20,33,61,.08); font-size: .88em; font-weight: 600; }
.st-steps li span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--c-ink); color: #fff; font-size: .82em; }
@media (min-width: 720px) {
  .st-band { grid-template-columns: auto 1fr auto; }
  .st-steps { grid-column: auto; flex-direction: column; gap: 6px; }
}
.st-inner { padding: 22px; }
.st-privacy { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 18px 0 0 !important; color: var(--at-muted); font-size: .85em; text-align: center; }

/* ================= Tool controls ================= */
.st-tool *, .st-tool *::before, .st-tool *::after { box-sizing: border-box; }
.st-grid { display: grid; gap: 14px; }
.st-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.st-row[hidden], .st-tool [hidden] { display: none !important; }
.st-field { display: grid; gap: 4px; margin: 0; align-content: start; grid-template-rows: auto auto auto; }
.st-label { display: block; font-weight: 600; font-size: .92em; line-height: 1.3; min-height: 1.3em; }
.st-hint { color: var(--st-muted); font-size: .85em; margin: 0; }
.st-tool .st-input {
  width: 100%; height: 46px; min-height: 46px; padding: 8px 12px !important; margin: 0 !important; font: inherit; color: inherit;
  border: 1px solid var(--st-line) !important; border-radius: var(--st-radius) !important; background: #fff !important; box-shadow: none !important;
  transition: border-color .15s, box-shadow .15s;
}
.st-tool .st-input:focus { outline: none; border-color: var(--st-accent) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--st-accent) 20%, transparent) !important; }
.st-tool .st-btn:focus-visible, .st-tool .st-chip:focus-visible, .st-drop:focus-within { outline: 2px solid var(--st-accent); outline-offset: 2px; }
.st-note { margin: 0; padding: 10px 12px; background: var(--st-soft); border-radius: var(--st-radius); font-size: .92em; }
.st-drop {
  position: relative; display: grid; gap: 6px; justify-items: center; text-align: center; cursor: pointer;
  padding: 26px 16px; border: 2px dashed color-mix(in srgb, var(--st-accent) 35%, var(--st-line)); border-radius: 14px; background: var(--st-soft);
  transition: border-color .15s, transform .15s;
}
.st-drop::before { content: ""; width: 44px; height: 44px; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4M7 9l5-5 5 5M5 20h14'/%3E%3C/svg%3E") center / 22px no-repeat; box-shadow: 0 2px 6px rgba(20,33,61,.1); }
.st-drop:hover { border-color: var(--st-accent); transform: translateY(-1px); }
.st-drop span { color: var(--st-muted); font-size: .9em; }
.st-file { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.st-error { color: var(--st-error); margin: 0; }
.st-error:empty { display: none; }
.st-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.st-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.st-check { display: flex; gap: 8px; align-items: center; font-size: .95em; }
.st-editor { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .st-editor { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.st-editor-controls { display: grid; gap: 12px; }
.st-canvas-wrap { display: flex; justify-content: center; padding: 12px; background: repeating-conic-gradient(#eef1f5 0 25%, #fff 0 50%) 0 0 / 16px 16px; border-radius: var(--st-radius); }
.st-canvas { display: block; max-width: 100%; max-height: 420px; width: auto; height: auto; touch-action: none; cursor: grab; box-shadow: 0 0 0 1px var(--st-line); background: #fff; }
.st-canvas:active { cursor: grabbing; }
.st-canvas-small { cursor: default; max-height: 260px; }
.st-output { display: grid; gap: 12px; }
.st-output:not(:empty) { animation: at-rise .35s ease both; }
.st-result-line { margin: 0; font-weight: 600; }
.st-big { display: grid; gap: 2px; padding: 16px 18px; border-radius: 14px; background: linear-gradient(135deg, var(--c-soft, var(--at-soft)), #fff); border: 1px solid color-mix(in srgb, var(--st-accent) 25%, var(--st-line)); }
.st-big-label { color: var(--st-muted); font-size: .9em; }
.st-big-value { font-size: 1.9em; font-weight: 800; line-height: 1.15; color: var(--st-accent); }
.st-table { width: 100%; border-collapse: collapse; font-size: .95em; margin: 0 !important; border: 0 !important; }
.st-table th, .st-table td { text-align: left; padding: 9px 10px !important; border: 0 !important; border-bottom: 1px solid var(--st-line) !important; vertical-align: top; background: none !important; }
.st-table th { font-weight: 600; width: 45%; }
.st-details summary { cursor: pointer; font-weight: 600; margin-top: 6px; }
@keyframes at-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Buttons and chips (forced, so the theme's hover colours can't hide the text) */
.st-tool .st-btn, .st-tool a.st-btn, .st-tool .st-btn:visited, .at-home .at-btn, .at-home .at-btn:visited {
  display: inline-flex !important; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 10px 20px !important;
  font: inherit; font-weight: 700 !important; line-height: 1.2 !important; text-decoration: none !important; cursor: pointer;
  background: var(--st-accent, var(--at-brand)) !important; color: #fff !important; border: 1px solid var(--st-accent, var(--at-brand)) !important;
  border-radius: 12px !important; box-shadow: 0 4px 12px color-mix(in srgb, var(--st-accent, var(--at-brand)) 30%, transparent) !important;
  transition: transform .12s, box-shadow .12s, background .12s;
}
.st-tool .st-btn:hover, .st-tool .st-btn:focus-visible, .st-tool .st-btn:active, .at-home .at-btn:hover, .at-home .at-btn:focus-visible {
  background: var(--at-ink) !important; border-color: var(--at-ink) !important; color: #fff !important; text-decoration: none !important; transform: translateY(-1px);
}
.st-tool .st-btn-quiet, .st-tool a.st-btn-quiet, .st-tool .st-btn-quiet:visited { background: #fff !important; color: var(--st-accent) !important; box-shadow: none !important; }
.st-tool .st-btn-quiet:hover, .st-tool .st-btn-quiet:focus-visible, .st-tool .st-btn-quiet:active { background: var(--st-soft) !important; color: var(--at-ink) !important; border-color: var(--st-accent) !important; }
.st-tool .st-btn:disabled, .st-tool .st-btn:disabled:hover { background: var(--st-accent) !important; border-color: var(--st-accent) !important; color: #fff !important; opacity: .45; transform: none; box-shadow: none !important; cursor: default; }
.st-tool .st-chip, .st-tool .st-chip:focus { font: inherit; font-size: .85em !important; padding: 7px 13px !important; border-radius: 999px !important; background: #fff !important; color: var(--at-ink) !important; border: 1px solid var(--st-line) !important; text-decoration: none !important; box-shadow: none !important; cursor: pointer; line-height: 1.2 !important; }
.st-tool .st-chip:hover { background: var(--st-soft) !important; color: var(--st-accent) !important; border-color: var(--st-accent) !important; }
.st-tool .st-details summary, .st-tool .st-details summary:hover { color: var(--st-accent) !important; background: none !important; }
.st-tool .st-check input { margin: 0 !important; height: auto !important; padding: 0 !important; width: auto !important; accent-color: var(--st-accent); }
.st-tool .st-range { width: 100%; accent-color: var(--st-accent); height: auto !important; padding: 0 !important; margin: 0 !important; border: 0 !important; }

/* ================= Cards (homepage, grid, related) ================= */
.at-grid { display: grid; gap: 16px; }
.at-grid-2 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.at-grid-3 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.at-standalone { max-width: 1100px; margin: 1.5em auto; }
.at-card, a.at-card, a.at-card:visited {
  position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--at-radius);
  background: #fff; border: 1px solid var(--at-line); box-shadow: var(--at-shadow); color: var(--at-ink) !important; text-decoration: none !important;
  transition: transform .18s, box-shadow .18s, border-color .18s; overflow: hidden;
}
.at-card::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c); opacity: .9; }
a.at-card:hover, a.at-card:focus { transform: translateY(-3px); box-shadow: var(--at-shadow-hover); border-color: color-mix(in srgb, var(--c) 45%, var(--at-line)); color: var(--at-ink) !important; background: #fff !important; }
.at-card[hidden] { display: none !important; }
.at-card-ico { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 13px; background: var(--c-soft); color: var(--c-ink); font-size: 24px; transition: transform .18s; }
a.at-card:hover .at-card-ico { transform: rotate(-6deg) scale(1.06); }
.at-card-body { display: grid; gap: 3px; min-width: 0; }
.at-card-cat { font-size: .72em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c-ink); }
.at-card-title { font-weight: 700; font-size: 1.06em; line-height: 1.3; }
.at-card-urdu { color: var(--at-muted); font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif; text-align: left; }
.at-card-desc { color: var(--at-muted); font-size: .9em; }
.at-card-go { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-weight: 700; font-size: .9em; color: var(--c-ink); }
a.at-card:hover .at-card-go .st-ico { transform: translateX(3px); }
.at-card-go .st-ico { transition: transform .18s; }
.at-soon { background: repeating-linear-gradient(135deg, #fff 0 12px, var(--at-soft) 12px 24px); box-shadow: none; }
.at-soon .at-card-ico { filter: grayscale(.3); }
.at-soon .at-card-cat { color: var(--at-muted); }
.at-soon .at-card-cat::before { content: "\2022  "; color: var(--c); }

.at-related { margin-top: 28px; }
.st-wrap .at-h3, .at-home .at-h3 { margin: 0 0 12px !important; font-size: 1.15em !important; color: var(--at-ink) !important; }
.at-related .at-card { padding: 14px; }
.at-related .at-card-ico { width: 40px; height: 40px; font-size: 20px; }
.at-related .at-card-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ================= Homepage ================= */
.at-home { max-width: 1140px; margin: 0 auto; }
.at-hero {
  position: relative; overflow: hidden; margin: 8px 0 34px; padding: 54px 24px 46px; border-radius: 26px; color: #fff; text-align: center;
  background:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,.16) 0 70px, transparent 71px),
    radial-gradient(circle at 88% 82%, rgba(255,255,255,.10) 0 120px, transparent 121px),
    radial-gradient(circle at 80% 10%, rgba(250, 204, 21, .35), transparent 40%),
    linear-gradient(135deg, var(--at-brand-dark), var(--at-brand) 45%, var(--at-brand-2));
}
.at-hero-in { position: relative; max-width: 720px; margin: 0 auto; }
.at-kicker { display: inline-block; margin: 0 0 14px !important; padding: 5px 14px; border-radius: 999px; background: rgba(255,255,255,.16); font-size: .85em; font-weight: 600; letter-spacing: .02em; }
.at-home .at-hero-title { margin: 0 !important; color: #fff !important; font-size: clamp(2.2em, 6vw, 3.6em) !important; line-height: 1.05 !important; font-weight: 800 !important; letter-spacing: -.02em; }
.at-hero-title span { background: linear-gradient(90deg, #fde68a, #fbbf24); -webkit-background-clip: text; background-clip: text; color: transparent; }
.at-hero-urdu { margin: 6px 0 0 !important; font-size: 1.5em; font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif; opacity: .92; text-align: center; }
.at-hero-sub { margin: 14px auto 22px !important; max-width: 560px; font-size: 1.08em; color: rgba(255,255,255,.9); }
.at-search { display: flex; align-items: center; gap: 10px; max-width: 580px; margin: 0 auto; padding: 6px 8px 6px 18px; border-radius: 16px; background: #fff; color: var(--at-muted); box-shadow: 0 12px 30px rgba(0,0,0,.18); }
.at-search .st-ico { font-size: 20px; }
.at-home .at-search input { flex: 1; min-width: 0; height: 50px; margin: 0 !important; padding: 0 !important; border: 0 !important; outline: none; box-shadow: none !important; background: transparent !important; font: inherit; font-size: 1.02em; color: var(--at-ink); }
.at-quick { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.at-home .at-quick a, .at-home .at-quick a:visited { padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); color: #fff !important; font-size: .85em; font-weight: 600; text-decoration: none !important; transition: background .15s; }
.at-home .at-quick a:hover { background: rgba(255,255,255,.28); color: #fff !important; }
.at-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin: 22px 0 0 !important; padding: 0 !important; list-style: none !important; font-size: .9em; color: rgba(255,255,255,.92); }
.at-trust li { display: inline-flex; align-items: center; gap: 7px; margin: 0 !important; }

.at-section { margin: 0 0 40px; }
.at-section-head { margin-bottom: 16px; }
.at-home .at-h2 { margin: 0 !important; font-size: 1.55em !important; color: var(--at-ink) !important; letter-spacing: -.01em; }
.at-section-head p { margin: 4px 0 0 !important; color: var(--at-muted); }
.at-empty { margin: 14px 0 0 !important; padding: 14px 16px; border-radius: 12px; background: var(--at-soft); color: var(--at-muted); }
.at-empty[hidden] { display: none !important; }

.at-how-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 0 !important; padding: 0 !important; list-style: none !important; }
.at-how-steps li { position: relative; display: grid; gap: 4px; margin: 0 !important; padding: 20px 18px 18px; border-radius: var(--at-radius); background: var(--at-soft); }
.at-how-steps li span { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 6px; border-radius: 11px; background: var(--at-brand); color: #fff; font-weight: 800; }
.at-how-steps strong { font-size: 1.05em; }
.at-how-steps em, .at-why-grid em { font-style: normal; color: var(--at-muted); font-size: .92em; }

.at-guide, a.at-guide:visited { display: grid; gap: 6px; border-radius: var(--at-radius); background: #fff; border: 1px solid var(--at-line); box-shadow: var(--at-shadow); overflow: hidden; color: var(--at-ink) !important; text-decoration: none !important; transition: transform .18s, box-shadow .18s; padding-bottom: 16px; }
.at-guide:hover { transform: translateY(-3px); box-shadow: var(--at-shadow-hover); color: var(--at-ink) !important; }
.at-guide-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.at-guide-ph { display: grid; place-items: center; background: linear-gradient(135deg, var(--at-soft), #e8f4f1); color: var(--at-brand); font-size: 34px; }
.at-guide-title { padding: 6px 16px 0; font-weight: 700; line-height: 1.3; }
.at-guide-ex { padding: 0 16px; color: var(--at-muted); font-size: .9em; }

.at-why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.at-why-grid > div { display: grid; gap: 4px; padding: 18px; border-radius: var(--at-radius); border: 1px solid var(--at-line); }
.at-why-grid .st-ico { font-size: 26px; color: var(--at-brand); margin-bottom: 4px; }
.at-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding: 18px 20px; border-radius: var(--at-radius); background: var(--at-ink); color: #fff; }
.at-cta p { margin: 0 !important; }
.at-home .at-cta .at-btn { --st-accent: #1877f2; }

@media (max-width: 600px) {
  .at-hero { padding: 40px 16px 34px; border-radius: 20px; }
  .st-inner { padding: 16px; }
  .st-band { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .at-card, .st-drop, .st-btn, .at-guide, .at-card-ico { transition: none !important; }
  .st-output:not(:empty) { animation: none; }
}
@media print {
  .st-tool .st-actions, .st-tool .st-btn, .at-related, .st-band { display: none !important; }
  .st-tool { border: 0; box-shadow: none; }
}

.st-tool .st-btn:focus:not(:focus-visible):not(:hover) { background: var(--st-accent) !important; border-color: var(--st-accent) !important; }
.st-tool .st-btn-quiet:focus:not(:focus-visible):not(:hover) { background: #fff !important; }
.at-guide-ph { aspect-ratio: 21 / 9; }
