/* Gold & Oil Verdict, in old-money colours: navy, beige, light blue, cognac brown, white and black.
   The clouds behind the price take the colour of the day's move, light blue when it rises and brown when it falls.
   Panels are frosted glass. Everything else stays quiet. */
:root {
  --night: #0e2552;
  --night-2: #143066;
  --night-3: #1b3c7a;
  --glass: rgba(255, 255, 255, .06);
  --glass-2: rgba(255, 255, 255, .11);
  --rim: rgba(255, 255, 255, .16);
  --line: rgba(232, 220, 196, .16);
  --ink: #ffffff;
  --ink-2: #e8dcc4;
  --ink-3: #aebcd8;
  --gold: #e8dcc4;
  --gold-ink: #0e2552;
  --up: #8db5e8;
  --down: #c97b4e;
  --violet: #8db5e8;
  --oil: #8db5e8;
  --film: conic-gradient(from 210deg, #8db5e8, #ffffff, #e8dcc4, #c97b4e, #8db5e8);
  --font: "Readex Pro", "Inter", system-ui, -apple-system, "Segoe UI", "Noto Sans Arabic", Tahoma, sans-serif;
  --wide: "HEXP" 72;
  --dock: calc(84px + env(safe-area-inset-bottom));
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--night); }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font: 400 1.0625rem/1.55 var(--font); overflow-wrap: break-word;
  background:
    radial-gradient(70% 45% at 85% -5%, rgba(141, 181, 232, .16), transparent 70%),
    radial-gradient(60% 40% at 0% 0%, rgba(232, 220, 196, .1), transparent 70%),
    var(--night);
  padding-bottom: var(--dock);
}
a { color: inherit; text-underline-offset: .18em; text-decoration-color: rgba(255, 255, 255, .35); }
a:hover { color: var(--gold); text-decoration-color: currentColor; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; font-weight: 600; }
h1, h2 { font-variation-settings: var(--wide); letter-spacing: -.01em; }
h2 { font-size: 1.45rem; margin-bottom: .8rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, select, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: -999px; top: .5rem; background: var(--gold); color: var(--gold-ink); padding: .5rem 1rem; z-index: 40; font-weight: 600; border-radius: 999px; }
.skip:focus { inset-inline-start: .5rem; }
[hidden] { display: none !important; }

.wrap { width: min(1180px, 100%); margin-inline: auto; padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right)); }
@media (min-width: 720px) { .wrap { padding-inline: 28px; } }
.narrow { width: min(840px, 100%); padding-block: 1.5rem 3rem; }

/* Header and the grouped menu. On a phone the menu is a dock at the bottom of the screen. */
.top { position: relative; z-index: 30; }
.top-inner { display: flex; align-items: center; gap: 1rem; padding-block: .8rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 600; font-variation-settings: var(--wide); font-size: 1.02rem; text-decoration: none; white-space: nowrap; }
.mark { width: 1.35rem; height: 1.35rem; border-radius: 50%; background: var(--film); box-shadow: 0 0 18px rgba(141, 181, 232, .55); position: relative; flex: none; }
.mark::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--night); }
.lang-switch { margin-inline-start: auto; padding: .3rem .85rem; border: 1px solid var(--rim); border-radius: 999px; background: var(--glass); text-decoration: none; font-weight: 500; font-size: .95rem; white-space: nowrap; }

.groups {
  position: fixed; z-index: 35; inset-inline: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(20, 48, 102, .74); border: 1px solid var(--rim); border-radius: 26px;
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .55);
}
.group-link, .group > summary {
  display: grid; justify-items: center; gap: 1px; padding: .55rem .2rem .5rem; min-height: 58px;
  font-size: .74rem; font-weight: 500; color: var(--ink-3); text-decoration: none; cursor: pointer; list-style: none; border-radius: 20px;
}
.group > summary::-webkit-details-marker { display: none; }
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.group-link[aria-current="page"], .group.is-here > summary, .group[open] > summary { color: var(--ink); }
.group-link[aria-current="page"] .icon, .group.is-here > summary .icon { stroke: var(--gold); filter: drop-shadow(0 0 8px rgba(232, 220, 196, .6)); }
.menu-sheet {
  position: absolute; inset-inline: 0; bottom: calc(100% + 10px); max-height: min(70vh, 560px); overflow: auto; padding: .5rem;
  background: var(--night-2); border: 1px solid var(--rim); border-radius: 26px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}
