/* The shared bar and title block for every page on patrice.design.
   Loaded by /assets/site.js. Every class starts with pd- and every color is its own variable,
   so nothing here leaks into a tool's own design, and nothing in a tool changes this. */
@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=IBM+Plex+Mono:wght@400;500&display=swap');

.pd-bar, .pd-foot, .pd-index {
  --pd-paper: #edebe4; --pd-ink: #1a1a1a; --pd-acid: #d7f03c; --pd-dim: #5c5b57; --pd-rule: #1a1a1a;
  font: 500 12px/1.2 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .02em; color: var(--pd-ink);
  box-sizing: border-box;
}
.pd-bar *, .pd-foot *, .pd-index * { box-sizing: border-box; }
/* Dark when the page itself is dark; site.js reads the page's background and adds pd-dark. */
.pd-dark, .pd-dark .pd-index { --pd-paper: #1b1b19; --pd-ink: #e9e6de; --pd-dim: #a3a09a; --pd-rule: #e9e6de; }

/* ---- the bar: name on the left, sheet index on the right ---- */
.pd-bar { position: relative; z-index: 40; background: var(--pd-paper); border-bottom: 2px solid var(--pd-rule);
  display: grid; grid-template-columns: auto 1fr auto; align-items: stretch; min-height: 48px; }
.pd-bar a { color: inherit; text-decoration: none; }
.pd-name { font: 400 17px/1 "Archivo Black", Archivo, sans-serif; letter-spacing: -.01em; padding: 0 16px;
  display: flex; align-items: center; border-right: 2px solid var(--pd-rule); white-space: nowrap; }
.pd-here { display: flex; align-items: center; gap: 10px; padding: 0 16px; color: var(--pd-dim); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pd-here b { font-weight: 500; color: var(--pd-ink); background: var(--pd-acid); color: #1a1a1a; padding: 3px 6px; }
.pd-links { display: flex; align-items: stretch; }
.pd-links > a, .pd-links > button { display: flex; align-items: center; gap: 6px; padding: 0 16px; min-height: 48px;
  border: 0; border-left: 2px solid var(--pd-rule); background: transparent; color: inherit; font: inherit; letter-spacing: inherit; cursor: pointer; text-transform: uppercase; }
.pd-links > a:hover, .pd-links > button:hover, .pd-links > a:focus-visible, .pd-links > button:focus-visible,
.pd-links > a[aria-current="page"], .pd-links > button[aria-expanded="true"] { background: var(--pd-acid); color: #1a1a1a; outline: none; }
.pd-code { color: var(--pd-dim); }
.pd-links > a:hover .pd-code, .pd-links > a[aria-current="page"] .pd-code, .pd-links > button[aria-expanded="true"] .pd-code,
.pd-links > button:hover .pd-code { color: #1a1a1a; }

/* ---- the sheet index that opens under Tools ---- */
.pd-index { position: absolute; right: 0; top: 100%; width: min(460px, 100vw); background: var(--pd-paper);
  border: 2px solid var(--pd-rule); border-top: 0; z-index: 41; }
.pd-index[hidden] { display: none; }
.pd-index a { display: grid; grid-template-columns: 64px 1fr; gap: 0 12px; padding: 12px 16px; color: inherit; text-decoration: none;
  border-top: 1px solid var(--pd-rule); min-height: 44px; }
.pd-index a:first-child { border-top: 0; }
.pd-index a:hover, .pd-index a:focus-visible, .pd-index a[aria-current="page"] { background: var(--pd-acid); color: #1a1a1a; outline: none; }
.pd-index .pd-num { font: 400 22px/1 "Archivo Black", Archivo, sans-serif; grid-row: span 2; align-self: center; }
.pd-index .pd-t { font: 400 15px/1.15 "Archivo Black", Archivo, sans-serif; letter-spacing: 0; text-transform: none; }
.pd-index small { font-size: 12px; color: var(--pd-dim); }
.pd-index a:hover small, .pd-index a[aria-current="page"] small { color: #1a1a1a; }

/* ---- the title block at the bottom of every page ---- */
.pd-foot { background: var(--pd-paper); border-top: 2px solid var(--pd-rule); margin-top: 64px;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; }
.pd-foot > div { padding: 10px 16px 12px; border-left: 2px solid var(--pd-rule); min-width: 0; }
.pd-foot > div:first-child { border-left: 0; }
.pd-foot .pd-lbl { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--pd-dim); margin-bottom: 4px; }
.pd-foot .pd-v { font-size: 13px; }
.pd-foot .pd-big { font: 400 28px/1 "Archivo Black", Archivo, sans-serif; }
.pd-foot a { color: inherit; }

@media (max-width: 720px) {
  .pd-here { display: none; }
  .pd-bar { grid-template-columns: 1fr auto; }
  .pd-links > a, .pd-links > button { padding: 0 12px; }
  .pd-links .pd-code { display: none; }
  .pd-foot { grid-template-columns: 1fr 1fr; }
  .pd-foot > div:nth-child(3) { border-left: 0; }
  .pd-foot > div:nth-child(n+3) { border-top: 2px solid var(--pd-rule); }
}
@media print { .pd-bar, .pd-index { display: none; } }
