/* ============================================================
   GoBuildMy — Design System
   Light, low-saturation, clean. No underlines, no decorative lines.
   ============================================================ */

:root {
  --bg: #F7F9FC;
  --surface: #FFFFFF;
  --ink: #1F2937;
  --muted: #64748B;
  --border: #E2E8F0;
  --primary: #6E90D0;
  --primary-deep: #3E5C93;
  --accent: #5FA096;
  --accent-deep: #2F6B62;
  --warn: #B45309;
  --danger: #DC2626;
  --ideal-bg: #EDF7F5;
  --ideal-bd: #BFE0DA;
  --ideal-ink: #2F6B62;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
  --shell: 1160px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 6px 24px rgba(30, 58, 95, 0.06);
  --shadow-lift: 0 12px 34px rgba(30, 58, 95, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Layout ---------- */
.shell { max-width: var(--shell); margin: 0 auto; padding: 0 24px; }
main { display: block; }
picture { display: block; min-width: 0; }
picture img { display: block; width: 100%; height: auto; }
.section { padding: 58px 0; }
.section-tight { padding: 40px 0; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 400;
  line-height: 1.3;
  text-wrap: balance;
  overflow-wrap: anywhere;
  margin: 0 0 1rem;
}
h1 { font-size: clamp(2rem, 1.45rem + 2.8vw, 3.75rem); line-height: 1.24; margin-bottom: clamp(20px, 2.2vw, 32px); }
h2 { font-size: clamp(1.625rem, 1.3rem + 1.25vw, 2.25rem); margin-top: 8px; }
h3 { font-size: clamp(1.3125rem, 1.2rem + .5vw, 1.5625rem); }
h4 { font-size: 17px; }
p { margin: 0 0 16px; }
strong { color: var(--ink); }
.eyebrow {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 12px;
}
.lede { font-size: 17px; color: var(--muted); max-width: 720px; line-height: 1.7; }
.section-head { max-width: 720px; margin-bottom: 32px; }
.section-head p { color: var(--muted); font-size: 16px; }
.muted { color: var(--muted); }

/* ---------- Links: gradient highlighter, no underline ---------- */
a { color: var(--primary-deep); text-decoration: none; transition: color .18s ease; }
a:hover { color: #28436F; }
.prose p a, .prose li a, .prose td a,
.card-copy a, .note a, .breadcrumb a:last-child {
  color: var(--primary-deep);
  background-image: linear-gradient(100deg, rgba(110,144,208,0.16) 0%, rgba(110,144,208,0.16) 38%, rgba(95,160,150,0.26) 100%);
  background-size: 220% 100%;
  background-position: 0% 0;
  border-radius: 3px;
  padding: 1px 5px;
  transition: background-position .4s ease, color .2s ease;
}
.prose p a:hover, .prose li a:hover, .prose td a:hover,
.card-copy a:hover, .note a:hover {
  background-position: 100% 0;
  color: #28436F;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { min-height: 68px; display: flex; align-items: center; gap: 26px; }
.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand img { width: 34px; height: 34px; }
.brand span { font-family: var(--serif); font-size: 22px; font-weight: 400; color: var(--ink); letter-spacing: -.02em; line-height: .96; }

.desktop-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-item { position: relative; }
.nav-item > a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: #475569;
  font-size: 14px;
  font-weight: 600;
}
.nav-item > a:hover { background: var(--bg); color: var(--primary-deep); }
.nav-item > a svg { width: 12px; height: 12px; opacity: .6; }
.nav-item.active > a { color: var(--primary-deep); }

.mega {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 620px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  padding: 22px 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.nav-item:hover .mega, .nav-item:focus-within .mega { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.mega-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mega-grid.two { grid-template-columns: repeat(2, 1fr); }
.mega-col h5 { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; font-family: var(--sans); }
.mega-col a { display: block; padding: 6px 0; font-size: 13.5px; color: #334155; border-radius: 4px; }
.mega-col a:hover { color: var(--primary-deep); }
.badge-3d {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent-deep);
  background: var(--ideal-bg);
  padding: 2px 6px;
  border-radius: 5px;
  margin-left: 6px;
  vertical-align: 1px;
}

.menu-toggle { display: none; margin-left: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px; cursor: pointer; }
.menu-toggle svg { width: 22px; height: 22px; color: var(--ink); }
.mobile-drawer { display: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding: 48px 24px 36px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { color: var(--muted); font-size: 13.5px; max-width: 260px; }
.footer-col h5 { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; font-family: var(--sans); }
.footer-col a { display: block; padding: 4px 0; font-size: 13.5px; color: #475569; }
.footer-col a:hover { color: var(--primary-deep); }
.footer-bottom { border-top: 1px solid var(--border); padding: 20px 24px 28px; font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--primary-deep); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: left;
  display: block;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: #CFDCEF; color: inherit; }
.method-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; align-items: center; }
.method-card img { border-radius: var(--radius-sm); }
.card-icon { width: 40px; height: 40px; border-radius: 11px; background: #EEF3FB; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.card-icon svg { width: 22px; height: 22px; color: var(--primary-deep); }
.card h3 { margin-bottom: 12px; font-size: 19px; line-height: 1.4; }
.card .card-copy { color: var(--muted); font-size: 14px; line-height: 1.7; margin: 0; }
.card-meta { margin-top: 16px; font-size: 12px; font-weight: 700; color: var(--accent-deep); letter-spacing: .02em; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--sans);
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #16213A; border-color: #5B7DC0; }
.btn-primary:hover { box-shadow: 0 8px 20px rgba(110,144,208,.3); color: #16213A; }
.btn-accent { background: var(--accent); color: #142E2A; border-color: #4C8D83; }
.btn-accent:hover { box-shadow: 0 8px 20px rgba(95,160,150,.3); color: #142E2A; }
.btn-ghost { background: var(--surface); color: var(--primary-deep); border-color: var(--border); }
.btn-ghost:hover { border-color: #CFDCEF; }
.btn svg { width: 16px; height: 16px; }

/* ---------- Badges & pills ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; border-radius: 7px; background: #EEF3FB; color: var(--primary-deep); }
.badge.teal { background: var(--ideal-bg); color: var(--accent-deep); }
.badge.amber { background: #FDF3E7; color: var(--warn); }
.badge.red { background: #FDECEC; color: var(--danger); }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 999px; background: var(--bg); color: var(--muted); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; padding-top: clamp(18px, 2.4vw, 32px); font-size: 11px; color: var(--muted); margin-bottom: clamp(22px, 2.4vw, 34px); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary-deep); }
.breadcrumb span { opacity: .5; }

/* ---------- Hero ---------- */
.hero { padding: 132px 0 118px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: clamp(36px, 5vw, 72px); align-items: center; }
.hero .eyebrow { margin-bottom: clamp(20px, 2.6vw, 34px); }
.hero h1 { margin-bottom: clamp(24px, 3vw, 44px); font-size: clamp(2.5rem, 1.9rem + 2.7vw, 4.25rem); }
.hero .lede { margin-bottom: 0; max-width: 500px; line-height: 1.95; font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 48px; }
.hero-art { border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }

/* ---------- Prose (article body) ---------- */
.prose, main.shell > figure { max-width: 760px; }
.prose h2 { margin: clamp(36px, 4vw, 52px) 0 18px; }
.prose h3 { margin: 32px 0 12px; }
.prose p, .prose li {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.95;
  color: #334155;
}
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 18px; }
.prose li { margin-bottom: 8px; }
.prose blockquote { margin: 26px 0; padding: 18px 22px; background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow); font-family: var(--serif); font-size: 23px; font-weight: 400; line-height: 1.7; color: #475569; }
.prose table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 14px; background: var(--surface); border-radius: var(--radius-sm); overflow: hidden; }
.prose th, .prose td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { font-family: var(--sans); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: #FAFCFE; }
.prose figure { margin: 26px 0; }
.prose figcaption { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
figure img { border-radius: var(--radius-sm); }

/* ---------- Note / callout ---------- */
.note { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px 20px; margin: 24px 0; font-size: 14.5px; }
.note.teal { background: var(--ideal-bg); border-color: var(--ideal-bd); color: var(--ideal-ink); }
.note.amber { background: #FDF6EC; border-color: #F2DFC4; color: #8A5A16; }
.note.red { background: #FDF0F0; border-color: #F4D2D2; color: #9B2C2C; }
.note strong { display: block; margin-bottom: 4px; }

/* ---------- Consent bar ---------- */
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 200; background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -8px 30px rgba(30,58,95,.08); padding: 16px 24px; display: none; }
.consent.show { display: block; }
.consent-inner { max-width: var(--shell); margin: 0 auto; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.consent p { margin: 0; font-size: 13px; color: var(--muted); flex: 1 1 460px; }
.consent p a { color: var(--primary-deep); }
.consent-actions { display: flex; gap: 10px; }
.consent .btn { padding: 9px 16px; font-size: 13px; }

/* ---------- Tool shell ---------- */
.tool-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.tool-head { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tool-head h2 { font-size: 21px; margin: 0; }
.tool-body { display: grid; grid-template-columns: minmax(260px, 330px) 1fr; }
.tool-inputs { padding: 22px 24px; border-right: 1px solid var(--border); }
.tool-output { padding: 22px 24px; min-width: 0; }
.field { margin-bottom: 16px; }
.field label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 12.5px; font-weight: 600; color: #475569; margin-bottom: 6px; }
.field label b { color: var(--primary-deep); font-variant-numeric: tabular-nums; }
.field select, .field input[type=number], .field input[type=range] { width: 100%; }
.field select, .field input[type=number] {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  outline: none;
}
.field select:focus, .field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(110,144,208,.14); }
.field input[type=range] { accent-color: var(--primary); cursor: pointer; height: 20px; }
.field-scale { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.tool-actions { display: flex; gap: 10px; margin-top: 20px; }
.svg-stage { width: 100%; background: #FAFCFE; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.svg-stage svg { display: block; width: 100%; height: auto; }
.result-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
.result { background: var(--bg); border-radius: var(--radius-sm); padding: 13px 15px; }
.result span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.result b { font-family: var(--serif); font-size: 22px; color: var(--ink); font-variant-numeric: tabular-nums; }
.result b small { font-family: var(--sans); font-size: 12px; font-weight: 600; color: var(--muted); }
.diag { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-sm); font-size: 13.5px; }
.diag strong { display: block; margin-bottom: 4px; }
.diag.ideal { background: var(--ideal-bg); color: var(--ideal-ink); }
.diag.warn { background: #FDF6EC; color: #8A5A16; }
.diag.danger { background: #FDF0F0; color: #9B2C2C; }

/* ---------- FAQ ---------- */
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px 20px; margin-bottom: 12px; }
.faq-item h3 { font-family: var(--sans); font-size: 15px; line-height: 1.45; margin: 0 0 10px; }
.faq-item p { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- Related ---------- */
.related { display: grid; gap: 12px; }
.related a { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 18px; font-size: 14px; font-weight: 600; color: var(--ink); }
.related a:hover { border-color: #CFDCEF; color: var(--primary-deep); }
.related svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--muted); }

/* ---------- Legal pages ---------- */
.legal-main { padding: 48px 24px 72px; }
.legal-main .eyebrow { color: var(--primary-deep); }
.legal-main h1 { font-size: clamp(30px, 4.4vw, 42px); }
.legal-main h2 { font-size: 24px; margin-top: 40px; }
.legal-main h3 { font-size: 17px; margin-top: 24px; }
.legal-main ol { padding-left: 22px; }
.legal-main table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
.legal-main th, .legal-main td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.legal-main th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; background: #FAFCFE; }
.legal-status, .status { background: #EDF2FB; border-radius: 8px; padding: 10px 14px; font-size: 13px; margin: 18px 0 0; color: var(--primary-deep); }
.legal-main p a, .legal-main li a, .legal-main td a {
  color: var(--primary-deep);
  background-image: linear-gradient(100deg, rgba(110,144,208,0.16) 0%, rgba(110,144,208,0.16) 38%, rgba(95,160,150,0.26) 100%);
  background-size: 220% 100%;
  background-position: 0% 0;
  border-radius: 3px;
  padding: 1px 5px;
  transition: background-position .4s ease, color .2s ease;
}
.legal-main p a:hover, .legal-main li a:hover, .legal-main td a:hover { background-position: 100% 0; color: #28436F; }

/* ---------- 404 ---------- */
.error-wrap { text-align: center; padding: 90px 0 100px; }
.error-code { font-family: var(--serif); font-size: clamp(90px, 18vw, 170px); line-height: .95; color: #DCE6F4; margin: 0; letter-spacing: -.04em; }
.error-wrap h1 { font-size: 32px; margin: 10px 0 12px; }
.error-wrap .lede { margin: 0 auto 30px; }
.error-links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .desktop-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .header-inner { justify-content: space-between; }
  .mobile-drawer { display: block; max-height: 0; overflow: hidden; transition: max-height .3s ease; border-top: 1px solid transparent; }
  .mobile-drawer.open { max-height: 80vh; overflow-y: auto; border-top-color: var(--border); }
  .mobile-inner { padding: 14px 24px 26px; }
  .m-group { border-bottom: 1px solid var(--border); }
  .m-group > button { width: 100%; display: flex; justify-content: space-between; align-items: center; background: none; border: 0; padding: 14px 0; font-family: var(--sans); font-size: 15px; font-weight: 700; color: var(--ink); cursor: pointer; }
  .m-group > button svg { width: 14px; height: 14px; transition: transform .2s ease; }
  .m-group.open > button svg { transform: rotate(90deg); }
  .m-links { display: none; padding: 0 0 14px; }
  .m-group.open .m-links { display: block; }
  .m-links a { display: block; padding: 8px 0; font-size: 13.5px; color: var(--muted); }
  .m-links a:hover { color: var(--primary-deep); }
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .tool-body { grid-template-columns: 1fr; }
  .tool-inputs { border-right: 0; border-bottom: 1px solid var(--border); }
}
@media (max-width: 720px) {
  .method-card { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .prose table { display: block; overflow-x: auto; }
  .shell { padding: 0 18px; }
  .section { padding: 42px 0; }
  .hero { padding: 50px 0 40px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stat-row { gap: 18px; flex-wrap: wrap; }
  .footer-grid { grid-template-columns: 1fr; padding: 36px 18px 26px; }
  .footer-bottom { padding: 18px 18px 24px; }
  .result-grid { grid-template-columns: 1fr 1fr; }
  .consent-inner { flex-direction: column; align-items: stretch; }
  .consent-actions { flex-wrap: wrap; }
}
