﻿@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..800;1,9..144,300..800&family=Newsreader:ital,opsz,wght@0,6..72,400..700;1,6..72,400..700&family=IBM+Plex+Mono:wght@400;500&display=swap");


:root {
  --paper: #F6F1E6;
  --ink: #211D17;
  --ink-soft: #6E6659;
  --accent: #B4441F;
  --line: #D8D0BF;
  --card: #FBF8F0;
  --reader-fs: 1.19rem;
}

[data-theme="sepia"] {
  --paper: #EFE4CB;
  --ink: #3B3226;
  --ink-soft: #7A6C55;
  --accent: #9C4A1E;
  --line: #DCCFAE;
  --card: #F5ECD6;
}

[data-theme="dark"] {
  --paper: #161310;
  --ink: #E4DCCB;
  --ink-soft: #948B79;
  --accent: #E2714A;
  --line: #332E26;
  --card: #1E1A15;
}


.menu {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    /*background: #e1dcdca8;
    color: #9b886ea8;*/
    background: var(--ink);
    color: var(--paper);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    letter-spacing: .16em;
    text-transform: uppercase;
    padding: 7px 9px;
    border-radius: 2px;
    transition: background .25s ease;
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Newsreader', Georgia, serif;
  transition: background-color .35s ease, color .35s ease;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: var(--paper)
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer
}

a {
  color: inherit
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px
}

.mono {
  font-family: 'IBM Plex Mono', monospace
}

/* ---------- barra de progresso ---------- */
#progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 60;
  pointer-events: none;
}

/* ---------- capa ---------- */
.home {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 26px clamp(20px, 6vw, 72px) 42px;
  overflow: hidden;
}

.home-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink);
}

.home-top .mid {
  display: none
}

@media(min-width:760px) {
  .home-top .mid {
    display: block
  }
}

.masthead-wrap {
  margin-top: clamp(44px, 9vh, 96px)
}

.masthead {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(3rem, 9.5vw, 8rem);
  line-height: .95;
  letter-spacing: -.03em;
}

.masthead em {
  font-style: italic;
  font-weight: 450;
  color: var(--accent)
}

.masthead .dot {
  color: var(--accent)
}

.orn {
  position: absolute;
  top: 4%;
  right: -2%;
  z-index: -1;
  user-select: none;
  pointer-events: none;
  font-family: 'Fraunces', serif;
  font-size: min(30vw, 26rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--line);
}

@media(max-width:860px) {
  .orn {
    display: none
  }
}

.sub {
  margin-top: 26px;
  max-width: 44ch;
  font-size: 1.22rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.sub b {
  color: var(--ink);
  font-weight: 600
}

.reader-form {
  margin-top: clamp(36px, 6vh, 60px);
  max-width: 820px
}

.reader-form label {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.field {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 12px;
  transition: border-color .25s ease;
}

.field:focus-within {
  border-color: var(--accent)
}

.field .prefix {
  font-family: 'IBM Plex Mono', monospace;
  font-size: .9rem;
  color: var(--ink-soft);
  white-space: nowrap;
  flex-shrink: 0;
}

@media(max-width:680px) {
  .field .prefix {
    display: none
  }
}

.field input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'Newsreader', serif;
  font-size: 1.35rem;
  color: var(--ink);
}

.field input::placeholder {
  color: var(--ink-soft);
  opacity: .55
}

.field .ler {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--paper);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 12px 20px;
  border-radius: 2px;
  transition: background .25s ease;
}

.field .ler:hover {
  background: var(--accent)
}

.menu:hover {
  background: var(--accent)
}

.field .ler svg {
  width: 15px;
  height: 15px;
  transition: transform .25s ease
}

.field .ler:hover svg {
  transform: translateX(4px)
}

.live-preview {
  margin-top: 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ink-soft);
  min-height: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-preview .acc {
  color: var(--accent)
}

.examples {
  margin-top: 30px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ink-soft)
}

.examples a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
  transition: color .2s ease;
}

.examples a:hover {
  color: var(--accent)
}

.examples .sep {
  margin: 0 10px;
  color: var(--line)
}

.index-line {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 14px 36px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink-soft);
}

.index-line .idx {
  color: var(--accent);
  margin-right: 8px;
  font-weight: 500
}

