/* Portugues.ai — páginas de ferramentas grátis (/ferramentas, /corretor-ortografico, /conjugador...) */
:root {
  --bg: #f8fafc; --card: #ffffff; --ink: #0f172a; --muted: #475569; --soft: #64748b; --line: #e2e8f0;
  --brand: #0284c7; --brand-ink: #0369a1; --brand-soft: #e0f2fe; --ok: #16a34a; --ok-soft: #f0fdf4; --ko: #dc2626; --ko-soft: #fef2f2;
  --warn-soft: #fffbeb; --warn: #92400e; --shadow: 0 10px 30px rgba(15, 23, 42, .06);
}
.dark {
  --bg: #0b1220; --card: #111827; --ink: #e5e7eb; --muted: #cbd5e1; --soft: #94a3b8; --line: #1f2937;
  --brand: #38bdf8; --brand-ink: #7dd3fc; --brand-soft: #0c2a3f; --ok: #4ade80; --ok-soft: #052e16; --ko: #f87171; --ko-soft: #450a0a;
  --warn-soft: #3b2a07; --warn: #fcd34d; --shadow: none;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.6; }
a { color: var(--brand-ink); }
img { max-width: 100%; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }

/* header */
.t-head { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.t-head .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.t-logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; font-size: 1.15rem; color: var(--brand); text-decoration: none; flex: none; }
.t-logo img { width: 28px; height: 28px; }
.t-nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.t-nav::-webkit-scrollbar { display: none; }
.t-nav a { white-space: nowrap; padding: 8px 10px; border-radius: 8px; font-size: .88rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.t-nav a:hover, .t-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); }
.t-cta { flex: none; padding: 9px 14px; border-radius: 10px; background: linear-gradient(135deg, #0ea5e9, #2563eb); color: #fff; font-weight: 700; font-size: .88rem; text-decoration: none; }
@media (max-width: 720px) { .t-cta { display: none; } }

/* page */
.crumbs { font-size: .82rem; color: var(--soft); margin: 18px 0 0; }
.crumbs a { color: var(--soft); }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.2; margin: 10px 0 8px; letter-spacing: -.01em; }
.lead { font-size: 1.08rem; color: var(--muted); margin: 0 0 20px; max-width: 760px; }
h2 { font-size: 1.35rem; margin: 34px 0 10px; line-height: 1.3; }
h3 { font-size: 1.08rem; margin: 22px 0 6px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--ink); }
.prose ul { padding-left: 1.2em; }
.ex { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
@media (max-width: 600px) { .ex { grid-template-columns: minmax(0, 1fr); } }
.ex div { border-radius: 10px; padding: 8px 12px; font-size: .95rem; }
.ex .yes { background: var(--ok-soft); color: var(--ink); border-left: 4px solid var(--ok); }
.ex .no { background: var(--ko-soft); color: var(--ink); border-left: 4px solid var(--ko); }
.ex .yes::before { content: "✓ "; color: var(--ok); font-weight: 800; }
.ex .no::before { content: "✗ "; color: var(--ko); font-weight: 800; }
.tip { background: var(--warn-soft); color: var(--warn); border-radius: 12px; padding: 12px 14px; font-size: .95rem; }
.toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; padding: 0; list-style: none; }
.toc a { display: inline-block; padding: 6px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: .85rem; font-weight: 600; text-decoration: none; }

