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

body {
    font-family: Segoe UI, Roboto, Arial, sans-serif;
    background: #f4f6f9;
    color: #2d3748;
    font-size: 13px;
}

.container {
    width: 95%;
    max-width: 1200px;
    margin: 12px auto 30px;
}


/* =========================================
   HEADER
========================================= */

/* =========================================
   HEADER
========================================= */

.page-header {
    margin-bottom: 18px;
}

.logos {
    display: flex;
    align-items: center;
    gap: 18px;
    height: 48px;
    margin-bottom: 10px;
}

.tudublin-logo {
    width: 62px;
    height: 42px;
    object-fit: contain;
    object-position: left center;
}

.placard-logo {
    width: 105px;
    height: 38px;
    object-fit: contain;
    object-position: left center;
}

.header-title {
    padding-left: 1px;
}

.portal-label {
    display: block;
    color: #53666f;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .8px;
    margin-bottom: 6px;
}

.page-header h1 {
    font-size: 36px;
    line-height: 1;
    color: #102d3b;
    margin-bottom: 9px;
    letter-spacing: -.5px;
}

.subtitle {
    color: #68777d;
    font-size: 12px;
}

/* =========================================
   STUDENT INFORMATION CARDS
========================================= */

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 13px;
}

.card {
    min-height: 81px;
    background: #f8fafb;
    border-radius: 6px;
    border: 1px solid #d5e0e4;
    padding: 12px;
}

.label {
    display: block;
    text-transform: uppercase;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .7px;
    color: #64747b;
    margin-bottom: 5px;
}

.card h3 {
    margin-bottom: 3px;
    color: #102d3b;
    font-size: 12px;
}

.card p {
    color: #475a62;
    font-size: 11px;
    margin-top: 3px;
}


/* =========================================
   MAIN PANEL
========================================= */

.panel {
    background: #fff;
    border-radius: 16px 16px 0 0;
    border: 1px solid #cbd9de;
    padding: 0;
    overflow: hidden;
    box-shadow: none;
}


/* =========================================
   STUDENT NAME
========================================= */

.student-heading {
    padding: 13px 18px 9px;
}

.student-number {
    display: block;
    color: #47616c;
    font-size: 10px;
    margin-bottom: 3px;
}

.student-heading h2 {
    margin: 0;
    font-size: 18px;
    color: #10374a;
}


/* =========================================
   DETAILS
========================================= */

.details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 0 12px 11px;
}

.detail-card {
    background: #eef6f9;
    border: 1px solid #d5e3e7;
    border-radius: 8px;
    padding: 7px 10px;
    min-height: 37px;
}

.detail-card .label {
    margin-bottom: 2px;
}

.detail-card strong {
    display: block;
    margin-top: 2px;
    color: #243f4b;
    font-size: 11px;
}


/* =========================================
   STATEMENT
========================================= */

.statement {
    padding: 0 12px 10px;
}

.statement h3 {
    margin-bottom: 7px;
    color: #12445a;
    font-size: 13px;
}

.statement p {
    color: #53656d;
    font-size: 11px;
    margin-bottom: 4px;
}

.statement strong {
    color: #304d59;
}


/* =========================================
   RESULTS TITLE
========================================= */

.results-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px 6px;
}

.results-title h3 {
    color: #123f53;
    font-size: 13px;
}

.results-title span {
    color: #244c5d;
    font-size: 10px;
}


/* =========================================
   TABLE
========================================= */

.table-container {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}


/* RESULTS TABLE */

.results-table {
    table-layout: fixed;
}

.results-table th {
    background: #e8f3f7;
    color: #31515e;
    padding: 8px 7px;
    text-align: left;
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: .6px;
    line-height: 1.2;
    border: 0;
}

.results-table td {
    padding: 8px 7px;
    border-bottom: 1px solid #dce4e7;
    font-size: 10px;
    line-height: 1.18;
    color: #233f4a;
    vertical-align: top;
}


/* Column widths */

.results-table th:nth-child(1),
.results-table td:nth-child(1) {
    width: 8%;
}

.results-table th:nth-child(2),
.results-table td:nth-child(2) {
    width: 8%;
}

.results-table th:nth-child(3),
.results-table td:nth-child(3) {
    width: 11%;
}

.results-table th:nth-child(4),
.results-table td:nth-child(4) {
    width: 31%;
}

