.tm-story { min-width: 0; }
.tm-story__media { display: block; margin-bottom: 0.7rem; overflow: hidden; background: var(--tm-surface); }
.tm-story-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 180ms ease; }
.tm-image-placeholder {
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 9;
  place-items: center;
  border: 1px solid var(--tm-border);
  background: #55585d;
  color: #d7d8da;
}
.tm-image-placeholder > span { font-family: var(--tm-display); font-size: 0.63rem; font-weight: 750; letter-spacing: 0.12em; }
.tm-story__media:hover .tm-story-image { transform: scale(1.015); }
.tm-story__title {
  margin: 0.25rem 0 0.45rem;
  font-family: var(--tm-sans);
  font-size: clamp(1.02rem, 1.45vw, 1.25rem);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.42;
}
.tm-story__title a { text-decoration: none; }
.tm-story__excerpt { margin: 0 0 0.7rem; color: var(--tm-muted); font-size: 0.82rem; line-height: 1.7; }
.tm-story--compact .tm-story__title { font-size: clamp(0.9rem, 1.1vw, 1.02rem); }
.tm-story--feature .tm-story__title { font-size: clamp(1.15rem, 1.7vw, 1.5rem); }
.tm-story--list {
  display: grid;
  grid-template-columns: minmax(10rem, 0.58fr) minmax(0, 1.42fr);
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--tm-border);
}
.tm-story--list:first-child { padding-top: 0; border-top: 0; }
.tm-story--list .tm-story__media { margin: 0; }
.tm-story--list .tm-story__title { font-size: clamp(1.08rem, 1.6vw, 1.35rem); }

.tm-latest-item {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) max-content;
  gap: 0.65rem;
  align-items: start;
  padding: 0.78rem 0;
  border-bottom: 1px solid var(--tm-border);
}
.tm-latest-item > time { padding-top: 0.08rem; color: var(--tm-muted); font-size: 0.7rem; line-height: 1.4; }
.tm-latest-item h3 { margin: 0; font-size: 0.82rem; font-weight: 750; letter-spacing: -0.015em; line-height: 1.45; }
.tm-latest-item h3 a { text-decoration: none; }
.tm-latest-item .tm-kicker { margin: 0; padding-top: 0.08rem; color: var(--tm-muted); font-size: 0.66rem; font-weight: 600; letter-spacing: 0; line-height: 1.45; text-align: right; text-transform: none; }
.tm-home-latest > .tm-directory-link { justify-content: flex-end; width: 100%; padding: 0.78rem 0; }

.tm-important-item {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 0.85rem;
  padding: 0.72rem 0;
  border-bottom: 1px solid var(--tm-border);
}
.tm-important-item__media { display: block; overflow: hidden; }
.tm-important-item__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.tm-important-item h3 { margin: 0 0 0.45rem; font-size: 0.82rem; font-weight: 750; letter-spacing: -0.015em; line-height: 1.45; }
.tm-important-item h3 a { text-decoration: none; }

.tm-tabs { display: flex; margin: 0; border-bottom: 1px solid var(--tm-border); }
.tm-tabs button {
  flex: 1;
  padding: 0.6rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--tm-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.tm-tabs button[aria-selected="true"] { border-color: var(--tm-accent); color: var(--tm-text); }
.tm-ranking-panels { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: repeat(5, auto); }
.tm-ranking-panels > .tm-ranking { display: grid; grid-area: 1 / 1 / 6 / 2; grid-template-rows: subgrid; min-width: 0; }
.tm-ranking-panels > .tm-ranking[hidden] { display: grid; visibility: hidden; }
.tm-ranking__status { grid-row: 1 / -1; }
.tm-ranking { margin: 0; padding: 0; list-style: none; }
.tm-ranking li { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: 0.4rem; padding: 0.65rem 0; border-bottom: 1px solid var(--tm-border); }
.tm-ranking li.tm-ranking__status { display: block; color: var(--tm-muted); font-size: 0.85rem; line-height: 1.6; }
.tm-ranking-updated { margin: 0.75rem 0 0; color: var(--tm-muted); font-size: 0.7rem; line-height: 1.5; }
.tm-ranking__number { color: var(--tm-text); font-family: var(--tm-display); font-size: 1.45rem; font-weight: 700; line-height: 1; }
.tm-ranking .tm-kicker { display: none; }
.tm-ranking__title { display: block; font-family: var(--tm-sans); font-size: 0.78rem; font-weight: 700; line-height: 1.45; text-decoration: none; }

.tm-category-directory ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; border-bottom: 1px solid var(--tm-border); list-style: none; }
.tm-category-directory li { min-width: 0; border-left: 1px solid var(--tm-border); }
.tm-category-directory li:nth-child(4n + 1) { border-left: 0; }
.tm-category-directory li:nth-child(n + 5) { border-top: 1px solid var(--tm-border); }
.tm-category-directory li a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 4.5rem;
  padding: 0.8rem;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
}
.tm-category-directory li .material-symbols-outlined { color: var(--tm-accent); font-size: 1.15rem; }
.tm-category-directory > .tm-directory-link { justify-content: flex-end; width: 100%; margin-top: 0; padding-top: 0.75rem; }

