:root {
  --tj-paper: #ffffff;
  --tj-ink: #0a0a0a;
  --tj-muted: #5c5c5c;
  --tj-rule: #e8e8e8;
  --tj-rule-dark: #d4d4d4;
  --tj-accent: #0a0a0a;
  --tj-accent-hover: #333333;
  --tj-surface: #fafafa;
  --tj-serif: "Libre Baskerville", "Georgia", serif;
  --tj-sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --tj-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --tj-ui: "IBM Plex Sans", system-ui, sans-serif;
  --tj-mono: "IBM Plex Mono", ui-monospace, monospace;
  --tj-feed-width: 720px;
  --tj-radius: 4px;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.75rem;
}

body.tj-body {
  margin: 0;
  font-family: var(--tj-body);
  font-size: 16px;
  line-height: 1.5;
  background: var(--tj-paper);
  color: var(--tj-ink);
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
body.tj-body.tj-install-open { overflow: hidden; }

body.tj-body.tj-dark {
  --tj-paper: #0d0d0d;
  --tj-ink: #f5f5f5;
  --tj-muted: #a3a3a3;
  --tj-rule: #262626;
  --tj-rule-dark: #333333;
  --tj-accent: #ffffff;
  --tj-accent-hover: #d4d4d4;
  --tj-surface: #141414;
}

a { color: inherit; }

.tj-brand-bar {
  height: 1px;
  background: var(--tj-rule);
}

.tj-topbar {
  font-family: var(--tj-ui);
  font-size: 0.68rem;
  color: var(--tj-muted);
  background: var(--tj-paper);
  border-bottom: 1px solid var(--tj-rule);
}
.tj-topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
}
.tj-ambient {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  font-size: 0.68rem;
  line-height: 1.3;
  color: var(--tj-ink);
  min-width: 0;
}
.tj-clock {
  font-family: var(--tj-mono);
  font-size: 0.72rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.tj-ambient-sep { color: var(--tj-rule-dark); }
.tj-weather {
  font-family: var(--tj-ui);
  color: var(--tj-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(100%, 22rem);
}
.tj-weather-city {
  color: var(--tj-ink);
  font-weight: 500;
}
.tj-weather strong {
  font-weight: 600;
  color: var(--tj-ink);
}
.tj-weather--tap {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.tj-weather-prompt {
  color: var(--tj-ink);
  font-weight: 500;
}
@media (max-width: 720px) {
  .tj-weather { white-space: normal; max-width: 100%; }
}
.tj-topnav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.tj-topnav a,
.tj-topnav button {
  font: inherit;
  color: var(--tj-ink);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.tj-topnav a:hover,
.tj-topnav button:hover { color: var(--tj-accent); }
.tj-topnav .tj-sep { color: var(--tj-rule-dark); }

.tj-masthead {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.75rem 1rem 1.25rem;
  border-bottom: 1px solid var(--tj-rule);
  background: var(--tj-paper);
}
.tj-masthead-brand {
  margin: 0 0 0.35rem;
  font-family: var(--tj-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tj-masthead-brand a {
  color: var(--tj-muted);
  text-decoration: none;
}
.tj-masthead-brand a:hover { color: var(--tj-accent); }
.tj-page-title {
  margin: 0;
  font-family: var(--tj-sans);
  font-size: clamp(2rem, 5.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--tj-ink);
  letter-spacing: -0.03em;
}
.tj-masthead-tagline {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  color: var(--tj-muted);
  max-width: 36rem;
}
.tj-publisher {
  margin: 0.4rem 0 0;
  font-size: 0.72rem;
  color: var(--tj-muted);
}
.tj-publisher a { color: var(--tj-ink); text-decoration: underline; text-underline-offset: 2px; }
.tj-publisher a:hover { color: var(--tj-muted); }

.tj-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tj-toolbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--tj-rule);
  background: var(--tj-paper);
}
.tj-search-wrap { flex: 1 1 12rem; min-width: 0; }
.tj-search {
  width: 100%;
  font: inherit;
  font-size: 0.88rem;
  padding: 0.62rem 0.85rem;
  border: 1px solid var(--tj-rule);
  border-radius: 999px;
  background: var(--tj-surface);
  color: var(--tj-ink);
  min-height: 44px;
  -webkit-appearance: none;
  appearance: none;
}
.tj-search:focus {
  outline: none;
  border-color: var(--tj-ink);
}
.tj-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.tj-toolbar-btn {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.55rem 0.9rem;
  min-height: 44px;
  border: 1px solid var(--tj-rule);
  border-radius: 999px;
  background: var(--tj-paper);
  color: var(--tj-ink);
  cursor: pointer;
}
.tj-toolbar-btn--accent,
.tj-toolbar-btn--install {
  background: var(--tj-ink);
  color: var(--tj-paper);
  border-color: var(--tj-ink);
}
.tj-toolbar-btn--install {
  font-size: 0.72rem;
}
@media (max-width: 480px) {
  .tj-toolbar-btn--install {
    font-size: 0.68rem;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }
}
.tj-badge {
  display: inline-block;
  min-width: 1.15rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--tj-surface);
  font-size: 0.68rem;
  text-align: center;
}
.tj-toolbar-btn--accent .tj-badge {
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
}

.tj-saved-panel {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.65rem 1rem 0.85rem;
  border-bottom: 1px solid var(--tj-rule);
  background: var(--tj-surface);
}
.tj-saved-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  max-width: var(--tj-feed-width);
}
.tj-saved-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.65rem;
  align-items: start;
  font-size: 0.82rem;
}
.tj-saved-item a {
  color: var(--tj-ink);
  text-decoration: none;
  font-weight: 600;
  line-height: 1.35;
}
.tj-saved-item a:hover { text-decoration: underline; }
.tj-saved-meta {
  grid-column: 1;
  color: var(--tj-muted);
  font-size: 0.72rem;
}
.tj-saved-remove {
  grid-row: 1 / span 2;
  grid-column: 2;
  font: inherit;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--tj-muted);
  cursor: pointer;
}
.tj-saved-empty,
.tj-search-empty {
  margin: 0;
  padding: 0.35rem 1rem 0.75rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.82rem;
  color: var(--tj-muted);
}

