/* Inspiration guides in the new design (MALLAR.md "Guide"): 5 populära stilar på badrum and
   5 snygga blandare. Loaded after ny_design.css on those pages only; everything is scoped to
   .nd_guider_page or to the guide modules' own classes. */

/* A list of short points inside copy: the small green squares, without the copy's list indent. */
.nd_guider_page .nd_rich .nd_square_list {
    padding-left: 0;
}
.nd_guider_page .nd_rich .nd_square_list li + li {
    margin-top: 0;
}

/* ---------- The hero ----------
   The shared spacing (48 px under the menu, 28 px from the breadcrumb to the H1, 20 px to the
   ingress), then, as in the design's guide tracks, 32 px to the style chips and 48 px (32 on
   phones) to the hero image, so the image does not crowd the text. */
/* 5 snygga blandare: the H1 breaks after "för" (Hanna, 2026-11-05), so it fills its line under the
   shared 880 px cap instead of being balanced. */
.nd_page.nd_guider_blandare_page .nd_hero > .nd_container > .nd_h1 {
    text-wrap: wrap;
}
.nd_page.nd_guider_page .nd_hero > .nd_container > .nd_hero_actions {
    margin-top: 32px;
}
.nd_page.nd_guider_page .nd_hero > .nd_container > .nd_hero_image {
    margin-top: 48px;
}
@media (max-width: 767px) {
    .nd_page.nd_guider_page .nd_hero > .nd_container > .nd_hero_actions,
    .nd_page.nd_guider_page .nd_hero > .nd_container > .nd_hero_image {
        margin-top: 32px;
    }
}

/* ---------- 5 snygga blandare: a faucet beside the text ---------- */

/* The brand and finish on the picture, white Space Mono after a short dashed line, on a light
   gradient from the bottom (Playbook, Text på bild). */
.nd_guider_product {
    position: relative;
    overflow: hidden;
}
.nd_guider_product::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, .3) 0%, rgba(0, 0, 0, 0) 50%);
    pointer-events: none;
}
.nd_page .nd_guider_product_label {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 1;
    display: grid;
    grid-template-columns: auto auto;
    column-gap: 12px;
    padding-left: 10px;
    background: linear-gradient(to bottom, var(--nd_off_white) 50%, transparent 50%) 0 0 / 1px 6px repeat-y;
    color: var(--nd_off_white);
    text-shadow: 0 1px 6px rgba(0, 0, 0, .18);
}
.nd_guider_product_label dd {
    margin: 0;
}

/* ---------- 5 populära stilar på badrum ---------- */

/* The styles as dashed chips under the ingress, each a link to its chapter. */
.nd_guider_chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.nd_page .nd_guider_chips a {
    padding: 8px 16px;
    border: 1px solid transparent;
    background-image:
        linear-gradient(to right, var(--nd_gray_dash) 50%, transparent 50%),
        linear-gradient(to right, var(--nd_gray_dash) 50%, transparent 50%),
        linear-gradient(to bottom, var(--nd_gray_dash) 50%, transparent 50%),
        linear-gradient(to bottom, var(--nd_gray_dash) 50%, transparent 50%);
    background-size: 6px 1px, 6px 1px, 1px 6px, 1px 6px;
    background-position: 0 0, 0 100%, 0 0, 100% 0;
    background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
    background-origin: border-box;
    font-weight: 700;
    font-size: 14px;
    line-height: 20px;
    color: var(--nd_green) !important;
    text-decoration: none !important;
}
.nd_page .nd_guider_chips a:hover {
    background-color: var(--nd_sand_light);
}

/* A style: its number and heading, then the pictures with the price under them and the text
   under that. On phones the text comes first, with the price under it and the pictures last. */
.nd_guider_style_section {
    scroll-margin-top: 120px;
}
.nd_page .nd_guider_style_section .nd_chapter_number + .nd_h2 {
    margin-top: 12px;
}
.nd_guider_style {
    display: grid;
    gap: 24px;
    margin-top: 24px;
}
.nd_guider_style_media {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}
.nd_guider_style_text {
    display: flex;
    flex-direction: column;
    gap: 20px;
    order: 1;
}
/* The big picture on the left as high as the two small ones stacked on the right, all 4:5. */
.nd_guider_trio {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .5fr);
    grid-template-rows: auto auto;
    gap: 12px;
}
.nd_guider_trio img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    background: var(--nd_placeholder);
}
.nd_guider_trio img:first-child {
    grid-row: 1 / span 2;
    aspect-ratio: auto;
}
/* The price in Space Mono, after a short dashed line (MALLAR.md: under the pictures on desktop
   and tablet, under the list on phones). */
