@import url(https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700&display=swap);

/* ============================================================
   tr-home.css — taniarascia.com-accurate design system
   Colors / layout taken directly from the live CSS.
   No top navbar — sidebar handles all navigation.
   ============================================================ */

/* ── Palette tokens ── */
:root {
  --gray-0:#fbfbfb; --gray-3:#d4d4d8; --gray-5:#a1a1a8;
  --gray-6:#4e4e55; --gray-7:#323239; --gray-8:#25252b;
  --gray-9:#1c1c20; --gray-10:#1d1d22;
  --beige-0:#fdf9ee; --beige-1:#f6f0df; --beige-2:#eee8d5;
  --beige-25:#e5dcbd; --beige-3:#ded4b2;

  /* Semantic aliases */
  --bg:       var(--beige-0);
  --bg-nav:   var(--beige-0);
  --bg-card:  var(--beige-1);
  --bg-hover: var(--beige-2);
  --text:     var(--gray-8);
  --text-m:   var(--gray-6);
  --text-em:  var(--gray-10);
  --border:   var(--beige-25);
  --primary:  #111111;

  /* Layout */
  --sw: 390px;    /* sidebar width */
  --cw: 760px;    /* content width */
  --pad: 2rem;
  --r: 6px;

  /* Fonts */
  --f:  "Be Vietnam Pro", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --fh: "Be Vietnam Pro", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --fm: Menlo, "Google Sans Code", monospace;
}

/* ── Dark mode ── */
@media (prefers-color-scheme: dark) {
  :root:not(.is-light) {
    --bg:var(--gray-9); --bg-nav:var(--gray-9); --bg-card:var(--gray-8);
    --bg-hover:var(--gray-8); --text:var(--gray-3); --text-m:var(--gray-5);
    --text-em:var(--gray-0); --border:var(--gray-7); --primary:#eeeeee;
  }
}
:root.is-dark {
  --bg:var(--gray-9); --bg-nav:var(--gray-9); --bg-card:var(--gray-8);
  --bg-hover:var(--gray-8); --text:var(--gray-3); --text-m:var(--gray-5);
  --text-em:var(--gray-0); --border:var(--gray-7); --primary:#eeeeee;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { background: var(--bg); color: var(--text); font: 16px/1.6 var(--f);
  transition: background .2s, color .2s; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
h1,h2,h3,h4,h5 { color: var(--text-em); font-family: var(--fh); line-height: 1.3; }

/* ════════════════════════════════════════════
   LAYOUT — outer grid: sidebar | main
   ════════════════════════════════════════════ */
.tr-layout { display: flex; flex-direction: column; min-height: 100vh; }

@media (min-width: 1020px) {
  .tr-layout {
    flex-direction: row;
    align-items: flex-start;
    max-width: calc(var(--sw) + var(--cw) + 260px + 8rem);
    margin: 0 auto;
  }
}

/* ════════════════════════════════════════════
   SIDEBAR
   Mobile : thin horizontal bar at top
   Desktop: sticky left column
   ════════════════════════════════════════════ */
.tr-sidebar {
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  /* compact horizontal bar on mobile */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1rem;
}

@media (min-width: 1020px) {
  .tr-sidebar {
    display: block;              /* vertical sections */
    width: var(--sw);
    min-width: var(--sw);
    height: 100vh;
    position: sticky; top: 0;
    overflow-y: auto; scrollbar-width: thin;
    border-bottom: none;
    border-right: 1px solid var(--border);
    flex-shrink: 0;
  }
}

/* Sidebar sections */
.tr-sb-section {
  border-bottom: 1px solid var(--border);
  margin: 1.25rem;
  padding-bottom: 1.5rem;
}
.tr-sb-section:last-child { border: none; padding-bottom: 3rem; }
.tr-mobile-category-nav { display: none; }

/* Hide sections on mobile (only keep logo + nav) */
.tr-sb-section--extra { display: none; }
@media (min-width: 1020px) { .tr-sb-section--extra { display: block; } }

/* Logo / site name */
.tr-sidebar-logo {
  display: flex; align-items: center; gap: .65rem;
  flex-shrink: 0;
}
.tr-sidebar-logo.has-logo {
  align-items: center;
}
.tr-sidebar-logo svg { height: 22px; width: 22px; flex-shrink: 0; }
.tr-sidebar-logo-image {
  width: auto;
  height: auto;
  max-width: min(180px, 100%);
  max-height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}
.tr-site-name {
  color: var(--text-em); font-family: var(--fh);
  font-size: 18px; font-weight: 500; white-space: nowrap;
}

/* Sidebar nav links */
.tr-sb-nav {
  /* mobile: horizontal row */
  display: flex; gap: 2px;
}
@media (min-width: 1020px) {
  .tr-sb-nav { flex-direction: column; }
}
.tr-sb-nav a {
  display: flex; align-items: center; gap: .5rem;
  border-radius: var(--r); color: var(--text);
  font-size: 16px; font-weight: 500;
  padding: 4px .5rem;
  transition: background .15s, color .15s;
}
.tr-sb-nav a:hover, .tr-sb-nav a.active {
  background: var(--bg-hover); color: var(--text-em); text-decoration: none;
}
/* Tighter / smaller on mobile */
@media (max-width: 1019px) {
  .tr-sb-nav {
    flex-wrap: wrap;
    gap: .45rem;
  }

  .tr-sb-nav a {
    min-height: 36px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-card) 72%, transparent);
    border-radius: 999px;
    font-size: 13px;
    line-height: 1.25;
    padding: .45rem .75rem;
  }

  .tr-sidebar .tr-sb-section--categories {
    display: none;
  }

  .tr-mobile-category-nav {
    display: block;
    margin: 0 var(--pad) var(--pad);
    padding: .85rem;
    border: 1px solid var(--border);
    border-radius: calc(var(--r) + 8px);
    background: color-mix(in srgb, var(--bg-card) 76%, transparent);
  }

  .tr-mobile-category-nav .tr-sb-nav {
    margin-top: .65rem;
  }

  .tr-mobile-category-nav .tr-sb-label {
    color: var(--text-em);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
}

