/* Market clock page. Colours and fonts come from /styles.css. */
.clock-hero { padding-block: clamp(36px, 6vw, 72px) 12px; }
.clock-hero h1 { font-size: clamp(2.6rem, 7vw, 5.4rem); }
.clock-hero h1 span { display: block; }
.clock-hero .lede { margin: 18px 0 0; }

.clock-grid { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; padding-block: 28px clamp(40px, 6vw, 80px); }
.dial-wrap { position: sticky; top: 90px; }
#dial { width: 100%; height: auto; display: block; }
.readout { text-align: center; margin: 4px 0 14px; }
.readout .time { font-family: var(--font-display); font-weight: 900; font-size: clamp(2.4rem, 7vw, 3.6rem); color: var(--silver); letter-spacing: .02em; line-height: 1; font-variant-numeric: tabular-nums; }
.readout .date, .readout .utc { color: var(--silver-dim); font-size: .95rem; margin-top: 6px; }
.tz-pick { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin: 0 0 16px; }
.tz-pick label { color: var(--silver-dim); font-size: .92rem; }
.tz-pick select { background: var(--panel); color: var(--silver); border: 1px solid var(--line-strong); border-radius: 10px; padding: .6em .9em; font: inherit; max-width: 100%; min-width: 220px; }

/* dial */
.ring-outer { fill: #060b07; stroke: var(--line-strong); stroke-width: 2; }
.ring-face { fill: var(--pit); stroke: var(--line); stroke-width: 1; }
.tick { stroke: var(--line-strong); stroke-width: 1; }
.tick.major { stroke: var(--silver-dim); stroke-width: 2; }
.hour { fill: var(--silver-dim); font: 600 16px var(--font-body); }
.track { fill: none; stroke: rgba(104, 200, 62, 0.07); }
.win { fill: none; stroke: var(--green-deep); stroke-opacity: .55; stroke-linecap: butt; transition: stroke-opacity .2s, stroke .2s; }
.win.on { stroke: var(--green); stroke-opacity: 1; filter: drop-shadow(0 0 5px rgba(92, 207, 42, .55)); }
.win.always { stroke: var(--brass); stroke-opacity: .5; }
.win.always.on { stroke: var(--brass); stroke-opacity: .5; filter: none; }
.arclabel { fill: var(--silver); font: 700 12.5px var(--font-body); letter-spacing: .05em; pointer-events: none; }
.arclabel.on { fill: #031004; }
.arclabel.always { fill: var(--silver); font-size: 11.5px; }
.dim .win { stroke-opacity: .18; filter: none; }
.dim .win.hl { stroke-opacity: 1; stroke: var(--silver); }
.dim .arclabel { opacity: .3; }
.dim .arclabel.hl { opacity: 1; fill: #031004; }
.hand { stroke: var(--silver); stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(232, 234, 229, .5)); }
.hub { fill: var(--silver); stroke: var(--pit); stroke-width: 3; }

/* the list */
.now-open { font-size: 1.2rem; color: var(--silver); margin: 0 0 6px; }
.overlap { margin: 0 0 22px; color: var(--ash); }
#markets { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mrow { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.mrow.open { border-color: var(--line-strong); box-shadow: inset 3px 0 0 var(--green); }
.mrow:hover, .mrow:focus-visible { border-color: var(--green); }
.mhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.mhead strong { color: var(--silver); font-size: 1.1rem; }
.mhead .ex { color: var(--silver-dim); font-size: .9rem; }
.mhead .state { margin-left: auto; font-size: .92rem; color: var(--silver-dim); font-variant-numeric: tabular-nums; }
.mrow.open .state { color: var(--green); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--silver-dim); align-self: center; flex: none; }
.mrow.open .dot { background: var(--green); box-shadow: 0 0 10px var(--green); }
.when { margin-top: 6px; color: var(--ash); font-variant-numeric: tabular-nums; }
.zone { margin-top: 2px; color: var(--silver-dim); font-size: .88rem; }
.zone .warn { color: var(--brass); }

.notes { border-top: 1px solid var(--line); padding-block: clamp(32px, 5vw, 56px); }
.notes h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin-bottom: 14px; }
.notes ul { margin: 0; padding-left: 1.2em; max-width: 70ch; }
.notes li { margin: 0 0 8px; }
.nojs { padding: 16px; border: 1px solid var(--line-strong); border-radius: 12px; }

@media (max-width: 980px) {
  .clock-grid { grid-template-columns: 1fr; }
  .dial-wrap { position: static; max-width: 560px; margin-inline: auto; }
}
@media (max-width: 560px) {
  .hour.minor { display: none; }
  .hour { font-size: 22px; }
  .arclabel { font-size: 15px; }
  .mhead .state { margin-left: 0; flex-basis: 100%; }
}

