/* PROTOTYPE — overpass/card.css: the place card, its almanac, grades and buttons, and the phone's one-line answer
   (#ovAnswer) (the direction's §8.7; task B2a, with overpass/card.js). Everything is scoped under .card, so the panel's
   rules for its own children (panel.css, linked after this file) reach only the card's box. */

.card > * + * { margin-top: 8px; }
.card .card-name { margin: 0; font-size: var(--fs-card-title); font-weight: 700; font-stretch: 84%; line-height: 1.08; color: #fff; text-wrap: balance; }
.card .card-name.card-long { font-size: 1.22rem; }
.card .card-name:focus { outline: none; }
.card .card-name:focus-visible { outline: 3px solid var(--track-lit); outline-offset: 3px; }
.card .card-where { margin-top: 5px; font-size: var(--fs-ui); line-height: 1.4; color: var(--pale-2); font-variant-numeric: tabular-nums; }
.card .card-first { margin-top: 10px; }
.card .card-lines { display: grid; gap: 6px; }
.card .card-never { margin-top: 12px; }
.card .card-never b { color: #fff; font-weight: 600; }
.card .card-legend { font-size: var(--fs-small); }
.card .pbtns { margin-top: 12px; }
.card .plain:disabled { opacity: .55; cursor: progress; }

/* ---- the record: the almanac, with the grades beside it (under it on a phone) ---- */
.card .rec { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: flex-start; margin-top: 12px; }
.alm { display: grid; grid-template-columns: auto repeat(12, 10px); gap: 2px; align-items: center; width: max-content; flex: none;
  font-size: .64rem; line-height: 1; color: var(--pale-2); font-variant-numeric: tabular-nums; }
.alm-m { text-align: center; padding-bottom: 2px; }
.alm-y { padding-right: 6px; text-align: right; }
.alm-x { width: 10px; height: 10px; }
.alm-wait { flex: 1 1 100%; }
/* an almanac square: a button that sets its month. The states (§8.7, with R3's one neutral state) */
.ac { display: block; width: 10px; height: 10px; padding: 0; margin: 0; border: 0; border-radius: var(--r-cell); cursor: pointer;
  background: rgba(255, 255, 255, .07); }
.ac-c { background: var(--water); box-shadow: 0 0 4px rgba(111, 211, 255, .7); }
.ac-p { background: none; box-shadow: inset 0 0 0 1.5px #BFE3FA; }
.ac-u { background: radial-gradient(circle, #BFE9FF .8px, transparent 1px) 0 0 / 3.3px 3.3px; }
.ac-n { background: none; box-shadow: inset 0 0 0 1px rgba(191, 227, 250, .55); outline: 1px dashed rgba(191, 227, 250, .7); outline-offset: -1px; }
.ac-f { background: repeating-linear-gradient(-45deg, var(--doubt) 0 1.5px, transparent 1.5px 3px); }
.ac-nb { background: repeating-linear-gradient(45deg, rgba(157, 178, 203, .45) 0 1px, transparent 1px 3px); }
/* usual water (the tide, a lake): any month with water seen, outlined in steel as the map draws it, never lit */
.ac-s { background: none; box-shadow: inset 0 0 0 1.5px var(--steel); }
.ac-o { background: rgba(255, 255, 255, .07); }
.ac:hover { box-shadow: 0 0 0 1px var(--pale); }
.ac-c:hover { box-shadow: 0 0 4px rgba(111, 211, 255, .7), 0 0 0 1px #fff; }
.ac.cur { outline: 2px solid var(--track-lit); outline-offset: 1px; }
.ac:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* beside the almanac: the grades, then the almanac's legend */
.card .rec-side { flex: 1 1 160px; min-width: 160px; max-width: 19em; display: grid; gap: 10px; align-content: start; }
.card .rec-side .card-legend { margin: 0; }
/* the grades: the counts of each kind of month, a swatch drawn as the almanac draws it, figures after their words */
.card .grades { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px;
  font-size: var(--fs-key); line-height: 1.3; color: var(--pale); }
.card .grades li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 7px; align-items: baseline; }
.card .grades b { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
.card .grades .gw { display: block; text-wrap: pretty; }
.card .grades .gn { display: block; margin-top: 1px; color: var(--pale-2); }
.k { display: inline-block; width: 12px; height: 12px; border-radius: var(--r-cell); transform: translateY(1px); }
.k-c { background: var(--water); box-shadow: 0 0 6px rgba(111, 211, 255, .8); }
.k-p { box-shadow: inset 0 0 0 1.5px #BFE3FA; }
.k-u { background: radial-gradient(circle, #BFE9FF .8px, transparent 1px) 0 0 / 3.3px 3.3px; outline: 1px solid rgba(191, 233, 255, .35); }
.k-n { box-shadow: inset 0 0 0 1px rgba(191, 227, 250, .55); outline: 1px dashed rgba(191, 227, 250, .7); outline-offset: -1px; }
.k-f { background: repeating-linear-gradient(-45deg, var(--doubt) 0 2px, transparent 2px 4px); outline: 1px solid var(--doubt); }
.k-f.k-hid { opacity: .5; }
.k-s { box-shadow: inset 0 0 0 1.5px var(--steel); }

/* ---- the phone's one-line answer at the map's foot, clear of the credit line (card.js sets its bottom) ---- */
.answer { position: absolute; left: 8px; right: 8px; bottom: 34px; z-index: 4; font-size: .9rem; line-height: 1.35; color: #fff;
  background: rgba(10, 27, 51, .92); border-left: 3px solid var(--track-lit); padding: 7px 10px; }
.answer .plain { padding: 0; margin-left: 2px; font-size: .9rem; color: #fff; white-space: nowrap; }
.answer-w { font-weight: 600; }

@media (max-width: 760px) {
  /* bigger squares for a finger; the grades go under the almanac */
  .alm { grid-template-columns: auto repeat(12, 18px); gap: 3px; font-size: .7rem; }
  .ac, .alm-x { width: 18px; height: 18px; }
  .card .rec-side { flex-basis: 100%; max-width: none; }
}
@media (pointer: coarse) {
  .card .pbtns .plain, .card .pbtns .ghost { min-height: var(--hit); }
}
