/* =============================================================================
   LEDGER · JUST POSTED — the tape of the newest awards (labs 557)
   -----------------------------------------------------------------------------
   The page's own sheet for the #posted band, prefix jp-. It reads the shared
   tokens and nothing else: no literal colour, so dark.css has nothing to
   answer and one sheet serves both editions. The house parts it stands on
   (.console, .seg, .field, .btn, .lbl, .hint, .vh) are site.css's, untouched.

   THE SURFACES are the ledger's: the console is the house panel, and what
   USAspending answered sits on --paper inside it (.jp-box, .jp-topbox). The
   accent is a hairline and the focus ring. A record that is new since the
   last read carries the words "new since", never a colour alone.

   PHONES. Under 760 px a record is a card: when and how much on the top
   line, then who, what kind, and what for. Wherever the pointer is coarse,
   every control of the tape is at least 44 px tall.
   ========================================================================== */

.jp-stat { margin: 0 0 0 auto; font-size: .78rem; letter-spacing: .04em; color: var(--muted); }
.jp-stat--live { color: var(--free); }
.jp-stat--err  { color: var(--taken); }
.jp-stat--busy { color: var(--ink-55); }
.jp-dim { color: var(--ink-55); }

/* ------------------------------------------------------------ the controls
   minmax(0, …) on every track: a <select> is as wide as its widest <option>,
   and the agency list would otherwise set the width of the page. */
.jp-ctl { display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem .9rem; align-items: start; }
@media (min-width: 860px) { .jp-ctl { grid-template-columns: auto minmax(0, 1.5fr) minmax(0, 1fr) auto; } }
.jp-fld { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .3rem; align-content: start; }
.jp-fld > .lbl { margin: 0; }
.jp-fld .field { width: 100%; min-width: 0; }
.jp-fld .seg { flex-wrap: nowrap; }
.jp-fld .seg__b { white-space: nowrap; }
.jp-fld .seg__b:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.jp-fldnote { margin: .1rem 0 0; }
.jp-fldnote[hidden] { display: none; }
/* Level with the two menus, under the line their labels stand on. */
@media (min-width: 860px) { .jp-again { margin-top: 1.24rem; min-height: 3.12rem; } }

/* -------------------------------------------------------------- the answer */
.jp-box { background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
          padding: 1rem 1.1rem 1.1rem; min-width: 0; }
@media (max-width: 620px) { .jp-box { padding: .8rem .8rem .9rem; } }
.jp-sum { margin: 0 0 .8rem; font-size: .95rem; line-height: 1.5; color: var(--ink-77); }
.jp-sum b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }

.jp-hold { margin: 0 0 .9rem; padding: .9rem 1rem; border: 1px solid var(--taken); border-radius: 12px;
           background: var(--taken-wash); color: var(--ink-77); font-size: .88rem; line-height: 1.5; }
.jp-hold[hidden] { display: none; }
.jp-hold p { margin: 0 0 .5rem; max-width: 80ch; }
.jp-hold p:last-child { margin-bottom: 0; }
.jp-hold b { color: var(--ink); }
.jp-hold p:first-child b { color: var(--taken); }

.jp-none { padding: .9rem 1rem; border: 1px dashed var(--line); border-radius: 12px; font-size: .9rem; color: var(--ink-77); }
.jp-none[hidden] { display: none; }
.jp-none p { margin: 0 0 .5rem; }
.jp-none p:last-child { margin-bottom: 0; }
.jp-switch { display: flex; flex-wrap: wrap; gap: .4rem; }

/* The column words above the rows: for the eye on a desk. A reader without
   one has the label inside each row instead (.jp-l), so these are hidden
   from the accessibility tree in the markup. */
.jp-head { display: none; }
.jp-list { list-style: none; margin: 0; padding: 0; }
.jp-list[hidden] { display: none; }
/* Rows that are being asked for again are dimmed while the question is out;
   the words "Asking USAspending" are never dimmed, they are the status. */
.jp-list[aria-busy="true"] > .jp-row, .jp-toplist[aria-busy="true"] > .jp-top { opacity: .5; transition: opacity .2s var(--ease); }
.jp-row { display: grid; gap: .1rem .9rem; padding: .8rem 0 .75rem; border-top: 1px solid var(--line-soft);
          grid-template-columns: minmax(0, 1fr) auto;
          grid-template-areas: "when amt" "who who" "what what" "desc desc";
          font-size: .86rem; line-height: 1.45; color: var(--ink-77); }