.menu-title { margin: .45rem .75rem .35rem; font-weight: 600; font-variation-settings: var(--wide); font-size: 1.05rem; }
.menu-sheet a { display: grid; gap: .05rem; padding: .6rem .75rem; border-radius: 16px; text-decoration: none; }
.menu-sheet a:hover, .menu-sheet a[aria-current="page"] { background: var(--glass-2); color: var(--ink); }
.menu-sheet b { font-weight: 500; }
.menu-sheet span { font-size: .88rem; color: var(--ink-3); }
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .groups { position: static; display: flex; gap: .15rem; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; margin-inline-start: 1rem; }
  .group { position: relative; }
  .group-link, .group > summary { display: flex; align-items: center; gap: .4rem; min-height: 0; padding: .45rem .8rem; font-size: .95rem; border-radius: 999px; }
  .group-link:hover, .group > summary:hover, .group[open] > summary { background: var(--glass); color: var(--ink); }
  .icon { width: 19px; height: 19px; }
  .menu-sheet { bottom: auto; top: calc(100% + 8px); inset-inline: 0 auto; width: 330px; }
  .lang-switch { order: 3; }
}

/* The hero: a sky whose clouds show the direction of the day. */
.hero, .page-head { position: relative; isolation: isolate; overflow: hidden; }
.hero { padding-block: .4rem 2.6rem; }
.hero::before, .hero::after, .page-head::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none; filter: blur(46px); will-change: transform;
}
.hero::before { inset: -25% -25% 25% -20%; background: radial-gradient(42% 48% at 28% 45%, var(--cloud-a), transparent 72%), radial-gradient(36% 42% at 78% 30%, var(--cloud-b), transparent 72%); animation: drift 38s ease-in-out infinite alternate; }
.hero::after { inset: 35% -25% -30% 5%; background: radial-gradient(40% 50% at 62% 50%, var(--cloud-c), transparent 72%); animation: drift 52s ease-in-out infinite alternate-reverse; }
.page-head::before { inset: -60% -20% 0 -20%; background: radial-gradient(40% 55% at 25% 50%, rgba(141, 181, 232, .3), transparent 72%), radial-gradient(35% 50% at 80% 40%, rgba(232, 220, 196, .18), transparent 72%); }
.hero, .dir-flat { --cloud-a: rgba(232, 220, 196, .3); --cloud-b: rgba(141, 181, 232, .28); --cloud-c: rgba(255, 255, 255, .12); --tone: var(--ink); }
.dir-up { --cloud-a: rgba(141, 181, 232, .5); --cloud-b: rgba(255, 255, 255, .2); --cloud-c: rgba(141, 181, 232, .3); --tone: var(--up); }
.dir-down { --cloud-a: rgba(201, 123, 78, .5); --cloud-b: rgba(232, 220, 196, .26); --cloud-c: rgba(201, 123, 78, .28); --tone: var(--down); }
@keyframes drift { from { transform: translate3d(-4%, -1%, 0) scale(1); } to { transform: translate3d(5%, 3%, 0) scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .hero::before, .hero::after { animation: none; } }

.glass { background: var(--glass); border: 1px solid var(--rim); -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1.2rem; }
.tile { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 0 .5rem; padding: .65rem .9rem; border-radius: 20px; text-decoration: none; background: var(--glass); border: 1px solid var(--rim); }
.tile:hover { color: var(--ink); background: var(--glass-2); }
.tile-name { font-size: .88rem; color: var(--ink-2); }
.tile-move { font-size: .88rem; font-weight: 500; text-align: end; font-variant-numeric: tabular-nums; }
.tile-price { grid-column: 1 / -1; font-size: 1.15rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.tile.is-on { background: var(--glass-2); border-color: rgba(232, 220, 196, .55); box-shadow: 0 0 0 1px rgba(232, 220, 196, .2), 0 8px 30px rgba(232, 220, 196, .12); }

.hero-grid { display: grid; gap: 1.2rem; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr); grid-template-areas: "head box" "text box"; column-gap: 2.5rem; align-items: start; }
  .hero-head { grid-area: head; }
  .hero-grid > .price-box { grid-area: box; }
  .hero-text { grid-area: text; }
}
.hero-date { display: flex; flex-wrap: wrap; gap: .2rem 1rem; margin: 0 0 .6rem; color: var(--ink-2); font-size: .95rem; }
.market::before { content: ""; display: inline-block; width: .5em; height: .5em; margin-inline-end: .45em; border-radius: 50%; background: var(--ink-3); vertical-align: .08em; }
.market-open::before { background: var(--up); box-shadow: 0 0 10px var(--up); }
.hero h1 { font-size: clamp(2.5rem, 10.5vw, 5.4rem); line-height: 1; letter-spacing: -.015em; max-width: 12ch; text-wrap: balance; }
.hero-answer { font-size: 1.2rem; font-weight: 500; color: var(--tone); margin-bottom: .6rem; }
.hero-story { font-weight: 500; margin-bottom: .35rem; }
.hero-why { color: var(--ink-2); max-width: 40em; }
.hero-tools { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }
.stale { margin: 1.2rem 0 0; padding: .7rem 1rem; border-radius: 16px; background: rgba(201, 123, 78, .12); border: 1px solid rgba(201, 123, 78, .4); }

