/* Mockup: what the next version adds on top of styles.css. Nothing here changes the site's layout tokens. */

/* ---------- Page turns between pages (View Transitions; browsers without them just load the page) ---------- */
@view-transition { navigation: auto; }
header.bar { view-transition-name: masthead; }
.dl-w { view-transition-name: dateline; }
::view-transition-old(root) { animation: 180ms ease-out both turn-out; }
::view-transition-new(root) { animation: 240ms ease-in both turn-in; }
/* the masthead and dateline stay put: no travel from where they sat on the old page (the dateline may have been scrolled away) */
::view-transition-group(masthead), ::view-transition-group(dateline) { animation: none; }
::view-transition-old(dateline) { display: none; }
@keyframes turn-out { to { opacity: 0; } }
@keyframes turn-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }

/* ---------- Ink: links soak in on hover, like ink on newsprint ---------- */
main a:not(.button):not(.chip):not(.ctl) { text-decoration-thickness: 1px; text-underline-offset: .16em; transition: text-decoration-thickness var(--t-fast) var(--ease), text-shadow var(--t) var(--ease); }
main a:not(.button):not(.chip):not(.ctl):hover { text-decoration-thickness: 2px; text-shadow: 0 0 .5px currentColor, 0 0 1.4px rgba(15, 14, 13, .18); }
:root[data-theme="dark"] main a:not(.button):not(.chip):not(.ctl):hover { text-shadow: 0 0 .5px currentColor, 0 0 1.6px rgba(247, 245, 240, .22); }

/* ---------- The daily strip: the dateline gains today's Deep File case and the word of the day ---------- */
.dateline .dl-tag a { color: inherit; text-decoration: none; }
.dateline .dl-tag a:hover { color: var(--red-text); }
.dateline .dl-tag .sep { margin: 0 .55em; color: var(--muted); }
.dateline .dl-tag .wd { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; text-transform: none; font-size: 1.15em; }
:root[data-theme="dark"] .dateline .dl-issue::before { content: "Night edition \00B7  "; color: var(--gold); }
@media (max-width: 47.5rem) { .dateline .dl-tag .wdw { display: none; } }

/* ---------- Issue numbers in the display serif ---------- */
.no-big { font-family: var(--serif); font-weight: 500; font-style: italic; font-size: 1.5em; letter-spacing: 0; text-transform: none; vertical-align: -0.1em; margin-right: .1em; }

