/* ============================================================
   Pinstripes Orlando reopening (Desk feature)
   Page uses _Layout (site.css Nightfall tokens: --paper, --paper-2, --ink, --ink-soft,
   --muted, --hair, --gold, --display, --text, --space-*). Scoped under .pso; page links
   use `.pso :where(a)` so classed controls keep their own ink.
   Signature: a bowling scoresheet. Ten frames from the 2024 opening to doors open again,
   strikes for documented steps, a slash in progress, a gutter for the closing. Picking a
   frame reads its record into the panel below. The only motion is the marks being
   pencilled in once, and none of it sits behind type.
   ============================================================ */

.pso {
  --pso-navy: oklch(22% 0.045 262);
  --pso-navy-2: oklch(28% 0.05 262);
  --pso-chalk: oklch(95% 0.01 85);
  --pso-sheet: oklch(96% 0.018 88);        /* scoresheet card stock */
  --pso-sheet-ink: oklch(26% 0.03 262);
  --pso-rule: oklch(52% 0.12 262 / 0.35);  /* printed blue rules */
  --pso-pencil: oklch(50% 0.2 27);         /* red marks */
  --pso-maple: oklch(80% 0.09 72);         /* lane wood */
  --pso-green: oklch(50% 0.12 150);
  --pso-cond: 'Saira Condensed', var(--text);
  --pso-serif: 'Libre Caslon Display', var(--display);
  --pso-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --pso-ease: cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 1160px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-md) var(--space-3xl);
}
.pso :where(a) { color: var(--gold); text-decoration: none; border-bottom: 1px solid oklch(84% 0.13 86 / 0.35); }
.pso :where(a:hover) { border-bottom-color: var(--gold); }
.pso :where(a:focus-visible),
.pso :where(summary:focus-visible) { outline: 2px solid var(--pso-maple); outline-offset: 3px; border-radius: 3px; }
.pso-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---- hero -------------------------------------------------------------- */
.pso-hero {
  padding: clamp(28px, 5vw, 56px);
  border-radius: 28px 28px 0 0;
  background: linear-gradient(165deg, var(--pso-navy-2), var(--pso-navy));
  border: 1px solid oklch(100% 0 0 / 0.06);
  border-bottom: 0;
  /* Pinstripes run only down the frame edge, never behind the copy. */
  box-shadow: inset 10px 0 0 -6px oklch(95% 0.01 85 / 0.08);
}
.pso-hero-copy {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: clamp(32px, 6vw, 88px); align-items: end;
}
.pso-hero-copy > :not(.pso-spec) { grid-column: 1; }
.pso-hero-copy > .pso-spec { grid-column: 2; grid-row: 1 / span 4; align-self: center; }
.pso-kicker {
  margin: 0; font-family: var(--pso-cond); font-weight: 600; font-size: 15px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--pso-maple);
}
.pso-h1 {
  margin: var(--space-md) 0 0;
  font-family: var(--pso-serif); font-weight: 400;
  font-size: clamp(36px, 5.2vw, 66px); line-height: 1.02; letter-spacing: -0.01em;
  color: var(--pso-chalk); text-wrap: balance;
}
.pso-answer {
  margin: var(--space-lg) 0 0; max-width: 62ch;
  font-size: clamp(17px, 1.5vw, 19px); line-height: 1.65; color: var(--ink-soft);
}
.pso-answer strong { color: var(--ink); }
.pso-spec { display: grid; margin: 0; min-width: 210px; }
.pso-spec > div { padding: 18px 0; border-top: 1px solid oklch(100% 0 0 / 0.14); }
.pso-spec > div:first-child { border-top: 0; padding-top: 0; }
.pso-spec dt { font-size: 13px; color: var(--muted); }
.pso-spec dd { margin: 2px 0 0; font-family: var(--pso-cond); font-weight: 600; font-size: 32px; color: var(--pso-chalk); letter-spacing: 0.02em; }
.pso-byline { margin: var(--space-lg) 0 0; font-size: 14px; color: var(--muted); }

