/* -----------------------------------------------------------
   RESET & BASE
----------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root{
  --bg0:#f8f9fb;
  --bg1:#eef2f7;
  --ink:#111;
  --ink-2:#333;
  --ink-3:#555;
  --card:#fff;
  --border:#e2e4ea;
  --accent1:#667eea;
  --accent2:#764ba2;
  --accent3:#ff758c;
  --shadow:0 8px 28px rgba(16,24,40,.08);
  --radius:14px;
}

html { scroll-behavior:smooth; }

body{
  font-family: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(60rem 40rem at 15% 15%, rgba(102,126,234,.08), transparent 55%),
    linear-gradient(180deg, var(--bg0) 0%, var(--bg1) 100%);
  line-height: 1.7;
  padding: 2.5rem 1.5rem 3rem;
}

/* -----------------------------------------------------------
   ACCESSIBILITY
----------------------------------------------------------- */
.skip{
  position:absolute;
  left:-9999px;
  top:auto;
}
.skip:focus{
  left:1rem;
  top:1rem;
  background:#fff;
  padding:.5rem .75rem;
  border:1px solid var(--border);
  border-radius:8px;
  z-index:10;
}

/* -----------------------------------------------------------
   MASTHEAD
----------------------------------------------------------- */
.masthead{
  max-width: 1240px;
  margin: 0 auto 2rem;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:1.25rem;
  flex-wrap:wrap;
}

.logo{
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing:.02em;
  background: linear-gradient(90deg, var(--accent1), var(--accent2), var(--accent3));
  -webkit-background-clip: text;
  background-clip:text;
  color: transparent;
}

.badge{
  color: var(--ink-3);
  font-size: .95rem;
  margin-top: .25rem;
}

.mast-actions{
  display:flex;
  align-items:center;
  gap:.75rem;
  flex-wrap:wrap;
}

.meta{
  color:#6b7280;
  font-size:.9rem;
}

.btn{
  display:inline-block;
  padding:.55rem .95rem;
  border-radius:10px;
  text-decoration:none;
  font-weight:600;
  transition:all .18s ease;
  border:1px solid var(--border);
  font-size:.95rem;
}

