/* Visual identity of buysoft.com.br: Public Sans for headings, Inter for text, the dark-to-blue
   header gradient, grey title band, dark footer. */

@font-face {
  font-family: "Public Sans";
  src: url("/static/fonts/public-sans.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #0a0d12;
  --brand: #00b4fb;
  --link: #0072ad;
  --title: #252b37;
  --heading: #181a1f;
  --text: #4b5563;
  --muted: #535862;
  --subtle: #717680;
  --border: #e9eaeb;
  --border-strong: #d5d7da;
  --band: #f5f5f5;
  --white: #ffffff;
  --mark: #fff3c4;
  --success-bg: #ecfdf3;
  --success-border: #abefc6;
  --success-text: #067647;
  --warning-bg: #fffaeb;
  --warning-border: #fedf89;
  --warning-text: #93370d;
  --font-heading: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --page: 960px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: var(--link);
  text-underline-offset: 2px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--heading);
  font-weight: 600;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.muted {
  color: var(--subtle);
}

/* Header */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 72px;
  background: linear-gradient(to right, var(--ink) 20%, var(--brand) 100%);
}

.topbar-inner {
  max-width: 1440px;
  height: 100%;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  width: 100px;
  height: auto;
  display: block;
}

.brand span {
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font-heading);
  font-size: 15px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.topbar nav a {
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
}

.topbar nav a:hover {
  text-decoration: underline;
  text-decoration-color: var(--brand);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.topbar nav a.external::after {
  content: " ↗";
}

/* Title band (home, history) */

.hero {
  background: var(--band);
  text-align: center;
  padding: 40px 16px;
}

.hero .eyebrow {
  margin: 0 0 12px;
  color: var(--link);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: var(--page);
  margin: 0 auto 16px;
  color: var(--title);
  font-size: 30px;
  line-height: 1.2;
}

.hero .subtitle {
  max-width: 720px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 16px;
}

.search {
  display: flex;
  max-width: 600px;
  margin: 32px auto 0;
  padding: 4px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--white);
}

.search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 180, 251, 0.2);
}

.search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  padding: 0 16px;
  font: inherit;
  color: var(--heading);
  outline: none;
}

.search button {
  height: 44px;
  padding: 0 20px;
  border: none;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.search button:hover {
  background: var(--title);
}

/* Archived notice */

.notice {
  background: var(--warning-bg);
  border-bottom: 1px solid var(--warning-border);
  color: var(--warning-text);
  text-align: center;
  padding: 14px 16px;
}

.notice p {
  margin: 0;
}

.notice a {
  color: inherit;
  font-weight: 600;
}

/* Content */

.content {
  max-width: calc(var(--page) + 48px);
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.center {
  text-align: center;
}

.empty {
  padding: 40px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border-strong);
  border-radius: 16px;
}

.button {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-text);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--title);
  border-color: var(--title);
}

/* Home: list of terms */

.list-note {
  color: var(--muted);
  margin: 0 0 16px;
}

.terms {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
}

.term {
  display: flex;
  align-items: center;
  gap: 16px 24px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.term:last-child {
  border-bottom: none;
}

.term-main {
  flex: 1;
  min-width: 0;
}

.term-title {
  color: var(--heading);
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
}

.term-title:hover {
  color: var(--link);
  text-decoration: underline;
}

.term-date {
  color: var(--subtle);
  font-size: 14px;
  white-space: nowrap;
}

.term-pdf {
  font-size: 14px;
  font-weight: 600;
}

.snippet {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
}

mark {
  background: var(--mark);
  color: inherit;
  padding: 0 2px;
  border-radius: 3px;
}

/* Term page: compact header so the text comes first */

.doc-head {
  background: var(--band);
  border-bottom: 1px solid var(--border);
}

.doc-head-inner {
  max-width: calc(var(--page) + 48px);
  margin: 0 auto;
  padding: 24px 24px 20px;
}

.back {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.back:hover {
  color: var(--link);
  text-decoration: underline;
}

.doc-head h1 {
  margin: 0 0 16px;
  color: var(--title);
  font-size: 28px;
  line-height: 1.2;
}

.doc-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.doc-date {
  color: var(--muted);
  font-size: 14px;
}

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--white);
  color: var(--title);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.chip:hover {
  border-color: var(--ink);
}

.chip[hidden] {
  display: none;
}

.document {
  font-size: 18px;
  line-height: 1.625;
  overflow-wrap: break-word;
}

.document > :first-child {
  margin-top: 0;
}

.document p {
  margin: 0 0 16px;
}

.document h1 {
  font-size: 26px;
  line-height: 1.25;
  margin: 48px 0 16px;
}

.document h2 {
  font-size: 20px;
  line-height: 1.4;
  margin: 40px 0 8px;
}

.document h3,
.document h4 {
  font-size: 18px;
  margin: 32px 0 8px;
}

.document strong,
.document b {
  color: var(--heading);
}

.document ul,
.document ol {
  padding-left: 24px;
  margin: 0 0 16px;
}

.document img {
  max-width: 100%;
  height: auto;
}

.document table {
  display: block;
  overflow-x: auto;
  margin-bottom: 16px;
}

.document td,
.document th {
  border: 1px solid var(--border);
}

/* After the text: history and authenticity, closed by default */

.extras {
  display: grid;
  gap: 12px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.fold {
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  font-size: 15px;
}

.fold summary {
  padding: 16px 20px;
  color: var(--heading);
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
}

.fold[open] summary {
  border-bottom: 1px solid var(--border);
}

.fold > :not(summary) {
  margin-left: 20px;
  margin-right: 20px;
}

.fold-link {
  margin-bottom: 20px;
}

.versions {
  list-style: none;
  margin-top: 8px;
  padding: 0;
}

.versions li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.versions li[aria-current] > a:first-child {
  color: var(--heading);
  font-weight: 600;
  text-decoration: none;
}

.versions-pdf {
  margin-left: auto;
  font-weight: 600;
}

.hashes div {
  margin-bottom: 12px;
}

dt {
  color: var(--subtle);
  font-size: 14px;
}

dd {
  margin: 2px 0 0;
  color: var(--heading);
  overflow-wrap: anywhere;
}

/* History */

.lookup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  background: var(--band);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

.lookup label {
  color: var(--heading);
  font-weight: 600;
}

.lookup input {
  font: inherit;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--white);
  color: var(--heading);
}

.result {
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--success-border);
  background: var(--success-bg);
  color: var(--success-text);
  margin: 0 0 24px;
}

