:root {
  --bg: #ffffff;
  --bg-2: #f7f8f6;
  --panel: #ffffff;
  --panel-2: #f3f5f1;
  --line: #d9e0d4;
  --text: #1a2218;
  --muted: #5f6d5a;
  --accent: #c8881f;
  --accent-2: #e2a23a;
  --danger: #c24b3d;
  --ok: #2f8f4e;
  --focus: #3b7dd8;
  --shadow: 0 10px 30px rgba(26, 34, 24, 0.08);
  --radius: 18px;
  --font: "IBM Plex Sans", system-ui, sans-serif;
  --display: "Syne", "IBM Plex Sans", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  background: #ffffff;
}

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.app {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  background: #ffffff;
}

.rail {
  padding: 22px 18px;
  border-right: 1px solid var(--line);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 6px 4px;
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background:
    linear-gradient(145deg, var(--accent-2), var(--accent) 55%, #4f8a58);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35);
}
.brand-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}
.brand-sub {
  color: var(--muted);
  font-size: 0.82rem;
  word-break: break-all;
}

.nav { display: flex; flex-direction: column; gap: 8px; }

.module-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-2);
}
.module-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 10px;
  padding: 10px 8px;
  font-weight: 600;
  font-size: 0.92rem;
}
.module-btn.active {
  background: #ffffff;
  color: var(--text);
  box-shadow: var(--shadow);
}

