/* GreenScale capstone report - mirrors the docx template (Times New Roman, A4, bold headings). */
:root {
    --ink: #000;
    --paper: #fff;
    --rule: #cfcfcf;
    --green: #16a34a;
    --serif: 'Times New Roman', Times, 'Liberation Serif', serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body {
    margin: 0; padding: 0;
    background: #e5e7eb;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 12pt; line-height: 1.4;
}

/* Top utility bar (web only - hidden on print) */
.report-bar {
    background: #0a0e14; color: #e5e7eb;
    padding: 12px 24px;
    display: flex; align-items: center; justify-content: space-between;
    font-family: var(--sans); font-size: 13px;
    position: sticky; top: 0; z-index: 50;
}
.report-bar .left { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.report-bar .logo {
    width: 24px; height: 24px; border-radius: 6px;
    background: linear-gradient(135deg, #4ade80 0%, #14b8a6 100%);
    display: flex; align-items: center; justify-content: center;
    color: #0a0e14; font-weight: 800; font-size: 14px;
}
.report-bar a { color: #4ade80; text-decoration: none; padding: 6px 12px; border-radius: 6px; }
.report-bar a:hover { background: #182230; }
.report-bar .actions { display: flex; gap: 6px; }
.report-bar .download {
    background: #4ade80; color: #0a0e14; font-weight: 700;
}
.report-bar .download:hover { background: #22c55e; }

/* The "page" - matches Word A4 */
.page {
    background: var(--paper);
    width: 210mm;
    min-height: 297mm;
    margin: 24px auto;
    padding: 25.4mm;            /* 1 inch standard Word margin */
    box-shadow: 0 4px 30px rgba(0,0,0,0.15);
    page-break-after: always;
}
.page.cover {
    display: flex; flex-direction: column;
    align-items: center; text-align: center;
    padding-top: 14mm;
}

/* Cover page typography matches the docx exactly */
.cover-title {
    font-size: 18pt; font-weight: 700;
    margin: 0 0 12mm 0; line-height: 1.2;
}
.cover-line {
    font-size: 14pt; font-weight: 700;
    margin: 6pt 0; line-height: 1.3;
}
.cover-spacer { flex: 1; min-height: 24mm; }
.cover-info {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 8pt 32pt; text-align: left;
    margin: 12mm auto;
    max-width: 140mm;
}
.cover-info .field {
    font-size: 14pt; font-weight: 700;
}
.cover-uni {
    font-size: 14pt; font-weight: 700;
    margin-top: auto; line-height: 1.4;
}

/* Section pages */
.section-h {
    font-size: 12pt; font-weight: 700;
    margin: 0 0 12pt 0;
    text-decoration: underline;        /* match the way the original template prints */
}
.h-large {
    font-size: 14pt; font-weight: 700;
    margin: 0 0 10pt 0;
}
.body-p {
    font-size: 12pt;
    text-align: justify;
    margin: 0 0 10pt 0;
    text-indent: 0;
}
.body-p:first-of-type { margin-top: 0; }

/* Table of Contents */
.toc {
    list-style: none; padding: 0; margin: 0;
}
.toc li {
    display: flex; align-items: baseline;
    font-size: 12pt; padding: 4pt 0;
    border-bottom: 1px dotted var(--rule);
}
.toc li a { color: var(--ink); text-decoration: none; flex: 1; }
.toc li a:hover { color: var(--green); }
.toc li .pn { font-variant-numeric: tabular-nums; padding-left: 8pt; color: #555; }

/* Q&A */
.qa-q {
    font-size: 12pt; font-weight: 700;
    margin: 14pt 0 4pt 0;
}
.qa-a {
    font-size: 12pt; text-align: justify;
    margin: 0 0 10pt 0;
}

/* References */
.refs { padding-left: 0; list-style: none; counter-reset: rcount; }
.refs li {
    counter-increment: rcount;
    margin-bottom: 8pt; padding-left: 28pt; position: relative;
    text-align: justify; font-size: 12pt;
}
.refs li::before {
    content: '[' counter(rcount) ']';
    position: absolute; left: 0; font-weight: 700;
}

/* Print styles */
@media print {
    body { background: white; }
    .report-bar { display: none; }
    .page { margin: 0; box-shadow: none; }
}

/* Mobile: still show report, but slim padding */
@media (max-width: 720px) {
    .page { width: 100%; padding: 16px; min-height: auto; }
    .cover-info { grid-template-columns: 1fr; }
    .report-bar { padding: 10px 12px; font-size: 12px; }
    .report-bar a { padding: 4px 8px; }
}
