/* RUBBERDUCKING(1): the page is set as a man page. Layout reference:
   design/directions/b-manpage.html. Grid tracks use minmax(0,1fr), never bare 1fr —
   an unwrapped line would otherwise set the column's minimum width and overflow phones. */

*, *::before, *::after { box-sizing: border-box; }
::selection { background: var(--sel); }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  padding-inline: 20px;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.7 var(--mono);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--hi); text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--hi); outline-offset: 3px; }
b, strong { font-weight: 700; }
.dim { color: var(--dim); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.page { max-width: 960px; margin-inline: auto; }

/* running header / footer */
.runhead {
  display: flex; justify-content: space-between; gap: 12px;
  padding-block: 18px; border-bottom: 1px solid var(--rule);
  color: var(--dim); font-size: 13px;
}
.runhead.foot { margin-top: 40px; border-top: 1px solid var(--rule); border-bottom: 0; }
.legal { margin: -6px 0 40px; color: var(--dim); font-size: 12px; }

/* hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center;
  padding-block: 56px 44px; border-bottom: 1px solid var(--rule);
}
.hero-text { min-width: 0; }
.name { margin: 0 0 20px; color: var(--dim); font-size: 14px; }
.name b { color: var(--text); }
h1 {
  margin: 0; max-width: 18ch;
  font: 700 clamp(2rem, 5.2vw, 3.6rem)/1.08 var(--mono); letter-spacing: -.035em;
}
h1 .dim { font-weight: 400; }
.synopsis {
  margin: 28px 0 0; padding: 14px 16px;
  background: var(--panel); border-left: 3px solid var(--duck);
  font-size: 14px; white-space: pre; overflow-x: auto;
}
.synopsis .cmd { font-weight: 700; }
.synopsis .opt { color: var(--hi); }
.synopsis .nw { white-space: nowrap; } /* never split "[--audit]" at its hyphens when the line wraps */
.lede { max-width: 62ch; margin: 22px 0 0; color: var(--dim); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 0; }
.key {
  display: inline-block; padding: 11px 14px;
  border: 1px solid var(--text); background: transparent; color: var(--text);
  font: 500 14px/1 var(--mono); text-decoration: none; cursor: pointer;
}
.key.primary { background: var(--text); color: var(--bg); }
.key:hover { background: var(--duck); border-color: var(--duck); color: #1c1b17; }
.pixduck { width: clamp(120px, 20vw, 220px); height: auto; }
.pixduck .duck { fill: var(--duck); }
.pixduck .beak { fill: var(--beak); }
.pixduck .eye { fill: var(--eye); }

/* sections */
section {
  display: grid; grid-template-columns: 13ch minmax(0, 1fr); gap: 0 3ch;
  padding-block: 34px; border-bottom: 1px solid var(--rule);
}
h2 { margin: 0; padding-top: 3px; font: 700 13px/1.7 var(--mono); letter-spacing: .08em; }
section > div > p { max-width: 72ch; margin: 0 0 1em; }
section > div > p:last-child { margin-bottom: 0; }
main > section:last-child { border-bottom: 0; } /* the running footer draws its own rule */

.opts { margin: 0; }
.opts dt .flag { color: var(--hi); font-weight: 700; }
.opts dt .arg { color: var(--dim); }
.opts dt .t { font-weight: 700; }
.opts dd { max-width: 68ch; margin: 4px 0 26px 4ch; }
.note { margin-top: 20px; }

.hist { width: 100%; border-collapse: collapse; font-size: 15px; }
.hist td { padding: 10px 0; vertical-align: top; border-top: 1px dashed var(--rule); }
.hist tr:first-child td { border-top: 0; }
.hist .when { width: 14ch; padding-right: 2ch; color: var(--dim); white-space: nowrap; }
.hist b { display: block; }
.tags { margin: 18px 0 0; padding: 0; list-style: none; color: var(--dim); font-size: 14px; }
.tags li::before { content: "· "; color: var(--hi); }

.label { margin: 0 0 8px; color: var(--dim); font-size: 13px; font-weight: 700; letter-spacing: .06em; }
.repos { margin: 0 0 26px; padding: 0; list-style: none; }
.repos li { display: grid; grid-template-columns: 18ch 7ch minmax(0, 1fr); gap: 2ch; padding: 5px 0; }
.repos .s { color: var(--dim); text-align: right; white-space: nowrap; }
.repos .d { color: var(--dim); }
.star { width: .8em; height: .8em; margin-right: .35em; vertical-align: -.05em; fill: currentColor; }
.posts { margin: 0; padding: 0; list-style: none; }
.posts li { padding: 6px 0; }
.posts time { margin-right: 2ch; color: var(--dim); }

.ex { margin-bottom: 14px; padding: 14px 16px; border: 1px solid var(--rule); }
.ex:last-child { margin-bottom: 0; }
.ex-meta { margin: 0; color: var(--hi); font-size: 13px; font-weight: 700; }
.ex h3 { margin: 2px 0 6px; font: 700 16px/1.4 var(--mono); }
.ex p { margin: 0; color: var(--dim); }

.contact-heading {
  margin: 0 0 14px;
  font: 700 clamp(1.6rem, 4vw, 2.4rem)/1.1 var(--mono); letter-spacing: -.03em;
}
.email-out { margin: 4px 0 0; font: 700 clamp(1.1rem, 2.8vw, 1.6rem)/1.3 var(--mono); }
.email-out::before { content: "$ "; color: var(--hi); }
.email-out a { color: var(--text); text-decoration-color: var(--duck); text-decoration-thickness: 3px; }
.fine { margin-top: 16px !important; font-size: 13px; }

@media (max-width: 720px) {
  .runhead span:nth-child(2) { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .pixduck { order: -1; width: 96px; }
  .synopsis { white-space: normal; }
  section { grid-template-columns: minmax(0, 1fr); }
  h2 { margin-bottom: 12px; }
  .opts dd { margin-left: 0; }
  .repos li { grid-template-columns: minmax(0, 1fr) auto; }
  .repos .d { grid-column: 1 / -1; margin-top: -4px; }
  .hist tr { display: block; padding: 10px 0; border-top: 1px dashed var(--rule); }
  .hist tr:first-child { border-top: 0; }
  .hist td { display: block; padding: 0; border: 0; }
  .hist .when { width: auto; }
}