/* ---- the scoresheet ---------------------------------------------------- */
.pso-sheet-sec {
  padding: 0 clamp(16px, 4vw, 48px) clamp(28px, 4vw, 44px);
  border-radius: 0 0 28px 28px;
  background:
    linear-gradient(180deg, var(--pso-navy) 0 40%, oklch(36% 0.05 70) 40% 100%);
  border: 1px solid oklch(100% 0 0 / 0.06);
  border-top: 0;
}
.pso-sheet {
  position: relative;
  background: var(--pso-sheet); color: var(--pso-sheet-ink);
  border-radius: 6px;
  padding: clamp(16px, 2.4vw, 26px);
  box-shadow: 0 30px 60px -28px oklch(0% 0 0 / 0.8), 0 2px 0 oklch(100% 0 0 / 0.6) inset;
}
.pso-sheet-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px;
  padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 3px double var(--pso-rule);
}
.pso-sheet-title {
  margin: 0; font-family: var(--pso-cond); font-weight: 600; text-transform: uppercase;
  font-size: clamp(20px, 2.4vw, 26px); letter-spacing: 0.1em; color: var(--pso-sheet-ink);
}
.pso-sheet-title span { font-weight: 500; opacity: 0.6; margin-left: 8px; letter-spacing: 0.08em; }
.pso-sheet-meta { margin: 0; font-family: var(--pso-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.65; }
.pso-sheet-meta span { margin: 0 4px; }

.pso-frames {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(10, minmax(0, 1fr));
  border: 2px solid var(--pso-sheet-ink);
}
.pso-frame { border-left: 2px solid var(--pso-sheet-ink); min-width: 0; }
.pso-frame:first-child { border-left: 0; }
.pso-frame:last-child { background: oklch(80% 0.09 72 / 0.18); }
.pso-frame-btn {
  all: unset; box-sizing: border-box; cursor: pointer;
  display: grid; grid-template-rows: auto auto 1fr auto; width: 100%; height: 100%;
  min-height: 150px; position: relative;
  font-family: var(--text); color: var(--pso-sheet-ink);
  transition: background-color 0.2s;
}
.pso-frame-btn:hover { background: oklch(52% 0.12 262 / 0.07); }
.pso-frame-btn:focus-visible { outline: 3px solid var(--pso-pencil); outline-offset: -3px; }
.pso-frame-btn[aria-selected="true"] { background: oklch(80% 0.09 72 / 0.38); }
.pso-frame-btn[aria-selected="true"]::after {
  content: ""; position: absolute; left: 50%; bottom: -11px; width: 18px; height: 18px;
  background: var(--pso-sheet); border-right: 2px solid var(--pso-sheet-ink); border-bottom: 2px solid var(--pso-sheet-ink);
  transform: translateX(-50%) rotate(45deg); z-index: 1;
}
.pso-frame-n {
  display: block; text-align: center; padding: 4px 0;
  font-family: var(--pso-cond); font-weight: 600; font-size: 14px; letter-spacing: 0.1em;
  background: var(--pso-sheet-ink); color: var(--pso-sheet);
}
.pso-frame-btn[aria-selected="true"] .pso-frame-n { background: var(--pso-pencil); }
/* The small mark box in the frame's top right corner, like a real sheet. */
.pso-frame-box {
  justify-self: end; width: clamp(28px, 3.2vw, 40px); aspect-ratio: 1;
  display: grid; place-items: center;
  border-left: 1.5px solid var(--pso-sheet-ink); border-bottom: 1.5px solid var(--pso-sheet-ink);
}
.pso-frame-box b {
  font-family: var(--pso-cond); font-weight: 700; font-size: clamp(20px, 2.4vw, 30px); line-height: 1;
  color: var(--pso-pencil);
}
.is-gutter .pso-frame-box b { color: var(--pso-sheet-ink); }
.is-open .pso-frame-box { border-style: dashed; border-color: oklch(26% 0.03 262 / 0.35); }
.pso-frame-what {
  align-self: center; padding: 8px 8px 4px; text-align: center;
  font-family: var(--pso-cond); font-weight: 600; font-size: clamp(13px, 1.25vw, 16px); line-height: 1.1;
  text-transform: uppercase; letter-spacing: 0.03em; hyphens: manual; overflow-wrap: normal;
}
.is-open .pso-frame-what { opacity: 0.5; }
.pso-frame-when {
  display: block; text-align: center; padding: 6px 4px 8px;
  border-top: 1px solid var(--pso-rule);
  font-family: var(--pso-mono); font-size: 11px; letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.pso-readouts { margin-top: 22px; }
.pso-readout { display: none; max-width: 70ch; padding: 4px 2px 0; }
.pso-readout.is-on { display: block; }
.pso-readout-tag {
  margin: 0; font-family: var(--pso-cond); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.12em; font-size: 14px; color: var(--pso-pencil);
}
.pso-readout-tag span { opacity: 0.5; margin: 0 4px; }
.pso-readout-tag.is-open { color: oklch(26% 0.03 262 / 0.6); }
.pso-readout-tag.is-gutter { color: var(--pso-sheet-ink); }
.pso-readout h3 { margin: 6px 0 0; font-family: var(--pso-serif); font-weight: 400; font-size: clamp(24px, 2.8vw, 32px); line-height: 1.1; color: var(--pso-sheet-ink); }
.pso-readout p { margin: 10px 0 0; font-size: 17px; line-height: 1.6; color: oklch(30% 0.03 262); }
.pso-readout .pso-readout-src { font-size: 14px; color: oklch(40% 0.03 262); }
.pso-readout .pso-readout-src :where(a) { color: oklch(40% 0.14 262); border-bottom-color: oklch(40% 0.14 262 / 0.35); margin-left: 4px; }
.pso-readout .pso-readout-src span { margin-left: 4px; }
.pso-sheet-foot {
  display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 20px; padding-top: 12px;
  border-top: 1px dashed var(--pso-rule);
  font-family: var(--pso-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.75;
}
.pso-sheet-foot b { color: var(--pso-pencil); font-family: var(--pso-cond); font-size: 15px; margin-right: 3px; }
.pso-sheet-hint { margin: 14px 0 0; text-align: center; font-size: 14px; color: oklch(95% 0.01 85 / 0.75); }

/* ---- body -------------------------------------------------------------- */
.pso-body { max-width: 860px; margin: 0 auto; }
.pso-sec { margin-top: clamp(56px, 8vw, 96px); }
.pso-eyebrow {
  margin: 0; font-family: var(--pso-cond); font-weight: 600; font-size: 14px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--pso-maple);
}
.pso-sec h2 {
  margin: var(--space-sm) 0 0; font-family: var(--pso-serif); font-weight: 400;
  font-size: clamp(30px, 3.8vw, 44px); line-height: 1.05; color: var(--pso-chalk); text-wrap: balance;
}
.pso-sec p, .pso-foot { font-size: 17.5px; line-height: 1.7; color: var(--ink-soft); max-width: 68ch; }
.pso-note { font-size: 14px !important; color: var(--muted) !important; margin-top: var(--space-md); }

/* ---- license cards ----------------------------------------------------- */
.pso-licenses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 3vw, 28px); margin-top: var(--space-xl); }
.pso-lic { margin: 0; }
.pso-lic-card {
  position: relative; overflow: hidden;
  padding: 20px 20px 18px; border-radius: 8px;
  background: linear-gradient(180deg, oklch(97% 0.015 95), oklch(92% 0.02 95));
  color: var(--pso-sheet-ink);
  box-shadow: inset 0 0 0 2px oklch(45% 0.08 160 / 0.55), inset 0 0 0 6px oklch(97% 0.015 95), inset 0 0 0 7px oklch(45% 0.08 160 / 0.35), 0 18px 34px -18px oklch(0% 0 0 / 0.8);
}
.pso-lic-state { margin: 0 !important; font-family: var(--pso-cond) !important; font-weight: 600; font-size: 12px !important; letter-spacing: 0.2em; text-transform: uppercase; color: oklch(40% 0.08 160) !important; }
.pso-lic-state span { margin: 0 4px; }
.pso-lic-kind { margin: 4px 0 12px !important; font-family: var(--pso-serif) !important; font-size: 24px !important; line-height: 1.1 !important; color: var(--pso-sheet-ink) !important; }
.pso-lic dl { margin: 0; display: grid; gap: 6px; }
.pso-lic dl > div { display: grid; grid-template-columns: 9.5em 1fr; gap: 8px; border-bottom: 1px dotted oklch(26% 0.03 262 / 0.25); padding-bottom: 5px; }
.pso-lic dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.6; }
.pso-lic dd { margin: 0; font-family: var(--pso-mono); font-size: 13px; font-weight: 600; }
.pso-lic-date { margin: 12px 0 0 !important; font-family: var(--pso-mono); font-size: 12.5px !important; color: oklch(35% 0.03 262) !important; }
.pso-lic-stamp {
  position: absolute; right: 14px; bottom: 16px;
  padding: 4px 12px; border: 3px solid currentColor; border-radius: 6px;
  font-family: var(--pso-cond); font-weight: 700; font-size: 20px; letter-spacing: 0.16em; text-transform: uppercase;
  transform: rotate(-9deg); opacity: 0.85; mix-blend-mode: multiply;
}
.is-issued .pso-lic-stamp { color: var(--pso-green); }
.is-pending .pso-lic-stamp { color: var(--pso-pencil); }
.pso-lic figcaption { margin-top: var(--space-md); font-size: 15px; line-height: 1.6; color: var(--ink-soft); }

