:root {
    color-scheme:dark;
    --bg:#0d1117;
    --panel:#151b24;
    --panel-hover:#19222d;
    --line:#27303c;
    --ink:#edf3f9;
    --muted:#96a4b6;
    --accent:#8ee6c0;
    --accent-ink:#112e24;
    --radius:18px;
    font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

* {
    box-sizing:border-box;
}

body {
    margin:0;
    background:radial-gradient(ellipse at 85% 0%,#17312b44,transparent 35rem),var(--bg);
    color:var(--ink);
    font-size:15px;
    line-height:1.6;
}

a {
    color:inherit;
    text-decoration:none;
}

button,input {
    font:inherit;
}

button,a,input {
    -webkit-tap-highlight-color:transparent;
}

button {
    cursor:pointer;
}

svg {
    width:18px;
    height:18px;
    flex-shrink:0;
}

button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible {
    outline:2px solid var(--accent);
    outline-offset:5px;
}

[hidden] {
    display:none!important;
}

.shell {
    max-width:1200px;
    margin:0 auto;
    padding:0 42px;
}

.site-header {
    height:100px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    border-bottom:1px solid var(--line);
}

.brand {
    display:inline-flex;
    align-items:center;
    gap:6px;
    font-size:20px;
    font-weight:730;
    letter-spacing:-.6px;
}

.brand-light {
    font-weight:400;
    color:#a4b4c5;
}

.brand-mark {
    display:grid;
    place-items:center;
    width:34px;
    height:34px;
    border-radius:11px;
    background:var(--accent);
    color:var(--accent-ink);
    margin-right:5px;
}

.brand-mark svg {
    width:21px;
    height:21px;
}

.header-note {
    display:flex;
    align-items:center;
    gap:8px;
    font-size:12px;
    color:var(--muted);
}

.status-dot {
    width:6px;
    height:6px;
    border-radius:50%;
    background:var(--accent);
    box-shadow:0 0 10px #8ee6c044;
}

.hero {
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:65px 0 52px;
    gap:40px;
}

.eyebrow {
    font-size:11px;
    letter-spacing:1.9px;
    text-transform:uppercase;
    color:var(--accent);
    font-weight:650;
    margin:0 0 18px;
}

h1 {
    font-size:clamp(42px,5.5vw,68px);
    line-height:1.06;
    letter-spacing:-3px;
    margin:0;
    font-weight:650;
}

h1 span {
    color:var(--accent);
}

.hero-description {
    font-size:16px;
    line-height:1.8;
    color:var(--muted);
    max-width:470px;
    margin:22px 0 0;
}

.library-stat {
    padding-right:50px;
    min-width:170px;
}

.library-stat strong {
    display:block;
    font-size:76px;
    font-weight:350;
    line-height:1;
    letter-spacing:-4px;
}

.library-stat>span {
    display:block;
    margin-top:10px;
    font-size:11px;
    color:var(--muted);
    text-transform:uppercase;
    letter-spacing:2px;
}

.stat-line {
    height:2px;
    width:80px;
    background:linear-gradient(90deg,var(--accent),transparent);
    margin-top:24px;
}

.collection-toolbar {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:22px;
    padding:0 0 24px;
}

.section-heading {
    display:flex;
    align-items:center;
    gap:12px;
}

.section-heading h2 {
    font-size:19px;
    margin:0;
    font-weight:550;
    letter-spacing:-.4px;
}

.count-badge {
    font-size:11px;
    color:var(--muted);
    border:1px solid var(--line);
    border-radius:30px;
    padding:3px 9px;
    white-space:nowrap;
}

.search-box {
    display:flex;
    align-items:center;
    gap:10px;
    background:#111720;
    border:1px solid var(--line);
    border-radius:11px;
    padding:10px 14px;
    width:280px;
    color:var(--muted);
}

.search-box:focus-within {
    border-color:#8ee6c077;
}

.search-box input {
    width:100%;
    border:0;
    background:transparent;
    color:var(--ink);
    outline:none;
    font-size:13px;
    min-width:0;
}

.search-box input::placeholder {
    color:#738296;
}

.search-box input:focus-visible {
    outline:none;
}

.feed-grid {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:16px;
}

.feed-card {
    min-width:0;
    display:flex;
    flex-direction:column;
    padding:23px 23px 16px;
    border:1px solid var(--line);
    border-radius:var(--radius);
    background:linear-gradient(145deg,#18212b77,transparent 80%),var(--panel);
    transition:border-color .18s,transform .18s,background-color .18s;
}

.feed-card:hover {
    border-color:#52665f;
    transform:translateY(-2px);
    background-color:var(--panel-hover);
}

.card-top {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:17px;
}

.feed-avatar {
    width:39px;
    height:39px;
    display:grid;
    place-items:center;
    border-radius:12px;
    font-size:13px;
    font-weight:750;
    letter-spacing:-.5px;
}

.tone-0 {
    background:#294438;
    color:#b3edcd;
}

.tone-1 {
    background:#303e58;
    color:#bbd3ff;
}

.tone-2 {
    background:#47354d;
    color:#e3c5ed;
}

.tone-3 {
    background:#4a3d2d;
    color:#efd1aa;
}

.tone-4 {
    background:#29454a;
    color:#a8dfe5;
}

.feed-card h3 {
    margin:0;
    font-size:18px;
    font-weight:580;
    letter-spacing:-.35px;
    line-height:1.4;
    overflow-wrap:anywhere;
}

.feed-card h3 a:hover {
    color:var(--accent);
}

.feed-domain {
    margin:5px 0 24px;
    color:var(--muted);
    font-size:12px;
    overflow-wrap:anywhere;
}

.card-actions {
    display:flex;
    align-items:center;
    gap:15px;
    border-top:1px solid var(--line);
    padding-top:14px;
    margin-top:auto;
    font-size:11px;
}

.preview-link {
    display:inline-flex;
    align-items:center;
    gap:5px;
    color:var(--accent);
    font-weight:600;
}

.preview-link svg {
    width:15px;
    height:15px;
    transition:transform .15s;
}

.preview-link:hover svg {
    transform:translateX(3px);
}

.atom-link {
    color:#b7c1ce;
}

.atom-link:hover {
    color:white;
}

.copy-button {
    border:0;
    background:transparent;
    color:var(--muted);
    display:flex;
    align-items:center;
    gap:5px;
    padding:3px 0;
    margin-left:auto;
    white-space:nowrap;
    font-size:11px;
}

.copy-button svg {
    width:13px;
    height:13px;
}

.copy-button:hover {
    color:var(--ink);
}

.copy-button.copied,.button.copied {
    color:var(--accent);
}

.site-footer {
    display:flex;
    justify-content:space-between;
    padding:28px 0 35px;
    margin-top:50px;
    border-top:1px solid var(--line);
    color:#718095;
    font-size:11px;
}

.site-footer>span:first-child {
    color:var(--muted);
}

.sr-only {
    position:absolute;
    width:1px;
    height:1px;
    padding:0;
    margin:-1px;
    overflow:hidden;
    clip:rect(0,0,0,0);
    white-space:nowrap;
    border:0;
}

.skip-link {
    position:fixed;
    top:-100px;
    left:20px;
    z-index:10;
    background:var(--accent);
    color:var(--accent-ink);
    padding:8px 15px;
    border-radius:8px;
}

.skip-link:focus {
    top:12px;
}

.empty-state {
    text-align:center;
    padding:60px 20px;
    border:1px dashed var(--line);
    border-radius:var(--radius);
    color:var(--muted);
}

.empty-state h3,.empty-state h2 {
    color:var(--ink);
}

.toast {
    position:fixed;
    bottom:25px;
    left:50%;
    transform:translateX(-50%);
    padding:12px 20px;
    border:1px solid #8ee6c044;
    border-radius:12px;
    background:#23372f;
    color:#d5ffe7;
    font-size:13px;
    box-shadow:0 12px 40px #0008;
    z-index:5;
}

.back-link {
    display:inline-flex;
    align-items:center;
    gap:8px;
    color:var(--muted);
    margin-top:32px;
    font-size:13px;
}

.back-link:hover {
    color:var(--accent);
}

.reader-heading {
    max-width:920px;
    margin:38px auto 32px;
}

.reader-heading h1 {
    font-size:clamp(32px,4.5vw,50px);
    letter-spacing:-1.8px;
    line-height:1.15;
}

.reader-heading .eyebrow {
    margin-bottom:12px;
}

.reader-meta {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:12px;
    font-size:12px;
    color:var(--muted);
    margin-top:17px;
}

.reader-meta a {
    display:inline-flex;
    align-items:center;
    gap:5px;
    margin-left:auto;
}

.reader-meta svg {
    width:13px;
    height:13px;
}

.separator {
    color:#49576a;
}

.reader-toolbar {
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:9px;
    margin-top:24px;
}

.button {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    border:1px solid #334051;
    background:#19222e;
    color:var(--ink);
    border-radius:10px;
    padding:9px 13px;
    font-size:12px;
}

.button:hover {
    background:#243040;
}

.button svg {
    width:15px;
    height:15px;
}

.button-primary {
    background:var(--accent);
    border-color:var(--accent);
    color:var(--accent-ink);
    font-weight:650;
}

.button-primary:hover {
    background:#a7f1d2;
}

.text-button {
    margin-left:auto;
    background:none;
    border:0;
    color:var(--muted);
    font-size:12px;
    padding:9px 0;
}

.text-button:hover {
    color:var(--accent);
}

.quiet-note {
    font-size:11px;
    color:var(--muted);
    margin-top:14px;
}

.notice {
    background:#493c2133;
    border:1px solid #8e744a55;
    color:#ead4a3;
    border-radius:10px;
    padding:12px 15px;
    margin-top:20px;
    font-size:13px;
}

.article-list {
    max-width:920px;
    margin:0 auto;
}

.entry {
    border:1px solid var(--line);
    border-radius:15px;
    background:var(--panel);
    margin-bottom:12px;
    overflow:hidden;
}

.entry summary {
    list-style:none;
    display:flex;
    align-items:flex-start;
    gap:15px;
    padding:22px;
    cursor:pointer;
}

.entry summary::-webkit-details-marker {
    display:none;
}

.entry-number {
    font-size:11px;
    color:#738297;
    padding-top:4px;
    font-variant-numeric:tabular-nums;
}

.entry-summary {
    min-width:0;
    flex:1;
}

.entry-title {
    display:block;
    font-size:18px;
    line-height:1.5;
    font-weight:570;
    letter-spacing:-.3px;
}

.entry summary:hover .entry-title {
    color:var(--accent);
}

.entry-meta {
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    font-size:11px;
    color:var(--muted);
    margin-top:7px;
}

.entry-meta:empty {
    display:none;
}

.entry-chevron {
    padding-top:5px;
    color:#8292a5;
}

.entry-chevron svg {
    transition:transform .15s;
}

.entry[open] .entry-chevron svg {
    transform:rotate(180deg);
}

.entry[open] summary {
    border-bottom:1px solid var(--line);
}

.entry-content {
    padding:25px 34px 32px 52px;
}

.original-link {
    display:inline-flex;
    align-items:center;
    gap:7px;
    color:var(--accent);
    font-size:11px;
    margin-bottom:18px;
    overflow-wrap:anywhere;
}

.original-link svg {
    width:12px;
    height:12px;
}

.article-body {
    font-family:Georgia,"Times New Roman",serif;
    color:#d4dce6;
    font-size:18px;
    line-height:1.85;
    overflow-wrap:anywhere;
}

.article-body>:first-child {
    margin-top:0;
}

.article-body>:last-child {
    margin-bottom:0;
}

.article-body p {
    margin:0 0 1.2em;
}

.article-body a {
    color:#a7e6d1;
    text-decoration:underline;
    text-underline-offset:3px;
}

.article-body img {
    display:block;
    max-width:100%;
    height:auto;
    max-height:540px;
    object-fit:contain;
    border-radius:8px;
    margin:15px auto;
}

.article-body h1,.article-body h2,.article-body h3,.article-body h4 {
    font-family:ui-sans-serif,system-ui,sans-serif;
    line-height:1.4;
    letter-spacing:-.3px;
    color:var(--ink);
}

.article-body h1 {
    font-size:30px;
}

.article-body h2 {
    font-size:25px;
}

.article-body h3 {
    font-size:21px;
}

.article-body hr {
    border:0;
    border-top:1px solid var(--line);
    margin:24px 0;
}

.article-body blockquote {
    border-left:3px solid var(--accent);
    padding-left:20px;
    margin-left:0;
    color:var(--muted);
}

.article-body pre {
    overflow:auto;
    padding:15px;
    background:#0d131c;
    border-radius:8px;
    font-size:13px;
}

.article-body code {
    font-size:.85em;
}

.article-body table {
    display:block;
    max-width:100%;
    overflow-x:auto;
    border-collapse:collapse;
    font-size:15px;
}

.article-body td,.article-body th {
    padding:7px 10px;
    border:1px solid var(--line);
}

.error-state {
    padding:100px 0;
    max-width:660px;
}

.error-state h1 {
    font-size:46px;
    letter-spacing:-2px;
}

.error-state>p:not(.eyebrow) {
    color:var(--muted);
    margin:24px 0;
}

@media(min-width:1500px) {
    .shell {
        max-width:1320px;
    }
}

@media(max-width:980px) {
    .shell {
        padding:0 28px;
    }
    .feed-grid {
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
    .library-stat {
        padding-right:15px;
    }
    .hero {
        padding-top:50px;
    }
}

@media(max-width:620px) {
    .shell {
        padding:0 20px;
    }
    .site-header {
        height:78px;
    }
    .brand {
        font-size:18px;
    }
    .brand-mark {
        width:30px;
        height:30px;
    }
    .header-note {
        font-size:0;
        gap:0;
    }
    .hero {
        padding:40px 0 34px;
        gap:15px;
    }
    .hero h1 {
        font-size:45px;
        letter-spacing:-2.2px;
    }
    .hero-description {
        font-size:14px;
        max-width:330px;
    }
    .library-stat {
        display:none;
    }
    .eyebrow {
        font-size:9px;
        letter-spacing:1.4px;
    }
    .collection-toolbar {
        align-items:stretch;
        flex-direction:column;
        gap:17px;
        padding-bottom:18px;
    }
    .search-box {
        width:100%;
    }
    .feed-grid {
        grid-template-columns:1fr;
        gap:12px;
    }
    .feed-card {
        padding:20px 20px 15px;
    }
    .card-top {
        margin-bottom:14px;
    }
    .feed-domain {
        margin-bottom:20px;
    }
    .card-actions {
        font-size:12px;
    }
    .copy-button {
        font-size:12px;
    }
    .site-footer {
        margin-top:35px;
        gap:15px;
        flex-wrap:wrap;
    }
    .reader-heading {
        margin-top:26px;
    }
    .reader-meta {
        gap:8px;
    }
    .reader-meta a {
        margin-left:0;
        width:100%;
    }
    .reader-toolbar {
        gap:7px;
    }
    .text-button {
        width:100%;
        text-align:left;
        margin-left:0;
    }
    .entry summary {
        padding:17px 15px;
        gap:10px;
    }
    .entry-title {
        font-size:16px;
    }
    .entry-content {
        padding:20px;
    }
    .article-body {
        font-size:17px;
    }
    .entry-number {
        font-size:10px;
    }
    .back-link {
        margin-top:24px;
    }
    .toast {
        width:max-content;
        max-width:calc(100% - 40px);
        text-align:center;
    }
    .error-state h1 {
        font-size:36px;
    }
}

@media(prefers-reduced-motion:reduce) {
    * {
        transition:none!important;
        scroll-behavior:auto!important;
    }
}

/* Library layout controls and the compact list presentation. */
.library-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.view-toggle {
    display: flex;
    flex-shrink: 0;
    padding: 3px;
    gap: 3px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #111720;
}
.view-toggle button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
}
.view-toggle svg {
    width: 15px;
    height: 15px;
}
.view-toggle button[aria-pressed="true"] {
    background: #294438;
    color: var(--accent);
}
.feed-grid.is-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.feed-grid.is-list .feed-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    column-gap: 16px;
    padding: 16px 20px;
}
.feed-grid.is-list .card-top {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
    margin: 0;
}
.feed-grid.is-list h3 {
    grid-column: 2;
    grid-row: 1;
    font-size: 16px;
}
.feed-grid.is-list .feed-domain {
    grid-column: 2;
    grid-row: 2;
    margin: 3px 0 0;
}
.feed-grid.is-list .card-actions {
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: center;
    border: 0;
    padding: 0;
    margin: 0 0 0 12px;
}
@media(max-width:620px) {
    .library-controls {
        width: 100%;
        gap: 9px;
    }
    .library-controls .search-box {
        flex: 1;
        min-width: 0;
        width: auto;
    }
    .view-toggle button {
        padding: 8px;
    }
    .feed-grid.is-list .feed-card {
        grid-template-columns: 39px minmax(0, 1fr);
        padding: 15px;
        column-gap: 12px;
    }
    .feed-grid.is-list .card-actions {
        grid-column: 1 / -1;
        grid-row: 3;
        border-top: 1px solid var(--line);
        padding-top: 12px;
        margin: 12px 0 0;
    }
}

/* Article diagnostics shares the library and reader palette. */
.header-tools {
    display:flex;
    align-items:center;
    gap:28px;
}

.debug-nav {
    display:inline-flex;
    align-items:center;
    gap:7px;
    font-size:13px;
    color:var(--muted);
}

.debug-nav:hover,.debug-nav[aria-current="page"] {
    color:var(--accent);
}

.debug-heading {
    padding-bottom:24px;
}

.debug-intro {
    max-width:650px;
    color:var(--muted);
    margin:16px 0 0;
    font-size:17px;
}

.debug-form,.debug-report,.debug-preview {
    border:1px solid var(--line);
    border-radius:var(--radius);
    background:var(--panel);
    padding:28px;
    margin-bottom:24px;
}

.debug-form label {
    display:block;
    font-size:13px;
    font-weight:650;
    margin-bottom:10px;
}

.debug-input-row {
    display:flex;
    gap:12px;
}

.debug-input-row input {
    flex:1;
    min-width:0;
    width:100%;
    color:var(--ink);
    background:var(--bg);
    border:1px solid var(--line);
    border-radius:10px;
    padding:13px 16px;
}

.debug-input-row input::placeholder {
    color:#69798d;
}

.debug-input-row .button {
    flex:0 0 auto;
    align-self:flex-start;
    width:max-content;
    padding:13px 18px;
    font-size:15px;
    line-height:1.6;
    white-space:nowrap;
}

.debug-form .quiet-note {
    margin-bottom:0;
}

.debug-form[aria-busy="true"] .button {
    opacity:.7;
    cursor:wait;
}

.debug-error {
    color:#ffc6b8;
    margin-bottom:0;
}

.debug-result-heading,.debug-preview-heading {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
}

.debug-result-heading .eyebrow,.debug-preview-heading .eyebrow {
    margin:0 0 7px;
}

.debug-result-heading h2,.debug-preview-heading h2 {
    margin:0;
    font-size:25px;
    letter-spacing:-.7px;
}

.debug-badge {
    border:1px solid #8ee6c03d;
    border-radius:30px;
    background:#8ee6c00d;
    color:var(--accent);
    padding:5px 12px;
    font-size:12px;
}

.debug-badge.is-warning {
    color:#f0c99a;
    border-color:#f0c99a44;
    background:#f0c99a0a;
}

.debug-stats {
    display:flex;
    flex-wrap:wrap;
    gap:12px 28px;
    color:var(--muted);
    font-size:13px;
    margin:22px 0 12px;
}

.debug-stats strong {
    color:var(--ink);
    font-weight:550;
}

.debug-source {
    display:inline-flex;
    align-items:center;
    gap:8px;
    color:var(--muted);
    font-size:13px;
    word-break:break-word;
}

.debug-source:hover {
    color:var(--accent);
}

.debug-report .notice {
    margin-top:22px;
}

.debug-trace {
    margin-top:24px;
    border-top:1px solid var(--line);
    padding-top:20px;
}

.debug-trace summary {
    display:flex;
    align-items:center;
    gap:12px;
    font-weight:600;
    cursor:pointer;
    list-style:none;
}

.debug-trace summary::-webkit-details-marker {
    display:none;
}

.debug-trace summary span {
    color:var(--muted);
    font-size:12px;
    font-weight:400;
}

.debug-trace summary svg {
    margin-left:auto;
    transition:transform .15s;
}

.debug-trace[open] summary svg {
    transform:rotate(180deg);
}

.debug-table-wrap {
    overflow-x:auto;
    margin-top:18px;
}

.debug-table {
    width:100%;
    border-collapse:collapse;
    font-size:12px;
    text-align:left;
}

.debug-table th,.debug-table td {
    border-bottom:1px solid var(--line);
    padding:13px 12px;
    vertical-align:top;
}

.debug-table thead th {
    color:var(--muted);
    font-size:11px;
    font-weight:500;
    text-transform:uppercase;
    letter-spacing:1px;
}

.debug-table th:first-child {
    padding-left:0;
    min-width:122px;
}

.debug-table tbody th {
    font-weight:550;
}

.debug-table tr:last-child th,.debug-table tr:last-child td {
    border-bottom:0;
}

.trace-status {
    color:var(--muted);
    white-space:nowrap;
}

.trace-status.is-accepted {
    color:var(--accent);
}

.trace-details {
    margin:0;
    min-width:160px;
}

.trace-details div {
    display:flex;
    gap:10px;
    margin-bottom:3px;
}

.trace-details dt {
    flex:0 0 90px;
    color:var(--muted);
}

.trace-details dd {
    margin:0;
    word-break:break-word;
    font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
}

.trace-time {
    white-space:nowrap;
    color:var(--muted);
}

.debug-preview-heading {
    margin-bottom:26px;
    padding-bottom:24px;
    border-bottom:1px solid var(--line);
}

.debug-preview .article-body {
    max-width:760px;
    margin:0 auto;
    padding:0 10px;
}

@media (max-width:680px) {
    .header-tools {
        gap:12px;
    }

    .debug-form,.debug-report,.debug-preview {
        padding:20px;
    }

    .debug-input-row {
        flex-direction:column;
    }

    .debug-result-heading,.debug-preview-heading {
        align-items:flex-start;
    }

    .debug-preview-heading {
        flex-direction:column;
    }

    .debug-preview .article-body {
        padding:0;
    }

}