.tj-sticky-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--tj-paper);
  border-bottom: 1px solid var(--tj-rule);
  backdrop-filter: blur(10px);
}
body.tj-dark .tj-sticky-header { background: rgba(13, 13, 13, 0.94); }
.tj-sticky-bar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  border-bottom: 1px solid var(--tj-rule);
  background: var(--tj-surface);
}
body.tj-dark .tj-sticky-bar { background: rgba(20, 20, 20, 0.96); }
.tj-sticky-brand {
  font-family: var(--tj-ui);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--tj-ink);
  white-space: nowrap;
  flex-shrink: 0;
}
.tj-sticky-brand:hover,
.tj-sticky-brand:focus-visible {
  color: var(--tj-accent-hover);
}
.tj-sticky-bar .tj-ambient {
  justify-content: flex-end;
  flex: 1;
  min-width: 0;
}
@media (max-width: 720px) {
  .tj-sticky-bar {
    flex-wrap: wrap;
    padding: 0.45rem 1rem;
  }
  .tj-sticky-brand { font-size: 0.78rem; }
  .tj-sticky-bar .tj-ambient {
    flex: 1 1 100%;
    justify-content: flex-start;
  }
}
.tj-sections-nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.7rem 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tj-sections-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem 1.25rem;
  font-family: var(--tj-ui);
  font-size: 0.78rem;
  font-weight: 600;
  min-width: max-content;
}
@media (min-width: 768px) {
  .tj-sections-nav ul { flex-wrap: wrap; min-width: 0; }
}
.tj-sections-nav a {
  text-decoration: none;
  color: var(--tj-muted);
  white-space: nowrap;
  padding-bottom: 0.15rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.tj-sections-nav a:hover,
.tj-sections-nav a:focus-visible {
  color: var(--tj-ink);
  border-bottom-color: var(--tj-ink);
}

.tj-status {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.45rem 1rem;
  font-family: var(--tj-ui);
  font-size: 0.72rem;
  color: var(--tj-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  align-items: center;
  border-bottom: 1px solid var(--tj-rule);
}
.tj-live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2d8a4e;
  margin-right: 0.25rem;
  vertical-align: middle;
}

.tj-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

.tj-block {
  padding-top: 1.5rem;
}
.tj-block-title {
  margin: 0 0 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--tj-ink);
  font-family: var(--tj-sans);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--tj-ink);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  letter-spacing: -0.01em;
}
.tj-section-count {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--tj-muted);
}

