ul {
	margin-left:0;
	margin-right:0;
}

a {
	color: #0e4758;
}

.cache {
	font-size: 70%;
}

li {
	text-indent:0em; 
	background-position: left 0.3em;
}

h1 {
	font-size: 2rem;
}
h2 {
	font-size: 1.5rem;
}

html {
	font-size: 110%;
}

/* ── Dark mode toggle button ── */
#dark-toggle {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 1.3rem;
	padding: 0 0.4rem;
	line-height: 1;
	vertical-align: middle;
	opacity: 0.65;
	transition: opacity 0.2s, transform 0.3s;
}
#dark-toggle:hover {
	opacity: 1;
	transform: rotate(20deg);
}

/* ── Dark mode styles ── */
html.dark-mode,
html.dark-mode body {
	background-color: #1c1c1e !important;
	color: #d1d1d1 !important;
}
html.dark-mode a {
	color: #7ab8cc !important;
}
html.dark-mode a:hover {
	color: #a8d8e8 !important;
}
/* All structural containers */
html.dark-mode .row,
html.dark-mode .columns,
html.dark-mode div {
	background-color: #1c1c1e !important;
	color: #d1d1d1 !important;
}
html.dark-mode .row.header {
	border-bottom: 1px solid #3a3a3e !important;
}
/* Lists and items */
html.dark-mode ul,
html.dark-mode li {
	background-color: #1c1c1e !important;
	color: #d1d1d1 !important;
}
html.dark-mode li {
	border-bottom-color: #333 !important;
}
html.dark-mode li[data-type=datetime] {
	color: #888 !important;
}
/* Form elements */
html.dark-mode select,
html.dark-mode input,
html.dark-mode textarea {
	background-color: #2a2a2e !important;
	color: #d1d1d1 !important;
	border-color: #555 !important;
}

/* ── Last refresh indicator ── */
.row.header h3 {
	display: flex;
	align-items: center;
	margin: 0;
}
#last-refresh {
	margin-left: auto;
	font-size: 0.75rem;
	opacity: 0.55;
	font-weight: normal;
	white-space: nowrap;
}
html.dark-mode #last-refresh {
	opacity: 0.5 !important;
	color: #d1d1d1 !important;
}

/* ── 1. Muted monospace timestamp on headlines ── */
li span.item-time {
	font-size: 0.78rem;
	font-family: monospace;
	color: #888;
	margin-right: 0.4rem;
}
html.dark-mode li span.item-time {
	color: #666 !important;
}

/* ── 2. Date separator ── */
li[data-type=datetime] {
	font-size: 0.72rem;
	font-variant: small-caps;
	letter-spacing: 0.06em;
	color: #777;
	padding-top: 0.9rem;
	border-top: 1px solid #ddd;
	margin-top: 0.3rem;
	list-style: none;
}
html.dark-mode li[data-type=datetime] {
	border-top-color: #333 !important;
	color: #666 !important;
}

/* ── 4. Headline hover ── */
li:not([data-type=datetime]):hover {
	background-color: #f4f6f8 !important;
}
html.dark-mode li:not([data-type=datetime]):hover {
	background-color: #26262a !important;
}

/* ── 5. Pagination ── */
.pagination-row {
	padding: 0.5rem 0 0.8rem;
}
.pagination-row .columns {
	display: flex;
	justify-content: space-between;
}
.pagination-row a {
	display: inline-block;
	padding: 0.3rem 0.8rem;
	border: 1px solid #c0c8d0;
	border-radius: 4px;
	font-size: 0.85rem;
	text-decoration: none;
	color: #0e4758;
}
.pagination-row a:hover {
	background-color: #eef2f5;
}
html.dark-mode .pagination-row a {
	border-color: #444 !important;
	color: #7ab8cc !important;
	background-color: transparent !important;
}
html.dark-mode .pagination-row a:hover {
	background-color: #26262a !important;
}

/* ── Headline detail page ── */
.headline-page {
    padding: 1rem 0 2rem;
}

