:root {
  --bg: #0e1422;
  --bg-2: #141b2c;
  --card: #1a2236;
  --card-2: #232c44;
  --line: rgba(168, 199, 224, 0.10);
  --line-2: rgba(168, 199, 224, 0.20);
  --shadow-sm: 0 4px 14px -6px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.03) inset;
  --shadow-md: 0 14px 32px -14px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  --shadow-lg: 0 30px 60px -24px rgba(0, 0, 0, 0.70), 0 1px 0 rgba(255, 255, 255, 0.05) inset;
  --cream: #f5f1e8;
  --cream-dim: #b8b3a6;
  --cream-faint: #7a7569;
  --bd-green: #3fd773;
  --bd-green-soft: rgba(63, 215, 115, 0.14);
  --bd-green-strong: #5ee388;
  --bd-navy: #1a1f2e;

  --accent-blue: #5aa9ff;
  --accent-blue-soft: rgba(90, 169, 255, 0.16);
  --accent-green: #3fd773;
  --accent-green-soft: rgba(63, 215, 115, 0.16);
  --accent-indigo: #a3a8ff;
  --accent-indigo-soft: rgba(163, 168, 255, 0.16);
  --accent-coral: #ff8b8b;
  --accent-coral-soft: rgba(255, 139, 139, 0.16);
  --accent-purple: #c897ff;
  --accent-purple-soft: rgba(200, 151, 255, 0.16);
  --accent-amber: #ffc66b;
  --accent-amber-soft: rgba(255, 198, 107, 0.16);
  --accent-teal: #5eead4;
  --accent-teal-soft: rgba(94, 234, 212, 0.16);
  --accent-cyan: #7ed3e8;
  --accent-cyan-soft: rgba(126, 211, 232, 0.16);

  --red: #ff6e6e;
  --red-soft: rgba(255, 110, 110, 0.16);
  --amber: #ffc66b;
  --amber-soft: rgba(255, 198, 107, 0.16);

  --radius: 16px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --serif: 'DM Serif Display', 'Cambria', Georgia, serif;
  --sans: 'DM Sans', -apple-system, 'Helvetica Neue', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 80% -10%, rgba(90, 169, 255, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 5% 5%, rgba(63, 215, 115, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 110%, rgba(200, 151, 255, 0.08) 0%, transparent 55%);
}
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--mono); }
.serif { font-family: var(--serif); }
kbd {
  font-family: var(--mono); font-size: 11px;
  background: var(--card-2); border: 1px solid var(--line);
  border-radius: 4px; padding: 2px 6px;
  color: var(--cream-dim);
}

main.hub {
  max-width: 1360px;
  margin: 0 auto;
  padding: 36px 36px 110px;
}

/* META BAR — bigger logo + bigger date */
.meta-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 40px;
}
.meta-left { display: flex; align-items: center; gap: 22px; }
.meta-left img { height: 48px; width: auto; }
.meta-divider { width: 1px; height: 28px; background: var(--line-2); }
.meta-eyebrow {
  font-family: var(--serif); font-style: italic;
  font-size: 22px;
  color: var(--cream-dim);
  letter-spacing: -0.01em;
}
.meta-right {
  display: flex; align-items: center; gap: 18px;
  font-size: 22px; font-weight: 500;
  color: var(--cream);
  font-family: var(--serif); font-style: italic;
  letter-spacing: -0.01em;
}
.meta-right .meta-live {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--bd-green);
  background: var(--bd-green-soft);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-family: var(--sans); font-style: normal;
  font-weight: 600;
  border: 1px solid rgba(63, 215, 115, 0.25);
}
.meta-right .meta-live::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--bd-green);
  box-shadow: 0 0 8px rgba(63, 215, 115, 0.6);
}