.tm-related-sidebar__item {
  display: grid;
  grid-template-columns: 5.2rem minmax(0, 1fr);
  gap: 0.7rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--tm-border);
}
.tm-related-sidebar__media { display: block; overflow: hidden; }
.tm-related-sidebar__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.tm-related-sidebar__item h3 { margin: 0 0 0.25rem; font-size: 0.72rem; line-height: 1.4; }
.tm-related-sidebar__item h3 a { text-decoration: none; }
.tm-related-sidebar__item time { color: var(--tm-muted); font-size: 0.7rem; }

@media (min-width: 701px) {
  .tm-home-secondary .tm-ranking-panels { grid-template-rows: auto; }
  .tm-home-secondary .tm-ranking { grid-area: 1 / 1; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: auto; }
  .tm-home-secondary .tm-ranking li { align-content: start; padding: 0.8rem; border-left: 1px solid var(--tm-border); border-bottom: 0; }
  .tm-home-secondary .tm-ranking li:first-child { padding-left: 0; border-left: 0; }
}

@media (max-width: 700px) {
  .tm-latest-item { grid-template-columns: 2.4rem minmax(0, 1fr); gap: 0.55rem; padding: 0.72rem 0; }
  .tm-latest-item .tm-kicker { display: none; }
  .tm-story--list { grid-template-columns: 7rem minmax(0, 1fr); gap: 0.9rem; }
  .tm-story--list .tm-story__excerpt { display: none; }
  .tm-story--list .tm-story__title { font-size: 1.05rem; }
  .tm-story--list .tm-meta span:first-child + span[aria-hidden],
  .tm-story--list .tm-meta span:last-child { display: none; }
  .tm-important-item { grid-template-columns: 6.5rem minmax(0, 1fr); }
  .tm-category-directory ul { grid-template-columns: 1fr 1fr; }
  .tm-category-directory li:nth-child(n) { border-top: 1px solid var(--tm-border); border-left: 0; }
  .tm-category-directory li:nth-child(-n + 2) { border-top: 0; }
  .tm-category-directory li:nth-child(even) { border-left: 1px solid var(--tm-border); }
  .tm-category-directory li a { min-height: 3.75rem; padding: 0.65rem; }
  .tm-category-grid .tm-story--compact { grid-template-columns: 7.25rem minmax(0, 1fr); gap: 0.9rem; }
  .tm-category-grid .tm-story--compact .tm-story__media { margin: 0; }
.tm-category-grid .tm-story--compact .tm-story__excerpt { margin-top: 0.55rem; font-size: 0.72rem; line-height: 1.58; }
  .tm-story--list .tm-story__media,
  .tm-category-grid .tm-story--compact .tm-story__media,
  .tm-home-spotlight .tm-story__media {
    align-self: center;
    aspect-ratio: 16 / 9;
  }
  .tm-story--list .tm-story__media > img,
  .tm-category-grid .tm-story--compact .tm-story__media > img,
  .tm-home-spotlight .tm-story__media > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.tm-site-main { --tm-border-strong: var(--tm-border); }
.tm-home-spotlight { padding-bottom: 0; border-bottom: 0; }

.tm-home-categories__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tm-home-category {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
  aspect-ratio: auto;
  min-height: 4.75rem;
  padding: 0.85rem 0.7rem;
  border-top: 1px solid var(--tm-border);
  background: var(--tm-bg);
  color: var(--tm-text);
  text-decoration: none;
}
.tm-home-category > img { display: none; }
.tm-home-category::before,
.tm-category-hero::after {
  content: var(--tm-category-symbol) / "";
  font-family: "Material Symbols Outlined";
  font-style: normal;
  font-weight: 400;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48;
  font-feature-settings: "liga";
  letter-spacing: normal;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
}
.tm-home-category::before { flex: 0 0 1em; width: 1em; overflow: hidden; color: var(--tm-text); font-size: 2rem; }
.tm-home-category:hover { background: var(--tm-surface); color: var(--tm-text); }
.tm-home-category:hover::before { color: var(--tm-accent); }
.tm-home-category__body { position: static; display: flex; flex: 1; flex-direction: column; gap: 0.35rem; min-width: 0; height: auto; padding: 0 1rem 0 0; text-shadow: none; }
.tm-home-category__body strong { font-family: var(--tm-display); font-size: 0.84rem; font-weight: 800; letter-spacing: 0.015em; line-height: 1.25; text-transform: none; }
.tm-home-category__message { max-width: 16em; margin: 0; font-weight: 400; color: var(--tm-muted); font-size: 0.7rem; line-height: 1.6; }
.tm-home-category__body .material-symbols-outlined { position: absolute; top: 0.9rem; right: 0.5rem; margin: 0; color: var(--tm-muted); font-size: 1rem; }
.tm-home-category[href*="/category/ai/"], body.category-ai { --tm-category-symbol: "psychology"; }
.tm-home-category[href*="/category/technology/"], body.category-technology { --tm-category-symbol: "developer_board"; }
.tm-home-category[href*="/category/robotics/"], body.category-robotics { --tm-category-symbol: "smart_toy"; }
.tm-home-category[href*="/category/science/"], body.category-science { --tm-category-symbol: "science"; }
.tm-home-category[href*="/category/quantum-technology/"], body.category-quantum-technology { --tm-category-symbol: "sensors"; }
.tm-home-category[href*="/category/semiconductor/"], body.category-semiconductor { --tm-category-symbol: "memory"; }
.tm-home-category[href*="/category/space/"], body.category-space { --tm-category-symbol: "rocket_launch"; }
.tm-home-category[href*="/category/defense/"], body.category-defense { --tm-category-symbol: "shield"; }

body.blog { --tm-category-symbol: "auto_stories"; }
:root:has(link[rel="canonical"][href*="/spotlight/"]) .tm-category-hero { --tm-category-symbol: "star"; }

.tm-category-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2rem;
  min-height: 12rem;
  padding: 2rem clamp(1.25rem, 3vw, 2.5rem);
  background: var(--tm-surface);
  color: var(--tm-text);
}
.tm-category-hero > img { display: none; }
.tm-category-hero::after { width: 1em; overflow: hidden; color: var(--tm-muted); font-size: 5.5rem; }
.tm-category-hero__body { min-width: 0; min-height: 0; padding: 0; text-shadow: none; }
.tm-category-hero h1 { max-width: none; color: var(--tm-text); font-size: clamp(1.6rem, 4.5vw, 3.5rem); letter-spacing: -0.025em; line-height: 1.1; text-transform: none; overflow-wrap: anywhere; }
.tm-category-hero__message { max-width: none; margin-top: 0.8rem; color: var(--tm-muted); font-size: 0.9rem; font-weight: 400; line-height: 1.7; }

