/* Operating Systems: the live page (os.html), on top of the ARTIFACTS site's styles. The page is built from the work's
   own windows (.win: title bar, body, status bar) and walks an OS through its life, one step per section. The first
   part is the concept preview's (operating-systems/preview/os.css); the second, the live page's own. */

/* hero: the idea, and the lifecycle as a window */
.os-hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: start; padding: 6px 0 4px; }
.os-small { font-size: 12.5px; color: var(--mut); }
.os-life { margin-top: 28px; display: block; color: var(--ink); font-size: 13px; letter-spacing: normal; } /* a nav: undo the site's nav row */
.os-life ol { list-style: none; margin: 0; padding: 6px 0; }
.os-life a { display: grid; grid-template-columns: 34px 1fr; gap: 0 8px; padding: 7px 12px; text-decoration: none; border-left: 3px solid transparent; }
.os-life a:hover, .os-life a:focus-visible { background: #f4f2ec; }
.os-life a[aria-current="step"] { border-left-color: var(--ink); background: #f4f2ec; }
.os-life .n { grid-row: span 2; color: var(--mut); font-size: 11px; padding-top: 2px; }
.os-life a[aria-current="step"] .n { color: var(--ink); font-weight: 700; }
.os-life .t { font-weight: 700; font-size: 13px; }
.os-life .dsc { color: var(--mut); font-size: 11.5px; }
/* system messages: a small window in the corner, gone a few seconds after the work is done */
.os-msg { position: fixed; left: 16px; bottom: 16px; z-index: 50; margin: 0; max-width: min(520px, calc(100% - 32px)); min-height: 0;
  background: var(--win); border: 1.5px solid var(--ink); padding: 9px 14px; font-size: 12px; box-shadow: 6px 6px 0 rgba(22, 22, 15, .1); }
.os-msg:empty { display: none; }

/* steps */
.os-step { padding: 34px 0 6px; scroll-margin-top: 80px; }
.os-next { display: inline-block; margin-top: 20px; font-size: 12px; letter-spacing: .06em; color: var(--mut); text-decoration: none; border-bottom: 1px dashed var(--faint); }
.os-next:hover { color: var(--ink); border-bottom-color: var(--ink); }
.os-hint { font-size: 11.5px; line-height: 1.7; color: var(--mut); margin: 4px 0 0; max-width: 62ch; }
.os-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--mut); }

/* 01 · your OS */
.os-setup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 34px; align-items: start; }
.os-form { display: grid; gap: 22px; }
.os-field { display: grid; gap: 8px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--mut); }
.os-field > span b { color: var(--ink); letter-spacing: .06em; margin-left: 6px; }
.os-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.os-name { width: 22ch; max-width: 100%; text-transform: uppercase; letter-spacing: .06em; }
.os-list { width: 32ch; max-width: 100%; }
.os-presets .btn.sm { padding: 5px 12px; min-height: 32px; }
.os-presets .btn.sm[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.os-field .os-hint { text-transform: none; letter-spacing: 0; }
.os-pieces { list-style: none; margin: 0; padding: 4px 0; }
.os-pieces li { display: grid; grid-template-columns: 42px auto 1fr; gap: 2px 12px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 12px; }
.os-pieces li:last-child { border-bottom: 0; }
.os-pieces .sw { width: 42px; height: 10px; border: 1px solid var(--line); grid-row: span 2; align-self: center; }
.os-pieces .pid { font-weight: 700; }
.os-pieces .ptraits { color: #44423a; letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.os-pieces .pstate { grid-column: 2 / -1; color: var(--mut); font-size: 11.5px; }
.os-pieces .tag { display: inline-block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--faint); padding: 0 6px; margin-right: 6px; color: var(--mut); }
.os-pieces .tag.ok { border-color: var(--ok); color: var(--ok); }
.os-pieces-win .sb { white-space: normal; }

/* stages: the art, large */
.os-stage-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px 18px; flex-wrap: wrap; margin: 0 0 14px; }
.os-stage { margin: 0; display: grid; gap: 10px; justify-items: center; }
.os-frame { position: relative; width: min(780px, 100%); aspect-ratio: 1; background: #fff; border: 1px solid var(--line); box-shadow: 8px 8px 0 rgba(22, 22, 15, .06); }
.os-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.os-frame img:not([src]) { visibility: hidden; }
.os-stage figcaption { width: min(780px, 100%); font-size: 12px; line-height: 1.7; color: var(--mut); }
.os-stage figcaption b { color: var(--ink); }
.os-stage.busy .os-frame::after { content: "Drawing…"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .72); font-size: 12px; letter-spacing: .14em; color: var(--mut); }
/* minted: the desktop fades behind a system window, in the house's window style */
.os-gone { position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(340px, calc(100% - 32px)); box-shadow: 8px 8px 0 rgba(22, 22, 15, .14); }
.os-gone[hidden] { display: none; }
.os-gone p { margin: 0; padding: 14px 14px 16px; font-size: 12px; line-height: 1.7; color: var(--mut); }
.os-gone p b { display: block; color: var(--ink); font-weight: 700; margin-bottom: 4px; }
.os-gone .sb a { color: var(--ink); text-decoration: none; }
.os-gone .sb a:hover, .os-gone .sb a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.os-stage[data-dissolved] .os-frame img { opacity: .35; filter: grayscale(.6); }