/* DISPATCH BRIEF — premium */
.dispatch {
  position: relative;
  background:
    linear-gradient(135deg, rgba(63, 215, 115, 0.08), transparent 50%),
    radial-gradient(circle at 90% 10%, rgba(255, 198, 107, 0.10), transparent 50%),
    var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 30px 24px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.dispatch::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--bd-green) 0%, var(--accent-blue) 50%, var(--accent-purple) 100%);
}
.dispatch[hidden] { display: none; }
.dispatch-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.dispatch-eyebrow {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  color: var(--bd-green);
  letter-spacing: 0.10em; text-transform: uppercase;
  background: var(--bd-green-soft);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(63, 215, 115, 0.25);
  align-self: center;
}
.dispatch-title {
  margin: 0;
  font-family: var(--serif); font-style: italic;
  font-size: 30px; font-weight: 400; line-height: 1.05;
  color: var(--cream);
  letter-spacing: -0.01em;
}
.dispatch-meta {
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}
.dispatch-date {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  color: var(--cream-dim);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.dispatch-dismiss {
  background: transparent; border: 1px solid var(--line);
  color: var(--cream-dim); cursor: pointer;
  padding: 6px 14px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 500;
  transition: border-color 180ms, color 180ms, background 180ms;
}
.dispatch-dismiss:hover { border-color: var(--line-2); color: var(--cream); background: var(--card-2); }
.dispatch-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}
.dispatch-row {
  display: grid; grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ds-accent, var(--bd-green));
  border-radius: var(--radius-sm);
  transition: border-color 180ms, transform 180ms, background 180ms;
}
.dispatch-row:hover {
  border-color: var(--line-2);
  transform: translateY(-1px);
  background: rgba(168, 199, 224, 0.06);
}
.dispatch-row[data-accent="blue"]   { --ds-accent: var(--accent-blue); }
.dispatch-row[data-accent="green"]  { --ds-accent: var(--accent-green); }
.dispatch-row[data-accent="coral"]  { --ds-accent: var(--accent-coral); }
.dispatch-row[data-accent="amber"]  { --ds-accent: var(--accent-amber); }
.dispatch-row[data-accent="indigo"] { --ds-accent: var(--accent-indigo); }
.dispatch-row[data-accent="purple"] { --ds-accent: var(--accent-purple); }
.dispatch-row[data-accent="teal"]   { --ds-accent: var(--accent-teal); }

.dispatch-icon {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px;
  background: color-mix(in srgb, var(--ds-accent) 18%, transparent);
  color: var(--ds-accent);
  font-size: 18px;
  font-weight: 600;
  flex-shrink: 0;
}
.dispatch-content { min-width: 0; }
.dispatch-label {
  display: inline-block;
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  color: var(--ds-accent, var(--bd-green));
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 4px;
}
.dispatch-text {
  color: var(--cream);
  font-size: 14px;
  line-height: 1.45;
}

/* WIDGETS */
.widgets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 56px;
}
.tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 18px;
  box-shadow: var(--shadow-sm);
  min-height: 260px;
  display: flex; flex-direction: column;
  transition: box-shadow 240ms cubic-bezier(0.16, 1, 0.3, 1), transform 240ms cubic-bezier(0.16, 1, 0.3, 1), border-color 240ms;
}
.tile:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--line-2); }
.tile[data-state="stale"] { opacity: 0.78; }
.tile[data-state="error"] { opacity: 0.85; }