/* share pop-up */
.share-dialog { width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; margin: auto; padding: 22px; background: #050806; color: var(--silver);
  border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: 0 24px 80px rgba(0, 0, 0, .8), 0 0 60px rgba(92, 207, 42, .12); font: 400 .95rem/1.45 var(--font-body); }
.share-dialog::backdrop { background: rgba(0, 0, 0, .82); backdrop-filter: blur(3px); }
.share-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.share-head h2 { margin: 0; font: 900 1.6rem/1 var(--font-display); text-transform: uppercase; color: var(--silver); }
.share-x { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .14); background: transparent; color: var(--silver-dim); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.share-x:hover { color: var(--green); border-color: var(--green); }
.share-label { display: block; margin: 0 0 6px; color: var(--silver-dim); font-size: .85rem; }
.share-dialog textarea { display: block; width: 100%; box-sizing: border-box; min-height: 96px; resize: none; margin: 0 0 12px; padding: 10px 12px; background: #0b110d; color: var(--silver);
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 10px; font: inherit; font-size: .92rem; }
.share-dialog textarea:focus { outline: none; border-color: var(--green); }
.share-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.share-dialog .btn { width: 100%; padding: .8em .6em; font-size: .875rem; border-radius: 8px; white-space: nowrap; }
.share-native { margin-bottom: 8px; }
.share-dialog [hidden] { display: none; }
.share-fine { margin: 12px 0 0; font-size: .78rem; color: var(--silver-dim); }
.share-offscreen { position: fixed; left: -9999px; opacity: 0; }
.tz-pick .btn { width: auto; }

.share-stage { display: flex; justify-content: center; margin: 0 0 12px; min-height: 120px; align-items: center; }
.share-stage img { display: block; width: auto; max-width: 100%; max-height: 330px; border-radius: 10px; border: 1px solid var(--line); background: #000; }
.share-stage img:not([src]) { display: none; }
.share-wait, .share-fail { display: none; margin: 0; color: var(--silver-dim); }
.share-stage.busy .share-wait { display: block; }
.share-stage.failed .share-fail { display: block; }
.share-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }

/* pre-market and after-hours */
.win.ext { stroke: #b9bfb4; stroke-opacity: .55; stroke-dasharray: 4 3; }
.win.ext.on { stroke: var(--brass); stroke-opacity: 1; stroke-dasharray: 4 3; filter: none; }
.arclabel.ext { fill: var(--silver); letter-spacing: .08em; }
.arclabel.ext.on { fill: #1a1405; }
.dim .win.ext.hl { stroke: var(--silver); }
.mrow.pre { border-color: rgba(201, 170, 92, .55); box-shadow: inset 3px 0 0 var(--brass); }
.mrow.pre .state { color: var(--brass); }
.mrow.pre .dot { background: var(--brass); box-shadow: 0 0 10px var(--brass); }
.extra { margin-top: 2px; color: var(--silver-dim); font-size: .9rem; font-variant-numeric: tabular-nums; }

/* world map */
.clock-hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 440px); gap: clamp(16px, 3vw, 40px); align-items: end; }
.hero-map { padding-bottom: 6px; }
.hero-map svg { width: 100%; height: auto; display: block; }
.land { fill: rgba(104, 200, 62, .13); stroke: rgba(104, 200, 62, .42); stroke-width: .35; stroke-linejoin: round; }
.dot-closed { fill: #6d746a; stroke: #030504; stroke-width: .8; }
.dot-open { fill: var(--green); stroke: #030504; stroke-width: .8; filter: drop-shadow(0 0 3px rgba(92, 207, 42, .9)); }
.dot-ext { fill: var(--brass); stroke: #030504; stroke-width: .8; filter: drop-shadow(0 0 3px rgba(201, 170, 92, .8)); }
.halo { fill: none; }
.map-key { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: flex-end; margin: 6px 0 0; font-size: .82rem; color: var(--silver-dim); }
.map-key i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
@media (max-width: 760px) { .clock-hero .wrap { grid-template-columns: 1fr; } .map-key { justify-content: flex-start; } }

.win.next:not(.ext) { stroke-opacity: .5; }
.win.next.ext { stroke-opacity: .4; }

.nav-share { font: inherit; font-size: 0.9375rem; color: var(--ash); background: none; border: 0; border-bottom: 1px solid transparent; padding: 6px 0; cursor: pointer; }
.nav-share:hover { color: var(--silver); border-bottom-color: var(--green); }