.jp-row:first-child { border-top: 0; padding-top: .2rem; }
.jp-c { min-width: 0; overflow-wrap: anywhere; }
.jp-c--when { grid-area: when; }
.jp-c--amt  { grid-area: amt; text-align: right; }
.jp-c--who  { grid-area: who; margin-top: .3rem; }
.jp-c--what { grid-area: what; margin-top: .35rem; }
.jp-c--desc { grid-area: desc; margin-top: .3rem; }
.jp-l { display: block; font-size: .6rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
        color: var(--ink-55); margin-bottom: .05rem; }
.jp-time { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 .4rem; font-variant-numeric: tabular-nums; }
.jp-time__d { font-weight: 700; color: var(--ink); white-space: nowrap; }
.jp-time__t { color: var(--ink-55); font-size: .8rem; }
.jp-newtag { display: inline-block; margin-top: .3rem; padding: .08rem .45rem; border: 1px solid var(--accent); border-radius: 5px;
             font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink);
             line-height: 1.5; }
.jp-row--new { box-shadow: inset 3px 0 0 var(--accent); padding-left: .7rem; }
.jp-rcp { display: block; font-weight: 600; color: var(--ink); }
.jp-ag { display: block; margin-top: .1rem; font-size: .8rem; color: var(--ink-77); }
.jp-amt { display: block; font-weight: 700; font-size: .95rem; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.jp-sub { display: block; margin-top: .18rem; font-size: .76rem; color: var(--ink-55); line-height: 1.4; }
.jp-tag { display: inline-block; max-width: 100%; padding: .08rem .45rem; border: 1px solid var(--line); border-radius: 5px;
          font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-55);
          line-height: 1.5; }
