/* wire.css — news.php.
 *
 * A rundown, not a list. One story is on air in the hero on the left,
 * every story sits in the stack on the right, and picking one out of the
 * stack puts it on air.
 *
 * NOTE ON LINK COLOURS: design2.css sets link colour with
 *   a:not(.btn):not(.nav-link):not(.apply-link):not(.wordmark)
 * which scores 0,4,1. Link rules here repeat that same four-:not() chain
 * with a class in front so they score 0,5,1 and win. Drop the chain and
 * everything below turns accent red.
 */

.wire {
    --wire-panel: #171411;   /* the stack, and the rundown header bar */
    --wire-on: #201c18;      /* the row currently on air */
    --wire-line: #2a2622;    /* hairlines between rows and around tabs */
    --wire-ink: #ece7dc;     /* headlines, active tab text */
    --wire-dim: #91887c;     /* mono meta, row numbers */
    --wire-red: #c61f3b;     /* the badge and PULL THE FILE */
    --wire-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---- Masthead ---- */

.wire-kicker {
    font-family: var(--wire-mono);
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--wire-red);
    margin: 0;
}

.wire-title {
    font-family: var(--display);
    font-size: clamp(2.6rem, 1.8rem + 4vw, 4.2rem);
    line-height: 0.95;
    letter-spacing: 0.02em;
    color: var(--wire-ink);
    margin: 0.35rem 0 0;
    font-weight: 400;
}

.wire-lede {
    color: var(--muted);
    font-size: 0.95rem;
    margin: 0.7rem 0 0;
    max-width: 34rem;
}

/* The tabs sit beside the masthead on desktop and drop under it when
   there is no longer room for both. */
.wire-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.wire-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; }

a.wire-tab:not(.btn):not(.nav-link):not(.apply-link):not(.wordmark) {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--wire-line);
    padding: 0.55rem 1rem;
    font-family: var(--sans);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--wire-ink);
    white-space: nowrap;
}
a.wire-tab:not(.btn):not(.nav-link):not(.apply-link):not(.wordmark):hover {
    border-color: var(--wire-red);
    text-decoration: none;
}
a.wire-tab.is-on:not(.btn):not(.nav-link):not(.apply-link):not(.wordmark) {
    background: var(--wire-ink);
    border-color: var(--wire-ink);
    color: #0d0c0b;
}

/* ---- The grid ---- */

.wire-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 1.25rem;
    align-items: stretch;
}

/* ---- On air ---- */

/* The hero has no height of its own: it stretches to whatever the rundown
   beside it comes to, so the two columns always finish level. min-height
   only covers the case of a very short stack. */
.wire-hero {
    position: relative;
    overflow: hidden;
    min-height: clamp(20rem, 34vw, 28rem);
    background: var(--wire-panel);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* Reserves the badge's corner. The copy is bottom-justified and the box
       grows with it, so on a narrow screen a long headline would otherwise
       ride up underneath the badge. The backdrop and scrim are both inset:0
       and ignore this. */
    padding-top: 3.75rem;
}

.wire-hero img.wire-shot {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Two stops rather than one: the copy sits in the bottom third and needs
   real cover there, while the badge at the top needs the picture to still
   read as a picture. */
.wire-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(9, 9, 11, 0.94) 0%, rgba(9, 9, 11, 0.72) 34%, rgba(9, 9, 11, 0.2) 70%, rgba(9, 9, 11, 0.35) 100%);
}

.wire-badge {
    position: absolute;
    top: 1.1rem;
    left: 1.1rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--wire-red);
    color: #fff;
    padding: 0.35rem 0.75rem;
    font-family: var(--wire-mono);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.wire-badge .dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #fff;
    flex: 0 0 auto;
}

.wire-hero-copy {
    position: relative;
    z-index: 1;
    padding: clamp(1.25rem, 3vw, 2.25rem);
}

.wire-meta {
    font-family: var(--wire-mono);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--wire-dim);
    margin: 0;
}

.wire-hero-title {
    font-family: var(--display);
    font-size: clamp(1.9rem, 1.1rem + 3.4vw, 3.4rem);
    line-height: 0.95;
    letter-spacing: 0.01em;
    color: var(--wire-ink);
    margin: 0.5rem 0 0;
    font-weight: 400;
}

.wire-dek {
    color: #c9c3b9;
    font-size: 0.98rem;
    margin: 0.9rem 0 0;
    max-width: 34rem;
}

a.wire-pull:not(.btn):not(.nav-link):not(.apply-link):not(.wordmark) {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.1rem;
    font-family: var(--wire-mono);
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--wire-red);
    text-underline-offset: 4px;
}
a.wire-pull:not(.btn):not(.nav-link):not(.apply-link):not(.wordmark):hover { color: #ff4f66; }

/* ---- The stack ---- */

.wire-stack {
    background: var(--wire-panel);
    border: 1px solid var(--wire-line);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.wire-stack-head {
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid var(--wire-line);
    font-family: var(--wire-mono);
    font-size: 0.7rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--wire-dim);
}

a.wire-row:not(.btn):not(.nav-link):not(.apply-link):not(.wordmark) {
    display: grid;
    grid-template-columns: 2rem 1fr;
    gap: 0.75rem;
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid var(--wire-line);
    color: var(--wire-ink);
    min-width: 0;
}
.wire-row:last-child { border-bottom: 0; }
.wire-row:hover { background: var(--wire-on); }
.wire-row.is-on { background: var(--wire-on); }

.wire-no {
    font-family: var(--wire-mono);
    font-size: 0.78rem;
    color: var(--wire-dim);
    padding-top: 0.2rem;
}

/* Both are spans inside one grid cell, so they need to be told to stack --
   left inline they run the date onto the end of the headline. */
.wire-row-title,
.wire-row-meta { display: block; }

/* The split fringe: cool on one edge, warm on the other, so a headline
   reads like a signal that is not quite locked in.
   Sub-pixel offsets at low alpha on purpose. At a full pixel and full
   strength the letters go magenta and it stops looking like interference
   and starts looking like a rendering fault -- the text has to stay
   plainly cream, with the colour only on the edge of the stroke. */
.wire-row-title {
    font-family: var(--display);
    font-size: 1.25rem;
    line-height: 1.08;
    letter-spacing: 0.02em;
    color: var(--wire-ink);
    text-shadow: -0.6px 0 rgba(53, 200, 232, 0.38), 0.6px 0 rgba(224, 58, 58, 0.33);
    margin: 0;
    overflow-wrap: anywhere;
}

.wire-row-meta {
    font-family: var(--wire-mono);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--wire-dim);
    margin: 0.4rem 0 0;
}

/* ---- Empty + pagination ---- */

.wire-empty {
    background: var(--wire-panel);
    border: 1px solid var(--wire-line);
    padding: 2.5rem;
    color: var(--muted);
}

.wire-pager {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1.5rem;
    font-family: var(--wire-mono);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: var(--wire-dim);
}

/* ---- Narrow ---- */

@media (max-width: 900px) {
    .wire-grid { grid-template-columns: 1fr; }
    .wire-hero { min-height: clamp(17rem, 52vw, 24rem); }
    .wire-head { align-items: flex-start; }
}