/* ---------- The globe that unfolds into the map (next-unfold.js) ---------- */
.unfold { position: absolute; inset: 0; z-index: 3; display: block; width: 100%; height: 100%; background: #1A1613; transition: opacity 600ms var(--ease); }
.unfold.done { opacity: 0; pointer-events: none; }
.unfold:not(.done) { cursor: pointer; }
/* the map in the same hexagon dots as the globe */
svg.map.dotted > g[transform], svg.map.dotted .borders { display: none; }   /* no outlines, borders or grid under the dots, also when zoomed in */
.unfold-go { position: absolute; left: 50%; bottom: 1.1rem; z-index: 5; transform: translateX(-50%); min-height: 2.75rem; padding: 0 1.1rem; border: 1px solid rgba(247, 245, 240, .5); background: rgba(26, 22, 19, .7); color: #F7F5F0; font: 600 .8125rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.unfold-go:hover { background: #F7F5F0; color: #1A1613; }
.unfold-go[hidden] { display: none; }
@media (max-width: 47.5rem) { .unfold-go { left: auto; right: .6rem; bottom: .6rem; transform: none; min-height: 2.5rem; padding: 0 .85rem; } }
/* the real map's pins drop in one at a time once the net has opened */
.pins.drop .pin { animation: pin-drop 520ms cubic-bezier(.3, 1.5, .5, 1) backwards; }
@keyframes pin-drop { from { translate: 0 -40px; opacity: 0; } 60% { opacity: 1; } to { translate: 0 0; opacity: 1; } }

/* ---------- Glossary preview cards ---------- */
.gt { text-decoration: underline dotted var(--gold); text-decoration-thickness: 1.5px; text-underline-offset: .18em; cursor: help; }
.gl-card { position: absolute; z-index: 60; width: min(22rem, calc(100vw - 2rem)); padding: 1rem 1.1rem 1.05rem; background: var(--card); color: var(--fg); border: 1px solid var(--rule); border-top: 3px solid var(--gold); box-shadow: 0 14px 40px rgba(15, 14, 13, .18); font-family: var(--sans); opacity: 0; transform: translateY(4px); transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.gl-card.show { opacity: 1; transform: none; }
.gl-card .t { margin: 0 0 .15rem; font: 500 1.2rem/1.2 var(--serif); }
.gl-card .f { margin: 0 0 .5rem; font-size: .8rem; color: var(--muted); }
.gl-card .d { margin: 0; font: 400 .98rem/1.45 var(--serif); }
.gl-card .s { margin: .6rem 0 0; font-size: .75rem; color: var(--muted); }
.gl-card a { font-size: .8125rem; font-weight: 600; }

/* ---------- Keyboard hint ---------- */
.kbd { display: inline-block; min-width: 1.5em; padding: .05em .4em; border: 1px solid var(--chip-line); border-bottom-width: 2px; font: 600 .75rem/1.4 var(--sans); text-align: center; }

/* ---------- Breathing room: fewer, larger steps between things; nothing changes its order ---------- */
:root { --sec: clamp(5rem, 9vw, 8.5rem); --gutter: clamp(1.25rem, 4.6vw, 4.5rem); --cg: clamp(1.5rem, 2.4vw, 2.5rem); --w: 88rem; }
@media (max-width: 77rem) { :root { --gutter: clamp(1rem, 3.2vw, 2.5rem); } }   /* below the full header width the original margins stay, so the header and dateline do not wrap */   /* phones keep the original margins, so the header does not wrap before site.js tidies it */
body { line-height: 1.6; }
.sec-h { padding-top: 1.1rem; margin-bottom: clamp(2.25rem, 4vw, 3.5rem); }
.sec-h h2, h2 { letter-spacing: -0.015em; }
.front { padding-top: clamp(2.5rem, 5vw, 4.5rem); row-gap: 3.5rem; }
.front-rail { gap: 3rem; }
.rail-b { padding-top: 1rem; }
.front-h { margin-top: 1.25rem; }
.front-sum { line-height: 1.6; }
.dfb-t { padding: clamp(2rem, 5vw, 4rem); gap: 1.2rem; }
.reg a { padding: 1.05rem 0.75rem 1.1rem; }
.articles .row { padding-top: 1.1rem; padding-bottom: 1.15rem; }
.dateline { padding: 0.8rem 0; }
.mast { padding-top: clamp(2rem, 4vw, 3rem); padding-bottom: clamp(3.5rem, 7vw, 6rem); }
p { max-width: 42em; }
/* the Globe switch appears once the globe has unfolded into the map */
#atlas .proj { transition: opacity 500ms var(--ease); }
#atlas.pre-unfold .proj { visibility: hidden; opacity: 0; }
/* the front block appears once the rotation and the rail have their final layout, so nothing on the page jumps
   (next.js adds front-ready; without it the block shows after 1.5 s anyway) */
html.js .front { opacity: 0; animation: front-show 1ms 1.5s forwards; }
html.js.front-ready .front { opacity: 1; animation: none; transition: opacity 260ms var(--ease); }
@keyframes front-show { to { opacity: 1; } }

/* ---------- The reports page's reading pane: a clear way into the report ---------- */
#rp .rp-acts2 { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-top: 1.75rem; }
#rp [data-rp-link], #rp .rp-li { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 3.25rem; padding: 0 1.5rem; border: 1.5px solid var(--red); background: var(--red); color: #F7F5F0; font: 600 1rem/1 var(--sans); font-style: normal; letter-spacing: .01em; text-decoration: none; text-shadow: none; transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
#rp [data-rp-link]:hover { background: #8F2826; border-color: #8F2826; color: #F7F5F0; text-decoration: none; }
#rp [data-rp-link] .ic, #rp .rp-li .ic { width: 1.05rem; height: 1.05rem; }
/* the second way in: a solid ink button beside the red one, inverted on the night edition */
#rp .rp-li { background: #0F0E0D; border-color: #0F0E0D; color: #F7F5F0; }
#rp .rp-li:hover { background: transparent; border-color: #0F0E0D; color: #0F0E0D; text-decoration: none; text-shadow: none; }
:root[data-theme="dark"] #rp .rp-li { background: #F7F5F0; border-color: #F7F5F0; color: #0F0E0D; }
:root[data-theme="dark"] #rp .rp-li:hover { background: transparent; border-color: #F7F5F0; color: #F7F5F0; }
@media (max-width: 47.5rem) { #rp .rp-acts2 { flex-direction: column; align-items: stretch; gap: .75rem; } #rp [data-rp-link], #rp .rp-li { width: 100%; } }

/* ---------- Polish ---------- */
/* the reports page: the glossary link sits on the right edge, as "All reports by topic" does on the front page */
@media (min-width: 68.8125rem) { .mast-r:has(> .more:only-child) { justify-self: end; } }
/* the reading pane keeps to photo, kicker, title, summary, byline and the two ways into the report */
#rp .rp-nav { display: none; }
#rp [data-rp-link]:focus-visible { outline: 3px solid var(--fg); outline-offset: 3px; }
#rp .rp-li:focus-visible { outline: 3px solid var(--fg); outline-offset: 3px; }
/* the history timeline (when it loads next.css): photos lead in black and white */
.tl-pic { filter: grayscale(1) contrast(1.05); }
:root[data-theme="dark"] .tl-pic { filter: grayscale(1) contrast(1.05) brightness(.88); }

/* Sections below the first screen are laid out only when they come near it, so start-up does less work on phones */
html.js #desks, html.js #how, html.js #events, html.js #join, html.js .dfb-w { content-visibility: auto; contain-intrinsic-size: auto 900px; }