.tile-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.tile-eyebrow {
  font-size: 12px; font-weight: 600;
  color: var(--cream-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tile-slot {
  font-size: 12px; font-weight: 500;
  color: var(--cream-faint);
  font-family: var(--mono);
}
.tile-title {
  margin: 0 0 18px;
  font-family: var(--serif); font-style: italic;
  font-size: 28px; font-weight: 400;
  color: var(--cream);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.tile-body { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.tile-body[data-empty="true"] { justify-content: center; }
.tile-empty {
  font-size: 14px; color: var(--cream-faint);
  text-align: center; padding: 20px 0;
  font-style: italic;
}
.tile-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px; align-items: baseline;
  font-size: 14px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.tile-row:last-child { border-bottom: 0; }
.tile-row .row-tag {
  font-family: var(--mono); font-size: 11px;
  color: var(--cream-dim);
  background: var(--card-2);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-weight: 500;
}
.tile-row .row-tag.crit { color: var(--red); background: var(--red-soft); }
.tile-row .row-tag.high { color: var(--amber); background: var(--amber-soft); }
.tile-row .row-tag.ok { color: var(--bd-green); background: var(--bd-green-soft); }
.tile-row .row-label { color: var(--cream); font-weight: 500; }
.tile-row .row-meta { color: var(--cream-faint); font-size: 13px; }
.tile-foot {
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
  color: var(--cream-faint);
}
.tile-foot-sep { color: var(--cream-faint); opacity: 0.4; }
.tile-state-fresh { color: var(--bd-green); font-weight: 600; }
.tile-state-stale { color: var(--amber); font-weight: 600; }
.tile-state-error { color: var(--red); font-weight: 600; }
.tile-error { color: var(--red); }
.tile-updated, .tile-source { font-family: var(--mono); font-size: 11px; }

/* WEATHER TILE — premium */
.tile.weather { padding: 0; overflow: hidden; }
.tile.weather .tile-head {
  position: absolute; top: 18px; right: 22px;
  margin: 0; z-index: 2;
}
.tile.weather .tile-head .tile-eyebrow { color: rgba(245, 241, 232, 0.85); }
.tile.weather .tile-head .tile-slot { color: rgba(245, 241, 232, 0.55); }
.tile.weather .tile-title { display: none; }

.tile.weather .wx-hero {
  position: relative;
  padding: 22px 26px 24px;
  background: linear-gradient(135deg, rgba(63, 215, 115, 0.10), rgba(36, 49, 73, 0.6)),
              radial-gradient(circle at 80% 20%, rgba(255, 198, 107, 0.18), transparent 55%);
  border-bottom: 1px solid var(--line);
}
.tile.weather .wx-hero[data-tone="amber"]  { background: linear-gradient(135deg, rgba(255, 198, 107, 0.22), rgba(26, 34, 54, 0.85)), radial-gradient(circle at 85% 15%, rgba(255, 198, 107, 0.35), transparent 60%); }
.tile.weather .wx-hero[data-tone="blue"]   { background: linear-gradient(135deg, rgba(90, 169, 255, 0.22), rgba(26, 34, 54, 0.85)), radial-gradient(circle at 85% 15%, rgba(90, 169, 255, 0.30), transparent 60%); }
.tile.weather .wx-hero[data-tone="cyan"]   { background: linear-gradient(135deg, rgba(126, 211, 232, 0.22), rgba(26, 34, 54, 0.85)), radial-gradient(circle at 85% 15%, rgba(126, 211, 232, 0.30), transparent 60%); }
.tile.weather .wx-hero[data-tone="purple"] { background: linear-gradient(135deg, rgba(200, 151, 255, 0.22), rgba(26, 34, 54, 0.85)), radial-gradient(circle at 85% 15%, rgba(200, 151, 255, 0.30), transparent 60%); }
.tile.weather .wx-hero[data-tone="cream"]  { background: linear-gradient(135deg, rgba(168, 199, 224, 0.15), rgba(26, 34, 54, 0.85)), radial-gradient(circle at 85% 15%, rgba(168, 199, 224, 0.20), transparent 60%); }

.tile.weather .wx-hero-label {
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: rgba(245, 241, 232, 0.7);
  margin-bottom: 8px;
}
.tile.weather .wx-hero-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.tile.weather .wx-hero-temp {
  font-family: var(--serif); font-style: italic;
  font-size: 56px; font-weight: 400; line-height: 0.92;
  color: var(--cream);
  letter-spacing: -0.025em;
}
.tile.weather .wx-hero-temp sup {
  font-size: 22px; vertical-align: top; margin-left: 2px;
  font-style: normal; font-family: var(--sans); font-weight: 600;
  color: rgba(245, 241, 232, 0.7);
}
.tile.weather .wx-hero-icon {
  font-size: 56px; line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}
.tile.weather .wx-hero-cond {
  font-size: 14px; font-weight: 600;
  color: var(--cream);
  margin-bottom: 12px;
}
.tile.weather .wx-hero-cond .wx-hero-range {
  color: rgba(245, 241, 232, 0.55);
  font-weight: 500;
  font-family: var(--mono);
  font-size: 13px;
  margin-left: 6px;
}
.tile.weather .wx-hero-chips {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.tile.weather .wx-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: rgba(245, 241, 232, 0.10);
  border: 1px solid rgba(245, 241, 232, 0.14);
  font-size: 12px; font-weight: 600;
  color: var(--cream);
}
.tile.weather .wx-chip .wx-chip-label {
  font-size: 10px; font-weight: 500;
  color: rgba(245, 241, 232, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 2px;
}

.tile.weather .wx-days {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  padding: 14px 12px 16px;
}
.tile.weather .wx-day {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 8px 4px;
  border-radius: 10px;
  transition: background 180ms;
}
.tile.weather .wx-day:hover { background: rgba(168, 199, 224, 0.08); }
.tile.weather .wx-day-name {
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--cream-dim);
}
.tile.weather .wx-day-icon {
  font-size: 24px; line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}
.tile.weather .wx-day-icon[data-tone="amber"]  { color: var(--accent-amber); }
.tile.weather .wx-day-icon[data-tone="cream"]  { color: var(--cream-dim); }
.tile.weather .wx-day-icon[data-tone="blue"]   { color: var(--accent-blue); }
.tile.weather .wx-day-icon[data-tone="cyan"]   { color: var(--accent-cyan); }
.tile.weather .wx-day-icon[data-tone="purple"] { color: var(--accent-purple); }
.tile.weather .wx-day-hi {
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  color: var(--cream);
}
.tile.weather .wx-day-lo {
  font-family: var(--mono); font-size: 11.5px;
  color: var(--cream-faint);
}

.tile.weather .tile-foot {
  margin-top: 0; padding: 12px 22px 16px;
  border-top: 1px solid var(--line);
}

/* CALENDAR — premium */
.tile-today .tile-head { margin-bottom: 8px; }
.cal-date-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: var(--accent-blue-soft);
  color: var(--accent-blue);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  margin-bottom: 16px;
}
.cal-date-pill::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(90, 169, 255, 0.18);
}
.tile-today .tile-title { margin-bottom: 12px; }

.cal-events {
  flex: 1;
  display: flex; flex-direction: column; gap: 8px;
  margin: 0; padding: 0; list-style: none;
}
.cal-event {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  padding: 11px 13px 11px 16px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--ev-accent, var(--accent-blue));
  transition: border-color 180ms, background 180ms, transform 180ms;
}
.cal-event:hover {
  background: rgba(168, 199, 224, 0.06);
  border-color: var(--line-2);
  transform: translateX(2px);
}
.cal-event[data-accent="blue"]   { --ev-accent: var(--accent-blue); }
.cal-event[data-accent="green"]  { --ev-accent: var(--accent-green); }
.cal-event[data-accent="indigo"] { --ev-accent: var(--accent-indigo); }
.cal-event[data-accent="purple"] { --ev-accent: var(--accent-purple); }
.cal-event[data-accent="coral"]  { --ev-accent: var(--accent-coral); }
.cal-event[data-accent="amber"]  { --ev-accent: var(--accent-amber); }
.cal-event[data-accent="teal"]   { --ev-accent: var(--accent-teal); }
.cal-event[data-accent="cyan"]   { --ev-accent: var(--accent-cyan); }

.cal-event-time {
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  color: var(--ev-accent, var(--accent-blue));
  display: flex; flex-direction: column;
  line-height: 1.25;
}
.cal-event-time .end {
  font-size: 10.5px; font-weight: 500;
  color: var(--cream-faint);
  margin-top: 2px;
}
.cal-event-time .all-day {
  font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.cal-event-body { min-width: 0; }
.cal-event-title {
  font-size: 14.5px; font-weight: 600;
  color: var(--cream);
  margin: 0 0 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-event-loc {
  font-size: 12px;
  color: var(--cream-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-event-badge {
  position: absolute; top: 8px; right: 10px;
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.10em; text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(63, 215, 115, 0.18);
  color: var(--bd-green);
  border: 1px solid rgba(63, 215, 115, 0.30);
}
.cal-event[data-now="true"] {
  background: linear-gradient(90deg, rgba(63, 215, 115, 0.12), transparent 60%);
  border-color: rgba(63, 215, 115, 0.30);
}
.cal-event[data-now="true"] .cal-event-badge {
  animation: cal-pulse 2.4s ease-in-out infinite;
}
@keyframes cal-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

.cal-empty {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 24px 12px;
  color: var(--cream-dim);
  gap: 6px;
}
.cal-empty-icon {
  font-size: 36px;
  color: var(--bd-green);
  filter: drop-shadow(0 4px 12px rgba(63, 215, 115, 0.4));
}
.cal-empty-title {
  font-family: var(--serif); font-style: italic;
  font-size: 22px;
  color: var(--cream);
}
.cal-empty-sub {
  font-size: 13px;
  color: var(--cream-dim);
}

/* NOTES — PREMIUM DIGITAL STICKY NOTE
   Warm cream paper, multi-layered shadow, paper grain, ruled lines.
   Slight rotation gives the "casually placed" feel without being kitsch. */
.tile.notes {
  background: #f6e7a3;
  background-image:
    linear-gradient(180deg, #f9eda9 0%, #f4e095 100%),
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.55) 0%, transparent 45%),
    radial-gradient(circle at 80% 90%, rgba(140, 100, 30, 0.06) 0%, transparent 50%);
  background-blend-mode: normal, screen, multiply;
  color: #2a2410;
  border: 0;
  border-radius: 8px;
  padding: 26px 26px 22px;
  position: relative;
  transform: rotate(-0.6deg);
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 280ms;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -2px 0 rgba(140, 100, 30, 0.08),
    0 1px 1px rgba(0, 0, 0, 0.10),
    0 8px 18px -6px rgba(160, 120, 40, 0.35),
    0 22px 36px -16px rgba(0, 0, 0, 0.55),
    0 36px 60px -28px rgba(0, 0, 0, 0.40);
  overflow: hidden;
}
.tile.notes:hover {
  transform: rotate(-0.2deg) translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -2px 0 rgba(140, 100, 30, 0.08),
    0 1px 1px rgba(0, 0, 0, 0.10),
    0 14px 26px -6px rgba(160, 120, 40, 0.4),
    0 32px 50px -18px rgba(0, 0, 0, 0.55),
    0 50px 80px -30px rgba(0, 0, 0, 0.45);
}

/* Subtle paper-grain texture overlay */
.tile.notes::before {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse at 15% 20%, rgba(255, 255, 255, 0.25) 0%, transparent 35%),
    radial-gradient(ellipse at 85% 75%, rgba(140, 100, 30, 0.06) 0%, transparent 40%),
    repeating-linear-gradient(115deg, transparent 0px, transparent 3px, rgba(140, 100, 30, 0.012) 3px, rgba(140, 100, 30, 0.012) 4px);
  border-radius: inherit;
  mix-blend-mode: multiply;
}

/* Tape strip at top */
.tile.notes::after {
  content: '';
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%) rotate(-1.4deg);
  width: 90px; height: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.50) 0%, rgba(255, 255, 255, 0.30) 100%);
  border-left: 1px solid rgba(255, 255, 255, 0.65);
  border-right: 1px solid rgba(140, 100, 30, 0.10);
  box-shadow: 0 4px 8px -3px rgba(0, 0, 0, 0.18);
  z-index: 2;
  backdrop-filter: blur(1px);
}