/* forms / widgets */
.tool { display: grid; gap: 10px; }
.tool textarea { width: 100%; min-height: 180px; resize: vertical; font: inherit; font-size: 16px; line-height: 1.6; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.tool textarea:focus, .tool input:focus, .tool select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
.tool-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tool-row .grow { flex: 1; }
.btn { min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 0; background: linear-gradient(135deg, #0ea5e9, #2563eb); color: #fff; font-weight: 700; font-size: .95rem; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-ghost { min-height: 40px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-weight: 600; cursor: pointer; font-size: .9rem; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); }
.seg button { min-height: 40px; padding: 6px 12px; border: 0; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; font-size: .88rem; }
.seg button[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand-ink); }
.count { font-size: .82rem; color: var(--soft); }
.count.over { color: var(--ko); font-weight: 700; }
.msg { border-radius: 10px; padding: 10px 12px; font-size: .92rem; }
.msg.ko { background: var(--ko-soft); color: var(--ko); }
.msg.info { background: var(--brand-soft); color: var(--brand-ink); }
.result { display: grid; gap: 12px; }
.diff { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; white-space: pre-wrap; line-height: 1.8; }
.diff del { background: var(--ko-soft); color: var(--ko); text-decoration: line-through; border-radius: 4px; padding: 0 2px; }
.diff ins { background: var(--ok-soft); color: var(--ok); text-decoration: none; font-weight: 600; border-radius: 4px; padding: 0 2px; }
.changes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.changes li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: .93rem; }
.changes .pair { font-weight: 700; }
.changes .pair s { color: var(--ko); }
.changes .pair b { color: var(--ok); }
.changes .why { color: var(--muted); display: block; margin-top: 2px; }
.upsell { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: linear-gradient(135deg, #eef2ff, #e0f2fe); border-radius: 14px; padding: 14px 16px; color: #0f172a; }
.dark .upsell { background: linear-gradient(135deg, #1e1b4b, #0c2a3f); color: #e5e7eb; }

/* counter */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; }
.stat b { display: block; font-size: 1.6rem; font-weight: 900; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.stat span { font-size: .8rem; color: var(--soft); }
.kw { display: flex; flex-wrap: wrap; gap: 6px; }
.kw span { background: var(--brand-soft); color: var(--brand-ink); border-radius: 999px; padding: 3px 10px; font-size: .85rem; }

/* conjugator */
.verb-search { display: flex; gap: 8px; }
.verb-search input { flex: 1; min-width: 0; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 16px; }
.verb-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.verb-facts span { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: .88rem; color: var(--muted); }
.verb-facts b { color: var(--ink); }
.mood { margin-top: 26px; }
.mood h2 { margin: 0 0 10px; }
.tenses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 860px) { .tenses { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .tenses { grid-template-columns: minmax(0, 1fr); } }
.tense { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.tense h3 { margin: 0 0 6px; font-size: .9rem; color: var(--brand-ink); text-transform: uppercase; letter-spacing: .04em; }
.tense table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tense td { padding: 3px 0; vertical-align: top; }
.tense td.p { color: var(--soft); width: 44%; padding-right: 8px; font-size: .88rem; }
.tense td.f { font-weight: 600; }
.verb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; padding: 0; list-style: none; }
.verb-grid a { display: block; padding: 8px 10px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); text-decoration: none; font-weight: 600; color: var(--ink); }
.verb-grid a:hover { border-color: var(--brand); color: var(--brand-ink); }
.letters { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.letters a { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: var(--card); border: 1px solid var(--line); text-decoration: none; font-weight: 700; }

/* converter table */
.conv-table { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--card); border-radius: 12px; overflow: hidden; }
.conv-table th, .conv-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.conv-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--soft); }
.table-wrap { overflow-x: auto; }

/* hub */
.tool-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tool-card { display: block; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.tool-card:hover { border-color: var(--brand); }
.tool-card .ic { font-size: 1.6rem; }
.tool-card b { display: block; font-size: 1.05rem; margin: 6px 0 2px; }
.tool-card span { color: var(--muted); font-size: .92rem; }

/* faq */
details.faq { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 8px 0; }
details.faq summary { cursor: pointer; font-weight: 700; min-height: 28px; }
details.faq p { color: var(--muted); margin: 8px 0 0; }

/* footer */
.t-foot { margin-top: 56px; border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: .9rem; color: var(--soft); }
.t-foot .cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 640px) { .t-foot .cols { grid-template-columns: minmax(0, 1fr); } }
.t-foot b { color: var(--ink); display: block; margin-bottom: 6px; }
.t-foot a { color: var(--soft); text-decoration: none; display: block; padding: 3px 0; }
.t-foot a:hover { color: var(--brand-ink); }
.band { margin-top: 40px; text-align: center; background: linear-gradient(135deg, #0ea5e9, #2563eb); color: #fff; border-radius: 18px; padding: 26px 18px; }
.band h2 { margin: 0 0 6px; color: #fff; }
.band p { margin: 0 0 14px; color: #e0f2fe; }
.band a { display: inline-block; background: #fff; color: #0369a1; font-weight: 800; padding: 12px 20px; border-radius: 12px; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