.price-box { padding: 1.1rem 1.2rem 1rem; border-radius: 28px; background: var(--glass); border: 1px solid var(--rim); -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%); }
.price-label { margin: 0; color: var(--ink-2); font-size: .92rem; }
.price-now { margin: .1rem 0 0; font-size: clamp(2.5rem, 11vw, 3.9rem); line-height: 1.05; font-weight: 500; font-variation-settings: "HEXP" 40; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.price-state { margin: .1rem 0 .8rem; font-size: .85rem; color: var(--ink-3); }
.currency { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .85rem; }
.currency button, .currency select { min-height: 38px; padding: .3rem .8rem; border-radius: 999px; border: 1px solid var(--rim); background: transparent; cursor: pointer; font-size: .9rem; }
.currency select option { background: var(--night-2); color: var(--ink); }
.currency button:hover, .currency select:hover { background: var(--glass-2); }
.currency button[aria-pressed="true"] { background: var(--ink); color: var(--night); border-color: var(--ink); font-weight: 500; }
.changes { margin: 0; }
.change { display: flex; justify-content: space-between; gap: 1rem; padding: .42rem 0; border-top: 1px solid var(--line); font-size: .95rem; }
.change dt { color: var(--ink-2); }
.change dd { margin: 0; display: flex; gap: .85rem; font-variant-numeric: tabular-nums; text-align: end; }
.change-abs { color: var(--ink-2); }
.change-pct { font-weight: 500; }
.change-up .change-pct { color: var(--up); }
.change-down .change-pct { color: var(--down); }
.change-none .change-pct { color: var(--ink-3); font-weight: 400; }
.price-panel .price-box { position: sticky; top: 1rem; }

/* The oil-film rim marks the things worth stopping for: fast moves. */
.hero-flash, .post-flash {
  border: 1px solid transparent;
  background: linear-gradient(var(--night-2), var(--night-2)) padding-box, var(--film) border-box;
}
.hero-flash { display: block; margin-bottom: 1rem; padding: .7rem .95rem; border-radius: 18px; text-decoration: none; line-height: 1.4; max-width: 42em; box-shadow: 0 0 30px rgba(141, 181, 232, .22); }
.hero-flash:hover { color: var(--ink); }
.post-flash { padding: 1rem 1.1rem; border-radius: 22px; }
.flash-from { margin: 0 0 .5rem; color: var(--ink-3); font-size: .92rem; }
.flash-label { margin: .2rem 0 .2rem; font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.flash-story { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .45rem; margin: 0 0 .3rem; font-weight: 500; line-height: 1.35; }
.flash-story .stamp { margin-top: .2em; }
.flash-story .src { grid-column: 2; font-weight: 400; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .45rem; min-height: 42px; padding: .45rem 1.05rem; border-radius: 999px; border: 1px solid var(--rim); background: var(--glass); text-decoration: none; font-weight: 500; cursor: pointer; }
.btn:hover { background: var(--glass-2); color: var(--ink); }
.btn-solid { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.btn-solid:hover { background: #f3ead8; color: var(--gold-ink); }
.btn-small { min-height: 34px; padding: .25rem .8rem; font-size: .9rem; }
.btn .icon { width: 18px; height: 18px; }
.btn[aria-pressed="true"] { background: var(--ink); color: var(--night); border-color: var(--ink); }
.buttons { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }

/* Charts */
.daychart { margin: 0 0 1.6rem; padding: 1rem 1rem .9rem; border-radius: 26px; background: var(--glass); border: 1px solid var(--rim); }
.chart-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-bottom: .7rem; }
.daychart figcaption { font-size: .95rem; color: var(--ink-2); }
.chart-tabs { display: flex; gap: .3rem; padding: .2rem; border-radius: 999px; background: rgba(9, 27, 64, .55); border: 1px solid var(--line); }
.chart-tabs button { border: 0; background: none; padding: .25rem .7rem; border-radius: 999px; cursor: pointer; font-size: .85rem; color: var(--ink-2); min-height: 32px; }
.chart-tabs button[aria-pressed="true"] { background: var(--ink); color: var(--night); font-weight: 500; }
.plot { direction: ltr; position: relative; height: 230px; margin-inline-end: 64px; margin-bottom: 26px; touch-action: pan-y; }
@media (min-width: 720px) { .plot { height: 300px; } }
.plot-history { height: 260px; }
.plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.plot .grid { stroke: var(--line); stroke-width: 1; }
.plot .ref { stroke: var(--gold); stroke-width: 1; stroke-dasharray: 4 5; opacity: .8; }
.plot .area { fill: rgba(255, 255, 255, .05); }
.plot .line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(255, 255, 255, .35)); }
.plot .c-up { fill: var(--up); stroke: var(--up); }
.plot .c-down { fill: var(--down); stroke: var(--down); }
.plot .wick { stroke-width: 1; }
.plot .lv { stroke: var(--gold); stroke-width: 1; stroke-dasharray: 5 5; opacity: .75; }
.plot .lv-round { stroke: var(--ink-3); opacity: .5; }
.plot .band { fill: rgba(141, 181, 232, .14); }
.tick-y, .tick-x, .ref-label, .lv-label { position: absolute; font-size: .75rem; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tick-y { left: calc(100% + 8px); transform: translateY(-50%); }
.tick-x { top: calc(100% + 6px); transform: translateX(-50%); }
.ref-label, .lv-label { right: 4px; transform: translateY(-120%); color: var(--gold); font-size: .72rem; }
.lv-label { left: 4px; right: auto; }
.end-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(232, 220, 196, .25), 0 0 16px var(--gold); }
.pin { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; display: grid; place-items: center; border-radius: 50%; background: var(--night); }
.pin .stamp { width: 14px; height: 14px; }
.pin:hover .stamp { transform: scale(1.25); }
.cross { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255, 255, 255, .4); pointer-events: none; }
.tip { position: absolute; top: 6px; padding: .3rem .6rem; border-radius: 10px; background: var(--night-3); border: 1px solid var(--rim); font-size: .82rem; white-space: nowrap; pointer-events: none; }
.tip b { font-weight: 600; }
.chart-note { margin: 0; font-size: .85rem; color: var(--ink-3); }
@media (max-width: 600px) { .tick-minor { display: none; } }
.pin { background: var(--night-2); box-shadow: 0 0 0 1px var(--rim); }