.news-pane {
  margin: 0 18px 28px;
  min-height: 70vh;
}
.news-kicker {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.news-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  min-height: 1.2em;
}
.crumb-btn {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.crumb-btn:hover { text-decoration: underline; }
.crumb-sep { color: var(--muted); }
.news-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 8px 0 28px;
}
.news-empty {
  padding: 28px 4px;
  color: var(--muted);
  font-size: 1.05rem;
}
.news-subject {
  border: 0;
  border-bottom: 1px solid rgba(18, 32, 51, 0.1);
  background: transparent;
  border-radius: 0;
  padding: 26px 0 18px;
  animation: newsRise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--delay, 0ms);
}
.news-subject.is-loading { opacity: 0.7; }
.news-subject-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.news-subject-meta {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.news-lines {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.news-line {
  display: grid;
  grid-template-columns: 2.2rem 1fr auto;
  gap: 14px;
  align-items: start;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 14px 4px;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  border-top: 1px solid rgba(18, 32, 51, 0.06);
}
button.news-line:hover {
  background: transparent;
  transform: translateX(4px);
}
button.news-line:hover .news-line-text {
  color: var(--news-teal, #1f6f6a);
}
button.news-line:hover .news-chevron {
  opacity: 1;
  transform: translateX(2px);
}
.news-line.is-loading,
.news-line.muted-line {
  cursor: default;
  color: var(--muted);
  display: grid;
  transform: none;
}
.news-line-num {
  width: auto;
  height: auto;
  border-radius: 0;
  display: block;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  margin-top: 0.45em;
  font-variant-numeric: tabular-nums;
}
.news-line-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.news-line-text {
  font-family: var(--news-display, var(--display));
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--news-ink, var(--text));
  transition: color 0.2s ease;
}
.news-line.is-quote .news-line-num {
  color: var(--news-teal, #1f6f6a);
  font-weight: 700;
}
.news-line.is-up .news-line-text {
  color: #1f7a4d;
}
.news-line.is-down .news-line-text {
  color: #b33b2f;
}
.news-line.is-quote .news-chevron {
  opacity: 0.7;
}
.news-chevron {
  color: var(--news-teal, var(--accent));
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
  margin-top: 0.55em;
  opacity: 0.35;
  transition: 0.2s ease;
}
.news-symbol {
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--news-teal, var(--accent));
}
.skeleton-bar {
  display: inline-block;
  width: min(420px, 80%);
  height: 1.1em;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(18,32,51,0.06), rgba(18,32,51,0.12), rgba(18,32,51,0.06));
  background-size: 200% 100%;
  animation: newsShimmer 1.2s linear infinite;
}
.skeleton-bar.short { width: min(260px, 55%); }

.news-detail-lead {
  padding: 8px 0 22px;
  border-bottom: 1px solid rgba(18, 32, 51, 0.1);
  margin-bottom: 8px;
  animation: newsRise 0.45s ease both;
}
.news-primary-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--news-teal, #1f6f6a);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.news-primary-link:hover { text-decoration: underline; }

.quote-board {
  margin-top: 8px;
  padding: 22px 4px 10px;
  animation: newsRise 0.45s ease both;
}
.quote-board-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.quote-name {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.95rem;
}
.quote-last-price {
  font-family: var(--news-display, var(--display));
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1;
  letter-spacing: -0.03em;
}
.quote-board.is-up .quote-last-price { color: #1f7a4d; }
.quote-board.is-down .quote-last-price { color: #b33b2f; }
.quote-move { font-size: 0.55em; margin-left: 0.25em; }
.quote-asof {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: right;
}
.quote-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px 16px;
  padding: 18px 0;
  border-top: 1px solid rgba(18, 32, 51, 0.1);
  border-bottom: 1px solid rgba(18, 32, 51, 0.1);
}
.quote-stats div {
  display: grid;
  gap: 4px;
}
.quote-stats span {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.quote-stats strong {
  font-family: var(--news-ui, var(--font));
  font-size: 1.05rem;
  font-weight: 600;
}
.quote-cta {
  display: inline-flex;
  margin-top: 22px;
  padding: 14px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1f6f6a, #185851);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.quote-cta:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}
.news-article-list {
  display: flex;
  flex-direction: column;
}
.news-article {
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  gap: 14px;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid rgba(18, 32, 51, 0.08);
  background: transparent;
  border-radius: 0;
  padding: 18px 4px;
  color: inherit;
  text-decoration: none;
  transition: 0.2s ease;
  cursor: pointer;
  font: inherit;
  animation: newsRise 0.45s ease both;
  animation-delay: calc(var(--i, 0) * 50ms);
}
.news-article:hover {
  border-color: rgba(18, 32, 51, 0.08);
  box-shadow: none;
  transform: translateX(4px);
}
.news-article-index {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.35em;
  font-variant-numeric: tabular-nums;
}
.news-article-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.news-article-title {
  font-family: var(--news-display, var(--display));
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--news-ink, var(--text));
}
.news-article:hover .news-article-title {
  color: var(--news-teal, #1f6f6a);
}
.news-article-summary {
  margin-top: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}
.news-article-meta {
  margin-top: 0;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

/* Legacy leftovers kept harmless */
.news-row,
.news-point {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 14px;
  padding: 14px 16px;
  color: inherit;
  text-decoration: none;
  transition: 0.15s ease;
  cursor: pointer;
  font: inherit;
}
.news-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.news-oneliner {
  font-family: var(--display);
  font-size: 1.05rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
}
.news-row-meta,
.news-point-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}
.news-point {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}
.news-point-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff7e8;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
}
.news-point-title {
  font-family: var(--display);
  font-size: 1.02rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
}
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  padding: 8px 0 18px;
}
.news-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
  transition: 0.15s ease;
}
.news-card:hover {
  border-color: rgba(200, 136, 31, 0.5);
  box-shadow: var(--shadow);
}
.news-card .topic-tag {
  align-self: flex-start;
  font-size: 0.75rem;
  color: var(--accent);
  border: 1px solid rgba(200, 136, 31, 0.35);
  background: #fff7e8;
  border-radius: 999px;
  padding: 3px 8px;
}
.news-card h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.news-card .meta {
  color: var(--muted);
  font-size: 0.82rem;
}

@keyframes newsRise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes newsShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* News module atmosphere — magazine briefing desk */
body.module-news {
  --news-ink: #122033;
  --news-muted: #5d6d7c;
  --news-teal: #1f6f6a;
  --news-accent: #c47a1a;
  --news-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --news-ui: "Outfit", "IBM Plex Sans", sans-serif;
  --text: var(--news-ink);
  --muted: var(--news-muted);
  --accent: var(--news-accent);
  --accent-2: #d9a04a;
  --line: rgba(18, 32, 51, 0.12);
  --font: var(--news-ui);
  --display: var(--news-display);
  background:
    radial-gradient(1100px 520px at 8% -8%, rgba(31, 111, 106, 0.16), transparent 58%),
    radial-gradient(900px 480px at 100% 0%, rgba(196, 122, 26, 0.12), transparent 52%),
    linear-gradient(165deg, #e7eef4 0%, #f4f6f8 42%, #f7f4ef 100%);
}
body.module-news .app {
  background: transparent;
}
body.module-news .rail {
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-right-color: rgba(18, 32, 51, 0.08);
}
body.module-news .brand-name {
  font-family: var(--news-ui);
  letter-spacing: -0.04em;
}
body.module-news .module-switch {
  background: rgba(18, 32, 51, 0.04);
  border-color: rgba(18, 32, 51, 0.08);
}
body.module-news .module-btn.active {
  box-shadow: 0 8px 20px rgba(18, 32, 51, 0.08);
}
body.module-news .nav-btn.active {
  box-shadow: inset 3px 0 0 var(--news-teal);
  background: rgba(31, 111, 106, 0.08);
}
body.module-news #newsMain {
  background: transparent;
  padding-top: 8px;
}
body.module-news .main {
  background: transparent;
}
body.module-news .news-topbar {
  background: transparent;
  border: 0;
  padding-bottom: 8px;
}
body.module-news .news-topbar .search-wrap input {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(18, 32, 51, 0.12);
  border-radius: 12px;
}
body.module-news .news-topbar .btn.primary {
  background: linear-gradient(135deg, #1f6f6a, #185851);
  border-color: transparent;
  color: #fff;
}
body.module-news .news-topbar .btn.ghost {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(18, 32, 51, 0.12);
}
body.module-news .news-filters {
  gap: 8px;
  padding: 0 18px 6px;
}
body.module-news .news-filters .chip {
  border-radius: 8px;
  border-color: rgba(18, 32, 51, 0.12);
  background: rgba(255, 255, 255, 0.55);
  color: var(--news-ink);
  letter-spacing: 0.02em;
}
body.module-news .news-filters .chip:hover {
  border-color: rgba(31, 111, 106, 0.45);
  background: rgba(31, 111, 106, 0.08);
}
body.module-news .news-masthead {
  padding: 18px 4px 10px;
  max-width: 52rem;
}
body.module-news .news-masthead h1,
body.module-news #newsTitle {
  margin: 0;
  font-family: var(--news-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--news-ink);
}
body.module-news .news-masthead .muted,
body.module-news #newsMeta {
  margin-top: 10px;
  font-size: 1.02rem;
  max-width: 36rem;
  line-height: 1.45;
}
body.module-news .news-kicker {
  color: var(--news-teal);
}
body.module-news .news-pane {
  margin-left: 18px;
  margin-right: 28px;
}
body.module-news .topic-pill {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(18, 32, 51, 0.12);
}
body.module-news .crumb-btn {
  color: var(--news-teal);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.topic-editor { padding: 8px 0 18px; }
.topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.topic-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 999px;
  padding: 8px 10px 8px 12px;
}
.topic-pill button {
  border: 0;
  background: var(--bg-2);
  border-radius: 999px;
  width: 24px;
  height: 24px;
  color: var(--muted);
}
.nav-btn {
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 12px;
  padding: 12px 14px;
  transition: 0.15s ease;
}
.nav-btn:hover { color: var(--text); background: var(--bg-2); }
.nav-btn.active {
  color: var(--text);
  background: var(--bg-2);
  border-color: var(--line);
  box-shadow: inset 3px 0 0 var(--accent);
}