/* a two-way switch */
.seg { display: inline-flex; border: 1px solid var(--ink); border-radius: 999px; overflow: hidden; }
.seg button { background: transparent; border: 0; padding: 8px 15px; font-size: 12px; letter-spacing: .04em; color: var(--ink); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* 03 · choose */
.os-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0 0 24px; }
.os-choice { display: grid; gap: 6px; align-content: start; text-align: left; padding: 10px 10px 14px; background: var(--win); border: 1.5px solid var(--line); cursor: pointer; color: var(--ink); font-size: 12px; }
.os-choice:hover { border-color: var(--faint); }
.os-choice[aria-checked="true"] { border-color: var(--ink); box-shadow: 6px 6px 0 rgba(22, 22, 15, .1); }
.os-choice .os-thumb { display: block; aspect-ratio: 1; background: #fff; border: 1px solid var(--line); overflow: hidden; }
.os-choice img { display: block; width: 100%; height: 100%; object-fit: contain; }
.os-choice img:not([src]) { visibility: hidden; }
.os-choice .t { font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; margin-top: 4px; }
.os-choice .t::before { content: "○ "; color: var(--mut); }
.os-choice[aria-checked="true"] .t::before { content: "● "; color: var(--ink); }
.os-choice .dsc { color: var(--mut); line-height: 1.6; }
.os-roll { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.os-roll code { font-size: 13px; letter-spacing: .04em; }

/* 04 · mint */
.os-mint { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 34px; align-items: start; }
.os-facts { margin: 0; padding: 12px 14px 4px; display: grid; gap: 8px; }
.os-facts div { display: grid; grid-template-columns: 120px 1fr; gap: 10px; font-size: 12.5px; }
.os-facts dt { color: var(--mut); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding-top: 2px; }
.os-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.os-after-h { margin: 8px 14px 4px; font-size: 12px; color: var(--mut); }
.os-after { margin: 0 14px 14px; padding-left: 18px; font-size: 12.5px; line-height: 1.75; }
.os-mint-actions { white-space: normal; justify-content: flex-start; gap: 14px; flex-wrap: wrap; }
.os-mint-card[data-minted] .tb { background: var(--ink); color: var(--paper); }
.os-mint-card[data-minted] .tb .mu { color: var(--faint); }
.os-stage-half .os-frame, .os-stage-half figcaption { width: 100%; }

/* 05 · epochs */
.os-epochs { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1 1 420px; }
.os-epochs input[type="range"] { flex: 1 1 200px; max-width: 360px; accent-color: var(--ink); }
.os-epochs [data-play][aria-pressed="true"] { background: var(--paper); color: var(--ink); }

/* 06 · reveal */
.os-reveal { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; margin-bottom: 22px; }
.os-warn p { margin: 0; padding: 12px 14px 14px; font-size: 12.5px; line-height: 1.8; }

@media (max-width: 900px) {
  .os-hero, .os-setup, .os-mint { grid-template-columns: 1fr; }
  .os-life { margin-top: 0; }
  .os-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .os-choice .dsc { display: none; }
}
@media (max-width: 640px) {
  .os-reveal { grid-template-columns: 1fr; }
  .os-choice { padding: 6px 6px 10px; }
  .os-choice .t { font-size: 11px; }
  .os-facts div { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- the live page ---------- */
/* a step's heading: the site's section rule, with its ⓘ */
.os-step h2.shead { font-weight: 400; line-height: 1.5; align-items: center; }
.os-step h2.shead .t-i { margin-left: 8px; }
.t-band { max-width: none; margin: 0; background: #16160f; color: #f4f2ec; font-size: 12px; letter-spacing: .12em; text-align: center; padding: 8px 16px; }
.t-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.t-facts { margin: 0; padding: 12px 14px 6px; display: grid; gap: 7px; }
.t-facts div { display: grid; grid-template-columns: 150px 1fr; gap: 10px; font-size: 12.5px; }
.t-facts dt { color: var(--mut); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding-top: 2px; }
.t-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.t-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 4px 14px 14px; }
.t-list { list-style: none; margin: 0; padding: 4px 0; }
.t-list li { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 12px; }
.t-list li:last-child { border-bottom: 0; }
.t-list .sw { width: 42px; height: 10px; border: 1px solid var(--line); }
.t-list .st { color: var(--mut); font-size: 11.5px; grid-column: 2 / 3; }
.t-list .btns { grid-row: span 2; display: flex; gap: 6px; }
.t-empty { padding: 14px; font-size: 12px; color: var(--mut); margin: 0; }
.t-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 14px; }
.t-form input { min-width: 0; }
.t-form .os-label { min-width: 92px; }
.os-draws { margin-top: 22px; }
.os-draws [data-draw-msg]:empty { display: none; }
.t-pad { padding: 0 14px 12px; margin: 0; }
/* 02 · Your OSes: which one the page shows */
.os-pick { flex: 1 1 220px; min-width: 0; max-width: 100%; cursor: pointer; }
/* the house dialog with a line to fill in (an eject's other address) */
.ask-field { display: block; width: 100%; margin: 0 0 16px; }
.os-stage[data-empty] .os-frame::before { content: attr(data-empty); position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(80%, 460px); text-align: center; color: var(--mut); font-size: 12px; letter-spacing: .14em; line-height: 1.9; }
.os-stage[data-empty] .os-frame { aspect-ratio: auto; height: 200px; }
.os-stage[data-empty] .os-frame img { display: none; }
/* the order to use it in: a tab at the bottom left that opens upward; status messages move to the right */
body { padding-bottom: 84px; }
.os-msg { left: auto; right: 16px; }
.t-guide { position: fixed; left: 16px; bottom: 16px; z-index: 55; width: min(400px, calc(100vw - 32px)); display: flex; flex-direction: column; font-size: 12px; }
.t-guide[data-open="false"] .t-guide-panel { display: none; }
.t-guide-panel { position: relative; border-bottom: 0; max-height: min(600px, calc(100vh - 150px)); overflow: auto; }
.t-guide-panel .tb { position: sticky; top: 0; background: var(--win); z-index: 1; }
.t-guide-panel ol { list-style: none; margin: 0; padding: 2px 0 8px; }
.t-guide-panel .g { padding: 12px 14px 5px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--mut); }
.t-guide-panel li a { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 7px 14px 7px 11px; border-left: 3px solid transparent; color: inherit; text-decoration: none; }
.t-guide-panel li a:hover { background: rgba(22, 22, 15, .04); }
.t-guide-panel .k { color: var(--mut); font-size: 11px; }
.t-guide-panel .tx b { font-weight: 400; }
.t-guide-panel .h { display: block; color: var(--mut); font-size: 11.5px; line-height: 1.55; margin-top: 3px; }
.t-guide-panel .s { font-size: 10px; letter-spacing: .12em; color: var(--mut); white-space: nowrap; }
.t-guide-panel .is-now a { background: rgba(22, 22, 15, .06); border-left-color: var(--ink); }
.t-guide-panel .is-now .k, .t-guide-panel .is-now .tx b { color: var(--ink); font-weight: 700; }
.t-guide-panel .is-done .k { color: var(--ink); }
.t-guide-panel .is-done .tx b { color: var(--mut); }
.t-guide-panel .is-wait .s { color: var(--ink); }
.t-guide-panel .is-na { opacity: .45; }
.t-guide-tab { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; min-height: 44px; padding: 10px 14px 12px; border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper); font: inherit; font-size: 12px; text-align: left; cursor: pointer; box-shadow: 8px 8px 0 rgba(22, 22, 15, .12); }
.t-guide-tab .lb { font-size: 10.5px; letter-spacing: .16em; color: var(--faint); }
.t-guide-tab b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-guide-tab .car { transition: transform .15s; }
.t-guide[data-open="true"] .t-guide-tab .car { transform: rotate(180deg); }
.t-guide-tab .bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--paper); opacity: .6; transition: width .3s; }
/* the next step's control, when the page takes you there */
@keyframes t-here { 0% { box-shadow: 0 0 0 0 rgba(22, 22, 15, .5); } 100% { box-shadow: 0 0 0 14px rgba(22, 22, 15, 0); } }
.t-here { animation: t-here 1.1s ease-out 3; }
@media (prefers-reduced-motion: reduce) { .t-here { animation: none; outline: 2px solid var(--ink); outline-offset: 4px; } }
.t-guide-tab:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
/* a drawn picture sets its frame's shape: no white bands above and below a single window */
.os-frame:has(img[src]) { aspect-ratio: auto; }
.os-frame img { height: auto; }
/* stepping through epochs: one small control, each end greyed out */
.t-steps button { min-width: 46px; padding: 7px 0; }
.seg button:disabled { opacity: .28; cursor: default; }
.t-list .btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.os-epochs .os-small b { color: var(--ink); font-weight: 400; }
.t-grid + .os-stage-bar { margin-top: 22px; }
[hidden] { display: none !important; }
@media (max-width: 900px) { .t-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .t-facts div { grid-template-columns: 1fr; gap: 2px; }
  .os-msg { left: 16px; right: 16px; bottom: 76px; max-width: none; }
  /* a list row's buttons go under its text; a status bar wraps instead of cutting off */
  .t-list li { grid-template-columns: 42px minmax(0, 1fr); }
  .t-list .btns { order: 1; grid-row: auto; grid-column: 2; flex-wrap: wrap; margin-top: 4px; }
  .win .sb { flex-wrap: wrap; white-space: normal; gap: 2px 8px; }
}
  
