:root {
  color-scheme: light;
  --leaf: #315b39;
  --leaf-2: #4b7f52;
  --coffee: #5a3926;
  --earth: #8f6b43;
  --cream: #f6f2e9;
  --paper: #fffdf8;
  --ink: #1f261f;
  --muted: #667162;
  --line: #ded8ca;
  --sun: #d99a34;
  --shadow: 0 18px 45px rgba(55, 48, 36, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 14px 0;
  background: rgba(246, 242, 233, 0.92);
  border-bottom: 1px solid rgba(90, 57, 38, 0.12);
  backdrop-filter: blur(18px);
}

.topbar-inner {
  display: flex;
  width: min(1660px, calc(100% - 48px));
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(90, 57, 38, 0.14);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 14px rgba(55, 48, 36, 0.08);
}

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

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.region-tabs,
.topic-filter,
.date-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.region-tabs::-webkit-scrollbar,
.topic-filter::-webkit-scrollbar,
.date-filter::-webkit-scrollbar {
  display: none;
}

.tab,
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.76);
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}

.tab {
  padding: 10px 15px;
}

.chip {
  padding: 9px 13px;
}

.tab:hover,
.chip:hover {
  border-color: rgba(49, 91, 57, 0.42);
  color: var(--leaf);
}

.tab.is-active,
.chip.is-active {
  background: var(--leaf);
  border-color: var(--leaf);
  color: #fff;
}

main {
  width: min(1660px, calc(100% - 48px));
  margin: 0 auto;
}

.lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 28px;
  align-items: end;
  min-height: 430px;
  padding: 64px clamp(18px, 5vw, 64px) 34px;
  margin: 24px 0;
  overflow: hidden;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(24, 39, 24, 0.88), rgba(24, 39, 24, 0.62), rgba(24, 39, 24, 0.18)),
    url("https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=1800&q=85")
      center/cover;
  box-shadow: var(--shadow);
}

.lead h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.lead p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.05rem;
  line-height: 1.6;
}

.kicker {
  margin: 0 0 10px;
  color: var(--sun);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.market-strip {
  display: grid;
  width: 100%;
  gap: 7px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(18, 31, 20, 0.82);
  backdrop-filter: blur(10px);
}

.market-strip span,
.market-strip small {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.82rem;
}

.market-strip strong {
  color: #fff;
  font-size: clamp(0.98rem, 1.5vw, 1.18rem);
  line-height: 1.22;
}

.hero-story {
  cursor: pointer;
  text-align: left;
  align-self: end;
  max-height: 190px;
}

.hero-story:hover {
  border-color: rgba(255, 255, 255, 0.46);
  background: rgba(14, 30, 19, 0.9);
}

.daily-brief {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(520px, 1fr);
  gap: 22px;
  align-items: stretch;
  margin: 24px 0;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(55, 48, 36, 0.06);
}

.daily-brief h2 {
  margin: 0;
  color: var(--coffee);
  font-size: clamp(1.45rem, 2.4vw, 2.2rem);
  line-height: 1.08;
}

.daily-brief-main p:last-child {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.daily-brief-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.daily-brief-grid article {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid rgba(222, 216, 202, 0.86);
  border-radius: 8px;
  background: #fff;
}

.daily-brief-grid span {
  color: var(--earth);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.daily-brief-grid strong {
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.35;
}

.toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  margin: 24px 0;
}

.market-terminal {
  overflow: hidden;
  border: 1px solid rgba(70, 91, 72, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(12, 18, 15, 0.96), rgba(24, 31, 26, 0.98)),
    #111a15;
  color: #edf5ec;
  box-shadow: 0 18px 42px rgba(24, 31, 26, 0.18);
}

.terminal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(560px, 1.1fr);
  gap: 24px;
  align-items: start;
  margin: 24px 0;
}

.coffee-panel {
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(55, 48, 36, 0.06);
}

.small-command {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--leaf);
  cursor: pointer;
  font-weight: 850;
}

.terminal-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid rgba(237, 245, 236, 0.1);
}