/* ---------- carregando ---------- */
.loading-view,
.article {
  max-width: 720px;
  margin: 0 auto;
  padding: 88px 24px 170px
}

.load-status {
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 44px;
}

.sk {
  background: var(--line);
  border-radius: 2px;
  animation: pulse 1.5s ease-in-out infinite
}

@keyframes pulse {

  0%,
  100% {
    opacity: .45
  }

  50% {
    opacity: 1
  }
}

.sk-kicker {
  width: 130px;
  height: 10px;
  margin-bottom: 22px
}

.sk-title {
  height: 38px;
  margin-bottom: 14px;
  width: 92%
}

.sk-title.short {
  width: 64%
}

.sk-meta {
  height: 10px;
  width: 220px;
  margin: 26px 0 34px
}

.sk-line {
  height: 13px;
  margin-bottom: 14px
}

/* ---------- artigo ---------- */
.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}

.kicker::before {
  content: '';
  width: 9px;
  height: 9px;
  background: var(--accent);
  flex-shrink: 0
}

.article h1 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(2rem, 5.4vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: 20px 0 22px;
  text-wrap: balance;
  font-optical-sizing: auto;
}

.meta-row {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.meta-row .dot {
  margin: 0 8px;
  color: var(--accent)
}

.article .rule {
  border: none;
  border-top: 4px double var(--ink);
  margin: 30px 0 36px
}

.article-body {
  font-size: var(--reader-fs);
  line-height: 1.78
}

.article-body p {
  margin-bottom: 1.25em;
  text-wrap: pretty
}

.article-body>p:first-of-type::first-letter {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  color: var(--accent);
  font-size: 3.2em;
  float: left;
  line-height: .82;
  padding: .05em .12em 0 0;
}

.article-body h2 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.55em;
  line-height: 1.2;
  margin: 1.9em 0 .7em;
  letter-spacing: -.01em
}

.article-body h3 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.25em;
  margin: 1.6em 0 .6em
}

.article-body h4,
.article-body h5,
.article-body h6 {
  font-family: 'Fraunces', serif;
  font-size: 1.08em;
  margin: 1.4em 0 .5em
}

.article-body a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent);
  transition: color .2s ease, text-decoration-color .2s ease;
}

.article-body a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent)
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.25em;
  padding-left: 1.5em
}

.article-body li {
  margin-bottom: .45em
}

.article-body li::marker {
  color: var(--accent)
}

.article-body blockquote {
  margin: 1.7em 0;
  padding: .2em 0 .2em 1.3em;
  border-left: 3px solid var(--accent);
  font-style: italic;
  color: color-mix(in srgb, var(--ink) 85%, var(--ink-soft));
}

.article-body blockquote p {
  margin-bottom: .6em
}

.article-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.8em auto;
  border: 1px solid var(--line)
}

.article-body figure {
  margin: 1.8em 0
}

.article-body figure img {
  margin: 0
}

.article-body figcaption {
  margin-top: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink-soft);
  line-height: 1.5;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.8em 0;
  font-size: .9em
}

.article-body th {
  font-family: 'IBM Plex Mono', monospace;
  font-size: .72em;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid var(--ink);
}

.article-body td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top
}

.article-body pre {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 18px 20px;
  overflow-x: auto;
  margin: 1.8em 0;
  border-radius: 3px;
}

.article-body pre code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: .82rem;
  line-height: 1.6;
  background: none;
  padding: 0
}

.article-body code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: .85em;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 3px
}

.article-body pre code {
  border: none
}

.article-body hr {
  border: none;
  border-top: 1px solid var(--ink);
  width: 130px;
  margin: 2.6em auto
}

.article-body sup,
.article-body sub {
  font-size: .7em
}

/* ---------- erro ---------- */
.error-view {
  max-width: 600px;
  margin: 0 auto;
  padding: 110px 24px 160px;
  text-align: center
}

.error-view .err-icon {
  color: var(--accent);
  margin-bottom: 22px
}

.error-view .err-icon svg {
  width: 44px;
  height: 44px;
  stroke-width: 1.6
}

.error-view h2 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 2rem;
  letter-spacing: -.02em;
  margin-bottom: 14px
}

.error-view .err-url {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ink-soft);
  word-break: break-all;
  margin-bottom: 18px;
}

.error-view .err-msg {
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 34px
}

