/* ==========================================================================
   Xphias LLC Guest Speaker Manager
   02-layout.css
   Page skeleton: app grid, responsive breakpoints, toolbar and dashboard buttons.
   ========================================================================== */

#app-container{max-width:1920px;width:100%;margin:0 auto;display:flex;flex-direction:column;flex:1}
.app-grid{display:grid;grid-template-columns:repeat(3, minmax(0, 1fr));gap:24px;width:100%}
@media (max-width: 1100px) {
  .app-grid{grid-template-columns:repeat(auto-fit, minmax(320px, 1fr))}
}

body.layout-neo-brutal .app-grid{grid-template-columns:repeat(auto-fit,minmax(400px,1fr));gap:20px}
body.layout-neo-brutal .card{background:#111;border:3px solid var(--cyan);box-shadow:6px 6px 0 var(--brand);border-radius:0}
body.layout-neo-brutal .card-header{background:var(--brand);color:#000;border-bottom:3px solid var(--cyan)}
body.layout-neo-brutal .card-header h3{color:#000!important}
body.layout-neo-brutal .btn{border-radius:0;border-width:2px;font-weight:900}
body.layout-cyber-hud .app-grid{grid-template-columns:1fr 1fr 1fr;gap:15px}
body.layout-cyber-hud .card{background:rgba(0,255,255,0.02);border:1px solid var(--cyan);box-shadow:inset 0 0 15px rgba(0,255,255,0.1);border-radius:4px;font-family:monospace}
body.layout-cyber-hud .card-header{background:rgba(0,180,216,0.1);border-bottom:1px solid var(--cyan)}
body.layout-bento-grid .app-grid{grid-template-columns:1fr 1fr 1fr;gap:20px}
body.layout-bento-grid .card{background:rgba(255,255,255,0.03);border:none;border-radius:24px;box-shadow:0 10px 30px rgba(0,0,0,0.5)}
body.layout-bento-grid .card-header{background:transparent;border-bottom:1px solid rgba(255,255,255,0.1);padding:20px}
body.layout-glass-aurora::before{content:'';position:fixed;inset:0;background:radial-gradient(circle at 10% 20%,rgba(0,180,216,0.15) 0%,transparent 40%),radial-gradient(circle at 90% 80%,rgba(201,168,76,0.15) 0%,transparent 40%);z-index:-1}
body.layout-glass-aurora .app-grid{grid-template-columns:repeat(3,1fr);gap:24px}
body.layout-glass-aurora .card{background:rgba(15,23,42,0.4);backdrop-filter:blur(16px);border:1px solid rgba(255,255,255,0.1);border-radius:16px}
body.layout-glass-aurora .card-header{background:transparent;border-bottom:1px solid rgba(255,255,255,0.05)}
body.layout-zen-minimal .app-grid{grid-template-columns:1fr 1fr 1fr;gap:40px}
body.layout-zen-minimal .card{background:transparent;border:none;border-top:2px solid var(--c-border);border-radius:0;box-shadow:none}
body.layout-zen-minimal .card-header{background:transparent;padding:15px 0}

/* Base 3-Column Desktop Grid for Document / Pre-Pro Note */
.document-grid{display:grid;grid-template-columns:var(--grid-cols, 2fr 4.2fr 4.8fr);grid-template-areas:var(--grid-areas, "c2 c1 c3");gap:24px;margin:20px 0;width:100%}
.col1{grid-area:c1;min-width:0;transition:.3s}
.col2{grid-area:c2;min-width:0;transition:.3s}
.col3{grid-area:c3;min-width:0;transition:.3s;position:relative;padding-right:15px}
/* Talent: its own row beneath the two working columns. See withTalentRow()
   in js/04-settings.js for how the row is added to each arrangement. */
/* .col-tal held Talent as a full-width band under the three columns. In
   1.62.0 Talent moved to the foot of column one with Training and
   Post-Production under it, so the band -- and the grid row that reserved
   it -- are gone. See the tombstone on withTalentRow() in js/04-settings.js.

   WHATEVER DRAWS A HEADING INSIDE COLUMN ONE WEARS COLUMN ONE'S COLOUR.
   Training and Post-Production render their own heading bars, in the blue
   column-two style, from js/11-render.js -- and they now sit under six pale
   column-one bars. Rather than teach the renderer which column it is drawing
   into, the column says what a heading looks like inside it. Anything moved
   here later matches without being touched. */
.document-grid .col1 .section-bar-blue {
  background: var(--col1-head) !important;
  color: var(--col1-text) !important;
}
.document-grid .col1 .section-bar-blue .btn {
  border-color: rgba(0, 0, 0, .3) !important;
  color: inherit !important;
}
/* And the other way round: Talent moved INTO column two carrying column
   one's pale bar, so column two says what a heading looks like inside it
   too. One rule each way, and nothing that draws a heading has to know
   where it is going to end up. */
.document-grid .col2 .section-bar-light {
  background: var(--col2-head) !important;
  color: var(--col2-text) !important;
}
.document-grid .col2 .section-bar-light .btn {
  border-color: rgba(255, 255, 255, .3) !important;
  color: var(--col2-text) !important;
}

/* Dynamic Responsive 2-Column Collapsed Layout (Medium Screens / Tablets / Resized Browser: 768px - 1150px) */
@media screen and (max-width: 1150px) {
  .document-grid,
  body.density-compact .document-grid,
  body.density-relaxed .document-grid {
    grid-template-columns: 1fr 1fr !important;
    grid-template-areas: "c2 c1" "tal tal" "c3 c3" !important;   /* schedule first (1.90.2) */
    gap: 20px !important;
  }
  .app-grid,
  body.layout-bento-grid .app-grid,
  body.layout-cyber-hud .app-grid,
  body.layout-neo-brutal .app-grid,
  body.layout-glass-aurora .app-grid,
  body.layout-zen-minimal .app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px !important;
  }
  .col3 {
    padding-right: 0 !important;
  }
}

/* Dynamic Responsive 1-Column Collapsed Layout (Cell Phones & Small Mobile Screens: <= 768px) */
@media screen and (max-width: 768px) {
  .document-grid,
  body.density-compact .document-grid,
  body.density-relaxed .document-grid {
    grid-template-columns: 1fr !important;
    grid-template-areas: "c2" "c1" "tal" "c3" !important;   /* schedule first (1.90.2) */
    gap: 16px !important;
  }
  .app-grid,
  body.layout-bento-grid .app-grid,
  body.layout-cyber-hud .app-grid,
  body.layout-neo-brutal .app-grid,
  body.layout-glass-aurora .app-grid,
  body.layout-zen-minimal .app-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .col1, .col2, .col3 {
    width: 100% !important;
    min-width: 0 !important;
    padding-right: 0 !important;
  }
  .col3 > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .admin-subcontent-grid {
    grid-template-columns: 1fr !important;
  }
  .c-hdr {
    padding: 14px !important;
    margin-bottom: 16px !important;
  }
}

.btn{padding:8px 16px;border:none;border-radius:4px;font-size:calc(11px * var(--fs));font-weight:700;cursor:pointer;text-transform:uppercase;display:inline-flex;align-items:center;justify-content:center;gap:6px;transition:.2s}
.btn:hover{opacity:.9;transform:translateY(-1px)}
.btn-gold{background:var(--brand);color:#000}
.btn-cyan{background:var(--cyan);color:#000}
.btn-outline{background:transparent;color:var(--brand);border:1.5px solid var(--brand)}
.btn-danger{background:rgba(239,68,68,0.2);color:var(--red);border:1px solid var(--red)}
.btn-cooldown{position:relative;overflow:hidden;padding-bottom:12px!important;flex-direction:column;border:none!important}
.cooldown-text{z-index:2;width:100%;text-align:center;line-height:1.2}
.cooldown-track{position:absolute;bottom:0;left:0;width:100%;height:6px;background:rgba(0,0,0,0.3);z-index:1}
.cooldown-bar{height:100%;width:100%;background:#fff;transition:width 1s linear;opacity:.6}
/* The glyph colour is worked out per theme in setThm() (js/04-settings.js),
   from the fill colour it actually lands on. It was hard-coded white, which
   reads fine on a dark card border and almost not at all on a light one. */
.btn-icon{background:var(--c-border);border:none;color:var(--icon-btn-text,#fff);width:28px;height:28px;border-radius:4px;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:14px}
.btn-icon:hover{background:var(--brand);color:var(--icon-btn-text-hover,#000)}
.btn-icon.text-red:hover{background:var(--red);color:#fff}

#landing-screen{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh;padding:40px;position:relative}
.landing-top{position:absolute;top:24px;right:40px;display:flex;gap:15px;flex-wrap:wrap;align-items:center;z-index:10}
@media (max-width: 768px) {
  .landing-top{position:static;margin-bottom:20px;justify-content:center;gap:10px}
}
.landing-hdr{text-align:center;margin:40px 0}
.landing-hdr .circ{width:80px;height:80px;border-radius:50%;background:var(--brand);color:#000;display:flex;align-items:center;justify-content:center;font-size:32px;font-weight:900;margin:0 auto 20px}

/* DYNAMICALLY ADJUSTING CENTERED DASHBOARD BUTTONS */
.landing-grid{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 24px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto 40px auto;
  transition: all 0.3s ease;
}
.landing-grid .l-card{
  flex: 0 1 300px;
  width: 300px;
  max-width: 320px;
  min-width: 240px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-sizing: border-box;
}
.l-card:hover{transform:translateY(-5px);border-color:var(--brand);box-shadow:0 10px 30px rgba(0,0,0,.5);background:var(--navy2)}
@media (max-width: 640px) {
  .landing-grid .l-card{width:100%;max-width:100%;flex:1 1 100%}
}

.feed-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:15px;width:100%;max-width:1250px}
.feed-item{background:var(--navy2);border:1px solid var(--c-border);padding:15px;border-radius:6px;cursor:grab;transition:all .2s ease;position:relative;overflow:hidden;user-select:none}
.feed-item:active{cursor:grabbing}
.feed-item.drag-over{border:2px dashed var(--cyan)!important;opacity:0.65;transform:scale(0.98)}
.feed-item:hover{border-color:var(--cyan);transform:translateY(-3px);box-shadow:0 6px 20px rgba(0,0,0,0.4)}
.cd-wrap{margin-top:10px;background:rgba(0,0,0,.25);border-radius:4px;padding:8px;border:1px solid var(--c-border)}
.cd-bar{width:100%;height:6px;background:rgba(255,255,255,.1);border-radius:3px;overflow:hidden;margin-top:4px}
.cd-fill{height:100%;width:0;transition:width 1s linear}

#editor-screen{display:none;flex-direction:column;height:100vh;overflow:hidden}

/* DYNAMIC RESPONSIVE TITLE BAR / TOOLBAR FOR COMPUTERS, TABLETS, & SMARTPHONES */
/* THE TITLE BAR LINES UP WITH THE WORKSPACE BOX BENEATH IT.

   .main-wrap pads its contents by clamp(16px, 3vw, 40px), so the VIDEO
   PRODUCTION & SPEAKER CURATION WORKSPACE panel starts that far in. The
   title bar was on a flat 24px, which meant the app name and the Home
   button sat a few pixels inside or outside the panel edge depending on the
   window width -- close enough to look like a mistake rather than a choice.
   Same expression, same edge, at every size. */
.toolbar{
  background: var(--navy2);
  border-bottom: 2px solid var(--brand);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px clamp(16px, 3vw, 40px);
  flex-shrink: 0;
  z-index: 100;
  gap: 12px;
  transition: all 0.25s ease;
}
.toolbar-left{
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}
.toolbar-right{
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: nowrap;
}
.toolbar .btn{
  flex-shrink: 1;
  white-space: nowrap;
}
#btn-export-excel {
  width: auto;
  min-width: 120px;
}
/* The PDF button has no floor any more: it collapses to an icon on a narrow
   window, and a 120px floor under a single arrow looked like a mistake. */
#btn-generate-pdf {
  width: auto;
  min-width: 0;
}

/* Tablet / Medium Resizing (width <= 1200px) */
@media screen and (max-width: 1200px) {
  .toolbar {
    flex-wrap: wrap;
    /* Same expression as .main-wrap, so the edges stay lined up here too. */
    padding: 8px clamp(16px, 3vw, 40px);
    gap: 8px 12px;
  }
  .toolbar-left {
    flex-wrap: wrap;
    gap: 8px;
    flex: 1 1 auto;
  }
  .toolbar-right {
    flex-wrap: wrap;
    gap: 6px;
    flex: 1 1 auto;
    justify-content: flex-end;
  }
  .toolbar .btn {
    padding: 6px 12px;
    font-size: 10.5px;
  }
  /* The PDF button used to be pinned to 105px so its long label had room.
     It has no long label any more -- at this width it is an icon -- and the
     old floor left a wide gold slab with a tiny arrow adrift in it. */
  #btn-export-excel {
    min-width: 105px;
  }
}

/* Smartphone / Mobile Resizing (width <= 768px) */
@media screen and (max-width: 768px) {
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 8px clamp(16px, 3vw, 40px);
    gap: 8px;
  }
  .toolbar-left {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
  /* This was `font-size: 11px !important`, from when the title box held one
     long running line that had to be squeezed onto a phone. It is the
     wordmark now, and 11px made CURATOR smaller than the buttons under it --
     and the !important meant the sizing rule in 03-chrome.css never got a
     word in edgewise below 768px. The title keeps scaling here instead, just
     over a slightly gentler range, because the bar stacks into rows on a
     phone and the name gets a row of its own. */
  .toolbar-title-box .tb-title-text {
    --tb-title-size: 23px;
    --tb-title-size: clamp(23px, 6vw, 27px);
  }
  .toolbar-right {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
  }
  .toolbar .btn {
    padding: 6px 8px;
    font-size: 10px;
    flex: 1 1 calc(33.333% - 6px);
    min-width: 75px;
    text-align: center;
  }
  #btn-export-excel, #btn-generate-pdf {
    width: auto !important;
    min-width: 85px;
    flex: 1 1 calc(50% - 6px);
  }
}

.split-view{display:flex;flex:1;overflow:hidden}

/* TWO COLUMNS WIDE.
   340px held one card per row, so a speaker's name, dates and the two
   action buttons were stacked into a column narrower than the card they
   describe. The drawer is now wide enough for two cards side by side and
   #sb-list lays them out that way; it still gives way to the screen on a
   phone, where 92vw leaves the sliver of page behind it that says the
   drawer is a drawer.

   It FADES as it slides. The panel used to arrive at full opacity the
   instant the transform started, which on a dark background reads as a
   jump rather than a movement. Opacity and transform run on the same
   curve, so it fades in as it opens and fades out as it closes. */
#side-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: min(660px, 92vw);
  height: 100vh;
  background: var(--navy);
  border-right: 2px solid var(--brand);
  box-shadow: 10px 0 35px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transform: translateX(-100%);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
#side-panel.open {
  transform: translateX(0);
  opacity: 1;
}

/* The same for the Options drawer on the right, so the two behave alike. */
#options-panel {
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
#options-panel.open { opacity: 1; }

/* A machine told to reduce motion gets the drawer without the slide. */
@media (prefers-reduced-motion: reduce) {
  #side-panel, #options-panel { transition: opacity .15s linear; }
}
#side-panel-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
  z-index: 999;
}

/* The mark above the Dashboard heading. It was written into the markup at
   200px, which on any screen is a billboard rather than a logo. Its own size
   is 60px, so that is what it is drawn at — and it is set here, in one place,
   rather than as width/height attributes on the tag, so it can be changed
   without touching the page. */
.landing-hdr .landing-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  display: block;
  margin: 0 auto 16px;
}
/* If images/x.png is missing, xpLogoFallback() turns the element into the
   lettermark rather than leaving a broken picture above your dashboard. */
.landing-hdr .tb-logo-letter {
  width: 60px; height: 60px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; background: var(--brand); color: #000;
  font-weight: 800; font-size: 30px; line-height: 1;
}

/* The Dashboard heading, saying the same thing as the title bar. It used to
   read "XPHIAS LLC'S / Video Production & Speaker Curation / Management
   System" -- three lines of a name the title bar had already stopped using,
   which left the app introducing itself twice, differently. */
.landing-hdr .lh-accent { color: var(--cyan); }
/* The app's name leads on the landing page too, in the brand colour, with
   what it does underneath it in cyan. The hero keeps its own scale -- it is
   a title page, not a title bar -- but the order of the three lines is the
   same in both places so they read as one app. */
.landing-hdr .lh-name { color: var(--brand); }
.landing-hdr .lh-accent { font-size: .52em; letter-spacing: .5px; }
/* THE EDITION -- "The Olivet Church Edition", "Wings of Faith Edition" --
   between the name and what the app does. Set by js/00-site.js; a copy
   with no edition shows no line at all. */
.landing-hdr .lh-edition { display: inline-block; color: var(--white); font-size: .42em; font-weight: 600; letter-spacing: .6px; margin: 6px 0 4px; }
.landing-hdr .lh-edition:empty, .landing-hdr .lh-edition:empty + .lh-edition-br { display: none; }
.landing-hdr .landing-sub {
  margin: 10px 0 0;
  font-size: 13px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
}


/* ==========================================================================
   THE CURATE PAGE, IN ONE READING ORDER

   Every card is a direct child of .app-grid now and says how wide it is.
   Before this, three wrapper <div>s stood between the grid and the cards,
   which meant the order down the page was decided by WHICH COLUMN a card
   was nested in -- so "put Contact above Bio Script" was not a reordering,
   it was a re-nesting, and the result depended on how tall the other two
   columns happened to be.

   With spans, the source order IS the reading order at every width, and
   moving a card is moving one block.
   ========================================================================== */
.cu-span-1 { grid-column: span 1; }
.cu-span-2 { grid-column: span 2; }
.cu-span-3 { grid-column: 1 / -1; }

/* SIX TRACKS, SO A CARD CAN BE A HALF.

   Three columns can say a third, two thirds, or the lot -- and nothing in
   between. The Bio Script is the card that wanted something in between: a
   block of prose across the whole page is a line of text so long the eye
   loses its place coming back, and the card was mostly air at the bottom.

   The Curate page is laid on six tracks instead, and the three widths are
   re-stated in sixths, so every card is exactly where it was. The only new
   width is cu-half, which is three of six. Scoped to #ws-curate: .app-grid
   is used by other screens and they are not asking for this. */
#ws-curate.app-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
#ws-curate .cu-span-1 { grid-column: span 2; }
#ws-curate .cu-span-2 { grid-column: span 4; }
#ws-curate .cu-span-3 { grid-column: 1 / -1; }
#ws-curate .cu-half   { grid-column: span 3; }

/* Two columns: a 2-wide card takes the row, a 1-wide sits beside nothing.
   Everything keeps its order; only the widths give. */
@media screen and (max-width: 1150px) {
  .cu-span-2 { grid-column: 1 / -1; }
  .cu-span-1 { grid-column: 1 / -1; }
  #ws-curate .cu-span-2,
  #ws-curate .cu-span-1 { grid-column: 1 / -1; }
  /* A half of a narrow page is a column of about 300px with prose in it.
     Below this width the Bio takes the row back. */
  #ws-curate .cu-half { grid-column: 1 / -1; }
}
@media screen and (max-width: 767px) {
  .cu-span-1, .cu-span-2, .cu-span-3 { grid-column: 1 / -1; }
  #ws-curate .cu-span-1,
  #ws-curate .cu-span-2,
  #ws-curate .cu-span-3,
  #ws-curate .cu-half { grid-column: 1 / -1; }
}

/* ---- Contact & Representation, now full width --------------------------- */
/* At a third of the page this was one narrow column of right-aligned links.
   Across the whole page that same column would leave two-thirds of the card
   empty, so the three groups sit SIDE BY SIDE instead -- each still flush
   right within its own share, which is what made the list readable in the
   first place. */
#card-contacts.cu-span-3 .cxv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 6px 28px;
  align-items: start;
}
#card-contacts.cu-span-3 .cxv-group + .cxv-group {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  border-left: 1px solid rgba(255, 255, 255, .07);
  padding-left: 22px;
}
/* One group on a row has no neighbour to be divided from. */
@media (max-width: 700px) {
  #card-contacts.cu-span-3 .cxv-group + .cxv-group {
    border-left: none;
    padding-left: 0;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, .07);
  }
}
#card-contacts.cu-span-3 .cxv-none { text-align: right; }

