/* Sortie: the first screen is one board: the name and the copy on the left, the plane of dots on the right. */
.hero { position: relative; }
/* one board: the copy on the left, the stage (the plane, its callouts, missing, the card) laid over the whole width;
   js/home.js sizes the plane so no dot touches the copy, the card or the missing list (24 px apart) */
.hgrid { position: relative; height: calc(100svh - var(--bar) - 45px); min-height: 600px; max-height: 1000px; }
.hcopy { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; height: 100%; width: min(58%, 740px); padding: 24px 0 40px; min-width: 0; }
.hcopy > * { max-width: 100%; }
.name { font: 800 clamp(60px, min(7.3vw, 13.5svh), 118px)/.9 var(--display); letter-spacing: -.035em; margin: 0 0 clamp(16px, 3.2svh, 40px); }
.head { font: 800 clamp(24px, min(2.3vw, 4svh), 34px)/1.15 var(--display); letter-spacing: -.01em; margin: 0 0 16px; }
.lines { max-width: 660px; font-size: clamp(17px, min(1.3vw, 2.3svh), 19px); line-height: 1.65; color: var(--ink-2); margin: 0 0 clamp(20px, 3.6svh, 40px); }
.lines b { color: var(--ink); font-weight: 700; }
.acts { display: flex; gap: 16px; margin-bottom: clamp(16px, 3svh, 32px); flex-wrap: wrap; }

.stage { position: absolute; inset: 0 var(--pad); z-index: 1; }
.bloom { position: absolute; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,255,255,.95), rgba(255,255,255,0)); pointer-events: none; }
.pbox { position: absolute; inset: 0; }
.pbox canvas { position: absolute; left: 0; top: 0; }
.callout { position: absolute; margin: 0; font-size: 16px; line-height: 1.35; color: var(--ink-2); white-space: nowrap; }
.missing { position: absolute; width: 232px; }
.missing h2, .pot h2 { font: 800 24px/1 var(--display); margin: 0 0 12px; letter-spacing: -.01em; }
.missing ul { list-style: none; margin: 0; padding: 0; }
.missing li { display: flex; align-items: center; gap: 12px; min-height: 32px; color: var(--ink-2); }
.missing li code { font: 500 16px var(--mono); }
.missing li .stamp { margin: 2px 0 2px 4px; }
.missing li.new { animation: slidein .8s cubic-bezier(.2,.7,.2,1); }
.missing li.new .cross { animation: crossin 1.2s ease-out; }
@keyframes slidein { from { transform: translateX(-16px); opacity: 0; } }
@keyframes crossin { 0% { transform: scale(1.8); } 100% { transform: none; } }
.mcount { margin: 0 0 8px; font-size: 16px; color: var(--ink-3); }
.pot { position: absolute; right: 0; width: 330px; padding: 24px 32px; }
.potnum { font: 600 30px/1.1 var(--text); margin: 0 0 14px; letter-spacing: -.01em; }
.pot dl { position: relative; margin: 16px 0 0; padding-top: 12px; display: grid; gap: 6px; }
.pot dl::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line); }
.pot dl div { display: flex; justify-content: space-between; gap: 12px; font-size: 16px; }
.pot dt { color: var(--ink-2); }
.pot dd { margin: 0; font-weight: 700; }
.bar-track { position: relative; }
.drop { position: absolute; top: -34px; width: 10px; height: 10px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--blue); animation: drop .7s cubic-bezier(.5,0,.9,.6) forwards; }
@keyframes drop { 0% { transform: translateY(-20px) rotate(-45deg); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateY(30px) rotate(-45deg); opacity: .2; } }
.pbox canvas { touch-action: pan-y; }
.pot.due { box-shadow: 0 0 0 4px rgba(255,194,26,.45); }
.pot.paid { animation: potpaid 2.4s ease-out; }
@keyframes potpaid { 0%, 30% { box-shadow: 0 0 0 6px rgba(255,194,26,.7); } 100% { box-shadow: 0 0 0 0 rgba(255,194,26,0); } }
.caption { display: none; }

