/*
* Bearming — a personal Bear theme
* Version 5.5.0 | 2026-05-26
* Robert Birming | robertbirming.com
*/

/* Palette */
:root {
  color-scheme: light dark;

  /* Layout */
  --page-width: 720px;
  --line-height: 1.6;
  --space-block: 1.8rem;
  --radius: 3px;

  /* Typography */
  --font-body: 'Inter', system-ui, sans-serif;
  --font-heading: 'Inter', system-ui, sans-serif;
  --font-mono: ui-monospace, monospace;
  --font-size: 1.0rem;
  --font-small: calc(var(--font-size) * 0.875);

  /* Light */
  --bg: #f8f8f8;
  --text: #2c2d2e;
  --link: #2952cc;
  --visited: #7c5a91;
  --accent: #2952cc;
  --muted: color-mix(in srgb, var(--text), var(--bg) 45%);
  --surface: color-mix(in srgb, var(--bg), black 5%);
  --border: color-mix(in srgb, var(--bg), black 12%);
}
@media (prefers-color-scheme: dark) {
  :root {
    /* Dark */
    --bg: #01242e;
    --text: #d5d8dc;
    --link: #98cbe3;
    --visited: #c9add7;
    --accent: #98cbe3;
    --muted: color-mix(in srgb, var(--text), var(--bg) 45%);
    --surface: color-mix(in srgb, var(--bg), white 8%);
    --border: color-mix(in srgb, var(--bg), white 16%);
  }
}

/* Manual light/dark override (wins over system preference) */
:root[data-theme="light"] {
  --bg: #f8f8f8;
  --text: #2c2d2e;
  --link: #2952cc;
  --visited: #7c5a91;
  --accent: #2952cc;
  --muted: color-mix(in srgb, var(--text), var(--bg) 45%);
  --surface: color-mix(in srgb, var(--bg), black 5%);
  --border: color-mix(in srgb, var(--bg), black 12%);
}

:root[data-theme="dark"] {
  --bg: #01242e;
  --text: #d5d8dc;
  --link: #98cbe3;
  --visited: #c9add7;
  --accent: #98cbe3;
  --muted: color-mix(in srgb, var(--text), var(--bg) 45%);
  --surface: color-mix(in srgb, var(--bg), white 8%);
  --border: color-mix(in srgb, var(--bg), white 16%);
}

.bear {
  font-family: ui-monospace, monospace;
}

