/* falakbin.ir/quakes and its pages (QuakePages). Loaded after public.css;
   the magnitude classes a–e are the site's own (the home card and the bot's
   maps use the same five colours), and the map's outline is drawn inline
   from the bot's SVG (QuakeSvg), its strokes kept thin at any zoom. */

/* ---- The map's outline ---------------------------------------------------- */
.flk-qz-land { fill: rgba(147, 184, 182, .07); stroke: rgba(147, 184, 182, .26); stroke-width: 1; vector-effect: non-scaling-stroke; }
.flk-qz-prov { fill: rgba(34, 179, 173, .12); stroke: rgba(63, 202, 195, .5); stroke-width: .9; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.flk-qz-prov:hover { fill: rgba(34, 179, 173, .2); }
.flk-qz-lake { fill: rgba(57, 135, 229, .22); stroke: none; }
.flk-qz-hit { fill: rgba(255, 140, 26, .16); stroke: #ff8c1a; stroke-width: 1.6; vector-effect: non-scaling-stroke; pointer-events: none; }
:root[data-theme="light"] .flk-qz-land { fill: rgba(16, 38, 42, .05); stroke: rgba(16, 38, 42, .2); }
:root[data-theme="light"] .flk-qz-prov { fill: rgba(10, 90, 102, .08); stroke: rgba(10, 90, 102, .42); }
:root[data-theme="light"] .flk-qz-lake { fill: rgba(42, 120, 214, .18); }

/* ---- Dots by magnitude class ----------------------------------------------- */
.flk-qz-dot { stroke: rgba(3, 24, 28, .55); stroke-width: 1; vector-effect: non-scaling-stroke; }
.flk-qz-d-a { fill: #e9c46a; } .flk-qz-d-b { fill: #f4a259; } .flk-qz-d-c { fill: #ff8c1a; } .flk-qz-d-d { fill: #f2542d; } .flk-qz-d-e { fill: #c81d25; }
.flk-qz-old { fill-opacity: .42; }
.flk-qz-before { stroke: #3987e5; stroke-width: 2.4; }
.flk-qz-after { stroke: #e7f5f3; stroke-width: 2.4; }
.flk-qz-self { stroke: #fff; stroke-width: 2; }
.flk-qz-ring { fill: none; stroke: #ff6b5d; stroke-width: 2.5; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; animation: flk-qz-ripple 2.4s ease-out infinite; }
@keyframes flk-qz-ripple { 0% { opacity: 1; transform: scale(.7); } 100% { opacity: 0; transform: scale(2.4); } }
.flk-qz-reach { fill: none; stroke: var(--teal-ink); stroke-width: 1.2; stroke-dasharray: 5 5; vector-effect: non-scaling-stroke; opacity: .7; }
.flk-qz-city { fill: #fff; stroke: var(--teal-deep); stroke-width: 3; vector-effect: non-scaling-stroke; }
:root[data-theme="light"] .flk-qz-city { fill: var(--teal-deep); stroke: #fff; }
.flk-qz-map a:hover .flk-qz-dot { stroke: #fff; stroke-width: 2.4; }

/* ---- Hub head ------------------------------------------------------------- */
.flk-qz-hero { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px 28px; margin: 22px 0 10px; padding: 26px 28px 22px; border-radius: 24px; border: 1px solid var(--line);
    background: radial-gradient(700px 260px at 10% 0%, rgba(242, 84, 45, .14), transparent 70%), radial-gradient(800px 300px at 90% 100%, rgba(34, 179, 173, .14), transparent 70%), linear-gradient(160deg, var(--surface), var(--bg-2)); }
.flk-qz-hero-text { flex: 1 1 420px; min-width: 0; }
.flk-qz-hero h1 { font-size: clamp(1.6rem, 4.2vw, 2.5rem); font-weight: 900; line-height: 1.3; margin: 6px 0 8px; }
.flk-qz-note { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.9; }
.flk-qz-note .flk-i { color: var(--orange-ink); margin-top: .35em; }
.flk-qz-latest { flex: 0 1 360px; display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line-soft); color: var(--fg); text-decoration: none; }
.flk-qz-latest:hover { border-color: var(--orange); color: var(--fg); }
.flk-qz-latest-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.7; }
.flk-qz-latest-text b { font-size: 1.02rem; }
.flk-qz-latest-text small { color: var(--muted); font-size: .78rem; }
.flk-qz-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 18px; }
@media (max-width: 860px) { .flk-qz-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* The magnitude badge. */
.flk-qz-mag { flex: none; display: inline-grid; place-items: center; min-width: 3.1rem; padding: 4px 6px; border-radius: 12px; font-weight: 900; font-size: 1.15rem; color: #1a0d00; font-variant-numeric: tabular-nums; line-height: 1.4; }
.flk-qz-mag-a { background: #e9c46a; } .flk-qz-mag-b { background: #f4a259; } .flk-qz-mag-c { background: #ff8c1a; }
.flk-qz-mag-d { background: #f2542d; color: #fff; } .flk-qz-mag-e { background: #c81d25; color: #fff; }
.flk-qz-mag-sm { min-width: 2.6rem; font-size: .9rem; padding: 2px 4px; border-radius: 8px; }
.flk-qz-mag-xl { min-width: 7rem; min-height: 7rem; border-radius: 26px; font-size: 3rem; box-shadow: 0 18px 50px rgba(242, 84, 45, .25); line-height: 1; }
.flk-qz-mag-xl small { font-size: .78rem; font-weight: 700; opacity: .8; }

/* ---- The explorer ------------------------------------------------------------ */
.flk-qz-explorer { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 16px 18px 12px; box-shadow: var(--shadow); }
.flk-qz-explorer-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 10px; }
.flk-qz-explorer-head h2 { margin: 0; font-size: 1.2rem; font-weight: 900; }
.flk-qz-count { margin: 0; color: var(--teal-ink); font-weight: 700; font-size: .9rem; }
.flk-qz-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 12px; }
.flk-qz-filters[hidden] { display: none; }
.flk-qz-mag-filter { display: flex; align-items: center; gap: 10px; flex: 1 1 220px; max-width: 320px; font-size: .84rem; color: var(--muted); }
.flk-qz-mag-filter span { white-space: nowrap; }
.flk-qz-mag-filter output { color: var(--fg); font-weight: 800; }
.flk-qz-select select { font: inherit; font-size: .88rem; color: var(--fg); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; max-width: 220px; }
.flk-qz-filters .flk-btn { margin-inline-start: auto; }
.flk-qz-stage { position: relative; width: 100%; max-width: 860px; margin: 0 auto; aspect-ratio: 865 / 800; border-radius: 16px; overflow: hidden;
    background: radial-gradient(circle at 55% 45%, var(--bg-2), var(--bg)); }
:root[data-theme="light"] .flk-qz-stage { background: radial-gradient(circle at 55% 45%, #ffffff, var(--bg-2)); }
.flk-qz-stage .flk-qz-map { position: absolute; inset: 0; width: 100%; height: 100%; }
.flk-qz-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: manipulation; }
.flk-qz-live .flk-qz-static { display: none; }
.flk-qz-clock { position: absolute; top: 12px; inset-inline-end: 14px; margin: 0; padding: 4px 14px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line-soft);
    font-size: clamp(1rem, 2.6vw, 1.5rem); font-weight: 900; font-variant-numeric: tabular-nums; pointer-events: none; }
.flk-qz-clock[hidden] { display: none; }
.flk-qz-clock-gap { color: var(--muted); border-style: dashed; }
.flk-qz-tip { position: absolute; left: var(--x, 50%); top: var(--y, 50%); transform: translate(-50%, calc(-100% - 14px)); z-index: 2; min-width: 170px; max-width: 250px;
    display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(0, 0, 0, .35); pointer-events: none; font-size: .82rem; line-height: 1.7; }
.flk-qz-tip[hidden] { display: none; }
.flk-qz-tipmag { align-self: flex-start; font-weight: 900; font-size: 1.05rem; color: var(--c, var(--orange)); }
.flk-qz-tip small { color: var(--muted); font-size: .76rem; }
.flk-qz-tipgo { color: var(--teal-ink) !important; }
.flk-qz-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin: 10px 0 0; color: var(--muted); font-size: .76rem; }
.flk-qz-key span { display: inline-flex; align-items: center; gap: 5px; }
.flk-qz-key i, .flk-qz-maps figcaption i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.flk-qz-k-a { background: #e9c46a; } .flk-qz-k-b { background: #f4a259; } .flk-qz-k-c { background: #ff8c1a; } .flk-qz-k-d { background: #f2542d; } .flk-qz-k-e { background: #c81d25; }
.flk-qz-k-before { border: 2.4px solid #3987e5; } .flk-qz-k-after { border: 2.4px solid #e7f5f3; }
:root[data-theme="light"] .flk-qz-k-after { border-color: #10262a; }
:root[data-theme="light"] .flk-qz-after { stroke: #10262a; }
.flk-qz-k-fade { opacity: .8; }

/* ---- Charts (fb-chart.js draws them) ------------------------------------------- */
.flk-qz-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.flk-qz-chart { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px 12px; min-width: 0; }
.flk-qz-chart-wide { grid-column: 1 / -1; }
.flk-qz-chart figcaption h3 { margin: 0 0 2px; font-size: 1rem; font-weight: 850; }
.flk-qz-chart figcaption p { margin: 0 0 10px; color: var(--muted); font-size: .84rem; line-height: 1.85; }
.flk-qz-plot { position: relative; min-height: 120px; }
.flk-qz-wait { color: var(--muted); font-size: .84rem; margin: 0; }
.flk-qz-fit { margin: 6px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.8; }
@media (max-width: 760px) { .flk-qz-charts { grid-template-columns: minmax(0, 1fr); } }
.flk-chart-host { position: relative; }
.flk-chart-bar { fill: var(--c1); }
.flk-chart-bar-on { fill: var(--c2); }
.flk-chart-base { stroke: var(--muted); stroke-opacity: .5; stroke-width: 1; }
.flk-chart-gap { fill: var(--muted); fill-opacity: .12; stroke: var(--muted); stroke-opacity: .3; stroke-dasharray: 3 3; }
.flk-chart-gaplabel { fill: var(--muted); font-size: 11px; font-weight: 700; }
.flk-chart-hit { fill: transparent; cursor: default; }
.flk-chart-hit:hover { fill: rgba(147, 184, 182, .08); }
.flk-chart-rowlabel { fill: var(--fg); font-size: 12px; font-weight: 600; }
.flk-chart-value { fill: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.flk-chart-dot { fill: var(--c1); stroke: var(--surface); stroke-width: 2; }
.flk-chart-dot-on { fill: var(--c2); }
.flk-chart-fit { stroke: var(--c2); stroke-width: 2; stroke-dasharray: 6 4; }
.flk-chart-tip { position: absolute; left: var(--x, 50%); top: var(--y, 0); transform: translate(-50%, -100%); z-index: 3; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .3); font-size: .8rem; line-height: 1.7; white-space: nowrap; pointer-events: none; }
.flk-chart-tip[hidden] { display: none; }

/* ---- Lists ------------------------------------------------------------------- */
.flk-qz-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; align-items: start; }
@media (max-width: 860px) { .flk-qz-two { grid-template-columns: minmax(0, 1fr); } }
.flk-qz-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.flk-qz-list a { display: flex; gap: 12px; align-items: center; padding: 8px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--fg); text-decoration: none; }
.flk-qz-list a:hover { border-color: var(--teal); color: var(--fg); }
.flk-qz-list-sm a { padding: 6px 10px; }
.flk-qz-list-sm .flk-qz-mag { min-width: 2.6rem; font-size: .95rem; padding: 2px 4px; border-radius: 9px; }
.flk-qz-list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.flk-qz-years { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.flk-qz-year { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.flk-qz-year h3 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 900; color: var(--orange-ink); }
.flk-qz-year ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.flk-qz-year a { display: flex; flex-direction: column; padding: 5px 8px; border-radius: 10px; background: var(--surface-2); text-decoration: none; color: var(--fg); line-height: 1.6; }
.flk-qz-year a:hover { box-shadow: 0 0 0 1px var(--teal); }
.flk-qz-year a b { font-size: .86rem; }
.flk-qz-year a small { color: var(--muted); font-size: .72rem; }

/* ---- Safety ------------------------------------------------------------------- */
.flk-qz-safety { margin-top: 38px; }
.flk-qz-safe-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.flk-qz-safe-grid > div { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.flk-qz-safe-grid h3 { margin: 0 0 6px; font-size: 1rem; font-weight: 850; color: var(--teal-ink); }
.flk-qz-safe-grid ul { margin: 0; padding: 0 1.1rem 0 0; }
.flk-qz-safe-grid li { margin: 3px 0; font-size: .9rem; line-height: 1.9; }
@media (max-width: 860px) { .flk-qz-safe-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---- One quake -------------------------------------------------------------------- */
.flk-qz-one { display: flex; align-items: center; gap: 22px; margin: 14px 0 12px; padding: 22px 24px; border-radius: 24px; border: 1px solid var(--line);
    background: radial-gradient(600px 240px at 90% 0%, rgba(242, 84, 45, .16), transparent 70%), linear-gradient(160deg, var(--surface), var(--bg-2)); }
.flk-qz-one h1 { margin: 2px 0 6px; font-size: clamp(1.35rem, 3.6vw, 2rem); font-weight: 900; line-height: 1.45; }
.flk-qz-when { margin: 0; line-height: 1.9; }
.flk-qz-when .flk-rel { color: var(--muted); }
.flk-qz-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 14px; }
.flk-qz-facts div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 9px 14px; min-width: 0; }
.flk-qz-facts dt { color: var(--muted); font-size: .76rem; }
.flk-qz-facts dd { margin: 0; font-weight: 850; font-size: 1.05rem; line-height: 1.6; overflow-wrap: anywhere; }
.flk-qz-facts dd small { font-weight: 500; color: var(--muted); font-size: .76rem; }
@media (max-width: 860px) { .flk-qz-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.flk-qz-lines { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.flk-qz-lines li { display: flex; gap: 8px; align-items: flex-start; padding: 8px 14px; border-radius: 12px; background: var(--orange-soft); border-inline-start: 3px solid var(--orange); }
.flk-qz-lines .flk-i { color: var(--orange-ink); margin-top: .4em; }
.flk-qz-maps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.flk-qz-mapbox { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 10px; }
.flk-qz-mapbox .flk-qz-map { display: block; width: 100%; height: auto; aspect-ratio: 865 / 800; border-radius: 12px; background: radial-gradient(circle at 55% 45%, var(--bg-2), var(--bg)); }
.flk-qz-mapbox .flk-qz-zoom { aspect-ratio: 1; }
:root[data-theme="light"] .flk-qz-mapbox .flk-qz-map { background: radial-gradient(circle at 55% 45%, #ffffff, var(--bg-2)); }
.flk-qz-mapbox figcaption { color: var(--muted); font-size: .8rem; padding: 8px 4px 2px; line-height: 1.8; }
.flk-qz-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (max-width: 860px) { .flk-qz-maps { grid-template-columns: minmax(0, 1fr); } }
.flk-qz-near { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.flk-qz-near li { display: flex; gap: 8px; align-items: center; padding: 6px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: .9rem; }
.flk-qz-near .flk-i { color: var(--teal-ink); }
.flk-qz-timeline { margin: 0 0 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; }
.flk-qz-tl { display: block; width: 100%; height: auto; }
.flk-qz-tl-now { stroke: var(--orange); stroke-width: 1.5; stroke-dasharray: 4 4; }
.flk-qz-timeline figcaption { color: var(--muted); font-size: .8rem; padding-top: 4px; }
.flk-qz-step { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 26px 0 0; }
.flk-qz-flip { transform: scaleX(-1); }
.flk-qz-monthnav { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- A city and a month ---------------------------------------------------------- */
.flk-qz-years-bars { display: flex; flex-direction: column; gap: 6px; }
.flk-qz-years-bars div { display: grid; grid-template-columns: 3rem 1fr 3rem; gap: 8px; align-items: center; }
.flk-qz-years-bars span { font-weight: 700; font-size: .88rem; }
.flk-qz-years-bars i { display: block; height: 12px; border-radius: 4px 0 0 4px; background: var(--c1); min-width: 3px; }
.flk-qz-years-bars b { color: var(--muted); font-weight: 600; font-size: .84rem; }
.flk-qz-years-bars i[data-l="0"] { width: 3px; } .flk-qz-years-bars i[data-l="1"] { width: 10%; } .flk-qz-years-bars i[data-l="2"] { width: 20%; } .flk-qz-years-bars i[data-l="3"] { width: 30%; }
.flk-qz-years-bars i[data-l="4"] { width: 40%; } .flk-qz-years-bars i[data-l="5"] { width: 50%; } .flk-qz-years-bars i[data-l="6"] { width: 60%; } .flk-qz-years-bars i[data-l="7"] { width: 70%; }
.flk-qz-years-bars i[data-l="8"] { width: 80%; } .flk-qz-years-bars i[data-l="9"] { width: 90%; } .flk-qz-years-bars i[data-l="10"] { width: 100%; }
.flk-qz-tablebox { max-height: 640px; overflow-y: auto; }
.flk-qz-nowrap { white-space: nowrap; }
@media (max-width: 560px) {
    .flk-qz-hero, .flk-qz-one { padding: 20px 16px; }
    .flk-qz-one { flex-direction: column; align-items: flex-start; }
    .flk-qz-mag-xl { min-width: 5.4rem; min-height: 5.4rem; font-size: 2.3rem; }
    .flk-qz-explorer { padding: 12px 10px 10px; }
    .flk-qz-filters .flk-btn { margin-inline-start: 0; }
    .flk-qz-year ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .flk-qz-ring { animation: none; opacity: .8; } }

/* One quake's story (QuakeStory; docs/plans/falakbin-rich-pages.md, phase 1). */
.flk-qz-where { margin: 2px 0 6px; color: var(--muted); font-size: .95rem; }
.flk-qz-story { margin: 6px 0 18px; }
.flk-qz-story .flk-md:first-child p:first-child { font-size: 1.08rem; }
.flk-qz-photo { margin: 4px 0 18px; max-width: 46rem; }
.flk-qz-photo img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.flk-qz-photo figcaption { margin-top: 6px; font-size: .82rem; color: var(--muted); }
.flk-qz-h3 { margin: 18px 0 8px; font-size: 1.05rem; font-weight: 850; }
.flk-qz-source { max-width: 46rem; margin: 18px 0; font-size: .85rem; line-height: 1.9; }
.flk-qz-provs { margin: 18px 0; }
.flk-qz-provs p { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