/* Sidebar secondary links (social, etc.) */
.tr-sb-links { display: flex; flex-direction: column; gap: 6px; }
.tr-sb-links a { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--text-m); }
.tr-sb-links a:hover { color: var(--text-em); }

/* Theme toggle button */
.tr-theme-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: 4px 8px;
  border-radius: var(--r);
  font-size: .8rem;
  color: var(--text-m);
  border: 1px solid var(--border);
  transition: border-color .15s, color .15s;
  margin-left: auto;         /* push to right on mobile */
  white-space: nowrap;
}
.tr-theme-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.tr-theme-btn:hover { color: var(--text-em); border-color: var(--text-m); }
.tr-theme-btn #tr-theme-label {
  display: inline-block;
  min-width: 52px;
}
/* In sidebar on desktop — no border, no margin */
.tr-sb-section .tr-theme-btn {
  margin-left: 0;
  border: none;
  padding: 4px 0;
  font-size: .9rem;
}

/* ════════════════════════════════════════════
   MAIN CONTENT AREA
   ════════════════════════════════════════════ */
.tr-main-wrapper { flex: 1; min-width: 0; min-height: 100vh; }
.tr-main-content {
  max-width: var(--cw);
  margin-left: auto; margin-right: auto;
  padding: var(--pad);
}
@media (min-width: 1020px) {
  .tr-main-content { margin-left: 0; }
}