/* =========================
   Core styles
   Handle with bear care
   ========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  background-color: var(--bg);
  scrollbar-gutter: stable;
}

body {
  margin-inline: auto;
  padding: 1.25rem;
  max-width: var(--page-width);
  font-family: var(--font-body);
  font-size: var(--font-size);
  line-height: var(--line-height);
  overflow-wrap: break-word;
  color: var(--text);
  background-color: var(--bg);
}

p {
  margin-block: 1.2em;
}

h1, h2, h3, h4 {
  margin-block: var(--space-block) 0.5em;
  line-height: 1.3;
  font-family: var(--font-heading);
}

h1 { font-size: 1.6rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.1rem; }

a {
  color: var(--link);
  text-decoration: none;
}

main a:visited {
  color: var(--visited);
}

@media (hover: hover) {
  a:hover {
    text-decoration: underline;
    text-underline-offset: 0.2em;
    text-decoration-thickness: 0.12em;
  }
}

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

ul, ol {
  padding-inline-start: 1.5rem;
}

li,
li > ul,
li > ol {
  margin-block: 0.2em;
}

hr,
img,
video,
pre,
blockquote {
  margin-block: var(--space-block);
}

hr {
  border: none;
  border-block-start: 1px solid var(--border);
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

img.img-small {
  max-width: 200px;
}

img.img-medium {
  max-width: 400px;
}

/* Polaroid photo | robertbirming.com */
.polaroid {
  display: flow-root;
  width: fit-content;
  margin-block: var(--space-block);
  margin-inline: auto;
  padding: 0.7rem 0.7rem 1.3rem;
  background: #fffdf5;
  border-radius: 2px;
  box-shadow: 0 2px 16px color-mix(in srgb, var(--text) 15%, transparent);
  transform: rotate(-1.2deg);
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

@media (prefers-color-scheme: dark) {
  .polaroid {
    box-shadow: 0 2px 14px color-mix(in srgb, var(--accent) 20%, transparent);
  }
}

.polaroid p {
  margin: 0;
}

.polaroid img {
  display: block;
  margin: 0;
  border-radius: 0;
  filter: saturate(0.75) contrast(0.95);
}

.polaroid em {
  display: block;
  margin-block-start: 0.7rem;
  text-align: center;
  font-size: var(--font-small);
  font-family: cursive;
  color: #666;
}

@media (hover: hover) {
  .polaroid:hover {
    transform: rotate(0deg);
    box-shadow: 0 6px 24px color-mix(in srgb, var(--text) 20%, transparent);
  }
}

pre {
  padding-block: 1rem;
  padding-inline: 1.2rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: var(--font-small);
  line-height: 1.5;
  tab-size: 2;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

code {
  padding-block: 0.15em;
  padding-inline: 0.3em;
  font-family: var(--font-mono);
  font-size: var(--font-small);
  overflow-wrap: anywhere;
  background-color: var(--surface);
  border-radius: var(--radius);
}

pre code {
  padding: 0;
  background: none;
  border-radius: 0;
  font-size: inherit;
  overflow-wrap: normal;
}

mark {
  padding-inline: 0.15em;
  color: var(--bg);
  background-color: color-mix(in srgb, var(--accent) 60%, var(--text));
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-small);
}

th,
td {
  padding-block: 0.5em;
  padding-inline: 0.75em;
  border: 1px solid var(--border);
  text-align: start;
}

th {
  background-color: var(--surface);
  font-weight: 700;
}

time {
  font-family: var(--font-mono);
  font-size: var(--font-small);
  font-style: normal;
  color: var(--muted);
}

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

.tag-description {
  color: var(--muted);
  margin-block-start: 0.3em;
}

header nav p,
main > :first-child {
  margin-block-start: 0;
}

.post main > article > h1 + p {
  margin-block-start: 0.3em;
}

/* Post meta line (date, time, tags) */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: var(--font-small);
  color: var(--muted);
}

.post-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.post-meta-icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

.post-meta time {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

.post-meta-sep {
  color: var(--border);
}

.post-meta-tags a {
  color: var(--link);
  text-decoration: none;
  margin-inline-end: 0.5rem;
}

.post-meta-tags a:last-child {
  margin-inline-end: 0;
}

@media (hover: hover) {
  .post-meta-tags a:hover {
    text-decoration: underline;
  }
}

.post main > article > h1 {
  margin-block-end: 0;
}

/* =========================
   Style options
   robertbirming.com/bearming/styles
   ========================= */

/* Mostrar título blog na página de blog */
body.blog main::before {
  content: "Blog";
  display: block;
  font-size: 1.7rem;
  color: var(--txt);
  margin-bottom: 1.0rem;
  margin-top: -0.4rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Title: Underline */
header a.title h1 {
  position: relative;
  display: inline-block;
  padding-block-end: 0.4em;
  margin-block-end: 0.2em;
}

header a.title h1::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  height: 2px;
  background: var(--link);
  transform: scaleX(0.25);
  transform-origin: left;
  opacity: 0.8;
}

@media (hover: hover) {
  header a.title h1::before {
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  header a.title:hover h1::before {
    transform: scaleX(1);
    opacity: 1;
  }
}

header a.title:focus-visible h1::before {
  transform: scaleX(1);
  opacity: 1;
}

/* Links: Main content underlining */
main p a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.05em;
}

/* Blockquote: Default */
blockquote {
  margin-inline: 0;
  padding-block: 0.1em;
  padding-inline-start: 1.2em;
  font-style: italic;
  color: var(--text);
  border-inline-start: 3px solid var(--accent);
}

blockquote p { margin-block: 0; }

/* Header: Horizontal */
header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.1rem 1rem;
  margin-block: 0 var(--space-block);
}

