/* Freelance Rate & Quote Lab — mobile-first, calm professional light theme */

:root {
  --bg: #f6f4ef;
  --bg-alt: #ebe7de;
  --surface: #ffffff;
  --ink: #1c1a17;
  --ink-muted: #5c574e;
  --border: #d9d3c7;
  --accent: #0f5c4c;
  --accent-hover: #0a463a;
  --accent-soft: #e4f0ec;
  --warn-bg: #f8f1e3;
  --warn-border: #e0c98a;
  --focus: #1a6b9a;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(28, 26, 23, 0.06), 0 8px 24px rgba(28, 26, 23, 0.06);
  --font: "DM Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --max: 1100px;
  --space: 1.25rem;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

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

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
  border-radius: 6px;
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 244, 239, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
}

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

.nav {
  display: none;
  gap: 1.25rem;
  align-items: center;
}

.nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

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

.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
}

.nav-cta:hover {
  background: var(--accent-hover);
  color: #fff !important;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: var(--ink);
  box-shadow: 0 5px 0 var(--ink), 0 -5px 0 var(--ink);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-bottom: 1rem;
}

.mobile-nav[hidden] { display: none; }

.mobile-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  padding: 0.35rem 0;
}

@media (min-width: 768px) {
  .nav { display: flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* Hero */
.hero {
  padding: 3rem 0 2.5rem;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(15, 92, 76, 0.08), transparent 60%),
    var(--bg);
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.lede {
  margin: 0 0 1.5rem;
  max-width: 40rem;
  font-size: 1.1rem;
  color: var(--ink-muted);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.hero-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* Sections */
.section {
  padding: 2.75rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  margin-bottom: 1.5rem;
  max-width: 40rem;
}

.section-head h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--ink-muted);
}

/* Panels & forms */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

@media (min-width: 640px) {
  .panel { padding: 1.5rem; }
}

.fieldset {
  border: 0;
  margin: 0 0 1.1rem;
  padding: 0;
}

.fieldset legend {
  font-weight: 600;
  margin-bottom: 0.5rem;
  padding: 0;
}

.field {
  margin-bottom: 1rem;
}

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

.field input,
.field textarea,
.field select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
}

.field textarea {
  resize: vertical;
  min-height: 6rem;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 92, 76, 0.18);
}

.hint {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.field-row {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 560px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

.input-affix {
  display: flex;
  align-items: stretch;
}

.input-affix .affix {
  display: inline-flex;
  align-items: center;
  padding: 0 0.65rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--ink-muted);
  font-weight: 500;
}

.input-affix .affix:first-child {
  border-right: 0;
  border-radius: 8px 0 0 8px;
}

.input-affix .affix.suffix {
  border-left: 0;
  border-radius: 0 8px 8px 0;
}

.input-affix input {
  border-radius: 0 8px 8px 0;
  flex: 1;
}

.input-affix .affix:first-child + input {
  border-radius: 0 8px 8px 0;
}

.input-affix:has(.suffix) input {
  border-radius: 8px 0 0 8px;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.segmented label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.92rem;
}

.segmented label:has(input:checked) {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.segmented input {
  accent-color: var(--accent);
}

/* Calculator layout */
.calc-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .calc-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }
}

.calc-results {
  background: linear-gradient(180deg, #faf9f6, #f3f0e8);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: sticky;
  top: 4.25rem;
}

.results-title {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.rate-list {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 1.25rem;
}

.rate-list > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px dashed var(--border);
}

.rate-list dt {
  margin: 0;
  color: var(--ink-muted);
  font-weight: 500;
}

.rate-list dd {
  margin: 0;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.muted {
  color: var(--ink-muted);
  font-weight: 400;
  font-size: 0.85em;
}

.result-block {
  margin-bottom: 1.1rem;
}

.result-block h4 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

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

.stat-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.3rem 0;
  font-size: 0.95rem;
}

.stat-list span { color: var(--ink-muted); }

.stat-list strong {
  font-family: var(--mono);
  font-weight: 500;
}

.project-out {
  margin: 0;
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 500;
}

.results-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
}

.copy-status {
  font-size: 0.9rem;
  color: var(--accent);
  min-height: 1.25em;
}

.disclaimer-box {
  margin: 0;
  padding: 0.85rem;
  font-size: 0.82rem;
  line-height: 1.45;
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: 8px;
  color: var(--ink-muted);
}