.rail-stats {
  margin-top: auto;
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
body.module-news .rail-stats {
  display: none !important;
}
.news-row.is-loading {
  opacity: 0.72;
  cursor: wait;
}
.news-row:disabled {
  cursor: wait;
}
.stat {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.9rem;
}
.stat span:last-child {
  color: var(--accent);
  font-weight: 600;
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 18px 18px 18px 0;
  background: #ffffff;
}

.topbar {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 18px 14px;
}
.search-wrap {
  flex: 1;
  display: flex;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px;
  box-shadow: var(--shadow);
}
.search-wrap input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  padding: 10px 12px;
}
.top-actions { display: flex; gap: 8px; }

.btn {
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 11px;
  padding: 10px 14px;
  transition: 0.15s ease;
}
.btn:hover { border-color: #b7c4b0; background: var(--bg-2); }
.btn.primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #1a1408;
  border-color: transparent;
  font-weight: 600;
}
.btn.ghost { background: transparent; }
.btn.danger {
  background: #fff1ef;
  border-color: #f0b4ad;
  color: var(--danger);
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 18px 12px;
}
.chip {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.86rem;
}
.chip.active, .chip:hover {
  color: var(--text);
  border-color: rgba(200, 136, 31, 0.55);
  background: #fff7e8;
}

