/* =========================================================
   feed.divyansh.fun — board styles
   Glance uses a 10px root font-size, so sizes here are in px.
   ========================================================= */

:root {
  --widget-gap: 16px;
  --widget-content-vertical-padding: 14px;
  --widget-content-horizontal-padding: 16px;
  --border-radius: 12px;

  --pad: 16px;                         /* one inset used everywhere */
  --text: hsl(240 6% 92%);
  --muted: hsl(240 6% 60%);
  --faint: hsl(240 6% 42%);
  --accent: hsl(38 92% 62%);
  --line: rgba(255, 255, 255, 0.07);
  --line-hover: rgba(255, 255, 255, 0.14);
  --surface: rgba(255, 255, 255, 0.025);
  --surface-hover: rgba(255, 255, 255, 0.05);
}

html,
body,
.body-content {
  background: hsl(240 14% 6%) !important;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- widget chrome: one consistent inset + spacing ---------- */
.widget-header {
  padding: 0 var(--pad);
  margin-bottom: 8px;
  height: 18px;
}

.widget-header h2,
.widget-header h2 a {
  line-height: 18px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  color: var(--muted);
}

.widget-beta-icon {
  display: none;
}

.widget-content:not(.widget-content-frameless) {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: none;
}

/* ---------- left column ---------- */
.clock .size-h1 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.clock [data-year],
.clock [data-weekday] {
  font-size: 12px;
  color: var(--muted);
}

.widget-type-monitor .size-title-dynamic {
  font-size: 13px;
  font-weight: 500;
}

.widget-type-monitor .widget-content {
  font-size: 12px;
}

/* server box: the header already says "Server", drop the duplicate name row */
.widget-type-server-stats .server-info {
  display: none;
}

.widget-type-server-stats .server-stats {
  margin-top: 0;
}

/* ---------- compact lists (GitHub, Launches, Essays, Mine) ---------- */
.sl {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 6px 8px;
  margin: 0 -8px;              /* hover pill without shifting text off the inset */
  border-radius: 8px;
  text-decoration: none;
  transition: background 120ms ease;
}

a.sl-row:hover {
  background: var(--surface-hover);
}

.sl-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sl-t {
  font-size: 13px;
  font-weight: 560;
  line-height: 1.3;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sl-t.wrap {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.sl-s {
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sl-owner {
  color: var(--muted);
  font-weight: 450;
}

.sl-ico {
  flex: 0 0 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.sl-empty {
  font-size: 12px;
  color: var(--faint);
  margin: 0;
}

.sl-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 14px 0 4px;
}

.sl-label:first-child {
  margin-top: 0;
}

/* ---------- centre feed ---------- */
.widget:has(.fx-wrap) > .widget-header {
  display: none;
}

.fx-r {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* the filter sits exactly where other columns have their header label */
.fx-chips {
  display: flex;
  gap: 20px;
  padding: 0 var(--pad);
  margin-bottom: 8px;
  height: 18px;
  align-items: center;
}

.fx-chips label {
  cursor: pointer;
  user-select: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  line-height: 18px;
  color: var(--faint);
  position: relative;
  transition: color 120ms ease;
}

.fx-chips label::after {
  content: "";
  position: absolute;
  inset: -8px -6px;            /* bigger tap target, no layout shift */
}

.fx-chips label:hover {
  color: var(--text);
}

#fx-all:checked ~ .fx-chips label[for="fx-all"],
#fx-ai:checked ~ .fx-chips label[for="fx-ai"],
#fx-founder:checked ~ .fx-chips label[for="fx-founder"],
#fx-dev:checked ~ .fx-chips label[for="fx-dev"] {
  color: var(--accent);
}

#fx-all:checked ~ .fx-grid .fx-card:not([data-home="1"]),
#fx-ai:checked ~ .fx-grid .fx-card:not([data-t~="ai"]),
#fx-founder:checked ~ .fx-grid .fx-card:not([data-t~="founder"]),
#fx-dev:checked ~ .fx-grid .fx-card:not([data-t~="dev"]) {
  display: none;
}

.fx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.fx-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--border-radius);
  text-decoration: none;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.fx-card:hover {
  border-color: var(--line-hover);
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.fx-img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, hsl(240 20% 13%), hsl(270 18% 12%));
}

.fx-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fx-img span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  padding: 0 12px;
}

.fx-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  gap: 6px;
  padding: 11px 15px 13px;
  min-width: 0;
}