.nd_page .nd_guider_price {
    color: var(--nd_green);
}
.nd_page .nd_guider_price::before {
    content: '';
    display: block;
    width: 24px;
    height: 1px;
    margin-bottom: 8px;
    background: linear-gradient(to right, var(--nd_gray_dash) 50%, transparent 50%) 0 0 / 6px 1px repeat-x;
}
.nd_guider_price_label {
    color: var(--nd_gray_text);
}
/* A sum never breaks over two lines. */
.nd_guider_price_value {
    white-space: nowrap;
}
@media (max-width: 767px) {
    .nd_guider_style_text {
        order: -2;
    }
    .nd_guider_price {
        order: -1;
    }
    .nd_guider_trio {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
    .nd_guider_trio img:first-child {
        grid-column: 1 / -1;
        grid-row: auto;
        aspect-ratio: 4 / 5;
    }
}

/* Emma's box (nd_contact_person.html): her link to the tips is a paragraph of the quote. When it
   wraps on a phone, the arrow follows the last word instead of standing alone at the right edge. */
.nd_page.nd_guider_page .nd_person_box .nd_rich a.nd_arrow_link {
    display: inline;
}
.nd_page.nd_guider_page .nd_person_box .nd_rich a.nd_arrow_link svg {
    display: inline;
    margin-left: 6px;
    vertical-align: -3px;
}

/* Emma's tips: the FAQ's accordion with a Space Mono number before each tip. */
.nd_guider_tips {
    scroll-margin-top: 120px;
}
.nd_page .nd_guider_tips .nd_faq_question {
    display: flex;
    align-items: baseline;
    gap: 14px;
}
.nd_page .nd_guider_tips .nd_faq_question .nd_mono {
    flex: none;
    color: var(--nd_gray_text);
}
.nd_page .nd_guider_tips .nd_faq_answer {
    max-width: 720px;
}

/* ---------- SEO guides with the chat in the hero (round 3) ----------
   The painting, carpentry, energy, ventilation, window and plumbing guides: the rating row and
   the chat in the hero, the old copy in text sections with a line before each H2, the FAQ, the
   reviewer, and "Dryfta ditt projekt" at the end (nd_dryfta_cta.html). Scoped to
   .nd_guider_seo_page. */

/* Vad kostar det att måla om ett rum: a price range in the table never breaks over two lines
   (clean_cms_richtext takes away the old table's own nowrap). */
.nd_page.nd_guider_seo_page .nd_rich .kmi_pris {
    white-space: nowrap;
}

/* Energiklass hus has the sticky bar: the chat bubble stands above it, so it does not cover the
   bar's button. */
body:has(.nd_guider_seo_page .nd_sticky_bar) .nd_chat_bubble {
    bottom: 93px;
}
@media (max-width: 767px) {
    body:has(.nd_guider_seo_page .nd_sticky_bar) .nd_chat_bubble {
        bottom: 85px;
    }
}

/* ---------- Smarta lösningar i badrummet: two pictures beside one chapter ----------
   "Nischad hylla" has two pictures of niches; they stand side by side in 4:5 where the other
   chapters have one picture, so the chapter keeps the rhythm of text beside pictures. */
.nd_page .nd_text_image_media.nd_guider_media_pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    aspect-ratio: auto;
    background: none;
}
.nd_page .nd_guider_media_pair img {
    aspect-ratio: 4 / 5;
    background: var(--nd_placeholder);
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* ---------- Hanna's review of the SEO guides (PR #940, 2026-12-01) ----------
   Scoped to .nd_guider_v2, which the guides in that pull request carry, so the other guides keep
   their look until they get the class too. */

/* 1. Dates ("Publicerad · Uppdaterad", "uppdaterade 2026-09"): Space Mono 11/16, gray, the same size
   on every screen. */
.nd_page.nd_guider_v2 .nd_guider_2_dates {
    font-family: var(--nd_mono);
    font-size: 11px;
    line-height: 16px;
    letter-spacing: .02em;
    color: var(--nd_gray_text);
}

/* 2. Who reviewed the page, under the ingress: the label in the body's color, the name as a small
   heading linked to their profile, the role in Space Mono. */
.nd_page .nd_hero > .nd_container > .nd_hero_reviewer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-top: 32px;
}
.nd_page .nd_hero_reviewer_label {
    font-size: 14px;
    line-height: 20px;
}
.nd_page .nd_hero_reviewer .nd_mono {
    letter-spacing: .02em;
    color: var(--nd_gray_text);
}
/* 3. A name that links to the person's profile keeps the small heading's look; the underline comes
   on hover, as on other text links. */