/* Verdict marks */
.stamp { width: .85em; height: .85em; flex: none; }
.stamp-bullish { fill: var(--up); filter: drop-shadow(0 0 4px rgba(141, 181, 232, .6)); }
.stamp-bearish { fill: var(--down); filter: drop-shadow(0 0 4px rgba(201, 123, 78, .6)); }
.v-bullish, .num-up, .sheet-bullish { color: var(--up); }
.v-bearish, .num-down, .sheet-bearish { color: var(--down); }
.chip { display: inline-block; padding: .05rem .6rem; border-radius: 999px; background: rgba(232, 220, 196, .14); color: var(--gold); font-size: .8rem; font-weight: 500; white-space: nowrap; }
.tag { display: inline-block; padding: .02rem .5rem; border-radius: 999px; font-size: .76rem; border: 1px solid var(--rim); }
.tag-gold { color: var(--gold); }
.tag-oil { color: var(--oil); }

/* Columns */
.columns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-block: .5rem 3rem; }
.col-main, .col-side { min-width: 0; }
@media (min-width: 960px) { .columns { grid-template-columns: minmax(0, 1fr) 340px; gap: 3rem; } }
.col-main > section + section { margin-top: 2.4rem; }
.col-side { display: grid; gap: 1rem; align-content: start; }
.note { color: var(--ink-3); font-size: .92rem; }
.empty { color: var(--ink-2); padding: 1rem 1.1rem; border-radius: 18px; border: 1px dashed var(--rim); }

