/* DevPad. The whole site is one records office: a wall of teal filing cabinets with a desk on top.
   Built to Vadim's own art (art/ref/avatar.jpg, art/ref/header.jpg): his pixel register, his
   palette, his folder with the padlock. Every surface on this page is a generated object from
   art/site/, nine-sliced; nothing here is a bordered CSS rectangle.
   The dossier grammar (the status lines, the dot leaders, the label/value rows) comes from his
   first reference, art/ref/reference.jpg, rebuilt in this world's materials. */

@font-face { font-family: "Galmuri"; src: url("/fonts/Galmuri11.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Galmuri"; src: url("/fonts/Galmuri11-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "GalmuriC"; src: url("/fonts/Galmuri11-Condensed.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  /* measured out of his two pictures */
  --wall: #8fcdc6;
  --wall-dk: #6fb6ae;
  --wall-lit: #e6ecd8;
  --cab: #2f8880;
  --cab-lt: #3f9c92;
  --cab-dk: #1d5e59;
  --ink: #0a3b38;
  --ink-soft: #35736d;
  --paper: #efe6cf;
  --paper-2: #e3dcc4;
  --manila: #f8c078;
  --manila-dk: #e09858;
  --outline: #141414;
  --red: #c4503c;
  --green: #2f7d4a;

  --ui: "Galmuri", ui-monospace, Menlo, monospace;
  --cond: "GalmuriC", "Galmuri", monospace;

  /* an 11 px bitmap grid: only 22 / 33 / 44 / 66 are crisp */
  --t-body: 22px;
  --t-head: 33px;
  --t-big: 44px;
  --t-mark: 66px;

  --pad: clamp(16px, 3.6vw, 72px);
  --maxw: 1760px;
  --gap: 24px;

  --card-slice: 34px;
  --drawer-slice: 30px;
  --sign-slice: 26px;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; background: var(--wall); }
html, body { margin: 0; padding: 0; }
body {
  color: var(--ink);
  font-family: var(--ui);
  font-size: var(--t-body);
  line-height: 1.55;
  font-synthesis: none;
  -webkit-font-smoothing: none;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}
img { image-rendering: pixelated; }

/* ---------------------------------------------------------------- the room behind everything */
.room { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: var(--wall); }
.room__wall {
  position: absolute; inset: -6%;
  background: url("/img/office-wall.webp") center top / cover no-repeat;
  filter: blur(3px) saturate(1.05);
  transform: scale(1.06);
  animation: roomdrift 72s ease-in-out infinite alternate;
}
@keyframes roomdrift {
  from { transform: scale(1.06) translate3d(-1.1%, -0.6%, 0); }
  to   { transform: scale(1.1) translate3d(1.1%, 0.8%, 0); }
}
.room__light {
  position: absolute; inset: -20% -30%;
  background: linear-gradient(104deg, transparent 0 38%, rgba(246, 250, 232, 0.45) 44%, rgba(246, 250, 232, 0.12) 52%, transparent 58% 100%);
  animation: lightdrift 46s ease-in-out infinite alternate;
}
@keyframes lightdrift {
  from { transform: translate3d(-3%, 0, 0); opacity: 0.7; }
  to   { transform: translate3d(3%, 0, 0); opacity: 1; }
}

/* ---------------------------------------------------------------- the office */
.office { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; padding: 24px var(--pad) 80px; }

.desk { display: grid; grid-template-columns: minmax(0, 24fr) minmax(0, 32fr) minmax(0, 44fr); gap: 1.6vw; align-items: end; margin-bottom: 14px; }
.desk__col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

/* ---------------------------------------------------------------- the enamel sign (the wordmark) */
.sign {
  border: var(--sign-slice) solid transparent;
  border-image: url("/img/sign.png") 30 fill / var(--sign-slice) / 0 stretch;
  padding: 6px 14px 12px;
  min-width: 0;
}
.sign__row { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; min-width: 0; }
.sign__name { font-size: var(--t-mark); font-weight: 700; line-height: 1.05; margin: 0; color: var(--ink); }
.sign__tick { font-family: var(--cond); font-size: var(--t-head); color: var(--ink-soft); }
.premise { font-size: var(--t-head); line-height: 1.3; margin: 6px 0 0; color: var(--ink); }
.premise b { font-weight: 700; }

/* ---------------------------------------------------------------- the index card: every text block */
.card {
  border: var(--card-slice) solid transparent;
  border-image: url("/img/card.png") 38 fill / var(--card-slice) / 0 stretch;
  padding: 12px 24px 16px;
  min-width: 0;
}
.card__head {
  font-weight: 700; font-size: var(--t-body); color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: 0.05em;
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; min-width: 0;
  padding-bottom: 8px; overflow-wrap: anywhere;
}
.card__head > * { min-width: 0; }
.card__head b { color: var(--ink); }
.card__head .r { margin-left: auto; font-weight: 400; }

/* ---------------------------------------------------------------- rows, his first reference's grammar */
.rows { display: flex; flex-direction: column; min-width: 0; }
.row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-height: 34px; min-width: 0; font-size: var(--t-body); }
.row > .k { color: var(--ink-soft); white-space: nowrap; flex: 0 0 auto; min-width: 0; }
.row > .lead { flex: 1 1 0; overflow: hidden; white-space: nowrap; color: var(--ink-soft); opacity: 0.5; min-width: 14px; }
.row > .lead::before { content: "........................................................................................................"; }
.row > .v { color: var(--ink); font-weight: 700; white-space: nowrap; flex: 0 0 auto; min-width: 0; }
.row > .v.is-dim { color: var(--ink-soft); font-weight: 400; }
.row--wrap > .k { white-space: normal; flex: 1 1 55%; min-width: 0; }
.row--wrap > .v { white-space: normal; overflow-wrap: anywhere; flex: 0 1 auto; text-align: right; }
.row--wrap > .lead { flex: 0 1 auto; min-width: 8px; }
/* a verdict is one entry, not three floating lines: the name, the verdict under it, a dotted rule
   under the pair. The leader is the rule here, so it is not drawn twice. */
.row--feed { position: relative; row-gap: 0; min-height: 0; padding-bottom: 9px; }
/* the rule between entries is drawn, not a border: a border would make every row its own box and
   then every name would owe it 1 em of inner padding. */
.row--feed::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: repeating-linear-gradient(to right, rgba(53, 115, 109, 0.5) 0 5px, rgba(53, 115, 109, 0) 5px 11px);
}
.rows > .row--feed + .row--feed { margin-top: 9px; }
.rows > .row--feed:last-child { padding-bottom: 0; }
.rows > .row--feed:last-child::after { display: none; }
.row--feed > .k { flex: 1 1 100%; }
.row--feed > .lead { display: none; }
.row--feed > .v { flex: 1 1 100%; text-align: right; white-space: normal; }
.row--gt > .k::before { content: "> "; opacity: 0.5; }
.row--dash > .k::before { content: "- "; opacity: 0.5; }