.bulk-bar {
  margin: 0 18px 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(200, 136, 31, 0.35);
  background: #fff7e8;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.bulk-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.workspace {
  flex: 1;
  min-height: 0;
  margin: 0 18px 8px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 14px;
}

.mail-pane, .detail-pane, .tool-pane {
  min-height: 70vh;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tool-pane {
  grid-column: 1 / -1;
  padding: 22px;
  overflow: auto;
}

.pane-head { padding: 18px 18px 8px; }
.pane-head h1, .tool-pane h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.55rem;
  letter-spacing: -0.03em;
}
.muted { color: var(--muted); margin: 6px 0 0; }

.mail-list {
  overflow: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mail-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  width: 100%;
}
.mail-item:hover { background: var(--bg-2); }
.mail-item.active {
  background: #fff7e8;
  border-color: rgba(200, 136, 31, 0.35);
}
.mail-item.unread .subject { font-weight: 600; }
.mail-item .from {
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 2px;
}
.mail-item .subject { margin: 0 0 4px; }
.mail-item .snippet {
  color: var(--muted);
  font-size: 0.84rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mail-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.badges { display: flex; gap: 6px; }
.badge {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: #ffffff;
}
.badge.star { color: var(--accent); border-color: rgba(200,136,31,0.45); }
.badge.imp { color: var(--focus); border-color: rgba(59,125,216,0.35); }

.pager {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
}

.detail, .empty-detail {
  padding: 22px;
  overflow: auto;
  height: 100%;
}
.empty-detail h2 {
  font-family: var(--display);
  margin: 30% 0 8px;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}
.detail h2 {
  font-family: var(--display);
  font-size: 1.45rem;
  margin: 0 0 8px;
  letter-spacing: -0.03em;
}
.detail-kv {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 16px;
}
.detail-body {
  white-space: pre-wrap;
  line-height: 1.55;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  max-height: 48vh;
  overflow: auto;
}

.preset-grid {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin: 8px 0 22px;
}
.preset-group-title {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 1.1rem;
}
.preset-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.cleanup-defaults {
  margin: 0 0 16px;
}
.cleanup-defaults label,
.cleanup-action-pick {
  display: grid;
  gap: 6px;
  color: var(--muted);
  max-width: 320px;
}
.cleanup-defaults select,
.cleanup-action-pick select {
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 11px;
  padding: 11px 12px;
}
.labels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin: 8px 0 22px;
}
.card {
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
  text-align: left;
}
.card h3 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 1.05rem;
}
.card p { margin: 0 0 12px; color: var(--muted); font-size: 0.9rem; }
.card .query {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 12px;
  word-break: break-word;
}

