/* Dedicated BOOX / e-ink presentation. The original dashboard remains untouched. */
:root {
  --bg: #fff;
  --surface: #fff;
  --border: #111;
  --text: #111;
  --muted: #444;
  --amber: #111;
  --yellow: #111;
  --peach: #111;
  --green: #111;
  --blue: #000;
  --blue-visited: #333;
  --blue-hover: #000;
  --neon: #000;
}

html,
body {
  min-height: 100%;
  background: #fff !important;
  color: #111 !important;
  font-family: system-ui, "Noto Sans", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  transition: none !important;
}

body::before,
#rain-canvas {
  display: none !important;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

header {
  align-items: baseline;
  border-bottom: 2px solid #111;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
}

#date,
#clock {
  color: #111 !important;
  font-family: inherit;
  letter-spacing: 0;
  text-shadow: none !important;
}

#date {
  font-size: 1rem;
  font-weight: 500;
  text-transform: none;
}

#clock {
  font-size: 2rem;
  font-weight: 500;
}

.clock-seconds {
  color: #444 !important;
}

.layout {
  display: block !important;
}

.sidebar,
.feed-area {
  display: block;
  min-width: 0;
}

/* Keep the local weather and world clocks as one compact glanceable unit
   whenever the e-ink viewport has room for two useful columns. */
@media (min-width: 680px) {
  .sidebar {
    display: grid;
    grid-template-areas:
      "weather world"
      "sunset sunset";
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
  }

  #weather-block { grid-area: weather; }
  #cities-block { grid-area: world; }
  #sunset-alert-block { grid-area: sunset; }

  .sidebar .block {
    margin-bottom: 0;
  }
}

.sidebar .block,
.feed-grid .block,
.author-grid .block,
#news-block {
  margin-bottom: 1.5rem;
}

@media (min-width: 680px) {
  .sidebar .block { margin-bottom: 0; }
}

.block {
  background: #fff !important;
  border: 1px solid #111 !important;
  border-radius: 0;
  box-shadow: none;
  padding: 1.25rem;
  transition: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.block-label {
  border-bottom: 1px solid #111;
  color: #111 !important;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
  margin-bottom: 1rem;
  padding-bottom: 0.35rem;
  text-shadow: none !important;
  text-transform: none;
}

.block-label a,
.block-label a:visited {
  color: #111 !important;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.weather-temp {
  font-size: 3rem;
  font-weight: 500;
}

.city-time,
.city-temp,
.sunset-countdown {
  font-weight: 500;
}

.unit,
.weather-meta,
.sunset-sub,
.city-time,
.loading {
  color: #444 !important;
}

.weather-row,
.sunset-countdown,
.city-row {
  color: #111 !important;
}

.weather-icon,
.city-emoji {
  filter: grayscale(1);
}

.sunset-alert {
  background: #fff !important;
  border: 1px solid #111 !important;
}

.feed-grid,
.author-grid { display: block !important; }

/* Newer feeds must share the reset used by every established card list. */
#tldr-sunil-list,
#tldr-edwest-list,
#tldr-klement-list,
#tldr-livescience-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 900px) {
  .feed-grid,
  .author-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .feed-grid .block,
  .author-grid .block {
    margin-bottom: 0;
  }

  /* Grid gap does not cross from the author cards into the feed cards. */
  .author-grid { margin-bottom: 1.5rem; }
}

#benedict-block {
  background: #fff !important;
  border: 1px solid #111 !important;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 1.5rem;
  padding: 1.25rem;
}

#benedict-block > summary {
  cursor: pointer;
  list-style: none;
}

#benedict-block > summary::-webkit-details-marker { display: none; }

#benedict-block > summary::after {
  content: "hide";
  float: right;
  font-size: 0.85rem;
  font-weight: 400;
}

#benedict-block:not([open]) > summary {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

#benedict-block:not([open]) > summary::after { content: "show"; }

.benedict-item + .benedict-item {
  border-top-color: #777;
  margin-top: 1rem;
  padding-top: 1rem;
}

.benedict-item h3 {
  color: #111;
  font-family: inherit;
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.35;
  margin-bottom: 0.25rem;
}

.benedict-source {
  color: #111;
  font-size: 0.78rem;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 0.14em;
  white-space: nowrap;
}

.benedict-item p {
  color: #222;
  font-size: 1rem;
  line-height: 1.6;
}

#news-list,
#tldr-acotra-list,
#tldr-shreyas-list,
#tldr-critchlow-list,
#tldr-ango-list,
#tldr-mack-list,
#tldr-mixed-list,
#tldr-kryspin-list,
#tldr-windytan-list,
#tldr-naval-list,
#tldr-zenpencils-list,
#tldr-sivers-books-list,
#tldr-simon-list,
#tldr-other-list,
#tldr-tech-list,
#tldr-ai-list,
#tldr-devops-list,
#tldr-infosec-list,
#tldr-fintech-list,
#tldr-marketing-list,
#tldr-design-list,
#tldr-product-list,
#tldr-sunil-list,
#tldr-edwest-list,
#tldr-klement-list,
#tldr-livescience-list,
#tldr-pens-list {
  gap: 1rem;
}

