/* Stil for de statiske guide-sidene på writediary.com/guide/.
   Følger paletten fra /static/writediary/css/help2.css:
   tekst #22303d (skifer), aksent #e34197 / #bc2b78 (rosa), Roboto Slab. */

:root {
    --wd-ink: #22303d;
    --wd-ink-soft: #55636f;
    --wd-ink-faint: #8c98a3;
    --wd-pink: #e34197;
    --wd-pink-deep: #bc2b78;
    --wd-line: #dde3e8;
    --wd-tint: #fdf4f9;
    --wd-grey: #f6f8f9;
}

#content {
    font-family: 'Roboto Slab', Georgia, serif;
    color: var(--wd-ink);
}

#content h1 {
    font-size: 2.35em;
    line-height: 1.22;
    font-weight: bold;
    color: var(--wd-ink);
    margin: 26px 0 14px;
}

#content .guide-body h2,
#content h2.guide-sub {
    font-size: 1.6em;
    line-height: 1.3;
    font-weight: 300;
    color: var(--wd-ink);
    margin: 52px 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--wd-line);
}

#content .guide-body h3 {
    font-size: 1.22em;
    line-height: 1.35;
    font-weight: bold;
    color: var(--wd-ink);
    margin: 36px 0 12px;
}

#content .guide-body h4 {
    font-size: 1em;
    font-weight: bold;
    color: var(--wd-pink-deep);
    margin: 28px 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

#content .guide-body p,
#content .guide-body li {
    font-size: 1.02em;
    line-height: 1.8;
    font-weight: 300;
    color: var(--wd-ink);
}

#content .guide-body p { margin: 0 0 20px; }

#content .guide-body a { color: var(--wd-pink-deep); }
#content .guide-body a:hover { color: var(--wd-pink); }

#content .guide-body ul,
#content .guide-body ol {
    margin: 0 0 24px 24px;
    padding: 0;
}

#content .guide-body ul { list-style: disc; }
#content .guide-body ol { list-style: decimal; }
#content .guide-body li { margin-bottom: 9px; padding-left: 4px; }
#content .guide-body li::marker { color: var(--wd-pink); }

#content .guide-body strong { font-weight: bold; }
#content .guide-body em { font-style: italic; }

/* --- bilder ---------------------------------------------------------- */
#content .guide-body img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

#content .guide-body figure:not(.wp-block-table) { margin: 32px 0; }

#content .guide-body figcaption {
    font-size: 0.85em;
    font-weight: 300;
    color: var(--wd-ink-faint);
    margin-top: 9px;
    text-align: center;
}

/* --- sitater ---------------------------------------------------------
   Stort typografisk sitat med dekorativ anførselstegn i rosa. */
#content .guide-body blockquote {
    position: relative;
    margin: 40px 0;
    padding: 6px 0 6px 62px;
    border: 0;
    color: var(--wd-ink);
}

#content .guide-body blockquote:before {
    content: "\201C";
    position: absolute;
    left: 4px;
    top: -18px;
    font-size: 5.2em;
    line-height: 1;
    color: var(--wd-pink);
    opacity: 0.32;
    font-family: Georgia, 'Times New Roman', serif;
}

#content .guide-body blockquote p {
    font-size: 1.32em;
    line-height: 1.55;
    font-style: italic;
    font-weight: 300;
    color: var(--wd-ink);
    margin-bottom: 12px;
}

#content .guide-body blockquote p:last-child { margin-bottom: 0; }

#content .guide-body blockquote cite,
#content .guide-body blockquote .wp-block-quote__citation {
    display: block;
    margin-top: 14px;
    font-size: 0.85em;
    font-style: normal;
    font-weight: 300;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--wd-ink-faint);
}

#content .guide-body blockquote cite:before,
#content .guide-body blockquote .wp-block-quote__citation:before {
    content: "— ";
    color: var(--wd-pink);
}

#content .guide-body .wp-block-pullquote {
    padding: 0;
    background: none;
    border: 0;
}

/* --- tabeller --------------------------------------------------------- */
#content .guide-body figure.wp-block-table {
    margin: 34px 0;
    overflow-x: auto;
}

#content .guide-body table {
    border-collapse: collapse;
    width: 100%;
    table-layout: auto;
    font-size: 0.97em;
    font-weight: 300;
    background: #fff;
    border: 1px solid var(--wd-line);
    border-radius: 5px;
    overflow: hidden;
}

#content .guide-body table.has-fixed-layout { table-layout: auto; }

#content .guide-body th,
#content .guide-body td {
    border: 1px solid var(--wd-line);
    padding: 13px 16px;
    text-align: left;
    vertical-align: top;
    line-height: 1.6;
}

#content .guide-body thead th,
#content .guide-body tr:first-child th {
    background: var(--wd-ink);
    color: #fff;
    font-weight: bold;
    font-size: 0.93em;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-color: #34424f;
    border-bottom: 3px solid var(--wd-pink);
}

#content .guide-body tbody tr:nth-child(even) { background: var(--wd-grey); }
#content .guide-body tbody tr:hover { background: var(--wd-tint); }

/* Første kolonne fungerer som radetikett i de fleste av tabellene */
#content .guide-body tbody td:first-child { font-weight: 400; }
#content .guide-body table th:first-child,
#content .guide-body table td:first-child { min-width: 150px; }

/* --- skillelinje og innbygging ---------------------------------------- */
#content .guide-body hr {
    border: 0;
    border-top: 1px solid var(--wd-line);
    margin: 44px 0;
}