.tile.notes .tile-head {
  position: relative; z-index: 1;
}
.tile.notes .tile-eyebrow {
  color: rgba(42, 36, 16, 0.55);
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tile.notes .tile-slot {
  color: rgba(42, 36, 16, 0.45);
  font-size: 11.5px;
}
.tile.notes .tile-title {
  position: relative; z-index: 1;
  color: #2a2410;
  margin-bottom: 14px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.005em;
}

.tile.notes .notes-textarea {
  position: relative; z-index: 1;
  flex: 1; width: 100%;
  background: transparent; border: 0; outline: 0;
  color: #2a2410;
  font-family: var(--sans); font-size: 15px;
  font-weight: 500;
  line-height: 28px;
  resize: none;
  padding: 0;
  min-height: 130px;
  /* Ruled-paper lines */
  background-image: repeating-linear-gradient(
    180deg,
    transparent 0px,
    transparent 27px,
    rgba(140, 100, 30, 0.18) 27px,
    rgba(140, 100, 30, 0.18) 28px
  );
  /* Caret color for visibility on cream */
  caret-color: var(--bd-green-strong);
}
.tile.notes .notes-textarea::placeholder {
  color: rgba(42, 36, 16, 0.42);
  font-style: italic;
}
.tile.notes .notes-textarea::selection { background: rgba(63, 215, 115, 0.30); }

.tile.notes .tile-foot {
  position: relative; z-index: 1;
  border-top: 1px dashed rgba(140, 100, 30, 0.22);
  padding-top: 12px;
  margin-top: 14px;
}
.tile.notes .notes-save {
  font-size: 11.5px; font-weight: 600;
  color: rgba(42, 36, 16, 0.55);
  display: inline-flex; align-items: center; gap: 7px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tile.notes .notes-save[data-state="saving"] { color: #b97d1f; }
.tile.notes .notes-save[data-state="saved"]  { color: #1f7a3a; }
.tile.notes .notes-save::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
}
.tile.notes .tile-foot-sep { color: rgba(140, 100, 30, 0.30); }
.tile.notes .tile-updated  { color: rgba(42, 36, 16, 0.50); }

/* CALENDAR CONFIGURE */
.cal-configure {
  display: flex; flex-direction: column; gap: 16px;
  padding: 8px 0;
  flex: 1;
}
.cal-configure-msg {
  font-size: 14px; color: var(--cream-dim);
  line-height: 1.55;
  margin: 0;
}
.cal-configure-msg strong { color: var(--cream); font-weight: 600; }
.cal-configure-hint {
  display: block;
  font-size: 12px; color: var(--cream-faint);
  margin-top: 6px;
  font-style: italic;
}
.cal-configure-form { display: flex; flex-direction: column; gap: 10px; }
.cal-configure-input {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 11px 14px;
  font-family: var(--mono); font-size: 13px;
  color: var(--cream); outline: 0;
  transition: border-color 180ms, background 180ms;
}
.cal-configure-input:focus {
  border-color: var(--bd-green);
  background: var(--card);
}
.cal-configure-input::placeholder { color: var(--cream-faint); }
.cal-configure-btn {
  background: var(--bd-green);
  border: 1px solid var(--bd-green);
  border-radius: var(--radius-sm); padding: 12px 16px;
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  color: #0e1422; cursor: pointer;
  transition: background 180ms, transform 180ms, box-shadow 180ms;
}
.cal-configure-btn:hover {
  background: var(--bd-green-strong);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -10px rgba(63, 215, 115, 0.6);
}
.cal-reset {
  font-size: 12px; color: var(--cream-faint);
  cursor: pointer;
  margin-left: auto;
}
.cal-reset:hover { color: var(--red); }

/* LINK LAUNCHER — colorful per-category accents */
.launcher-head {
  margin: 0 0 26px;
  font-family: var(--serif); font-style: italic;
  font-size: 36px; font-weight: 400;
  color: var(--cream);
  letter-spacing: -0.01em;
}
.launcher {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 28px;
}
@media (max-width: 1100px) { .launcher { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px)  { .launcher { grid-template-columns: 1fr; } }
.cat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px 16px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: box-shadow 240ms, border-color 240ms, transform 240ms;
  position: relative;
  overflow: hidden;
}
.cat::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--cat-accent, var(--bd-green));
  opacity: 0.85;
}
.cat:hover { box-shadow: var(--shadow-md); border-color: var(--line-2); transform: translateY(-2px); }

.cat[data-accent="blue"]   { --cat-accent: var(--accent-blue);   --cat-accent-soft: var(--accent-blue-soft);   }
.cat[data-accent="green"]  { --cat-accent: var(--accent-green);  --cat-accent-soft: var(--accent-green-soft);  }
.cat[data-accent="indigo"] { --cat-accent: var(--accent-indigo); --cat-accent-soft: var(--accent-indigo-soft); }
.cat[data-accent="coral"]  { --cat-accent: var(--accent-coral);  --cat-accent-soft: var(--accent-coral-soft);  }
.cat[data-accent="purple"] { --cat-accent: var(--accent-purple); --cat-accent-soft: var(--accent-purple-soft); }
.cat[data-accent="amber"]  { --cat-accent: var(--accent-amber);  --cat-accent-soft: var(--accent-amber-soft);  }
.cat[data-accent="teal"]   { --cat-accent: var(--accent-teal);   --cat-accent-soft: var(--accent-teal-soft);   }
.cat[data-accent="cyan"]   { --cat-accent: var(--accent-cyan);   --cat-accent-soft: var(--accent-cyan-soft);   }

.cat-head {
  font-size: 12px; font-weight: 700;
  color: var(--cat-accent, var(--bd-green));
  margin: 0 0 16px;
  letter-spacing: 0.06em;
  display: flex; align-items: center; gap: 10px;
}
.cat-head::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.cat-tiles { display: flex; flex-direction: column; gap: 4px; }
.tile-link {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  font-size: 14.5px; font-weight: 500;
  color: var(--cream);
  cursor: pointer;
  transition: background 180ms, color 180ms, transform 180ms;
}
.tile-link:hover {
  background: var(--cat-accent-soft, var(--bd-green-soft));
  color: var(--cat-accent, var(--bd-green));
  transform: translateX(4px);
}
.tile-link .icon {
  width: 28px; height: 28px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: #ffffff;
  border-radius: 7px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}
.tile-link .icon img {
  width: 18px; height: 18px;
  display: block;
}
.tile-link .icon-fallback {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  color: var(--bd-navy);
  background: var(--cat-accent, var(--bd-green));
  border-radius: 7px;
}

/* REFRESH ALL */
.refresh-all {
  position: fixed; bottom: 26px; left: 26px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--cream-dim); cursor: pointer;
  padding: 10px 18px;
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  display: flex; align-items: center; gap: 10px;
  transition: box-shadow 180ms, color 180ms, transform 180ms, border-color 180ms;
  box-shadow: var(--shadow-sm);
  z-index: 100;
}
.refresh-all:hover { color: var(--bd-green); border-color: rgba(63, 215, 115, 0.4); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.refresh-all .last-sync {
  color: var(--cream-faint); font-size: 11.5px;
  font-family: var(--mono);
}

/* CMD+K PALETTE */
.palette {
  position: fixed; inset: 0;
  display: none; z-index: 200;
  align-items: flex-start; justify-content: center;
  padding-top: 14vh;
}
.palette[data-open="true"] { display: flex; }
.palette-backdrop {
  position: absolute; inset: 0;
  background: rgba(14, 20, 34, 0.65);
  backdrop-filter: blur(8px);
}
.palette-modal {
  position: relative; z-index: 1;
  width: min(640px, 92vw);
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.palette-input {
  width: 100%;
  background: transparent; border: 0; outline: 0;
  color: var(--cream);
  padding: 20px 24px;
  font-size: 17px;
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
}
.palette-input::placeholder { color: var(--cream-faint); }
.palette-results {
  max-height: 48vh; overflow-y: auto;
  padding: 8px 0;
}
.palette-row {
  display: grid; grid-template-columns: 32px 1fr auto;
  align-items: center; gap: 14px;
  padding: 12px 22px;
  font-size: 14px; color: var(--cream);
  cursor: pointer;
}
.palette-row[data-selected="true"] { background: var(--bd-green-soft); color: var(--bd-green); }
.palette-row:hover { background: var(--bd-green-soft); }
.palette-row-icon {
  color: var(--cream-dim); text-align: center; font-size: 15px;
  background: var(--card-2);
  border-radius: 6px;
  height: 22px; line-height: 22px;
  font-weight: 600;
}
.palette-row[data-selected="true"] .palette-row-icon { color: var(--bd-green); background: var(--bd-green-soft); }
.palette-row-label { font-weight: 500; }
.palette-row-meta {
  font-family: var(--mono); font-size: 11px;
  color: var(--cream-faint);
}
.palette-empty {
  padding: 32px; text-align: center;
  color: var(--cream-faint);
  font-size: 14px; font-style: italic;
}
.palette-foot {
  border-top: 1px solid var(--line);
  padding: 12px 24px;
  display: flex; gap: 22px;
  font-size: 11px;
  color: var(--cream-faint);
}