/* ---- links + faq ------------------------------------------------------- */
.pso-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: var(--space-xl); }
.pso .pso-link {
  display: grid; gap: 4px; padding: 16px 18px; border-radius: 14px; color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--hair);
  transition: transform 0.25s var(--pso-ease), border-color 0.25s;
}
.pso .pso-link:hover { transform: translateY(-2px); border-color: oklch(80% 0.09 72 / 0.55); }
.pso .pso-link:focus-visible { outline: 2px solid var(--pso-maple); outline-offset: 3px; }
.pso-link b { font-size: 16px; }
.pso-link span { font-size: 14px; color: var(--muted); }
.pso-faq h2 { margin-bottom: var(--space-lg); }
.pso-faq-item { border-top: 1px solid var(--hair); }
.pso-faq-item:last-of-type { border-bottom: 1px solid var(--hair); }
.pso-faq-item summary { cursor: pointer; padding: 18px 0; font-weight: 700; font-size: 17px; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.pso-faq-item summary::-webkit-details-marker { display: none; }
.pso-faq-item summary::after { content: "+"; color: var(--pso-maple); font-size: 22px; line-height: 1; }
.pso-faq-item[open] summary::after { content: "\2212"; }
.pso-faq-item p { margin: 0 0 18px; }
.pso-foot { margin: var(--space-2xl) auto 0; }

/* ---- motion: the marks get pencilled in once --------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .pso.is-ready .pso-frame-box b { animation: pso-mark 0.5s var(--pso-ease) both; animation-delay: calc(var(--i, 0) * 90ms); }
  .pso .pso-readout.is-on { animation: pso-in 0.35s var(--pso-ease) both; }
}
@keyframes pso-mark { from { opacity: 0; transform: scale(1.8) rotate(-12deg); } to { opacity: 1; transform: none; } }
@keyframes pso-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- responsive -------------------------------------------------------- */
@media (max-width: 860px) {
  .pso-hero-copy { display: block; }
  .pso-spec { display: flex; flex-wrap: wrap; margin-top: var(--space-xl); gap: var(--space-sm) 0; }
  .pso-spec > div { padding: 0 var(--space-lg); border-top: 0; border-left: 1px solid oklch(100% 0 0 / 0.14); }
  .pso-spec > div:first-child { padding-left: 0; border-left: 0; }
  .pso-spec dd { font-size: 24px; }
  .pso-frames { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .pso-frame:nth-child(6) { border-left: 0; }
  .pso-frame:nth-child(n + 6) { border-top: 2px solid var(--pso-sheet-ink); }
  .pso-frame-btn { min-height: 128px; }
  .pso-frame-btn[aria-selected="true"]::after { display: none; }
  .pso-licenses, .pso-links { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .pso { padding-inline: 0; }
  .pso-hero { border-radius: 0; padding: 28px 16px; }
  .pso-sheet-sec { border-radius: 0; padding-inline: 10px; }
  .pso-body { padding-inline: 16px; }
  .pso-sheet { padding: 14px 10px; }
  .pso-frame-what { font-size: 12px; padding: 6px 3px 3px; }
  .pso-frame-when { font-size: 9.5px; padding-inline: 2px; }
  .pso-spec > div { padding: 0 var(--space-md); }
  .pso-lic dl > div { grid-template-columns: 1fr; gap: 0; }
}