.title-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

header a.title {
  display: inline-block;
  color: var(--text);
  text-decoration: none;
}

.title h1 {
  margin-block: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

header nav p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-block: 0;
  font-size: 0.95rem;
  font-weight: 500;
}

header nav a {
  margin-inline-end: 0;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-block-end: var(--space-block);
  font-size: var(--font-small);
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.breadcrumb [aria-current="page"] {
  color: var(--text);
}

.breadcrumb-sep {
  color: color-mix(in srgb, var(--muted) 55%, var(--border));
}

/* Blog archive (/blog/): deepakness.com/archive/-style layout */
.archive-feed-icon {
  display: inline-block;
  margin-inline-start: 0.3em;
  font-size: 0.7em;
  color: var(--accent);
  vertical-align: middle;
}

.archive-feed-links {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-inline-start: 0.5rem;
  font-size: var(--font-small);
  vertical-align: middle;
}

.archive-feed-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  color: var(--accent);
  text-decoration: none;
}

.archive-feed-link sup {
  margin-block-end: 0.2em;
  font-size: 0.7em;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.archive-feed-link i {
  font-size: 0.85em;
}

@media (hover: hover) {
  .archive-feed-link:hover,
  .archive-feed-link:hover sup {
    color: var(--link);
    text-decoration: none;
  }
}

.archive-intro {
  margin-block-end: 1.2rem;
}

.archive-browse-label {
  margin-block: var(--space-block) 0.55rem;
  font-size: var(--font-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.archive-year-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-block-end: var(--space-block);
}

.archive-year-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.35em 0.7em;
  font: inherit;
  letter-spacing: inherit;
  font-size: calc(var(--font-small) * 0.95);
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.archive-year-pill.is-current {
  color: var(--link);
  border-color: var(--link);
  background: color-mix(in srgb, var(--link) 8%, var(--surface));
}

@media (hover: hover) {
  .archive-year-pill:not(.is-current):hover {
    color: var(--link);
    border-color: var(--link);
    background: color-mix(in srgb, var(--link) 8%, var(--surface));
  }
}

.archive-year-pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.archive-year-count {
  padding: 0.05em 0.5em;
  border-radius: 999px;
  font-size: 0.85em;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg);
}

.archive-year-heading {
  margin-block: 2.6rem 0;
  padding-block-end: 0.3rem;
  border-block-end: 1px solid var(--border);
}

.archive-month-group {
  margin-block-start: 2.2rem;
}

.archive-month-group + .archive-month-group {
  padding-block-start: 1.1rem;
  border-block-start: 1px solid var(--border);
}

.archive-month-label {
  margin-block-end: 0.9rem;
  font-size: var(--font-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.archive-month-count {
  font-weight: 400;
}

.archive-list {
  margin-block-end: var(--space-block);
  padding: 0;
  list-style: none;
}

.archive-list li {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  margin-block-end: 0.6rem;
}

.archive-entry-title {
  display: inline-block;
  color: var(--text);
  font-size: 1.05em;
  font-weight: 400;
}

.archive-entry-title:visited {
  color: var(--visited);
}

@media (hover: hover) {
  .archive-entry-title:hover {
    color: var(--link);
  }
}

.archive-entry-fill {
  flex: 1 1 auto;
  min-width: 0.75em;
  margin-block-end: 0.35em;
  border-block-end: 1px dotted var(--border);
}

.archive-entry-date {
  flex-shrink: 0;
  font-size: var(--font-small);
  color: var(--muted);
}

/* Tag cloud */
.tag-cloud {
  margin-block: 0.4rem var(--space-block);
  font-size: var(--font-small);
  color: var(--muted);
}

/* Archive toolkit | robertbirming.com */
.bearming-archive-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  margin-block: var(--space-block) 0.9rem;
}

.bearming-archive-select {
  position: relative;
  width: 100%;
  max-width: 16rem;
}

.bearming-archive-select select {
  width: 100%;
  padding-block: 0.55em;
  padding-inline: 0.7em;
  padding-inline-end: 2.2em;
  font: inherit;
  letter-spacing: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  appearance: none;
}

.bearming-archive-select select:focus-visible {
  border-color: color-mix(in srgb, var(--link) 45%, var(--surface));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--link) 18%, transparent);
}