/* ── Hero ── */
.tr-hero {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.tr-hero-copy { max-width: min(100%, 720px); }
.tr-hero--stacked {
  display: block;
}
.tr-hero-avatar-wrap {
  display: flex;
  justify-content: center;
}
.tr-hero-avatar {
  width: min(78vw, 325px);
  aspect-ratio: 1;
  border-radius: 999px;
  object-fit: cover;
  border: 6px solid color-mix(in srgb, var(--bg-card) 82%, white 18%);
  background: var(--bg-card);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .12);
}
@media (min-width: 800px) {
  .tr-hero {
    margin-top: 2rem;
    margin-bottom: 4rem;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
  }
  .tr-hero-avatar-wrap {
    justify-content: flex-end;
    flex: 0 0 240px;
  }
}
.tr-hero h1 { font-size: clamp(1.75rem, 8vw, 2.35rem); font-weight: 700; line-height: 1.12; margin-bottom: 1rem; }
@media (min-width: 800px) {
  .tr-hero h1 { font-size: 3rem; line-height: 1.08; margin-bottom: 1.5rem; white-space: nowrap; }
}
.tr-hero-desc { font-size: 16px; color: var(--text-m); max-width: 1000px; margin-top: 20px; margin-bottom: 1rem; text-align: justify; }

.tr-rich-description { display: block; }
.tr-rich-description p { margin: 0 0 1rem; }
.tr-hero--about .tr-hero-desc.tr-rich-description p { font-size: 14px; }
.tr-rich-description p:last-child { margin-bottom: 0; }
.tr-rich-description br { display: block; content: ""; margin-top: .55rem; }
.tr-rich-description ul, .tr-rich-description ol { margin: 0 0 1rem; padding-left: 1.35rem; }
.tr-rich-description strong, .tr-rich-description b { color: var(--text-em); font-weight: 800; }

/* ── Cards ── */
.tr-cards {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.tr-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .38rem .7rem;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  line-height: 1.1;
  color: var(--text-em);
  font-weight: 600;
  font-size: .82rem;
  transition: border-color .15s, transform .15s;
}
.tr-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.tr-card svg { height: 15px; width: 15px; min-width: 15px; }
.tr-card span { display: none; }

.tr-contact-icons {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}

.tr-hero-about-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.tr-hero-about-top h1 {
  margin-bottom: 0;
}

.tr-contact-icons--hero {
  flex: 0 0 auto;
  justify-content: flex-end;
}

@media (max-width: 720px) {
  .tr-hero-about-top {
    display: block;
  }

  .tr-contact-icons--hero {
    margin-top: .85rem;
    justify-content: flex-start;
  }
}

.tr-contact-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-card) 92%, white 8%);
  color: var(--text-em);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
  transition: transform .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.tr-contact-icon:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, .1);
}

.tr-contact-icon svg,
.tr-contact-icon img {
  width: 22px;
  height: 22px;
}

.tr-contact-icon img {
  object-fit: contain;
}

