:root {
--bg: #ffffff;
--card-bg: #ffffff;
--text: #222222;
--muted: #6b6b6b;
--border: #e6e6e6;
--accent: #007bff;
--accent-hover: #0056b3;
--new-bg: #f0f8ff;
--control-bg: rgba(0,0,0,0.03);
--shadow: 0 4px 14px rgba(0,0,0,0.06);
--focus-ring: rgba(0,123,255,0.25);
}

[data-theme="dark"] {
--bg: #0f1113;
--card-bg: #0f1316;
--text: #e6edf3;
--muted: #9aa6b2;
--border: #1f272b;
--accent: #58a6ff;
--accent-hover: #2f78d7;
--new-bg: #0b1720;
--control-bg: rgba(255,255,255,0.03);
--shadow: 0 6px 20px rgba(0,0,0,0.6);
--focus-ring: rgba(88,166,255,0.14);
}

html, body {
height: 100%;
background: var(--bg);
color: var(--text);
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

.container {
max-width: 900px;
margin: 2rem auto;
padding: 1rem;
}

header {
display: flex;
gap: 1rem;
align-items: center;
justify-content: space-between;
margin-bottom: 1rem;
}

h1 {
margin: 0;
font-size: 1.25rem;
font-weight: 600;
}

.controls {
display: flex;
flex-wrap: wrap;
gap: 1rem;
align-items: center;
margin-bottom: 1rem;
}

/* UNUSED RULE START */
.top-actions {
display: flex;
gap: 0.5rem;
align-items: center;
}

/* UNUSED RULE END */

.theme-toggle {
padding: 0.45rem 0.75rem;
border-radius: 6px;
border: 1px solid var(--border);
background: var(--control-bg);
color: var(--text);
cursor: pointer;
font-size: 0.95rem;
transition: background 0.15s ease, border-color 0.15s ease;
}

.theme-toggle:focus {
outline: none;
box-shadow: 0 0 0 4px var(--focus-ring);
border-color: var(--accent);
}

label {
font-size: 1rem;
color: var(--text);
}

input[type="text"] {
padding: 0.5rem;
border-radius: 6px;
border: 1px solid var(--border);
background: var(--card-bg);
color: var(--text);
}

input[type="text"]:focus {
outline: none;
box-shadow: 0 0 0 4px var(--focus-ring);
}

fieldset {
border: 1px solid var(--border);
border-radius: 8px;
padding: 0.75rem;
flex: 1;
min-width: 220px;
background: var(--card-bg);
}

legend {
font-weight: 700;
padding: 0 0.5rem;
color: var(--text);
}

.sources-list {
display: flex;
flex-direction: column;
gap: 0.35rem;
margin-top: 0.5rem;
}

.sources-list > div {
display: flex;
align-items: center;
padding: 0.4rem 0.6rem;
border-radius: 6px;
border: 1px solid transparent;
background: transparent;
gap: 0.5rem;
transition: background 0.12s ease, border-color 0.12s ease;
}

.sources-list > div:hover {
background: var(--control-bg);
}

.sources-list label {
font-size: 0.95rem;
cursor: pointer;
color: var(--text);
margin: 0;
flex: 1;
}

.sources-list input[type="checkbox"] {
width: 1rem;
height: 1rem;
flex-shrink: 0;
accent-color: var(--accent);
}

.sources-list input[type="checkbox"]:checked + label {
font-weight: 600;
}

.sources-list input[type="checkbox"]:checked + label::before {
content: "";
}

.sources-list input[type="checkbox"]:checked + label {
color: var(--text);
}

.sources-list input[type="checkbox"]:checked + label {
color: var(--text);
}

.sources-list input[type="checkbox"]:checked + label {
font-weight: 600;
}

.sources-list input[type="checkbox"]:checked + label {
color: var(--text);
}

.sources-list input[type="checkbox"]:checked + label {
color: var(--text);
}

.sources-list input[type="checkbox"]:checked + label {
color: var(--text);
}

#itemsList {
list-style: none;
padding: 0;
margin-top: 1rem;
}

#itemsList li {
display: flex;
gap: 1rem;
padding: 1rem;
border: 1px solid var(--border);
border-radius: 12px;
margin-bottom: 1rem;
align-items: flex-start;
background: var(--card-bg);
box-shadow: var(--shadow);
transition: transform 0.12s ease;
}

#itemsList li:hover {
transform: translateY(-4px);
}

/* UNUSED RULE START */
.thumbnail {
width: 120px;
height: 80px;
object-fit: cover;
border-radius: 6px;
flex-shrink: 0;
background: linear-gradient(135deg, rgba(0,0,0,0.04), rgba(0,0,0,0.02));
border: 1px solid var(--border);
}

/* UNUSED RULE END */

/* UNUSED RULE START */
.content {
flex: 1;
}

/* UNUSED RULE END */

/* UNUSED RULE START */
.description {
font-size: 0.95rem;
color: var(--muted);
margin: 0.5rem 0;
line-height: 1.4;
}

/* UNUSED RULE END */

/* UNUSED RULE START */
.title {
font-weight: 700;
font-size: 1.05rem;
color: var(--text);
}

/* UNUSED RULE END */

.title a {
color: var(--text);
text-decoration: none;
}

.title a:hover {
text-decoration: underline;
}

/* UNUSED RULE START */
.source {
font-size: 0.85rem;
color: var(--muted);
margin-bottom: 0.25rem;
}

/* UNUSED RULE END */

/* UNUSED RULE START */
.pub {
font-size: 0.85rem;
color: var(--muted);
margin-top: 0.25rem;
}

/* UNUSED RULE END */

#cy-global-header {
position: sticky;
top: 0;
z-index: 50;
background: var(--bg);
border-bottom: 1px solid var(--border);
backdrop-filter: blur(12px);
}

.cy-header-inner {
max-width: 900px;
margin: 0 auto;
padding: 0.5rem 1rem;
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
}

.cy-header-left {
display: flex;
align-items: center;
}

.cy-brand {
font-size: 1rem;
font-weight: 600;
letter-spacing: 0.04em;
text-transform: lowercase;
text-decoration: none;
color: var(--text);
}

.cy-header-center {
flex: 1;
display: flex;
justify-content: center;
}

.cy-header-caption {
margin: 0;
font-size: 0.8rem;
color: var(--muted);
white-space: nowrap;
}

.cy-header-caption-link {
color: var(--muted);
text-decoration: underline;
text-decoration-thickness: 0.08em;
text-underline-offset: 0.14em;
}

.cy-header-caption-link:hover {
color: var(--text);
}

.cy-header-right {
display: flex;
align-items: center;
}

@media (max-width: 640px) {
/* UNUSED RULE START */
.thumbnail {
width: 100px;
height: 64px;
}

/* UNUSED RULE END */

.controls {
gap: 0.5rem;
}

}

@media (max-width: 640px) {
.cy-header-inner {
flex-direction: column;
align-items: stretch;
}

.cy-header-center {
justify-content: flex-start;
}

}