.result a {
  color: inherit;
  font-weight: 600;
}

.result-warning {
  border-color: var(--warning-border);
  background: var(--warning-bg);
  color: var(--warning-text);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
}

th,
td {
  text-align: left;
  vertical-align: middle;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

tbody tr:last-child td {
  border-bottom: none;
}

th {
  background: #fafafa;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

td {
  color: var(--heading);
}

.note {
  color: var(--subtle);
  font-size: 14px;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  overflow-wrap: anywhere;
}

code.hash {
  display: inline-block;
  max-width: 16ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  color: var(--muted);
}

.tag {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--band);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.tag-current {
  border-color: var(--success-border);
  background: var(--success-bg);
  color: var(--success-text);
}

td .tag {
  margin-left: 8px;
}

/* Footer */

.footer {
  background: var(--ink);
  color: var(--white);
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 48px 24px 32px;
  display: grid;
  gap: 32px;
}

.footer-brand img {
  width: 120px;
  height: auto;
}

.footer-brand p {
  max-width: 360px;
  margin: 16px 0 0;
  color: #a4a7ae;
  font-size: 15px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
}

.footer-title {
  margin: 0 0 4px;
  font-family: var(--font-heading);
  font-weight: 600;
}

.footer-links a,
.footer-links span {
  color: #d5d7da;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer-bottom {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 24px 28px;
  border-top: 1px solid #252b37;
  color: var(--subtle);
  font-size: 14px;
}

/* Larger screens: the proportions of buysoft.com.br */

@media (min-width: 768px) {
  .topbar-inner {
    padding: 0 48px;
  }

  .topbar {
    background: linear-gradient(to right, var(--ink) 66%, var(--brand) 100%);
  }

  .brand img {
    width: 140px;
  }

  .hero {
    padding: 80px 24px;
  }

  .hero h1 {
    font-size: 48px;
  }

  .hero .subtitle {
    font-size: 20px;
    line-height: 1.4;
  }

  .doc-head-inner {
    padding: 32px 24px 24px;
  }

  .doc-head h1 {
    font-size: 36px;
  }

  .content {
    padding-top: 48px;
  }

  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr;
    padding: 64px 48px 40px;
  }

  .footer-bottom {
    padding: 24px 48px 32px;
  }
}

@media (max-width: 600px) {
  .topbar nav {
    gap: 16px;
  }

  .topbar nav a {
    font-size: 15px;
  }

  .topbar nav a.external,
  .brand span {
    display: none;
  }

  .content {
    padding: 32px 16px 56px;
  }

  .doc-head-inner {
    padding: 20px 16px 16px;
  }

  .term {
    flex-wrap: wrap;
    padding: 16px;
  }

  .term-main {
    flex-basis: 100%;
  }

  .document {
    font-size: 17px;
  }
}

@media print {
  .topbar,
  .notice a,
  .back,
  .doc-actions,
  .extras,
  .footer {
    display: none;
  }

  .doc-head {
    background: none;
    border: none;
  }

  .doc-head-inner,
  .content {
    max-width: none;
    padding: 0;
  }

  .doc-head h1 {
    font-size: 20pt;
    margin: 0 0 4px;
  }

  .doc-bar {
    margin-bottom: 24px;
  }

  body,
  .document {
    font-size: 11pt;
    color: #000;
  }

  a {
    color: inherit;
  }
}