.jp-tag--none { border-style: dashed; font-weight: 500; }
.jp-id { font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
a.jp-id:hover { text-decoration: underline; text-underline-offset: 2px; }
a.jp-id:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.jp-out { color: var(--ink-55); font-weight: 400; }
.jp-desc { margin: 0; max-width: 110ch; font-size: .8rem; line-height: 1.5; color: var(--ink-77); overflow-wrap: anywhere; }
.jp-desc[data-open="0"] { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jp-moretext[hidden] { display: none; }
.jp-link { font: inherit; font-size: .76rem; font-weight: 600; color: var(--ink); background: none; border: 0;
           padding: .25rem 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
           -webkit-appearance: none; appearance: none; }
.jp-link:hover { color: var(--accent); }
.jp-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* A desk: the record's time, who, what kind, how much, across one line, with
   the description under the three right-hand columns. */
@media (min-width: 761px) {
    .jp-head { display: grid; grid-template-columns: 7.6rem minmax(0, 1.5fr) minmax(0, 1fr) minmax(8.5rem, auto);
               gap: 0 .9rem; padding: 0 0 .55rem; border-bottom: 1px solid var(--line);
               font-size: .625rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-55); }
    .jp-head[hidden] { display: none; }
    .jp-head span:last-child { text-align: right; }
    .jp-head span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .jp-row { grid-template-columns: 7.6rem minmax(0, 1.5fr) minmax(0, 1fr) minmax(8.5rem, auto);
              grid-template-areas: "when who what amt" "when desc desc desc"; }
    .jp-row:first-child { padding-top: .8rem; }
    .jp-c--who, .jp-c--what { margin-top: 0; }
    .jp-l { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden;
            white-space: nowrap; clip: rect(0 0 0 0); clip-path: inset(50%); }
    .jp-time { display: flex; flex-direction: column; gap: 0; }
}

.jp-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; margin-top: .9rem; }
.jp-foot [hidden] { display: none; }
.jp-morenote { margin: 0; flex: 1 1 16rem; }
.jp-stamp { margin: 0; max-width: 110ch; }
.jp-stamp b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------- the two lists */
.jp-tops { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 900px) { .jp-tops { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.jp-topbox { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem .6rem; min-width: 0; }
@media (max-width: 620px) { .jp-topbox { padding: .8rem .8rem .5rem; } }
.jp-topbox__h { margin: 0 0 .3rem; font-size: .625rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-55); }
.jp-topsub { margin: 0 0 .5rem; font-size: .84rem; line-height: 1.5; color: var(--ink-77); min-height: 1.5em; }
.jp-topsub b { color: var(--ink); font-variant-numeric: tabular-nums; }
.jp-steps { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .55rem; }
.jp-toplist { list-style: none; margin: 0; padding: 0; }
.jp-top { display: grid; grid-template-columns: 1.3rem minmax(0, 1fr) auto; gap: .05rem .6rem; align-items: start;
          padding: .6rem 0 .55rem; border-top: 1px solid var(--line-soft); font-size: .86rem; line-height: 1.45; color: var(--ink-77); }
.jp-top__n { padding-top: .1rem; font-size: .72rem; font-weight: 700; color: var(--ink-55); font-variant-numeric: tabular-nums; }
.jp-top__main { min-width: 0; overflow-wrap: anywhere; }
.jp-top__main .jp-tag { margin-top: .3rem; }
.jp-top__main .jp-desc { margin-top: .3rem; }
.jp-top__amt { text-align: right; }
@media (max-width: 480px) {
    .jp-top { grid-template-columns: 1.3rem minmax(0, 1fr); }
    .jp-top__amt { grid-column: 2; text-align: left; margin-top: .25rem; }
}
.jp-empty { margin: .3rem 0; padding: .3rem 0; font-size: .86rem; color: var(--ink-55); list-style: none; }
.jp-err { margin: .3rem 0; padding: .9rem 1rem; border: 1px solid var(--taken); border-radius: 12px; background: var(--taken-wash);
          color: var(--ink-77); font-size: .88rem; list-style: none; }
.jp-err p { margin: 0 0 .5rem; }
.jp-err p:last-child { margin-bottom: 0; }
.jp-err b { color: var(--taken); }
.jp-note { margin: 0; max-width: 110ch; }

/* ------------------------------------------------ room, before the answer
   The band sits above the boards and Method, so it may not grow under a
   reader who opened the page at one of them. Until USAspending's first
   answer is drawn, the box, the stamp and the two lists keep about the room
   that answer takes: ten records and five to a list on a desk, five and three
   under 760 px (the script asks for exactly that many). posted.js lifts
   jp-box--wait and jp-tops--wait when it draws, or when it has to say there
   was no answer. The figures are the recorded answers of 6 October 2026
   measured at each width (tools/test-posted.py, group "room", holds them to
   it); a real answer differs by a few lines of text, not by screens. */
.jp-box--wait { min-height: 67.5rem; }
.jp-box--wait + .jp-stamp { min-height: 2.5rem; }
.jp-tops--wait { min-height: 58rem; }
@media (max-width: 1199px) { .jp-box--wait, .jp-tops--wait { min-height: 78rem; } }
@media (max-width: 899px) {
    .jp-tops--wait { min-height: 83rem; }
    .jp-box--wait + .jp-stamp { min-height: 3.8rem; }
}
@media (max-width: 760px) {
    .jp-box--wait { min-height: 61rem; }
    .jp-tops--wait { min-height: 66rem; }
    .jp-box--wait + .jp-stamp { min-height: 5rem; }
}
@media (max-width: 480px) {
    .jp-box--wait { min-height: 69rem; }
    .jp-tops--wait { min-height: 95rem; }
    .jp-box--wait + .jp-stamp { min-height: 7rem; }
}
@media (max-width: 375px) { .jp-tops--wait { min-height: 109rem; } }

/* ------------------------------------------------------------ no script
   With scripting on, a <noscript>'s content is text and this selector cannot
   match; with it off, the note inside is an element and everything the
   script would have filled steps aside for it. */
#jp-console:has(noscript > .jp-none) .jp-ctl,
#jp-console:has(noscript > .jp-none) .jp-sum,
#jp-console:has(noscript > .jp-none) .jp-foot,
#jp-console:has(noscript > .jp-none) .jp-stamp,
#jp-console:has(noscript > .jp-none) .jp-tops,
#jp-console:has(noscript > .jp-none) .jp-note { display: none; }
#jp-console:has(noscript > .jp-none) .jp-box--wait { min-height: 0; }

/* ------------------------------------------------- a finger, not a pointer
   Every control is 44 px tall where a finger works it. The two that sit in
   running text, the award link and "Read all", get there by padding that a
   matching negative margin gives back: the target is 44 px, the line is not,
   and neither reaches another control (the tag is above the link, the
   description between the two). */
@media (hover: none) and (pointer: coarse), (max-width: 760px) {
    #jp-console .seg__b, #jp-console .btn, #jp-console .field { min-height: 44px; }
    #jp-console .seg__b { padding-inline: .8rem; }
    .jp-link { display: inline-block; min-height: 44px; padding: .8rem .6rem .8rem 0; margin: -.45rem 0 -.5rem; }
    a.jp-id { display: inline-block; padding: .85rem .5rem .85rem 0; margin: -.85rem 0; }
    .jp-fld .seg { flex-wrap: wrap; }
}
/* A phone's card, kept short: the label rides beside the time, and the kind,
   the award and its first action share a line. */
@media (max-width: 760px) {
    .jp-l { display: inline; margin-right: .45rem; }
    .jp-l__x { display: none; }
    .jp-c--what .jp-tag { margin-right: .5rem; vertical-align: baseline; }
    .jp-c--what .jp-sub { display: inline; margin-right: .4rem; }
    .jp-top__main .jp-tag { margin-right: .5rem; }
    .jp-top__main > .jp-sub { display: inline; }
}
