/* Tema partilhado por directory, links e páginas editoriais.
 *
 * Inspirado nos temas de Tumblr do egg.design (cornetespoir) — WordArt Theme e
 * o vocabulário de UI antiga dos outros. Código próprio; a dívida é de ideia.
 *
 * Bordas duras (outset/inset), cores chapadas, tipografia da época. Sem blur,
 * sem cantos redondos, sem sombras difusas. */

:root {
  color-scheme: light;
  --desk: #2f6d6f;
  --face: #d4d0c8;
  --face-dark: #a8a49c;
  --face-light: #ffffff;
  --shadow: #4a4640;
  --ink: #1b1b1b;
  --dim: #5a5750;
  --title-a: #00147a;
  --title-b: #2a72d4;
  --link: #0000c8;
  --link-visited: #6a2a9a;
  --hot: #d40000;
  --paper: #f4f2ee;
}

* { box-sizing: border-box; }

/* Scrollbar estilo Windows 9x/2000 — mantém a coerência entre os três hosts. */
::-webkit-scrollbar { width: 16px; height: 16px; background: var(--face); }
::-webkit-scrollbar-track { background: var(--face); border-left: 1px solid var(--face-dark); }
::-webkit-scrollbar-thumb {
  background: var(--face);
  border: 2px outset var(--face-light);
  border-right-color: var(--shadow);
  border-bottom-color: var(--shadow);
}
::-webkit-scrollbar-thumb:active { border-style: inset; }
::-webkit-scrollbar-button {
  background: var(--face);
  border: 2px outset var(--face-light);
  border-right-color: var(--shadow);
  border-bottom-color: var(--shadow);
}
::-webkit-scrollbar-button:active { border-style: inset; }
::-webkit-scrollbar-corner { background: var(--face); }

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--desk);
}

::selection { color: #fff; background: var(--title-a); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Verdana, Geneva, Tahoma, "DejaVu Sans", sans-serif;
  font-size: 12px;
  line-height: 1.5;
  background:
    /* grade sutil de 24px, lembrando o grid de arranque do Windows 9x */
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 24px 24px,
    repeating-linear-gradient(45deg, rgba(255,255,255,.03) 0 2px, transparent 2px 6px),
    var(--desk);
}

a { color: var(--link); text-decoration: underline; }
a:visited { color: var(--link-visited); }
a:hover { color: var(--hot); }

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px dotted var(--ink);
  outline-offset: 1px;
}

h1, h2, h3 {
  color: var(--ink);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  line-height: 1.2;
  text-shadow: none;
}

h1 {
  margin: 0 0 6px;
  color: var(--title-a);
  font-size: 22px;
  letter-spacing: 0;
}

h2 { margin: 1.3em 0 .4em; font-size: 14px; }
h3 { font-size: 12px; }

.wrap {
  width: min(1120px, calc(100% - 24px));
  margin: 16px auto 28px;
}

.wrap::before { content: none; }

.small { color: var(--dim); font-size: 11px; }

hr {
  height: 0;
  margin: 10px 0;
  border: 0;
  border-top: 1px solid var(--face-dark);
  border-bottom: 1px solid var(--face-light);
  background: none;
}

/* ---------- navegação da rede ---------- */

.network-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  margin-bottom: 12px;
  padding: 4px 6px;
  font-size: 11px;
  border: 2px outset var(--face-light);
  border-right-color: var(--shadow);
  border-bottom-color: var(--shadow);
  background: var(--face);
}