.disclaimer-box strong {
  color: var(--ink);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--bg-alt);
  color: var(--ink);
}

/* Quote */
.quote-layout {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 960px) {
  .quote-layout {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.quote-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.preview-label {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}

.quote-preview {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow);
  min-height: 28rem;
}

.quote-preview .qp-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.quote-preview h1 {
  margin: 0 0 1.25rem;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.quote-preview .qp-meta {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.quote-preview .qp-meta strong {
  font-weight: 600;
}

.quote-preview h2 {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}

.quote-preview .qp-scope {
  margin: 0 0 1.25rem;
  padding-left: 1.15rem;
}

.quote-preview .qp-scope li {
  margin-bottom: 0.35rem;
}

.quote-preview .qp-row {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 480px) {
  .quote-preview .qp-row {
    grid-template-columns: 1fr 1fr;
  }
}

.quote-preview .qp-box {
  background: var(--bg);
  border-radius: 8px;
  padding: 0.85rem;
}

.quote-preview .qp-box .label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin-bottom: 0.25rem;
}

.quote-preview .qp-price {
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 500;
}

.quote-preview .qp-notes {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-muted);
  white-space: pre-wrap;
}

.quote-preview .qp-footer {
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.quote-preview .qp-placeholder {
  color: var(--ink-muted);
  font-style: italic;
}

/* Upsell & tools */
.upsell h2 {
  margin-top: 0;
}

.upsell .btn {
  margin: 0.5rem 0;
}

.tool-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

@media (min-width: 700px) {
  .tool-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.tool-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.tool-card p {
  margin: 0 0 0.85rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.tool-card a {
  font-weight: 600;
  text-decoration: none;
}

.tool-card a:hover {
  text-decoration: underline;
}

/* Footer */
.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-inner p {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  color: var(--ink-muted);
  max-width: 48rem;
}

.footer-meta {
  font-size: 0.8rem !important;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-alt);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

/* Print — proposal only */
@media print {
  body {
    background: #fff;
    color: #000;
  }

  .no-print,
  .site-header,
  .hero,
  #calculator,
  #gumroad,
  #tools,
  .site-footer,
  .quote-form,
  .preview-label,
  .skip-link {
    display: none !important;
  }

  #quote {
    padding: 0;
    background: #fff;
  }

  .quote-layout {
    display: block;
  }

  .quote-preview-wrap {
    margin: 0;
  }

  .quote-preview {
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    min-height: 0;
  }

  a {
    color: #000;
    text-decoration: none;
  }
}


/* ===== Guide / SEO article pages ===== */
.guide-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}
.guide-main h1 {
  font-size: clamp(1.6rem, 4vw, 2.15rem);
  line-height: 1.25;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}
.guide-main .lead,
.guide-main .lede {
  font-size: 1.125rem;
  color: var(--ink-muted);
  margin: 0 0 1.35rem;
}
.guide-main h2 {
  font-size: 1.3rem;
  margin: 2rem 0 0.65rem;
  line-height: 1.3;
}
.guide-main h3 {
  font-size: 1.08rem;
  margin: 1.35rem 0 0.4rem;
}
.guide-main p { margin: 0 0 1rem; }
.guide-main ul, .guide-main ol {
  margin: 0 0 1.25rem;
  padding-left: 1.35rem;
}
.guide-main li { margin-bottom: 0.4rem; }
.guide-main table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.95rem;
  background: var(--surface);
}
.guide-main th, .guide-main td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.7rem;
  text-align: left;
}
.guide-main th { background: var(--bg-alt); }
.guide-main code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-alt);
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
}
.cta-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.25rem;
  margin: 1.5rem 0;
}
.cta-box p { margin-bottom: 0.75rem; color: var(--ink-muted); }
.cta-box .btn { margin-right: 0.5rem; margin-bottom: 0.35rem; }
.note {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-left-width: 4px;
  padding: 0.85rem 1rem;
  margin: 1.25rem 0;
  font-size: 0.92rem;
  color: var(--ink-muted);
  border-radius: 0 8px 8px 0;
}
.related {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  margin: 2rem 0 1.5rem;
}
.related h2 { margin-top: 0; font-size: 1.15rem; }
.related ul { margin-bottom: 0; }
.soft-promo {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin: 1.5rem 0;
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
}
.guide-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
}
.guide-footer-nav a { color: var(--ink-muted); }
.logo span { color: var(--accent); }
.site-header .nav a.nav-guides { font-weight: 600; }