.note { font-size: var(--t-body); line-height: 1.5; margin: 0; }
.legend { font-size: var(--t-body); color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; }
.empty { font-size: var(--t-body); color: var(--ink-soft); line-height: 1.5; margin: 0; }

/* ---------------------------------------------------------------- the clipboard on the wall */
.board-clip {
  border-style: solid; border-width: 118px 24px 30px;
  border-image: url("/img/clipboard.png") 128 28 36 28 fill / 118px 24px 30px / 0 stretch;
  padding: 4px 26px 10px; min-width: 0;
}

/* ---------------------------------------------------------------- the desk and its things */
.deskline { display: flex; align-items: flex-end; gap: 0.9vw; min-width: 0; }
.desktop-line { display: flex; align-items: flex-end; justify-content: flex-start; margin: 2px 0 -4px; min-width: 0; }
.desktop-line img { display: block; width: 100%; max-width: 420px; height: auto; }

.mascot { position: relative; flex: 0 0 auto; width: clamp(104px, 11vw, 210px); aspect-ratio: 1; align-self: flex-end; }
.mascot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.mascot img:nth-child(2) { opacity: 0; animation: blink 6.4s steps(1, end) infinite; }
@keyframes blink { 0%, 95% { opacity: 0; } 96%, 98% { opacity: 1; } 99%, 100% { opacity: 0; } }

