/* === FONTS === */
@font-face {
  font-family: 'Gohu';
  src: url('fonts/GohuFont-Powerline.ttf') format('truetype');
  font-weight: normal;
  font-style:  normal;
  font-display: block;
}

/* === TOKENS === */
:root {
  --bg:         #ffffff;
  --surface:    #ffffff;
  --text:       #000000;
  --text-muted: #000000;
  --accent:     #000000;
  --brand-accent: #b11b1b;
  --locked-text: #6b6b6b;
  --note:       #5b2a86;
  --warn:       #c31f1f;
  --border:     #000000;
  --separator:  #000000;
  --quote:      #000000;
  --footer:     #262626;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { overflow-y: scroll; scrollbar-gutter: stable; }

body {
  background:     var(--bg);
  color-scheme:    light;
  color:           var(--text);
  font-family:     'Gohu', 'Courier New', Courier, monospace;
  font-size:       14px;
  line-height:     1.72;
  font-weight:     bold;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
  font-smooth: never;
  scrollbar-color: var(--border) var(--surface);
  scrollbar-width: thin;
}

body.paper-mode { background: var(--bg); }

::-webkit-scrollbar       { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 0; }

a       { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: inherit; }

/* === WRAPPER === */
#wrapper {
  max-width:      80ch;
  margin:         0 auto;
  padding:        0 18px 28px;
  background:     var(--bg);
  min-height:     100vh;
  display:        flex;
  flex-direction: column;
  overflow-x:     hidden;
}

body.paper-mode #wrapper {
  max-width: none;
  margin:    0;
  padding:   18px 14px 24px;
  background: transparent;
}

body.paper-mode #main-col {
  padding-bottom: 0;
}

body.home-mode #wrapper.home-shell {
  max-width: 118ch;
  padding:   18px 20px 28px;
}

.home-page {
  display:       flex;
  flex-direction: column;
  gap:           22px;
}

.home-hero {
  display:       flex;
  flex-direction: column;
  gap:           8px;
  padding:       4px 0 18px;
  border-bottom: 1px solid var(--separator);
}

.home-hero__kicker {
  font-size:      11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color:          var(--text-muted);
}

.home-hero__markline {
  display:     flex;
  align-items: center;
  gap:         14px;
}

.home-hero__rule {
  flex:        1 1 auto;
  min-width:   2ch;
  border-top:  1px solid var(--separator);
}

.home-hero__brand {
  white-space:   nowrap;
  font-size:     clamp(28px, 4vw, 56px);
  line-height:   0.95;
  font-weight:   700;
  letter-spacing:-0.06em;
  color:         var(--text);
}

.home-hero__brand-accent {
  color: var(--brand-accent);
}

.home-hero__strap {
  max-width:   58ch;
  font-size:   13px;
  line-height: 1.55;
  color:       var(--text);
}

.home-hero__meta {
  display:       flex;
  flex-wrap:     wrap;
  align-items:   baseline;
  gap:           0 10px;
  font-size:     11px;
  line-height:   1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color:         var(--text-muted);
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(18ch, 0.56fr) minmax(0, 1.8fr);
  gap: 26px;
  align-items: start;
}

.home-main,
.home-rail {
  min-width: 0;
}

.home-main { order: 2; }
.home-rail { order: 1; }

.home-feed {
  position: relative;
  z-index:  0;
  --home-feed-title-width: 28ch;
  padding:  24px 56px 18px;
}

.page-mascot {
  position:        fixed;
  z-index:         -1;
  bottom:          -20px;
  right:           -20px;
  width:           380px;
  max-width:       55vw;
  height:          auto;
  opacity:         0.65;
  pointer-events:  none;
  image-rendering: pixelated;
}

@media (max-width: 640px) {
  .page-mascot { width: 220px; }
}

.home-feed__side {
  position:       absolute;
  top:            18px;
  bottom:         18px;
  width:          16px;
  color:          var(--brand-accent);
  font-size:      10px;
  letter-spacing: 0.12em;
  text-transform: none;
  writing-mode:   vertical-rl;
  text-orientation: mixed;
  display:        flex;
  align-items:    center;
  justify-content: flex-start;
  background:     var(--bg);
  padding:        0 4px;
  pointer-events: none;
}