.tr-contact-icon-zalo { color: #0068ff; }
.tr-contact-icon-whatsapp { color: #25d366; }
.tr-contact-icon-email { color: #ef4444; }

/* ── Section heading ── */
.tr-heading { margin-bottom: 2rem; }
.tr-heading h2 { display: flex; align-items: center; gap: 1rem; margin-bottom: .5rem; font-size: 1.8rem; }
.tr-heading .desc { color: var(--text-m); font-size: 1.15rem; }
.tr-heading .desc a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.tr-heading--with-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.tr-heading--with-action h2 {
  margin-bottom: 0;
}
.tr-heading-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
.tr-heading-link:hover {
  text-decoration: underline;
}
.tr-home-category-section {
  margin-top: 2.5rem;
}

/* ── Post list cards ── */
.tr-post-list {
  display: flex;
  flex-direction: column;
}

a.tr-post {
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr;
  gap: .95rem;
  padding: 1rem 0;
  text-decoration: none;
}

a.tr-post:last-child { border-bottom: none; }

.tr-post-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.tr-post-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tr-post-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.tr-post-card-meta {
  color: var(--text-m);
  font-size: .84rem;
  font-weight: 500;
}

.tr-post-title {
  color: var(--text-em);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
}

.tr-post-desc {
  color: var(--text-m);
  font-size: .95rem;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

@media (min-width: 760px) {
  a.tr-post {
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: start;
  }
}

@media (min-width: 1020px) {
  a.tr-post {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 1.1rem;
    padding: 1.1rem 0;
  }

  a.tr-post:hover {
    background: var(--bg-hover);
  }

  a.tr-post:hover .tr-post-card-meta,
  a.tr-post:hover .tr-post-title {
    color: var(--text-em);
  }
}

/* ── Mobile sidebar: strip section chrome so sections flow as flex items ── */
@media (max-width: 1019px) {
  .tr-sidebar .tr-sb-section { margin: 0; padding: 0; border: none; }
  .tr-sidebar .tr-sb-section:last-child { padding-bottom: 0; }
  .tr-sidebar .tr-sb-theme { margin-left: 0; }
}

/* ── Contact form ── */
.tr-form { max-width: 520px; }
.tr-form-group { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1.25rem; }
.tr-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .tr-form-row { grid-template-columns: 1fr; } }
.tr-form label { font-size: .8rem; font-weight: 500; color: var(--text-m); }
.tr-form input,
.tr-form select,
.tr-form textarea {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r); color: var(--text); font: inherit;
  font-size: .95rem; padding: .55rem .75rem; width: 100%;
  transition: border-color .15s;
}
.tr-form input:focus,
.tr-form select:focus,
.tr-form textarea:focus { outline: none; border-color: var(--primary); }
.tr-form textarea { resize: vertical; min-height: 120px; }
.tr-form-status {
  padding: .6rem 1rem; margin-bottom: 1.25rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r); font-size: .9rem; color: var(--text-m);
}
.tr-btn {
  background: var(--text-em); color: var(--bg); border: none;
  border-radius: var(--r); padding: .6rem 1.5rem;
  font: inherit; font-size: .95rem; font-weight: 600;
  cursor: pointer; transition: opacity .15s;
}
.tr-btn:hover { opacity: .75; }

/* ── Footer ── */
.tr-footer { border-top: 1px solid var(--border); font-size: 13px; }
.tr-footer-inner {
  display: flex; flex-direction: column; gap: 1.5rem;
  max-width: var(--cw); margin: 0 auto;
  padding: 1.25rem var(--pad);
}
@media (min-width: 800px) {
  .tr-footer { font-size: 14px; }
  .tr-footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}
.tr-footer-links { display: flex; gap: .75rem; flex-wrap: wrap; }
.tr-footer-links a { color: var(--text-m); white-space: nowrap; }
.tr-footer-links a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.tr-footer-made { display: flex; align-items: center; gap: 5px; color: var(--text-m); }

/* ── Sidebar section label ── */
.tr-sb-label {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-em);
  margin-bottom: .7rem;
}

/* ── Sidebar search form ── */
.tr-sb-search {
  display: flex; align-items: center;
  border: 1px solid var(--border); border-radius: var(--r);
  background: var(--bg-card); overflow: hidden;
  transition: border-color .15s;
}
.tr-sb-search:focus-within { border-color: var(--primary); }
.tr-sb-search input {
  flex: 1; background: none; border: none; outline: none;
  padding: .4rem .6rem; font: inherit; font-size: 14px; color: var(--text);
  min-width: 0;
}
.tr-sb-search input::placeholder { color: var(--text-m); }
.tr-sb-search button {
  padding: .4rem .5rem; color: var(--text-m); line-height: 0;
  transition: color .15s;
}
.tr-sb-search button:hover { color: var(--primary); }
.tr-sb-search svg { width: 15px; height: 15px; }

/* Mobile: hide search in sidebar, show it inline on search page */
@media (max-width: 1019px) { .tr-sidebar .tr-sb-search { display: none; } }

.tr-search-suggestions {
  display: none;
  margin-top: .65rem;
}

.tr-search-suggestions.is-visible {
  display: block;
}

.tr-search-suggestions-copy {
  color: var(--text-m);
  font-size: .82rem;
  margin-bottom: .65rem;
}

.tr-search-suggestions-list {
  display: grid;
  gap: .8rem;
}

.tr-search-suggestions-empty {
  display: none;
  color: var(--text-m);
  font-size: .88rem;
}

.tr-search-suggestions-empty.is-visible {
  display: block;
}

.tr-search-suggestions--page {
  max-width: 520px;
  margin: -1rem 0 1.5rem;
}

