/* The stage of the action determines its paper stock, including after a reload. */
:root {
  --print-angle: -2deg;
  --print-ink: #303c2e;
  --paper-gold: #edc679;
  --paper-honey: #e0b66e;
  --paper-oat: #f1dbaa;
}
button { border-radius: 7px; }

body :is(#tabs, .desk-navigation .evidence-tabs) {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid #b1b8a7;
  border-radius: 7px;
  background: #eceee1;
}
body :is(#tabs, .desk-navigation .evidence-tabs) button {
  border: 1px solid transparent;
  border-radius: 4px;
  padding: .48em .95em;
  background: transparent;
  color: #365146;
  cursor: pointer;
  font-weight: 600;
}
body :is(#tabs, .desk-navigation .evidence-tabs) button:hover { background:#dce3d6; }
body :is(#tabs, .desk-navigation .evidence-tabs) button:is([aria-selected=true],[aria-current=page]) {
  color: #fffdf4;
  background: #205046;
}

body :is(.learnings:not(.locked), #interval, #toggle-includes, #copy-decisions,
         #restart, .reread, [data-op="review-page"], #review-page) {
  color: var(--print-ink);
  background: #f8f2df;
  border: 1px solid #6a715f;
  border-radius: 5px;
  box-shadow: 2px 2px #84917a;
  padding: .55em 1.1em;
  font-weight: 650;
}
body > header :is(a, button) {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font: 500 .85rem/1.35 system-ui, sans-serif;
  text-decoration: none;
}
body > header .replay-library { color: #fffdf4; font-weight: 600; }
body > header :is(#reset,#reset-game) { background: transparent; border: 0; box-shadow: none; color: #deeadc; padding: .3em .1em; text-transform: none; }
body > header :is(a, button):hover { text-decoration: underline; text-underline-offset: .22em; }
body > header :is(a, button):focus-visible { outline: 2px solid white; outline-offset: 3px; }
body > header.brokerage-bar {
  box-sizing:border-box;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px max(4vw, calc((100% - 1480px) / 2));
  background:#173c34;
  color:#fffdf4;
}
.brokerage-bar nav.desk-tools {
  display:grid;
  grid-template-columns:38px 38px 3.3rem;
  gap:5px;
  align-items:center;
  font:500 14px/1.35 system-ui,sans-serif;
}
.brokerage-bar .desk-tools button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  position:relative;
  width:38px;
  height:38px;
  padding:0;
  margin:0;
  border:0;
  border-radius:5px;
  background:transparent;
  color:#f5efda;
  box-shadow:none;
  cursor:pointer;
  font:inherit;
}
.brokerage-bar .desk-tools button:hover,
.brokerage-bar .desk-tools button:focus-visible {background:#31574c}
.brokerage-bar .desk-tools button:disabled {opacity:.45;background:transparent;cursor:default}
.brokerage-bar .desk-tools button::before {
  content:"";
  width:23px;
  height:23px;
  background:currentColor;
  mask:var(--desk-icon) center/contain no-repeat;
}
.desk-tools [data-wallet-cash] {
  --desk-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 7V5a1 1 0 0 0-1.2-1L5 6.4A2.5 2.5 0 0 0 3 9v9a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2H6'/%3E%3Cpath d='M21 11h-4a2 2 0 0 0 0 5h4'/%3E%3Ccircle cx='17.5' cy='13.5' r='.7' fill='black' stroke='none'/%3E%3C/svg%3E");
}
.desk-tools :is(#open-notebook,[data-op="notebook"]) {
  --desk-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='3' width='14' height='18' rx='1.5'/%3E%3Cpath d='M8.5 3v18M3.5 7h3M3.5 12h3M3.5 17h3M11.5 8h4.5M11.5 11h3'/%3E%3C/svg%3E");
}
.desk-tools :is(#open-notebook,[data-op="notebook"])[aria-expanded="true"] {
  --desk-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='18' height='13' rx='2'/%3E%3Cpath d='M8.5 7V5.5A1.5 1.5 0 0 1 10 4h4a1.5 1.5 0 0 1 1.5 1.5V7M3 11c5 3 13 3 18 0M10.5 12.5v2h3v-2'/%3E%3C/svg%3E");
}
.desk-tools .tool-label {
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
}
@media (forced-colors:active) {
  .brokerage-bar .desk-tools button::before {forced-color-adjust:none;background:ButtonText}
}
.brokerage-bar .desk-tools small {font:500 13px/1.35 system-ui,sans-serif;letter-spacing:normal;text-align:right;white-space:nowrap}
body > main:has(> #library-notebook:not([hidden])) {
  box-sizing:border-box;
  width:min(1480px,92vw);
  max-width:none;
  margin:0 auto;
  padding:22px 0 46px;
}
body :is(#toggle-includes, #interval)[aria-expanded="false"],
body #copy-decisions[aria-expanded="true"] { background: #ebe3c9; }
body #copy-decisions[aria-expanded="true"]::after {
  content: "✓";
  display: inline-block;
  margin-left: .55em;
  color: #25684f;
  visibility: hidden;
}
body #copy-decisions[data-confirmed]::after { visibility: visible; }
body :is(.learnings:not(.locked), #interval, #toggle-includes, #copy-decisions,
         #restart, .reread, [data-op="review-page"], #review-page):not(.primary):active {
  border-color: var(--print-ink);
}

body :is(#order.offset, .case-actions .play, button.primary, button.call-commit,
         #review-page.primary, #review .primary) {
  color: var(--print-ink);
  background: var(--print-paper, var(--paper-gold));
  border: 2px solid var(--print-ink);
  border-radius: 5px;
  box-shadow: 3px 3px var(--print-ink);
  font-weight: 700;
  padding: .62em 1.05em;
  transform: rotate(var(--print-angle));
  margin-block: .35em;
}
:is([data-shade="honey"], [data-op="fill"], [data-op="continue"], #continue-day) { --print-paper: var(--paper-honey); }
:is([data-shade="oat"], [data-op="advance"], #next) { --print-paper: var(--paper-oat); }
[data-op="start-order"] { --print-paper: #f3d49a; }
body :is(#order.offset, .case-actions .play, button.primary, button.call-commit):not(:disabled):hover {
  background: color-mix(in srgb, var(--print-paper, var(--paper-gold)) 92%, white);
}
body :is(#order.offset, .case-actions .play, button.primary, button.call-commit):not(:disabled):active {
  box-shadow: 1px 1px var(--print-ink);
}