.moved { display: grid; gap: .55rem; }
.moved li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .55rem; align-items: start; font-weight: 500; line-height: 1.35; }
.moved .stamp { margin-top: .25em; }
.moved a { text-decoration: none; }
.moved a:hover { text-decoration: underline; }

/* The news stream: rows, not cards. The edge glows in the verdict's colour. */
.stream-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin-bottom: .4rem; }
.stream-head h2 { margin: 0; }
.stream { display: grid; gap: 1.5rem; margin-top: 1rem; }
.stream.only-high .post:not([data-impact="high"]) { display: none; }
.post { position: relative; padding-inline-start: 1.05rem; border-inline-start: 2px solid var(--line); }
.post-bullish { border-inline-start-color: var(--up); }
.post-bearish { border-inline-start-color: var(--down); }
.post-bullish::before, .post-bearish::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: -2px; width: 2px; box-shadow: 0 0 12px 1px currentColor; pointer-events: none; }
.post-bullish::before { color: rgba(141, 181, 232, .7); }
.post-bearish::before { color: rgba(201, 123, 78, .7); }
.post-flash { border-inline-start-width: 1px; }
.post-flash::before { display: none; }
.post-top { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .55rem; margin-bottom: .35rem; font-size: .92rem; }
.post-top strong { font-weight: 600; }
.post-time { margin-inline-start: auto; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.post h3 { font-size: 1.12rem; font-weight: 500; line-height: 1.32; margin-bottom: .45rem; }
.why { color: var(--ink-2); margin-bottom: .5rem; }
.post-foot { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: .3rem 0 0; font-size: .85rem; color: var(--ink-3); }
.post-items { list-style: disc; padding-inline-start: 1.15rem; margin-bottom: .5rem; color: var(--ink-2); }
.post-items li { margin-bottom: .25rem; }
.src { color: var(--ink-3); font-size: .85rem; }
.more { margin-top: .5rem; font-size: .92rem; }
.more summary { cursor: pointer; color: var(--ink-2); }
.more ul { margin-top: .4rem; }
.brief-part { margin-bottom: .7rem; }
.brief-part h4 { font-size: .95rem; margin-bottom: .25rem; }
.brief-part ul { list-style: disc; padding-inline-start: 1.15rem; color: var(--ink-2); }
.brief-part li { margin-bottom: .2rem; }
.post-new { animation: arrive .7s ease-out; }
@keyframes arrive { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .post-new { animation: none; } }
.timing { display: inline-flex; align-items: center; gap: .35rem; margin: 0 0 .45rem; padding: .12rem .6rem; border-radius: 999px; border: 1px solid var(--rim); font-size: .85rem; color: var(--ink-2); }
.timing .clock { width: 1em; height: 1em; flex: none; }
.timing-now { color: var(--ink); border-color: rgba(232, 220, 196, .5); }
.result { margin: 0 0 .45rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.result-row { display: flex; align-items: center; gap: .4rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.after { margin: 0 0 .45rem; font-size: .93rem; color: var(--ink-2); }
.after-hit { color: var(--up); }
.after-miss { color: var(--down); }
.explain-row { margin: .4rem 0 0; }
.explain { border: 0; background: none; padding: 0; color: var(--gold); cursor: pointer; font-size: .9rem; text-decoration: underline; text-underline-offset: .2em; }
.explain-text { margin: .5rem 0 .2rem; padding: .7rem .9rem; border-radius: 16px; background: var(--glass); border: 1px solid var(--rim); color: var(--ink-2); font-size: .95rem; }
.explain-text p:last-child { margin-bottom: 0; }

/* Side panels */
.side-box { padding: 1.1rem 1.15rem; border-radius: 22px; background: var(--glass); border: 1px solid var(--rim); }
.side-box h2 { font-size: 1.15rem; margin-bottom: .65rem; }
.side-box p { font-size: .95rem; }
.side-box > p:last-child { margin-bottom: 0; }
.events { display: grid; gap: .7rem; }
.event { display: grid; gap: .05rem; }
.event-when { font-size: .85rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.event-name { font-weight: 500; line-height: 1.3; }
.event-nums { font-size: .88rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.event-nums.v-bullish { color: var(--up); }
.event-nums.v-bearish { color: var(--down); }
.event-reading { font-size: .9rem; color: var(--ink-3); margin-top: -.35rem; padding-bottom: .4rem; border-bottom: 1px solid var(--line); }
.plain-links { display: grid; gap: .4rem; }

/* Levels to watch */
.levels { display: grid; }
.level { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 .8rem; padding: .45rem 0; border-top: 1px solid var(--line); font-size: .93rem; }
.level:first-child { border-top: 0; }
.level-name { color: var(--ink-2); }
.level-price { font-weight: 500; font-variant-numeric: tabular-nums; text-align: end; }
.level-gap { grid-column: 1 / -1; font-size: .8rem; color: var(--ink-3); }
.level-res .level-name::before, .level-sup .level-name::before { content: ""; display: inline-block; width: .55em; height: .55em; border-radius: 2px; margin-inline-end: .45em; transform: rotate(45deg); }
.level-res .level-name::before { background: var(--down); }
.level-sup .level-name::before { background: var(--up); }
.level-now { margin-block: .2rem; padding: .45rem .7rem; border: 1px solid rgba(232, 220, 196, .5); border-radius: 14px; background: rgba(232, 220, 196, .08); }
.level-now .level-name, .level-now .level-price { color: var(--gold); }
.level-now + .level { border-top: 0; }

/* News mood */
.mood { margin: 0 0 1.4rem; }
.mood-track { position: relative; height: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--down), rgba(255, 255, 255, .25) 50%, var(--up)); margin: .55rem 0 .45rem; }
html[dir="rtl"] .mood-track { background: linear-gradient(270deg, var(--down), rgba(255, 255, 255, .25) 50%, var(--up)); }
.mood-mark { position: absolute; top: 50%; width: 20px; height: 20px; margin-inline-start: -10px; transform: translateY(-50%); border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 4px rgba(9, 27, 64, .85), 0 0 16px rgba(255, 255, 255, .8); }
.mood-ends { display: flex; justify-content: space-between; font-size: .8rem; color: var(--ink-3); }
.mood-label { font-weight: 600; font-variation-settings: var(--wide); font-size: 1.15rem; }
.mood-label.v-bullish, .mood-label.v-bearish { text-shadow: 0 0 18px currentColor; }

/* Session clock */
.sessions { display: grid; gap: .5rem; }
.session { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .6rem; padding: .5rem .7rem; border-radius: 14px; border: 1px solid var(--line); }
.session::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--ink-3); }
.session.is-open { border-color: rgba(141, 181, 232, .45); background: rgba(141, 181, 232, .07); }
.session.is-open::before { background: var(--up); box-shadow: 0 0 10px var(--up); }
.session-name { font-weight: 500; }
.session-when { font-size: .85rem; color: var(--ink-3); text-align: end; font-variant-numeric: tabular-nums; }

/* Dollar and yields */
.macro { display: grid; gap: .8rem; }
.macro-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1rem .8rem; }
.macro-name { color: var(--ink-2); font-size: .93rem; }
.macro-value { font-weight: 600; font-variant-numeric: tabular-nums; text-align: end; }
.macro-means { grid-column: 1 / -1; font-size: .85rem; color: var(--ink-3); }