.btn-primary{
  background:#111;
  color:#fff;
  border-color:#111;
}
.btn-primary:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.mast-actions .btn-primary {
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  line-height: 1;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


/* -----------------------------------------------------------
   LAYOUT (LINEAR-STYLE GRID)
----------------------------------------------------------- */
.layout{
  max-width: 1240px;
  margin: 0 auto 2.75rem;
  display:grid;
  grid-template-columns: 220px minmax(0, 1fr);
  column-gap: 2.75rem;
  align-items:flex-start;
}

/* -----------------------------------------------------------
   TABLE OF CONTENTS (LEFT COLUMN)
----------------------------------------------------------- */
.toc{
  position: sticky;
  top: 2rem;
  width: 220px;
  left: -70px;
  align-self:flex-start;
  padding-top:.25rem;
  font-size:.92rem;
  color:#4b5563;
}

.toc-title{
  font-size:.85rem;
  text-transform:uppercase;
  letter-spacing:.11em;
  color:#9ca3af;
  margin-bottom:.5rem;
}

.toc ol{
  list-style:decimal;
  padding-left:1.2rem;
}

.toc li {
  white-space: nowrap;
  overflow: visible;
  text-overflow: unset;
}


.toc a{
  font-size: 0.92rem;
  color:#374151;
  text-decoration:none;
}
.toc a:hover{
  text-decoration:underline;
}

/* -----------------------------------------------------------
   DOCUMENT CARD (RIGHT COLUMN)
   Border-only card, no shadow
----------------------------------------------------------- */
.doc{
  background: var(--card);
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.4rem 2.8rem;
}

/* Let text use the full column width (grid controls width) */
.doc p,
.doc ul,
.doc ol{
  font-size:1.02rem;
}

/* -----------------------------------------------------------
   HEADINGS
----------------------------------------------------------- */
.section-title{
  font-size: 1.85rem;
  font-weight: 800;
  color:#0f172a;
  padding-bottom:.7rem;
  margin-bottom:1.5rem;
  border-bottom:1px solid #e5e7eb;
  white-space: nowrap; /* keeps "Problem Statement" on one line at desktop widths */
}

.doc h3{
  font-size: 1.28rem;
  font-weight: 700;
  color:#111;
  margin-top:1.9rem;
  margin-bottom:.7rem;
}

.doc h4{
  font-size: 1.12rem;
  font-weight: 700;
  color:#1f2937;
  margin-top:1.4rem;
  margin-bottom:.45rem;
}

/* -----------------------------------------------------------
   TEXT & LISTS
----------------------------------------------------------- */
.doc p{
  margin-bottom: 1rem;
}

.tight li{ margin-bottom:.4rem; }
.labeled li{ margin-bottom:.55rem; }
.labeled strong{ color:#111; }

ul{
  padding-left: 1.25rem;
}

ul ul{
  padding-left: 1.25rem;
  margin-top:.3rem;
  list-style: disc;
}

/* -----------------------------------------------------------
   FOOTER
----------------------------------------------------------- */
.site-footer{
  max-width:1240px;
  margin:0 auto;
  padding-top:1.5rem;
  border-top:1px solid var(--border);
  text-align:center;
  color:#6b7280;
  font-size:.9rem;
}

/* -----------------------------------------------------------
   RESPONSIVE
----------------------------------------------------------- */
@media (max-width: 960px){
  .layout{
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
  }

  .toc{
    position: static;
    margin-bottom: 1.5rem;
  }

  .doc{
    padding: 2rem 1.6rem;
  }

  .section-title{
    white-space: normal; /* allow wrap on smaller screens */
  }
}

@media (max-width: 640px){
  body{
    padding: 1.75rem 1rem 2.25rem;
  }

  .masthead{
    margin-bottom:1.5rem;
  }

  .mast-actions{
    width:100%;
    justify-content:flex-start;
  }

  .logo{
    font-size: 2rem;
  }
}

/* -----------------------------------------------------------
   PRINT
----------------------------------------------------------- */
@media print{
  body{
    background:#fff;
    padding:0;
  }
  .masthead,
  .site-footer{
    max-width:100%;
    margin:0 0 1rem;
    padding:0 1rem;
  }
  .layout{
    max-width:100%;
    margin:0;
    display:block;
  }
  .toc{
    display:none;
  }
  .doc{
    border:1px solid #ddd;
    border-radius:0;
    padding:1.5rem;
  }
  .mast-actions{
    display:none;
  }
}

/* -----------------------------------------------------------
   LEAD CAPTURE FORM (Inline with Project Card)
----------------------------------------------------------- */
.lead-capture {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 2.4rem 2.8rem;
  margin-top: 2.5rem;
  grid-column: 2;
}

.lead-capture h2 {
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  color: var(--ink);
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0.6rem;
}

.lead-capture p {
  font-size: 1.02rem;
  margin-bottom: 1.5rem;
  color: var(--ink-2);
  max-width: 80ch;
}

.form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  margin-top: 1rem;
}

.form input,
.form textarea {
  width: 100%;
  padding: 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 1rem;
  background: #fff;
}

.form textarea {
  resize: vertical;
}

.form-note {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.checkbox {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.form button {
  margin-top: 1.5rem;
}

.doc ul {
  margin-bottom: 1rem;
}


.doc ol.indented {
  padding-left: 2.5rem;
  margin-bottom: 1.2rem;
  list-style: decimal;        /* ← THIS restores the numbers */
}


.req-map {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.req-map th, 
.req-map td {
  border: 1px solid #dcdfe6;
  padding: 0.6rem 0.75rem;
  text-align: left;
}

.req-map th {
  background: #f3f4f7;
  font-weight: 600;
}

/* -----------------------------------------------------------
   DIAGRAM IMAGES
----------------------------------------------------------- */
.diagram {
  width: 100%;
  max-width: 850px;
  height: auto;
  display: block;
  margin: 2rem auto;
  border-radius: 8px;
}

/* -----------------------------------------------------------
   CODE BLOCKS
----------------------------------------------------------- */
.code-block {
  background: #f6f8fa;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin: 1.25rem 0;
  overflow-x: auto;
  font-size: 0.95rem;
  line-height: 1.45;
  border: 1px solid #e2e4ea;
}

.code-block code {
  white-space: pre;
  display: block;
}

/* -----------------------------------------------------------
   UI SCREENSHOTS
----------------------------------------------------------- */
.screenshot {
  width: 100%;
  max-width: 900px;
  height: auto;
  border-radius: 12px;
  display: block;
  margin: 2rem auto;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}
