/* Salary2Freelance.com — global styles (no framework) */

:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --text: #1a1a18;
  --text-muted: #5c5c56;
  --border: #e8e8e3;
  --accent: #e8450e;
  --blue: #1a5fb4;
  --green: #2d7a3e;
  --radius: 6px;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;
  --max: 880px;
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ——— Header / Nav ——— */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  max-width: var(--max);
  margin: 0 auto;
}

.logo {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.logo span.accent {
  color: var(--accent);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  justify-content: flex-end;
  font-size: 0.9rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--accent);
}

/* ——— Hero ——— */
.hero {
  padding: 2.25rem 0 1.5rem;
}

.hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

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

h1 {
  font-size: clamp(1.55rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 0.65rem;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 42rem;
  margin: 0;
}

/* ——— Cards & calculator grid ——— */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.25rem;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 700px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
}

.col-title {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.col-title.employee {
  color: var(--blue);
  border-bottom-color: rgba(26, 95, 180, 0.35);
}

.col-title.freelance {
  color: var(--accent);
  border-bottom-color: rgba(232, 69, 14, 0.35);
}

.field {
  margin-bottom: 0.9rem;
}

.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.field input,
.field select {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
}

.field input:focus,
.field select:focus {
  outline: 2px solid rgba(26, 95, 180, 0.35);
  outline-offset: 1px;
}

.field .hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.35;
}

/* ——— Results ——— */
.results-block {
  margin-top: 0.5rem;
}

.results-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 700px) {
  .results-row {
    grid-template-columns: 1fr;
  }
}

.result-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.result-box.employee {
  border-left: 4px solid var(--blue);
}

.result-box.freelance {
  border-left: 4px solid var(--accent);
}

.result-box .label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.result-box .amount {
  font-family: var(--font-mono);
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.2;
}

.bar-chart {
  margin: 1rem 0;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
}

.bar-row span.name {
  width: 5.5rem;
  flex-shrink: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.bar-track {
  flex: 1;
  height: 10px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 99px;
}

.bar-fill.employee {
  background: var(--blue);
}

.bar-fill.freelance {
  background: var(--accent);
}

.verdict {
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  margin: 0.75rem 0 0;
}

.verdict.freelance-wins {
  background: rgba(45, 122, 62, 0.1);
  border: 1px solid rgba(45, 122, 62, 0.35);
  color: var(--green);
}

.verdict.employee-wins {
  background: rgba(26, 95, 180, 0.08);
  border: 1px solid rgba(26, 95, 180, 0.35);
  color: var(--blue);
}

.verdict.tie {
  background: var(--border);
  border: 1px solid var(--border);
}

.break-even {
  font-size: 0.9rem;
  margin-top: 0.5rem;
  padding: 0.65rem 0.75rem;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.breakdown-wrap {
  overflow-x: auto;
  margin: 1rem 0;
}

table.breakdown {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

table.breakdown th,
table.breakdown td {
  padding: 0.45rem 0.55rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

table.breakdown th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

table.breakdown td.num {
  font-family: var(--font-mono);
  text-align: right;
  white-space: nowrap;
}

table.breakdown tr.total td {
  font-weight: 700;
  border-top: 2px solid var(--text);
}

/* ——— SEO content ——— */
.seo-section {
  padding: 2rem 0 2.5rem;
}

.seo-section h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  letter-spacing: -0.02em;
}

.seo-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
}

.seo-section p {
  margin: 0 0 1rem;
  color: var(--text);
}

.seo-section .faq-item {
  margin-bottom: 1.25rem;
}

.seo-section .faq-item strong {
  display: block;
  margin-bottom: 0.35rem;
}

/* ——— Footer ——— */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 2rem 1.25rem 2.5rem;
  margin-top: 2rem;
  font-size: 0.9rem;
}

.site-footer h2 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.4rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

.affiliate-box,
.adsense-box {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1.25rem 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
  background: var(--bg);
}

.copyright {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ——— Home ——— */
.home-hero {
  padding: 2.5rem 0 1rem;
}

.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2.5rem;
}

.country-card {
  display: block;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease;
}

.country-card:hover {
  border-color: var(--accent);
}

.country-card .flag {
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.country-card .name {
  font-weight: 700;
  font-size: 1.05rem;
}

.country-card .meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.intro-list {
  padding-left: 1.15rem;
  margin: 1rem 0;
}

.intro-list li {
  margin-bottom: 0.35rem;
}

/* ——— Article ——— */
.article-hero {
  padding: 2rem 0 0.5rem;
}

.article-body {
  padding-bottom: 2rem;
}

.article-body h2 {
  font-size: 1.35rem;
  margin-top: 2rem;
}

.article-body h3 {
  font-size: 1.1rem;
  margin-top: 1.35rem;
}

.prose {
  max-width: 46rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