#content .guide-body .wp-block-embed { margin: 32px 0; }

/* Video beholder 16:9 uansett skjermbredde */
#content .guide-body .wp-has-aspect-ratio .wp-block-embed__wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
}

#content .guide-body .wp-has-aspect-ratio .wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#content .guide-body iframe {
    max-width: 100%;
    border: 0;
    border-radius: 5px;
}

/* --- brødsmuler ------------------------------------------------------- */
.guide-crumbs {
    font-size: 0.82em;
    font-weight: 300;
    color: var(--wd-ink-faint);
    margin: 22px 0 0;
    line-height: 1.7;
}

.guide-crumbs a { color: var(--wd-ink-faint); }
.guide-crumbs a:hover { color: var(--wd-pink-deep); }
.guide-crumbs span { color: var(--wd-ink-soft); }

/* --- kort for underguider --------------------------------------------- */
#content h2.guide-sub { border-bottom-color: var(--wd-line); }

ul.guide-cards {
    list-style: none;
    margin: 26px 0 10px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
    gap: 16px;
}

ul.guide-cards li { margin: 0; }

ul.guide-cards a {
    display: block;
    height: 100%;
    padding: 19px 21px;
    border: 1px solid var(--wd-line);
    border-left: 3px solid var(--wd-pink);
    border-radius: 5px;
    background: #fff;
    transition: box-shadow 0.25s, transform 0.25s;
}

ul.guide-cards a:hover {
    box-shadow: 0 3px 14px rgba(34, 48, 61, 0.10);
    transform: translateY(-2px);
}

ul.guide-cards .gc-title {
    display: block;
    color: var(--wd-ink);
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 8px;
}

ul.guide-cards a:hover .gc-title { color: var(--wd-pink-deep); }

ul.guide-cards .gc-desc {
    display: block;
    color: var(--wd-ink-soft);
    font-weight: 300;
    font-size: 0.87em;
    line-height: 1.6;
}

/* --- forrige/neste ----------------------------------------------------- */
.guide-pager {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin: 48px 0 20px;
    border-top: 1px solid var(--wd-line);
    padding-top: 24px;
}

.guide-pager a {
    flex: 1;
    color: var(--wd-ink);
    font-weight: bold;
    line-height: 1.45;
}

.guide-pager a:hover { color: var(--wd-pink-deep); }
.guide-pager .gp-next { text-align: right; }

.guide-pager small {
    display: block;
    color: var(--wd-ink-faint);
    font-weight: 300;
    font-size: 0.78em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

/* --- forsidens innholdsfortegnelse ------------------------------------- */
#content .guide-index h2 {
    margin: 46px 0 14px;
    padding-bottom: 11px;
    border-bottom: 2px solid var(--wd-line);
}

#content .guide-index h2 a { color: var(--wd-ink); font-weight: 300; }
#content .guide-index h2 a:hover { color: var(--wd-pink-deep); }

#content .guide-index ul {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2px 26px;
}

#content .guide-index ul li {
    margin: 0;
    padding: 8px 0 8px 18px;
    position: relative;
    line-height: 1.6;
}

#content .guide-index ul li:before {
    content: "\203A";
    position: absolute;
    left: 2px;
    color: var(--wd-pink);
    font-size: 1.1em;
    line-height: 1.5;
}

#content .guide-index ul li strong { font-weight: 300; }

/* --- mobil -------------------------------------------------------------
   Tabellene brekkes ned til ett kort per rad. Kolonneoverskriften følger
   med hver celle via data-label, satt av byggeskriptet. */
@media (max-width: 640px) {
    #content h1 { font-size: 1.75em; }
    #content .guide-body h2, #content h2.guide-sub { font-size: 1.32em; }

    #content .guide-body blockquote { padding-left: 44px; }
    #content .guide-body blockquote:before { font-size: 4em; top: -10px; }
    #content .guide-body blockquote p { font-size: 1.14em; }

    #content .guide-body figure.wp-block-table { overflow-x: visible; }

    #content .guide-body table,
    #content .guide-body tbody,
    #content .guide-body tr,
    #content .guide-body td {
        display: block;
        width: 100%;
    }

    #content .guide-body table {
        border: 0;
        background: none;
    }

    #content .guide-body tr.gt-head { display: none; }

    #content .guide-body tbody tr {
        margin-bottom: 14px;
        border: 1px solid var(--wd-line);
        border-left: 3px solid var(--wd-pink);
        border-radius: 5px;
        background: #fff;
        overflow: hidden;
    }

    #content .guide-body tbody tr:nth-child(even),
    #content .guide-body tbody tr:hover { background: #fff; }
    #content .guide-body tbody tr:last-child { margin-bottom: 0; }

    #content .guide-body td {
        border: 0;
        border-bottom: 1px solid var(--wd-line);
        padding: 12px 15px;
        min-width: 0;
    }

    #content .guide-body tbody tr td:last-child { border-bottom: 0; }

    #content .guide-body td[data-label]:before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        font-size: 0.72em;
        font-weight: bold;
        letter-spacing: 0.07em;
        text-transform: uppercase;
        color: var(--wd-pink-deep);
    }

    /* Første kolonne fungerer som radens overskrift */
    #content .guide-body tbody td:first-child {
        background: var(--wd-grey);
        font-weight: bold;
    }

    .guide-pager { flex-direction: column; }
    .guide-pager .gp-next { text-align: left; }

    ul.guide-cards,
    #content .guide-index ul { grid-template-columns: 1fr; }
}
