/* NLL Marketing app frame (matches the approved mockup): black top bar with an orange rule, black bottom tab bar with an orange rule, neon only inside the screens.
   Loaded after ./map.css (tokens, the brand watermark tile on the body, the CONTENT styles) and ./ads.css (SWIPE and SCOREBOARD). Phone first, no page scrolling on SWIPE. */
html, body.mk { height: 100%; margin: 0; overflow: hidden }
body.mk { display: flex; justify-content: center; background-color: #000 }
.mk-app { width: 100%; max-width: 430px; height: 100dvh; display: flex; flex-direction: column; background: var(--sky) url(./mark-tile.svg) repeat; background-size: 176px; overflow: hidden; position: relative }
.mk-top { flex: none; background: #000; border-bottom: 3px solid var(--brand); padding: 10px 14px; padding-top: calc(10px + env(safe-area-inset-top)) }
.mk-top b { font: 900 17px var(--display); color: #fff; letter-spacing: -.3px } .mk-top b span { color: var(--brand) }
.mk-main { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 10px 12px 8px; overflow: hidden }
.mk-panel { flex: 1; min-height: 0; display: flex; flex-direction: column }
.mk-panel[hidden] { display: none !important }
.mk-tabs { flex: none; background: #000; border-top: 3px solid var(--brand); display: grid; grid-template-columns: repeat(3, 1fr); padding-bottom: env(safe-area-inset-bottom) }
.mk-tabs button { all: unset; cursor: pointer; text-align: center; padding: 11px 0 12px; font: 800 11px var(--display); letter-spacing: .08em; color: #fff; opacity: .55; min-height: 52px; box-sizing: border-box }
.mk-tabs button[aria-pressed="true"] { opacity: 1; color: var(--brand) }
.mk-tabs button:focus-visible { outline: 3px solid #fff; outline-offset: -6px }
.mk-ic { display: block; font-size: 19px; margin-bottom: 3px }
.mk-qb { display: inline-block; min-width: 16px; padding: 1px 4px; margin-left: 3px; background: var(--pink); color: #fff; border-radius: 8px; font: 800 10px var(--display) }
/* SWIPE and SCOREBOARD: the bottom bar is the navigation, so the board's own switcher and heading go, and the deck takes the height that is left */
#tab-ads .ads-keys { display: none }
#tab-ads .ads { max-width: none; flex: 1; min-height: 0; display: flex; flex-direction: column }
#tab-ads [data-ads-s="swipe"]:not([hidden]) { flex: 1; min-height: 0; display: flex; flex-direction: column }
#tab-ads .ads-deck { height: auto; flex: 1; min-height: 0; margin: 10px 0 8px }
#tab-ads [data-ads-s="score"] { overflow-y: auto; min-height: 0; flex: 1 }
#tab-ads .ads-sheet { max-width: 430px; margin: 0 auto }
#tab-ads .ads-toast { bottom: 100px }
/* CONTENT scrolls inside its panel */
#tab-content { overflow-y: auto; -webkit-overflow-scrolling: touch }
#tab-content .content { max-width: none }
#tab-content .tabh { display: none }
.mk-nocontent, .mk-plain { color: var(--muted); font-size: 15px; padding: 16px 4px }
/* locked and sign-in screens */
.mk-locked, .mk-signin { margin: auto 0; padding: 22px 16px; background: var(--panel2); border: 3px solid var(--brand); box-shadow: 5px 5px 0 #000 }
.mk-locked h1, .mk-signin h1 { font: 900 21px/1.15 var(--display); color: #fff; margin: 0 0 10px }
.mk-locked p, .mk-signin p, .mk-signin label { font-size: 15px; color: var(--muted); margin: 0 0 10px; display: block }
.mk-signin input { width: 100%; box-sizing: border-box; font: 16px var(--body); padding: 12px; margin: 4px 0 12px; background: #000; color: #fff; border: 2px solid var(--brand) }
.mk-btn { all: unset; box-sizing: border-box; cursor: pointer; display: block; width: 100%; text-align: center; padding: 14px 6px; min-height: 48px; font: 800 14px var(--display); background: var(--brand); color: #000; border: 3px solid #000; box-shadow: 4px 4px 0 #000 }
.mk-btn[disabled] { opacity: .6 }
.mk-link { all: unset; cursor: pointer; color: var(--brand); font-size: 13px; text-decoration: underline; padding: 8px 0; display: inline-block }
.mk-notice { padding: 8px 10px; border: 2px solid var(--cyan); font-size: 14px; color: #fff }
.mk-notice.err { border-color: #ff4d6d }

/* ---------------------------------------------------------------- phone extras: the desktop-only pieces are not drawn under 900 px, so the phone layout is exactly as it was */
#tab-ads .ads-hint, #tab-ads .ads-next, #tab-ads .ads-kb, #tab-ads .ads-dk, #tab-ads .ads-hd { display: none }
#tab-ads .ads-hp { font-style: normal }

/* ---------------------------------------------------------------- desktop: 900 px and up (tuned for 1366x768 and 1920x1080)
   Black top bar with the three tabs in it, content centred at 1280 px, bigger type, SWIPE as card + side column, SCOREBOARD as a table, CONTENT as two panes. */
@media (min-width: 900px) {
  body.mk { display: block; font-size: 17px }
  .mk-app { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr) }
  .mk-top { grid-column: 1; grid-row: 1; display: flex; align-items: center; padding: 14px 16px 14px max(28px, calc((100vw - 1280px) / 2)) }
  .mk-top b { font-size: 26px }
  .mk-tabs { grid-column: 2; grid-row: 1; display: flex; align-items: stretch; gap: 4px; border-top: 0; border-bottom: 3px solid var(--brand); padding: 0 max(28px, calc((100vw - 1280px) / 2)) 0 0 }
  .mk-tabs button { display: flex; align-items: center; gap: 8px; padding: 0 22px; min-height: 0; font-size: 14px; letter-spacing: .1em }
  .mk-tabs button:hover { opacity: .9 }
  .mk-tabs button[aria-pressed="true"] { box-shadow: inset 0 -5px 0 var(--brand) }
  .mk-tabs button:focus-visible { outline-offset: -4px }
  .mk-ic { display: inline; margin: 0; font-size: 20px }
  .mk-qb { font-size: 12px; padding: 2px 7px; margin-left: 2px }
  .mk-main { grid-column: 1 / -1; grid-row: 2; padding: 20px max(28px, calc((100vw - 1280px) / 2)) 22px }
  .mk-nocontent, .mk-plain { font-size: 17px }
  #tab-ads .ads { margin: 0; width: 100% }

  /* SWIPE: the card on the left, the side column on the right. No page scroll: the grid fills the height under the top bar. */
  #tab-ads [data-ads-s="swipe"]:not([hidden]) { display: grid; grid-template-columns: 460px minmax(300px, 1fr); grid-template-rows: auto auto auto auto auto minmax(0, 1fr); column-gap: 32px; align-content: stretch }
  #tab-ads .ads-deck, #tab-ads .ads-pubs-swipe + .ads-deck { grid-column: 1; grid-row: 1 / -1; margin: 0; align-self: stretch; height: auto }
  #tab-ads .ads-pubs-swipe { grid-column: 2; grid-row: 6; align-self: start }
  #tab-ads .ads-goes { grid-column: 2; grid-row: 2; margin: 14px 0 0; font-size: 15px }
  #tab-ads .ads-g-l2 { font-size: 13px }
  #tab-ads .ads-hud { grid-column: 2; grid-row: 1; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px }
  #tab-ads .ads-hud > div { padding: 8px 12px }
  #tab-ads .ads-k { font-size: 11px; overflow-wrap: normal; word-break: normal }
  #tab-ads .ads-v { font-size: 46px }
  #tab-ads .ads-acts { grid-column: 2; grid-row: 3; margin-top: 14px; gap: 14px }
  #tab-ads .ads-btn { min-height: 84px; font-size: 22px; cursor: pointer }
  #tab-ads .ads-btn small { font-size: 14px }
  #tab-ads .ads-hint { grid-column: 2; grid-row: 4; display: block; margin: 12px 0 0; text-align: center; font: 600 15px/1.4 var(--body); color: var(--muted) }
  #tab-ads .ads-next { grid-column: 2; grid-row: 5; display: block; margin-top: 18px; min-height: 0 }
  #tab-ads .ads-next-h { margin: 0 0 8px; font: 9px/1.4 var(--pixel); color: var(--muted) }
  #tab-ads .ads-next ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px }
  #tab-ads .ads-nx { background: var(--panel2); border: 2px solid #000; box-shadow: 3px 3px 0 #000; padding: 8px 12px; display: flex; flex-direction: row; align-items: center; gap: 10px; min-width: 0 }
  #tab-ads .ads-nx-th { flex: none; width: 44px; height: 44px; object-fit: cover; border: 1px solid #000; background: #222 }
  #tab-ads .ads-nx-body { display: flex; flex-direction: column; gap: 6px; min-width: 0 }
  #tab-ads .ads-nx-hook { font: 800 15px/1.25 var(--display); color: #fff; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical }
  #tab-ads .ads-nx .ads-chip { font-size: 8px; padding: 4px 6px }
  #tab-ads .ads-meta { padding: 12px 14px 8px; gap: 8px }
  #tab-ads .ads-chip { font-size: 10px; padding: 6px 8px }
  #tab-ads .ads-flag { font-size: 13px }
  #tab-ads .ads-stamp { font-size: 34px }
  #tab-ads .ads-done { font-size: 16px }
  #tab-ads .ads-done span { font-size: 17px }
  #tab-ads .ads-toast { bottom: 40px; font-size: 11px; padding: 12px 16px }

  /* the pass reasons: a centred dialog with the keys 1 to 4 and Esc */
  #tab-ads .ads-sheet { left: 50%; right: auto; top: 50%; bottom: auto; transform: translate(-50%, -50%); width: min(560px, 90vw); max-width: none; margin: 0; padding: 26px 28px; border: 3px solid #ff4d6d; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .68), 6px 6px 0 #000 }
  #tab-ads .ads-sheet h4 { font-size: 22px; margin-bottom: 16px }
  #tab-ads .ads-reasons { gap: 12px; max-width: none }
  #tab-ads .ads-reasons button { position: relative; padding: 10px 34px; min-height: 64px; font-size: 17px; display: flex; align-items: center; justify-content: center }
  #tab-ads .ads-reasons button:hover { background: #2a0f1c }
  #tab-ads .ads-kb { display: block; position: absolute; left: 10px; top: 8px; font: 9px/1 var(--pixel); font-style: normal; color: var(--muted) }
  #tab-ads .ads-cancel { font-size: 16px; margin-top: 16px }
  #tab-ads .ads-cancel::after { content: ' (Esc)'; color: var(--muted) }

  /* SCOREBOARD: a table the full width of the page */
  #tab-ads [data-ads-s="score"]:not([hidden]) { padding-bottom: 8px }
  #tab-ads .ads-h { font-size: 30px; margin-bottom: 4px }
  #tab-ads .ads-sub { font-size: 16px; margin-bottom: 12px }
  #tab-ads .ads-wbtn { font-size: 10px; padding: 12px 18px; min-height: 46px }
  #tab-ads .ads-list { gap: 8px }
  #tab-ads .ads-row { grid-template-columns: 60px 72px minmax(0, 3fr) minmax(0, 1.1fr) 90px 100px 90px 100px 120px 120px; gap: 14px; padding: 10px 16px }
  #tab-ads .ads-head { padding-top: 0; padding-bottom: 0; font-size: 9px }
  #tab-ads .ads-head .ads-hn { text-align: left }
  #tab-ads .ads-dk { display: block }
  #tab-ads .ads-head i.ads-hd, #tab-ads .ads-hd { display: inline; font-style: normal }
  #tab-ads .ads-head i.ads-hp { display: none }
  #tab-ads .ads-rk { font-size: 38px }
  #tab-ads .ads-th { width: 72px; height: 72px; font-size: 14px }
  #tab-ads .ads-nm { font-size: 17px }
  #tab-ads .ads-nm small { display: none }
  #tab-ads .ads-who { font: 700 16px var(--display); color: var(--cyan); text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0 }
  #tab-ads .ads-n { font-size: 34px }
  #tab-ads .ads-dk.ads-n { font-size: 30px; color: var(--muted) }
  /* both money columns: the same number font and size; $/HELD ranks the table, so it keeps the glow and $/BOOKED is the plain green */
  #tab-ads .ads-cph, #tab-ads .ads-cpb { font: 34px/1 var(--num) }
  #tab-ads .ads-cpb { text-align: center; color: var(--green); border-left: 1px dashed var(--brand); padding-left: 6px; white-space: nowrap }
  #tab-ads .ads-new { font: 600 14px/1.2 var(--body); color: var(--muted); text-shadow: none }
  #tab-ads .ads-lock { font: 800 12px/1.2 var(--display); color: var(--brand); text-shadow: none }
  #tab-ads .ads-note { font-size: 14px }

  /* CONTENT: the topic list on the left, the open topic and its quotes on the right */
  #tab-content { overflow: hidden }
  #tab-content .content { display: grid; grid-template-columns: minmax(380px, 460px) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); column-gap: 26px; height: 100% }
  #tab-content .content > .plain { grid-column: 1 / -1 }
  #tab-content .ct-status { grid-column: 1 / -1; grid-row: 1; font-size: 16px }
  #tab-content .content [data-ct-list], #tab-content .content [data-ct-list][hidden] { display: block !important; grid-column: 1; grid-row: 2; overflow-y: auto; min-height: 0; padding-right: 8px }
  #tab-content .ct-detail { grid-column: 2; grid-row: 2; overflow-y: auto; min-height: 0; padding: 24px 30px 30px; background: var(--panel2); border: 3px solid #000; box-shadow: 4px 4px 0 #000 }
  #tab-content .ct-detail[hidden] { display: none !important }
  #tab-content .ct-back { display: none }
  #tab-content .ct-card.ct-sel { border-color: var(--cyan); box-shadow: 0 0 12px #22e6ff55, 4px 4px 0 #000 }
  #tab-content .ct-card { cursor: pointer }
  #tab-content .ct-cards { display: flex; flex-direction: column; gap: 12px }
  #tab-content .ct-title { font-size: 18px }
  #tab-content .ct-dtitle { font-size: 32px; margin-top: 0 }
  #tab-content .ct-summary { font-size: 18px }
  #tab-content .ct-q { font-size: 21px }
  #tab-content .ct-sub { font-size: 15px }
  #tab-content .ads-mk { font-size: 14px; cursor: pointer }
}

/* narrow desktop, 900 to 1199 px: the fixed table columns would leave the ad name no room, so the thumbnail goes and the number columns shrink */
@media (min-width: 900px) and (max-width: 1199px) {
  #tab-ads .ads-row { grid-template-columns: 40px minmax(0, 3fr) minmax(0, 1fr) 62px 62px 52px 62px 84px 84px; gap: 8px; padding: 10px 12px }
  #tab-ads .ads-row > .ads-th, #tab-ads .ads-head > span:nth-child(2) { display: none }
  #tab-ads .ads-rk { font-size: 30px }
  #tab-ads .ads-n, #tab-ads .ads-dk.ads-n { font-size: 26px }
  #tab-ads .ads-cph:not(.ads-new):not(.ads-lock), #tab-ads .ads-cpb:not(.ads-new):not(.ads-lock) { font-size: 28px }
  #tab-ads .ads-hud > div { padding: 8px }
  #tab-ads .ads-k { font-size: 8px }
  #tab-ads .ads-head { font-size: 8px }
}
