/* Friction, v3
   Paper #FFFFFF · Ink #0A0A0A · Muted #6B6B6B · Hot #DC2A17 · Rule #E4E4E1
   Archivo for the wordmark and headlines. System stack for reading. DM Mono for apparatus.
   Loud mark, quiet page. Every element answers "what is this" or "can I check it". */

:root {
  --paper: #FFFFFF;
  --ink:   #0A0A0A;
  --mut:   #6B6B6B;
  --hot:   #DC2A17;
  --rule:  #E4E4E1;
  --display: 'Archivo', -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: 'DM Mono', ui-monospace, "SF Mono", Menlo, monospace;
  --measure: 62ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--hot); text-decoration: none; border-bottom: 1px solid rgba(220,42,23,.4); }
a:hover { border-bottom-color: var(--hot); }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 26px; }

/* ---------- the band ---------- */

.site-header { background: var(--ink); color: #fff; }
.site-header .wrap { display: flex; align-items: center; gap: 11px; padding-top: 14px; padding-bottom: 14px; }

.mark { width: 24px; height: 24px; flex-shrink: 0; display: block; }

.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: #fff;
  border-bottom: none;
  white-space: nowrap;
}
.wordmark:hover { border-bottom: none; color: #fff; }

.byline {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: #8d8d8d;
  white-space: nowrap;
}
.byline a { color: #8d8d8d; border-bottom: none; }
.byline a:hover { color: #fff; }

/* ---------- hero ---------- */

.hero { padding: 52px 0 0; }
.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 34px;
  letter-spacing: -.025em;
  line-height: 1.12;
  margin: 0 0 4px;
  max-width: 26ch;
  text-wrap: balance;
}
.hero p { font-size: 17px; line-height: 1.6; margin: 0; max-width: 58ch; color: #2c2c2c; }

/* ---------- who writes this ---------- */

.who { border-top: 1px solid var(--rule); margin-top: 56px; padding: 44px 0 0; }
.who h2 { font-family: var(--display); font-weight: 700; font-size: 20px;
          letter-spacing: -.016em; margin: 0 0 18px; }
.who p { font-size: 16.5px; line-height: 1.62; margin: 0 0 16px; max-width: 60ch; color: #232323; }
.who p.sig { font-family: var(--mono); font-size: 13px; color: var(--mut);
             letter-spacing: .04em; margin-top: 24px; }
.who p.sig a { color: var(--mut); border-bottom: 1px solid #d6d6d3; }
.who p.sig a:hover { color: var(--hot); border-bottom-color: var(--hot); }

/* ---------- signup ---------- */

.signup { display: flex; margin: 30px 0 0; max-width: 430px; }
.signup input[type="email"] {
  flex: 1; min-width: 0;
  font-family: var(--body);
  font-size: 15px;
  padding: 11px 12px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-right: none;
  border-radius: 0;
  outline: none;
}
.signup input[type="email"]::placeholder { color: var(--mut); }
.signup input[type="email"]:focus { border-color: var(--hot); }
.signup button {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .11em;
  text-transform: uppercase;
  padding: 11px 19px;
  color: #fff;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
}
.signup button:hover { background: var(--hot); border-color: var(--hot); }
.signup-msg { font-family: var(--mono); font-size: 12px; color: var(--hot); min-height: 1em; margin-top: 6px; }

/* ---------- the ledger ---------- */

.ledger { margin-top: 54px; border-top: 2px solid var(--ink); }

.entry {
  display: flex;
  align-items: baseline;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}
a.entry { border-bottom: 1px solid var(--rule); }
a.entry:hover { border-bottom-color: var(--rule); }
a.entry:hover .entry-title { color: var(--hot); }

.entry-no   { width: 50px;  flex-shrink: 0; padding: 17px 10px 17px 0;
              font-family: var(--mono); font-size: 12px; color: #9a9a9a; }
.entry-date { width: 84px;  flex-shrink: 0; padding: 17px 10px 17px 0;
              font-family: var(--mono); font-size: 12px; color: var(--mut); }
.entry-title { flex: 1; padding: 17px 10px 17px 0;
              font-family: var(--display); font-size: 16.5px; font-weight: 600; letter-spacing: -.014em; }
.entry-cat  { width: 148px; flex-shrink: 0; padding: 17px 0;
              font-family: var(--mono); font-size: 12px; color: var(--hot); text-align: right; }

/* ---------- bio, relationship B made permanent ---------- */

.bio { font-size: 15px; color: var(--mut); max-width: 62ch; margin: 28px 0 0; }
.bio b { color: var(--ink); font-weight: 600; }

/* ---------- post ---------- */

.post-header { padding: 34px 0 0; }
.post-meta { font-family: var(--mono); font-size: 12px; color: var(--mut); }
.post-meta .cat { color: var(--hot); }
.post-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: -.024em;
  line-height: 1.11;
  margin: 11px 0 14px;
  max-width: 22ch;
}

.post-content { padding: 0 0 20px; }
.post-content p, .post-content ul, .post-content ol, .post-content blockquote { max-width: var(--measure); }
.post-content p { margin: 0 0 17px; }
.post-content h2 { font-family: var(--display); font-weight: 700; font-size: 21px;
                   letter-spacing: -.016em; margin: 32px 0 9px; }
.post-content h3 { font-family: var(--display); font-weight: 700; font-size: 18px; margin: 26px 0 7px; }
.post-content ul, .post-content ol { padding-left: 22px; margin: 0 0 17px; }
.post-content li { margin: 6px 0; }
.post-content blockquote { margin: 20px 0; padding: 0 0 0 18px; border-left: 2px solid var(--hot); }
.post-content hr { border: none; border-top: 1px solid var(--rule); margin: 30px 0; }
.post-content strong { font-weight: 700; }
/* italic is the emphasis; bold in a 300 word note is a shout */
.post-content em, .post-content i { font-style: italic; }

/* figures inside prose read as evidence and line up in columns */
.post-content .figure, .post-content .num, .figure, .num {
  font-family: var(--mono); font-weight: 500;
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
}

.post-content code { font-family: var(--mono); font-size: .88em; background: #f6f6f4;
                     padding: 1px 5px; border: 1px solid var(--rule); }
.post-content pre { font-family: var(--mono); font-size: 14px; background: #f6f6f4;
                    border: 1px solid var(--rule); padding: 16px 18px; overflow-x: auto; }
.post-content pre code { background: none; border: none; padding: 0; }
.post-content figure { margin: 24px 0; }
.post-content figcaption { font-family: var(--mono); font-size: 11.5px; color: var(--mut); margin-top: 8px; }
.post-content table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 20px 0;
                      font-variant-numeric: tabular-nums; }
.post-content th, .post-content td { padding: 8px 10px; text-align: left;
                                     border-bottom: 1px solid var(--rule); vertical-align: top; }
.post-content th { font-family: var(--mono); font-size: 11px; font-weight: 500;
                   color: var(--mut); border-bottom: 1px solid var(--ink); }

.signoff { font-family: var(--mono); font-size: 12.5px; color: var(--mut);
           margin: 30px 0 0; padding-top: 16px; border-top: 1px solid var(--rule); }

/* ---------- Koenig cards, required by gscan ---------- */

.kg-card { margin: 24px 0; }
.kg-width-wide { max-width: 900px; margin-left: auto; margin-right: auto; }
.kg-width-full { max-width: 100%; }
.kg-image { margin-left: auto; margin-right: auto; }
.kg-embed-card { display: flex; flex-direction: column; align-items: center; }
.kg-gallery-container { display: flex; flex-direction: column; max-width: 900px; margin: 0 auto; }
.kg-gallery-row { display: flex; flex-direction: row; justify-content: center; }
.kg-gallery-image img { display: block; margin: 0; width: 100%; height: 100%; }
.kg-gallery-row:not(:first-of-type) { margin: 6px 0 0; }
.kg-gallery-image:not(:first-of-type) { margin: 0 0 0 6px; }
.kg-bookmark-card { width: 100%; }
.kg-bookmark-container { display: flex; border: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.kg-bookmark-content { flex-grow: 1; padding: 18px; }
.kg-bookmark-title { font-family: var(--display); font-weight: 700; }
.kg-bookmark-description { color: var(--mut); font-size: 15px; margin-top: 5px; }
.kg-bookmark-metadata { font-family: var(--mono); font-size: 11.5px; color: var(--mut); margin-top: 12px; }
.kg-bookmark-thumbnail { min-width: 33%; max-height: 200px; }
.kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.kg-callout-card { padding: 16px 18px; border-left: 2px solid var(--hot); background: #f9f9f7; }
.kg-toggle-card { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 14px 0; }
.kg-button-card a { font-family: var(--mono); font-size: 12px; letter-spacing: .11em; text-transform: uppercase;
                    padding: 12px 20px; background: var(--ink); color: #fff; border-bottom: none; display: inline-block; }

/* ---------- footer ---------- */

.site-footer { border-top: 2px solid var(--ink); margin-top: 40px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
                     padding-top: 17px; padding-bottom: 26px;
                     font-family: var(--mono); font-size: 12px; color: var(--mut); }
.foot-mark { font-family: var(--display); font-weight: 800; font-size: 12px;
             letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.site-footer a { color: var(--mut); border-bottom: none; margin-left: 18px; }
.site-footer a:first-child { margin-left: 0; }
.site-footer a:hover { color: var(--ink); }

/* ---------- pagination, error ---------- */

.pagination { display: flex; justify-content: space-between; align-items: center;
              font-family: var(--mono); font-size: 12px; color: var(--mut); padding: 22px 0 0; }
.pagination a { color: var(--ink); border-bottom: none; }

.error-wrap { padding: 70px 0; }
.error-code { font-family: var(--mono); font-size: 13px; color: var(--hot); }
.error-msg { font-family: var(--display); font-weight: 700; font-size: 28px;
             letter-spacing: -.02em; margin: 11px 0 14px; }

@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .hero { padding: 40px 0 0; }
  .hero h1 { font-size: 25px; }
  .post-title { font-size: 25px; }
  .hero .dek { font-size: 17px; }
  .entry-cat { display: none; }
  .entry-date { width: 68px; }
  .entry-title { font-size: 15.5px; }
  .site-footer .wrap { flex-direction: column; }
  .site-footer a { margin: 0 18px 0 0; }
}
