/* IDXDown — minimal black / white / red terminal look */
:root {
  --black: #000; --white: #f5f5f5; --grey: #5e5e5e; --rule: #1a1a1a;
  --panel: #0b0b0b; --edge: #1e1e1e; --red: #e10600; --soft: #bdbdbd;
  --font: 'SF Mono', SFMono-Regular, ui-monospace, Menlo, Consolas, monospace;
  --nav-h: 60px;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body { background: var(--black); color: var(--white); font-family: var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select { font-family: var(--font); }
.red { color: var(--red); }
.muted { color: var(--grey); }

/* ---------- top bar ---------- */
.nav { position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 50; display: flex; align-items: center;
       justify-content: space-between; gap: 16px; padding: 0 24px; background: var(--black); border-bottom: 1px solid var(--rule); }
.tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { text-decoration: none; color: #a8a8a8; font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
          white-space: nowrap; padding: 8px 14px; border: 1px solid #262626; border-radius: 999px;
          transition: color .15s, border-color .15s, background .15s; }
.tabs a:hover { color: var(--white); border-color: #4a4a4a; }
.tabs a.on { color: var(--red); border-color: var(--red); background: rgba(225, 6, 0, .08); }
.mini { font-size: 12px; color: var(--grey); letter-spacing: .08em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mini .l { font-size: 10px; letter-spacing: .18em; margin-right: 8px; }
.mini b { color: var(--white); font-weight: 400; }
body.home #mini { display: none; }

main { padding: calc(var(--nav-h) + var(--strip-h) + 32px) 24px 96px; max-width: 980px; margin: 0 auto; }
:root { --strip-h: 34px; }
.strip { position: fixed; top: var(--nav-h); left: 0; right: 0; height: var(--strip-h); z-index: 45; overflow: hidden;
         background: var(--black); border-bottom: 1px solid var(--rule); display: flex; align-items: center;
         -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
                 mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.strip .rollh { animation: hl var(--dur, 160s) linear infinite; }
.strip:hover .rollh { animation-play-state: paused; }
.strip .th { padding: 0 16px; font-size: 11px; }
body.home .strip { display: none; }
body.home main { max-width: none; padding: var(--nav-h) 0 0; }

/* ---------- shared building blocks ---------- */
.section { display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
           border-bottom: 1px solid var(--rule); padding-bottom: 12px; margin: 8px 0 36px; }
.section .n { color: var(--red); font-size: 11px; letter-spacing: .16em; margin-right: 12px; }
.section .t { font-size: 17px; }
.section > div { flex: 1 0 auto; }
.section .m { color: var(--grey); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; text-align: right; flex: 0 1 auto; }
.panel { background: var(--panel); border: 1px solid var(--edge); border-radius: 10px; padding: 28px 32px 32px; margin-bottom: 22px; }
.label { text-transform: uppercase; letter-spacing: .14em; font-size: 10px; color: var(--grey); margin-bottom: 12px; }
.note { color: var(--grey); font-size: 11px; line-height: 1.7; margin-top: 12px; }
.note b { color: var(--white); font-weight: 400; }
.lede { font-size: 15px; line-height: 1.75; max-width: 720px; }
.lede b { color: var(--red); font-weight: 400; }
.takeaway { font-size: 15px; line-height: 1.7; margin: 20px 0 6px; }
.takeaway b { color: var(--red); font-weight: 400; }

.seg { display: inline-flex; flex-wrap: wrap; }
.seg button { background: transparent; border: 1px solid rgba(245, 245, 245, .2); color: var(--white); height: 32px;
              font-size: 14px; padding: 4px 16px; cursor: pointer; margin-left: -1px; position: relative; transition: color .15s, border-color .15s; }
.seg button:first-child { border-radius: 8px 0 0 8px; margin-left: 0; }
.seg button:last-child { border-radius: 0 8px 8px 0; }
.seg button:hover { color: var(--red); }
.seg button.on { color: var(--red); border-color: var(--red); z-index: 1; background: rgba(225, 6, 0, .04); }

.metrics { display: grid; grid-template-columns: repeat(var(--cols, 2), 1fr); gap: 18px; margin: 24px 0 8px; }
.metric .k { font-size: 10px; letter-spacing: .14em; color: var(--grey); text-transform: uppercase; }
.metric .v { font-size: 28px; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }

.formula { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.formula .l { font-size: 10px; letter-spacing: .18em; color: var(--grey); margin-bottom: 10px; }
.formula .eq { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 12px; }
.formula .term { display: flex; flex-direction: column; }
.formula .v { font-size: 17px; }
.formula .v.r { color: var(--red); }
.formula .c { font-size: 9px; letter-spacing: .1em; color: var(--grey); margin-top: 3px; text-transform: uppercase; }
.formula .op { color: var(--grey); font-size: 17px; }

details.drop { border-top: 1px solid var(--rule); margin-top: 18px; }
details.drop > summary { list-style: none; cursor: pointer; padding: 14px 4px; font-size: 12.5px; letter-spacing: .12em;
                         text-transform: uppercase; color: var(--grey); display: flex; gap: 10px; align-items: center; }
details.drop > summary::-webkit-details-marker { display: none; }
details.drop > summary::before { content: '›'; font-size: 16px; transition: transform .15s; }
details.drop[open] > summary::before { transform: rotate(90deg); }
details.drop.hot { border: 1px solid var(--red); border-radius: 8px; background: rgba(225, 6, 0, .06); margin-top: 24px; }
details.drop.hot > summary { color: var(--red); padding: 14px 16px; }
details.drop.hot:not([open]) { animation: pulse 2.6s ease-in-out infinite; }
details.drop.hot > .inner { padding: 0 18px 20px; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(225, 6, 0, .18); } }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); }
.step { padding: 4px 22px 6px 0; }
.step + .step { padding-left: 22px; border-left: 1px solid var(--rule); }
.step .i { color: var(--red); font-size: 11px; letter-spacing: .14em; }
.step .h { font-size: 14px; margin: 10px 0 8px; }
.step .b { color: var(--grey); font-size: 12px; line-height: 1.65; }
.step .b b { color: var(--white); font-weight: 400; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 11px; border: 1px solid #262626; border-radius: 999px; padding: 5px 11px; }

.navarrow { display: flex; justify-content: center; margin: 72px 0 0; }   /* same pill as the homepage button */

.loading { color: var(--grey); font-size: 12px; letter-spacing: .1em; padding: 40px 0; text-align: center; }

/* ---------- home ---------- */
.hero { position: relative; height: calc(100svh - var(--nav-h)); min-height: 480px; overflow: hidden;
        display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.hero .title { font-size: clamp(22px, 3vw, 36px); letter-spacing: -.02em; }
.clock { display: flex; align-items: baseline; margin: clamp(28px, 6vh, 64px) 0 18px; }
.clock .v { font-size: clamp(48px, 9vw, 110px); font-weight: 200; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.clock .k { font-size: clamp(14px, 1.6vw, 20px); color: var(--grey); margin: 0 clamp(12px, 2.4vw, 34px) 0 6px; }
.clock .k:last-child { margin-right: 0; }
.cap { font-size: 11px; letter-spacing: .2em; color: var(--grey); text-transform: uppercase; }
.hero { padding-bottom: 16vh; }                      /* lifts the countdown above the true centre */
.mkt { font-size: 11px; letter-spacing: .08em; color: #3f3f3f; }
.mkt span { color: var(--grey); }
.bottom { position: absolute; bottom: 28px; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.go { position: relative; display: inline-flex; align-items: center; gap: 18px; padding: 10px 10px 10px 26px; text-decoration: none;
  border: 1px solid rgba(225, 6, 0, .45); border-radius: 999px; overflow: hidden; isolation: isolate;
  background: linear-gradient(90deg, rgba(225, 6, 0, .10), rgba(225, 6, 0, .02));
  box-shadow: 0 0 0 0 rgba(225, 6, 0, .35); animation: glow 3.2s ease-in-out infinite;
  transition: border-color .3s, transform .3s; }
.go::before { content: ""; position: absolute; inset: 0; z-index: -1; transform: translateX(-101%);       /* red fill sweeps in on hover */
  background: var(--red); transition: transform .45s cubic-bezier(.7, 0, .2, 1); }
.go::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; z-index: -1;      /* slow light sweep */
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .10), transparent); animation: sheen 4.5s ease-in-out infinite; }
.go .lbl { color: var(--white); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; transition: color .3s; }
.down { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--red); color: var(--black);
  font-size: 16px; transition: transform .45s cubic-bezier(.7, 0, .2, 1), background .3s, color .3s; }
.go:hover { border-color: var(--red); transform: translateY(-1px); }
.go:hover::before { transform: translateX(0); }
.go:hover .lbl { color: var(--black); }
.go:hover .down { background: var(--black); color: var(--red); transform: translateX(4px) rotate(-45deg); }
@keyframes glow { 50% { box-shadow: 0 0 28px 0 rgba(225, 6, 0, .25); } }
@keyframes sheen { 0%, 60% { left: -60%; } 100% { left: 130%; } }
@media (max-width: 720px) { .go { gap: 12px; padding: 8px 8px 8px 18px; } .go .lbl { font-size: 10px; letter-spacing: .16em; } .down { width: 32px; height: 32px; } }

.tape { position: absolute; top: 0; bottom: 0; width: 200px; overflow: hidden;
        -webkit-mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
                mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent); }
.tape.up { left: 4vw; } .tape.dn { right: 4vw; }
.roll { display: flex; flex-direction: column; }
.tape.up .roll { animation: up var(--dur) linear infinite; }
.tape.dn .roll { animation: dn var(--dur) linear infinite; }
.tape:hover .roll, .tape-h:hover .rollh, .paused .roll, .paused .rollh { animation-play-state: paused; }
@keyframes up { to { transform: translateY(-50%); } }
@keyframes dn { from { transform: translateY(-50%); } to { transform: translateY(0); } }
.tk { display: grid; grid-template-columns: 52px 1fr 70px; gap: 8px; padding: 11px 0; border-bottom: 1px solid #111;
     font-size: 12px; font-variant-numeric: tabular-nums; cursor: pointer; text-align: left; }
.tk:hover { background: #0e0e0e; } .tk:hover .c { color: var(--red); }
.tk .c { letter-spacing: .06em; } .tk .p { color: var(--grey); text-align: right; } .tk .x { text-align: right; }
.dn-c { color: var(--red); } .up-c { color: var(--white); }

.tape-h { display: none; position: absolute; left: 0; right: 0; overflow: hidden;
          -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
                  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.tape-h.l { top: 6vh; } .tape-h.r { bottom: 150px; }
.rollh { display: flex; width: max-content; }
.tape-h.l .rollh { animation: hl var(--dur) linear infinite; }
.tape-h.r .rollh { animation: hr var(--dur) linear infinite; }
@keyframes hl { to { transform: translateX(-50%); } }
@keyframes hr { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.th { font-size: 12px; color: var(--grey); padding: 10px 16px; white-space: nowrap; cursor: pointer; font-variant-numeric: tabular-nums; }
.th b { color: var(--white); font-weight: 400; letter-spacing: .05em; margin-right: 4px; }

/* company card (modal on home, inline on simulator) */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .72); backdrop-filter: blur(3px); z-index: 60;
         display: none; align-items: center; justify-content: center; }
.modal.open { display: flex; }
.card { width: min(440px, 88vw); background: var(--panel); border: 1px solid var(--edge); border-radius: 12px;
        padding: 28px 30px 26px; position: relative; text-align: left; animation: pop .18s ease-out; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }
.card .x { position: absolute; top: 12px; right: 14px; background: none; border: none; color: var(--grey); font-size: 20px; cursor: pointer; }
.card .x:hover { color: var(--red); }
.co .code { color: var(--red); font-size: 11px; letter-spacing: .2em; }
.co .nm { font-size: 20px; margin: 6px 0 4px; }
.co .px { font-size: 12px; color: var(--grey); }
.co .ab { font-size: 13px; color: var(--soft); line-height: 1.65; margin: 16px 0; max-width: 680px; }
.co .pl { font-size: 10px; letter-spacing: .2em; color: var(--grey); margin-bottom: 10px; }
.co.inline { padding-bottom: 22px; margin-bottom: 8px; border-bottom: 1px solid var(--rule); }

/* ---------- market check ---------- */
.mk-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.mk-ctl { display: flex; gap: 10px; flex-wrap: wrap; }
.metric .v.neg { color: var(--red); }
.candles { height: 360px; margin-top: 8px; }

/* ---------- internet sentiment ---------- */
.mood { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 12px; min-width: 220px; }
.mood .bar { display: flex; width: 220px; height: 6px; border-radius: 3px; overflow: hidden; background: #1a1a1a; }
.mood .bar i { display: block; height: 100%; }
.mood .bar .p { background: var(--white); } .mood .bar .u { background: #3a3a3a; } .mood .bar .n { background: var(--red); }
.mood .muted { font-size: 10px; }
.posts { margin-top: 18px; border-top: 1px solid var(--rule); }
.post { display: grid; grid-template-columns: 26px 1fr auto; gap: 14px; align-items: start; padding: 14px 0;
        border-bottom: 1px solid var(--rule); text-decoration: none; }
.post:hover .pt { color: var(--red); }
.post .rk { color: var(--red); font-size: 12px; padding-top: 2px; }
.post .pt { font-size: 14px; line-height: 1.45; transition: color .15s; }
.post .pm { display: block; color: var(--grey); font-size: 11px; margin-top: 4px; }
.tone { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; border: 1px solid #2a2a2a; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.tone.negative { color: var(--red); border-color: rgba(225, 6, 0, .5); }
.tone.positive { color: var(--white); border-color: #555; }
.tone.neutral { color: var(--grey); }

/* ---------- news ---------- */
.day { display: grid; grid-template-columns: 92px 1fr; gap: 0 24px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.day .d { color: var(--grey); font-size: 12px; letter-spacing: .08em; padding-top: 3px; line-height: 1.6; }
.item { margin-bottom: 14px; line-height: 1.45; }
.item:last-child { margin-bottom: 0; }
.item a { text-decoration: none; font-size: 14px; }
.item a:hover { color: var(--red); }
.item .s { color: var(--grey); font-size: 11px; margin-top: 3px; }
.item .s i { color: var(--red); font-style: normal; }

/* ---------- simulator ---------- */
.agrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 40px; }
.agrid > div { min-width: 0; }
.acard { margin-top: 24px; font-size: 13px; }
.acard .k { color: var(--red); font-size: 10px; letter-spacing: .12em; margin-right: 6px; }
.acard .x { color: var(--grey); font-size: 11px; line-height: 1.6; margin: 5px 0 10px; }
/* sliders styled like the old site: red filled track, round red handle, value floating above */
.sl { position: relative; padding-top: 40px; }
.sl .bub { position: absolute; top: 4px; transform: translateX(-50%); color: var(--red); font-size: 14px; white-space: nowrap;
           font-variant-numeric: tabular-nums; pointer-events: none; }
input[type=range].rng { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 4px; outline: none;
                        background: linear-gradient(to right, var(--red) var(--p, 50%), #2b2b2b var(--p, 50%)); cursor: pointer; margin: 8px 0; }
input[type=range].rng::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--red); border: none; }
input[type=range].rng::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--red); border: none; }
input[type=range].rng:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(225, 6, 0, .3); }
/* number boxes with − / + buttons */
.num { display: flex; align-items: center; height: 40px; background: #0a0a0a; border: 1px solid #0a0a0a; border-radius: 8px; transition: border-color .15s; }
.num:focus-within { border-color: var(--red); }
.num input { flex: 1; min-width: 0; height: 100%; background: transparent; border: none; color: var(--white); font-size: 16px; padding: 0 14px; outline: none; -moz-appearance: textfield; }
.num input::-webkit-outer-spin-button, .num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.num button { width: 36px; height: 100%; background: transparent; border: none; color: var(--white); font-size: 18px; cursor: pointer; }
.num button:hover { color: var(--red); }

.tablewrap { overflow-x: auto; border-radius: 8px; border: 1px solid rgba(245, 245, 245, .08); }
.tablewrap table { margin: -1px; width: calc(100% + 2px); }
table.stocks { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
table.stocks th { text-align: right; font-weight: 400; color: #a0a0a0; height: 35px; padding: 0 10px; white-space: nowrap; cursor: help;
                  background: #15161b; border: 1px solid rgba(245, 245, 245, .08); }
table.stocks th:nth-child(2), table.stocks td:nth-child(2) { text-align: left; }
table.stocks td { text-align: right; height: 35px; padding: 0 10px; white-space: nowrap; border: 1px solid rgba(245, 245, 245, .08); }
table.stocks .ck { width: 34px; padding: 0; text-align: center !important; background: #15161b; }
table.stocks .ck span { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid #4a4a4a; vertical-align: middle; }
table.stocks tr.sel .ck span { border-color: var(--red); background: radial-gradient(var(--red) 45%, transparent 50%); }
table.stocks tbody tr { cursor: pointer; transition: background .12s; }
table.stocks tbody tr:hover { background: #121212; }
table.stocks tbody tr.sel { background: rgba(225, 6, 0, .08); }
table.stocks tbody tr.sel td:nth-child(2) { color: var(--red); }
table.stocks td.flag { color: var(--white); font-size: 13px; text-align: left; }
table.stocks td.na { color: #3a3a3a; }
.pager { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.pager button { width: 56px; height: 38px; background: transparent; color: var(--white); border: 1px solid var(--edge); border-radius: 8px;
                font-size: 16px; cursor: pointer; }
.pager button:hover:enabled { border-color: var(--red); color: var(--red); }
.pager button:disabled { opacity: .3; cursor: default; }
.pager .lbl { flex: 1; text-align: center; color: var(--grey); font-size: 11px; letter-spacing: .08em; }
.pager .lbl b { color: var(--white); font-weight: 400; }
.gloss .g { display: grid; grid-template-columns: 90px 1fr; gap: 16px; padding: 10px 4px; border-bottom: 1px solid var(--rule); }
.gloss .g:last-child { border-bottom: none; }
.gloss .n { color: var(--red); font-size: 12px; }
.gloss .d { color: var(--grey); font-size: 12px; line-height: 1.6; }
/* stock picker: dark dropdown with search */
.dd { position: relative; margin-bottom: 18px; }
.dd-btn { width: 100%; height: 40px; background: #0a0a0a; color: var(--white); border: 1px solid #0a0a0a; border-radius: 8px;
          padding: 0 40px 0 14px; font-size: 16px; text-align: left; cursor: pointer; position: relative; }
.dd-btn::after { content: ''; position: absolute; right: 16px; top: 50%; width: 7px; height: 7px; margin-top: -6px;
                 border-right: 1.5px solid var(--white); border-bottom: 1.5px solid var(--white); transform: rotate(45deg); transition: transform .15s; }
.dd.open .dd-btn { border-color: var(--red); }
.dd.open .dd-btn::after { transform: rotate(-135deg); margin-top: -2px; }
.dd-btn b, .dd-opt b { font-weight: 400; color: var(--red); margin-right: 8px; }
.dd-pop { display: none; position: absolute; left: 0; right: 0; top: 46px; z-index: 30; background: #0d0d0d; border: 1px solid var(--edge);
          border-radius: 10px; box-shadow: 0 16px 40px rgba(0, 0, 0, .6); overflow: hidden; }
.dd.open .dd-pop { display: block; animation: pop .14s ease-out; }
.dd-q { width: 100%; background: transparent; border: none; border-bottom: 1px solid var(--rule); color: var(--white);
        font-size: 14px; padding: 12px 14px; outline: none; }
.dd-list { max-height: 320px; overflow-y: auto; }
.dd-opt { padding: 10px 14px; font-size: 14px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-opt:hover { background: #161616; }
.dd-opt.on { background: rgba(225, 6, 0, .1); }
.chart { width: 100%; height: 280px; margin-top: 14px; }
.method li { color: var(--grey); font-size: 12px; line-height: 1.7; margin: 0 0 8px 18px; }
.method b { color: var(--white); font-weight: 400; }

/* ---------- argentina ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 28px; }
.stat { padding: 18px 16px 6px 0; }
.stat + .stat { padding-left: 16px; border-left: 1px solid var(--rule); }
.stat .v { font-size: 27px; letter-spacing: -.02em; }
.stat .v.r { color: var(--red); }
.stat .c { font-size: 10px; letter-spacing: .08em; color: var(--grey); margin-top: 8px; text-transform: uppercase; line-height: 1.5; }
.tl { border-left: 1px solid var(--rule); margin-top: 4px; }
.tl .e { display: grid; grid-template-columns: 120px 1fr; gap: 18px; padding: 14px 0 14px 22px; position: relative; }
.tl .e::before { content: ''; position: absolute; left: -4px; top: 20px; width: 7px; height: 7px; border-radius: 50%; background: var(--grey); }
.tl .e.hot::before { background: var(--red); }
.tl .d { color: var(--grey); font-size: 12px; padding-top: 2px; }
.tl .e.hot .d { color: var(--red); }
.tl .h { font-size: 14px; }
.tl .b { color: var(--grey); font-size: 12px; line-height: 1.6; margin-top: 4px; }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; margin: 20px 0 8px; }
.range .lab { font-size: 14px; color: var(--white); margin-bottom: 4px; }
#arChart { height: 420px; }

/* ---------- about ---------- */
.about .top { display: flex; flex-wrap: wrap; gap: 8px 40px; font-size: 13px; margin-bottom: 22px; }
.about .k { color: var(--red); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; margin-right: 8px; }
.about a { text-decoration: none; border-bottom: 1px solid var(--grey); }
.about a:hover { color: var(--red); border-color: var(--red); }
.about p { color: var(--grey); font-size: 12px; line-height: 1.75; margin-bottom: 12px; }
.about p b { color: var(--white); font-weight: 400; }
.about .c { color: var(--grey); font-size: 11px; letter-spacing: .1em; margin-top: 18px; }

/* ---------- tablets & phones ---------- */
@media (max-width: 1000px) {
  .tape { display: none; }
  /* stack everything in order and space it evenly, so nothing overlaps on short screens */
  .hero { justify-content: space-evenly; padding: 8px 0 18px; }
  .tape-h, .tape-h.l, .tape-h.r { display: block; position: relative; top: auto; bottom: auto; width: 100%; }
  .tape-h.l { order: 0; } .hero .title { order: 1; } .clock { order: 2; margin: 0; } .cap { order: 3; }
  .tape-h.r { order: 4; } .bottom { order: 5; position: static; gap: 18px; }
  .cap { letter-spacing: .12em; font-size: 10px; line-height: 1.8; padding: 0 16px; }
  .mkt { font-size: 10px; }
  .clock .v { font-size: clamp(34px, 12vw, 110px); }
  .clock .k { margin-right: clamp(6px, 2.4vw, 34px); }
}
@media (max-width: 640px) {
  :root { --nav-h: 52px; }
  .nav { padding: 0 14px; }
  .tabs { gap: 6px; }
  .tabs a { font-size: 11px; padding: 6px 10px; letter-spacing: .1em; }
  .mini { font-size: 11px; }
  .mini .l { display: none; }
  main { padding: calc(var(--nav-h) + 22px) 14px 80px; }
  .panel { padding: 22px 18px 24px; }
  .section { flex-direction: column; align-items: flex-start; gap: 6px; }
  .section > div { width: 100%; }
  .section .m { text-align: left; }
  .day { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .agrid { grid-template-columns: minmax(0, 1fr); }
  .step { padding: 16px 0 !important; border-left: none !important; }
  .step + .step { border-top: 1px solid var(--rule); }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(odd) { padding-left: 0; border-left: none; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .tl .e { grid-template-columns: 1fr; gap: 4px; }
  .metric .v { font-size: 24px; }
  .formula .v, .formula .op { font-size: 14px; }
  .pager .wide { display: none; }
  .range { grid-template-columns: 1fr; }
  table.stocks { font-size: 13px; }
  .lede, .takeaway { font-size: 14px; }
  #arChart { height: 360px; }
  .candles { height: 300px; }
  .mood { align-items: flex-start; min-width: 0; }
  .post { grid-template-columns: 22px 1fr; } .post .tone { grid-column: 2; justify-self: start; }
  .metrics[style*='--cols:4'] { grid-template-columns: 1fr 1fr; }
}

/* panel titles (Market check, Internet sentiment, Latest headlines): read as headings, not captions */
.label.ptitle { font-size: 15px; font-weight: 700; color: var(--white, #fff); letter-spacing: .14em; margin-bottom: 10px !important; }
.label.ptitle::before { content: ""; display: inline-block; width: 8px; height: 8px; background: #e10600; margin-right: 10px; vertical-align: 1px; }

/* faint falling JCI chart behind the countdown */
.hero .ghost { position: absolute; left: calc(4vw + 240px); right: calc(4vw + 240px); width: auto; top: 22%; height: 50%; z-index: 0; pointer-events: none; opacity: .22;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 70%, transparent), linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
  -webkit-mask-composite: source-in; mask-composite: intersect;
          mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 70%, transparent), linear-gradient(to right, transparent, #000 4%, #000 96%, transparent); }
@media (max-width: 1000px) { .hero .ghost { left: 16px; right: 16px; } }
.hero .title, .hero .clock, .hero .cap { position: relative; z-index: 1; } .hero .tape, .hero .tape-h, .hero .bottom { z-index: 1; }

/* Argentina photos: desaturated, darkened, caption over a fade */
.photo { position: relative; margin: 0 0 24px; border-radius: 14px; overflow: hidden; border: 1px solid #1c1c1c; background: #0b0b0b; }
.photo img { display: block; width: 100%; height: 280px; object-fit: cover; filter: grayscale(1) contrast(1.1) brightness(.75); transition: filter .6s; }
.photo:hover img { filter: grayscale(.3) contrast(1.05) brightness(.85); }
.photo.hero-ph img { height: 420px; }
.photo figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 22px 16px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  background: linear-gradient(to top, rgba(0,0,0,.92), transparent); }
.photo figcaption span { color: #fff; font-size: 14px; }
.photo.hero-ph figcaption span { font-size: clamp(16px, 2vw, 22px); }
.photo figcaption small { color: #8a8a8a; font-size: 10px; letter-spacing: .06em; white-space: nowrap; }
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) {
  .photos { grid-template-columns: 1fr; gap: 0; }
  .photo img { height: 220px; } .photo.hero-ph img { height: 300px; }
  .photo figcaption { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* how to zoom the candlestick charts */
.zhint { margin: 10px 0 0; font-size: 11px; color: #8a8a8a; letter-spacing: .03em; line-height: 1.6; }
.zhint b { color: #e10600; font-weight: 500; }

/* live price badge (nav) + flash when a ticker's price moves */
.live { display: inline-flex; align-items: center; gap: 6px; margin-right: 14px; font-size: 10px; letter-spacing: .18em; color: var(--grey); vertical-align: 1px; }
.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #444; }
.live.on { color: #e10600; }
.live.on::before { background: #e10600; animation: pulse 1.6s ease-in-out infinite; }
.live.closed::before { background: #777; }
@keyframes pulse { 50% { opacity: .25; } }
.up-f { animation: upf 1.2s ease-out; } .dn-f { animation: dnf 1.2s ease-out; }
@keyframes upf { from { background: rgba(255,255,255,.18); } to { background: transparent; } }
@keyframes dnf { from { background: rgba(225,6,0,.28); } to { background: transparent; } }
@media (max-width: 720px) { .live { margin-right: 8px; letter-spacing: .1em; } }

/* Candles / Line switch above the stock chart */
.chart-ctl { display: flex; justify-content: flex-end; margin: 18px 0 4px; gap: 8px; flex-wrap: wrap; }
.mk-ctl { display: flex; flex-wrap: wrap; gap: 8px; }

/* "Are we cooked?" poll */
.poll .pmeta { font-size: 11px; color: var(--grey); letter-spacing: .1em; text-transform: uppercase; }
.poll .pmeta b { color: var(--white); font-weight: 400; font-size: 14px; }
.poll .opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0 14px; }
.poll .opt { position: relative; text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 16px;
  background: #0b0b0b; border: 1px solid #222; border-radius: 12px; color: var(--white); font: inherit; cursor: pointer;
  transition: border-color .25s, transform .25s, background .25s; overflow: hidden; }
.poll .opt:hover { border-color: rgba(225, 6, 0, .6); transform: translateY(-2px); }
.poll .opt:disabled { opacity: .6; cursor: wait; }
.poll .heat { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--red); }
.poll .opt[data-k="stay"] .heat { color: var(--white); }
.poll .nm { font-size: 16px; }
.poll .why { font-size: 11px; color: var(--grey); line-height: 1.55; }
.poll .bar { display: block; height: 4px; background: #1a1a1a; border-radius: 4px; margin-top: 10px; overflow: hidden; opacity: 0; transition: opacity .3s; }
.poll .bar i { display: block; height: 100%; width: 0; background: #555; border-radius: 4px; transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.poll .pc { position: absolute; top: 16px; right: 18px; font-size: 22px; font-variant-numeric: tabular-nums; }
.poll.revealed .bar { opacity: 1; }
.poll .opt.lead .bar i { background: var(--red); }
.poll .opt.mine { border-color: var(--red); background: linear-gradient(180deg, rgba(225, 6, 0, .10), #0b0b0b 70%); cursor: default; }
.poll .opt.mine::after { content: "YOUR VOTE"; position: absolute; top: 48px; right: 18px; font-size: 9px; letter-spacing: .2em; color: var(--red); }
.poll.closed .opt { cursor: default; opacity: .55; pointer-events: none; }
@media (max-width: 720px) { .poll .opts { grid-template-columns: 1fr; } }

/* up/down markers: small CSS triangles (the ▲▼ glyphs sit too big and low in SF Mono) */
.ar { display: inline-block; width: 0; height: 0; margin-right: 5px; vertical-align: .12em;
  border-left: 3.5px solid transparent; border-right: 3.5px solid transparent; }
.up-c .ar { border-bottom: 6px solid currentColor; }
.dn-c .ar { border-top: 6px solid currentColor; }

/* no blue browser focus ring / tap flash after clicking; keyboard users still get a red outline */
button, a, .opt { -webkit-tap-highlight-color: transparent; }
button:focus, a:focus { outline: none; }
button:focus-visible, a:focus-visible { outline: 1px solid var(--red); outline-offset: 2px; }

/* ================================================================
   Polish pass (Emil Kowalski design-engineering principles)
   ================================================================ */
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);        /* strong ease-out: instant feedback */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);    /* on-screen movement */
}

/* 1. Everything pressable answers the press (subtle, 160ms) */
.tabs a, .seg button, .num button, .pager button, .dd-btn, .opt, .go, .tk, .th, .post, .card .x, details.drop > summary {
  transition-property: color, border-color, background-color, transform;
  transition-duration: 160ms; transition-timing-function: var(--ease-out);
}
.tabs a:active, .seg button:active, .num button:active, .pager button:active:enabled, .dd-btn:active,
.poll .opt:active:not(:disabled), .card .x:active, details.drop > summary:active { transform: scale(0.97); }
.go:active { transform: scale(0.98); }

/* 2. Snappier, purposeful curves (UI motion stays under ~300ms) */
.go { transition: border-color 200ms ease, transform 200ms var(--ease-out); }
.go::before { transition: transform 280ms var(--ease-in-out); }
.go .lbl { transition: color 200ms ease; }
.down { transition: transform 280ms var(--ease-out), background-color 200ms ease, color 200ms ease; }
.poll .opt { transition: border-color 200ms ease, background-color 200ms ease, transform 200ms var(--ease-out); }
.photo img { transition: filter 300ms ease; }
details.drop > summary::before { transition: transform 200ms var(--ease-out); }

/* 3. Popovers grow from their trigger, never from nothing */
.dd-pop { transform-origin: top center; }
.dd.open .dd-pop { animation: dd-in 160ms var(--ease-out); }
@keyframes dd-in { from { opacity: 0; transform: translateY(-4px) scale(0.97); } }
.card.co { animation: card-in 220ms var(--ease-out); }          /* modal: stays centred */
@keyframes card-in { from { opacity: 0; transform: translateY(6px) scale(0.98); } }

/* 4. Poll results: bars grow with transform (no layout), staggered */
.poll .bar i { width: 100%; transform: scaleX(0); transform-origin: left center;
  transition: transform 600ms var(--ease-out), background-color 200ms ease; }

/* 5. Hover effects only where a real pointer can hover (no sticky taps on phones) */
@media (hover: none) {
  .go:hover { transform: none; border-color: rgba(225, 6, 0, .45); }
  .go:hover::before { transform: translateX(-101%); }
  .go:hover .lbl { color: var(--white); }
  .go:hover .down { background: var(--red); color: var(--black); transform: none; }
  .poll .opt:hover { transform: none; border-color: #222; }
  .poll .opt.mine:hover { border-color: var(--red); }
  .photo:hover img { filter: grayscale(1) contrast(1.1) brightness(.75); }
  .tk:hover, table.stocks tbody tr:hover { background: transparent; }
}

/* 6. Respect reduced motion: keep fades and colour, drop movement */
@media (prefers-reduced-motion: reduce) {
  .roll, .rollh, .strip .rollh { animation: none !important; }
  .go, .go::after, .live.on::before, details.drop.hot:not([open]) { animation: none !important; }
  .go::after { display: none; }
  .tabs a:active, .seg button:active, .poll .opt:active, .go:active, .go:hover, .poll .opt:hover, .go:hover .down { transform: none !important; }
  .card.co, .dd.open .dd-pop { animation: fade-in 150ms ease !important; }
  .poll .bar i { transition: transform 0ms, background-color 200ms ease; }
  .tape, .tape-h, .strip { overflow: auto; }   /* still browsable by scrolling */
}
@keyframes fade-in { from { opacity: 0; } }

/* ================================================================
   Red discipline: red means bad news (falling, negative, downgrade)
   or the one thing to do (main button, LIVE). Everything else is neutral.
   ================================================================ */
.tabs a.on { color: var(--white); border-color: rgba(245, 245, 245, .55); background: rgba(255, 255, 255, .06); }
.section .n, .step .i, .gloss .n, .post .rk, .co .code, .acard .k, .about .k, .item .s i { color: var(--grey); }
.lede b, .takeaway b { color: var(--white); font-weight: 600; }
.seg button:hover, .num button:hover, .card .x:hover, .tk:hover .c, .about a:hover, .item a:hover { color: var(--white); }
.seg button.on { color: var(--black); border-color: var(--white); background: var(--white); }
.post:hover .pt { color: var(--soft); }
.item a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #555; }
.about a:hover { border-color: var(--white); }
.pager button:hover:enabled { border-color: var(--white); color: var(--white); }
.num:focus-within, .dd.open .dd-btn { border-color: rgba(245, 245, 245, .5); }
.dd-btn b, .dd-opt b { color: var(--white); font-weight: 600; }
.dd-opt.on { background: rgba(255, 255, 255, .07); }
table.stocks tbody tr.sel { background: rgba(255, 255, 255, .05); }
table.stocks tbody tr.sel td:nth-child(2) { color: var(--white); font-weight: 600; }
table.stocks tr.sel .ck span { border-color: var(--white); background: radial-gradient(var(--white) 45%, transparent 50%); }
.sl .bub { color: var(--white); }
input[type=range].rng { background: linear-gradient(to right, var(--white) var(--p, 50%), #2b2b2b var(--p, 50%)); }
input[type=range].rng::-webkit-slider-thumb { background: var(--white); }
input[type=range].rng::-moz-range-thumb { background: var(--white); }
input[type=range].rng:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(255, 255, 255, .25); }
.label.ptitle::before { background: var(--white); }
.zhint b { color: var(--white); }
button:focus-visible, a:focus-visible { outline-color: var(--white); }
/* poll: only the full downgrade reads red */
.poll .heat { color: var(--grey); }
.poll .opt[data-k="standalone"] .heat { color: var(--red); }
.poll .opt:hover { border-color: rgba(245, 245, 245, .35); }
.poll .opt.lead .bar i { background: var(--white); }
.poll .opt.mine { border-color: rgba(245, 245, 245, .7); background: linear-gradient(180deg, rgba(255, 255, 255, .06), #0b0b0b 70%); }
.poll .opt.mine::after { color: var(--white); }
@media (hover: none) { .poll .opt.mine:hover { border-color: rgba(245, 245, 245, .7); } }

/* ================================================================
   News: one clear lead section, more air between the rest
   ================================================================ */
body[data-tab="news"] .panel { margin-bottom: 40px; }
body[data-tab="news"] .panel.primary { padding: 34px 36px 34px; border-color: #2a2a2a; }
body[data-tab="news"] .panel.primary .label.ptitle { font-size: 17px; }
body[data-tab="news"] .panel:not(.primary) { background: transparent; border-color: #171717; }
body[data-tab="news"] .photos { margin-bottom: 40px; }

/* ================================================================
   Phone pass
   ================================================================ */
@media (max-width: 720px) {
  main { padding-top: calc(var(--nav-h) + var(--strip-h) + 22px); }
  /* nav: the tabs get the room; the countdown lives on Home anyway */
  #mini { display: none; }
  .nav { gap: 8px; }
  .tabs { flex: 1 1 auto; min-width: 0; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { flex: 0 0 auto; min-height: 36px; display: inline-flex; align-items: center; }
  .live { margin-right: 0; font-size: 9px; }
  /* bigger tap targets */
  .seg button { min-height: 40px; }
  .item a { display: inline-block; padding: 3px 0; line-height: 1.5; }
  /* wide stock table: show that it scrolls sideways */
  .tablewrap { position: relative; -webkit-mask-image: linear-gradient(to right, #000 88%, transparent); mask-image: linear-gradient(to right, #000 88%, transparent); }
  .tablewrap::before { content: "Swipe the table →"; display: block; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--grey); margin-bottom: 8px; }
  body[data-tab="news"] .panel { margin-bottom: 28px; }
  body[data-tab="news"] .panel.primary { padding: 24px 18px 26px; }
}

/* Quieter selected toggles: clearly "on", but the data stays the brightest thing */
.seg button.on { color: var(--white); background: rgba(255, 255, 255, .09); border-color: rgba(245, 245, 245, .45); }
/* Secondary News cards: a faint fill so they read as deliberate, still lighter than Market check */
body[data-tab="news"] .panel:not(.primary) { background: #080808; border-color: #1a1a1a; }

/* Poll: the card you voted for reads as chosen, not faded, and stays aligned with the others */
.poll .opt.mine, .poll .opt.mine:hover, .poll .opt.mine:active { transform: none; }
.poll .opt.mine .heat { color: var(--white); }
.poll .opt.mine[data-k="standalone"] .heat { color: var(--red); }
.poll.revealed .opt:not(.mine) .nm { color: var(--soft); }

/* nav: thin divider between the market-status badge and the countdown */
.live + #mini { border-left: 1px solid #2a2a2a; padding-left: 14px; }

/* Poll after voting: only your pick is white; everything else steps back to grey */
.poll.revealed .opt:not(.mine) .heat { color: var(--grey); }
.poll.revealed .opt:not(.mine)[data-k="standalone"] .heat { color: rgba(225, 6, 0, .55); }
.poll.revealed .opt:not(.mine) .pc { color: var(--soft); }
.poll .opt.lead .bar i { background: #6a6a6a; }
.poll .opt:not(.mine) .bar i { background: #4a4a4a; }
.poll .opt.lead:not(.mine) .bar i { background: #8a8a8a; }
.poll .opt.mine .bar i { background: var(--white); }
.poll .opt.mine .pc, .poll .opt.mine .nm { color: var(--white); }