.bearming-archive-select::after {
  content: "";
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: 0.9em;
  width: 0.5em;
  height: 0.5em;
  border-inline-end: 2px solid var(--text);
  border-block-end: 2px solid var(--text);
  transform: translateY(-60%) rotate(45deg);
  pointer-events: none;
  opacity: 0.9;
}

.bearming-archive-month {
  margin-block: 2.3rem 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.bearming-archive-count {
  font-weight: 400;
  font-size: var(--font-small);
  color: var(--muted);
}

/* Tags: Pills */
p.tags {
  margin-block: var(--space-block);
}

p.tags a,
p.tags a:visited {
  display: inline-block;
  margin-inline-end: 0.4em;
  margin-block-end: 0.4em;
  padding-block: 0.2em;
  padding-inline: 0.65em;
  font-size: var(--font-small);
  font-weight: 500;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  text-decoration: none;
}

/* Footer: Default */
footer {
  margin-block-start: calc(var(--space-block) * 1.2);
  padding-block-start: 1.2rem;
  text-align: center;
  font-size: var(--font-small);
  color: var(--muted);
  border-block-start: 1px solid var(--border);
}

footer p {
  margin-block: 0.5em;
}

#footer-directive a {
  margin-inline: 0.2em;
}

/* Figure caption | robertbirming.com */
figure {
  margin-inline: 0;
  margin-block: var(--space-block);
}

figure > p {
  margin-block: 0;
}

figure img,
figure video {
  margin-block: 0;
}

figcaption {
  margin-block-start: 0.5em;
  font-size: var(--font-small);
  font-style: italic;
  color: var(--muted);
  text-align: center;
}

/* Blockquote: Citations | robertbirming.com */
blockquote cite {
  display: block;
  margin-block-start: 0.7em;
  font-size: var(--font-small);
  font-style: normal;
}

blockquote > :first-child { margin-block-start: 0; }
blockquote > :last-child { margin-block-end: 0; }

/* External link marker | robertbirming.com */
main a[href^="http"]:not([href*="rcapitao.com"])::after {
  content: "\00a0↗\FE0E";
  font-size: 0.7em;
  text-decoration: none;
  display: inline;
  vertical-align: super;
  white-space: nowrap;
  color: var(--muted);
}

main a[href^="http"]:not([href*="rcapitao.com"]):has(img)::after {
  content: none;
}

/* Search: hero de busca estilo "command palette" */
.search-hero {
  margin-block: 0.4rem 0;
}

.search-hero h1 {
  margin-block-end: 1.4rem;
}

.search-command-box {
  display: flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.65em 1.3em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 4px 18px color-mix(in srgb, var(--text) 6%, transparent);
}

.search-command-box svg {
  width: 1.2em;
  height: 1.2em;
  flex-shrink: 0;
  color: var(--muted);
}

.search-command-box input[type="search"] {
  flex: 1;
  width: 100%;
  max-width: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: var(--font-size);
  letter-spacing: inherit;
  color: var(--text);
  background: transparent;
  border: none;
  outline: none;
  appearance: none;
}

.search-tag-toggle {
  display: block;
  margin-block: 0.9rem 0;
  padding: 0;
  font: inherit;
  font-size: var(--font-small);
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
}

@media (hover: hover) {
  .search-tag-toggle:hover {
    color: var(--link);
  }
}

.search-tag-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.search-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-block-start: 0.9rem;
}

.search-tag-cloud[hidden] {
  display: none;
}