.fx-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  min-width: 0;
}

.fx-src {
  color: var(--accent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fx-meta > :last-child {
  flex-shrink: 0;
}

.fx-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.32;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fx-sum {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fx-sum:empty {
  display: none;
}

/* featured story: only in the "All" view */
#fx-all:checked ~ .fx-grid .fx-lead {
  grid-column: 1 / -1;
  flex-direction: row;
}

#fx-all:checked ~ .fx-grid .fx-lead .fx-img {
  flex: 0 0 46%;
  aspect-ratio: 16 / 9;
}

#fx-all:checked ~ .fx-grid .fx-lead .fx-body {
  padding: 16px 20px;
  gap: 8px;
}

#fx-all:checked ~ .fx-grid .fx-lead .fx-title {
  font-size: 19px;
  line-height: 1.28;
  -webkit-line-clamp: 3;
}

#fx-all:checked ~ .fx-grid .fx-lead .fx-sum {
  font-size: 13px;
  -webkit-line-clamp: 4;
}

@container widget (max-width: 560px) {
  #fx-all:checked ~ .fx-grid .fx-lead {
    flex-direction: column;
  }
  #fx-all:checked ~ .fx-grid .fx-lead .fx-img {
    flex-basis: auto;
  }
}

/* ---------- small screens ---------- */
@media (max-width: 700px) {
  .fx-grid {
    grid-template-columns: 1fr;
  }
  .fx-chips {
    gap: 16px;
  }
}

/* ---------- clock + planner merged into one card ---------- */
.widget-type-clock + .widget:has(.pl) {
  margin-top: 0;
}
.widget-type-clock + .widget:has(.pl) > .widget-header {
  display: none;
}
.widget-type-clock .widget-content {
  border-bottom: none;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  padding-bottom: 6px;
}
.widget-type-clock + .widget:has(.pl) > .widget-content {
  border-top: none;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  padding-top: 4px;
}
.widget-type-clock .clock-time {
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.pl-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.pl-mkt {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.pl-dow,
.pl-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}
.pl-dow span {
  font-size: 10px;
  font-weight: 600;
  color: var(--faint);
  padding-bottom: 4px;
}
.pl-grid {
  row-gap: 2px;
}
.pl-d {
  position: relative;
  justify-self: center;
  width: 28px;
  height: 28px;
  line-height: 28px;
  border-radius: 50%;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  cursor: default;
}
.pl-d.we { color: var(--muted); }
.pl-d.out { color: var(--faint); opacity: 0.55; }
.pl-d.hol {
  color: hsl(0 85% 74%);
  box-shadow: inset 0 0 0 1.5px hsl(0 80% 62%);
}
.pl-d.today {
  color: hsl(240 14% 8%);
  background: var(--accent);
  font-weight: 700;
  opacity: 1;
}
.pl-d.dot::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--accent);
}
.pl-d.today.dot::after { background: hsl(240 14% 8%); }

.pl-key {
  display: flex;
  gap: 14px;
  margin: 8px 0 2px;
  font-size: 10.5px;
  color: var(--faint);
}
.pl-key span::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: 1px;
}
.k-rem::before { background: var(--accent); }
.k-hol::before { background: hsl(0 80% 66%); }

.pl-list,
.pl-todo {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.pl-list li {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 12.5px;
  line-height: 1.35;
  padding-left: 10px;
  border-left: 2px solid var(--accent);
}
.pl-list li.k-hol { border-left-color: hsl(0 80% 66%); }
.pl-list li.k-ev { border-left-color: hsl(200 80% 62%); }
.pl-when {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.pl-what { color: var(--text); }
.pl-todo li {
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--text);
  padding-left: 18px;
  position: relative;
}
.pl-todo li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--muted);
  border-radius: 3px;
}

