/* ===================================================================
   apps.css - the inside of the windows: document surfaces, stat grids,
   Sound Recorder, Character Properties, the dossier, the terminal,
   Minesweeper, the gallery.
   =================================================================== */

/* ---------- generic document surface ---------- */
.app { height: 100%; background: var(--face); }
.pad { padding: 12px 14px 18px; }
.doc {
  height: 100%;
  background: #fff;
  border: 1px solid var(--field-brd);
  overflow: auto;
}
.doc .pad { padding: 14px 16px 20px; }

h1.a { font-size: 16px; margin: 0 0 4px; }
h2.a { font-size: 13px; margin: 18px 0 6px; border-bottom: 1px solid #d4d4d4; padding-bottom: 3px; }
p.a  { margin: 0 0 10px; line-height: 1.55; font-size: 12px; }
.small { font-size: 11px; }

/* Explorer-style banner */
.band {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: linear-gradient(90deg, #0a3f9e 0%, #2a6fd0 60%, #57a0e8 100%);
  color: #fff;
}
.band .b-art { width: 46px; height: 46px; flex: 0 0 46px; }
.band .b-art svg, .band .b-art img { width: 100%; height: 100%; object-fit: contain; }
.band .b-t { font-size: 14px; font-weight: bold; }
.band .b-s { font-size: 11px; color: #cfe0f5; margin-top: 2px; }
.band .b-p { margin-left: auto; text-align: right; }
.band .b-p .p { font-size: 17px; font-weight: bold; font-family: var(--mono); }
.band .b-p .c { font-size: 11px; }
.band .b-p .c.up   { color: #7dff9b; }
.band .b-p .c.down { color: #ff9b9b; }

/* stat grid */
.statgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 6px;
  margin: 4px 0 6px;
}
.stat {
  background: #fff;
  padding: 7px 9px;
  border: 1px solid #9a988c;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
}
.stat .k { font-size: 10.5px; color: #555; text-transform: uppercase; letter-spacing: .3px; }
.stat .v { font-size: 14px; font-weight: bold; font-family: var(--mono); margin-top: 2px; }
.stat .v.pending { color: #a06000; font-weight: normal; font-size: 12px; }

/* contract address box */
.ca-box {
  display: flex; align-items: center; gap: 8px;
  margin: 12px 0 4px;
  padding: 5px 6px;
  background: #fff;
  border: 1px solid var(--field-brd);
}
.ca-box .mono { flex: 1 1 auto; overflow: auto; white-space: nowrap; }
.ca-box .btn { min-width: 62px; min-height: 20px; padding: 2px 8px; font-size: 11px; }

/* row of link buttons */
.btn-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.lnk {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer; user-select: none;
  background: linear-gradient(180deg, #fff 0%, #f2f2ec 46%, #e3e3d5 54%, #d8d8c8 100%);
  border: 1px solid var(--btn-brd);
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.lnk:hover { border-color: #e5a900; background: linear-gradient(180deg, #fffefa 0%, #fdf3d4 46%, #fbe6a3 54%, #f7d982 100%); }
.lnk:active { background: linear-gradient(180deg, #cfcdbf, #eae8da); box-shadow: inset 1px 1px 3px rgba(0,0,0,.22); }
/* icons are injected as raw <svg>, so they need an explicit box or they
   render at their intrinsic size and blow the button up */
.lnk svg, .lnk img { width: 18px; height: 18px; flex: 0 0 18px; display: block; }
.titlebar .tbicon svg,
.titlebar .tbicon img { width: 16px; height: 16px; display: block; }

/* numbered steps */
.steps { counter-reset: s; margin: 8px 0; }
.step {
  display: flex; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dotted #c8c8c8;
  font-size: 12px; line-height: 1.5;
}
.step .n {
  counter-increment: s;
  flex: 0 0 22px; height: 22px;
  display: grid; place-items: center;
  background: #0a3f9e; color: #fff;
  font-weight: bold; font-size: 11px;
}
.step .n::before { content: counter(s); }

/* the pending / not-launched notice */
.notice {
  display: flex; gap: 10px; align-items: flex-start;
  background: #ffffe1;
  border: 1px solid #a0a000;
  padding: 9px 11px;
  font-size: 11.5px;
  line-height: 1.5;
  margin: 10px 0;
}
.notice .ni { font-size: 17px; line-height: 1; flex: 0 0 auto; }

/* ---------- Start Here: the one-screen pitch ---------- */
.pitch-hero { display: flex; gap: 14px; align-items: center; margin-bottom: 4px; }
.pitch-hero .ph-art { width: 96px; flex: 0 0 96px; }
.pitch-hero .ph-art svg, .pitch-hero .ph-art img { width: 100%; height: auto; display: block; }

.pitch-facts { margin: 14px 0 12px; }
.pf {
  display: flex; gap: 12px; align-items: baseline;
  padding: 6px 8px;
  font-size: 12px;
  border-bottom: 1px dotted #cfcfcf;
  background: #fff;
}
.pf-y { flex: 0 0 42px; font-family: var(--mono); font-weight: bold; color: #0a3f9e; }
.pf.hot { background: #fff4f4; }
.pf.hot .pf-y { color: #a00000; }

.pitch-thesis {
  background: #ffffe1;
  border: 1px solid #a0a000;
  padding: 11px 13px;
  font-size: 12.5px;
  line-height: 1.6;
}

/* ---------- timeline (the lore, and the strongest page) ---------- */
.tl { margin: 6px 0 0; }
.tl-row {
  display: flex; gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dotted #cfcfcf;
  font-size: 12px; line-height: 1.5;
}
.tl-row .y {
  flex: 0 0 48px;
  font-family: var(--mono);
  font-weight: bold;
  color: #0a3f9e;
}
.tl-row.hot { background: #fffbe6; }
.tl-row.hot .y { color: #a00000; }
.tl-row.now .y { color: #006000; }

/* ---------- Sound Recorder (the signature app) ---------- */
.rec { padding: 12px 14px; background: var(--face); height: 100%; display: flex; flex-direction: column; }
.rec-scope {
  height: 74px;
  background: #000;
  border: 1px solid var(--field-brd);
  display: grid; place-items: center;
  overflow: hidden;
  position: relative;
}
.rec-scope svg { width: 100%; height: 100%; display: block; }
.rec-meta {
  display: flex; justify-content: space-between;
  font-size: 11px; margin: 5px 2px 10px;
  font-family: var(--mono);
}
.rec-input { display: flex; gap: 6px; margin-bottom: 10px; }
.rec-input input { flex: 1 1 auto; }
.rec-tape {
  flex: 1 1 auto;
  min-height: 90px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--field-brd);
  padding: 6px 8px;
  font-size: 11.5px;
}
.rec-tape .rt {
  display: flex; gap: 8px;
  padding: 4px 0;
  border-bottom: 1px dotted #ddd;
}
.rec-tape .rt .t { color: #777; font-family: var(--mono); font-size: 10.5px; flex: 0 0 auto; }
.rec-tape .empty { color: #888; font-style: italic; padding: 8px 0; }
.rec-btns { display: flex; gap: 5px; margin-top: 10px; }
.rec-btns .btn { min-width: 0; flex: 1 1 0; padding: 3px 6px; font-size: 11px; }

/* ---------- Character Properties (Microsoft Agent control panel) ---------- */
.chars { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.char {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 9px;
  background: #fff;
  border: 1px solid #d0d0d0;
  font-size: 12px;
  cursor: default;
}
.char.sel { background: var(--sel); color: #fff; border-color: #0a3f9e; }
.char.gone { color: #909090; background: #f4f4f4; }
.char .ci { font-size: 22px; width: 28px; text-align: center; flex: 0 0 28px; line-height: 1; }
.char .ci svg, .char .ci img { width: 28px; height: 28px; }
.char .cn { font-weight: bold; }
.char .cs { font-size: 10.5px; color: #666; }
.char.sel .cs { color: #cbd6ef; }
.char.gone .cs { color: #999; }
.char .cst { margin-left: auto; font-size: 10.5px; font-family: var(--mono); }

/* ---------- the recovered-file dossier ---------- */
.dossier { background: #6a6a5a; padding: 16px; min-height: 100%; }
.sheet {
  background: #f4f1e4;
  box-shadow: 0 3px 12px rgba(0,0,0,.45);
  padding: 20px 22px 24px;
  position: relative;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.6;
  color: #201c14;
}
.sheet::before {
  content: "";
  position: absolute; inset: 6px;
  border: 1px solid #b6ae94;
  pointer-events: none;
}
.stamp {
  display: inline-block;
  border: 3px solid #a01818;
  color: #a01818;
  padding: 3px 10px;
  font-weight: bold;
  letter-spacing: 2px;
  transform: rotate(-4deg);
  margin-bottom: 12px;
  font-size: 13px;
}
.sheet h1 { font-size: 15px; margin: 0 0 2px; letter-spacing: 1px; }
.sheet .sub { color: #6b6252; margin-bottom: 14px; font-size: 11px; }
.sheet .rows { margin: 12px 0; }
.sheet .row {
  display: flex; gap: 10px;
  padding: 4px 0;
  border-bottom: 1px dotted #bfb69c;
}
.sheet .row .k { flex: 1 1 auto; }
.sheet .row .v { font-weight: bold; text-align: right; }
.redact {
  background: #201c14; color: #201c14;
  padding: 0 6px; user-select: none;
}
.sheet .note { margin: 12px 0 0; }

/* ---------- terminal / prompt ---------- */
.term {
  height: 100%;
  background: #000;
  color: #c0c0c0;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.45;
  padding: 8px 10px;
  overflow: auto;
  cursor: text;
}
.term .out { white-space: pre-wrap; word-break: break-word; }
.term .line { display: flex; align-items: center; margin-top: 2px; }
.term .prompt { color: #c0c0c0; white-space: pre; }
.term input {
  flex: 1 1 auto;
  background: transparent; border: 0; outline: none;
  color: #c0c0c0;
  font-family: var(--mono); font-size: 12.5px;
  padding: 0;
}
.term .ok  { color: #22e05a; }
.term .err { color: #ff5c5c; }
.term .amb { color: #ffc93c; }
.term .cy  { color: #4fd8e8; }

/* ---------- Close Program (98's Ctrl+Alt+Del) ---------- */
.closeprog { padding: 12px 14px; display: flex; flex-direction: column; height: 100%; }
.closeprog .cp-list {
  flex: 1 1 auto;
  min-height: 120px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--field-brd);
  margin-bottom: 10px;
}
.cp-row { padding: 3px 7px; font-size: 12px; cursor: default; }
.cp-row.sel { background: var(--sel); color: #fff; }
.cp-note { font-size: 11px; line-height: 1.5; margin-bottom: 10px; color: #333; }
.cp-btns { display: flex; gap: 6px; justify-content: center; }

/* ---------- holders ---------- */
.bar-cell { position: relative; min-width: 110px; }
.bar-cell .bar {
  position: absolute; left: 4px; top: 5px; bottom: 5px;
  background: linear-gradient(90deg, #000080, #1084d0);
}
.bar-cell span { position: relative; padding-left: 4px; font-family: var(--mono); font-size: 11px; }
.empty-state {
  padding: 26px 14px;
  text-align: center;
  color: #555;
  font-size: 12px;
  line-height: 1.6;
}
.empty-state .big { font-size: 30px; display: block; margin-bottom: 8px; }

/* ---------- gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
  padding: 10px;
  background: #fff;
  min-height: 100%;
}
.thumb { cursor: pointer; text-align: center; }
.thumb .sq {
  aspect-ratio: 1;
  display: grid; place-items: center;
  background: #eef2f2;
  border: 1px solid #c8c8c8;
  font-size: 34px;
}
.thumb .sq svg, .thumb .sq img { width: 62%; height: 62%; object-fit: contain; }
.thumb .cap { font-size: 10.5px; margin-top: 3px; word-break: break-word; }

/* ---------- Minesweeper ---------- */
.mine { padding: 8px; background: var(--face); display: inline-block; }
.mine-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 6px; margin-bottom: 6px;
  border: 1px solid var(--field-brd);
}
.lcd {
  background: #000; color: #f00;
  font-family: var(--mono); font-size: 17px; font-weight: bold;
  padding: 1px 4px; letter-spacing: 1px;
  border: 1px solid #808080;
}
.face-btn {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  font-size: 15px;
  background: var(--face);
  border-style: solid; border-width: 2px;
  border-color: #ffffff #7d7b70 #7d7b70 #ffffff;
  cursor: pointer;
}
.grid {
  display: grid;
  grid-template-columns: repeat(9, 20px);
  border: 1px solid var(--field-brd);
}
.cell {
  width: 20px; height: 20px;
  display: grid; place-items: center;
  font-size: 12px; font-weight: bold;
  font-family: var(--mono);
  background: var(--face);
  border-style: solid; border-width: 2px;
  border-color: #ffffff #9a988c #9a988c #ffffff;
  cursor: pointer; user-select: none;
}
.cell.open {
  border: 1px solid #a0a0a0;
  width: 20px; height: 20px;
  background: #bdbdbd;
  cursor: default;
}
.cell.n1 { color: #0000ff; } .cell.n2 { color: #008000; } .cell.n3 { color: #ff0000; }
.cell.n4 { color: #000080; } .cell.n5 { color: #800000; } .cell.n6 { color: #008080; }
.cell.n7 { color: #000000; } .cell.n8 { color: #808080; }
.cell.boom { background: #ff0000; }

/* ---------- CD Player / positions ---------- */
.cdp { background: var(--face); padding: 10px 12px; }
.cdp-screen {
  background: #001408; color: #35ff8a;
  font-family: var(--mono);
  padding: 8px 10px;
  border: 1px solid var(--field-brd);
  margin-bottom: 8px;
}
.cdp-screen .big { font-size: 19px; font-weight: bold; letter-spacing: 1px; }
.cdp-screen .sm { font-size: 11px; opacity: .8; margin-top: 2px; }
.cdp-track {
  display: flex; gap: 8px;
  padding: 4px 6px;
  font-size: 11.5px;
  border-bottom: 1px dotted #c0c0c0;
}
.cdp-track .no { font-family: var(--mono); color: #666; flex: 0 0 22px; }
.cdp-track .ti { flex: 1 1 auto; }
.cdp-track .dur { font-family: var(--mono); color: #444; }
.take {
  margin-top: 12px;
  background: #ffffe1;
  border: 1px solid #a0a000;
  padding: 9px 11px;
  font-size: 11.5px;
  line-height: 1.55;
}

/* ---------- Notepad ---------- */
.np {
  height: 100%;
  background: #fff;
  border: 1px solid var(--field-brd);
  overflow: auto;
}
.np pre {
  margin: 0;
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- Display Properties ---------- */
.disp { padding: 12px 14px; }
.monitor { width: 168px; margin: 0 auto 12px; }
.monitor .bezel {
  background: var(--face);
  padding: 9px 9px 16px;
  border-style: solid; border-width: 2px;
  border-color: #ffffff #7d7b70 #7d7b70 #ffffff;
  box-shadow: inset 1px 1px 0 #efeee4, inset -1px -1px 0 #9a988c;
}
.monitor .screen {
  height: 92px;
  border-style: solid; border-width: 2px;
  border-color: #7d7b70 #ffffff #ffffff #7d7b70;
}
.monitor .stand { width: 44px; height: 10px; margin: 0 auto; background: var(--face); border: 2px solid; border-color: #ffffff #7d7b70 #7d7b70 #ffffff; }
.monitor .base  { width: 78px; height: 6px; margin: 0 auto; background: var(--face); border: 2px solid; border-color: #ffffff #7d7b70 #7d7b70 #ffffff; }
.wp-list {
  background: #fff;
  border: 1px solid var(--field-brd);
  max-height: 132px; overflow: auto;
}
.wp-item {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 7px;
  font-size: 12px;
  cursor: default;
}
.wp-item .sw { width: 30px; height: 20px; border: 1px solid #808080; flex: 0 0 30px; }
.wp-item.sel { background: var(--sel); color: #fff; }

/* ---------- IE4-ish browser ---------- */
.ie-bar {
  display: flex; align-items: center; gap: 4px;
  padding: 3px 4px;
  background: var(--face);
  border-bottom: 1px solid #d5d1c1;
}
.ie-bar .btn { min-width: 26px; min-height: 20px; padding: 1px 6px; }
.ie-bar .addr {
  flex: 1 1 auto;
  display: flex; align-items: center; gap: 5px;
  background: #fff;
  padding: 2px 5px;
  font-size: 11.5px;
  border: 1px solid var(--field-brd);
  overflow: hidden; white-space: nowrap;
}
.post {
  display: flex; gap: 9px;
  border: 1px solid #d4d4d4;
  background: #fff;
  padding: 9px 10px;
  font-size: 12px;
  line-height: 1.5;
}
.post .pa { width: 34px; height: 34px; flex: 0 0 34px; }
.post .pa svg, .post .pa img { width: 100%; height: 100%; object-fit: contain; }
.post .ph { font-size: 11px; color: #666; margin-bottom: 3px; }
.post .ph b { color: #000; font-size: 12px; }

/* ---------- image viewer ---------- */
.imgview {
  height: 100%;
  background: #303030;
  display: grid; place-items: center;
  padding: 10px;
}
.imgview svg, .imgview img { max-width: 100%; max-height: 100%; }

/* The real XP icons ship at 48px. Deliberately no width/height here:
   this rule sits last in the cascade and would beat every container rule
   at equal specificity. Each host box sets the size instead. */
img.xpico { display: block; object-fit: contain; }

/* ---------- The Buyback counter ---------- */
.bb-hero {
  background: linear-gradient(180deg, #06210f 0%, #04170a 100%);
  border: 1px solid #0d4a24;
  border-radius: 3px;
  padding: 18px 16px 16px;
  text-align: center;
  margin-bottom: 14px;
}
.bb-label {
  color: #4f9e6c;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}
.bb-num {
  font-family: var(--mono);
  font-size: 34px;
  font-weight: bold;
  color: #35ff8a;
  line-height: 1.15;
  margin-top: 6px;
  text-shadow: 0 0 18px rgba(53,255,138,.35);
  word-break: break-all;
}
.bb-num span { font-size: 17px; color: #2fc46e; }
.bb-num.pending { color: #3d7a56; text-shadow: none; }
.bb-usd { color: #6fbf8f; font-size: 12px; margin-top: 4px; font-family: var(--mono); }

/* ---------- Start Here: the instant-comprehension layout ---------- */
h1.a.pitch-h {
  font-size: 21px;
  line-height: 1.28;
  margin: 0;
  letter-spacing: -.2px;
}
h1.a.pitch-h em { font-style: normal; color: #0a6b2c; }

.pitch-counter {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 14px 0 12px;
  padding: 9px 12px;
  background: linear-gradient(180deg, #06210f, #04170a);
  border: 1px solid #0d4a24;
  border-radius: 3px;
}
.pitch-counter .pc-k {
  color: #4f9e6c; font-size: 10px;
  text-transform: uppercase; letter-spacing: 1.1px;
}
.pitch-counter .pc-v {
  color: #35ff8a; font-family: var(--mono);
  font-size: 16px; font-weight: bold;
  text-shadow: 0 0 14px rgba(53,255,138,.3);
  white-space: nowrap;
}

.pitch-how { display: flex; flex-direction: column; gap: 1px; }
.ph-step {
  display: flex; gap: 10px; align-items: baseline;
  background: #fff;
  border: 1px solid #e2e0d4;
  padding: 8px 11px;
  font-size: 12.5px;
  line-height: 1.5;
}
.ph-step > b:first-child {
  flex: 0 0 19px; height: 19px;
  display: inline-grid; place-items: center;
  background: var(--frame); color: #fff;
  border-radius: 50%;
  font-size: 11px;
  align-self: flex-start;
}

/* the step body is one flex child: without this every <b> inside the
   sentence becomes its own column and the line breaks into pieces */
.ph-step > span { flex: 1 1 auto; min-width: 0; }

/* ---------- CD Player ---------- */
.cdp-bars {
  display: flex; align-items: flex-end; gap: 2px;
  height: 26px; margin-top: 8px;
}
.cdp-bars i {
  flex: 1 1 0; height: 4%;
  background: linear-gradient(180deg, #7dffb8, #16a355);
  transition: height .09s linear;
  border-radius: 1px;
}
.cdp-track { cursor: pointer; }
.cdp-track:hover { background: #eef4fb; }
.cdp-track.on { background: #d3e5fa; font-weight: bold; }
.cdp-track.on .no { color: #0a6b2c; }
.cdp-track .pd {
  color: #7a8794; font-weight: normal; font-size: 10px;
  font-style: italic; white-space: nowrap;
}