/* the CRT: the one OS window on this page, and the only place a mark appears */
.crt { position: relative; flex: 1 1 auto; min-width: 0; max-width: 520px; }
.crt > img { display: block; width: 100%; height: auto; }
.crt__screen {
  position: absolute; left: 8.4%; top: 7.4%; width: 83%; height: 60%;
  display: flex; flex-direction: column; gap: 8px; padding: 14px 16px;
  color: var(--paper); font-size: var(--t-body); min-width: 0; overflow: hidden;
}
.crt__ttl { font-weight: 700; color: #a8e6c0; letter-spacing: 0.05em; text-transform: uppercase; }
.mint { color: var(--paper); word-break: break-all; overflow-wrap: anywhere; user-select: all; line-height: 1.3; flex: 1 1 auto; min-height: 0; }
.mint.is-empty { color: #74a89f; user-select: none; }
.links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }

/* ---------------------------------------------------------------- keys */
.key {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  min-height: 48px; padding: 10px 24px;
  font: inherit; font-size: var(--t-body); font-weight: 700; color: var(--ink);
  background: var(--paper);
  border: 0; border-top: 3px solid #fffaf0; border-left: 3px solid #fffaf0;
  border-right: 3px solid var(--manila-dk); border-bottom: 3px solid var(--manila-dk);
  outline: 3px solid var(--ink); outline-offset: 0;
  text-decoration: none; cursor: pointer; text-align: center;
  box-shadow: 4px 4px 0 0 rgba(10, 59, 56, 0.45);
}
.key > img { height: 24px; width: auto; display: block; flex: none; image-rendering: auto; }
.key:hover:not([disabled]):not([aria-disabled="true"]) { background: #fdf6e4; }
.key:active:not([disabled]):not([aria-disabled="true"]) {
  border-top-color: var(--manila-dk); border-left-color: var(--manila-dk);
  border-right-color: #fffaf0; border-bottom-color: #fffaf0;
  transform: translate(3px, 3px); box-shadow: 1px 1px 0 0 rgba(10, 59, 56, 0.45);
}
.key:focus-visible { outline: 4px solid var(--red); }
.key[disabled], .key[aria-disabled="true"] { color: #9aa79a; background: var(--paper-2); cursor: not-allowed; box-shadow: 2px 2px 0 0 rgba(10, 59, 56, 0.25); }
.key--wide { width: 100%; }
.key--big { min-height: 60px; font-size: var(--t-head); padding: 12px 32px; }
.key--screen {
  background: #123b36; color: #cdeade; outline-color: #061f1c;
  border-top-color: #2d6b61; border-left-color: #2d6b61; border-right-color: #061f1c; border-bottom-color: #061f1c;
  box-shadow: 3px 3px 0 0 rgba(0, 0, 0, 0.4); min-height: 46px; padding: 8px 22px;
}
.key--screen:hover:not([aria-disabled="true"]) { background: #1a5047; }
.key--screen[disabled], .key--screen[aria-disabled="true"] { color: #5f8b83; background: #0e2f2b; }

/* ---------------------------------------------------------------- the cabinet bank */
.bank { position: relative; }
.drawers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.drawer {
  position: relative; display: block; width: 100%;
  border: var(--drawer-slice) solid transparent;
  border-image: url("/img/drawer-plate.png") 26 fill / var(--drawer-slice) / 0 stretch;
  background: transparent; padding: 0 6px 6px; min-height: 104px;
  font: inherit; color: var(--paper); cursor: pointer; text-align: center; text-decoration: none;
}
.drawer__plate {
  display: block; margin: 0 auto; max-width: 100%;
  border: 16px solid transparent;
  border-image: url("/img/label-plate.png") 18 fill / 16px / 0 stretch;
  padding: 0 8px 2px; min-width: 0; max-width: 100%;
  font-family: var(--cond); font-size: var(--t-body); color: var(--ink);
  white-space: nowrap; overflow: hidden;
}
.drawer__ix { display: block; font-size: var(--t-body); color: #cfeae4; letter-spacing: 0.1em; }
.drawer[aria-current="true"] { transform: translateY(6px); }
.drawer[aria-current="true"] .drawer__plate { background-color: var(--manila); }
.drawer:hover { filter: brightness(1.08); }
.drawer:focus-visible { outline: 4px solid var(--red); outline-offset: 3px; }

.open-drawer {
  border-style: solid; border-width: 44px 34px 46px;
  border-image: url("/img/drawer-open.png") 48 36 50 36 fill / 44px 34px 46px / 0 stretch;
  padding: 10px 24px 16px; min-height: 460px; min-width: 0;
  color: var(--paper);
}
/* anything printed straight onto the drawer's dark inside is cream, not ink */
.open-drawer > .stack > .empty, .open-drawer > .empty { color: #cfe6e0; }
.open-drawer > .stack > .hr { background: var(--paper); opacity: 0.3; }

/* ---------------------------------------------------------------- the board: folders in the drawer */
.board { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.board__head {
  display: grid; grid-template-columns: 76px minmax(0, 1.4fr) minmax(0, 1.1fr) minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px; padding: 4px 42px 6px; font-size: var(--t-body); font-weight: 700; color: var(--paper);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.folder {
  display: grid; width: 100%; text-align: left;
  grid-template-columns: 76px minmax(0, 1.4fr) minmax(0, 1.1fr) minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px; align-items: center;
  border: 26px solid transparent;
  border-image: url("/img/folder-row.png") 26 fill / 26px / 0 stretch;
  background: transparent; padding: 4px 16px; min-height: 104px;
  font: inherit; color: var(--ink); cursor: pointer;
}
.folder:hover { filter: brightness(1.05) saturate(1.06); transform: translateY(-2px); }
.folder--still { cursor: default; }
.folder--still:hover { filter: none; transform: none; }
.folder:focus-visible { outline: 4px solid var(--red); outline-offset: -2px; }
.cell__t { font-size: var(--t-head); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cell__s { font-size: var(--t-body); color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cell__n { font-size: var(--t-head); font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.verdict { font-size: var(--t-body); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.verdict--bonded { color: var(--green); }
.verdict--alive { color: var(--ink); }
.verdict--dead, .verdict--sold, .verdict--rugged { color: var(--red); }
.verdict--open { color: var(--ink-soft); }

/* the coin's own picture, read through the office scanner */
.scanwin { width: 76px; height: 76px; position: relative; background: var(--paper-2); outline: 3px solid var(--ink); flex: none; }
.scanwin canvas, .scanwin img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }

/* ---------------------------------------------------------------- the three record marks */
.marks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; align-items: end; margin: 6px 0 2px; min-width: 0; }
.mark { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.mark__img { height: 62px; display: flex; align-items: flex-end; }
.mark__img img { max-height: 100%; width: auto; }
.mark__n { font-size: var(--t-head); font-weight: 700; }
.mark__l { font-size: var(--t-body); color: var(--ink-soft); text-align: center; min-width: 0; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: var(--t-body); font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; }
.field input {
  font: inherit; font-size: var(--t-body); color: var(--ink);
  background: #fffaf0; border: 0; outline: 3px solid var(--ink);
  box-shadow: inset 3px 3px 0 0 rgba(10, 59, 56, 0.22);
  padding: 0 14px; min-height: 52px; min-width: 0; width: 100%; border-radius: 0;
}
.field input::placeholder { color: #9aa79a; }
.field input:focus-visible { outline: 4px solid var(--red); }
.field input[type="file"] { padding: 10px 14px; }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: stretch; min-width: 0; }
.step {
  display: flex; flex-direction: column; gap: 6px; min-width: 0; overflow-wrap: anywhere;
  border: 26px solid transparent; border-image: url("/img/card.png") 38 fill / 26px / 0 stretch; padding: 12px 24px 16px;
}
.step__n { font-size: var(--t-head); font-weight: 700; color: var(--red); }
.step__t { font-size: var(--t-body); font-weight: 700; }
.step__b { font-size: var(--t-body); line-height: 1.45; margin: 0; }

.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.stack--tight { gap: 10px; }
.hr { height: 3px; background: var(--ink); opacity: 0.22; margin: 12px 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tail { display: flex; justify-content: flex-end; margin-top: 16px; }

/* ---------------------------------------------------------------- toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  z-index: 40; min-height: 52px; display: flex; align-items: center;
  background: var(--paper); color: var(--ink); outline: 3px solid var(--ink);
  box-shadow: 5px 5px 0 0 rgba(10, 59, 56, 0.5);
  padding: 8px 20px; font-size: var(--t-body); font-weight: 700;
  visibility: hidden; opacity: 0; max-width: calc(100vw - 32px);
}
.toast.is-on { visibility: visible; opacity: 1; }

/* ---------------------------------------------------------------- narrow */
/* 1366 and 1440: the three columns are three quarters of the 1920 ones, so the display sizes come
   down one step. Only whole multiples of 11: an 11 px bitmap face blurs at anything between. */
@media (min-width: 1241px) and (max-width: 1640px) {
  :root { --t-big: 33px; --t-mark: 44px; --pad: clamp(16px, 2.2vw, 40px); }
  .desk { gap: 1.1vw; }
  .desk__col { gap: 8px; }
  /* the clip graphic is 118 px deep: taking the border below that would print the head under it */
  .board-clip { border-width: 118px 20px 24px; padding: 2px 20px 6px; }
  .sign { padding: 2px 14px 8px; }
  .premise { line-height: 1.18; margin-top: 2px; }
  .card { padding: 8px 24px 12px; }
  .row { min-height: 28px; }
  .marks { gap: 4px; margin: 2px 0 0; }
  .mark__img { height: 48px; }
  .mascot { width: 112px; }
  .desktop-line img { max-width: 340px; }
}
@media (max-width: 1240px) {
  .desk { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .desk__col--sign { order: 1; }
  .desk__col--desk { order: 2; }
  .desk__col--clip { order: 3; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board__head { display: none; }
  .folder {
    grid-template-columns: 76px minmax(0, 1fr);
    grid-template-areas: "img name" "mult mult" "bail bail" "state state";
    gap: 10px 16px; padding: 10px 24px;
  }
  .cell__t, .cell__s, .cell__n { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
  .folder > :nth-child(1) { grid-area: img; }
  .folder > :nth-child(2) { grid-area: name; }
  .folder > :nth-child(3) { grid-area: mult; }
  .folder > :nth-child(4) { grid-area: bail; }
  .folder > :nth-child(5) { grid-area: state; }
}
@media (max-width: 860px) {
  :root { --t-mark: 44px; --card-slice: 26px; --drawer-slice: 22px; --sign-slice: 20px; }
  .card { padding: 12px 24px 16px; }
  .step { padding: 12px 24px 16px; }
  .office { padding: 26px var(--pad) 72px; }
  .drawers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .drawers .drawer:nth-child(5) { grid-column: 1 / -1; }
  .drawer { min-height: 92px; }
  .open-drawer { border-width: 34px 24px 36px; min-height: 420px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .links { grid-template-columns: minmax(0, 1fr); }
  .deskline { flex-wrap: wrap; }
  .deskline__props { width: 100%; order: 3; }
  .mascot { width: 104px; }
  .board-clip { border-width: 86px 18px 24px; }
}
@media (max-width: 460px) {
  :root { --t-head: 22px; --card-slice: 20px; }
  .open-drawer { border-width: 28px 16px 30px; padding: 8px 16px 12px; }
  .card { padding: 12px 20px 14px; }
  .step { padding: 12px 20px 14px; }
  .row > .k { white-space: normal; flex: 1 1 50%; min-width: 0; }
  .cell__t, .cell__n { font-size: var(--t-body); }
  .drawers { grid-template-columns: minmax(0, 1fr); }
  .drawers .drawer:nth-child(5) { grid-column: auto; }
  .drawer { min-height: 84px; }
  .folder { grid-template-columns: minmax(0, 1fr); grid-template-areas: "img" "name" "mult" "bail" "state"; padding: 10px 22px; }
  .marks { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; }
  .mark__l { letter-spacing: 0; }
  .mark__img { height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .room__wall, .room__light, .mascot img:nth-child(2) { animation: none !important; }
  .mascot img:nth-child(2) { opacity: 0; }
  * { transition-duration: 0.01ms !important; }
}