.search-command-results {
  margin-block-start: 2.2rem;
}

.search-pill {
  display: inline-block;
  padding-block: 0.25em;
  padding-inline: 0.6em;
  font: inherit;
  letter-spacing: inherit;
  font-size: calc(var(--font-small) * 0.95);
  font-weight: 500;
  color: var(--accent);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 99px;
  cursor: pointer;
}

.search-pill.is-active {
  color: var(--bg);
  background: var(--link);
  border-color: var(--link);
}

@media (hover: hover) {
  .search-pill:not(.is-active):hover {
    border-color: var(--link);
  }
}

.search-pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.search-results-meta {
  margin-block: 0 0.6rem;
  font-size: var(--font-small);
  color: var(--muted);
}

.search-empty {
  font-size: 1.0rem;
  color: var(--muted);
}

/* Pagination */
.pagination-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-block: var(--space-block) 0;
  font-size: var(--font-small);
}

.pagination-nav a {
  color: var(--link);
  font-weight: 500;
}

.pagination-sep {
  color: var(--border);
}

.pagination-disabled {
  color: var(--muted);
  opacity: 0.5;
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  vertical-align: middle;
}

.theme-toggle svg {
  width: 1.1rem;
  height: 1.1rem;
}

.theme-toggle .icon-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .icon-sun {
    display: none;
  }
  :root:not([data-theme]) .theme-toggle .icon-moon {
    display: block;
  }
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

@media (hover: hover) {
  .theme-toggle:hover {
    color: var(--text);
  }
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Curve divider | robertbirming.com */
span.curve {
  display: block;
  width: 8rem;
  height: 0.5rem;
  margin-block-start: calc(var(--space-block) * 0.7);
  margin-inline: auto;
  background: var(--link);
  opacity: 0.9;
  -webkit-mask:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='8' viewBox='0 0 120 8'><path d='M0 4 Q30 0 60 4 T120 4' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/></svg>")
    no-repeat center / contain;
  mask:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='8' viewBox='0 0 120 8'><path d='M0 4 Q30 0 60 4 T120 4' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/></svg>")
    no-repeat center / contain;
}

@supports not ((mask: url("")) or (-webkit-mask: url(""))) {
  span.curve {
    height: 0.125rem;
    border-radius: 999px;
  }
}

/* Copy code button | robertbirming.com */
.highlight {
  position: relative;
}

.highlight pre {
  padding-inline-end: 2.75rem;
}

.copy-code-button {
  position: absolute;
  inset-block-start: 0.5rem;
  inset-inline-end: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

@media (hover: hover) {
  .copy-code-button:hover {
    color: var(--text);
    background: var(--border);
  }
}

.copy-code-button:focus-visible {
  color: var(--text);
  background: var(--border);
}

.copy-code-button svg {
  width: 1rem;
  height: 1rem;
}

.copy-code-button .icon-check {
  display: none;
}

.copy-code-button.copied .icon-copy {
  display: none;
}

.copy-code-button.copied .icon-check {
  display: block;
  color: var(--link);
}

/* Reply via email | robertbirming.com */
.reply-email {
  margin-block: var(--space-block);
}

.reply-email a {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding-block: 0.4em;
  padding-inline: 1em;
  font-size: var(--font-small);
  font-weight: 500;
  color: var(--link);
  text-decoration: none;
  background: color-mix(in srgb, var(--link) 6%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--link) 18%, var(--bg));
  border-radius: var(--radius);
}

.reply-email a svg {
  width: 1.05em;
  height: 1.05em;
  flex-shrink: 0;
}

.reply-email a:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--link) 45%, var(--surface));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--link) 18%, transparent);
}

@media (hover: hover) {
  .reply-email a:hover {
    background: color-mix(in srgb, var(--link) 10%, var(--bg));
    border-color: color-mix(in srgb, var(--link) 28%, var(--bg));
  }
}

/* Webring buttons | robertbirming.com */
.webring {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-block-start: 1.5rem;
  text-align: left;
}