/* ── Sidebar social icons ── */
.tr-sb-social {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.tr-sb-social-link {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--r);
  color: var(--text-m); border: 1px solid var(--border);
  transition: color .15s, border-color .15s, background .15s;
}
.tr-sb-social-link svg { width: 16px; height: 16px; }
.tr-sb-social-link:hover { color: var(--primary); border-color: var(--primary); background: var(--bg-hover); }

/* ── Prose content ── */
.tr-prose { line-height: 1.8; font-size: 1rem; color: var(--text); }
.tr-prose p,
.tr-prose span {
  background-color: transparent !important;
}
.tr-prose h2 {
  font-size: 1.35rem; font-weight: 700; font-family: var(--fh); color: var(--text-em);
  margin: 2.5rem 0 .75rem; padding-bottom: .35rem; border-bottom: 1px solid var(--border);
}
.tr-prose h3 {
  font-size: 1.1rem; font-weight: 700; font-family: var(--fh); color: var(--text-em);
  margin: 1.75rem 0 .5rem;
}
.tr-prose h4 { font-size: 1rem; font-weight: 700; color: var(--text-em); margin: 1.25rem 0 .35rem; }
.tr-prose p { margin-bottom: 1.1rem; }
.tr-prose ul, .tr-prose ol { padding-left: 1.75rem; margin-bottom: 1.1rem; }
.tr-prose li { margin-bottom: .4rem; }
.tr-prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.tr-prose strong { color: var(--text-em); }
.tr-prose em { font-style: italic; }
.tr-prose blockquote {
  border-left: 3px solid var(--border); margin: 1.5rem 0;
  padding: .6rem 1.25rem; color: var(--text-m); font-style: italic;
}
.tr-prose pre {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1rem 1.25rem;
  overflow-x: auto; margin: 1.25rem 0; font-size: .88em;
}
.tr-prose code {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 3px; padding: .15em .35em;
  font-size: .875em; font-family: var(--fm);
}
.tr-prose pre code { background: none; border: none; padding: 0; }
.tr-prose img { border-radius: var(--r); margin: 1.5rem 0; max-width: 100%; }
.tr-prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .92rem; }
.tr-prose th, .tr-prose td { padding: .55rem .9rem; border: 1px solid var(--border); text-align: left; }
.tr-prose th { background: var(--bg-card); font-weight: 600; color: var(--text-em); }
.tr-prose hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }

.tr-prose--about,
.tr-prose--about > * {
  columns: auto !important;
  column-count: 1 !important;
}

.tr-prose--about [style*="column-count"],
.tr-prose--about [style*="columns"],
.tr-prose--about .wp-block-columns {
  display: block !important;
  columns: auto !important;
  column-count: 1 !important;
}

.tr-prose--about .wp-block-column {
  width: 100% !important;
  flex-basis: 100% !important;
}

/* ── Search results page ── */
.tr-search-bar {
  display: flex; align-items: center;
  border: 1px solid var(--border); border-radius: var(--r);
  background: var(--bg-card); overflow: hidden;
  max-width: 520px; margin-bottom: 2rem;
  transition: border-color .15s;
}
.tr-search-bar:focus-within { border-color: var(--primary); }
.tr-search-bar input {
  flex: 1; background: none; border: none; outline: none;
  padding: .65rem .85rem; font: inherit; font-size: 1rem; color: var(--text);
}
.tr-search-bar input::placeholder { color: var(--text-m); }
.tr-search-bar button {
  padding: .65rem .75rem; color: var(--text-m); line-height: 0;
  transition: color .15s;
}
.tr-search-bar button:hover { color: var(--primary); }
.tr-search-bar svg { width: 18px; height: 18px; }
.tr-search-meta { color: var(--text-m); font-size: .9rem; margin-bottom: 1.5rem; }
.tr-no-results { color: var(--text-m); font-size: .95rem; margin-top: 1rem; }

.tr-post-list--compact {
  gap: .8rem;
}

.tr-post--compact {
  grid-template-columns: 72px minmax(0, 1fr);
  gap: .8rem;
  padding: .7rem;
  align-items: center;
}