/* Ask Claude */
.ask { margin-top: 2.4rem; padding: 1.2rem; border-radius: 26px; border: 1px solid transparent; background: linear-gradient(var(--night-2), var(--night-2)) padding-box, var(--film) border-box; }
.ask h2 { margin-bottom: .3rem; }
.ask form { display: flex; gap: .5rem; margin-top: .8rem; }
.ask input { flex: 1; min-width: 0; min-height: 46px; padding: .55rem 1rem; border-radius: 999px; border: 1px solid var(--rim); background: rgba(9, 27, 64, .6); }
.ask-suggest { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }
.ask-suggest button { border: 1px solid var(--line); background: none; border-radius: 999px; padding: .2rem .75rem; font-size: .85rem; color: var(--ink-2); cursor: pointer; }
.ask-suggest button:hover { background: var(--glass); color: var(--ink); }
.ask-answer { margin-top: 1rem; color: var(--ink); }
.ask-answer p:last-child { margin-bottom: 0; }
.ask-answer.is-waiting { color: var(--ink-3); }

/* Pages */
.page-head { padding-block: 1.6rem 1.4rem; }
.page-head h1 { font-size: clamp(2rem, 7vw, 3.4rem); line-height: 1.05; max-width: 20ch; text-wrap: balance; margin-bottom: .6rem; }
.lede { font-size: 1.12rem; color: var(--ink-2); max-width: 40em; }
.crumb { margin-bottom: .6rem; font-size: .92rem; color: var(--ink-3); }
.narrow h2 { margin-top: 2.2rem; }
.narrow h2:first-child { margin-top: 0; }
.prose p, .prose li { max-width: 40em; }
.prose ul { list-style: disc; padding-inline-start: 1.2rem; margin-bottom: 1em; }
.prose li { margin-bottom: .35rem; }
.cal-day { margin-bottom: 1.8rem; }
.cal-day h2 { font-size: 1.2rem; }
.days { display: grid; }
.days li a { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: .8rem; padding: .65rem 0; border-top: 1px solid var(--line); text-decoration: none; }
.days li a:hover span { text-decoration: underline; }
.days span { color: var(--ink-2); }
.section-earlier p { margin-top: .8rem; }