.home-feed__side-text {
  display: inline;
}

.home-feed__side-char--red {
  color: var(--brand-accent);
}

.home-feed__side--left {
  left:  0;
}

.home-feed__side--right {
  right: 0;
}

.home-feed__head {
  display:         flex;
  align-items:     baseline;
  justify-content: space-between;
  gap:             12px;
  margin-bottom:   18px;
}

.home-feed__label,
.home-card__label {
  color:          var(--text-muted);
  font-size:      11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.home-feed__count {
  color:          var(--text-muted);
  font-size:      11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.home-feed__list {
  list-style: none;
  display:    flex;
  flex-direction: column;
  gap:        4px;
}

.home-feed__entry {
  display:         grid;
  grid-template-columns: auto max-content auto minmax(2ch, 1fr) auto;
  align-items:     baseline;
  column-gap:      10px;
  line-height:     1.3;
  font-size:       14px;
}

.home-feed__flags-cell {
  display:     inline-flex;
  align-items: baseline;
}

.home-feed__index {
  color:          var(--text-muted);
  font-size:      11px;
  letter-spacing: 0.14em;
  white-space:    nowrap;
}

.home-feed__title-cell {
  min-width: 0;
  display: inline-flex;
  align-items: baseline;
  max-width: var(--home-feed-title-width);
  justify-self: start;
  overflow: hidden;
  white-space: nowrap;
}

.home-feed__title {
  flex:                  0 0 auto;
  min-width:             0;
  color:                 var(--text);
  text-decoration:       underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  overflow:              hidden;
  text-overflow:         ellipsis;
  white-space:           nowrap;
}

.home-feed__title--locked {
  color:           var(--locked-text);
  text-decoration: none;
  pointer-events:  none;
  cursor:          default;
}

.home-feed__title:hover {
  text-decoration:       underline;
  text-decoration-style: solid;
  text-underline-offset: 2px;
}

.home-feed__title--locked:hover {
  text-decoration: none;
}

.home-feed__dots {
  border-bottom: 1px dotted var(--separator);
  height:        0.85em;
  transform:     translateY(-0.1em);
}

.home-feed__meta {
  color:          var(--text-muted);
  font-size:      11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space:    nowrap;
}

.home-feed__flags {
  margin-left: 0;
  display: inline-flex;
  gap: 0;
}

.home-feed__flags .home-feed__flag {
  margin-left: 0;
}

.home-feed__flag {
  color:          var(--brand-accent);
  font-size:      11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space:    nowrap;
}

.home-feed__flag--new {
  font-weight:            700;
  background:             linear-gradient(90deg, #ff0000, #ff9900, #ffee00, #33ff00, #00ffee, #0066ff, #cc00ff, #ff0000);
  background-size:        200% auto;
  -webkit-background-clip: text;
  background-clip:        text;
  color:                  transparent;
  animation:              home-feed-rainbow 3s linear infinite;
}

@keyframes home-feed-rainbow {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.home-feed__empty {
  color:       var(--text-muted);
  font-size:   13px;
  line-height: 1.5;
}

.home-rail {
  position: sticky;
  top:      12px;
}

.home-manifesto {
  display:       flex;
  flex-direction: column;
  gap:           12px;
  padding-top:   14px;
}

.home-manifesto__body {
  font-family: inherit;
  white-space: pre-wrap;
  margin:      0;
  font-size:   13px;
  line-height: 1.7;
  color:       var(--text);
}

.home-manifesto__binary {
  white-space: inherit;
}

.home-manifesto__bit--red {
  color: var(--brand-accent);
}

.home-manifesto--collapsible { display: none; }

.home-manifesto--collapsible summary {
  cursor:      pointer;
  list-style:  none;
}
.home-manifesto--collapsible summary::-webkit-details-marker { display: none; }
.home-manifesto--collapsible summary::before {
  content:      '[+] ';
  color:        var(--brand-accent);
}
.home-manifesto--collapsible[open] summary::before {
  content: '[-] ';
}
.home-manifesto--collapsible .home-manifesto__body { margin-top: 12px; }

.home-manifesto__image {
  display:   block;
  width:     100%;
  max-width: 100%;
  height:    auto;
  border:    1px solid var(--border);
}

.home-manifesto__image-caption {
  text-align:     right;
  font-size:      11px;
  letter-spacing: 0.08em;
  color:          var(--footer);
  margin-top:     4px;
}

/* === SCANLINES === */
#scanlines {
  display: none;
}

/* === TOP NAV === */
#top-nav {
  padding:        10px 0 8px;
  font-size:      12px;
  letter-spacing: 0.08em;
  border-bottom:  1px solid var(--border);
  margin-bottom:  0;
}
#top-nav a {
  color:           var(--text-muted);
  text-decoration: none;
  margin-right:    10px;
}
#top-nav a:hover { color: var(--text); }

/* === ASCII TITLE === */
.ascii-title {
  font-family: inherit;
  font-size:   14px;
  line-height: 1.15;
  color:       var(--text);
  white-space: pre;
  overflow-x:  hidden;
  padding:     12px 0 8px;
  background:  transparent;
  border:      none;
  margin:      0;
  width:       fit-content;
  margin-left: 0;
  margin-right: 0;
  user-select: none;
  font-weight: 700;
}

/* === SEPARATOR === */
.separator {
  border:     none;
  border-top: 1px solid var(--separator);
  margin:     12px 0;
}

/* === PAPER HEADER === */
.paper-header {
  position: relative;
  margin: 10px 0 18px;
}
.paper-title-art {
  font-family: inherit;
  font-size:   14px;
  line-height: 1.16;
  white-space: pre;
  overflow-x:  auto;
  margin:      0 0 6px;
  color:       var(--text);
  width:       fit-content;
}
.paper-subtitle-art {
  font-family: inherit;
  font-size:   13px;
  line-height: 1.2;
  white-space: pre;
  overflow-x:  auto;
  margin:      0 0 8px;
  color:       var(--text);
  width:       fit-content;
}
.paper-title-sr,
.paper-header > h1 {
  position: absolute;
  width:    1px;
  height:   1px;
  padding:  0;
  margin:   -1px;
  overflow: hidden;
  clip:     rect(0, 0, 0, 0);
  white-space: nowrap;
  border:   0;
}
.paper-meta {
  display:       flex;
  flex-direction: column;
  gap:           2px;
  font-size:     13px;
  color:         var(--text);
  line-height:   1.45;
  font-weight:   700;
  margin-bottom: 0;
}
.paper-meta-row {
  display:         flex;
  align-items:     baseline;
  justify-content: flex-start;
  gap:             14px;
  flex-wrap:       wrap;
}
.paper-meta-by,
.paper-meta-tags,
.paper-meta-line {
  color:       var(--text);
  font-weight: 700;
}
.paper-meta-line {
  display: block;
}
.paper-meta a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* === BREADCRUMB === */
#breadcrumb {
  font-size:      12px;
  color:          var(--text);
  margin-bottom:  10px;
  letter-spacing: 0.04em;
  font-weight:    700;
}
#breadcrumb:empty  { display: none; }
#breadcrumb a      { color: inherit; text-decoration: underline; }
#breadcrumb a:hover { color: inherit; }

