* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(90, 190, 120, 0.16), transparent 34%),
        radial-gradient(circle at top right, rgba(255, 138, 42, 0.10), transparent 30%),
        #11131a;
    color: #f5f5f5;
}

a {
    color: #ffcc66;
}

a:hover {
    color: #ffe0a3;
}

.page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 18px 60px;
}

.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.nav-links a {
    color: #c9ccd6;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.nav-links a:hover {
    color: #ffcc66;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    color: #aeb3c1;
    font-size: 13px;
    margin: 4px 0 28px;
}

.breadcrumb a {
    color: #ffbd66;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.hero {
    margin-bottom: 28px;
}

.eyebrow {
    color: #73d989;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.14em;
    margin: 0 0 10px;
    font-weight: 800;
}

h1 {
    font-size: clamp(34px, 5vw, 58px);
    line-height: 0.98;
    margin: 0 0 16px;
    max-width: 920px;
}

h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

h3 {
    margin: 0 0 12px;
    font-size: 20px;
}

p {
    line-height: 1.6;
}

.intro {
    max-width: 860px;
    color: #d5d8e2;
    font-size: 18px;
    margin-bottom: 12px;
}

.secondary-intro {
    color: #b9becb;
    font-size: 16px;
}

.grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 18px;
}

.panel {
    background: rgba(28, 31, 42, 0.94);
    border: 1px solid #303546;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.22);
}

.panel.wide {
    margin-top: 18px;
}

.form-row {
    margin-bottom: 16px;
}

label {
    display: block;
    font-weight: 800;
    margin-bottom: 7px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #3d4358;
    background: #11131a;
    color: #fff;
    border-radius: 10px;
    padding: 12px 13px;
    font-size: 16px;
}

textarea {
    resize: vertical;
}

small,
.muted {
    color: #aeb3c1;
}

button {
    border: 0;
    background: #73d989;
    color: #11131a;
    font-weight: 900;
    border-radius: 10px;
    padding: 13px 18px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background: #8ee9a0;
}

.small-button {
    padding: 9px 12px;
    font-size: 14px;
}

.button-muted {
    background: #242938;
    color: #f4f4f4;
    border: 1px solid #3a4054;
}

.button-muted:hover {
    background: #30364a;
    color: #fff;
}

.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.clone-list {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.clone-row {
    background: #141722;
    border: 1px solid #303546;
    border-radius: 14px;
    padding: 14px;
}

.clone-row-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    align-items: end;
}

.remove-clone {
    background: #3a1f1f;
    color: #ffb0b0;
    border: 1px solid #8c3c3c;
    padding: 11px 12px;
}

.remove-clone:hover {
    background: #4a2929;
}

.hidden {
    display: none !important;
}

.checkbox-row {
    display: flex;
    gap: 9px;
    align-items: center;
    color: #c9ccd6;
    font-weight: 700;
    margin: 0 0 16px;
}

.checkbox-row input {
    width: auto;
}

.split-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.gene-guide {
    display: grid;
    gap: 12px;
}

.gene-card {
    background: #141722;
    border: 1px solid #303546;
    border-radius: 14px;
    padding: 14px;
}

.gene-card strong {
    display: inline-flex;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    color: #11131a;
    margin-right: 8px;
}

.gene-card span {
    font-weight: 900;
}

.gene-card p {
    color: #c9ccd6;
    margin: 10px 0 0;
}

.gene-card.good strong {
    background: #73d989;
}

.gene-card.okay strong {
    background: #ffbd66;
}

.gene-card.bad strong {
    background: #ff7a7a;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.summary-card {
    background: #141722;
    border: 1px solid #303546;
    border-radius: 14px;
    padding: 16px;
}

.summary-card span {
    display: block;
    color: #aeb3c1;
    margin-bottom: 8px;
}

.summary-card strong {
    display: block;
    font-size: 22px;
}

.table-wrap {
    overflow-x: auto;
    margin-top: 16px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}

th,
td {
    border-bottom: 1px solid #303546;
    padding: 12px 10px;
    text-align: left;
    vertical-align: top;
}

th {
    color: #73d989;
}

/* Gene pills */
.gene-string {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 4px !important;
    white-space: nowrap !important;
    line-height: 1 !important;
    vertical-align: middle;
}

.gene-pill {
    display: inline-flex !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    border-radius: 8px;
    justify-content: center !important;
    align-items: center !important;
    font-weight: 900;
    font-size: 14px;
    line-height: 1 !important;
    color: #ffffff !important;
    text-align: center;
    vertical-align: middle;
    padding: 0 !important;
    margin: 0 !important;
}

.gene-g,
.gene-y {
    background: #73d989;
}

.gene-h {
    background: #ffbd66;
}

.gene-w,
.gene-x {
    background: #ff7a7a;
}

.badge {
    display: inline-block;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 900;
    color: #11131a;
}

.badge.keep {
    background: #73d989;
}