.table-wrap { overflow-x: auto; margin-bottom: 1.2rem; border-radius: 18px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: start; padding: .65rem .8rem; border-top: 1px solid var(--line); vertical-align: top; }
thead th { border-top: 0; font-size: .85rem; font-weight: 500; color: var(--ink-3); background: rgba(255, 255, 255, .03); }
tbody th { font-weight: 500; }
th small, td small { display: block; font-weight: 400; color: var(--ink-3); font-size: .8rem; }
caption { text-align: start; padding: .7rem .8rem .2rem; color: var(--ink-2); font-size: .9rem; }
.sheet td:last-child { color: var(--ink-2); }
.country-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .4rem 1rem; }
.country-list li a { display: block; padding: .45rem 0; }
.guide-list { display: grid; gap: .6rem; margin-bottom: 2rem; }
.guide-list li a { display: grid; gap: .15rem; padding: .85rem 1rem; border-radius: 18px; border: 1px solid var(--line); text-decoration: none; }
.guide-list li a:hover { background: var(--glass); border-color: var(--rim); color: var(--ink); }
.guide-list b { font-weight: 500; }
.guide-list span { color: var(--ink-3); font-size: .92rem; }

.calc { display: grid; gap: .9rem; padding: 1.2rem; border-radius: 24px; background: var(--glass); border: 1px solid var(--rim); }
@media (min-width: 640px) { .calc { grid-template-columns: 1fr 1fr; } }
.calc label { display: grid; gap: .3rem; font-size: .92rem; color: var(--ink-2); }
.calc input, .calc select { min-height: 46px; padding: .5rem .8rem; border-radius: 14px; border: 1px solid var(--rim); background: rgba(9, 27, 64, .6); color: var(--ink); }
.calc select option { background: var(--night-2); }
.calc-wide { grid-column: 1 / -1; }
.calc-result { margin: 1rem 0 1.4rem; padding: 1.1rem 1.2rem; border-radius: 24px; border: 1px solid rgba(232, 220, 196, .45); background: rgba(232, 220, 196, .07); }
.calc-label { margin: 0; color: var(--ink-2); font-size: .92rem; }
.calc-value { margin: .1rem 0 .3rem; font-size: clamp(2rem, 8vw, 2.8rem); font-weight: 500; font-variation-settings: "HEXP" 40; font-variant-numeric: tabular-nums; }
.calc-detail { margin: 0; color: var(--ink-2); }
.calc-lines { display: grid; gap: .3rem; margin: .4rem 0 0; }
.calc-result.is-gain .calc-value { color: var(--up); }
.calc-result.is-loss .calc-value { color: var(--down); }
.calc-lines div { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); padding-top: .3rem; }
.calc-lines dt { color: var(--ink-2); }
.calc-lines dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }

