/* The home page's layout on the atlas board (it was the QA prototype /atlas8/): the coin in a thin gold
   frame with its tier badge on the top-right corner, a self-sizing log of tries with small rows, plain
   see-through labels on the map, and the About links in the bottom-right corner.
   The map fills the screen; everything else floats on it, without panels behind the coin or the log. */
#app.a8 { --a8-col: 317px; --a8-edge: 14px; --a8-float: 0 10px 28px rgba(27, 42, 52, .2); }
.a8-board { flex: 1; }

/* small switches: Latest/Best in the log, km/mi by the zoom buttons */
.a8 .lab-seg-sm button { padding: 1px 7px; min-height: 22px; font-size: 10.5px; }

/* ---------------------------------------------------------------- search (and the right-issuer message in its place) */
.a8-top {
  position: absolute; z-index: 7; top: 14px; left: 50%; transform: translateX(-50%); width: min(480px, calc(100% - 640px));
  min-width: 340px; display: grid; gap: 8px;
}
.a8-search {
  display: flex; align-items: center; gap: 4px; height: 54px; box-sizing: border-box; padding: 4px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--a8-float);
}
.a8-searchicon { flex: none; width: 36px; display: grid; place-items: center; color: var(--muted); }
.a8-searchicon svg { width: 20px; height: 20px; }
.a8-search .lab-issuer { flex: 1; min-width: 0; height: 100%; }
.a8-search .ta input { border: 0; background: transparent; height: 44px; font-size: 17px; padding: 0 8px; }
.a8-search .ta input:focus { box-shadow: none; }
.a8-search .ta ul { left: -40px; right: -4px; top: calc(100% + 10px); max-height: min(380px, 55dvh); }
.a8-search:has(.cheered) { padding: 0; border-color: var(--gold); }
.a8-search:has(.cheered) .a8-searchicon { display: none; }
/* the message fits the search box exactly: emblem, one line of praise, one line of issuer */
.a8-search .lockchip.cheer {
  height: 100%; min-height: 0; box-sizing: border-box; grid-template-columns: 34px 1fr; column-gap: 10px; row-gap: 0;
  align-content: center; padding: 0 14px 0 10px; border: 0; border-radius: 11px; box-shadow: none;
}
.a8-search .lockchip.cheer::before { width: 34px; height: 34px; grid-row: 1 / span 2; }
.a8-search .lockchip.cheer .lk-cheer { font-size: 15px; line-height: 1.15; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a8-search .lockchip.cheer .lk-name { font-size: 13px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a8-search .lockchip.cheer .lk-note { display: none; }
.a8-top .lab-chips { display: none; }

/* ---------------------------------------------------------------- left column: coin on top, log in the corner */
.a8-left {
  position: absolute; z-index: 6; left: var(--a8-edge); top: 14px; bottom: 14px; width: var(--a8-col);
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.a8-left > * { pointer-events: auto; }
.a8-left .lab-coin { flex: none; padding: 0; background: transparent; border: 0; box-shadow: none; gap: 8px; }
.a8-left .lab-face .face { box-shadow: var(--a8-float); }
.a8-left .lab-faceseg, .a8-left .lab-coinrow .chip { box-shadow: 0 3px 10px rgba(27, 42, 52, .18); }
/* plain text over the map gets an ivory halo so it reads on land and sea alike */
.a8-left .lab-seglock, .a8-left details.credit summary, .a8-log .lab-htitle, .a8-log .lab-empty, .a8-left details.credit p {
  text-shadow: 0 0 3px #F5F0E5, 0 0 6px #F5F0E5, 0 0 10px #F5F0E5;
}
.a8-left .lab-seglock, .a8-left details.credit summary { color: var(--slate); font-weight: 500; }
.a8-left details.credit[open] p { padding: 6px 8px; border-radius: 8px; background: rgba(255, 253, 248, .92); text-shadow: none; }
.a8-left .lab-face { width: 100%; max-width: max(140px, calc(100dvh - 480px)); margin: 0 auto; }
.a8-log {
  margin-top: auto; flex: none; box-sizing: border-box; height: calc(6 * 30px + 5 * 4px + 34px); max-height: 100%;
  width: calc(var(--a8-col) + 6px); display: flex; flex-direction: column;
}
.a8-log .lab-row.compact { box-shadow: 0 3px 10px rgba(27, 42, 52, .16); background: rgba(251, 248, 241, .97); }
.a8-log .lab-row.compact.is-latest { background: #FBF2DA; }
.a8-log .lab-hctl .lab-seg-sm { box-shadow: 0 3px 10px rgba(27, 42, 52, .16); }
.a8-log .lab-history { flex: 1; min-height: 0; grid-template-rows: auto minmax(0, 1fr); gap: 6px; }
.a8-log .lab-hhead { flex-wrap: nowrap; padding: 0 2px 0 4px; }
.a8-log .lab-htitle { font-size: 11px; letter-spacing: .1em; white-space: nowrap; }
.a8-log .lab-rows { overflow-y: auto; align-content: start; min-height: 0; scrollbar-width: thin; padding: 2px 4px 6px 2px; margin: -2px -4px -6px -2px; }
.a8-log .lab-tips { font-size: 12px; max-height: 60px; overflow: auto; }
.a8-log .lab-empty { padding: 6px 4px; font-size: 12px; }

/* ---------------------------------------------------------------- right: zoom, km/mi, year */
.a8-right { position: absolute; z-index: 6; right: 14px; top: 14px; display: grid; gap: 8px; justify-items: end; }
.a8-board .lab-ctl { position: static; }
.a8-units {
  display: inline-flex; align-items: center; height: 40px; padding: 0 6px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); box-shadow: 0 4px 12px rgba(27, 42, 52, .12);
}
.a8-board .lab-yearbox { position: static; justify-items: end; }
.a8-board .lab-yearchip { justify-self: end; box-shadow: 0 4px 12px rgba(27, 42, 52, .12); }
.a8-board .lab-legend { flex-direction: column; gap: 3px; align-items: flex-start; }

/* ---------------------------------------------------------------- the timeline window */
.a8-timeline {
  position: absolute; z-index: 7; bottom: 14px; left: 50%; transform: translateX(-50%);
  width: min(600px, calc(100% - 2 * (var(--a8-edge) + var(--a8-col) + 16px))); box-sizing: border-box;
  padding: 10px 14px 6px; display: grid; gap: 6px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--a8-float);
}
.a8-timeline .lab-latest {
  flex-wrap: nowrap; gap: 6px; padding: 4px 10px; font-size: 13px; white-space: nowrap; overflow: hidden;
}
.a8-timeline .lab-latest .lbl { display: none; }
.a8-timeline .lab-latest .who { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.a8-timeline .lab-latest .chip { font-size: 12px; padding: 1px 8px; flex: none; }
.a8-timeline .lab-latest .pct { font-size: 16px; flex: none; }
.a8-row { display: flex; align-items: flex-end; gap: 14px; }
.a8-row .lab-when { flex: 1; min-width: 0; }
.a8-row .lab-guess { height: 46px; margin-bottom: 16px; padding: 0 22px; }
.a8-timeline .lab-ro .readout { font-size: 18px; }
.a8-timeline .hint:empty { display: none; }
.a8-timeline .lab-after { padding: 4px 0 6px; }

.a8-board .toast { bottom: auto; top: 82px; }

/* ---------------------------------------------------------------- reveal drawer */
.a8-drawer {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 9; width: min(440px, 100%); box-sizing: border-box;
  display: flex; flex-direction: column; background: var(--card); border-left: 1px solid var(--line);
  box-shadow: -12px 0 30px rgba(27, 42, 52, .18);
}
.a8-dhead { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--line); }
.a8-drawer { overflow: hidden; }
.a8-dhead h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 22px; }
.a8-dbody { flex: 1; overflow: auto; padding: 16px 18px 24px; }

/* ---------------------------------------------------------------- narrower screens */
@media (max-width: 1099px) {
  /* clear of the coin and the tier badge on its corner */
  .a8-top { width: auto; left: calc(var(--a8-edge) + var(--a8-col) + 64px); right: 232px; transform: none; min-width: 0; }
  .a8-timeline { left: calc(var(--a8-edge) + var(--a8-col) + 16px); right: 14px; width: auto; transform: none; max-width: 600px; margin: 0 auto; }
}
@media (max-width: 699px) {
  .a8-top { left: 8px; right: 8px; top: 8px; width: auto; transform: none; min-width: 0; }
  .a8-top .lab-chips { display: flex; }
  .a8-left { top: auto; bottom: var(--a8-tl, 190px); left: 8px; width: 116px; }
  .a8-log { display: none; }
  .a8-left .lab-coin { padding: 6px; gap: 6px; }
  .a8-left .lab-face { max-width: none; }
  .a8-left .lab-coinrow .chip, .a8-left .lab-seglock { display: none; }
  .a8-left .lab-faceseg button { padding: 0 7px; min-height: 28px; font-size: 10px; letter-spacing: .04em; }
  .a8-left .lab-coin details.credit { font-size: 10px; }
  .a8-right { top: auto; bottom: var(--a8-tl, 190px); right: 8px; }
  .a8-units { display: none; }
  .a8-board .lab-ctl .zin, .a8-board .lab-ctl .zout { display: none; }
  .a8-board .lab-legend { display: none; }
  .a8-timeline { left: 8px; right: 8px; bottom: 8px; width: auto; transform: none; padding: 8px 10px 4px; }
  .a8-row { gap: 10px; }
  .a8-row .lab-guess { padding: 0 16px; }
  .a8-drawer { top: auto; height: 88%; width: 100%; border-left: 0; border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; }
  .a8-board .toast { top: 118px; }
  .pin-tag { font-size: 12px; }
}


/* ---------------------------------------------------------------- coin, tier badge and log */
/* the coin sits left, in line with Front/Back; room above it for the tier badge */
@media (min-width: 700px) { .a8-left { top: 30px; } }
.a8-faceframe { position: relative; width: max-content; max-width: 100%; }
.a8-left .lab-face { margin: 0; width: min(var(--a8-col), max(168px, calc((100dvh - 500px) * 1.2))); max-width: none; }
.a8-left .lab-coinrow { justify-content: flex-start; }
/* the tier badge sits on the coin's top-right corner, half of it over the coin */
.a8-faceframe > .chip[class*="tier-"] {
  position: absolute; left: 100%; top: 0; transform: translate(-50%, -50%); z-index: 2; white-space: nowrap;
  font-weight: 600; box-shadow: 0 4px 12px rgba(27, 42, 52, .22); background: var(--card);
}
.a8-faceframe > .chip.tier-hard { background: var(--slate); color: #E7C46F; border-color: var(--gold); }

/* the log sizes itself (script); never narrower than the coin column's switches need */
.a8-log { width: 236px; transition: width .25s ease; }
.a8-log { height: calc(30px + 5 * 25px + 5 * 4px + 40px); }
/* the top row keeps its size; the rows below are smaller */
.a8-log .lab-row.compact:not(:first-child) { height: 25px; font-size: 11px; gap: 4px; }
.a8-log .lab-row.compact:not(:first-child) .lab-cell { font-size: .93em; padding: .05em .5em; }
.a8-log .lab-row.compact:not(:first-child) .gn { font-size: .9em; min-width: 1.75em; height: 1.75em; }
@media (max-width: 699px) {
  .a8-faceframe { width: 100%; }
  .a8-left .lab-face { width: 100%; }
  .a8-faceframe > .chip[class*="tier-"] { font-size: 11px; padding: 2px 8px; }
}

/* ---------------------------------------------------------------- frame, map labels, About links */
/* the coin in a thin antique-gold frame: a gold hairline, an ivory mat, a fainter gold line outside */
.a8-left .lab-face .face {
  border: 1px solid var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 253, 248, .9), 0 0 0 4px rgba(198, 154, 69, .5), var(--a8-float);
}

/* labels of the tries on the map: number and issuer only, no border, on a see-through ground */
.a8-board .pin-tag {
  left: 11px; top: -12px; gap: 0; padding: 2px 9px 2px 2px; border: 0; background: rgba(255, 253, 248, .74);
  box-shadow: none; -webkit-backdrop-filter: blur(1.5px); backdrop-filter: blur(1.5px); font-size: 12.5px; font-weight: 600;
}
.a8-board .pin-tag b { min-width: 19px; height: 19px; margin-right: 5px; font-size: 11.5px; }
.a8-board .pin.latest .pin-tag { border: 0; box-shadow: none; background: rgba(251, 242, 218, .84); }
.a8-board .pin.latest .pin-tag b { background: var(--gold-deep); }
.a8-board .pin.right .pin-tag { background: rgba(228, 236, 233, .84); }

/* the About links in the bottom-right corner: a short column, or one line where the screen is wide enough */
.a8-foot {
  position: absolute; z-index: 6; right: 14px; bottom: 14px; display: flex; flex-direction: column; align-items: flex-end;
  padding: 6px 10px; border-radius: 12px; background: rgba(255, 253, 248, .74);
  -webkit-backdrop-filter: blur(1.5px); backdrop-filter: blur(1.5px);
}
.a8-foot a {
  font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--slate);
  text-decoration: none; white-space: nowrap; line-height: 20px;
}
.a8-foot a:hover, .a8-foot a:focus-visible { color: var(--gold-deep); text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 1400px) { .a8-foot { flex-direction: row; gap: 0 12px; padding: 5px 12px; } }
/* below 1100px the timeline window is no longer centred: it stops short of the links */
@media (max-width: 1099px) { .a8-timeline { right: 128px; } }
@media (max-width: 699px) {
  /* one compact line along the bottom edge, under the timeline window (Alex, 2026-10-08: the links
     stay on the board at every width, About included) */
  .a8-foot { right: 8px; bottom: 4px; flex-direction: row; gap: 0 8px; padding: 1px 6px; border-radius: 8px; }
  .a8-foot a { font-size: 9.5px; letter-spacing: .04em; line-height: 18px; }
  .a8-timeline { right: 8px; bottom: 28px; }
  .a8-left, .a8-right { bottom: calc(var(--a8-tl, 190px) + 20px); }
  .a8-board .pin-tag { display: block; max-width: 128px; overflow: hidden; text-overflow: ellipsis; }
  .a8-board .pin-tag b { vertical-align: middle; }
}

