/* GoldPriceHQ: the look of the server-rendered pages (carat, unit, shop and information pages), matching the home page */
:root {
  --bg: #f4f6f9; --card: #ffffff; --ink: #0f172a; --muted: #5b6472; --line: #e2e6ec;
  --gold: #c9a24a; --gold-deep: #85651c; --sea: #0f6e7a; --up: #15803d; --down: #b91c1c;
  --bar: #ffffff; --bar-ink: #0f172a; --on-gold: #1a1405; --shadow: 0 1px 2px rgba(15,23,42,.05), 0 4px 14px rgba(15,23,42,.05);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0b0f17; --card: #121826; --ink: #e6e9ef; --muted: #9aa4b2; --line: #232b3a; --gold: #d9b45f; --gold-deep: #e8c97a; --sea: #5ec4cf; --up: #4ade80; --down: #f87171; --bar: #0f1420; --bar-ink: #e6e9ef; --shadow: none; }
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); line-height: 1.7; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Arabic", Tahoma, sans-serif; }
a { color: var(--sea); }
.num { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.topbar { background: var(--bar); color: var(--bar-ink); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar .in { max-width: 920px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand b { font-size: 1.15rem; }
.wordmark { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif; font-weight: 800; letter-spacing: -.01em; unicode-bidi: isolate; }
.wordmark span { color: var(--gold-deep); }
.brand small { display: block; font-size: .75rem; color: var(--muted); margin-top: -2px; }
.topbar nav { display: flex; gap: 2px; align-items: center; }
.topbar nav a { color: var(--bar-ink); text-decoration: none; font-size: .9rem; padding: 8px 10px; border-radius: 8px; white-space: nowrap; min-height: 40px; display: inline-flex; align-items: center; }
.topbar nav a:hover, .topbar nav a[aria-current="page"] { background: rgba(127,127,127,.12); }
.topbar nav a.lang { border: 1px solid var(--line); margin-inline-start: 6px; font-weight: 700; }
@media (max-width: 680px) {
  .topbar { position: static; }
  .topbar .in { flex-wrap: wrap; padding-bottom: 4px; }
  .topbar nav { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .topbar nav::-webkit-scrollbar { display: none; }
}
main { max-width: 920px; margin: 0 auto; padding: 0 16px 24px; }
.crumbs { font-size: .85rem; color: var(--muted); padding-top: 12px; }
.crumbs a { color: var(--muted); }
.hero { padding: 14px 0 6px; }
.hero h1 { margin: 0 0 6px; font-size: 1.55rem; line-height: 1.4; }
.hero .big { font-size: 2.4rem; font-weight: 800; line-height: 1.2; }
.hero .big small { font-size: .95rem; font-weight: 400; color: var(--muted); }
.lead { color: var(--muted); max-width: 46em; margin: 8px 0 0; }
.upd { color: var(--muted); font-size: .88rem; margin: 6px 0 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--up); display: inline-block; }
.chg { font-size: .9rem; display: inline-block; margin-top: 4px; }
.chg.up { color: var(--up); } .chg.down { color: var(--down); }
.card .chg { display: block; }
h2 { font-size: 1.15rem; margin: 28px 0 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); }
.card.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.label { color: var(--muted); font-size: .9rem; display: block; }
.price { font-weight: 700; font-size: 1.45rem; display: block; }
.price small, .card small { font-size: .82rem; font-weight: 400; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.grid4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 12px; }
@media (min-width: 700px) { .grid4 { grid-template-columns: repeat(4, 1fr); } }
a.card { color: inherit; text-decoration: none; display: block; }
a.card:hover { border-color: var(--gold); }
.kc { border-top: 4px solid var(--gold); }
.kc .price { font-size: 2rem; }
.scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: .95rem; }
.tbl th { text-align: start; color: var(--muted); font-weight: 400; font-size: .85rem; background: rgba(127,127,127,.06); }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: start; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td:first-child { white-space: nowrap; }
.tbl td.num { font-weight: 700; }
.method { border-inline-start: 4px solid var(--sea); }
.method p { margin: 0 0 6px; }
.note { color: var(--muted); font-size: .88rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; border-radius: 999px; padding: 8px 14px; min-height: 40px; display: inline-flex; align-items: center; font-size: .92rem; }
.chips a:hover { border-color: var(--gold); }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 700; min-height: 48px; display: flex; align-items: center; }
.faq p { margin: 0 0 12px; color: var(--muted); }
.info { margin-top: 12px; } .info h2 { margin: 0 0 6px; font-size: 1.05rem; } .info p { margin: 0; }
.shops { display: grid; gap: 12px; }
.shop-h { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.shop-h h3 { margin: 0; font-size: 1.05rem; }
.shop.stale { opacity: .75; }
.muted { color: var(--muted); font-size: .88rem; }
.empty p { margin: 4px 0 0; color: var(--muted); }
.warn { color: var(--down); }
.form { display: grid; gap: 12px; max-width: 560px; }
.form label { display: grid; gap: 4px; font-size: .9rem; color: var(--muted); }
.form input, .form select, .form textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 44px; width: 100%; }
.form textarea { min-height: 130px; resize: vertical; }
.hp, .form .hp { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; clip-path: inset(50%); overflow: hidden; }
.btn { font: inherit; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; padding: 8px 16px; min-height: 44px; cursor: pointer; }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--on-gold); font-weight: 700; justify-self: start; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
footer { margin-top: 36px; background: #0f172a; color: #cbd5e1; font-size: .88rem; }
footer .in { max-width: 920px; margin: 0 auto; padding: 22px 16px; display: grid; gap: 14px; }
@media (min-width: 700px) { footer .in { grid-template-columns: 1.4fr 1fr 1fr; } footer .in.f3 { grid-template-columns: 1.3fr 1fr 1fr; } }
footer h3 { color: #f1d38a; font-size: .95rem; margin: 0 0 6px; }
footer p { margin: 0 0 6px; }
.flinks { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.flinks a { color: #cbd5e1; text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.flinks a:hover { color: #f1d38a; }
.copy { border-top: 1px solid #1f2937; display: flex; justify-content: center; align-items: center; gap: 8px; padding: 12px 16px; color: #94a3b8; font-size: .82rem; }
.copy-mark { width: 20px; height: 20px; }
@media (max-width: 520px) { .hero .big { font-size: 2rem; } .grid2, .card.two { grid-template-columns: 1fr; } }

/* share bar (pages.share_bar, web/share.js) */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 6px; }
.share-l { color: var(--muted); font-size: .9rem; margin-inline-end: 2px; }
.sh { font: inherit; font-size: .9rem; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 6px 14px; border-radius: 999px;
      border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; cursor: pointer; }
.sh::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); flex: none; }
.sh-wa::before { background: #25d366; } .sh-x::before { background: currentColor; } .sh-tg::before { background: #229ed9; } .sh-fb::before { background: #1877f2; }
.sh:hover { border-color: var(--gold); }
/* share menu: one quiet button that opens the options (pages.share_bar) */
.share-wrap { margin: 12px 0 4px; }
.share-wrap > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); cursor: pointer; font-size: .92rem; }
.share-wrap > summary::-webkit-details-marker { display: none; }
.share-wrap > summary::before { content: "↗"; color: var(--gold); font-weight: 700; }
.share-wrap[open] > summary { border-color: var(--gold); }
.share-wrap .share { margin-top: 10px; }
.chg .when { color: var(--muted); }
.flinks a { min-height: 44px; display: inline-flex; align-items: center; }

/* methodology page */
.m h2 { scroll-margin-top: 80px; }
.m-rev { color: var(--muted); font-size: .88rem; margin: 8px 0 0; }
.m-sum { border-top: 4px solid var(--gold); margin-top: 12px; }
.m-sum h2 { margin: 0 0 6px; font-size: 1.05rem; }
.m-sum ul, .m-out ul, .m-rules { margin: 0; padding-inline-start: 1.2em; }
.m-sum li + li, .m-out li + li, .m-rules li + li { margin-top: 4px; }
.m-toc { margin-top: 14px; }
.m-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; counter-reset: step; }
.m-flow li { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; counter-increment: step; }
.m-flow li::before { content: counter(step); display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: #1a1405; font-weight: 800; margin-bottom: 6px; }
.m-flow b { display: block; }
.m-flow span { color: var(--muted); font-size: .88rem; }
.m-eq { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.m-eq li { background: var(--card); border: 1px solid var(--line); border-inline-start: 4px solid var(--gold); border-radius: 12px; padding: 10px 14px; font-weight: 600; }
.m-eq li { display: flex; gap: 10px; align-items: baseline; }
.m-eq .n { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold-deep); font-weight: 800; font-size: .85rem; }
.m-ex td:last-child, .m-ex td:nth-child(2) { white-space: nowrap; }
.m bdi.num, .m td.num { font-variant-numeric: tabular-nums; }
.m-ex td:first-child, .m-log td:first-child { white-space: normal; }
.m-kv th { width: 34%; }
.m-rules { margin-top: 12px; }
.m-out { margin-top: 0; }
.m-out .note { margin: 10px 0 0; }
@media (max-width: 720px) { .m-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .m .tbl { font-size: .86rem; } .m .tbl th, .m .tbl td { padding: 8px 7px; } }

/* shop directory (simple, 2026-11-13): search, governorate chips, compact rows, details in a panel, map on demand */
.sh-hero h1 { margin-bottom: 0; }
.sh-sub { margin: 2px 0 0; color: var(--muted); }
.pl-bar { padding: 8px 0 6px; }
.pl-search { display: flex; gap: 8px; }
.pl-search input { flex: 1; min-width: 0; font: inherit; font-size: 16px; min-height: 46px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); }
.pl-search button { font: inherit; font-size: .92rem; min-height: 46px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; white-space: nowrap; }
.pl-chips { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 2px; scrollbar-width: none; }
.pl-chips::-webkit-scrollbar { display: none; }
.pl-chips button { flex: none; font: inherit; font-size: .88rem; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.pl-chips button small { color: var(--muted); margin-inline-start: 2px; }
.pl-chips button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #1a1405; font-weight: 700; }
.pl-chips button[aria-pressed="true"] small { color: inherit; }
.pl-list { list-style: none; margin: 4px 0 0; padding: 0; }
.pl { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); }
.pl-open { flex: 1; min-width: 0; display: grid; gap: 2px; text-align: start; background: none; border: 0; font: inherit; color: inherit; padding: 12px 2px; cursor: pointer; }
.pl-n { font-weight: 700; overflow-wrap: anywhere; }
.pl-m { display: flex; flex-wrap: wrap; gap: 0 8px; color: var(--muted); font-size: .85rem; }
.pl-r { color: var(--gold-deep); white-space: nowrap; }
.pl-r small { color: var(--muted); }
.pl-act { display: flex; gap: 6px; flex: none; }
.pl-ic { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); color: var(--sea); background: var(--card); }
.pl-ic svg { width: 20px; height: 20px; }
.pl-ic:hover { border-color: var(--gold); }
.pl-addline { text-align: center; margin: 14px 0 0; }
.linkbtn { background: none; border: 0; font: inherit; color: var(--sea); text-decoration: underline; cursor: pointer; min-height: 44px; }
.pl-src { margin-top: 18px; }
.pl-map { height: 70vh; border-radius: 14px; border: 1px solid var(--line); direction: ltr; z-index: 0; }
.pl-mapcol { display: none; }
.pl-dir.show-map .pl-mapcol { display: block; margin-top: 8px; }
.pl-dir.show-map .pl-col { display: none; }
.pl-toggle { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 4; font: inherit; font-weight: 700; min-height: 46px; padding: 0 22px; border-radius: 999px; border: 0; background: var(--ink); color: var(--bg); box-shadow: 0 4px 14px rgba(0,0,0,.3); cursor: pointer; }
.pl-pop b { display: block; margin-bottom: 4px; }
/* the details panel: a bottom sheet on phones, a side drawer on wide screens */
.sheet { position: fixed; inset: 0; z-index: 20; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.sheet-in { position: absolute; inset-inline: 0; bottom: 0; max-height: 86vh; overflow-y: auto; background: var(--card); color: var(--ink); border-radius: 18px 18px 0 0; padding: 18px 16px 24px; box-shadow: 0 -6px 24px rgba(0,0,0,.3); }
.sheet-x { position: absolute; top: 8px; inset-inline-end: 8px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--bg); color: var(--ink); font-size: 1.5rem; cursor: pointer; }
.sh-name { font-size: 1.2rem; margin: 0 0 2px; padding-inline-end: 48px; }
.sh-h { font-size: 1rem; margin: 16px 0 4px; }
.sheet .pl-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 0; }
.sheet .pl-links a { min-height: 40px; display: inline-flex; align-items: center; }
.sheet .pl-add { margin-top: 12px; width: 100%; min-height: 46px; }
.rv { border-top: 1px solid var(--line); padding: 8px 0 2px; }
.rv p { margin: 4px 0; overflow-wrap: anywhere; }
.stars { color: var(--gold); }
.rv-reply { background: var(--bg); border-radius: 10px; padding: 6px 10px; font-size: .92rem; }
.rv-rep { background: none; border: 0; color: var(--muted); font: inherit; font-size: .8rem; cursor: pointer; padding: 0; min-height: 32px; }
.rv-form { margin-top: 10px; }
.rv-stars { display: flex; gap: 6px; }
.rv-stars button { font-size: 1.5rem; line-height: 1; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; color: var(--muted); min-width: 44px; min-height: 44px; cursor: pointer; }
.rv-stars button.on { color: var(--gold); border-color: var(--gold); }
body.sheet-open { overflow: hidden; }
@media (min-width: 900px) {
  .pl-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
  .pl-mapcol, .pl-dir.show-map .pl-mapcol { display: block; position: sticky; top: 72px; margin-top: 8px; }
  .pl-dir.show-map .pl-col { display: block; }
  .pl-map { height: calc(100vh - 100px); }
  .pl-toggle { display: none; }
  .sheet-in { inset-inline: auto 0; top: 0; bottom: 0; width: 420px; max-height: none; border-radius: 0; }
}
/* footer: the three parts, then one small line */
footer h3 a { color: inherit; text-decoration: none; }
.flinks.one { grid-template-columns: 1fr; }
.fmeta { max-width: 920px; margin: 0 auto; padding: 0 16px 14px; color: #94a3b8; font-size: .82rem; }
.fmeta p { margin: 0 0 4px; }
.fmeta a { color: #cbd5e1; }

/* a shop's price with a photo */
.pl-p { color: var(--ink); white-space: nowrap; }
.sh-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.sh-acts .btn { min-height: 46px; width: 100%; margin: 0; }
.pr-tbl td, .pr-tbl th { padding: 6px 8px; font-size: .88rem; }
.pr-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.pr-form { margin-top: 10px; }
.pr-k { display: flex; flex-wrap: wrap; gap: 6px; }
.pr-k button { font: inherit; font-size: .9rem; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; }
.pr-k button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #1a1405; font-weight: 700; }
.pr-diff:empty { display: none; }
.pr-prev { max-width: 100%; max-height: 220px; border-radius: 10px; border: 1px solid var(--line); }
.pr-photo input { padding: 8px; }