@media (min-width: 901px) {
  .tm-home-latest,
  .tm-home-categories { display: flex; flex-direction: column; }
  .tm-home-latest > .tm-section-heading,
  .tm-home-categories > .tm-section-heading,
  .tm-home-latest > .tm-directory-link { flex-shrink: 0; }
  .tm-home-latest__list { display: grid; flex: 1; grid-auto-rows: 1fr; }
  .tm-home-latest .tm-latest-item { align-items: center; }
  .tm-home-categories__grid { flex: 1; grid-auto-rows: 1fr; row-gap: 0.35rem; }
  .tm-home-category { min-height: 0; padding-block: 0.6rem; }
}

@media (max-width: 700px) {
  .tm-home-category { gap: 0.55rem; min-height: 5.75rem; padding: 0.85rem 0.3rem; }
  .tm-home-category::before { font-size: 1.6rem; }
  .tm-home-category__body strong { font-size: 0.82rem; }
  .tm-home-category__message { max-width: 15em; font-size: 0.7rem; }
  .tm-home-category__body { padding-right: 0; }
  .tm-home-category__body .material-symbols-outlined { display: none; }
  .tm-category-hero { aspect-ratio: auto; gap: 1rem; min-height: 10rem; padding: 1.5rem 1.1rem; }
  .tm-category-hero::after { font-size: 3.25rem; }
  .tm-category-hero__message { font-size: 0.8rem; }
}

@media (max-width: 360px) {
  .tm-home-category { flex-direction: column; gap: 0.65rem; min-height: 8rem; padding: 0.8rem 0.5rem; }
}