/* a QA preview says so in the header */
.lab-top .lab-tag { min-width: 0; overflow: hidden; text-overflow: ellipsis; text-transform: none; letter-spacing: .02em; }

/* the latest result in the timeline window: the way to go, in a dark disc, stands out from the numbers */
.a8-timeline .lab-latest .dirchip {
  display: inline-flex; align-items: center; gap: 6px; padding: 1px 3px 1px 9px; font-size: 13px; font-weight: 600;
  border-color: var(--slate); color: var(--slate);
}
.a8-timeline .lab-latest .dirchip:has(> .arr:first-child) { padding: 1px 9px 1px 3px; }
.a8-timeline .lab-latest .dirchip .arr {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: var(--slate); color: var(--ivory); font-size: 15px; font-weight: 700; line-height: 1;
}
.a8-timeline .lab-latest .dirchip.close { border-color: var(--gold-deep); color: #6E4B18; }
.a8-timeline .lab-latest .dirchip.close .arr { background: var(--gold-deep); }

/* ---------------------------------------------------------------- a shared link to a day that has passed */
/* in the toast's place under the search box, until it is closed; toasts move below it meanwhile */
.passed-note {
  position: absolute; z-index: 8; top: 82px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100% - 24px); box-sizing: border-box;
  padding: 6px 6px 6px 16px; border-radius: 8px; background: var(--slate); border-left: 3px solid var(--gold);
  color: #fff; font-size: 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.passed-note .lab-round { flex: none; width: 32px; height: 32px; box-shadow: none; }
.passed-note .lab-round svg { width: 16px; height: 16px; }
.a8-board .passed-note ~ .toast { top: 136px; }
@media (max-width: 699px) {
  .passed-note { top: 118px; font-size: 14px; }
  .a8-board .passed-note ~ .toast { top: 168px; }
}

/* ---------------------------------------------------------------- reporting a problem (report.js) */
.report-row { margin: 18px 0 4px; }
.linkbtn {
  background: none; border: 0; padding: 4px 0; font: inherit; font-size: 14px; color: var(--muted);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.linkbtn:hover, .linkbtn:focus-visible { color: var(--ink); }
dialog.report { width: min(520px, calc(100vw - 32px)); overflow: visible; }
/* the issuer list hangs outside the sheet instead of scrolling it (which pushed the title up) */
.report-sheet .ta ul { max-height: 240px; }
.report-sheet h3.report-step {
  margin: 2px 0 0; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
}
.report-sheet .small { font-size: 14px; color: var(--muted); }
.report-parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.report-choice {
  min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--plate); color: var(--ink); font: inherit; font-size: 15px; text-align: left; cursor: pointer;
}
.report-choice:hover { border-color: var(--gold); }
.report-choice[aria-pressed="true"] { background: var(--slate); border-color: var(--slate); color: var(--ivory); }
.report-problems { display: grid; gap: 8px; }
.report-problem {
  display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--plate); color: var(--ink); font: inherit; font-size: 15px; text-align: left; cursor: pointer;
}
.report-problem:hover:not([disabled]) { border-color: var(--gold); }
.report-problem small { font-size: 13px; color: var(--muted); }
.report-problem[disabled] { opacity: .6; cursor: default; }
.report-picked { font-weight: 600; }
.report-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.report-inline .ta-slot { flex: 1 1 220px; min-width: 0; }
.report-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.report-seg .report-choice { min-height: 36px; padding: 6px 12px; border-radius: 999px; font-size: 14px; }
.report-year {
  width: 8ch; padding: 9px 10px; border: 1px solid var(--silver); border-radius: 8px;
  background: var(--plate); color: var(--ink); font: inherit; font-size: 16px;
}
.report-year:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(198, 154, 69, .22); }
.report-status:empty { display: none; }
.report-status, .report-done { font-size: 15px; color: var(--ink); }
.zoomer .zreport {
  position: fixed; bottom: 44px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 32px);
  background: none; border: 0; padding: 6px 10px; font: inherit; font-size: 14px; color: #E7C46F;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.zoomer .zreport[disabled] { text-decoration: none; cursor: default; }
@media (max-width: 699px) {
  dialog.report { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 16px 16px 0 0; }
  /* the sheet sits at the bottom of a phone screen, so the list opens upward */
  .report-sheet .ta ul { top: auto; bottom: calc(100% + 4px); }
}