.err-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap
}

.btn-solid,
.btn-ghost {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 13px 22px;
  border-radius: 2px;
  transition: all .25s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.btn-solid {
  background: var(--ink);
  color: var(--paper)
}

.btn-solid:hover {
  background: var(--accent)
}

.btn-ghost {
  border: 1px solid var(--ink)
}

.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper)
}

/* ---------- toolbar ---------- */
#toolbar {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .3);
  z-index: 50;
}

.tb-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background .2s ease;
}

.tb-btn:hover {
  background: color-mix(in srgb, var(--paper) 16%, transparent)
}

.tb-btn svg {
  width: 17px;
  height: 17px
}

.tb-btn.tb-a {
  font-family: 'Fraunces', serif;
  line-height: 1
}

.tb-btn.tb-a .a-sm {
  font-size: .72rem
}

.tb-btn.tb-a .a-lg {
  font-size: 1.08rem
}

.tb-sep {
  width: 1px;
  height: 22px;
  background: color-mix(in srgb, var(--paper) 28%, transparent);
  margin: 0 5px
}

@media(max-width:460px) {
  .tb-btn {
    width: 34px;
    height: 34px
  }

  #toolbar {
    padding: 5px 8px
  }
}

/* ---------- toast ---------- */
#toast {
  position: fixed;
  left: 50%;
  bottom: 86px;
  transform: translate(-50%, 10px);
  background: var(--ink);
  color: var(--paper);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: .04em;
  padding: 11px 18px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  z-index: 70;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .25);
  max-width: 88vw;
  text-align: center;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0)
}




/* MENU */
.btmenus {
  position: absolute;
  right: 6px;
  top: 0px;
  padding: 3px 5px 0px;
  background-color: #20294000;
  border: none;
  color: white;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  z-index: 999999;
}

.btmenus:hover {
  background-color: #1a191930;
  color: #fff8;
  /*border-radius: 11px;*/
}

.sobrenam {
  font-size: 14px;
  text-transform: uppercase;
  margin: 15px 0px;
}

.bt-listas {
  background-color: #333;
  border: none;
  color: white;
  padding: 4px 10px;
  text-align: left;
  text-decoration: none;
  display: inline-flex;
  font-size: 15px;
  margin: 6px 0px;
  cursor: pointer;
  width: 100%;
  text-transform: uppercase;
}

/*modal SAIR*/
.btn-outline-success {
  background-color: #018934;
  border: none;
  color: white;
  padding: 10px 28px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  cursor: pointer;
  text-transform: uppercase;
}

.bt-hover:hover {
  background-color: #5555;
  color: #fff8;
}
.modal {
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999999;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  /* Ocultar a janela modal */
  display: none;
  font-family: "Arial", serif;
}

.conteudo-modal {
  margin: 0 auto;
  max-width: 258px;
  background-color: #202123;
  color: #fff9;
  border-radius: 0px;
  left: 0;
  position: absolute;
  height: -webkit-fill-available;
}

.cabecalho-modal {
  /*padding: 3px 8px;*/
  display: flex;
  justify-content: space-between;
  background-color: #202123;
  color: #d1cecb;
  box-shadow: 0 0 4px rgb(0 0 0 / 14%), 0 4px 8px rgb(0 0 0 / 28%);
  height: 56px;
}

.cabecalho-modal .cabecalho-titulo-modal {
  font-weight: bold;
  margin: 15px 15px;
  text-transform: uppercase;
  font-size: 24px;
}

.cabecalho-modal .cabecalho-modal-fechar {
  padding: 16px 12px;
  cursor: pointer;
}

.corpo-modal {
  padding: 1px 8px 8px 8px;
  overflow: auto !important;
  max-height: 73%;
}

.rodape-modal {
  border-top: solid #eee 1px;
  padding: 3px;
  background-color: #202123;
  text-align: right;
  bottom: 0px;
  position: fixed;
  width: 250px;
}

.new-chat-btns {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #4d4d4f;
  border-radius: 5px;
  background: transparent;
  color: #ececf1;
  cursor: pointer;
  transition: background 0.2s;
  text-align: left;
  font-size: 0.9rem;
  margin-bottom: 20px;
  margin-top: 11px;
  height: 47px;
  width: 100%;
  text-transform: uppercase;
}

/* MENU */