/* =========================================================
   Business Setup Guide
   Colours, typography and page width
========================================================= */

.bgh {
    --bgh-primary: var(--color-primary, #a3ff12);
    --bgh-dark: var(--color-bg-dark, #080b0a);
    --bgh-bg: var(--color-bg, #f4f5f1);
    --bgh-surface: var(--color-surface-light, #ffffff);
    --bgh-text: var(--color-text, #111813);
    --bgh-muted: var(--color-muted, #59645c);
    --bgh-line: var(--color-border, #d6ddd4);
    --bgh-focus: #487500;
    --bgh-anchor-offset: 100px;

    background: var(--bgh-bg);
    color: var(--bgh-text);
    line-height: 1.65;
}

.bgh,
.bgh *,
.bgh *::before,
.bgh *::after {
    box-sizing: border-box;
}

.bgh-wrap {
    width: min(1480px, calc(100% - 64px));
    margin-inline: auto;
}

.bgh-body {
    padding-block: clamp(32px, 5vw, 72px) 80px;
}

.bgh-body :is(h2, h3, h4) {
    margin: 0;
    color: var(--bgh-text);
    font-family: var(--font-heading, inherit);
    font-weight: 800;
    text-wrap: balance;
}

.bgh-body a {
    color: inherit;
    text-underline-offset: 0.2em;
    text-decoration-thickness: 1px;
}

.bgh-body :is(a, button, input, select, summary):focus-visible {
    outline: 3px solid var(--bgh-focus);
    outline-offset: 4px;
}

.bgh-body [id] {
    scroll-margin-top: var(--bgh-anchor-offset);
}


/* =========================================================
   Search and filters
========================================================= */

.bgh-search {
    display: grid;
    grid-template-columns:
        minmax(180px, 1.4fr)
        minmax(150px, 1fr)
        minmax(150px, 1fr)
        auto;
    align-items: end;
    gap: 16px;
}

.bgh-search label {
    display: grid;
    gap: 7px;
    min-width: 0;

    color: var(--bgh-text);
    font-size: 0.88rem;
    font-weight: 700;
}

.bgh-search :is(input, select) {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 10px 12px;

    border: 1px solid #aab5a8;
    border-radius: 8px;
    background: var(--bgh-surface);
    color: var(--bgh-text);

    font-family: inherit;
    font-size: 1rem;
    font-weight: 400;
}

.bgh-search input::placeholder {
    color: var(--bgh-muted);
}

.bgh-search button {
    min-height: 48px;
    padding: 10px 28px;

    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--bgh-primary);
    color: #10170b;

    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.bgh-search button:hover {
    border-color: var(--bgh-text);
}

.bgh-results {
    margin: 12px 0 clamp(32px, 4vw, 56px);
    color: var(--bgh-muted);
    font-size: 0.88rem;
}

.bgh-results a {
    margin-inline-start: 4px;
    color: var(--bgh-text);
    font-weight: 650;
    text-decoration: underline;
}


/* =========================================================
   Guide layout and section index
========================================================= */

.bgh-layout {
    display: grid;
    grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
    align-items: start;
    gap: clamp(32px, 6vw, 96px);
}

.bgh-index {
    display: grid;
    align-content: start;
    border-top: 2px solid var(--bgh-dark);
}

.bgh-index .bgh-kicker {
    margin: 0;
    padding-block: 18px 12px;

    color: var(--bgh-muted);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.bgh-index a {
    display: block;
    padding-block: 9px;

    color: var(--bgh-text);
    font-size: 0.94rem;
    line-height: 1.45;
    text-decoration: none;
}

.bgh-index a:hover {
    text-decoration: underline;
}


/* =========================================================
   Chapter headings
   Each group is a chapter; tasks sit underneath in one column.
========================================================= */

.bgh-group {
    min-width: 0;
    border-top: 2px solid var(--bgh-dark);
}

.bgh-group + .bgh-group {
    margin-top: clamp(40px, 5vw, 72px);
}

.bgh-group > h2 {
    padding-block: 18px 12px;

    font-size: clamp(1.75rem, 3vw, 2.7rem);
    line-height: 1.1;
    letter-spacing: -0.045em;
}


/* =========================================================
   Task sections
   Only neighbouring tasks receive a dividing rule.
========================================================= */

.bgh-card {
    min-width: 0;
    margin: 0;
    padding: clamp(24px, 3vw, 36px) 0;

    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;

    overflow-wrap: anywhere;
}

.bgh-card + .bgh-card {
    border-top: 1px solid var(--bgh-line);
}

.bgh-group > .bgh-card:last-child {
    padding-bottom: 0;
}

/* Mark a linked task at its heading, rather than boxing in the article. */
.bgh-card:target .bgh-task-number {
    padding-inline-start: 9px;
    border-inline-start: 3px solid var(--bgh-primary);
    color: var(--bgh-text);
}


/* =========================================================
   Task title and indicative cost
========================================================= */

.bgh-task-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px 32px;
}

.bgh-task-identity {
    min-width: 0;
}

.bgh-task-number,
.bgh-task-price dt {
    display: block;
    margin: 0 0 5px;

    color: var(--bgh-muted);
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.4;
}

.bgh-task-number {
    font-variant-numeric: tabular-nums;
}

.bgh-card .bgh-task-title {
    margin: 0;

    font-size: clamp(1.3rem, 2vw, 1.85rem);
    line-height: 1.2;
    letter-spacing: -0.035em;
}

.bgh-task-title a {
    color: inherit;
    text-decoration: none;
}

.bgh-task-title a:hover {
    text-decoration: underline;
}

.bgh-task-price {
    max-width: 28ch;
    margin: 0;
    text-align: right;
}

.bgh-task-price dd {
    margin: 0;

    color: var(--bgh-text);
    font-size: 1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
}


/* =========================================================
   Task description and provider
========================================================= */

.bgh-card .bgh-task-description {
    max-width: 72ch;
    margin: 14px 0 0;

    color: var(--bgh-text);
    font-size: 1rem;
    line-height: 1.75;
}

.bgh-card .bgh-task-support {
    margin: 8px 0 0;

    color: var(--bgh-muted);
    font-size: 0.86rem;
    line-height: 1.5;
}


/* =========================================================
   Expandable instructions
   Keep the disclosure beside its label on wide screens.
========================================================= */

.bgh-card > details {
    margin-top: 12px;
}

.bgh-card > details > summary {
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    max-width: 100%;
    min-height: 44px;

    color: var(--bgh-text);
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1.4;

    list-style: none;
    cursor: pointer;
}

.bgh-card > details > summary::-webkit-details-marker {
    display: none;
}

.bgh-card > details > summary::before {
    content: "";
    width: 8px;
    height: 8px;
    flex: 0 0 8px;

    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
}

.bgh-card > details[open] > summary::before {
    transform: translateY(-2px) rotate(45deg);
}

.bgh-card > details > summary:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}


/* =========================================================
   Markdown instructions
========================================================= */

.bgh-prose {
    max-width: 72ch;
    color: var(--bgh-text);
    line-height: 1.75;
}

.bgh-prose p {
    margin: 0.85em 0;
}

.bgh-prose strong {
    font-weight: 750;
}

.bgh-prose :is(ol, ul) {
    margin: 12px 0 20px;
    padding-inline-start: 1.65em;
}

.bgh-prose ol {
    list-style: decimal;
}

.bgh-prose ul {
    list-style: disc;
}

.bgh-prose li {
    padding-inline-start: 0.2em;
}

.bgh-prose li + li {
    margin-top: 0.75em;
}

.bgh-prose ol > li::marker {
    color: var(--bgh-muted);
    font-weight: 700;
}

.bgh-prose pre {
    max-width: 100%;
    overflow-x: auto;
}

.bgh-prose a,
.bgh-card details > p a {
    text-decoration: underline;
}


/* =========================================================
   Estimate notes and examples
   Supporting content uses indentation and type, not panels.
========================================================= */

.bgh-card details h4 {
    margin: 22px 0 6px;

    font-size: 1rem;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.bgh-task-price-note {
    max-width: 72ch;
    margin-block: 22px;
}

.bgh-task-price-note p {
    margin: 0;
    color: var(--bgh-muted);
    line-height: 1.7;
}

.bgh-example {
    max-width: 72ch;
    margin: 12px 0;
    padding-inline-start: 16px;

    border-inline-start: 2px solid var(--bgh-line);
    color: var(--bgh-muted);
}

.bgh-example > :first-child {
    margin-top: 0;
}

.bgh-example > :last-child {
    margin-bottom: 0;
}

.bgh-card details > figure {
    max-width: 72ch;
    margin: 16px 0;
}

.bgh-card details img {
    display: block;
    max-width: 100%;
    height: auto;
}


/* =========================================================
   Prerequisites
   Display “Complete first” and its links as a compact reference.
========================================================= */

.bgh-card > footer {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;

    margin: 12px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--bgh-muted);

    font-size: 0.88rem;
    line-height: 1.6;
}

.bgh-card > footer h4 {
    margin: 0;
    color: var(--bgh-muted);

    font-family: inherit;
    font-size: inherit;
    font-weight: 700;
    letter-spacing: normal;
    text-transform: none;
}

.bgh-card > footer p {
    margin: 0;
}

.bgh-card > footer ul {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;

    margin: 0;
    padding: 0;
    list-style: none;
}

.bgh-card > footer a {
    color: var(--bgh-text);
    font-weight: 550;
    text-decoration: underline;
    text-decoration-color: #a5b09f;
}

.bgh-card > footer a:hover {
    text-decoration-color: currentColor;
}


/* =========================================================
   Tablet — index above the guide
========================================================= */

@media (max-width: 800px) {
    .bgh-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }

    .bgh-search {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bgh-index {
        display: flex;
        flex-wrap: wrap;
        gap: 2px 18px;
    }

    .bgh-index .bgh-kicker {
        width: 100%;
        padding-bottom: 6px;
    }

    .bgh-index a {
        padding-block: 5px;
    }
}


/* =========================================================
   Mobile — title, cost, description
========================================================= */

@media (max-width: 600px) {
    .bgh-wrap {
        width: calc(100% - 40px);
    }

    .bgh-body {
        padding-block: 28px 56px;
    }

    .bgh-search {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .bgh-search button {
        width: 100%;
    }

    .bgh-group > h2 {
        padding-bottom: 4px;
    }

    .bgh-task-heading {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .bgh-task-price {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 2px 8px;

        max-width: none;
        text-align: left;
    }

    .bgh-task-price dt {
        margin: 0;
    }

    .bgh-task-price dd {
        font-size: 0.94rem;
    }

    .bgh-card .bgh-task-description {
        margin-top: 12px;
    }

    .bgh-card > footer {
        display: block;
    }

    .bgh-card > footer :is(p, ul) {
        margin-top: 4px;
    }
}