.webring-link {
  display: inline-block;
  padding: 0.85em 1.2em;
  font-weight: 500;
  font-size: var(--font-small);
  color: var(--link);
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
}

.webring-pill {
  border: 1px solid var(--border);
  border-radius: 99px;
}

.webring-rounded {
  border: 1px solid var(--border);
  border-radius: 6px;
}

.webring-dashed {
  border: 2px dashed var(--border);
  border-radius: 0;
}

.webring-ghost {
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--surface);
}

/* Topic chips (ex.: "Explore por tema" na home) */
.topic-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-block-start: 1.5rem;
}

.topic-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35em 0.8em;
  font-size: calc(var(--font-small) * 0.95);
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.topic-chip:visited {
  color: var(--text);
}

@media (hover: hover) {
  .topic-chip:hover {
    color: var(--link);
    border-color: var(--link);
    background: color-mix(in srgb, var(--link) 8%, var(--surface));
    text-decoration: none;
  }
}

.topic-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (hover: hover) {
  .webring-pill:hover,
  .webring-rounded:hover,
  .webring-dashed:hover {
    text-decoration: none;
    background: var(--surface);
    border-color: var(--muted);
  }

  .webring-ghost:hover {
    background: color-mix(in srgb, var(--text) 10%, var(--bg));
  }
}

/* Cards */
.card {
  margin-block-start: var(--space-block);
  padding-block: 1.2rem;
  padding-inline: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card h4 {
  margin-block: 0 -0.5rem;
}

.card a {
  text-decoration: none;
}

.card a:visited {
  color: var(--link);
}

@media (hover: hover) {
  .card a:hover {
    text-decoration: underline;
    text-decoration-thickness: 0.12em;
    text-underline-offset: 0.2em;
  }
}

.card p:last-child {
  margin-block-end: 0;
}

.tag-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-block-start: 1.5rem;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.35em 0.7em;
  border-radius: 6px;
  font-size: calc(var(--font-small) * 0.95);
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
}

.tag-chip:visited {
  color: var(--text);
}

@media (hover: hover) {
  .tag-chip:hover {
    color: var(--link);
    border-color: var(--link);
    text-decoration: none;
  }
}

.tag-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tag-chip-count {
  padding: 0.05em 0.5em;
  border-radius: 999px;
  font-size: 0.85em;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg);
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-block-start: var(--space-block);
}

.stat-tile {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-block: 0.9rem;
  padding-inline: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.stat-label {
  font-size: var(--font-small);
  color: var(--muted);
}

/* Bar chart */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
  height: 140px;
  margin-block-start: var(--space-block);
  padding-inline-start: 0;
  overflow-x: auto;
}

.bar-chart-item {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 0.3rem;
  min-width: 1.6rem;
}

@media (max-width: 480px) {
  .bar-chart {
    gap: 0.35rem;
  }

  .bar-chart-item {
    min-width: 1.3rem;
  }

  .bar-chart-value,
  .bar-chart-label {
    font-size: calc(var(--font-small) * 0.85);
  }
}

.bar-chart-value {
  font-family: var(--font-mono);
  font-size: var(--font-small);
  color: var(--muted);
}

.bar-chart-bar {
  width: 100%;
  min-height: 3px;
  background: var(--accent);
  border-radius: var(--radius) var(--radius) 0 0;
  opacity: 0.85;
}

.bar-chart-label {
  font-size: var(--font-small);
  color: var(--muted);
}

/* Tag cloud */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem 1rem;
  margin-block-start: var(--space-block);
}

.tag-cloud-item {
  color: var(--link);
  text-decoration: none;
}

@media (hover: hover) {
  .tag-cloud-item:hover {
    text-decoration: underline;
  }
}

.tag-cloud-count {
  font-size: var(--font-small);
  color: var(--muted);
}

.tag-weight-1 { font-size: 0.85rem; }
.tag-weight-2 { font-size: 1.0rem; }
.tag-weight-3 { font-size: 1.25rem; }
.tag-weight-4 { font-size: 1.55rem; }
.tag-weight-5 { font-size: 1.9rem; font-weight: 700; }

