/*  d/web/articles — megosztott article téma (dark mode)
    Interim: darkmode.css + ../ + ../../ + ../../../ (see articles/README.md)
    Későbbi saját böngésző: /darkmode.css a vault gyökerén.
*/

@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0");

body {
    background: #0d0d0d;
    color: #d4bc94;
    font: 15px "Segoe UI", system-ui, sans-serif;
    line-height: 1.45;
    margin: 0;
    padding: 24px 16px 48px;
}

main {
    display: block;
    max-width: 640px;
    margin: auto;
}

.article-endpoint-table td:first-child,
.article-endpoint-table th:first-child {
    white-space: nowrap;
}

.article-endpoint-table .api-method {
    color: rgb(129, 164, 57); /* olivedrab + 22 */
}

.article-endpoint-table .api-variable {
    color: white;
}

/* Checkpoint reports (Moon AGENTS.md) */
main.checkpoint {
    max-width: 800px;
}

/* Cross-project articles (d/web/articles/README.md) */
main.article {
    max-width: 800px;
}

.meta {
    color: #9a9a9a;
    font-size: 13px;
    margin: 0 0 8px;
}

.lead {
    color: #e8d9be;
    margin-bottom: 28px;
}

p.ai-note {
    color: aqua;
    opacity: 0.3;
    margin-bottom: 28px;
}
p.ai-note .ai-note-label {
    font-size: 11px;
    letter-spacing: 0.08em;
    margin-right: 0.7em;
}

h1, h2, h3 {
    font-family: Bahnschrift, "Segoe UI", sans-serif;
    font-weight: 300;
    color: white;
    letter-spacing: -0.5px;
}

h1 { font-size: 26px; margin: 0 0 12px; }
h1:has(+ p.subtitle) { margin-bottom: 2px; }

p.subtitle {
    color: #8d8680;
    font-size: 13px;
    line-height: 1.3;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}
p.timed { margin: 14px 0; padding-left: 12ch; }
p.timed .when {
    display: inline-block;
    width: 12ch;
    margin-left: -12ch;
    color: #9a9a9a;
    font-variant-numeric: tabular-nums;
}
p.timed .when .moon { opacity: 0.4; }

p.debt-body {
    padding-left: 8ch;
    margin-bottom: calc(8px + 0.73em);
}