.network-nav-label {
  color: var(--dim);
  font-family: "MS Sans Serif", "Trebuchet MS", sans-serif;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.network-nav a {
  padding: 1px 5px;
  text-decoration: none;
  border: 1px solid transparent;
}

.network-nav a:hover { color: #fff; border: 1px outset var(--face-light); background: var(--title-a); }

.network-nav a[aria-current="page"] {
  color: #fff;
  border: 1px inset var(--face-dark);
  background: var(--title-a);
}

/* ---------- janela principal ---------- */

.box {
  width: 100%;
  overflow: hidden;
  border: 2px outset var(--face-light);
  border-right-color: var(--shadow);
  border-bottom-color: var(--shadow);
  border-radius: 0;
  background: var(--face);
  box-shadow: none;
  outline: 1px solid var(--face-dark);
  outline-offset: 1px;
}

.box > tbody > tr > td { padding: 10px 12px; }

.box > tbody > tr > td:first-child[width] {
  color: var(--ink);
  background: var(--face);
  border-right: 1px solid var(--face-dark);
}

.box > tbody > tr > td:first-child[width] a:not(.brand) { color: var(--link); font-weight: 400; }
.box > tbody > tr > td:first-child[width] .small { color: var(--dim); }

.box > tbody > tr > td:first-child[width] > a:not(.brand) {
  display: block;
  margin: 1px 0;
  padding: 2px 6px;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 0;
  background: none;
  box-shadow: none;
  text-shadow: none;
}

.box > tbody > tr > td:first-child[width] > a:not(.brand):hover {
  color: #fff;
  border: 1px outset var(--face-light);
  background: var(--title-a);
}

.box > tbody > tr > td:first-child[width] > a:not(.brand)::before {
  content: "» ";
  color: var(--title-b);
}

.box > tbody > tr > td:last-child { background: var(--paper); }

/* marca em texto, com aparência de etiqueta de programa */
.brand,
.box > tbody > tr > td:first-child[width] a.brand {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 8px;
  color: #fff;
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: none;
  border: 1px outset var(--title-b);
  background: linear-gradient(90deg, var(--title-a), var(--title-b));
}

.brand:hover { color: #ffe873; }
.brand-inline { margin: 0; }

/* ---------- listas ---------- */

ul { padding: 0; list-style: none; }

main ul > li,
td > ul > li,
#list > li,
#sresults > li {
  position: relative;
  margin: 0;
  padding: 6px 0 6px 16px;
  overflow-wrap: anywhere;
  border: 0;
  border-bottom: 1px dotted var(--face-dark);
  border-radius: 0;
  background: none;
  box-shadow: none;
}

main ul > li:last-child,
td > ul > li:last-child,
#list > li:last-child,
#sresults > li:last-child { border-bottom: 0; }

main ul > li::before,
td > ul > li::before,
#list > li::before,
#sresults > li::before {
  content: "▸";
  position: absolute;
  left: 2px;
  top: 6px;
  width: auto;
  height: auto;
  color: var(--title-b);
  font-size: 11px;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

/* ---------- campos e botões ---------- */

input, textarea, select {
  max-width: 100%;
  min-height: 0;
  padding: 3px 5px;
  color: var(--ink);
  font-family: "Courier New", monospace;
  font-size: 12px;
  border: 2px inset var(--face-dark);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

button,
.aero-button {
  display: inline-block;
  min-height: 0;
  margin: 2px 3px 2px 0;
  padding: 3px 12px;
  color: var(--ink) !important;
  font-family: Verdana, Tahoma, sans-serif;
  font-size: 11px;
  text-decoration: none;
  text-shadow: none;
  cursor: pointer;
  border: 2px outset var(--face-light);
  border-right-color: var(--shadow);
  border-bottom-color: var(--shadow);
  border-radius: 0;
  background: var(--face);
  box-shadow: none;
}

button:hover, .aero-button:hover { color: var(--link) !important; background: #e2dfd8; filter: none; }
button:active, .aero-button:active { border-style: inset; transform: none; }

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 14px 0 6px;
  padding: 5px 8px;
  border: 1px inset var(--face-dark);
  border-radius: 0;
  background: var(--face);
}

code, pre { font-family: "Courier New", monospace; }

pre {
  max-width: 100%;
  padding: 8px 10px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  border: 2px inset var(--face-dark);
  border-radius: 0;
  background: #fff;
}

/* ---------- rodapé ---------- */

.footer {
  margin-top: 12px;
  padding: 8px 10px;
  text-align: left;
  color: var(--dim);
  font-size: 11px;
  border: 2px outset var(--face-light);
  border-right-color: var(--shadow);
  border-bottom-color: var(--shadow);
  border-radius: 0;
  background: var(--face);
  box-shadow: none;
}

.footer-rot-warning {
  max-width: none;
  margin: 0 0 6px;
  padding: 0;
  color: var(--dim);
  font-size: 11px;
  text-align: left;
  border: 0;
  background: none;
  box-shadow: none;
}

.footer-rot-warning b { color: var(--hot); }
.footer-warning { margin-top: 3px; color: var(--dim); font-size: 11px; }
.footer-updated { color: #cfe0e0; font-size: 11px; text-align: left; text-shadow: none; }

.to-top {
  position: fixed;
  right: 10px;
  bottom: 10px;
  z-index: 55;
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: var(--ink);
  font-size: 11px;
  text-decoration: none;
  border: 2px outset var(--face-light);
  border-right-color: var(--shadow);
  border-bottom-color: var(--shadow);
  border-radius: 0;
  background: var(--face);
  box-shadow: none;
  text-shadow: none;
}

.to-top:hover { background: #e2dfd8; transform: none; filter: none; }
.to-top:active { border-style: inset; }

@media (max-width: 700px) {
  .wrap { width: calc(100% - 14px); margin: 10px auto 20px; }
  .box, .box > tbody, .box > tbody > tr, .box > tbody > tr > td {
    display: block;
    width: 100% !important;
  }
  .box > tbody > tr > td:first-child[width] {
    border-right: 0;
    border-bottom: 1px solid var(--face-dark);
  }
  h1 { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