/* Latest status | robertbirming.com */
.latest-status {
  max-inline-size: 34rem;
  margin-inline: auto;
  margin-block: var(--space-block);
  padding: 1rem 1.1rem;
  font-size: var(--font-small);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.latest-status::before {
  content: "ÚLTIMO STATUS";
  display: block;
  margin-block-end: 0.9em;
  font-family: var(--font-mono);
  font-size: 0.87em;
  color: var(--muted);
}

/* Single image: float left beside text */
.latest-status-body--has-thumb {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3em 1rem;
  align-items: start;
}

.latest-status-images--single .latest-status-img-btn img {
  width: 4rem;
  height: 4rem;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  margin: 0;
  margin-block-start: 0.15rem;
}

/* Multiple images: full-width row below text */
.latest-status-images:not(.latest-status-images--single) {
  display: flex;
  gap: 0.4em;
  margin-block-start: 0.9em;
}

.latest-status-images:not(.latest-status-images--single) .latest-status-img-btn {
  flex: 1;
  min-width: 0;
}

.latest-status-images:not(.latest-status-images--single) .latest-status-img-btn img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  margin: 0;
}

.latest-status-img-btn {
  all: unset;
  cursor: zoom-in;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  line-height: 0;
}

.latest-status-text {
  color: var(--text);
  overflow-wrap: break-word;
  min-width: 0;
}

.latest-status-text p { margin-block: 0.4em; }
.latest-status-text > :first-child { margin-block-start: 0; }
.latest-status-text > :last-child { margin-block-end: 0; }

.latest-status-card {
  display: flex;
  gap: 0.5em;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-block-start: 0.75em;
  text-decoration: none;
  background: transparent;
  transition: background 0.15s ease;
}

.latest-status-card-thumb {
  width: 4rem;
  height: 4rem;
  object-fit: cover;
  flex-shrink: 0;
  margin: 0.5em 0 0.5em 0.5em;
  border-radius: var(--radius);
  align-self: flex-start;
}

.latest-status-card-text {
  display: flex;
  flex-direction: column;
  gap: 0.15em;
  padding: 0.4em 0.5em;
  min-width: 0;
}

.latest-status-card-title {
  display: block;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.latest-status-card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
}

.latest-status-meta {
  margin-block-start: 0.85em;
}

.latest-status-time {
  font-family: var(--font-mono);
  font-size: 0.82em;
  color: var(--muted);
}

/* Lightbox */
.latest-status-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.latest-status-lightbox.open {
  display: flex;
}

.latest-status-lb-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
}

.latest-status-lb-img {
  max-width: min(82vw, 1200px);
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius);
  display: block;
  margin: 0;
  cursor: zoom-in;
}

.latest-status-lb-caption {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85em;
  font-style: italic;
  text-align: center;
  margin: 0;
}

.latest-status-lb-nav {
  all: unset;
  color: #fff;
  font-size: 3rem;
  line-height: 1;
  padding-inline: 1rem;
  cursor: pointer;
  opacity: 0.7;
  user-select: none;
  flex-shrink: 0;
}

footer .latest-status {
  text-align: start;
}

@media (hover: hover) {
  .latest-status-img-btn:hover img {
    opacity: 0.88;
  }

  .latest-status-lb-nav:hover {
    opacity: 1;
  }

  .latest-status-card:hover {
    background: color-mix(in srgb, var(--border) 30%, transparent);
    text-decoration: none;
  }
}

.latest-status-quote {
  display: block;
  padding: 0.6em 0.8em;
  text-decoration: none;
}

.latest-status-quote-author {
  display: block;
  font-size: calc(var(--font-small, 0.875rem) * 0.9);
  font-weight: 600;
  color: var(--muted);
  margin-block-end: 0.3em;
}

.latest-status-quote-text {
  font-size: var(--font-small, 0.875rem);
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