.score-block { margin-bottom: 2.4rem; }
.score-rate { margin: 0 0 .25rem; font-size: clamp(1.8rem, 7vw, 2.8rem); line-height: 1.1; font-weight: 600; font-variation-settings: var(--wide); color: var(--gold); }
.score-wait { margin: 0 0 .25rem; font-weight: 500; }
.score-log tbody th { font-weight: 400; line-height: 1.35; min-width: 10rem; }
.score-log td small { display: block; font-size: .82rem; }
.score-log .stamp { margin-top: .2em; }
.score-hit { color: var(--up); }
.score-miss { color: var(--down); }
.score-flat { color: var(--ink-3); }
.week-block { padding: 1.2rem; margin-bottom: 1.2rem; border-radius: 24px; background: var(--glass); border: 1px solid var(--rim); }
.week-block h2 { margin-top: 0; font-size: 1.35rem; }
.recap-part { margin-bottom: 1rem; }
.recap-move { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .6rem; margin-bottom: .3rem; font-size: 1.1rem; }
.recap-move .note { font-size: .9rem; }
.recap-score { font-size: .92rem; color: var(--ink-2); }
.post .moved li { font-weight: 400; }
.release-group { margin-bottom: 2rem; }
.release-group h2 { font-size: 1.2rem; margin-bottom: .3rem; }
bdi { unicode-bidi: isolate; }

/* The tip for adding the site to an iPhone home screen */
.install-tip { position: fixed; z-index: 34; inset-inline: 14px; bottom: calc(var(--dock) + 4px); display: flex; align-items: center; gap: .6rem; padding: .7rem .8rem .7rem 1rem; border-radius: 18px; background: rgba(20, 48, 102, .96); border: 1px solid var(--rim); box-shadow: 0 12px 40px rgba(0, 0, 0, .55); font-size: .92rem; }
.install-tip p { margin: 0; flex: 1; }
.install-tip button { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--rim); background: none; cursor: pointer; font-size: 1.2rem; line-height: 1; }

/* Arabic */
html[lang="ar"] body { line-height: 1.7; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4 { line-height: 1.3; letter-spacing: 0; }
html[lang="ar"] .hero h1 { font-size: clamp(2.3rem, 10vw, 4.8rem); line-height: 1.2; letter-spacing: 0; }
html[lang="ar"] .page-head h1 { line-height: 1.25; }
html[lang="ar"] .price-now, html[lang="ar"] .calc-value, html[lang="ar"] .tile-price { direction: ltr; text-align: right; }
html[lang="ar"] .change-abs, html[lang="ar"] .change-pct, html[lang="ar"] .tile-move, html[lang="ar"] .level-price, html[lang="ar"] .macro-value { direction: ltr; unicode-bidi: isolate; }
html[lang="ar"] .calc input { direction: ltr; text-align: right; }
html[lang="ar"] .post-items, html[lang="ar"] .brief-part ul { padding-inline: 1.15rem; }
html[lang="ar"] .ask input { direction: rtl; }

/* Footer */
.foot { margin-top: 2rem; padding-block: 2rem 2.5rem; border-top: 1px solid var(--line); font-size: .9rem; color: var(--ink-3); }
.foot p { max-width: 60em; }
.foot-warning { color: var(--ink); font-weight: 500; }
.foot-links { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin-top: 1rem; }
.foot-credit { font-size: .85rem; }

@media print {
  .groups, .lang-switch, .install-tip, .hero::before, .hero::after, .page-head::before { display: none; }
  body { background: #fff; color: #000; }
}