/* G1-style vertical feed */
.tj-feed {
  max-width: var(--tj-feed-width);
  margin: 0;
}
@media (min-width: 900px) {
  .tj-feed { max-width: 720px; }
}

.tj-story {
  padding: 0 0 1.75rem;
  margin: 0 0 1.75rem;
  border-bottom: 1px solid var(--tj-rule);
}
.tj-story:last-child {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.tj-story--enter {
  opacity: 0;
}
.tj-story:not(.tj-story--enter) {
  transition: opacity 0.35s ease;
}

.tj-story-title {
  margin: 0 0 0.65rem;
  font-family: var(--tj-sans);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.tj-story--featured .tj-story-title {
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  line-height: 1.2;
}
.tj-story-title a {
  color: var(--tj-ink);
  text-decoration: none;
}
.tj-story-title a:hover {
  color: var(--tj-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tj-story-summary {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--tj-muted);
}

.tj-story-media {
  display: block;
  margin: 0 0 0.75rem;
  border-radius: var(--tj-radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--tj-surface);
  text-decoration: none;
  border: 1px solid var(--tj-rule);
  transition: border-color 0.15s ease;
}
.tj-story-media:hover { border-color: var(--tj-rule-dark); }
body.tj-dark .tj-story-media { background: #1a1a1a; }
.tj-story-media img,
.tj-story-media .tj-card-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tj-story-meta {
  margin: 0;
  font-family: var(--tj-ui);
  font-size: 0.78rem;
  color: var(--tj-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
}
.tj-story-meta time { font-weight: 500; }
.tj-story-source {
  font-weight: 600;
  color: var(--tj-ink);
}
.tj-story-tag {
  padding: 0.12rem 0.5rem;
  background: var(--tj-surface);
  border: 1px solid var(--tj-rule);
  border-radius: var(--tj-radius);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tj-muted);
}
body.tj-dark .tj-story-tag { background: #1a1a1a; }
.tj-story-points { color: var(--tj-muted); }

.tj-story.is-hidden { display: none; }
.tj-block.is-collapsed { display: none; }

.tj-story--highlight {
  margin-left: -0.65rem;
  margin-right: -0.65rem;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
  border-radius: var(--tj-radius);
  background: var(--tj-surface);
  box-shadow: inset 3px 0 0 var(--tj-ink);
  transition: background 0.4s ease;
}

.tj-story-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}
.tj-btn-save,
.tj-btn-share {
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.45rem 0.75rem;
  min-height: 36px;
  border: 1px solid var(--tj-rule);
  border-radius: 999px;
  background: var(--tj-paper);
  color: var(--tj-muted);
  cursor: pointer;
}
.tj-btn-save.is-saved {
  color: var(--tj-ink);
  border-color: var(--tj-ink);
}
.tj-btn-save:hover,
.tj-btn-share:hover {
  color: var(--tj-ink);
  border-color: var(--tj-rule-dark);
}

.tj-install-sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0));
}
.tj-install-sheet[hidden] { display: none; }
.tj-install-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(2px);
}
.tj-install-card {
  position: relative;
  width: min(100%, 24rem);
  padding: 1.35rem 1.25rem 1.15rem;
  border-radius: 14px;
  background: var(--tj-paper);
  color: var(--tj-ink);
  border: 1px solid var(--tj-rule);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
  text-align: center;
}
.tj-install-dismiss {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: var(--tj-surface);
  color: var(--tj-muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.tj-install-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.75rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--tj-rule);
}
.tj-install-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tj-install-title {
  margin: 0 0 0.45rem;
  font-family: var(--tj-sans);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.tj-install-lead {
  margin: 0 0 0.85rem;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--tj-muted);
}
.tj-install-steps {
  margin: 0 0 1rem;
  padding: 0.65rem 0.75rem;
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: left;
  background: var(--tj-surface);
  border: 1px solid var(--tj-rule);
  border-radius: var(--tj-radius);
  color: var(--tj-ink);
}
.tj-install-confirm {
  width: 100%;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.72rem 1rem;
  min-height: 44px;
  border: none;
  border-radius: 999px;
  background: var(--tj-ink);
  color: var(--tj-paper);
  cursor: pointer;
}
.tj-install-confirm[hidden] { display: none; }
@media (min-width: 600px) {
  .tj-install-sheet { align-items: center; }
}