h2 { font-size: 20px; margin: 32px 0 12px; border-top: 1px solid #282828; padding-top: 20px; }
h2:first-of-type { border-top: none; padding-top: 0; }
h3 { font-size: 16px; margin: 20px 0 8px; color: #f5e8cc; }

strong { color: white; font-weight: normal; }
.w { color: white; }

code, pre {
    font: 13px "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
    background: #252525;
    color: #f5ead0;
}

code {
    padding: 2px 5px;
    border-radius: 3px;
}

pre {
    padding: 12px 14px;
    border-radius: 4px;
    overflow-x: auto;
    line-height: 1.35;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 16px;
    font-size: 14px;
}

th, td {
    border: 1px solid #2c2c2c;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}

th {
    background: #181818;
    color: white;
    font-weight: normal;
}

td { background: #121212; }

table.col1-nowrap th:first-child,
table.col1-nowrap td:first-child {
    white-space: nowrap;
}

ul, ol {
    margin: 8px 0 16px;
    padding-left: 0;
}

ul li, ol li {
    list-style: none;
    padding: 4px 0 4px 20px;
    position: relative;
}

ul li::before {
    content: "–";
    position: absolute;
    left: 0;
    color: #888;
}

ol { counter-reset: item; }
ol li { counter-increment: item; }
ol li::before {
    content: counter(item) ".";
    position: absolute;
    left: 0;
    color: #888;
}

ul.files li::before { content: "·"; }

main.article input[type="checkbox"],
main.checkpoint input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    margin: 0;
    box-sizing: border-box;
    vertical-align: middle;
    border: 1px solid #5a5a5a;
    background: #141414;
    border-radius: 3px;
    cursor: pointer;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px 14px;
}
main.article input[type="checkbox"]:checked,
main.checkpoint input[type="checkbox"]:checked {
    background-color: #1a1a1a;
    border-color: #8a8a8a;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23d4bc94' stroke-width='2.2' d='M3 8.2l3.2 3.3L13 4'/%3E%3C/svg%3E");
}
main.article td:has(> input[type="checkbox"]:only-child),
main.checkpoint td:has(> input[type="checkbox"]:only-child) {
    width: 36px;
    text-align: center;
    vertical-align: middle;
}

ul.checks {
    padding-left: 0;
}
/*  Step-lista: ul.checks.steplist — egy now, kész = li.done (HTML, nem persist)  */
ul.checks li {
    padding-left: 0;
    list-style: none;
}
ul.checks li::before {
    content: none;
    display: none;
}
ul.checks label {
    display: block;
    position: relative;
    padding-left: 32px;
    cursor: pointer;
}
ul.checks input[type="checkbox"] {
    position: absolute;
    left: 0;
    top: 1px;
}
ul.checks li.now,
ul.checks li.now label,
ul.checks li.now span {
    color: yellowgreen !important;
}
ul.checks li.done {
    opacity: 0.4;
    pointer-events: none;
}
ul.checks li.done label {
    text-decoration: line-through;
    cursor: default;
}
ul.checks li.done span {
    color: inherit !important;
    text-decoration: line-through;
}

p { margin: 8px 0; }

a, a:visited {color:#049ee0}
a:hover {color:aqua}

@media print {
    @page {
        size: A4;
        margin: 16mm 18mm 20mm;
    }

    html, body {
        background: #fff !important;
        color: #1a1a1a !important;
        padding: 0 !important;
        margin: 0 !important;
        height: auto !important;
        overflow: visible !important;
        font-size: 11pt;
        line-height: 1.45;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    main,
    main.article,
    main.checkpoint {
        max-width: none;
        margin: 0;
        width: 100%;
    }

    .meta {
        color: #555 !important;
        font-size: 9pt;
        margin-bottom: 10pt;
    }

    .lead {
        color: #222 !important;
        font-size: 12pt;
        margin-bottom: 16pt;
    }

    p.ai-note {
        display: none;
    }

    h1, h2, h3, strong {
        color: #000 !important;
    }

    h1 {
        font-size: 18pt;
        margin: 0 0 10pt;
        letter-spacing: -0.3px;
    }

    h2 {
        font-size: 13pt;
        margin: 16pt 0 8pt;
        padding-top: 10pt;
        border-top: 0.4pt solid #bbb;
        break-after: avoid-page;
        page-break-after: avoid;
    }

    h2:first-of-type {
        border-top: none;
        padding-top: 0;
    }

    h3 {
        font-size: 11.5pt;
        margin: 12pt 0 6pt;
        break-after: avoid-page;
        page-break-after: avoid;
    }

    /* Törés a blokkok közötti hézagba (üres sor), ne a bekezdés közepén. */
    p, li, .lead, .meta {
        orphans: 3;
        widows: 3;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    pre, table, thead, tr, figure, blockquote {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    code, pre {
        background: #f3f3f3 !important;
        color: #111 !important;
        border: 0.3pt solid #ddd;
    }

    pre {
        white-space: pre-wrap;
        overflow: visible !important;
    }

    th, td {
        border-color: #ccc !important;
        background: #fff !important;
        color: #1a1a1a !important;
    }

    th {
        background: #eee !important;
        color: #000 !important;
    }

    a, a:visited {
        color: #000 !important;
        text-decoration: underline;
    }

    .w,
    [style*="color:white"],
    [style*="color: white"],
    [style*="color:#fff"],
    [style*="color: #fff"],
    [style*="color:#ffffff"],
    [style*="color: #ffffff"] {
        color: #000 !important;
    }

    ul li::before,
    ol li::before {
        color: #444;
    }
}

/* Spotnik marker spec mock (BX29.MarkerKorIkon — shell nem mountol <head>-style-t) */

.spotnik-marker-spec {
    position: relative;
    z-index: 0;
    isolation: isolate;
}
.spotnik-marker-spec section { margin-bottom: 2rem; }
.spotnik-marker-spec h2 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.6;
    margin: 1.5rem 0 0.75rem;
}
.spotnik-marker-spec .map-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 640px) {
    .spotnik-marker-spec .map-strip { grid-template-columns: 1fr; }
}
.spotnik-marker-spec .map-panel {
    border-radius: 12px;
    min-height: 200px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.12);
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px 16px;
    box-sizing: border-box;
}
.spotnik-marker-spec .map-panel.light { background: #e8e4dc; }
.spotnik-marker-spec .map-panel.dark { background: #0d1117; }
.spotnik-marker-spec .map-panel .tile-label {
    font-size: 11px;
    opacity: 0.55;
    flex-shrink: 0;
}
.spotnik-marker-spec .map-panel.light .tile-label { color: #333; }
.spotnik-marker-spec .markers-on-map {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    gap: 28px 36px;
    min-height: 150px;
    padding: 0.5rem 0;
}
.spotnik-marker-spec .spot-marker {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
    flex-shrink: 0;
}
.spotnik-marker-spec .spot-marker.shape-leaflet {
    width: 28px;
    height: 45px;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
    outline: none !important;
    align-items: flex-end;
    justify-content: center;
}
.spotnik-marker-spec .spot-marker.shape-leaflet .pin-svg {
    width: 28px;
    height: 45px;
    display: block;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.45));
}
.spotnik-marker-spec .spot-marker.shape-leaflet .pin-fill {
    fill: var(--pin-fill, #2196f3);
}
.spotnik-marker-spec .spot-marker.shape-leaflet .pin-dot {
    fill: #fff;
    opacity: 0.92;
}
.spotnik-marker-spec .map-panel.light .spot-marker.shape-circle {
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    outline: 2px solid rgba(0,0,0,0.35);
}
.spotnik-marker-spec .map-panel.dark .spot-marker.shape-circle {
    outline: 2px solid rgba(255,255,255,0.85);
}
.spotnik-marker-spec .spot-marker.shape-circle .material-symbols-outlined {
    font-size: 20px;
    color: #fff;
    font-variation-settings: 'FILL' 1;
}
.spotnik-marker-spec .spot-marker.ghost.shape-circle {
    background: #888 !important;
    opacity: 0.72;
    outline-color: rgba(255,255,255,0.5);
}
.spotnik-marker-spec .spot-marker.ghost.shape-circle .material-symbols-outlined {
    font-variation-settings: 'FILL' 0;
    opacity: 0.5;
    font-size: 18px;
}
.spotnik-marker-spec .c-blue    { --pin-fill: #2196f3; }
.spotnik-marker-spec .c-green   { --pin-fill: #43a047; }
.spotnik-marker-spec .c-orange  { --pin-fill: #fb8c00; }
.spotnik-marker-spec .c-red     { --pin-fill: #e53935; }
.spotnik-marker-spec .c-purple  { --pin-fill: #8e24aa; }
.spotnik-marker-spec .c-teal    { --pin-fill: #00897b; }
.spotnik-marker-spec .c-amber   { --pin-fill: #ffb300; }
.spotnik-marker-spec .c-slate   { --pin-fill: #546e7a; }
.spotnik-marker-spec .spot-marker.shape-circle.c-blue    { background: #2196f3; }
.spotnik-marker-spec .spot-marker.shape-circle.c-green   { background: #43a047; }
.spotnik-marker-spec .spot-marker.shape-circle.c-orange  { background: #fb8c00; }
.spotnik-marker-spec .spot-marker.shape-circle.c-red     { background: #e53935; }
.spotnik-marker-spec .spot-marker.shape-circle.c-purple  { background: #8e24aa; }
.spotnik-marker-spec .spot-marker.shape-circle.c-teal    { background: #00897b; }
.spotnik-marker-spec .spot-marker.shape-circle.c-amber   { background: #ffb300; }
.spotnik-marker-spec .spot-marker.shape-circle.c-slate   { background: #546e7a; }
.spotnik-marker-spec .pick-icon .pick-icon-pin {
    width: 18px;
    height: 28px;
    display: block;
}
.spotnik-marker-spec .dialog-mock {
    max-width: 340px;
    background: rgba(0,0,0,0.35);
    border-radius: 12px;
    padding: 1rem 1rem 0.75rem;
    border: 1px solid rgba(255,255,255,0.1);
}
.spotnik-marker-spec .dialog-mock .dlg-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.spotnik-marker-spec .field-label {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}
.spotnik-marker-spec .icon-row,
.spotnik-marker-spec .color-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1rem;
}
.spotnik-marker-spec .pick-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: #444;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}
.spotnik-marker-spec .pick-icon.selected { border-color: #fff; background: #555; }
.spotnik-marker-spec .pick-icon .material-symbols-outlined { font-size: 22px; color: #eee; }
.spotnik-marker-spec .pick-color {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
}
.spotnik-marker-spec .pick-color.selected {
    border-color: #fff;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.4);
}
.spotnik-marker-spec .preview-live {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(0,0,0,0.25);
    border-radius: 8px;
    margin-bottom: 1rem;
}
.spotnik-marker-spec .preview-live span { font-size: 13px; opacity: 0.8; }
.spotnik-marker-spec .legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}
.spotnik-marker-spec .legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}