/* === MAIN COLUMN === */
#main-col { padding-bottom: 24px; flex: 1; }

/* === SECTION HEADINGS === */
.section-block   { margin-bottom: 10px; }
.section-heading { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text); }
.section-prefix  { color: var(--text); margin-right: 4px; }

/* === POST HEADER === */
.post-header { margin-bottom: 6px; }
.post-title  { font-size: 14px; font-weight: 700; letter-spacing: 0.08em; color: var(--text); text-transform: uppercase; }

/* === TOPIC LIST === */
.topic-list          { display: flex; flex-wrap: wrap; gap: 10px; padding: 8px 0; }
.topic-link          { color: var(--text); text-decoration: underline; font-size: 13px; letter-spacing: 0.06em; }
.topic-link:hover    { color: var(--text); text-decoration: underline; }
.topic-link--blocked { opacity: 1; cursor: default; }

/* === POST TABLE === */
.post-table-wrap { overflow-x: auto; }

.post-table {
  width:           100%;
  border-collapse: collapse;
  font-size:       13px;
}
.post-table th {
  background:     transparent;
  color:          var(--text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size:      11px;
  padding:        6px 8px;
  border:         none;
  border-bottom:  1px solid var(--border);
  text-align:     left;
  font-weight:    700;
}
.post-table td {
  padding:        6px 8px;
  border:         none;
  border-bottom:  1px solid var(--border);
  background:     transparent;
  color:          var(--text);
  vertical-align: top;
}
.post-table tbody tr:nth-child(even) td { background: transparent; }
.post-table tr.post-row                 { cursor: pointer; }
.post-table tr:hover td                 { background: transparent !important; }
.post-row--locked                       { cursor: default; opacity: 1; }
.post-row--locked:hover td              { background: transparent !important; }
.locked-title                           { color: var(--text); }
.pinned-mark                            { color: var(--text); font-size: 11px; margin-right: 3px; }

.col-id-cell   { width: 70px;  color: var(--text); font-size: 12px; }
.col-date-cell { width: 110px; color: var(--text); font-size: 12px; white-space: nowrap; }
.col-tags-cell { width: 120px; }

.post-table .col-title-cell a       { color: var(--text); text-decoration: none; }
.post-table .col-title-cell a:hover { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

.row-tag {
  display:        inline-block;
  font-size:      11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding:        1px 5px;
  background:     transparent;
  color:          var(--text);
  border:         1px solid var(--border);
  white-space:    nowrap;
}

/* === POST META BAR === */
.post-meta-bar {
  display:    flex;
  flex-wrap:  wrap;
  gap:        6px;
  align-items: center;
  padding:    4px 0;
  font-size:  12px;
}
.meta-chip          { display: inline-block; font-size: 12px; letter-spacing: 0.06em; padding: 1px 6px; text-transform: uppercase; white-space: nowrap; }
.meta-chip--date    { color: var(--text); }
.meta-chip--tag     { color: var(--text); border: 1px solid var(--border); }

/* === PANEL (modals, 404) === */
.panel {
  border:        1px solid var(--border);
  background:    var(--surface);
  margin-bottom: 20px;
}
.panel-header {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  background:      transparent;
  color:           var(--text);
  font-size:       12px;
  font-weight:     700;
  letter-spacing:  0.1em;
  text-transform:  uppercase;
  padding:         3px 8px;
  user-select:     none;
}
.panel-controls { color: var(--text); font-size: 12px; }
.panel-body     { padding: 14px 16px; }

.window-controls { display: flex; gap: 2px; }
.wbtn {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  width:           16px;
  height:          14px;
  font-size:       11px;
  font-weight:     700;
  color:           var(--text);
  background:      transparent;
  border:          1px solid var(--border);
  cursor:          default;
  line-height:     1;
}

/* === CODE === */
.content code {
  background:  transparent;
  color:       var(--text);
  padding:     1px 5px;
  font-family: inherit;
  font-size:   13px;
  border:      1px solid var(--border);
  font-weight: 700;
}

.pre-wrap {
  position: relative;
  margin:   10px 0;
  border:   1px solid #6d2d2d;
  background: #111111;
}
.pre-header {
  background:     #1a1a1a;
  color:          #f0d6d6;
  font-size:      12px;
  font-weight:    700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding:        3px 8px;
  border-bottom:  1px solid #6d2d2d;
}
.pre-wrap pre {
  position:   relative;
  margin:     0;
  border:     none;
  background: #101010;
  padding:    12px;
  overflow-x: auto;
}
.pre-wrap pre code {
  background: transparent;
  color:      #efefef;
  padding:    0;
  border:     none;
  font-family: inherit;
  font-size:  13px;
  font-weight: 700;
}
.copy-btn {
  position:       absolute;
  bottom:         6px;
  right:          6px;
  background:     transparent;
  border:         1px solid var(--border);
  color:          var(--text);
  font-family:    inherit;
  font-size:      10px;
  letter-spacing: 0.08em;
  padding:        2px 7px;
  cursor:         pointer;
  opacity:        0;
  transition:     opacity 0.2s, color 0.2s;
}
.pre-wrap:hover .copy-btn { opacity: 1; }
.copy-btn:hover            { color: var(--text); }
.copy-btn.copied           { color: var(--accent); }

/* === CONTENT === */
.content p          { margin-bottom: 10px; }
.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6 {
  font-size:      13px;
  font-weight:    700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin:         18px 0 8px;
  padding:        0;
  border:         none;
  background:     none;
  color:          var(--text);
}
.content a          { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.content a:hover    { color: inherit; }
.content ul         { list-style: none; margin: 4px 0 12px; padding-left: 16px; }
.content ul li      { margin-bottom: 4px; }
.content ul li::before       { content: '- '; color: var(--text); }
.content ul ul li::before    { content: '  - '; color: var(--text); }
.content ul ul ul li::before { content: '    - '; color: var(--text); }
.content ol               { list-style: decimal; margin: 4px 0 12px; padding-left: 20px; }
.content ol li            { margin-bottom: 4px; }
.content blockquote {
  border:      none;
  padding:     0;
  margin:      12px 0;
  color:       var(--text);
  background:  transparent;
  font-style:  normal;
}
.content blockquote p:last-child { margin-bottom: 0; }

/* === TABLES === */
.content table,
.post-table {
  width:           100%;
  border-collapse: collapse;
  font-size:       13px;
  margin:          10px 0 14px;
}
.content table th,
.post-table th {
  background:     transparent;
  color:          var(--text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size:      11px;
  padding:        6px 8px;
  border:         none;
  border-bottom:  1px solid var(--border);
  text-align:     left;
  font-weight:    700;
}
.content table td,
.post-table td {
  padding:        6px 8px;
  border:         none;
  border-bottom:  1px solid var(--border);
  background:     transparent;
  color:          var(--text);
  vertical-align: top;
}
.content table tbody tr:nth-child(even) td,
.post-table tbody tr:nth-child(even) td {
  background: transparent;
}
.post-table tr:hover td {
  background: transparent !important;
}

/* === ASCII HEADING / TABLE / QUOTE RENDERERS === */
.ascii-heading {
  margin: 14px 0 10px;
}
.ascii-heading--h1 {
  margin: 18px 0 12px;
}
.ascii-heading--h2 {
  margin: 12px 0 10px;
}
.ascii-heading--h3 {
  margin: 14px 0 10px;
}
.ascii-heading-art {
  font-family: inherit;
  font-size:   14px;
  line-height: 1.14;
  color:       var(--text);
  white-space: pre;
  overflow-x:  hidden;
  margin:      0;
  background:  transparent;
  border:      none;
  font-weight: 700;
}
.ascii-heading-art--h3 {
  font-size:   13px;
  line-height: 1.2;
}
.ascii-heading-art--h4,
.ascii-heading-art--h5,
.ascii-heading-art--h6 {
  font-size:   12px;
  line-height: 1.2;
}
.paper-toc {
  margin: 14px 0 18px;
}
.paper-toc-art {
  font-family: inherit;
  font-size:   13px;
  line-height: 1.2;
  color:       var(--text);
  white-space: pre;
  overflow-x:  hidden;
  margin:      0 0 8px;
  background:  transparent;
  border:      none;
  font-weight: 700;
}
.paper-toc-list {
  list-style: none;
  padding:    0;
  margin:     0;
}
.paper-toc-item {
  margin: 0 0 3px;
}
.paper-toc-item a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.paper-links-footer {
  margin: 18px 0 4px;
}
.paper-links-footer__head {
  color:          var(--text);
  font-size:      12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom:  4px;
}
.paper-links-footer__body {
  color:       var(--text);
  font-size:   13px;
  line-height: 1.45;
  font-weight: 700;
}
.ascii-table-wrap {
  margin: 12px 0 16px;
  overflow-x: visible;
}
.ascii-table {
  margin:      0;
  font-family: inherit;
  font-size:   11px;
  line-height: 1.42;
  color:       var(--text);
  white-space: pre;
  background:  transparent;
  border:      none;
  font-weight: 700;
  overflow-x:  hidden;
}
.archive-tree-wrap {
  margin: 12px 0 16px;
  overflow-x: auto;
}
.archive-tree {
  margin:      0;
  font-family: inherit;
  font-size:   14px;
  line-height: 1.55;
  color:       var(--text);
  background:  transparent;
  border:      none;
  font-weight: 700;
}
.archive-root {
  margin-bottom: 10px;
}
.archive-folder {
  margin: 0 0 10px;
  padding-left: 2ch;
  border-left: 1px solid var(--border);
}
.archive-folder > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: baseline;
  gap: 1ch;
  outline: none;
}
.archive-folder > summary::-webkit-details-marker {
  display: none;
}
.archive-folder__icon {
  display: inline-block;
  width: 4ch;
  flex: 0 0 4ch;
}
.archive-folder__icon::before {
  content: '[+]';
}
.archive-folder[open] > summary .archive-folder__icon::before {
  content: '[-]';
}
.archive-folder__name {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.archive-folder__children {
  margin-top: 6px;
  padding-left: 3ch;
}
.archive-file {
  margin: 0 0 8px;
}
.archive-file__head {
  display: flex;
  align-items: baseline;
  gap: 1ch;
}
.archive-file__icon {
  display: inline-block;
  width: 4ch;
  flex: 0 0 4ch;
}
.archive-file__name {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.archive-file__name--locked {
  color: var(--locked-text);
  text-decoration: none;
  pointer-events: none;
  cursor: default;
}
.archive-file__name--locked:hover {
  text-decoration: none;
}
.archive-file__meta {
  margin-left: 5ch;
  margin-top: 2px;
  font-size: 13px;
}

.archive-status {
  color: var(--brand-accent);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* === NOTE / WARN BLOCKS === */
aside[data-type="note"],
aside[data-type="warn"],
blockquote[data-type="quote"] {
  margin: 16px 0;
}
.ascii-callout {
  margin:      0;
  white-space: pre;
  overflow-x:  hidden;
  font-family: inherit;
  font-size:   14px;
  line-height: 1.42;
  color:       var(--text);
  background:  transparent;
  border:      none;
  font-weight: 700;
}
aside[data-type="note"] .ascii-callout { color: var(--text); }
aside[data-type="warn"] .ascii-callout { color: var(--text); }
blockquote[data-type="quote"] .ascii-callout { color: var(--text); }
.paper-callout-label,
.ascii-callout__label {
  font-weight: 700;
}
.paper-callout-label--note,
.ascii-callout__label--note {
  color: var(--note);
}
.paper-callout-label--warn,
.ascii-callout__label--warn {
  color: var(--warn);
}
.paper-inline-code {
  color: var(--brand-accent);
  background: transparent;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 400;
}

.paper-inline-code--red {
  color: var(--brand-accent);
}
.paper-code-label,
.ascii-code-label {
  font-weight: 700;
}
.paper-code-label--c,
.ascii-code-label--c {
  color: #8cc8ff;
}
.paper-code-label--cpp,
.ascii-code-label--cpp {
  color: #b6d8ff;
}
.paper-code-label--asm,
.ascii-code-label--asm {
  color: #8ad8ff;
}
.paper-code-label--bash,
.ascii-code-label--bash {
  color: #8fd08b;
}
.paper-code-label--python,
.ascii-code-label--python {
  color: #d9c34d;
}
.paper-code-label--js,
.ascii-code-label--js {
  color: #d9c34d;
}
.paper-code-label--ts,
.ascii-code-label--ts {
  color: #5aa0ff;
}
.paper-code-label--html,
.ascii-code-label--html {
  color: #ff8d67;
}
.paper-code-label--css,
.ascii-code-label--css {
  color: #9c82ff;
}
.paper-code-label--json,
.ascii-code-label--json {
  color: #d9c34d;
}
.paper-code-label--yaml,
.ascii-code-label--yaml {
  color: #ffbe6a;
}
.paper-code-label--xml,
.ascii-code-label--xml {
  color: #ffb86c;
}
.paper-code-label--sql,
.ascii-code-label--sql {
  color: #c62a17;
}
.paper-code-label--go,
.ascii-code-label--go {
  color: #86d9ff;
}
.paper-code-label--rust,
.ascii-code-label--rust {
  color: #ff7a00;
}
.paper-code-label--php,
.ascii-code-label--php {
  color: #7aa7ff;
}
.paper-code-label--java,
.ascii-code-label--java {
  color: #d14b00;
}
.paper-code-label--perl,
.ascii-code-label--perl {
  color: #7aa7ff;
}
.paper-code-label--ruby,
.ascii-code-label--ruby {
  color: #c62a17;
}
.paper-code-label--code,
.paper-code-label--text,
.ascii-code-label--code,
.ascii-code-label--text {
  color: var(--text-muted);
}
.sr-only {
  position: absolute;
  width:    1px;
  height:   1px;
  padding:  0;
  margin:   -1px;
  overflow: hidden;
  clip:     rect(0, 0, 0, 0);
  white-space: nowrap;
  border:   0;
}

/* === POST FRONT MATTER === */
.content .post-fm-by,
.content .post-fm-venue,
.content .post-fm-links {
  font-size:   13px;
  color:       var(--text);
  margin:      2px 0;
  line-height: 1.5;
  font-weight: 700;
}
.content .post-fm-links a {
  color:           inherit;
  text-decoration: underline;
  margin-right:    4px;
}
.content .post-fm-links a:hover { color: inherit; }

.content hr     { border: none; border-top: 1px dashed var(--border); margin: 22px 0; }
.content strong { color: var(--text); font-weight: 700; }
.content mark   { background: transparent; color: var(--text); padding: 0 3px; }
.content kbd {
  display:        inline-block;
  background:     transparent;
  color:          var(--text);
  font-family:    inherit;
  font-size:      12px;
  padding:        1px 5px;
  border:         1px solid var(--border);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space:    nowrap;
  font-weight:    700;
}
.content abbr[title] { text-decoration: underline dotted var(--text); text-underline-offset: 3px; cursor: help; }
.content sup, .content sub { font-size: 11px; color: var(--text); }
.content :target { scroll-margin-top: 20px; }
.content img     { max-width: 100%; height: auto; display: block; }

/* === PAPER MODE === */
.paper-document {
  margin:      0;
  font-family: inherit;
  font-size:   13px;
  line-height: 1.0;
  font-weight: 400;
  color:       var(--text);
  background:  transparent;
  white-space: pre;
  overflow-x:  auto;
  overflow-y:  visible;
  border:      none;
  padding:     0;
  tab-size:    2;
  -moz-tab-size: 2;
  box-shadow: none;
}

body.paper-mode .paper-document {
  max-width: none;
}

body.paper-mode .content {
  width: 100%;
}

.paper-top-nav {
  font-family: inherit;
  font-size:   13px;
  line-height: 1;
  white-space: pre;
  overflow-x:  auto;
  margin:      0 0 12px;
  color:       var(--text);
}
.paper-top-nav__link {
  color:              var(--brand-accent);
  text-decoration:    underline;
  text-decoration-color: var(--brand-accent);
  text-underline-offset: 2px;
  display:            inline-block;
  cursor:             pointer;
}
.paper-top-nav__link:hover {
  color:              var(--brand-accent);
  text-decoration:    underline;
  text-decoration-color: var(--brand-accent);
}

/* === WIDGET LIST (used in about modal body) === */
.widget-list           { list-style: none; padding: 0; }
.widget-list li        { padding: 3px 0; font-size: 13px; }
.widget-list .item-date { color: var(--text); font-size: 12px; margin-right: 6px; }
.widget-list a         { color: var(--text); text-decoration: none; }
.widget-list a:hover   { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.locked-tag            { font-size: 11px; color: var(--text); }
.omemo-link            { text-decoration: underline !important; text-decoration-style: dotted !important; text-underline-offset: 3px; }

/* === FOOTER === */
#site-footer { padding: 8px 0 16px; margin-top: auto; }

.footer-separator {
  border-top:    1px solid var(--separator);
  margin-bottom: 12px;
}
.footer-contact {
  font-size:    12px;
  color:        var(--footer);
  margin-bottom: 10px;
  display:      flex;
  flex-wrap:    wrap;
  gap:          6px;
  align-items:  center;
  font-weight:  700;
}
.footer-sep  { color: var(--footer); }
.footer-link { color: var(--footer); text-decoration: underline; text-underline-offset: 2px; }
.footer-link:hover { color: var(--footer); }

.footer-gifs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; justify-content: flex-start; }
.footer-gifs img {
  width:           88px;
  height:          31px;
  image-rendering: pixelated;
  opacity:         1;
  filter:          none;
}
.footer-gifs a img        { opacity: 1; filter: none; transition: none; }
.footer-gifs a:hover img  { opacity: 1; }

/* === MODALS === */
#about-modal,
#omemo-modal {
  display:         none;
  position:        fixed;
  inset:           0;
  background:      rgba(0,0,0,0.88);
  z-index:         1000;
  align-items:     center;
  justify-content: center;
}
#about-modal.active,
#omemo-modal.active { display: flex; }

.about-modal-inner,
.pgp-modal-inner {
  max-width:  560px;
  width:      90%;
  max-height: 80vh;
  overflow-y: auto;
}

.omemo-keys {
  font-family: inherit;
  font-size:   13px;
  line-height: 1.8;
  color:       var(--text);
  background:  transparent;
  white-space: pre-wrap;
  word-break:  break-all;
}

/* === HIGHLIGHT.JS — code theme === */
.hljs,
.hljs * {
  background: transparent;
  font-style: inherit !important;
  font-weight: inherit !important;
}
.hljs-comment,
.hljs-quote {
  color: #8b8b8b !important;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-name {
  color: #d84b4b !important;
}
.hljs-string,
.hljs-regexp,
.hljs-number,
.hljs-built_in,
.hljs-title,
.hljs-symbol,
.hljs-bullet {
  color: #efefef !important;
}
.hljs-attr,
.hljs-attribute,
.hljs-meta,
.hljs-link {
  color: #b7b7b7 !important;
}

/* === LIGHTBOX === */
#lightbox {
  display:         none;
  position:        fixed;
  inset:           0;
  background:      rgba(0,0,0,0.92);
  z-index:         2000;
  align-items:     center;
  justify-content: center;
  cursor:          zoom-out;
}
#lightbox.active { display: flex; }
#lightbox-img    { max-width: 90vw; max-height: 90vh; object-fit: contain; }

/* === RESPONSIVE === */
@media (max-width: 640px) {
  #wrapper { padding: 0 10px 20px; }

  .home-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .home-feed {
    padding: 18px 24px 14px;
  }

  .home-feed__list {
    gap: 0;
  }

  .home-feed__entry {
    display:       flex;
    flex-wrap:     wrap;
    align-items:   baseline;
    column-gap:    8px;
    row-gap:       4px;
    padding:       10px 0;
    border-bottom: 1px dashed var(--separator);
  }

  .home-feed__entry:last-child {
    border-bottom: none;
  }

  .home-feed__dots {
    display: none;
  }

  .home-feed__title-cell {
    width:       auto;
    overflow:    visible;
    white-space: normal;
    flex:        1 1 auto;
  }

  .home-feed__title {
    overflow:      visible;
    text-overflow: clip;
    white-space:   normal;
  }

  .home-feed__meta {
    flex:           1 0 100%;
    white-space:    normal;
    line-height:    1.35;
  }

  .home-rail {
    position: static;
  }

  .home-manifesto--static {
    display: none;
  }

  .home-manifesto--collapsible {
    display: block;
  }

  .footer-contact {
    flex-direction: column;
    align-items:    flex-start;
    gap:            8px;
  }

  .footer-sep {
    display: none;
  }

  .ascii-title {
    max-width:  100%;
    overflow-x: auto;
  }

  .home-feed-item__title {
    font-size: 16px;
  }

  /* troca ascii table pela tabela semântica em telas pequenas */
  .ascii-table-wrap .ascii-table { display: none; }
  .ascii-table-wrap table.sr-only {
    position:       static;
    width:          100%;
    height:         auto;
    padding:        0;
    margin:         0;
    overflow:       visible;
    clip:           auto;
    white-space:    normal;
    display:        table;
    border-collapse: collapse;
    font-size:      12px;
  }
  .ascii-table-wrap table.sr-only th,
  .ascii-table-wrap table.sr-only td {
    padding:       4px 6px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    font-size:     12px;
  }
  .ascii-table-wrap table.sr-only th {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size:      11px;
  }

  /* callouts: permite quebra de linha */
  .ascii-callout { white-space: pre-wrap; word-break: break-word; }

  /* code blocks */
  .pre-wrap pre { padding: 8px; font-size: 12px; }
}
