/* Contrails post. Everything shared with the IceCube post comes from ../icecube/ice.css; only the figures that are new live here. */
.ct-h { align-items: start; }
.ct-h .ice-h-stage { max-width: 520px; margin: 0 auto; width: 100%; }
.ct-h .ct-main { cursor: crosshair; border: 1px solid color-mix(in srgb, var(--ink) 24%, transparent); image-rendering: pixelated; }
.ct-strip { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin: 10px 0 10px; }
.ct-strip button { all: unset; box-sizing: border-box; cursor: pointer; display: block; text-align: center; font: 500 10px/1 var(--mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ct-strip canvas { display: block; width: 100%; aspect-ratio: 1; border: 1px solid transparent; opacity: .55; transition: opacity .2s; margin-bottom: 6px; }
.ct-strip button.on canvas { opacity: 1; border-color: var(--ink); }
.ct-strip button.on, .ct-strip button.t { color: var(--ink); }
.ct-strip button:focus-visible canvas { outline: 1px solid var(--o0); outline-offset: 2px; }
.ct-h .ice-h-ttl { min-height: 1.4em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-h .ct-ex, .ct-h .kind { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-h .ice-h-side .note { min-height: 4.7em; }
.ct-lv { margin: 0 0 18px; }
.ct-lvr { display: grid; grid-template-columns: 4.6em 1fr 4em; gap: 10px; align-items: center; padding: 5px 0; font: 400 12px/1 var(--mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ct-lvr u { display: block; height: 6px; text-decoration: none; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.ct-lvr i { display: block; height: 100%; background: var(--ink-3); }
.ct-lvr b { font-weight: 500; text-align: right; color: var(--ink-2); }
.ct-lvr.in { color: var(--ink); } .ct-lvr.in i { background: var(--ink); } .ct-lvr.in b { color: var(--ink); }

/* a square picture beside its readout */
.ct-two { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 32px; align-items: center; }
.ct-pic canvas { display: block; width: 100%; border: 1px solid color-mix(in srgb, var(--ink) 24%, transparent); image-rendering: pixelated; }
.ct-say .k { font: 500 10.5px/1.3 var(--mono) !important; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 8px !important; }
.ct-say .k b { color: var(--ink-2); font-weight: 500; }
.ct-say .kind { font: 500 21px/1.2 var(--mono); color: var(--ink); margin: 0 0 8px; font-variant-numeric: tabular-nums; }
.ct-say .note { font: 400 12px/1.55 var(--mono) !important; color: var(--ink-2); margin: 0 0 14px !important; min-height: 5.6em; }
.ct-say .stats { display: grid; justify-content: space-between; gap: 6px 10px; margin: 0 0 6px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ct-say .stats dt { font: 500 10.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 7px; }
.ct-say .stats dd { margin: 0; font: 500 17px/1 var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ct-say .ice-key { margin-top: 16px; }
@media (max-width: 760px) { .ct-two { grid-template-columns: 1fr; gap: 18px; } .ct-pic { max-width: 400px; } .ct-say .note { min-height: 0; } }

/* the model diagram */
.ct-tabs { margin: 0 0 16px; }
.ct-arch-sc { overflow-x: auto; scrollbar-width: thin; }
.ct-arch-sc svg { display: block; }
.ct-arch-sc text { font-family: var(--mono); text-anchor: middle; }
.ct-arch-sc .t { font-size: 12.5px; font-weight: 500; letter-spacing: .08em; }
.ct-arch-sc .n { font-size: 11.5px; fill: var(--ink-3); letter-spacing: .04em; }
.ct-arch-sc .p { cursor: help; outline: none; }
.ct-arch-sc .p .b { transition: stroke-width .15s; }
.ct-arch-sc .p.is .b, .ct-arch-sc .p:focus-visible .b { stroke-width: 2.6 !important; }
.ct-tip { font: 400 12px/1.6 var(--mono) !important; color: var(--ink-2); margin: 14px 0 0 !important; min-height: 5em; max-width: 760px; }
.ct-tip b { color: var(--ink); font-weight: 500; }

/* the file table needs a wider first column than the shared one */
.tbl table.plain.ice-cols.ct-files th:first-child { width: 236px; }
@media (max-width: 560px) { .tbl table.plain.ice-cols.ct-files th:first-child { width: 150px; } .tbl table.plain.ice-cols.ct-files td:first-child { overflow-wrap: anywhere; } }

/* the satellite: a scan beam sweeps the field of view, the footprint lights as it passes, stars blink */
.ice-dia .ct-beam { animation: ct-scan 3.2s ease-in-out infinite alternate; }
@keyframes ct-scan { from { transform: rotate(-23deg); } to { transform: rotate(23deg); } }
.ice-dia .ct-patch { fill-opacity: .18; animation: ct-patch 3.2s ease-in-out infinite; }
@keyframes ct-patch { 0%, 34% { fill-opacity: .18; } 50% { fill-opacity: .95; } 66%, 100% { fill-opacity: .18; } }
.ice-dia .ct-lens { animation: ct-lens 3.2s steps(1) infinite; }
@keyframes ct-lens { 0%, 46% { opacity: .35; } 47%, 55% { opacity: 1; } 56%, 100% { opacity: .35; } }
.ice-dia .ct-star { animation: ct-star 2.6s ease-in-out infinite; }
@keyframes ct-star { 0%, 100% { opacity: .2; } 50% { opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .ice-dia .ct-beam, .ice-dia .ct-patch, .ice-dia .ct-lens, .ice-dia .ct-star { animation: none; } .ice-dia .ct-patch { fill-opacity: .6; } }

/* ---- phones: touch, narrow columns, nothing that moves under a finger ---- */
/* a box that scrolls sideways fades out on each side that has more to show (sam.js sets sc-l and sc-r) */
.sc-l, .sc-r { -webkit-mask-image: linear-gradient(90deg, var(--fl, #000), #000 44px, #000 calc(100% - 44px), var(--fr, #000)); mask-image: linear-gradient(90deg, var(--fl, #000), #000 44px, #000 calc(100% - 44px), var(--fr, #000)); }
.sc-l { --fl: transparent; } .sc-r { --fr: transparent; }
.ice-dia:not(.nar) .ice-dia-sc { -webkit-mask-image: none; mask-image: none; }   /* a wide (desktop) diagram keeps its look */
/* a diagram in a narrow column is drawn one unit to one pixel (sam.js); its smallest labels go up a size so they read at phone size */
.ice-dia.nar .d-subin { font-size: 10.5px; }
.ice-dia.nar .d-sub { font-size: 11px; }
.ice-dia.nar .d-new { font-size: 9.5px; }
.ice-dia-sc { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
/* a diagram off screen does no work, CSS animations included */
.ice-dia.off * { animation-play-state: paused !important; }
/* an explanation opened by a tap closes with a tap on it */
.ice-dia-tip.tap.show { pointer-events: auto; cursor: pointer; }
/* the opening letter keeps its room before dropcap.js has drawn it, so the first lines don't jump */
p.dc > #dropcap:not(.on) { float: left; width: 104px; height: 126px; margin: 2px 10px 0 -14px; font: 700 118px/126px var(--fig); text-align: center; color: color-mix(in srgb, var(--fig-ink) 55%, transparent); }
.ct-strip, .ct-h .ct-main { touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.ice-dia .d-it, .ice-chip { -webkit-tap-highlight-color: transparent; }
@media (max-width: 760px) {
  p.dc > #dropcap:not(.on) { margin-left: -8px; }
  /* the frame line under the movie may take two lines; both are always reserved */
  .ct-h .ice-h-ttl { white-space: normal; min-height: 2.8em; text-wrap: balance; }
  /* file names break after their underscores, not over the next column */
  .tbl table.plain.ice-cols.ct-files td:first-child code { white-space: normal; overflow-wrap: anywhere; }
}
/* on the smallest phones the eight frames sit closer, so each is a wider target */
@media (max-width: 374px) { .ct-strip { gap: 3px; } }
/* Tap targets for the links, chips and contents, and touch screens without hover looks, come from site.css and ice.css (max-width: 900px, hover: hover / none).
   The one hover look they leave on a touch screen: */
@media (hover: none) { .toc-m a:hover { color: var(--ink-3); } }