.tj-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--tj-sans);
  font-size: 2.5rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.15);
  background: linear-gradient(145deg, #ececec, #d8d8d8);
}
body.tj-dark .tj-card-placeholder {
  color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(145deg, #1f1f1f, #2a2a2a);
}
.tj-card-placeholder--verge,
.tj-card-placeholder--the-verge { background: linear-gradient(145deg, #e8f0ff, #c5d8f5); }
.tj-card-placeholder--techcrunch { background: linear-gradient(145deg, #e8f5ec, #c8e6d0); }
.tj-card-placeholder--wired { background: linear-gradient(145deg, #f5ebe8, #e0cfc8); }
.tj-card-placeholder--canaltech { background: linear-gradient(145deg, #e8f4fc, #c5dff5); }
.tj-card-placeholder--tecmundo { background: linear-gradient(145deg, #fff3e0, #f5d9b3); }
.tj-card-placeholder--olhar,
.tj-card-placeholder--olhar-digital { background: linear-gradient(145deg, #e8f8f0, #c5ead8); }
.tj-card-placeholder--g1 { background: linear-gradient(145deg, #f5f5f5, #e8e8e8); }
.tj-card-placeholder--hn,
.tj-card-placeholder--hacker-news { background: linear-gradient(145deg, #fff5e6, #f5ddb8); }

.tj-empty {
  padding: 2rem 0;
  font-family: var(--tj-ui);
  font-size: 0.9rem;
  color: var(--tj-muted);
}
.tj-loading {
  padding: 2rem 0;
  font-family: var(--tj-ui);
  font-size: 0.85rem;
  color: var(--tj-muted);
}

.tj-desk {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--tj-rule);
  max-width: var(--tj-feed-width);
}
.tj-desk-kicker {
  margin: 0 0 0.35rem;
  font-family: var(--tj-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tj-muted);
}
.tj-desk h3 {
  margin: 0 0 0.5rem;
  font-family: var(--tj-sans);
  font-size: 1.1rem;
  font-weight: 700;
}
.tj-desk p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--tj-muted);
  line-height: 1.6;
}

.tj-about {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--tj-rule);
}
.tj-about h2 {
  margin: 0 0 1rem;
  font-family: var(--tj-sans);
  font-size: 1rem;
  font-weight: 700;
}
.tj-faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  max-width: 900px;
}
@media (min-width: 700px) {
  .tj-faq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.tj-faq-item h3 {
  margin: 0 0 0.35rem;
  font-family: var(--tj-sans);
  font-size: 0.92rem;
  font-weight: 700;
}
.tj-faq-item p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--tj-muted);
}

.tj-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2.5rem;
  border-top: 1px solid var(--tj-rule);
  font-family: var(--tj-ui);
  font-size: 0.72rem;
  color: var(--tj-muted);
  line-height: 1.65;
}
.tj-footer a { color: var(--tj-ink); text-decoration: none; }
.tj-footer a:hover { color: var(--tj-accent); }
.tj-footer-sources { margin-top: 0.55rem; font-size: 0.66rem; }

@media (max-width: 599px) {
  .tj-story-title { font-size: 1.15rem; }
  .tj-story--featured .tj-story-title { font-size: 1.3rem; }
  .tj-feed { max-width: 100%; }
  .tj-main { padding-bottom: calc(3rem + env(safe-area-inset-bottom, 0)); }
  .tj-story-media { border-radius: 8px; }
  .tj-toolbar { padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); }
  .tj-btn-save,
  .tj-btn-share { min-height: 40px; padding: 0.5rem 0.85rem; }
}