.tr-post-media--compact {
  width: 72px;
  aspect-ratio: 1;
}

.tr-post-body--compact {
  min-width: 0;
}

.tr-post--compact .tr-post-card-meta {
  margin-bottom: .2rem;
  font-size: .72rem;
}

.tr-post--compact .tr-post-title {
  font-size: .95rem;
  line-height: 1.35;
}

.tr-search-suggestion-card {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: .9rem;
  align-items: start;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg-card);
  padding: .8rem;
}

.tr-search-suggestion-card + .tr-search-suggestion-card {
  margin-top: .8rem;
}

.tr-search-suggestion-media {
  width: 84px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: calc(var(--r) - 4px);
  background: var(--bg-soft);
}

.tr-search-suggestion-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tr-search-suggestion-body {
  min-width: 0;
}

.tr-search-suggestion-title {
  font-size: .98rem;
  font-weight: 600;
  color: var(--text-em);
  line-height: 1.4;
}

.tr-search-suggestion-excerpt {
  margin: .45rem 0 0;
  color: var(--text-m);
  font-size: .88rem;
  line-height: 1.55;
}

@media (max-width: 640px) {
  .tr-search-suggestion-card {
    grid-template-columns: 1fr;
  }

  .tr-search-suggestion-media {
    width: 100%;
    aspect-ratio: 16 / 9;
  }
}

/* ── Sidebar newsletter form ── */
.tr-sb-newsletter { display: flex; flex-direction: column; gap: 6px; }
.tr-sb-newsletter input[type="email"] {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r); color: var(--text); font: inherit;
  font-size: 13px; padding: .4rem .65rem; width: 100%;
  transition: border-color .15s;
}
.tr-sb-newsletter input[type="email"]:focus { outline: none; border-color: var(--primary); }
.tr-sb-newsletter input[type="email"]::placeholder { color: var(--text-m); }
.tr-sb-newsletter button {
  background: var(--primary); color: var(--bg);
  border-radius: var(--r); padding: .4rem .75rem;
  font: inherit; font-size: 13px; font-weight: 600;
  transition: opacity .15s; width: 100%;
}
.tr-sb-newsletter button:hover { opacity: .75; }
@media (max-width: 1019px) { .tr-sidebar .tr-sb-newsletter { display: none; } }

/* ════════════════════════════════════════════
   POST DETAIL PAGE
   ════════════════════════════════════════════ */

/* Post detail/category — unlock .tr-main-content width so the right sidebar can sit beside content */
@media (min-width: 1100px) {
  .tr-layout--post .tr-main-content,
  .tr-layout--category .tr-main-content { max-width: none; }
}

/* ── Post detail page: show right sidebar, narrow article ── */
@media (min-width: 1020px) {
  .tr-layout--post .tr-post-layout { display: flex; gap: 2.5rem; align-items: flex-start; }
  .tr-layout--post .tr-post-sidebar { display: block; }
  .tr-layout--post .tr-post-article { flex: 1; min-width: 0; max-width: var(--cw); }
}

/* Tablet: post detail sidebar stacks below */
@media (min-width: 1020px) and (max-width: 1099px) {
  .tr-layout--post .tr-post-layout { display: block; }
  .tr-layout--post .tr-post-sidebar {
    width: 100%; min-width: 0;
    margin-top: 2rem; padding-top: 2rem;
    border-top: 1px solid var(--border);
  }
  .tr-layout--post .tr-post-sidebar-inner { position: static; }
}

/* ── Category page: tablet fixes (right sidebar stacks below) ── */
@media (min-width: 1020px) and (max-width: 1099px) {
  .tr-layout--category .tr-post-layout { display: block; }
  .tr-layout--category .tr-post-sidebar {
    display: block;
    width: 100%;
    min-width: 0;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
  }
  .tr-layout--category .tr-post-sidebar-inner { position: static; }

  .tr-layout--category .tr-hero {
    display: flex;
    flex-direction: column;
    gap: .5rem;
  }

  .tr-layout--category .tr-hero h1 {
    white-space: normal;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
  }

  .tr-layout--category .tr-hero-desc {
    text-align: left;
    max-width: 100%;
    margin-top: .25rem;
  }
}