.badge.breed {
    background: #ffbd66;
}

.badge.almost {
    background: #8ea2ff;
}

.badge.compost {
    background: #ff7a7a;
}

.step-results {
    display: grid;
    gap: 18px;
}

.step-card {
    background: #141722;
    border: 1px solid #303546;
    border-radius: 16px;
    padding: 18px;
}

.step-card-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.step-result-box {
    background: #1c1f2a;
    border: 1px solid #303546;
    border-radius: 14px;
    padding: 14px;
    min-width: 250px;
}

/*
Only the direct label spans inside .step-result-box should behave like block labels.
This prevents the gene pills inside .gene-string from becoming vertical.
*/
.step-result-box > span,
.step-result-box > small {
    display: block;
    color: #aeb3c1;
}

.step-result-box strong {
    display: block;
    margin: 8px 0;
}

.step-result-box .gene-string {
    display: inline-flex !important;
}

.step-result-box .gene-string .gene-pill {
    display: inline-flex !important;
}

.planner-grid-wrap {
    overflow-x: auto;
}

.planter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(170px, 1fr));
    gap: 10px;
    min-width: 560px;
}

.planter-cell {
    background: #1c1f2a;
    border: 1px solid #303546;
    border-radius: 14px;
    padding: 12px;
    min-height: 118px;
}

.planter-cell.centre {
    border-color: #73d989;
    box-shadow: 0 0 0 1px rgba(115, 217, 137, 0.25);
}

.planter-cell.empty {
    opacity: 0.55;
}

/*
Only the direct position label span should be block.
This fixes the issue where every .gene-pill span was being forced onto a new line.
*/
.planter-cell > span {
    display: block;
    color: #73d989;
    font-weight: 900;
    margin-bottom: 6px;
}

.planter-cell strong {
    display: block;
    margin-bottom: 8px;
}

.planter-cell .gene-string {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
}

.planter-cell .gene-string .gene-pill {
    display: inline-flex !important;
}

.slot-details {
    margin-top: 16px;
    border-top: 1px solid #303546;
    padding-top: 14px;
}

.slot-details summary {
    cursor: pointer;
    color: #73d989;
    font-weight: 900;
}

.slot-table-wrap {
    overflow-x: auto;
    margin-top: 12px;
}

.slot-table-wrap table {
    min-width: 720px;
}

.report-button {
    margin-top: 14px;
    background: #ffbd66;
    color: #11131a;
}

.report-button:hover {
    background: #ffd08a;
}

.copy-area {
    margin-top: 20px;
}

.copy-area textarea {
    margin-bottom: 12px;
}

.copy-status {
    color: #73d989;
    margin-left: 10px;
    font-weight: 800;
}

.layout-example {
    background: #141722;
    border: 1px solid #303546;
    border-radius: 14px;
    color: #d5d8e2;
    padding: 16px;
    overflow-x: auto;
    line-height: 1.6;
}

.faq details {
    border-top: 1px solid #303546;
    padding: 14px 0;
}

.faq details:first-of-type {
    border-top: 0;
}

.faq summary {
    cursor: pointer;
    font-weight: 900;
    color: #73d989;
}

.faq details p {
    color: #c9ccd6;
    margin-bottom: 0;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 20px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
}

.modal-card {
    position: relative;
    width: min(620px, 100%);
    background: #1c1f2a;
    border: 1px solid #303546;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.48);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.modal-header h2 {
    margin: 0;
}

.modal-close {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
    background: #242938;
    color: #fff;
    font-size: 26px;
    line-height: 1;
}

.report-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 18px 0;
}

.report-summary div {
    background: #141722;
    border: 1px solid #303546;
    border-radius: 14px;
    padding: 14px;
}

.report-summary span {
    display: block;
    color: #aeb3c1;
    margin-bottom: 8px;
}

.report-summary strong {
    font-size: 22px;
}

.report-summary .gene-string {
    display: inline-flex !important;
}

.report-summary .gene-string .gene-pill {
    display: inline-flex !important;
}

.modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.report-status {
    margin-bottom: 0;
    color: #73d989;
    font-weight: 800;
}

.embed-label {
    display: block;
    margin-bottom: 10px;
    color: #aeb3c1;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.embed-slot {
    min-height: 100px;
}

.embed-slot--rectangle {
    display: flex;
    justify-content: center;
    min-height: 250px;
}

.site-footer {
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid #303546;
    color: #aeb3c1;
    font-size: 14px;
}

.site-footer a {
    color: #ffbd66;
}

@media (max-width: 900px) {
    .grid,
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .clone-row-grid {
        grid-template-columns: 1fr;
    }

    .step-card-header {
        flex-direction: column;
    }

    .step-result-box {
        width: 100%;
    }

    .split-row {
        grid-template-columns: 1fr;
    }

    .report-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .top-nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav-links {
        gap: 12px;
    }
}