#news-list li,
#tldr-acotra-list li,
#tldr-shreyas-list li,
#tldr-critchlow-list li,
#tldr-ango-list li,
#tldr-mack-list li,
#tldr-mixed-list li,
#tldr-kryspin-list li,
#tldr-windytan-list li,
#tldr-naval-list li,
#tldr-zenpencils-list li,
#tldr-sivers-books-list li,
#tldr-simon-list li,
#tldr-other-list li,
#tldr-tech-list li,
#tldr-ai-list li,
#tldr-devops-list li,
#tldr-infosec-list li,
#tldr-fintech-list li,
#tldr-marketing-list li,
#tldr-design-list li,
#tldr-product-list li,
#tldr-sunil-list li,
#tldr-edwest-list li,
#tldr-klement-list li,
#tldr-livescience-list li,
#tldr-pens-list li {
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.55;
}

.feed-divider {
  color: #444;
  font-size: 1rem;
  line-height: 1;
  margin: 0.1rem 0;
}

.archive-marker {
  color: #444;
  font-size: 0.8em;
  margin-right: 0.18em;
}

.feed-summary { display: block; margin-top: .2rem; color: #333; font-size: .95em; line-height: 1.45; }
#tldr-hermes-releases-list { list-style: none; display: flex; flex-direction: column; gap: 1rem; margin: 0; padding: 0; }
#tldr-hermes-releases-list li { font-size: 1.1rem; font-weight: 500; line-height: 1.55; }
#tldr-hermes-releases-list a { color: #000; text-decoration: underline; text-underline-offset: .14em; }

#news-list a,
#benedict-list a,
#tldr-acotra-list a,
#tldr-shreyas-list a,
#tldr-critchlow-list a,
#tldr-ango-list a,
#tldr-mack-list a,
#tldr-mixed-list a,
#tldr-kryspin-list a,
#tldr-windytan-list a,
#tldr-naval-list a,
#tldr-zenpencils-list a,
#tldr-sivers-books-list a,
#tldr-simon-list a,
#tldr-other-list a,
#tldr-tech-list a,
#tldr-ai-list a,
#tldr-devops-list a,
#tldr-infosec-list a,
#tldr-fintech-list a,
#tldr-marketing-list a,
#tldr-design-list a,
#tldr-product-list a,
#tldr-sunil-list a,
#tldr-edwest-list a,
#tldr-klement-list a,
#tldr-livescience-list a,
#tldr-pens-list a,
#news-list a:visited,
#benedict-list a:visited,
#tldr-acotra-list a:visited,
#tldr-shreyas-list a:visited,
#tldr-critchlow-list a:visited,
#tldr-ango-list a:visited,
#tldr-mack-list a:visited,
#tldr-mixed-list a:visited,
#tldr-kryspin-list a:visited,
#tldr-windytan-list a:visited,
#tldr-naval-list a:visited,
#tldr-zenpencils-list a:visited,
#tldr-sivers-books-list a:visited,
#tldr-simon-list a:visited,
#tldr-other-list a:visited,
#tldr-tech-list a:visited,
#tldr-ai-list a:visited,
#tldr-devops-list a:visited,
#tldr-infosec-list a:visited,
#tldr-fintech-list a:visited,
#tldr-marketing-list a:visited,
#tldr-design-list a:visited,
#tldr-product-list a:visited,
#tldr-sunil-list a:visited,
#tldr-edwest-list a:visited,
#tldr-klement-list a:visited,
#tldr-livescience-list a:visited,
#tldr-pens-list:visited {
  color: #000 !important;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
  letter-spacing: 0.02em;
}

@media (max-width: 600px) {
  html, body { font-size: 17px; }
  main { padding: 1rem 0.9rem 3rem; }
  header { display: block; margin-bottom: 1.25rem; }
  #clock { margin-top: 0.25rem; }
  .block { padding: 1rem; margin-bottom: 1rem; }
  .weather-row { flex-wrap: wrap; gap: 0.6rem 1rem; }
}

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

/* One compact newsletter digest; size relative to the box body scale. */
.feed-area .box.tldr-digest .tldr-digest-rows { font-size: inherit; line-height: 1.5; }
.tldr-digest-row { margin-bottom: 12px; }
.tldr-digest-row:last-child { margin-bottom: 0; }
.feed-area .box.tldr-digest .tldr-category { font-weight: 600; }
.feed-area .box.tldr-digest .tldr-digest-story { display: inline; margin: 0; padding: 0; list-style: none; }
.feed-area .box.tldr-digest .tldr-digest-story li { display: inline; padding: 0; font-size: inherit; line-height: inherit; }
.feed-area .box.tldr-digest .tldr-digest-story li::before { content: none; }
.feed-area .box.tldr-digest .tldr-digest-story a { font-size: inherit; line-height: inherit; }