.terminal-header h2 {
  margin: 0;
  color: #fff;
  font-size: 1.45rem;
  letter-spacing: 0;
}

.terminal-status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(237, 245, 236, 0.78);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.terminal-status strong {
  color: #fff;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #47d86a;
  box-shadow: 0 0 0 0 rgba(71, 216, 106, 0.58);
  animation: pulse 1.7s infinite;
}

.ticker-tape {
  overflow: hidden;
  border-bottom: 1px solid rgba(237, 245, 236, 0.1);
  background: rgba(0, 0, 0, 0.22);
}

.ticker-tape-track {
  display: flex;
  width: max-content;
  min-width: 100%;
  animation: ticker 34s linear infinite;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  color: rgba(237, 245, 236, 0.86);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.ticker-item strong {
  color: #fff;
}

.market-table-wrap {
  overflow-x: auto;
}

.coffee-table-wrap {
  overflow-x: auto;
}

.market-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.coffee-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.coffee-table th,
.coffee-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(222, 216, 202, 0.9);
  text-align: left;
}

.coffee-table th {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.coffee-table td {
  color: #1f261f;
  font-size: 0.92rem;
  font-weight: 760;
}

.coffee-table .asset-cell strong {
  color: var(--coffee);
}

.coffee-table .asset-cell span {
  color: var(--muted);
}

.coffee-table tr {
  cursor: pointer;
}

.coffee-table tr:hover td {
  background: rgba(75, 127, 82, 0.07);
}

.market-table th,
.market-table td {
  padding: 13px 18px;
  border-bottom: 1px solid rgba(237, 245, 236, 0.08);
  text-align: left;
}

.market-table th {
  color: rgba(237, 245, 236, 0.56);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.market-table td {
  color: #f7fff5;
  font-size: 0.9rem;
  font-weight: 800;
}

.market-table tr.is-flashing td {
  animation: quoteFlash 0.55s ease-out;
}

.market-table tr.is-clickable {
  cursor: pointer;
}

.market-table tr.is-clickable:hover td {
  background: rgba(237, 245, 236, 0.06);
}

.asset-cell {
  display: grid;
  gap: 3px;
}

.asset-cell strong {
  color: #fff;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 0.95rem;
}

.asset-cell span,
.market-note {
  color: rgba(237, 245, 236, 0.58);
}

.quote-up {
  color: #47d86a !important;
}

.quote-down {
  color: #ff6b5f !important;
}

.market-note {
  margin: 0;
  padding: 12px 22px 18px;
  font-size: 0.82rem;
  line-height: 1.45;
}

.coffee-panel .market-note {
  color: var(--muted);
}

.search-box {
  display: grid;
  gap: 8px;
  width: min(430px, 100%);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.search-box input,
.newsletter input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  outline: none;
}

.search-box input {
  padding: 0 14px;
}

.search-box input:focus,
.newsletter input:focus {
  border-color: var(--leaf-2);
  box-shadow: 0 0 0 3px rgba(75, 127, 82, 0.14);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
  padding-bottom: 46px;
}

.news-panel,
.brief,
.newsletter {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(55, 48, 36, 0.06);
}

.news-panel {
  padding: clamp(18px, 3vw, 28px);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.section-heading h2,
.brief h2,
.newsletter h2 {
  margin: 0;
  color: var(--coffee);
  letter-spacing: 0;
}

.source-link {
  color: var(--leaf);
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}

.news-list {
  display: grid;
  gap: 14px;
}

.news-card {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
  border: 1px solid rgba(222, 216, 202, 0.86);
  border-radius: 8px;
  background: #fff;
}

.news-card {
  cursor: pointer;
}

.news-card.no-image {
  grid-template-columns: 1fr;
}

.news-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
  border-radius: 6px;
}

.news-card h3 {
  margin: 4px 0 8px;
  font-size: 1.1rem;
  line-height: 1.25;
}

.news-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--earth);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.read-more {
  display: inline-flex;
  margin-top: 12px;
  color: var(--leaf);
  font-weight: 850;
  text-decoration: none;
}

.article-dialog {
  width: min(760px, calc(100% - 28px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.article-dialog::backdrop {
  background: rgba(19, 24, 20, 0.62);
  backdrop-filter: blur(6px);
}

.article-reader {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.article-reader-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.article-reader h2 {
  margin: 0 0 8px;
  color: var(--coffee);
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  line-height: 1.08;
}

.article-reader small,
.article-reader p {
  color: var(--muted);
}

.article-reader p {
  margin: 0;
  line-height: 1.62;
}

.icon-button {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--coffee);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.article-actions button,
.article-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  font-weight: 850;
  text-decoration: none;
}

.article-actions button {
  border: 0;
  background: var(--leaf);
  color: #fff;
  cursor: pointer;
}

.article-actions a {
  border: 1px solid var(--line);
  color: var(--leaf);
}

.ai-summary {
  display: none;
  white-space: pre-line;
  padding: 16px;
  border: 1px solid rgba(75, 127, 82, 0.22);
  border-radius: 8px;
  background: rgba(75, 127, 82, 0.08);
  color: var(--ink);
  line-height: 1.55;
}

.ai-summary.is-visible {
  display: block;
}

.side-panel {
  display: grid;
  gap: 18px;
}

.brief,
.newsletter {
  padding: 20px;
}

.brief ul {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.brief li {
  padding-left: 16px;
  border-left: 3px solid var(--sun);
  color: var(--muted);
  line-height: 1.45;
}

.radar-link {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.radar-link span {
  color: var(--earth);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.radar-link strong {
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.35;
}

.radar-link:hover strong {
  color: var(--leaf);
}

.newsletter form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.newsletter input {
  padding: 0 12px;
}

.consent-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.42;
}

.consent-check input {
  width: 18px;
  min-height: 18px;
  padding: 0;
  margin: 2px 0 0;
  accent-color: var(--leaf);
}

.newsletter button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--coffee);
  color: #fff;
  cursor: pointer;
  font-weight: 850;
}

.newsletter small {
  display: block;
  min-height: 18px;
  margin-top: 10px;
  color: var(--leaf);
}

.newsletter .privacy-note {
  color: var(--muted);
  line-height: 1.42;
}

.empty-state {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: min(1660px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-weight: 760;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-footer a {
  color: var(--leaf);
  text-decoration: none;
}

.legal-page {
  width: min(920px, calc(100% - 48px));
  margin: 34px auto 70px;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(55, 48, 36, 0.06);
}

.legal-page h1,
.legal-page h2 {
  color: var(--coffee);
}

.legal-page p,
.legal-page li {
  color: var(--muted);
  line-height: 1.62;
}

.legal-page a {
  color: var(--leaf);
  font-weight: 850;
}

@media (max-width: 900px) {
  .topbar {
    padding: 14px 0;
  }

  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    width: min(100% - 32px, 1660px);
  }

  .region-tabs {
    width: 100%;
  }

  .lead,
  .content-grid,
  .daily-brief,
  .terminal-grid {
    grid-template-columns: 1fr;
  }

  .lead {
    min-height: 520px;
    align-content: end;
    background-position: 58% center;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topic-filter {
    width: 100%;
  }

  .date-filter {
    width: 100%;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    width: min(100% - 32px, 1660px);
  }

  .daily-brief-grid {
    grid-template-columns: 1fr;
  }

  .terminal-header {
    display: grid;
  }

  .terminal-status {
    justify-content: space-between;
    white-space: normal;
  }
}

@media (max-width: 620px) {
  main {
    width: min(100% - 22px, 1660px);
  }

  .lead {
    padding: 34px 18px 18px;
  }

  .section-heading {
    display: grid;
  }

  .news-card {
    grid-template-columns: 1fr;
  }

  .news-card img {
    aspect-ratio: 16 / 9;
  }
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 9px rgba(71, 216, 106, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(71, 216, 106, 0);
  }
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes quoteFlash {
  from {
    background: rgba(217, 154, 52, 0.18);
  }
  to {
    background: transparent;
  }
}