.results-table th:nth-child(5),
.results-table td:nth-child(5) {
    width: 7%;
}

.results-table th:nth-child(6),
.results-table td:nth-child(6) {
    width: 23%;
}

.results-table th:nth-child(7),
.results-table td:nth-child(7) {
    width: 7%;
}

.results-table th:nth-child(8),
.results-table td:nth-child(8) {
    width: 10%;
}


/* Components */

.components {
    color: #52656d;
}

.components div {
    min-height: 13px;
    margin-bottom: 1px;
}

.components b {
    float: right;
    color: #173e4e;
    font-weight: 700;
    margin-left: 6px;
}

.grade {
    font-weight: 700;
    color: #183c4b !important;
}

.decision {
    font-weight: 600;
    color: #203f4b !important;
}


/* =========================================
   SUMMARY
========================================= */

.summary {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.2fr 1.2fr;
    gap: 8px;
    padding: 12px;
}

.summary-card {
    min-height: 44px;
    background: #eef6f9;
    border: 1px solid #d3e2e7;
    border-radius: 9px;
    padding: 7px 10px;
}

.summary-card span {
    display: block;
    text-transform: uppercase;
    font-size: 8px;
    font-weight: 700;
    color: #61747b;
    letter-spacing: .6px;
    margin-bottom: 4px;
}

.summary-card h4 {
    font-size: 11px;
    color: #123b4b;
    font-weight: 700;
}


/* =========================================
   COMMENT CODES
========================================= */

.codes-panel {
    background: #fff;
    border: 1px solid #cbd9de;
    border-radius: 0 0 9px 9px;
    overflow: hidden;
}

.help-text {
    padding: 10px 10px 5px;
    color: #53656d;
    font-size: 10px;
}

.help-text strong {
    color: #075675;
}


/* Codes header */

.codes-header {
    background: #edf7fa;
    border-top: 1px solid #d4e2e6;
    border-bottom: 1px solid #d4e2e6;
    padding: 8px 12px;
}

.codes-header h3 {
    color: #123f53;
    font-size: 13px;
    margin-bottom: 6px;
}

.codes-header p {
    color: #617278;
    font-size: 10px;
}


/* Codes table */

.codes-table th {
    background: #edf6f9;
    color: #31515e;
    padding: 8px 9px;
    text-align: left;
    text-transform: uppercase;
    font-size: 8px;
    letter-spacing: .6px;
}

.codes-table td {
    padding: 7px 9px;
    border-bottom: 1px solid #dce4e7;
    color: #304953;
    font-size: 10px;
    line-height: 1.2;
    vertical-align: top;
}

.codes-table td:first-child {
    width: 7%;
    font-weight: 700;
    color: #173c4b;
    white-space: nowrap;
}

.codes-table td:nth-child(2) {
    width: 25%;
}

.codes-table td:nth-child(3) {
    width: 68%;
}


/* =========================================
   CONTEXT FOOTER
========================================= */

.context {
    display: grid;

    grid-template-columns:
        1fr
        1fr
        1fr
        1.7fr
        1.2fr
        1.35fr;

    gap: 12px;

    background: #f3fafc;

    border: 1px solid #d0dde1;
    border-top: 0;

    border-radius: 0 0 9px 9px;

    padding: 12px 8px 14px;
}

.context span {
    display: block;
    color: #5c6d73;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .6px;
}

.context strong {
    display: block;
    color: #294651;
    margin-top: 4px;
    font-size: 9px;
    line-height: 1.25;
    word-break: break-word;
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 900px) {

    .info-grid {
        grid-template-columns: 1fr 1fr;
    }

    .details {
        grid-template-columns: 1fr 1fr;
    }

    .summary {
        grid-template-columns: 1fr 1fr;
    }

    .context {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .results-table {
        min-width: 850px;
    }

}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    .container {
        width: 100%;
        margin: 0;
    }

    .page-header {
        padding: 18px 15px;
    }

    .page-header h1 {
        font-size: 30px;
    }

    .info-grid {
        grid-template-columns: 1fr;
        padding: 0 12px;
    }

    .details {
        grid-template-columns: 1fr;
    }

    .summary {
        grid-template-columns: 1fr;
    }

    .context {
        grid-template-columns: 1fr 1fr;
    }

    .panel {
        border-radius: 14px 14px 0 0;
    }

    .codes-panel {
        border-radius: 0;
    }

}