/* ---------- 3-per-page carousels with dots (Services, Launches) ---------- */
.cr-r { position: absolute; opacity: 0; pointer-events: none; }
.cr-r:nth-of-type(1):checked ~ .cr-items > :not([data-p="0"]),
.cr-r:nth-of-type(2):checked ~ .cr-items > :not([data-p="1"]),
.cr-r:nth-of-type(3):checked ~ .cr-items > :not([data-p="2"]),
.cr-r:nth-of-type(4):checked ~ .cr-items > :not([data-p="3"]),
.cr-r:nth-of-type(5):checked ~ .cr-items > :not([data-p="4"]) {
  display: none;
}
.cr-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}
.cr-dots:has(label:only-child) { display: none; }
.cr-dots label {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--faint);
  opacity: 0.5;
  cursor: pointer;
  position: relative;
  transition: width 160ms ease, background 160ms ease, opacity 160ms ease;
}
.cr-dots label::after { content: ""; position: absolute; inset: -6px; }
.cr-r:nth-of-type(1):checked ~ .cr-dots label:nth-child(1),
.cr-r:nth-of-type(2):checked ~ .cr-dots label:nth-child(2),
.cr-r:nth-of-type(3):checked ~ .cr-dots label:nth-child(3),
.cr-r:nth-of-type(4):checked ~ .cr-dots label:nth-child(4),
.cr-r:nth-of-type(5):checked ~ .cr-dots label:nth-child(5) {
  width: 16px;
  background: var(--accent);
  opacity: 1;
}

/* services: 3 tiles per page */
.sv-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.sv {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  text-decoration: none;
  min-width: 0;
}
a.sv[href]:hover { border-color: var(--line-hover); }
.sv-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: hsl(145 60% 50%);
  box-shadow: 0 0 0 3px hsla(145, 60%, 50%, 0.15);
  margin-bottom: 3px;
}
.st-slow .sv-dot { background: hsl(40 90% 58%); box-shadow: 0 0 0 3px hsla(40, 90%, 58%, 0.15); }
.st-down .sv-dot { background: hsl(0 80% 62%); box-shadow: 0 0 0 3px hsla(0, 80%, 62%, 0.18); }
.sv-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sv-ms {
  font-size: 10.5px;
  color: var(--faint);
}
.st-down .sv-ms { color: hsl(0 80% 70%); }

/* ---------- quote + "new" badge ---------- */
.qt {
  margin: 0 0 12px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line);
}
.qt p {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 560;
  color: var(--text);
}
.qt p::before { content: "“"; color: var(--accent); }
.qt p::after { content: "”"; color: var(--accent); }
.qt cite {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
}
.nw {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: hsl(240 14% 8%);
  background: var(--accent);
  border-radius: 4px;
  padding: 1px 5px;
  margin-right: 6px;
  vertical-align: 1px;
}

/* month navigation */
.pl-r { position: absolute; opacity: 0; pointer-events: none; }
.pl-month { display: none; }
.pl-r:checked + .pl-month { display: block; }
.pl-nav { display: flex; gap: 4px; }
.pl-nav label, .pl-nav .off {
  width: 24px;
  height: 22px;
  line-height: 20px;
  text-align: center;
  border-radius: 6px;
  font-size: 17px;
  font-weight: 500;
  color: var(--muted);
}
.pl-nav label { cursor: pointer; transition: background 120ms ease, color 120ms ease; }
.pl-nav label:hover { background: var(--surface-hover); color: var(--text); }
.pl-nav .off { opacity: 0.25; }
.pl-month .pl-top { align-items: center; }

/* busy days (concerts, visits, trips) */
.pl-d.busy {
  background: hsla(205, 85%, 62%, 0.2);
  color: hsl(205 90% 80%);
}
.pl-d.busy.we { color: hsl(205 90% 80%); }
.pl-d.busy.hol { box-shadow: inset 0 0 0 1.5px hsl(0 80% 62%); }
.pl-d.busy.today { background: var(--accent); color: hsl(240 14% 8%); }
.pl-list li.k-busy { border-left-color: hsl(205 85% 62%); }

/* ---------- Journiv goals ---------- */
.gl {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.gl-item { display: flex; flex-direction: column; gap: 5px; }
.gl-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.gl-t {
  font-size: 13px;
  font-weight: 560;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gl-n {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.gl-met .gl-n { color: hsl(145 60% 58%); }
.gl-dots { display: flex; gap: 5px; }
.gl-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--line-hover);
}
.gl-dots span.on { background: var(--accent); border-color: var(--accent); }
.gl-met .gl-dots span.on { background: hsl(145 60% 50%); border-color: hsl(145 60% 50%); }
.gl-bar { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.gl-bar span { display: block; height: 100%; background: var(--accent); }
.gl-met .gl-bar span { background: hsl(145 60% 50%); }
.gl-when {
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- mobile bar: keep scroll-to-top + column dots, drop the menu (single page, fixed theme) ---------- */
.mobile-navigation-label:has(.mobile-navigation-page-links-input),
.mobile-navigation-page-links,
.mobile-navigation-actions { display: none !important; }