.custom-clean .row {
  display: grid;
  grid-template-columns: 1fr 180px auto;
  gap: 8px;
}
.custom-clean input, .custom-clean select,
.summary-controls input[type="number"] {
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 11px;
  padding: 11px 12px;
  outline: none;
}
.cleanup-result {
  margin-top: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: var(--bg-2);
}
.cleanup-result ul {
  margin: 10px 0 0;
  padding-left: 18px;
  max-height: 280px;
  overflow: auto;
}
.cleanup-total-banner {
  margin: 0 0 14px;
  padding: 16px 16px 14px;
  border-radius: 14px;
  background: rgba(180, 60, 40, 0.1);
  color: #8a2f1f;
  line-height: 1.4;
  border: 1px solid rgba(180, 60, 40, 0.22);
}
.cleanup-total-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.85;
}
.cleanup-total-number {
  font-size: clamp(2rem, 6vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 4px 0 6px;
  color: #6e2418;
}
.cleanup-total-copy {
  font-size: 0.95rem;
}
.cleanup-focus {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  scroll-margin-top: 16px;
}
.cleanup-active {
  display: grid;
  gap: 8px;
}
.cleanup-active-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}
.cleanup-active .preset-card.is-pinned-cleanup {
  border-color: rgba(31, 111, 106, 0.45);
  box-shadow: 0 10px 28px rgba(18, 32, 51, 0.08);
  animation: cleanupPinIn 0.35s ease both;
}
.card-placeholder {
  border-style: dashed;
  opacity: 0.45;
  min-height: 120px;
  pointer-events: none;
  background: transparent;
}
.preset-match-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: #8a2f1f;
  margin: 0 0 8px;
}
.preset-hidden-note {
  margin: 4px 0 0;
  font-size: 0.85rem;
}
.preset-card {
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.preset-card:hover {
  border-color: rgba(18, 32, 51, 0.28);
}
@keyframes cleanupPinIn {
  from { opacity: 0.4; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
.btn.danger.is-pressed,
.btn.primary.is-pressed {
  transform: scale(0.96);
  filter: brightness(0.92);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.18);
}
.btn.is-busy {
  opacity: 0.75;
  cursor: wait;
  pointer-events: none;
}
.cleanup-processing {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  padding: 8px 4px 4px;
}
.cleanup-processing-visual {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
}
.cleanup-orbit {
  position: relative;
  width: 72px;
  height: 72px;
}
.cleanup-orbit-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(180, 60, 40, 0.18);
  border-top-color: #b43c28;
  animation: cleanupSpin 0.9s linear infinite;
}
.cleanup-orbit-ring-2 {
  inset: 10px;
  border-top-color: #1f6f6a;
  border-right-color: rgba(31, 111, 106, 0.2);
  animation-duration: 1.35s;
  animation-direction: reverse;
}
.cleanup-orbit-core {
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffd7cf, #b43c28 70%);
  box-shadow: 0 0 0 4px rgba(180, 60, 40, 0.12);
  animation: cleanupPulse 1.2s ease-in-out infinite;
}
.cleanup-orbit-spark {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1f6f6a;
  top: 50%;
  left: 50%;
  margin: -4px 0 0 -4px;
  animation: cleanupSpark 1.6s ease-in-out infinite;
}
.cleanup-orbit-spark-1 { --a: 0deg; animation-delay: 0s; }
.cleanup-orbit-spark-2 { --a: 120deg; animation-delay: 0.2s; background: #b43c28; }
.cleanup-orbit-spark-3 { --a: 240deg; animation-delay: 0.4s; background: #c47a1a; }
.cleanup-processing-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: #9a5f12;
}
.cleanup-processing-title {
  margin: 4px 0 6px;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 400;
}
.cleanup-processing-sub {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}
.cleanup-processing-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(18, 32, 51, 0.08);
  overflow: hidden;
}
.cleanup-processing-bar span {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b43c28, #1f6f6a);
  animation: cleanupBar 1.1s ease-in-out infinite;
}
.cleanup-done {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 6px 2px;
}
.cleanup-done-check {
  color: #1f6f6a;
  flex: 0 0 auto;
  animation: cleanupCheckIn 0.45s ease both;
}
.cleanup-done-title {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 400;
}
.cleanup-failed { color: #8a2f1f; }
@keyframes cleanupSpin {
  to { transform: rotate(360deg); }
}
@keyframes cleanupPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.9); opacity: 0.85; }
}
@keyframes cleanupSpark {
  0%, 100% { transform: rotate(var(--a)) translateX(30px) scale(0.7); opacity: 0.35; }
  50% { transform: rotate(var(--a)) translateX(30px) scale(1.15); opacity: 1; }
}
@keyframes cleanupBar {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}
@keyframes cleanupCheckIn {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}
@media (max-width: 640px) {
  .cleanup-processing { grid-template-columns: 1fr; justify-items: start; }
}