/* ==========================================================================
   PROPORTION, AND NOT WRAPPING UNLESS IT HAS TO

   "allign everything proportionately and try not to wrap text unless
    absolutely necessary do it dynamically for small screens though"

   The tables on the production note were given fixed pixel widths for their
   furniture columns -- the row number, the buttons, the date, the status --
   back when they sat in a wider column. Measured on the longest record in
   the starting data, Supplemental's header asks for 32 + 230 + 105 + 110 =
   477px of furniture inside a 595px table, which leaves 118px for TYPE /
   TITLE. So the one column that holds actual words got a fifth of the table
   and wrapped onto four lines, while the four columns holding a number, two
   buttons, a date and one word took the rest.

   That is the opposite of proportional, and it is where nearly all the
   wrapping on the page was coming from.

   The widths are therefore released: the furniture columns take what their
   content needs -- they are all nowrap, so that is exactly one line's worth
   -- and every pixel left over goes to the words. Nothing is re-authored;
   one rule tells the browser to do what it does well.
   ========================================================================== */
.document-grid .pp-table { table-layout: auto; }

/* WHICH COLUMN IS WHICH IS ALREADY WRITTEN DOWN, in the markup, by whoever
   built each table: every furniture column carries an explicit width and
   the column holding the words is the one left without. So the rule reads
   the author's own intent rather than guessing by position -- which matters
   because the words are column two on Supplemental and Training, and column
   three on Streams.

   The furniture columns are told to take as little as they can (1% is the
   idiom for "shrink to your content"); they are all nowrap, so that is
   exactly one line's worth. Everything left over falls to the column
   without a width -- the words. */