.nd_page a.nd_person_name {
    text-decoration: none;
}
.nd_page a.nd_person_name:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}
.nd_page.nd_guider_v2 .nd_person_box_caption .nd_mono {
    letter-spacing: .02em;
}

/* 8. Text with an image beside it: the image level with the top of the text, never centered. With
   the heading in full width above, 16 px to the text and the image; a long text beside a portrait
   image takes 60 % of the width. */
.nd_page.nd_guider_v2 .nd_text_image_grid {
    align-items: start;
}
.nd_page .nd_text_image_grid.nd_text_image_grid_under_heading {
    margin-top: 16px;
}
@media (min-width: 768px) {
    .nd_page .nd_text_image_grid.nd_text_image_grid_portrait {
        grid-template-columns: 3fr 2fr;
    }
    .nd_page .nd_text_image_grid.nd_text_image_grid_portrait.nd_image_left {
        grid-template-columns: 2fr 3fr;
    }
}
/* A section on a white band, for an image with a white background. */
.nd_page .nd_band.nd_band_white {
    background: var(--nd_white);
}

/* 9. Tables: the first and the last column line up with the text around them. On phones a table of
   up to three columns scrolls sideways under the carousels' dashed scroll line (ny_design.js wraps
   it); one with four or more columns turns into blocks with the column's name before each value
   (data-label, as on the bathroom price page). 10: the table's last line is not doubled by the line
   of the section after it. */
.nd_page.nd_guider_v2 .nd_rich :is(th, td):first-child {
    padding-left: 0;
}
.nd_page.nd_guider_v2 .nd_rich :is(th, td):last-child {
    padding-right: 0;
}
.nd_page.nd_guider_v2 .nd_rich table:last-child tr:last-child td {
    border-bottom: 0;
}
.nd_page .nd_table_scroll + .nd_scrollbar {
    margin-top: 16px;
}
@media (max-width: 767px) {
    .nd_page .nd_table_scroll {
        overflow-x: auto;
        scrollbar-width: none;
    }
    .nd_page .nd_table_scroll::-webkit-scrollbar {
        display: none;
    }
    .nd_page .nd_table_scroll > table {
        min-width: 560px;
    }
    .nd_page .nd_rich .nd_table_scroll :is(th, td):last-child {
        white-space: nowrap;
    }
}
@media (min-width: 768px) {
    .nd_page .nd_table_scroll + .nd_scrollbar {
        display: none;
    }
}

/* 11. Numbered steps: the index in Space Mono (01, 02, 03) and a small heading, no lines between. */
.nd_page .nd_rich ol.nd_guide_steps {
    counter-reset: nd_guide_step;
    display: grid;
    gap: 24px;
    margin-top: 24px;
    padding-left: 0;
    list-style: none;
}
.nd_page .nd_rich ol.nd_guide_steps > li {
    counter-increment: nd_guide_step;
    display: grid;
    grid-template-columns: 40px 1fr;
    margin-top: 0;
}
.nd_page .nd_rich ol.nd_guide_steps > li::before {
    content: counter(nd_guide_step, decimal-leading-zero);
    grid-row: 1 / span 2;
    font-family: var(--nd_mono);
    font-size: 11px;
    line-height: 21px;
    color: var(--nd_gray_text);
}
.nd_page .nd_rich ol.nd_guide_steps > li > * {
    grid-column: 2;
    margin-top: 0;
}
.nd_page .nd_rich ol.nd_guide_steps > li > h3 {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.3;
}
.nd_page .nd_rich ol.nd_guide_steps > li > h3 + * {
    margin-top: 4px;
}

/* 5. An eyebrow of two or three words may stand straight over a big heading to mark a new part
   of the page, 12 px above it. */
.nd_page .nd_rich .nd_heading_eyebrow + h2 {
    margin-top: 12px;
}
/* 1. A table's caption reads from the left; on phones the date goes on a line of its own. */
.nd_page.nd_guider_v2 .nd_rich caption {
    text-align: left;
}
@media (max-width: 767px) {
    .nd_page.nd_guider_v2 caption .nd_guider_2_dates {
        display: block;
    }
}
/* A table of three columns gives its first column, the row's name, a third of the width, so the
   values have room beside it when the table scrolls on a phone. */
.nd_page.nd_guider_v2 .nd_rich table:has(tr > :nth-child(3):last-child) :is(th, td):first-child {
    width: 30%;
}