/* the board */
/* the board's numbers: hairlines are drawn as pseudo-elements, so a cell is a column of the board, not a box */
.stats { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; }
.stats::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1.5px; background: var(--ink); }
.stats div { position: relative; padding: 28px 24px 28px 0; min-width: 0; }
.stats div:not(:nth-child(3n + 1)) { padding-left: 32px; }
.stats div:not(:nth-child(3n))::after { content: ""; position: absolute; right: 0; top: 28px; bottom: 28px; width: 1px; background: var(--line); }
.stats div:nth-child(n + 4)::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line); }
.stats dt { font: 600 16px/1.3 var(--text); color: var(--ink-3); margin-bottom: 12px; }
.stats .split { margin: 12px 0 0; font-size: 16px; color: var(--ink-3); }
.stats .split b { color: var(--ink-2); font-weight: 700; }
.stats dd { margin: 0; font: 800 clamp(30px, 3vw, 48px)/1 var(--display); letter-spacing: -.02em; white-space: nowrap; }

/* how a sortie goes */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.steps li { border: 1.5px solid var(--ink); background: rgba(251,252,253,.9); padding: 24px; display: flex; flex-direction: column; }
.steps canvas { width: 72px; height: 72px; margin-bottom: 16px; }
.steps h3 { font: 800 24px/1.1 var(--display); margin: 0 0 8px; }
.steps p { margin: 0; font-size: 17px; color: var(--ink-2); }

/* flight log */
.tag { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.tag i { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); flex: none; }
.tag.flak i { background: var(--yellow); }
.tag.lost i { background: none; border: 1.5px dashed var(--dash); }
.tag.fuel i { background: var(--blue); }
.tag.debrief i, .tag.pay i { background: var(--yellow-deep); }
.tag.burn i { background: var(--ink-3); }
.tbl .what { color: var(--ink-2); }

@media (max-width: 1280px) { .pot { width: 320px; } .potnum { font-size: 30px; } }
@media (max-width: 1180px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1024px) {
  .hgrid { height: auto; max-height: none; min-height: 0; display: flex; flex-direction: column; }
  .hgrid > .stage { display: contents; }
  .pbox { order: -1; margin-top: 16px; }
  .hcopy { order: 0; }
  .missing { order: 1; margin-top: 8px; }
  .pot { order: 2; margin-top: 24px; }
  .caption { order: -1; }
  .hcopy { width: auto; height: auto; padding: 24px 0 24px; }
  .bloom { display: none; }
  .pbox { position: relative; inset: auto; height: var(--ph, 360px); }
  .callout { display: none; }
  .missing, .pot { position: static; width: auto; }
  .caption { display: block; margin: 8px 0 0; font-size: 16px; color: var(--ink-2); }
}
@media (max-width: 640px) {
  .name { font-size: clamp(52px, 15.5vw, 76px); }
  .head { font-size: 24px; }
  .lines { font-size: 17px; }
  .lines br { display: none; }
  .acts { align-self: stretch; }
  .acts .btn { flex: 1 1 0; padding: 0 18px; font-size: 17px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats div, .stats div:not(:nth-child(3n + 1)) { padding: 20px 12px 20px 0; }
  .stats div:nth-child(even) { padding-left: 16px; }
  .stats div::after, .stats div::before { display: none; }
  .stats div:nth-child(odd)::after { display: block; content: ""; position: absolute; right: 0; top: 20px; bottom: 20px; width: 1px; background: var(--line); }
  .stats div:nth-child(n + 3)::before { display: block; content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line); }
  .stats dd { font-size: clamp(22px, 6.4vw, 30px); }
  .steps { grid-template-columns: 1fr; }
  .tbl thead { display: none; }
  .tbl tr { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; }
  .tbl tr::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line); }
  .tbl td { height: auto; padding: 0; border: 0; }
  .tbl td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .tbl td:nth-child(3) { grid-column: 1; grid-row: 3; }
  .tbl td:nth-child(4) { grid-column: 2; grid-row: 1; }
}
