:root {
  color-scheme: light;
  --paper: #f7f5ef;
  --surface: #fffefa;
  --ink: #18202a;
  --muted: #56606c;
  --primary: #3157d5;
  --primary-deep: #2948b8;
  --primary-soft: #e5eaff;
  --signal: #f2a65a;
  --line: #cbd0d8;
  --line-strong: #18202a;
  --sans: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --wrap: 1120px;
  --text: 760px;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background:
    linear-gradient(rgba(24, 32, 42, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 32, 42, .035) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}
a { color: var(--primary-deep); text-decoration-thickness: .08em; text-underline-offset: .2em; }
a:hover { color: var(--primary); }
button, input, select, textarea { font: inherit; }
button, input, select { min-height: 48px; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #ff8a3d; outline-offset: 3px; }
code { overflow-wrap: anywhere; border: 1px solid var(--line); background: #eef0f5; padding: .12em .38em; color: #243b75; font-family: var(--mono); font-size: .88em; }
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.skip-link { position: fixed; top: .75rem; left: .75rem; z-index: 50; transform: translateY(-180%); background: var(--ink); padding: .65rem 1rem; color: #fff; }
.skip-link:focus { transform: none; }

.site-header { border-top: 5px solid var(--signal); border-bottom: 1px solid var(--line-strong); background: rgba(247, 245, 239, .96); }
.header-inner { display: flex; min-height: 78px; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .72rem; color: var(--ink); font-size: 1.18rem; font-weight: 800; letter-spacing: -.035em; text-decoration: none; }
.brand > span:last-child > span, .brand--footer span { color: var(--primary); }
.brand-mark { width: 31px; height: 31px; background: url("/favicon.svg?v=2") center / contain no-repeat; }
.brand-mark::after, .brand-mark span { display: none; }
.desktop-nav { display: flex; align-items: center; gap: 1.3rem; }
.desktop-nav a { display: inline-flex; min-height: 44px; align-items: center; border-bottom: 3px solid transparent; padding: .35rem .05rem .2rem; color: var(--ink); font-size: .88rem; font-weight: 700; text-decoration: none; }
.desktop-nav a:hover { border-bottom-color: var(--signal); color: var(--primary-deep); }
.desktop-nav a[aria-current="page"] { border-bottom-color: var(--primary); color: var(--primary-deep); }
.mobile-menu { display: none; }

main { padding: clamp(3.75rem, 8vw, 7rem) 0 clamp(5rem, 9vw, 8rem); }
.home-layout { max-width: 1020px; margin-inline: auto; }
.content-layout { max-width: var(--text); margin-inline: auto; }
.page-header { max-width: 880px; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.content-layout .page-header { max-width: var(--text); }
.eyebrow, .section-kicker { margin-bottom: .95rem; color: var(--primary-deep); font-family: var(--mono); font-size: .75rem; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
h1, h2, h3 { color: var(--ink); font-family: var(--sans); text-wrap: balance; }
h1 { max-width: 900px; font-size: clamp(2.75rem, 6vw, 4.75rem); font-weight: 750; letter-spacing: -.065em; line-height: .98; }
.content-layout h1 { font-size: clamp(2.55rem, 5.4vw, 4.25rem); }
.hero-copy > p { max-width: 760px; margin-top: 1.45rem; color: #444f5b; font-size: clamp(1.06rem, 2vw, 1.2rem); line-height: 1.62; }
.hero-copy > p + p { margin-top: .85rem; }
.hero-copy strong { color: var(--ink); }

.page-header--home { display: grid; max-width: none; grid-template-columns: minmax(0, 1.5fr) minmax(250px, .62fr); align-items: end; gap: clamp(2rem, 6vw, 5rem); }
.route-sketch { position: relative; min-height: 270px; border: 1px solid var(--ink); background: var(--ink); padding: 2.8rem 1.7rem 1.7rem; color: #fff; box-shadow: 10px 10px 0 var(--signal); }
.route-sketch::before { position: absolute; inset: 10px; border: 1px solid rgba(255, 255, 255, .15); content: ""; pointer-events: none; }
.route-sketch__code { position: absolute; top: .8rem; right: 1rem; color: var(--signal); font-family: var(--mono); font-size: .76rem; font-weight: 800; letter-spacing: .1em; }
.route-sketch__label { display: block; margin-bottom: .35rem; color: #aebbea; font-family: var(--mono); font-size: .67rem; letter-spacing: .12em; text-transform: uppercase; }
.route-sketch__value { display: block; overflow: hidden; color: #dce1ea; font-family: var(--mono); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.route-sketch strong { display: block; color: #fff; font-family: var(--mono); font-size: clamp(1.2rem, 2.1vw, 1.55rem); letter-spacing: -.04em; }
.route-sketch__line { display: block; width: 2px; height: 64px; margin: 1rem 0 1rem .35rem; background: var(--signal); }
.route-sketch__line::after { display: block; width: 8px; height: 8px; transform: translate(-3px, 60px) rotate(45deg); border-right: 2px solid var(--signal); border-bottom: 2px solid var(--signal); content: ""; }

.tool-card, .form-card { position: relative; border: 1px solid var(--line-strong); background: var(--surface); box-shadow: 10px 10px 0 var(--primary-soft); }
.tool-card { margin: 0 0 clamp(5rem, 9vw, 8rem); padding: clamp(1.5rem, 5vw, 3rem); }
.tool-card__head { display: grid; grid-template-columns: 58px 1fr; align-items: start; gap: 1.2rem; margin-bottom: 1.6rem; }
.tool-card__index { display: grid; width: 48px; height: 48px; place-items: center; background: var(--signal); color: var(--ink); font-family: var(--mono); font-size: .78rem; font-weight: 800; }
.tool-card__head .eyebrow { margin: 0 0 .3rem; }
.tool-card h2, .form-card h2 { font-size: clamp(1.75rem, 3vw, 2.45rem); font-weight: 750; letter-spacing: -.045em; line-height: 1.05; }
.url-form label, .field label { display: block; margin-bottom: .45rem; color: #293440; font-size: .9rem; font-weight: 750; }
.url-form__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .65rem; }
input, select, textarea { width: 100%; border: 1px solid #8c96a3; border-radius: 0; outline: none; background: #fff; padding: .76rem .9rem; color: var(--ink); }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary), 4px 4px 0 var(--primary-soft); }
button { border: 1px solid var(--primary-deep); border-radius: 0; background: var(--primary); padding: .72rem 1.35rem; color: #fff; font-weight: 800; box-shadow: 4px 4px 0 var(--ink); transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease; }
button:hover { background: var(--primary-deep); }
button:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
button:disabled { cursor: wait; opacity: .68; }
.form-note, .field-help { color: var(--muted); font-size: .875rem; }
.form-note { margin-top: .9rem; }
.trap-field { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.turnstile-slot { min-height: 0; margin-top: 1rem; }
.turnstile-slot:empty { display: none; }
.shortener-status, .form-status { min-height: 1.5em; margin-top: .8rem; color: var(--muted); font-size: .9rem; }
.shortener-status[data-state="error"], .form-status[data-state="error"] { color: #9c3026; }
.shortener-status[data-state="success"], .form-status[data-state="success"] { color: #1d4a36; }
.form-status[data-state="success"] { border: 1px solid #267348; background: #e5f6eb; padding: .8rem .9rem; color: #16472d; font-weight: 800; }
.form-card button[data-state="success"] { border-color: #155d38; background: #1d6b45; box-shadow: 4px 4px 0 #123a27; color: #fff; }
.form-card button[data-state="success"]:hover { background: #155d38; }
.shortener-result { display: flex; align-items: center; gap: .65rem; margin-top: .9rem; border: 1px solid var(--primary); background: var(--primary-soft); padding: .7rem; }
.shortener-result[hidden] { display: none; }
.shortener-result code { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; padding: .35rem; color: var(--primary-deep); font-size: .95rem; }
.copy-short-link { flex: 0 0 auto; min-height: 40px; padding: .55rem .8rem; font-size: .875rem; }
.copy-short-link[data-state="copied"] { border-color: #165334; background: #1d6b45; box-shadow: 4px 4px 0 #123a27; color: #fff; }
.benefits { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 1.5rem; border-top: 1px solid var(--line); }
.benefits span { padding: 1rem .8rem 0 1.35rem; color: #34404d; font-size: .84rem; font-weight: 750; }
.benefits span + span { border-left: 1px solid var(--line); }
.benefits span::before { margin-left: -1.35rem; padding-right: .45rem; color: var(--primary); content: "↗"; }

.form-card { margin: -1rem 0 clamp(4.5rem, 8vw, 7rem); padding: clamp(1.5rem, 5vw, 2.7rem); }
.form-card::before { position: absolute; top: -1px; left: -1px; width: 74px; height: 6px; background: var(--signal); content: ""; }
.form-card form { margin-top: 1.7rem; }
.field + .field, .form-card button, .check { margin-top: 1.15rem; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 1rem; margin-top: 1.15rem; }
.form-grid > .field { margin-top: 0; }
.optional { margin-left: .35rem; color: var(--muted); font-size: .8rem; font-weight: 600; }
.check { display: flex; align-items: flex-start; gap: .7rem; color: #33404c; font-size: .9rem; line-height: 1.5; }
.check input { width: 20px; min-height: 20px; margin-top: .1rem; accent-color: var(--primary); box-shadow: none; }

.prose { max-width: var(--text); }
.home-layout .prose { margin-inline: auto; }
.prose h2 { margin-top: 4.6rem; padding-top: .25rem; font-size: clamp(1.8rem, 4vw, 2.55rem); font-weight: 750; letter-spacing: -.045em; line-height: 1.08; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 2.2rem; font-size: 1.16rem; font-weight: 800; line-height: 1.35; }
.prose p, .prose ul, .prose ol, .table-scroll { margin-top: 1rem; }
.prose ul, .prose ol { padding-left: 1.35rem; }
.prose li { padding-left: .25rem; }
.prose li + li { margin-top: .55rem; }
.prose h2 + p, .prose h3 + p { margin-top: .75rem; }
.prose h2, .prose h3 { scroll-margin-top: 1.5rem; }
.contents-nav { margin-top: 1.1rem; border: 1px solid var(--line-strong); background: var(--surface); box-shadow: 6px 6px 0 var(--primary-soft); }
.contents-nav ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 1rem 1rem 1rem 2.7rem; column-gap: 2.2rem; }
.contents-nav li { padding: .35rem .3rem; color: var(--primary); font-family: var(--mono); font-size: .78rem; line-height: 1.45; }
.contents-nav li + li { margin-top: 0; }
.contents-nav a { color: var(--ink); font-family: var(--sans); font-size: .9rem; font-weight: 700; text-decoration: none; }
.contents-nav a:hover { color: var(--primary); text-decoration: underline; }
.prose h2[id="perguntas-frequentes"] { margin-bottom: .5rem; }
.prose h2[id="perguntas-frequentes"] ~ h3 { border-top: 1px solid var(--line); padding-top: 1.35rem; }
.prose > p:first-child { font-size: 1.05rem; }
.page-article .prose > p > code:only-child { display: block; border: 0; background: var(--ink); padding: 1.2rem 1.35rem; color: #fff; box-shadow: 7px 7px 0 var(--signal); font-size: .82rem; line-height: 1.7; }
.table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--line-strong); background: var(--surface); }
table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: .9rem; line-height: 1.45; }
th, td { padding: .85rem .9rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--primary-soft); color: #26386e; font-family: var(--mono); font-size: .75rem; letter-spacing: .02em; }
tr:last-child td { border-bottom: 0; }
.page-legal .page-header { margin-bottom: 3rem; padding-bottom: 2.2rem; border-bottom: 4px solid var(--ink); }
.page-legal .hero-copy > p { font-size: 1rem; }
.page-legal .prose h2 { margin-top: 3.6rem; }
.page-article .page-header { position: relative; padding-bottom: 2.2rem; border-bottom: 1px solid var(--line-strong); }
.page-article .page-header::after { position: absolute; bottom: -4px; left: 0; width: 96px; height: 7px; background: var(--signal); content: ""; }

.site-footer { border-top: 6px solid var(--signal); background: var(--ink); padding: 3rem 0; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr auto; align-items: start; gap: 2rem; }
.site-footer .brand { color: #fff; }
.site-footer .brand--footer span { color: #9fb0ff; }
.brand--footer { font-size: 1.15rem; }
.footer-grid > div p { max-width: 360px; margin-top: .65rem; color: #b9c1cb; font-size: .9rem; }
.site-footer nav { display: grid; gap: .45rem; }
.site-footer nav a { min-height: 34px; color: #e8ebf0; font-size: .9rem; text-decoration-color: #778390; }
.site-footer nav a:hover { color: #fff; text-decoration-color: var(--signal); }
.copyright { color: #b9c1cb; font-family: var(--mono); font-size: .78rem; white-space: nowrap; }
.not-found { max-width: 760px; }
.not-found h1 { font-size: clamp(2.8rem, 7vw, 5rem); }
.not-found > p:not(.eyebrow) { max-width: 580px; margin-top: 1.2rem; color: var(--muted); font-size: 1.1rem; }
.text-button { display: inline-flex; min-height: 48px; align-items: center; margin-top: 1.6rem; border: 1px solid var(--primary-deep); background: var(--primary); padding: .7rem 1.15rem; color: #fff; font-weight: 800; text-decoration: none; box-shadow: 4px 4px 0 var(--ink); }
.text-button:hover { background: var(--primary-deep); color: #fff; }

@media (prefers-reduced-motion: no-preference) {
  .route-sketch, .tool-card { animation: rise-in 480ms ease-out both; }
  .route-sketch { animation-delay: 80ms; }
  .tool-card { animation-delay: 140ms; }
  @keyframes rise-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
}

@media (max-width: 820px) {
  .page-header--home { grid-template-columns: 1fr; align-items: start; }
  .route-sketch { min-height: 220px; }
}

@media (max-width: 720px) {
  .wrap { width: min(100% - 28px, var(--wrap)); }
  .header-inner { min-height: 68px; gap: 1rem; }
  .desktop-nav { display: none; }
  .mobile-menu { position: relative; display: block; }
  .mobile-menu summary { min-width: 74px; border: 1px solid var(--ink); padding: .48rem .75rem; color: var(--ink); font-family: var(--mono); font-size: .78rem; font-weight: 800; list-style: none; text-align: center; text-transform: uppercase; cursor: pointer; }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .mobile-menu summary::after { padding-left: .45rem; color: var(--primary); content: "+"; }
  .mobile-menu[open] summary::after { content: "−"; }
  .mobile-menu nav { position: absolute; top: calc(100% + .7rem); right: 0; z-index: 30; display: grid; width: min(300px, calc(100vw - 28px)); border: 1px solid var(--ink); background: var(--surface); box-shadow: 7px 7px 0 var(--signal); }
  .mobile-menu nav a { min-height: 48px; border-bottom: 1px solid var(--line); padding: .72rem 1rem; color: var(--ink); font-size: .88rem; font-weight: 750; text-decoration: none; }
  .mobile-menu nav a:last-child { border-bottom: 0; }
  .mobile-menu nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary-deep); }
  main { padding-top: 3.6rem; }
  h1 { font-size: clamp(2.65rem, 13vw, 3.65rem); }
  .content-layout h1 { font-size: clamp(2.55rem, 12vw, 3.4rem); }
  .page-header--home { gap: 2.7rem; }
  .route-sketch { min-height: 205px; padding: 2.6rem 1.45rem 1.4rem; box-shadow: 7px 7px 0 var(--signal); }
  .route-sketch__line { height: 48px; margin-block: .7rem; }
  .route-sketch__line::after { transform: translate(-3px, 44px) rotate(45deg); }
  .tool-card__head { grid-template-columns: 46px 1fr; gap: .9rem; }
  .tool-card__index { width: 40px; height: 40px; }
  .url-form__row, .form-grid { grid-template-columns: 1fr; }
  .url-form__row button, .form-card button { width: 100%; }
  .shortener-result { align-items: stretch; flex-direction: column; }
  .copy-short-link { width: 100%; }
  .benefits { grid-template-columns: 1fr; }
  .benefits span { padding-block: .75rem; }
  .benefits span + span { border-top: 1px solid var(--line); border-left: 0; }
  .contents-nav ol { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .copyright { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  button { transition: none; }
}