.summary-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: end;
  margin-bottom: 16px;
}
.summary-controls label { display: grid; gap: 6px; color: var(--muted); }
.summary-controls .check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.summary-out {
  margin: 0;
  white-space: pre-wrap;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  min-height: 220px;
  overflow: auto;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 50;
  max-width: min(420px, calc(100vw - 40px));
}
.toast.ok { border-color: rgba(47, 143, 78, 0.45); }
.toast.err { border-color: rgba(194, 75, 61, 0.45); }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #ffffff;
}
.login-card {
  width: min(400px, 100%);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}
.login-card h1 {
  margin: 0;
  font-family: var(--display);
  letter-spacing: -0.03em;
}
.login-card p { margin: 0; color: var(--muted); }
.login-pin-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: stretch;
}
.login-card input {
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 12px;
  padding: 14px;
  outline: none;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
}
.login-show-pin {
  white-space: nowrap;
  min-width: 72px;
  z-index: 2;
  pointer-events: auto;
  touch-action: manipulation;
}
.login-error { color: var(--danger); }

@media (max-width: 1100px) {
  .app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }
  .rail {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: 12px;
    padding: 14px 14px 10px;
  }
  body.module-news .rail {
    position: sticky;
    top: 0;
    z-index: 5;
    background: rgba(243, 246, 249, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  body.module-news .news-masthead h1,
  body.module-news #newsTitle {
    font-size: clamp(2rem, 9vw, 2.8rem);
  }
  body.module-news .news-line {
    grid-template-columns: 1.8rem 1fr;
  }
  body.module-news .news-chevron {
    display: none;
  }
  body.module-news .news-pane {
    margin: 0 14px 24px;
  }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .workspace { grid-template-columns: 1fr; }
  .custom-clean .row { grid-template-columns: 1fr; }
  .main {
    padding: 0 0 18px;
    flex: 1;
  }
  .news-pane {
    margin: 0 12px 18px;
    min-height: auto;
  }
  body.module-grants .rail {
    position: sticky;
    top: 0;
    z-index: 5;
    background: rgba(243, 246, 249, 0.92);
    backdrop-filter: blur(14px);
  }
  .grants-pane { margin: 0 14px 24px; }
  .grant-card-top { flex-direction: column; align-items: flex-start; }
}

