/* legalcostcalc.com */

@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/be-vietnam-pro-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/be-vietnam-pro-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/be-vietnam-pro-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/source-serif-4-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/source-serif-4-700.woff2') format('woff2');
}

:root {
  --font-heading: 'Source Serif 4', Georgia, serif;
  --font-body: 'Be Vietnam Pro', system-ui, sans-serif;
  --text: #1a1a1a;
  --text-muted: #68635d;
  --bg: #f5f3f0;
  --surface: #fff;
  --border: #d9d5ce;
  --border-light: #e8e5df;
  --primary: #1e3a5f;
  --primary-dark: #152b47;
  --accent: #2e7d32;
  --accent-bg: #f0faf3;
  --green: #1a7f37;
  --green-bg: #f0faf3;
  --green-border: #bfe5cb;
  --green-text: #15803d;
  --radius: 2px;
  --max-width: 840px;
}

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

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* --- Skip link --- */

.skip-to-main {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}
.skip-to-main:focus {
  left: 0;
}

/* --- Header --- */

.site-header {
  background: var(--surface);
  padding: 0 1.5rem;
  height: 60px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header > a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.site-logo {
  height: 40px;
  width: auto;
  display: block;
}
.site-nav {
  display: flex;
  gap: 1.5rem;
}
.site-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.site-nav a:hover { color: var(--text); }

/* --- Layout --- */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

/* --- Footer --- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.8;
}
.site-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
.site-footer a:hover { text-decoration: underline; }

/* --- Typography --- */

h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin-bottom: 0.5rem;
  color: var(--text);
}

/* Base h2: category labels (homepage sections, etc.) */
h2 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 2.25rem 0 0.4rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border-light);
}

h3 {
  font-size: 0.92rem;
  font-weight: 600;
  margin: 1.25rem 0 0.3rem;
}

p { margin-bottom: 0.9rem; }

.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 1.75rem;
}

/* --- Breadcrumb --- */

.breadcrumb {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}
.breadcrumb-sep {
  margin: 0 0.35rem;
  color: var(--border);
}

/* --- Quick answer box --- */

.quick-answer {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 3px solid #3b82f6;
  border-radius: 2px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
}
.quick-answer strong {
  color: #1e40af;
}

/* --- Calculator form --- */

.calc-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.calc-field { margin-bottom: 1rem; }

.calc-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 0.84rem;
  color: var(--text);
}

.calc-field select,
.calc-field input[type="number"] {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--text);
  appearance: none;
  -webkit-appearance: none;
}

.calc-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2368635d' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  padding-right: 2rem;
}

.calc-field select.calc-error,
.calc-field input.calc-error {
  border-color: #dc2626;
}

.calc-field select:focus-visible,
.calc-field input[type="number"]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-color: var(--primary);
}

.calc-field .field-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.calc-checkbox {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.calc-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}
.calc-checkbox label {
  font-weight: 500;
  font-size: 0.88rem;
  margin-bottom: 0;
}

/* --- Button --- */

.calc-btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.55rem 1.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-body);
  border-radius: var(--radius);
  cursor: pointer;
  margin-top: 0.35rem;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.calc-btn:hover { background: var(--primary-dark); color: #fff; }
.calc-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* --- Results --- */

.calc-result {
  display: none;
  margin-top: 1.25rem;
  padding: 1.25rem;
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  border-radius: var(--radius);
}
.calc-result.visible { display: block; }

.calc-result > strong {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  text-align: center;
  margin-top: 0.6rem;
}

.result-item { padding: 0.4rem 0; }

.result-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.1rem;
}

.result-value {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--green-text);
  letter-spacing: -0.02em;
}
.result-value.avg { font-size: 2rem; }

/* --- Disclaimer --- */

.disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--green-border);
}

/* --- CTA --- */

.cta-box {
  background: var(--accent-bg);
  border: 1px solid var(--green-border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1.5rem 0;
}
.cta-box p {
  margin-bottom: 0.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}
.cta-box .calc-btn,
.content .cta-box .calc-btn {
  margin-top: 0;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}
.cta-box .calc-btn:hover,
.content .cta-box .calc-btn:hover { background: var(--primary-dark); color: #fff; }

/* --- Content (article/editorial sections) --- */

.content h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--text);
  border-bottom: none;
  padding-bottom: 0;
}

.content h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

.content ul, .content ol { margin: 0 0 0.9rem 1.5rem; }
.content li { margin-bottom: 0.3rem; }
.content p { line-height: 1.75; }

.content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.content a:hover { color: var(--primary-dark); }

/* --- Cost tables --- */

.cost-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0 1.25rem;
  font-size: 0.86rem;
}
.cost-table th,
.cost-table td {
  padding: 0.5rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}
.cost-table thead th {
  background: var(--bg);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.cost-table tbody tr:last-child td { border-bottom: none; }
.cost-table tbody td:last-child {
  font-weight: 600;
  white-space: nowrap;
}
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* --- Last updated --- */

.last-updated {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* --- FAQ --- */

.faq-item { margin-bottom: 1.25rem; }
.faq-item h3 {
  margin-bottom: 0.15rem;
  color: var(--text);
}

/* --- Homepage grid --- */

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.5rem;
  margin-top: 0.4rem;
  margin-bottom: 0.25rem;
}

.calc-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  text-decoration: none;
  color: var(--text);
}
.calc-card:hover {
  border-color: var(--primary);
}
.calc-card h3 {
  margin: 0 0 0.1rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--primary);
}
.calc-card p {
  margin: 0;
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* --- Embed widget --- */

.embed-cta {
  margin-top: 0.75rem;
  text-align: center;
}
.embed-cta a {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.embed-cta a:hover { color: var(--text); }

.embed-box {
  margin-top: 0.5rem;
  padding: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.embed-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.embed-code {
  width: 100%;
  font-family: monospace;
  font-size: 0.75rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  resize: none;
  margin-bottom: 0.5rem;
}
.embed-copy {
  font-size: 0.78rem;
  padding: 0.4rem 1rem;
}

/* --- Ad placeholders: hidden until approved --- */

.ad-slot { display: none; }

/* --- Responsive --- */

@media (max-width: 600px) {
  h1 { font-size: 1.5rem; }
  .content h2 { font-size: 1.15rem; }
  .site-logo { height: 34px; }
  .site-header { height: 52px; }
  .container { padding: 1.5rem 1rem; }
  .calc-wrap { padding: 1rem; }
  .calc-field select,
  .calc-field input[type="number"] { padding: 0.75rem 0.65rem; font-size: 1rem; }
  .calc-btn { padding: 0.75rem 1.4rem; font-size: 1rem; }
  .result-grid { grid-template-columns: 1fr; }
  .result-value { font-size: 1.3rem; }
  .result-value.avg { font-size: 1.5rem; }
  .calc-grid { grid-template-columns: 1fr; }
}
