/* TOMCAR Indonesia: the wireframe artboard (index.html).
   A quiet grey working surface: the frames carry the pages, the chrome stays out of the way.
   Grayscale and one system font, like the wireframes. Adapted from the owner's own artboard. */

:root {
  --table: #c4c4c4;      /* the surface behind the frames */
  --ink: #1f1f1f;
  --ink-2: #444444;
  --deep: #1a1a1a;       /* top bar */
  --paper: #ffffff;
  --rule: #d6d6d6;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --z: 1;                /* the board's zoom, set by artboard.js: frame names keep their size */
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; overflow: hidden;
  background: var(--table); color: var(--ink);
  font: 400 15px/1.45 var(--font);
  /* a drag that starts between the frames moves the board instead of selecting text;
     a page in use is its own document and stays selectable */
  -webkit-user-select: none; user-select: none;
}
h1, h2, h3, p, ul, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.bar :focus-visible { outline-color: var(--paper); }

/* Top bar */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 10; height: 52px;
  display: flex; align-items: center; gap: 20px; padding: 0 14px 0 16px;
  background: var(--deep); color: #e6e6e6;
}
.bar-title { min-width: 0; font-size: 15px; font-weight: 700; white-space: nowrap; }
.bar-title span { margin-left: 8px; font-weight: 400; color: #bdbdbd; }
.jump { display: flex; gap: 2px; margin-left: auto; }
.jump button, .zoom button {
  height: 34px; padding: 0 12px; border: 1px solid transparent; background: none; cursor: pointer;
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
}
.jump button:hover, .zoom button:hover { border-color: #555555; background: #333333; }
.zoom { display: flex; align-items: center; border: 1px solid #555555; }
.zoom button { display: grid; place-items: center; width: 34px; padding: 0; }
.zoom svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.zoom output { min-width: 54px; font-size: 13px; text-align: center; font-variant-numeric: tabular-nums; }

/* Canvas */
.viewport { position: fixed; inset: 52px 0 0 0; overflow: hidden; cursor: grab; touch-action: none; outline-offset: -3px; }
.viewport.dragging { cursor: grabbing; }
.board { position: absolute; top: 0; left: 0; transform-origin: 0 0; will-change: transform; }
.frame { position: absolute; }
.frame-name {
  position: absolute; bottom: 100%; left: 0; white-space: nowrap;
  display: flex; align-items: baseline; gap: calc(12px / var(--z));
  padding-bottom: calc(9px / var(--z));
  font-size: calc(13.5px / var(--z)); font-weight: 700; line-height: 1.2; color: var(--ink);
}
.frame-name span { font-weight: 400; color: var(--ink-2); }
.board.far .frame-name span, .board.far .frame-name a, .board.far .frame-name button { display: none; }
.frame-name a, .frame-name button {
  padding: calc(1px / var(--z)) calc(8px / var(--z));
  border: calc(1px / var(--z)) solid var(--ink); background: none; cursor: pointer;
  font-size: calc(12.5px / var(--z)); font-weight: 600; color: var(--ink); text-decoration: none;
}
.frame-name a:hover, .frame-name button:hover, .frame-name button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.page, .card { background: var(--paper); box-shadow: 0 2px 5px rgb(0 0 0 / 0.14), 0 22px 50px -18px rgb(0 0 0 / 0.35); }
.page iframe { display: block; border: 0; background: var(--paper); pointer-events: none; }
.page.in-use { outline: calc(4px / var(--z)) solid var(--ink); outline-offset: calc(4px / var(--z)); }
.page.in-use iframe { pointer-events: auto; }

/* Read me card */
.card-body { padding: 56px 64px 48px; font-size: 24px; line-height: 1.45; }
.readme { columns: 3; column-gap: 72px; }
.readme > * { break-inside: avoid; }
.readme-lead { margin-bottom: 18px; font-size: 40px; font-weight: 800; line-height: 1.1; }
.card-body p + p { margin-top: 14px; }
.card-body h3 { margin: 34px 0 12px; font-size: 27px; font-weight: 800; line-height: 1.2; }
.card-body a { color: inherit; }
.list, .later { display: grid; gap: 8px; }
.list li, .later li { position: relative; padding-left: 22px; }
.list li::before, .later li::before { content: ""; position: absolute; top: 0.68em; left: 0; width: 10px; height: 2px; background: var(--ink); }
.later + p { margin-top: 14px; }
.stamp { margin-top: 32px !important; padding-top: 14px; border-top: 2px solid var(--ink); font-size: 18px; color: var(--ink-2); }

/* Notes cards: one note per annotated section, level with it in the desktop frame */
.notes-body { position: relative; height: 100%; }
.notes-wait, .notes-shared { padding: 24px 36px 0; font-size: 19px; color: var(--ink-2); }
.notes-shared { font-style: italic; }
.note-item { position: absolute; right: 36px; left: 36px; padding-top: 6px; font-size: 19px; line-height: 1.45; }
.note-item h3 { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 23px; font-weight: 800; line-height: 1.2; }
.badge {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink); color: var(--paper); font-size: 16px; font-weight: 700;
}
.note-item dl > div { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding: 7px 0; border-top: 1px solid var(--rule); }
.note-item dt { font-weight: 700; }
.note-toggle { display: flex; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.note-toggle span { margin-right: 12px; font-weight: 700; }
.note-toggle button { min-height: 42px; padding: 0 16px; border: 1px solid var(--ink); background: var(--paper); cursor: pointer; font-weight: 600; }
.note-toggle button + button { margin-left: -1px; }
.note-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* Small screens: a list of the pages in place of the canvas */
.is-phone .viewport, .is-phone .jump, .is-phone .zoom { display: none; }
.phone { position: fixed; inset: 52px 0 0 0; overflow-y: auto; overscroll-behavior: contain; -webkit-user-select: text; user-select: text; }
.phone-in { display: grid; gap: 14px; max-width: 560px; margin: 0 auto; padding: 26px 16px 44px; }
.phone h2 { font-size: 25px; font-weight: 800; line-height: 1.15; }
.phone-lead { margin-bottom: 6px !important; font-size: 16px; color: var(--ink-2); }
.phone-pages { display: grid; gap: 14px; }
.phone-item { display: grid; gap: 6px; padding: 18px; background: var(--paper); color: var(--ink); text-decoration: none; box-shadow: 0 2px 5px rgb(0 0 0 / 0.14); }
.phone-item b { font-size: 19px; font-weight: 800; }
.phone-item span { font-size: 15px; line-height: 1.4; color: var(--ink-2); }
.phone-note { margin-top: 12px !important; font-size: 14px; color: var(--ink-2); }
.phone-canvas { justify-self: start; min-height: 44px; padding: 0 16px; border: 1px solid var(--ink-2); background: none; cursor: pointer; font-size: 14px; font-weight: 600; }

@media (max-width: 760px) {
  .bar { gap: 8px; padding: 0 8px; }
  .bar-title span, .zoom output { display: none; }
  body:not(.is-phone) .bar-title { display: none; }   /* on the canvas the jump buttons need the room */
  .jump { overflow-x: auto; }
  .jump button { padding: 0 8px; font-size: 12.5px; }
}
