/* frame.css — the framed demo page (/d/<slug>): the live demo next to a 328 px panel that says who
   built it, for which brief, what it does, one client review and the next step. The tokens and
   .brand .btn .tick .said come from tokens.css, which frame.html links first. At 760 px and below
   the panel gives way to one bar, one 44 px row and an "About this demo" sheet. */
html,body{height:100%;}
body{display:flex;overflow:hidden;font-size:15px;line-height:1.5;}

/* ---------- the panel ---------- */
.rail{flex:none;width:328px;height:100%;display:flex;flex-direction:column;background:var(--paper);border-inline-end:1px solid var(--rule);}
.rail-body{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:20px;padding:20px 22px;}
.rail .brand{align-self:flex-start;}
.by{font-size:15px;}
.by .role{display:block;color:var(--muted);font-size:14px;}
.ticks{list-style:none;display:grid;gap:5px;font-size:14px;}
.ticks li{display:flex;align-items:center;gap:8px;}
.ba{display:grid;gap:14px;padding:16px 0;border-top:1px solid var(--rule);border-bottom:1px solid var(--rule);}
.ba dt{font-size:13px;font-weight:600;color:var(--muted);}
.ba dd{margin-top:2px;}
.ba dd b{font-weight:600;}
.quote blockquote{font-size:16px;line-height:1.4;}
.quote figcaption{margin-top:6px;font-size:13px;color:var(--muted);}
.more{display:grid;gap:5px;font-size:14px;}
.more p{font-size:13px;font-weight:600;color:var(--muted);}
.more a{text-underline-offset:3px;text-decoration-color:var(--rule);}
.more a:hover{text-decoration-color:var(--ink);}

/* ---------- the pinned foot: the action for this arrival, then the tools ---------- */
.rail-foot{flex:none;display:grid;gap:10px;padding:16px 22px 14px;border-top:1px solid var(--rule);}
.rail-foot .from-upwork,.rail-foot .from-other{display:grid;gap:9px;}
.next p{font-size:14px;color:var(--muted);}
.next p a{color:var(--ink);text-underline-offset:3px;}
.next .act{font-size:16px;font-weight:600;line-height:1.35;color:var(--ink);}   /* the Upwork action: a line to act on, not a link */
.tools{display:flex;flex-wrap:wrap;gap:2px 16px;align-items:center;font-size:13px;color:var(--muted);}
.tools a{text-underline-offset:3px;}
.tools button,.show{font:inherit;color:var(--muted);background:none;border:0;cursor:pointer;text-decoration:underline;text-underline-offset:3px;min-height:32px;}
html:not([data-from]) .hide{display:none;}   /* Hide panel needs the head script, which also sets data-from */

/* the language menu is langMenu() in lib/i18n.mjs (<details class="lang">), drawn in the .langm look
   and opening upward from the foot */
.lang{position:relative;}
.lang summary{list-style:none;cursor:pointer;display:inline-flex;align-items:center;min-height:32px;}
.lang summary::-webkit-details-marker{display:none;}
.lang summary::after{content:"";display:inline-block;width:6px;height:6px;margin-inline-start:8px;border-inline-end:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:translateY(-2px) rotate(45deg);}
.lang ul{position:absolute;bottom:100%;inset-inline-start:0;z-index:30;margin:0 0 6px;list-style:none;display:grid;gap:2px;min-width:150px;padding:6px;background:var(--surface);border:1px solid var(--ink);border-radius:8px;font-size:14.5px;}
.lang li a{display:block;padding:6px 10px;color:var(--ink);text-decoration:none;border-radius:4px;}
.lang li a:hover{background:var(--paper);}

/* ---------- the demo ---------- */
.stage{flex:1;min-width:0;position:relative;background:#000;}
.stage iframe{display:block;width:100%;height:100%;border:0;background:#fff;}
.show{display:none;position:absolute;inset-inline-start:0;top:16px;z-index:5;background:var(--ink);color:#fff;text-decoration:none;font-size:13px;padding:8px 10px;border-start-end-radius:6px;border-end-end-radius:6px;}
body.closed .rail{display:none;}
body.closed .show{display:block;}

/* ---------- 760 px and below: one bar, one 44 px row, the sheet ---------- */
.prow{display:none;}
/* above 760 px the bar is not drawn, but its h1 (the page's one heading) stays in the
   accessibility tree: the bar is clipped to nothing, and only its other children leave */
@media (min-width:761px){
  .pbar{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
  .pbar > :not(h1){display:none;}
}
@media (max-width:760px){
  body{flex-direction:column;}
  .rail{display:none;}
  .show{display:none !important;}
  .pbar{flex:none;display:flex;align-items:center;gap:12px;min-height:56px;padding:6px 12px;background:var(--paper);border-bottom:1px solid var(--rule);}
  .pbar .brand{font-size:0;gap:0;min-width:44px;min-height:44px;margin-inline-start:-12px;justify-content:center;}
  .pbar h1{flex:1;min-width:0;font:600 15px/1.2 var(--sans);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .pbar .btn{min-height:44px;}
  .pbar .act{flex:none;font-size:13px;font-weight:600;line-height:1.3;white-space:nowrap;}   /* frame.upwork_short: one line, plain text */
  .prow{flex:none;display:block;background:var(--paper);border-bottom:1px solid var(--rule);font-size:13px;}
  .prow summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;padding:0 12px;cursor:pointer;color:var(--muted);}
  .prow summary::-webkit-details-marker{display:none;}
  .prow summary > span{display:inline-flex;align-items:center;gap:6px;}
  .prow summary u{text-underline-offset:3px;color:var(--ink);white-space:nowrap;}
  /* the open or closed cue: the language menu's chevron, turned up while the sheet is open
     (6 px margin, and an 8 px gap above, keep the row on one line at 390 px) */
  .prow summary u::after{content:"";display:inline-block;width:6px;height:6px;margin-inline-start:6px;border-inline-end:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:translateY(-2px) rotate(45deg);}
  .prow[open] summary u::after{transform:translateY(1px) rotate(225deg);}
  .prow .sheet{display:grid;gap:14px;padding:12px 12px 16px;font-size:14.5px;border-top:1px solid var(--rule-2);max-height:60vh;overflow-y:auto;}
  .prow .sheet .ba{padding:12px 0;}
  /* the sheet's foot: Open full screen and the language menu; the list opens in place, in two
     columns, so the sheet scrolls to it instead of clipping a pop-up */
  .prow .sheet-foot{padding-top:10px;border-top:1px solid var(--rule-2);}
  .prow .lang[open]{flex-basis:100%;}
  .prow .lang ul{position:static;margin:6px 0 0;grid-template-columns:1fr 1fr;}
}

/* ---------- 900 px and below: every control is a 44 px target ---------- */
@media (max-width:900px){
  .rail .brand,.more a,.tools a,.tools button,.lang summary,.next p a{display:inline-flex;align-items:center;min-height:44px;}
  .tools a,.next p a{gap:.3em;}   /* a flex link drops the space before its ↗ */
  .lang li a{display:flex;align-items:center;min-height:44px;}
  .more{gap:0;}
  .show{min-height:44px;}
}

/* ---------- the action follows the arrival (the head script in frame.html sets data-from) ---------- */
html:not([data-from="upwork"]) .from-upwork,html[data-from="upwork"] .from-other{display:none;}
