/* Shared styles for Painel TAP public tools & blog (static, SEO pages). */
:root {
  --orange: #f58220;
  --orange-deep: #d96d10;
  --orange-wash: #fff4e8;
  --ink: #0d0d0d;
  --ink-soft: #3f3f3f;
  --stone: #6b7280;
  --rule: #e5e5e5;
  --rule-soft: #f0f0f0;
  --paper: #fafafa;
  --white: #ffffff;
  --sage: #10b981;
  --sage-wash: #ecfdf5;
  --sienna: #dc2626;
  --sienna-wash: #fef2f2;
  --amber: #f59e0b;
  --amber-wash: #fffbeb;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(13, 13, 13, 0.04), 0 8px 24px rgba(13, 13, 13, 0.06);
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--orange-deep);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
img {
  max-width: 100%;
}
.wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-header img {
  height: 30px;
  width: auto;
  display: block;
}
.btn {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}
.btn:hover {
  background: var(--orange-deep);
  text-decoration: none;
}
.btn:active {
  transform: translateY(1px);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
}
.btn-ghost:hover {
  background: var(--paper);
  color: var(--ink);
}

/* Hero */
.hero {
  padding: 56px 0 8px;
}
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--orange-deep);
  background: var(--orange-wash);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
h1 {
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0 0 14px;
}
.lede {
  font-size: 19px;
  color: var(--ink-soft);
  margin: 0 0 8px;
  max-width: 62ch;
}
h2 {
  font-size: clamp(23px, 3.5vw, 30px);
  letter-spacing: -0.015em;
  font-weight: 800;
  margin: 48px 0 14px;
}
h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 28px 0 8px;
}
p {
  margin: 0 0 16px;
}
.content ul,
.content ol {
  margin: 0 0 16px;
  padding-left: 22px;
}
.content li {
  margin-bottom: 8px;
}
.muted {
  color: var(--stone);
}
.small {
  font-size: 14px;
}

/* Calculator card */
.calc {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin: 28px 0 8px;
}
.field {
  margin-bottom: 18px;
}
.field:last-child {
  margin-bottom: 0;
}
.field label {
  display: block;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 7px;
}
.field .hint {
  font-weight: 400;
  color: var(--stone);
  font-size: 13px;
}
.field input,
.field select {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-wash);
}
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.seg {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.seg button {
  flex: 1;
  min-width: 72px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  background: #fff;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-soft);
}
.seg button.on {
  border-color: var(--orange);
  background: var(--orange-wash);
  color: var(--orange-deep);
}

/* Result */
.result {
  margin-top: 22px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  text-align: center;
}
.result .big {
  font-size: clamp(40px, 9vw, 60px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}
.result .label {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 6px;
}
.result .sub {
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  margin-top: 8px;
}
.result.good {
  background: var(--sage);
}
.result.warn {
  background: var(--amber);
}
.result.bad {
  background: var(--sienna);
}

/* Callout / formula */
.note {
  background: var(--paper);
  border: 1px solid var(--rule-soft);
  border-left: 3px solid var(--orange);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 20px 0;
}
.formula {
  font-family: "JetBrains Mono", "SFMono-Regular", Menlo, monospace;
  background: var(--paper);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 15px;
  overflow-x: auto;
}
table.tbl {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 15px;
}
table.tbl th,
table.tbl td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
}
table.tbl th {
  font-weight: 700;
  background: var(--paper);
}

/* FAQ */
.faq details {
  border-bottom: 1px solid var(--rule);
  padding: 14px 0;
}
.faq summary {
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  font-size: 17px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  color: var(--orange);
  font-weight: 800;
}
.faq details[open] summary::after {
  content: "\2212";
}
.faq details p {
  margin: 12px 0 2px;
  color: var(--ink-soft);
}

/* CTA */
.cta {
  margin: 44px 0;
  padding: 34px 28px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #151515, #0d0d0d);
  color: #fff;
  text-align: center;
}
.cta h2 {
  color: #fff;
  margin: 0 0 10px;
}
.cta p {
  color: rgba(255, 255, 255, 0.75);
  max-width: 52ch;
  margin: 0 auto 20px;
}

/* Related links */
.related {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}
.related a {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-weight: 600;
  background: #fff;
}
.related a:hover {
  border-color: var(--orange);
  background: var(--orange-wash);
  text-decoration: none;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 40px;
  padding: 30px 0;
  color: var(--stone);
  font-size: 14px;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer a {
  color: var(--stone);
}

/* Breadcrumb */
.crumbs {
  font-size: 13px;
  color: var(--stone);
  padding: 20px 0 0;
}
.crumbs a {
  color: var(--stone);
}
.crumbs a:hover {
  color: var(--orange-deep);
}

/* Article meta */
.meta {
  color: var(--stone);
  font-size: 14px;
  margin: 0 0 8px;
}
.content .lead {
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 0 24px;
}
.content blockquote {
  margin: 20px 0;
  padding: 4px 18px;
  border-left: 3px solid var(--orange);
  color: var(--ink-soft);
  font-style: italic;
}

/* Blog index cards (WordPress-style, with featured image) */
.posts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 28px 0;
}
.post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.05s ease,
    box-shadow 0.15s ease;
}
.post-card:hover {
  border-color: var(--orange);
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 2px 4px rgba(13, 13, 13, 0.05), 0 16px 34px rgba(13, 13, 13, 0.1);
}
.post-thumb {
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  display: block;
  background: #0d0d0d;
}
.post-body {
  padding: 18px 20px 20px;
}
.post-card .tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--orange-deep);
}
.post-card h3 {
  margin: 7px 0 6px;
  font-size: 19px;
  line-height: 1.25;
}
.post-card p {
  margin: 0;
  color: var(--stone);
  font-size: 14.5px;
}
/* Pillar card: horizontal, image + dark body */
.post-card.pillar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  padding: 0;
}
.post-card.pillar .post-thumb {
  height: 100%;
  aspect-ratio: auto;
  min-height: 240px;
}
.post-card.pillar .post-body {
  background: linear-gradient(135deg, #17171d, #0d0d0d);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px 34px;
}
.post-card.pillar .tag {
  color: var(--orange);
}
.post-card.pillar h3 {
  font-size: 26px;
  margin-top: 8px;
}
.post-card.pillar p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
}

/* Article featured image */
.post-hero-img {
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  margin: 6px 0 4px;
  background: #0d0d0d;
  box-shadow: var(--shadow);
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
  .row,
  .related,
  .posts {
    grid-template-columns: 1fr;
  }
  .post-card.pillar {
    grid-template-columns: 1fr;
  }
  .post-card.pillar .post-thumb {
    aspect-ratio: 1200 / 630;
    min-height: 0;
  }
  .hero {
    padding: 36px 0 4px;
  }
}