/* 1% IS THE IDIOM FOR "SHRINK TO YOUR CONTENT", AND IT NEEDS nowrap TO BE
   SAFE. Without it the cell shrinks below its text and the text breaks or is
   clipped -- the first run of this rule put it on the CELLS as well as the
   headings and turned the crew tables' row numbers into "0…" and their roles
   into "Executive Live Vi…". The cells are left alone; only the heading row
   is told to be modest, which is enough to size the column. */
.document-grid .pp-table th[style*="width:"] {
  width: 1% !important;
  white-space: nowrap;
}
.document-grid .pp-table th:not([style*="width:"]) { width: auto !important; }

/* A FLOOR UNDER THE ROW-NUMBER COLUMN. "1%" asks the column to be as narrow
   as it can, and for a two-digit row number the browser took that two pixels
   too literally -- "01" needed 26px in a 24px box and was clipped. Everything
   else has enough letters to size itself. */
.document-grid .pp-table th:first-child,
.document-grid .pp-table td:first-child,
.document-grid .crew-tbl th:first-child,
.document-grid .crew-tbl td:first-child { min-width: 30px; }

/* AND THE REAL CULPRIT: THE ACTIONS CELL.

   Releasing the widths was not enough on its own, and the measurement said
   why. On Supplemental the Actions cell holds two buttons -- "👁️ View" and
   "⬇ Download" -- both nowrap, on one unbreakable line. That cell measured
   273px of a 523px table: more than half the width, for two buttons, while
   the column holding the title of the thing got 134px and wrapped onto four
   lines. The table was 631px wide inside a 523px box, so it scrolled
   sideways as well.

   The BUTTONS are allowed to stack; the WORDS are not asked to. A button
   dropping onto a second line is not text wrapping -- it is a control
   finding its place -- and it hands about 140px back to the words, which is
   where the wrapping was. Each button still refuses to break inside itself,
   so "⬇ Download" never becomes "⬇ Down / load".

   This is what "align everything proportionately and try not to wrap text"
   comes to in practice: give the width to the thing made of words. */
/* The buttons sit in an inline-flex wrapper written on the tag itself, so
   it is the WRAPPER that refuses to break, not the cell. It is allowed to
   wrap; each button still refuses to break inside itself, so "⬇ Download"
   never becomes "⬇ Down / load". */
.document-grid .pp-table td > div[style*="inline-flex"] {
  flex-wrap: wrap !important;
  row-gap: 6px !important;
}
.document-grid .pp-table td .btn,
.document-grid .pp-table td .active-pdf-link {
  white-space: nowrap !important;
}

/* ---- small screens are the exception, dynamically ------------------------
   Below this the column is too narrow for any of it to fit on one line, so
   the furniture is allowed to wrap too rather than forcing a sideways
   scroll. "Do it dynamically for small screens though." */
@media (max-width: 900px) {
  .document-grid .pp-table th,
  .document-grid .pp-table td { white-space: normal !important; }
  .document-grid .pp-table .active-pdf-link,
  .document-grid .pp-table .btn { white-space: normal !important; }
}