.headline-article {
    background: #fff;
    border: 1px solid #d9e0e6;
    border-radius: 6px;
    padding: 1.2rem 1.4rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.headline-article-header {
    margin-bottom: 1.2rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid #e5eaef;
}

.headline-article-header h1 {
    margin-bottom: 0.35rem;
    font-size: 1.9rem;
    line-height: 1.25;
}

.headline-article-link {
    margin-bottom: 0;
    font-size: 0.9rem;
    opacity: 0.75;
}

.headline-content {
    line-height: 1.7;
}

.headline-content > *:first-child {
    margin-top: 0;
}

.headline-content h1,
.headline-content h2,
.headline-content h3,
.headline-content h4 {
    line-height: 1.3;
    margin-top: 1.5rem;
    margin-bottom: 0.7rem;
}

.headline-content p,
.headline-content ul,
.headline-content ol,
.headline-content blockquote,
.headline-content figure {
    margin-bottom: 1rem;
}

.headline-content ul,
.headline-content ol {
    margin-left: 1.4rem;
}

.headline-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.headline-content figure {
    margin-left: 0;
    margin-right: 0;
}

.headline-content figcaption {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.35rem;
}

.headline-content > main,
.headline-content > article {
    display: block;
}

html.dark-mode .headline-article {
    background: #222428 !important;
    border-color: #34373d !important;
    box-shadow: none;
}

html.dark-mode .headline-article-header {
    border-bottom-color: #34373d !important;
}

html.dark-mode .headline-article-link {
    opacity: 0.65;
}

html.dark-mode .headline-content figcaption {
    color: #a6a6ac !important;
}

/* ── 6. Feed sidebar active state ── */
.feed-list li.active-feed a {
	font-weight: bold;
	border-left: 3px solid #0e4758;
	padding-left: 0.4rem;
}
html.dark-mode .feed-list li.active-feed a {
	border-left-color: #7ab8cc !important;
}

/* ── Refresh button in header ── */
#refresh-btn {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer;
    font-size: inherit;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
    transition: opacity 0.2s;
}
#refresh-btn:hover { opacity: 0.7; }
#refresh-btn:disabled { cursor: not-allowed; opacity: 0.5; }

#refresh-btn .refresh-icon {
    display: inline-block;
    line-height: 1;
    transform-origin: 50% 50%;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
#refresh-btn.spinning {
    display: inline-block;
}

#refresh-btn.spinning .refresh-icon {
    animation: spin 0.8s linear infinite;
}

/* ── Refresh toast notification ── */
#refresh-toast {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: #2a9d8f;
    color: #fff;
    padding: 0.6rem 1.4rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    pointer-events: none;
}
#refresh-toast.refresh-toast-visible {
    display: block;
    animation: toast-in 0.2s ease, toast-out 0.4s ease 2.1s forwards;
}
#refresh-toast.refresh-toast-error { background: #e76f51; }
@keyframes toast-in  { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toast-out { from { opacity: 1; } to { opacity: 0; } }
html.dark-mode #refresh-toast { box-shadow: 0 2px 10px rgba(0,0,0,0.6); }

/* ── Hamburger button (mobile only) ── */
#hamburger-btn {
    background: none !important;
    border: none !important;
    padding: 0 0.5rem 0 0 !important;
    margin: 0 !important;
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
    color: inherit;
    vertical-align: middle;
    transition: opacity 0.2s;
}
#hamburger-btn:hover { opacity: 0.7; }
html.dark-mode #hamburger-btn { color: #d1d1d1 !important; }

/* ── Slide-in drawer ── */
#mobile-drawer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 75vw;
    max-width: 300px;
    background: #fff;
    z-index: 1000;
    overflow-y: auto;
    padding: 1.2rem 1rem;
    box-shadow: 3px 0 16px rgba(0,0,0,0.18);
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
#mobile-drawer.open {
    transform: translateX(0);
}
/* Only show on small screens */
@media screen and (max-width: 1024px) {
    #mobile-drawer { display: block; }
}

/* ── Drawer overlay ── */
#drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0);
    z-index: 999;
    transition: background 0.28s ease;
    pointer-events: none;
}
#drawer-overlay.open {
    background: rgba(0,0,0,0.45);
    pointer-events: all;
}
@media screen and (max-width: 1024px) {
    #drawer-overlay { display: block; }
}

html.dark-mode #mobile-drawer {
    background: #1c1c1e !important;
    color: #d1d1d1 !important;
    box-shadow: 3px 0 16px rgba(0,0,0,0.5) !important;
}
html.dark-mode #drawer-overlay {
    background: rgba(0,0,0,0) !important;
}
html.dark-mode #drawer-overlay.open {
    background: rgba(0,0,0,0.65) !important;
}

/* ── Drawer internal header (← button + Feeds title) ── */
.drawer-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.2rem 0 0.8rem;
    border-bottom: 1px solid #ddd;
    margin-bottom: 0.6rem;
}
.drawer-title {
    font-size: 0.72rem;
    font-variant: small-caps;
    letter-spacing: 0.06em;
    color: #777;
}
#drawer-close-btn {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
    color: #0e4758;
    transition: opacity 0.2s;
}
#drawer-close-btn:hover { opacity: 0.6; }
html.dark-mode .drawer-header {
    border-bottom-color: #3a3a3e !important;
}
html.dark-mode .drawer-title { color: #666 !important; }
html.dark-mode #drawer-close-btn { color: #7ab8cc !important; }

/* --- Back button on headline detail page --- */
.back-btn {
    display: inline-block;
    font-size: 1.4rem;
    line-height: 1;
    padding: 0.25rem 0.65rem;
    margin-bottom: 0.85rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-decoration: none;
    color: #0e4758;
}
.back-btn:hover {
    background: #eef6fa;
    border-color: #0e4758;
    color: #0e4758;
}
html.dark-mode .back-btn {
    border-color: #555;
    color: #7ab8cc;
}
html.dark-mode .back-btn:hover {
    background: #2a2a2e;
    border-color: #7ab8cc;
}