/* ── 2-col: content + sidebar ── */
.tr-post-layout { display: flex; gap: 3rem; align-items: flex-start; }

/* ── Article column ── */
.tr-post-article { flex: 1; min-width: 0; }

/* ── Post header ── */
.tr-post-header { margin-bottom: 2rem; }
.tr-post-header h1 {
  font-size: clamp(1.55rem, 3vw, 2.2rem); font-weight: 700;
  font-family: var(--fh); line-height: 1.25;
  color: var(--text-em); margin: 0 0 .75rem;
}
.tr-post-meta {
  display: flex; gap: .55rem; align-items: center;
  font-size: .85rem; color: var(--text-m);
}
.tr-post-meta-sep { opacity: .35; }
.tr-post-excerpt {
  margin: .9rem 0 0; font-size: 1.05rem; color: var(--text-m);
  line-height: 1.65; max-width: 620px;
}

/* ── Featured image ── */
.tr-post-featured {
  width: 100%; border-radius: var(--r);
  margin: 1.75rem 0 2.25rem;
  aspect-ratio: 21/9; object-fit: cover;
  border: 1px solid var(--border);
}

/* ── Post nav (back link) ── */
.tr-post-nav { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.tr-post-back {
  font-size: .9rem; color: var(--text-m);
  text-decoration: none; transition: color .15s;
}
.tr-post-back:hover { color: var(--primary); }

/* ════════════════════════════════════════════
   RIGHT SIDEBAR POSTS
   ════════════════════════════════════════════ */
.tr-post-sidebar {
  width: 260px; min-width: 260px;
  display: none;
}
@media (min-width: 1100px) {
  .tr-post-sidebar { display: block; }
}
.tr-post-sidebar-inner {
  position: sticky; top: 1.75rem;
  display: flex; flex-direction: column; gap: .9rem;
}
.tr-post-sidebar-title {
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-m); margin: 0;
}
.tr-post-sidebar-list {
  display: flex; flex-direction: column; gap: .9rem;
}
.tr-post-sidebar-link {
  display: flex; align-items: baseline; gap: .45rem;
  padding-left: .9rem; border-left: 2px solid var(--border);
  text-decoration: none; transition: border-color .15s, color .15s;
}
.tr-post-sidebar-link:hover {
  border-left-color: var(--primary);
}
.tr-post-sidebar-link-title {
  color: var(--text-em); font-size: .92rem; font-weight: 600; line-height: 1.45;
}
.tr-post-sidebar-link-date {
  color: var(--text-m); flex: 0 0 auto; font-size: .78rem;
}

/* ════════════════════════════════════════════
   RELATED POSTS
   ════════════════════════════════════════════ */
.tr-post-related {
  margin-top: 2.5rem; padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.tr-related-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  margin-top: 1.25rem;
}
.tr-related-card {
  display: flex; flex-direction: column; gap: .6rem;
  text-decoration: none; color: inherit;
  transition: opacity .15s;
}
.tr-related-card:hover { opacity: .78; }
.tr-related-img, .tr-related-img-placeholder {
  width: 100%; aspect-ratio: 16/9;
  border-radius: var(--r); border: 1px solid var(--border);
  object-fit: cover; background: var(--bg-card); display: block;
}
.tr-related-body { display: flex; flex-direction: column; gap: .25rem; }
.tr-related-title { font-weight: 600; font-size: .95rem; color: var(--text-em); line-height: 1.35; }
.tr-related-excerpt { font-size: .82rem; color: var(--text-m); line-height: 1.5; margin: 0; }
.tr-related-date { font-size: .78rem; color: var(--text-m); margin-top: .1rem; }

/* ── Responsive ── */
@media (max-width: 1099px) {
  .tr-post-layout { display: block; }
}

@media (max-width: 800px) {
  .tr-post-featured { aspect-ratio: 16/9; }
  .tr-related-grid { grid-template-columns: 1fr; }
}