/* Grants desk */
body.module-grants {
  --news-ink: #122033;
  --news-muted: #5d6d7c;
  --news-teal: #1f6f6a;
  --news-accent: #c47a1a;
  --news-display: "Instrument Serif", Georgia, serif;
  --news-ui: "Outfit", "IBM Plex Sans", sans-serif;
  --text: var(--news-ink);
  --muted: var(--news-muted);
  --accent: var(--news-accent);
  --font: var(--news-ui);
  --display: var(--news-display);
  background:
    radial-gradient(1000px 480px at 0% -10%, rgba(31, 111, 106, 0.14), transparent 55%),
    radial-gradient(800px 420px at 100% 0%, rgba(196, 122, 26, 0.1), transparent 50%),
    linear-gradient(165deg, #e8eef3 0%, #f5f7f9 45%, #f7f4ef 100%);
}
body.module-grants .app,
body.module-grants .main,
body.module-grants #grantsMain {
  background: transparent;
}
body.module-grants .rail {
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(14px);
  border-right-color: rgba(18, 32, 51, 0.08);
}
body.module-grants .nav-btn.active {
  box-shadow: inset 3px 0 0 var(--news-teal);
  background: rgba(31, 111, 106, 0.08);
}
.grants-layout {
  display: grid;
  grid-template-columns: minmax(200px, 260px) 1fr;
  gap: 0;
  min-height: 70vh;
  padding: 0 12px 24px 0;
}
.grants-sidebar {
  border-right: 1px solid rgba(18, 32, 51, 0.1);
  padding: 8px 10px 24px 18px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  position: sticky;
  top: 8px;
  align-self: start;
}
.grants-sidebar-head {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--news-teal, #1f6f6a);
  font-weight: 700;
  margin-bottom: 10px;
}
.grants-side-item {
  display: grid;
  gap: 4px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 10px 8px;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.grants-side-item:hover,
.grants-side-item.active {
  background: rgba(31, 111, 106, 0.1);
}
.grants-side-name {
  font-size: 0.9rem;
  line-height: 1.3;
  font-weight: 600;
}
.grants-side-meta {
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.grants-maincol { min-width: 0; }
.grants-pane {
  margin: 0 18px 28px;
  min-height: 40vh;
}
.grants-org-name {
  font-family: var(--news-display, var(--display));
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.grants-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 10px 0 28px;
}
.grant-card {
  border-bottom: 1px solid rgba(18, 32, 51, 0.1);
  padding: 22px 4px 20px;
  animation: newsRise 0.5s ease both;
  animation-delay: var(--delay, 0ms);
}
.grant-card.is-loading { opacity: 0.65; }
.grant-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.grant-kind {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--news-teal, #1f6f6a);
  font-weight: 700;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.grant-entity {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  background: rgba(18, 32, 51, 0.06);
}
.grant-entity-org { background: rgba(31, 111, 106, 0.12); color: #1f6f6a; }
.grant-entity-com { background: rgba(196, 122, 26, 0.14); color: #9a5f12; }
.grant-chance {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}
.grant-title {
  margin: 0 0 8px;
  font-family: var(--news-display, var(--display));
  font-weight: 400;
  font-size: clamp(1.25rem, 2.5vw, 1.7rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.grant-summary {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.45;
  max-width: 46rem;
}
.grant-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 10px;
}
.grants-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  padding: 4px 0 16px;
  border-bottom: 1px solid rgba(18, 32, 51, 0.08);
  margin-bottom: 8px;
}
.grants-toolbar-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.grants-toolbar-label {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin-right: 4px;
}
.grants-filter-btn {
  border: 1px solid rgba(18, 32, 51, 0.14);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.grants-filter-btn.active {
  background: #1f6f6a;
  border-color: #1f6f6a;
  color: #fff;
}
.grant-dateboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 12px;
  max-width: 28rem;
}
.grant-datecell {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(18, 32, 51, 0.04);
}
.grant-datecell-label {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.grant-datecell-value {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}
.grant-datecell-status {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}
.grant-datecell-urgent {
  background: rgba(180, 60, 40, 0.1);
}
.grant-datecell-urgent .grant-datecell-status,
.grant-datecell-urgent .grant-datecell-value { color: #8a2f1f; }
.grant-datecell-soon {
  background: rgba(196, 122, 26, 0.12);
}
.grant-datecell-soon .grant-datecell-status { color: #9a5f12; }
.grant-datecell-closed {
  background: rgba(18, 32, 51, 0.06);
  opacity: 0.75;
}
.grant-datecell-rolling,
.grant-datecell-open {
  background: rgba(31, 111, 106, 0.08);
}
.grants-section {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 8px;
}
.grants-section-title {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1f6f6a;
  font-weight: 700;
  padding: 18px 4px 6px;
  border-top: 1px solid rgba(18, 32, 51, 0.08);
}
.grants-section:first-child .grants-section-title { border-top: 0; padding-top: 8px; }
.grants-toolbar-note {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}
.grant-recs {
  display: grid;
  gap: 10px;
  margin: 12px 0 14px;
}
.grant-recs-label {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}
.grant-rec {
  padding: 12px 14px;
  border-radius: 12px;
  display: grid;
  gap: 4px;
}
.grant-rec-org {
  background: rgba(31, 111, 106, 0.08);
  border-left: 3px solid #1f6f6a;
}
.grant-rec-com {
  background: rgba(196, 122, 26, 0.1);
  border-left: 3px solid #c47a1a;
}
.grant-rec-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}
.grant-rec-entity {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.grant-rec-org .grant-rec-entity { color: #1f6f6a; }
.grant-rec-com .grant-rec-entity { color: #9a5f12; }
.grant-rec-type {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}
.grant-rec-title {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text);
}
.grant-rec-area {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}
.grant-rec-action {
  margin: 4px 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text);
}
.grant-rec-why {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}
.grant-ask {
  margin: 8px 0 36px;
  padding: 18px 14px 16px;
  border-top: 1px solid rgba(18, 32, 51, 0.1);
  display: grid;
  gap: 12px;
}
.grant-ask-title {
  font-family: var(--news-display, var(--display));
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.grant-ask-sub { margin: 4px 0 0; font-size: 0.85rem; }
.grant-ask-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.grant-ask-chip {
  border: 1px solid rgba(31, 111, 106, 0.28);
  background: rgba(31, 111, 106, 0.06);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.grant-ask-chip:hover { background: rgba(31, 111, 106, 0.12); }
.grant-ask-thread {
  display: grid;
  gap: 10px;
  max-height: min(48vh, 420px);
  overflow: auto;
  padding: 4px 2px;
}
.grant-ask-empty {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 8px 2px;
}
.grant-ask-msg {
  padding: 12px 14px;
  border-radius: 12px;
  display: grid;
  gap: 4px;
}
.grant-ask-user {
  background: rgba(18, 32, 51, 0.05);
  justify-self: end;
  max-width: 92%;
}
.grant-ask-assistant {
  background: rgba(31, 111, 106, 0.08);
  border-left: 3px solid #1f6f6a;
  max-width: 96%;
}
.grant-ask-pending { opacity: 0.7; }
.grant-ask-role {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}
.grant-ask-text {
  font-size: 0.92rem;
  line-height: 1.45;
  white-space: normal;
}
.grant-ask-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}
.grant-ask-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 52px;
  border-radius: 12px;
  border: 1px solid rgba(18, 32, 51, 0.16);
  padding: 12px 14px;
  font: inherit;
  background: #fff;
  color: var(--text);
}
@media (max-width: 640px) {
  .grant-dateboard { grid-template-columns: 1fr; max-width: none; }
  .grant-ask-form { grid-template-columns: 1fr; }
}
.grant-reasons {
  margin: 0 0 14px;
  padding-left: 18px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.45;
}
.grant-reminder-banner {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(196, 122, 26, 0.12);
  color: #7a4a0e;
  font-weight: 600;
}
.grant-cta {
  display: inline-flex;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1f6f6a, #185851);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.grant-cta:hover { opacity: 0.94; }
.grants-reminder-strip {
  display: grid;
  gap: 10px;
  padding: 14px 0 8px;
  border-bottom: 1px solid rgba(18, 32, 51, 0.1);
  margin-bottom: 8px;
}
.grants-reminder-strip-title {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9a5f12;
  font-weight: 700;
}
.grants-reminder-chip {
  display: grid;
  gap: 4px;
  text-align: left;
  border: 1px solid rgba(196, 122, 26, 0.25);
  background: rgba(255, 247, 232, 0.7);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.grants-about-card {
  max-width: 44rem;
  padding: 8px 4px 28px;
}
.grants-about-card h2 {
  font-family: var(--news-display, var(--display));
  font-weight: 400;
  font-size: 2rem;
  margin: 0 0 10px;
}
.grants-about-card h3 {
  margin: 22px 0 10px;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--news-teal, #1f6f6a);
}
.grants-sites { margin: 12px 0; }
.grants-sites a { color: var(--news-teal, #1f6f6a); }
.grant-focus-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.grant-focus {
  border: 1px solid rgba(18, 32, 51, 0.12);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.85rem;
}
.grants-how {
  margin: 0;
  padding-left: 18px;
  line-height: 1.55;
  color: var(--muted);
}
body.module-grants .grants-topbar .btn.primary {
  background: linear-gradient(135deg, #1f6f6a, #185851);
  border-color: transparent;
  color: #fff;
}
@media (max-width: 1100px) {
  .grants-layout {
    grid-template-columns: 1fr;
    padding: 0 0 24px;
  }
  .grants-sidebar {
    position: relative;
    top: 0;
    max-height: 220px;
    border-right: 0;
    border-bottom: 1px solid rgba(18, 32, 51, 0.1);
    margin: 0 12px 8px;
    padding: 8px 4px 12px;
  }
  .grants-pane { margin: 0 14px 24px; }
}
