/*
Theme Name: Utilra Reader
Theme URI: https://utilra.com
Description: A Medium-inspired reading experience for Utilra. Child theme of Blocksy. Pure focus on typography, whitespace, and trust — built for long-form finance writing.
Author: Utilra Team
Author URI: https://utilra.com
Template: blocksy
Version: 1.3.11
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: utilra-reader
*/

/* ==========================================================================
   1. DESIGN TOKENS
   Change values here to re-skin the entire site.
   ========================================================================== */
:root {
  /* Typography */
  --ur-font-serif: 'Source Serif 4', 'Source Serif Pro', Charter, 'Iowan Old Style', Georgia, serif;
  --ur-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --ur-fs-body: 20px;
  --ur-fs-body-mobile: 18px;
  --ur-lh-body: 1.58;
  --ur-ls-body: -0.003em;

  --ur-fs-h1: 42px;
  --ur-fs-h2: 30px;
  --ur-fs-h3: 24px;
  --ur-fs-meta: 14px;
  --ur-fs-small: 13px;

  /* Color — Medium-true, warm neutrals */
  --ur-text: #242424;
  --ur-text-muted: #6B6B6B;
  --ur-text-faint: #8C8C8C;
  --ur-bg: #FFFFFF;
  --ur-bg-soft: #FAFAFA;
  --ur-border: #E6E6E6;
  --ur-border-faint: #F2F2F2;
  --ur-accent: #0284c7;          /* Utilra brand — sky-600 */
  --ur-accent-dark: #0369a1;     /* Utilra brand — sky-700 */
  --ur-highlight: #e0f2fe;        /* Utilra brand — sky-100 */
  --ur-link: #242424;

  /* Layout */
  --ur-reading-width: 680px;
  --ur-content-width: 1080px;
  --ur-rail-width: 76px;

  /* Space */
  --ur-space-1: 4px;
  --ur-space-2: 8px;
  --ur-space-3: 16px;
  --ur-space-4: 24px;
  --ur-space-5: 32px;
  --ur-space-6: 48px;
  --ur-space-7: 64px;
  --ur-space-8: 96px;

  /* Motion */
  --ur-ease: cubic-bezier(0.2, 0, 0, 1);
}

/* ==========================================================================
   2. BASE — reset Blocksy defaults and set the reading canvas
   ========================================================================== */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body,
body.single,
body.blog,
body.archive,
body.home {
  font-family: var(--ur-font-serif);
  font-size: var(--ur-fs-body);
  line-height: var(--ur-lh-body);
  letter-spacing: var(--ur-ls-body);
  color: var(--ur-text);
  background: var(--ur-bg);
}

.ct-container,
.ct-container-narrow {
  max-width: var(--ur-content-width);
}

/* ==========================================================================
   3. HEADER — minimal, Medium-esque top bar
   ========================================================================== */
header[data-row],
.ct-header {
  border-bottom: 1px solid var(--ur-border-faint);
  background: var(--ur-bg);
}

.site-logo img,
.ct-logo-container img {
  max-height: 36px;
  width: auto;
}

/* Primary nav — sans, small, understated */
.ct-header .menu,
.ct-header nav ul {
  font-family: var(--ur-font-sans);
  font-size: var(--ur-fs-meta);
  font-weight: 400;
  letter-spacing: 0;
}

.ct-header .menu a,
.ct-header nav a {
  color: var(--ur-text-muted);
  transition: color 0.15s var(--ur-ease);
}

.ct-header .menu a:hover,
.ct-header nav a:hover {
  color: var(--ur-text);
}

/* ==========================================================================
   4. LEFT ICON RAIL — fixed sidebar like Medium (desktop only)
   ========================================================================== */
.ur-rail {
  position: fixed;
  top: 56px; /* below the top bar */
  left: 0;
  width: var(--ur-rail-width);
  height: calc(100vh - 56px);
  background: var(--ur-bg);
  border-right: 1px solid var(--ur-border-faint);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: var(--ur-space-5);
  gap: var(--ur-space-4);
  z-index: 90;
}

.ur-rail__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--ur-text-muted);
  text-decoration: none;
  font-family: var(--ur-font-sans);
  font-size: 11px;
  font-weight: 500;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.15s var(--ur-ease);
}

.ur-rail__link:hover {
  color: var(--ur-text);
  background: var(--ur-bg-soft);
}

.ur-rail__link.active {
  color: var(--ur-text);
}

.ur-rail__link svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.75;
}

/* Push body content right to make room for rail */
@media (min-width: 1024px) {
  body.has-rail {
    padding-left: var(--ur-rail-width);
  }
}

/* Hide rail on mobile — hamburger takes over */
@media (max-width: 1023px) {
  .ur-rail {
    display: none;
  }
  body.has-rail {
    padding-left: 0;
  }
}

/* ==========================================================================
   5. HOMEPAGE — flat card grid, no borders, no shadows
   ========================================================================== */
.ur-home {
  max-width: var(--ur-content-width);
  margin: 0 auto;
  padding: var(--ur-space-7) var(--ur-space-4);
}

.ur-home__hero {
  margin-bottom: var(--ur-space-7);
  padding-bottom: var(--ur-space-6);
  border-bottom: 1px solid var(--ur-border);
}

.ur-home__hero--simple {
  padding-bottom: var(--ur-space-4);
  margin-bottom: var(--ur-space-5);
}

.ur-home__hero--simple .ur-home__hero-kicker {
  margin-bottom: 0;
}

.ur-home__hero-kicker {
  font-family: var(--ur-font-sans);
  font-size: var(--ur-fs-small);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ur-text-muted);
  margin-bottom: var(--ur-space-3);
}

.ur-home__hero-title {
  font-family: var(--ur-font-serif);
  font-size: 52px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ur-text);
  margin: 0 0 var(--ur-space-3);
}

.ur-home__hero-sub {
  font-size: 22px;
  line-height: 1.4;
  color: var(--ur-text-muted);
  max-width: 720px;
}

.ur-home__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--ur-space-6) var(--ur-space-5);
}

@media (max-width: 900px) {
  .ur-home__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .ur-home__grid { grid-template-columns: 1fr; }
}

.ur-card {
  display: flex;
  flex-direction: column;
  background: transparent;
  border: none;
  padding: 0;
}

.ur-card__image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: var(--ur-space-3);
  background: var(--ur-bg-soft);
}

.ur-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ur-ease);
}

.ur-card:hover .ur-card__image img {
  transform: scale(1.03);
}

.ur-card__category {
  font-family: var(--ur-font-sans);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ur-accent);
  margin-bottom: 6px;
}

.ur-card__title {
  font-family: var(--ur-font-serif);
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ur-text);
  margin: 0 0 var(--ur-space-2);
}

.ur-card__title a {
  color: inherit;
  text-decoration: none;
}

.ur-card__title a:hover {
  color: var(--ur-text);
  text-decoration: none;
}

.ur-card__excerpt {
  font-family: var(--ur-font-serif);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ur-text-muted);
  margin: 0 0 var(--ur-space-3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ur-card__meta {
  font-family: var(--ur-font-sans);
  font-size: var(--ur-fs-small);
  color: var(--ur-text-faint);
  display: flex;
  gap: var(--ur-space-2);
  align-items: center;
}

.ur-card__meta .dot {
  width: 3px;
  height: 3px;
  background: var(--ur-text-faint);
  border-radius: 50%;
}

/* ==========================================================================
   6. ARTICLE PAGE — pure Medium, single column, 680px
   ========================================================================== */
.ur-article {
  max-width: var(--ur-reading-width);
  margin: 0 auto;
  padding: var(--ur-space-7) var(--ur-space-4) var(--ur-space-8);
}

@media (max-width: 600px) {
  .ur-article {
    padding: var(--ur-space-5) var(--ur-space-3) var(--ur-space-7);
    font-size: var(--ur-fs-body-mobile);
  }
}

.ur-article__category {
  font-family: var(--ur-font-sans);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ur-accent);
  margin-bottom: var(--ur-space-3);
}

.ur-article__title {
  font-family: var(--ur-font-serif);
  font-size: var(--ur-fs-h1);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ur-text);
  margin: 0 0 var(--ur-space-3);
}

@media (max-width: 600px) {
  .ur-article__title { font-size: 32px; }
}

.ur-article__subtitle {
  font-family: var(--ur-font-serif);
  font-size: 22px;
  line-height: 1.35;
  font-weight: 400;
  color: var(--ur-text-muted);
  margin: 0 0 var(--ur-space-5);
}

/* Author strip — Medium-style avatar + meta */
.ur-author {
  display: flex;
  align-items: center;
  gap: var(--ur-space-3);
  padding: var(--ur-space-4) 0;
  border-top: 1px solid var(--ur-border-faint);
  border-bottom: 1px solid var(--ur-border-faint);
  margin-bottom: var(--ur-space-5);
}

.ur-author__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E8E8E8 0%, #F5F5F5 100%);
  overflow: hidden;
  flex-shrink: 0;
}

.ur-author__avatar img,
.ur-author__avatar .avatar {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.ur-author__meta {
  font-family: var(--ur-font-sans);
  font-size: 15px;
  line-height: 1.4;
}

.ur-author__name {
  color: var(--ur-text);
  font-weight: 600;
  font-size: 15px;
}

.ur-author__sub {
  color: var(--ur-text-faint);
  display: flex;
  gap: var(--ur-space-2);
  align-items: center;
  margin-top: 2px;
  font-size: 13px;
}

.ur-read-time::before {
  content: '·';
  margin-right: var(--ur-space-2);
}

/* Featured image — full bleed past the reading column */
.ur-article__featured {
  margin: 0 calc(-1 * (100vw - var(--ur-reading-width)) / 2) var(--ur-space-6);
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}

.ur-article__featured img {
  width: 100%;
  height: auto;
  display: block;
}

.ur-article__featured-caption {
  font-family: var(--ur-font-sans);
  font-size: 13px;
  color: var(--ur-text-faint);
  text-align: center;
  margin-top: var(--ur-space-2);
  padding: 0 var(--ur-space-3);
}

/* ==========================================================================
   7. ARTICLE BODY — the heart of the Medium feel
   ========================================================================== */
.ur-article__body,
.entry-content {
  font-family: var(--ur-font-serif);
  font-size: var(--ur-fs-body);
  line-height: var(--ur-lh-body);
  letter-spacing: var(--ur-ls-body);
  color: var(--ur-text);
}

@media (max-width: 600px) {
  .ur-article__body,
  .entry-content {
    font-size: var(--ur-fs-body-mobile);
  }
}

.ur-article__body p,
.entry-content p {
  margin: 0 0 var(--ur-space-4);
}

.ur-article__body h2,
.entry-content h2 {
  font-family: var(--ur-font-serif);
  font-size: var(--ur-fs-h2);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ur-text);
  margin: var(--ur-space-6) 0 var(--ur-space-3);
}

.ur-article__body h3,
.entry-content h3 {
  font-family: var(--ur-font-serif);
  font-size: var(--ur-fs-h3);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ur-text);
  margin: var(--ur-space-5) 0 var(--ur-space-3);
}

.ur-article__body a,
.entry-content a {
  color: var(--ur-text);
  text-decoration: underline;
  text-decoration-color: var(--ur-text-faint);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 0.15s var(--ur-ease);
}

.ur-article__body a:hover,
.entry-content a:hover {
  text-decoration-color: var(--ur-text);
}

/* Selection highlight — Medium's signature green */
.ur-article__body ::selection,
.entry-content ::selection {
  background: var(--ur-highlight);
  color: var(--ur-text);
}

/* Blockquote — Medium uses a large left border and italic serif */
.ur-article__body blockquote,
.entry-content blockquote {
  border-left: 3px solid var(--ur-text);
  padding: 4px 0 4px var(--ur-space-4);
  margin: var(--ur-space-5) 0;
  font-style: italic;
  font-size: 24px;
  line-height: 1.4;
  color: var(--ur-text);
}

/* Pull quote — large, centered, no border */
.ur-article__body .wp-block-pullquote,
.entry-content .wp-block-pullquote {
  border-top: 1px solid var(--ur-text);
  border-bottom: 1px solid var(--ur-text);
  border-left: none;
  padding: var(--ur-space-5) 0;
  margin: var(--ur-space-6) 0;
  text-align: center;
  font-style: normal;
  font-size: 28px;
  line-height: 1.3;
  font-weight: 400;
}

/* Inline code + code blocks */
.ur-article__body code,
.entry-content code {
  font-family: 'JetBrains Mono', Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--ur-bg-soft);
  padding: 2px 6px;
  border-radius: 3px;
  color: #C7254E;
}

.ur-article__body pre,
.entry-content pre {
  background: #F7F7F7;
  padding: var(--ur-space-4);
  border-radius: 4px;
  overflow-x: auto;
  margin: var(--ur-space-4) 0;
  font-size: 15px;
  line-height: 1.6;
}

.ur-article__body pre code,
.entry-content pre code {
  background: none;
  padding: 0;
  color: var(--ur-text);
}

/* Lists */
.ur-article__body ul,
.ur-article__body ol,
.entry-content ul,
.entry-content ol {
  margin: 0 0 var(--ur-space-4);
  padding-left: var(--ur-space-4);
}

.ur-article__body li,
.entry-content li {
  margin-bottom: var(--ur-space-2);
}

/* Images inside articles — break out slightly, center */
.ur-article__body img,
.entry-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: var(--ur-space-5) auto;
  border-radius: 2px;
}

.ur-article__body figure,
.entry-content figure {
  margin: var(--ur-space-5) 0;
}

.ur-article__body figcaption,
.entry-content figcaption {
  font-family: var(--ur-font-sans);
  font-size: 14px;
  color: var(--ur-text-faint);
  text-align: center;
  margin-top: var(--ur-space-2);
}

/* Tables — clean Medium-ish */
.ur-article__body table,
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--ur-space-4) 0;
  font-family: var(--ur-font-sans);
  font-size: 15px;
}

.ur-article__body th,
.entry-content th {
  text-align: left;
  font-weight: 600;
  padding: var(--ur-space-3) var(--ur-space-2);
  border-bottom: 2px solid var(--ur-text);
  background: var(--ur-bg-soft);
}

.ur-article__body td,
.entry-content td {
  padding: var(--ur-space-2);
  border-bottom: 1px solid var(--ur-border-faint);
}

/* Horizontal rule — Medium uses three dots */
.ur-article__body hr,
.entry-content hr {
  border: none;
  background: transparent !important;
  background-color: transparent !important;
  text-align: center;
  margin: var(--ur-space-6) 0;
  height: auto;
  padding: 0;
  display: block;
}

.ur-article__body hr::before,
.entry-content hr::before {
  content: '· · ·';
  font-size: 32px;
  letter-spacing: 0.5em;
  color: var(--ur-text-faint);
}

/* Drop cap option — add class "ur-drop" to first paragraph */
.ur-article__body p.ur-drop::first-letter,
.entry-content p.ur-drop::first-letter {
  font-family: var(--ur-font-serif);
  font-size: 5em;
  line-height: 0.85;
  float: left;
  margin: 8px 12px 0 0;
  font-weight: 700;
}

/* ==========================================================================
   8. READING PROGRESS BAR
   ========================================================================== */
.ur-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  z-index: 200;
  pointer-events: none;
}

.ur-progress__bar {
  height: 100%;
  width: 0%;
  background: var(--ur-accent);
  transition: width 0.1s linear;
}

/* ==========================================================================
   9. ARTICLE FOOTER — tags + author box + recommended
   ========================================================================== */
.ur-article__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ur-space-2);
  margin: var(--ur-space-6) 0;
}

.ur-article__tags a {
  font-family: var(--ur-font-sans);
  font-size: 13px;
  color: var(--ur-text-muted);
  background: var(--ur-bg-soft);
  padding: 6px 14px;
  border-radius: 100px;
  text-decoration: none;
  transition: background 0.15s var(--ur-ease);
}

.ur-article__tags a:hover {
  background: var(--ur-border-faint);
  color: var(--ur-text);
}

.ur-recommended {
  max-width: var(--ur-content-width);
  margin: 0 auto;
  padding: var(--ur-space-7) var(--ur-space-4);
  border-top: 1px solid var(--ur-border-faint);
}

.ur-recommended__title {
  font-family: var(--ur-font-sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--ur-text);
  margin: 0 0 var(--ur-space-5);
}

.ur-recommended__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ur-space-5);
}

@media (max-width: 700px) {
  .ur-recommended__grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   10. FOOTER
   ========================================================================== */
.ct-footer,
footer.site-footer {
  border-top: 1px solid var(--ur-border-faint);
  background: var(--ur-bg);
  padding: var(--ur-space-6) 0;
  font-family: var(--ur-font-sans);
  font-size: 13px;
  color: var(--ur-text-faint);
}

.ct-footer a,
footer.site-footer a {
  color: var(--ur-text-muted);
  text-decoration: none;
}

.ct-footer a:hover,
footer.site-footer a:hover {
  color: var(--ur-text);
}

/* ==========================================================================
   11. READING JOURNEY — floating pill + cross-site link indicator
   ========================================================================== */
.ur-pill {
  position: fixed;
  bottom: 84px;
  right: 24px;
  z-index: 300;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 340px;
  padding: 14px 16px 14px 14px;
  background: var(--ur-text);
  color: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.08);
  font-family: var(--ur-font-sans);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.28s var(--ur-ease), transform 0.28s var(--ur-ease);
  will-change: opacity, transform;
}

.ur-pill--visible {
  opacity: 1;
  transform: translateY(0);
}

.ur-pill--hidden {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.ur-pill--resume {
  cursor: pointer;
  transition: opacity 0.28s var(--ur-ease), transform 0.28s var(--ur-ease), box-shadow 0.2s var(--ur-ease);
}

.ur-pill--resume:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.24), 0 4px 10px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.ur-pill__icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  flex-shrink: 0;
  color: var(--ur-accent);
}

.ur-pill__icon svg {
  width: 18px;
  height: 18px;
}

.ur-pill__body {
  flex: 1;
  min-width: 0;
}

.ur-pill__label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 2px;
}

.ur-pill__title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  color: #FFFFFF;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ur-pill__sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.ur-pill__close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 20px;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
  transition: color 0.15s var(--ur-ease);
  flex-shrink: 0;
}

.ur-pill__close:hover {
  color: #FFFFFF;
}

@media (max-width: 600px) {
  .ur-pill {
    bottom: 16px;
    right: 16px;
    left: 16px;
    max-width: none;
  }
}

/* Small arrow on cross-site links so users know they open in a new tab */
.ur-article__body a.ur-xlink::after,
.entry-content a.ur-xlink::after {
  content: ' ↗';
  font-size: 0.85em;
  color: var(--ur-text-faint);
  margin-left: 2px;
}

/* ==========================================================================
   12. PAGINATION — numbered pills
   ========================================================================== */
.ur-pagination {
  margin-top: var(--ur-space-7);
  display: flex;
  justify-content: center;
  gap: 6px;
  font-family: var(--ur-font-sans);
  font-size: 14px;
}

.ur-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 100px;
  color: var(--ur-text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.15s var(--ur-ease);
}

.ur-pagination .page-numbers:hover {
  background: var(--ur-bg-soft);
  color: var(--ur-text);
}

.ur-pagination .page-numbers.current {
  background: var(--ur-text);
  color: #FFFFFF;
}

.ur-pagination .page-numbers.dots {
  background: none;
}

.ur-pagination .prev,
.ur-pagination .next {
  font-weight: 500;
}

/* ==========================================================================
   13. FOOTER — minimal Medium-style
   ========================================================================== */
.ur-footer {
  border-top: 1px solid var(--ur-border-faint);
  background: var(--ur-bg);
  padding: var(--ur-space-7) var(--ur-space-4);
  font-family: var(--ur-font-sans);
  margin-top: var(--ur-space-8);
}

.ur-footer__inner {
  max-width: var(--ur-content-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: var(--ur-space-5);
  align-items: center;
}

@media (max-width: 768px) {
  .ur-footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--ur-space-4);
  }
}

.ur-footer__logo {
  font-family: var(--ur-font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--ur-text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.ur-footer__tagline {
  font-size: 13px;
  color: var(--ur-text-faint);
  margin: 4px 0 0;
}

.ur-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ur-space-4);
  justify-content: center;
}

.ur-footer__nav a {
  color: var(--ur-text-muted);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.15s var(--ur-ease);
}

.ur-footer__nav a:hover {
  color: var(--ur-text);
}

.ur-footer__legal {
  font-size: 13px;
  color: var(--ur-text-faint);
  text-align: right;
}

@media (max-width: 768px) {
  .ur-footer__legal { text-align: center; }
}

/* Hide Blocksy's default footer when our footer.php is in use — defensive */
.ct-footer:not(.ur-footer) { display: none !important; }

/* ==========================================================================
   14. SEARCH OVERLAY
   ========================================================================== */
.ur-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ur-ease);
}

.ur-search-overlay--open {
  opacity: 1;
  pointer-events: auto;
}

.ur-search-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(36, 36, 36, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.ur-search-overlay__panel {
  position: relative;
  width: min(640px, 92vw);
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transform: translateY(-8px);
  transition: transform 0.2s var(--ur-ease);
}

.ur-search-overlay--open .ur-search-overlay__panel {
  transform: translateY(0);
}

.ur-search-overlay__form {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--ur-border-faint);
}

.ur-search-overlay__icon {
  width: 22px;
  height: 22px;
  color: var(--ur-text-muted);
  flex-shrink: 0;
}

.ur-search-overlay__input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--ur-font-serif);
  font-size: 20px;
  color: var(--ur-text);
  background: transparent;
}

.ur-search-overlay__input::placeholder {
  color: var(--ur-text-faint);
}

.ur-search-overlay__close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--ur-text-faint);
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.15s var(--ur-ease);
}

.ur-search-overlay__close:hover {
  color: var(--ur-text);
}

.ur-search-overlay__hint {
  padding: 12px 20px;
  font-family: var(--ur-font-sans);
  font-size: 12px;
  color: var(--ur-text-faint);
  background: var(--ur-bg-soft);
}

.ur-search-overlay__hint kbd {
  background: #FFFFFF;
  border: 1px solid var(--ur-border);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: var(--ur-font-sans);
  font-size: 11px;
  color: var(--ur-text);
  margin: 0 2px;
}

/* ==========================================================================
   15. EMPTY STATE
   ========================================================================== */
.ur-empty {
  text-align: center;
  padding: var(--ur-space-7) var(--ur-space-4);
  color: var(--ur-text-muted);
  font-family: var(--ur-font-serif);
  font-size: 18px;
}

/* ==========================================================================
   16. UTILITIES
   ========================================================================== */
.ur-hide-mobile { }
.ur-hide-desktop { display: none; }
@media (max-width: 768px) {
  .ur-hide-mobile { display: none; }
  .ur-hide-desktop { display: block; }
}

/* Remove Blocksy's card shadows / borders on post cards site-wide */
.ct-post-card,
article.type-post {
  box-shadow: none !important;
  border: none !important;
  background: transparent !important;
}

/* ==========================================================================
   v1.3 — TOP BAR (Medium-style sticky)
   ========================================================================== */
body.has-topbar { padding-top: 56px; }

.ur-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--ur-border-faint);
  z-index: 200;
  display: flex;
  flex-direction: column;
}

.ur-topbar__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  height: 56px;
  max-width: none;
}

.ur-topbar__hamburger {
  display: none;
  background: none;
  border: none;
  padding: 6px;
  color: var(--ur-text);
  cursor: pointer;
  border-radius: 6px;
}
.ur-topbar__hamburger svg { width: 22px; height: 22px; }

.ur-topbar__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.ur-topbar__logo img { height: 28px; width: auto; display: block; }
.ur-topbar__logo span {
  font-family: var(--ur-font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--ur-text);
  letter-spacing: -0.01em;
}

.ur-topbar__search {
  flex: 0 1 360px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--ur-bg-soft);
  border-radius: 100px;
  transition: background 0.15s var(--ur-ease);
}
.ur-topbar__search:focus-within { background: #F0F0F0; }
.ur-topbar__search-icon {
  width: 18px;
  height: 18px;
  color: var(--ur-text-faint);
  flex-shrink: 0;
}
.ur-topbar__search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--ur-font-sans);
  font-size: 14px;
  color: var(--ur-text);
  min-width: 0;
}
.ur-topbar__search-input::placeholder { color: var(--ur-text-faint); }

.ur-topbar__context {
  flex: 1;
  display: none;
  align-items: center;
  min-width: 0;
}
.ur-topbar__context-title {
  font-family: var(--ur-font-serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--ur-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* When article context is active, hide the search and show the title */
.ur-topbar--context .ur-topbar__search,
.ur-topbar--context .ur-topbar__logo span {
  display: none;
}
.ur-topbar--context .ur-topbar__context {
  display: flex;
}

.ur-topbar__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.ur-topbar__action {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--ur-text-muted);
  border-radius: 50%;
  text-decoration: none;
  transition: background 0.15s var(--ur-ease), color 0.15s var(--ur-ease);
}
.ur-topbar__action:hover {
  background: var(--ur-bg-soft);
  color: var(--ur-text);
}
.ur-topbar__action svg { width: 22px; height: 22px; }

.ur-topbar__action--mobile-only { display: none; }

.ur-topbar__badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--ur-accent);
  color: #FFFFFF;
  font-family: var(--ur-font-sans);
  font-size: 10px;
  font-weight: 600;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.ur-topbar__badge--hidden { display: none; }

/* Move the existing reading progress bar inside the top bar */
.ur-topbar .ur-progress {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
}

/* Mobile */
@media (max-width: 768px) {
  .ur-topbar__hamburger { display: flex; }
  .ur-topbar__search { display: none; }
  .ur-topbar__action--mobile-only { display: flex; }
  .ur-topbar__logo span { font-size: 20px; }
  .ur-topbar__inner { padding: 0 12px; gap: 8px; }
}

/* The standalone progress bar element (legacy) — hide since it's in the topbar now */
body > .ur-progress { display: none; }


/* ==========================================================================
   v1.3 — SAVE FOR LATER (ribbon button)
   ========================================================================== */
.ur-save {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--ur-border);
  border-radius: 100px;
  font-family: var(--ur-font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ur-text-muted);
  cursor: pointer;
  transition: all 0.15s var(--ur-ease);
  line-height: 1;
}
.ur-save:hover {
  border-color: var(--ur-text);
  color: var(--ur-text);
}
.ur-save__icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
}
.ur-save__icon svg { width: 100%; height: 100%; }
.ur-save--saved {
  background: var(--ur-text);
  border-color: var(--ur-text);
  color: #FFFFFF;
}
.ur-save--saved:hover {
  background: #000000;
  color: #FFFFFF;
}

/* In the article author strip — pushed right */
.ur-author__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Mini version on cards (icon only, no border, less space) */
.ur-save--mini {
  margin-left: auto;
  padding: 4px;
  border: none;
  background: transparent;
  color: var(--ur-text-faint);
}
.ur-save--mini:hover { color: var(--ur-text); background: var(--ur-bg-soft); }
.ur-save--mini .ur-save__label { display: none; }
.ur-save--mini.ur-save--saved {
  background: transparent;
  color: var(--ur-text);
}
.ur-card__save { margin-left: auto; }
.ur-card__meta { align-items: center; }


/* ==========================================================================
   v1.3 — SAVE TOAST (small confirmation)
   ========================================================================== */
.ur-toast {
  position: fixed;
  bottom: 90px;
  right: 24px;
  z-index: 350;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--ur-text);
  color: #FFFFFF;
  border-radius: 8px;
  font-family: var(--ur-font-sans);
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s var(--ur-ease), transform 0.2s var(--ur-ease);
  max-width: 360px;
}
.ur-toast--visible { opacity: 1; transform: translateY(0); }
.ur-toast svg { width: 18px; height: 18px; flex-shrink: 0; }
.ur-toast__link {
  color: #FFFFFF;
  text-decoration: underline;
  margin-left: 4px;
  font-weight: 500;
}

@media (max-width: 600px) {
  .ur-toast { left: 16px; right: 16px; bottom: 80px; max-width: none; }
}


/* ==========================================================================
   v1.3 — FIRST-SAVE BANNER (gentle sign-up nudge)
   ========================================================================== */
.ur-first-save {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 24px);
  z-index: 320;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: #FFFFFF;
  border: 1px solid var(--ur-border);
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
  font-family: var(--ur-font-sans);
  max-width: 480px;
  width: calc(100vw - 32px);
  opacity: 0;
  transition: opacity 0.3s var(--ur-ease), transform 0.3s var(--ur-ease);
}
.ur-first-save--visible { opacity: 1; transform: translate(-50%, 0); }
.ur-first-save__icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ur-bg-soft);
  border-radius: 8px;
  color: var(--ur-accent);
  flex-shrink: 0;
}
.ur-first-save__icon svg { width: 18px; height: 18px; }
.ur-first-save__body { flex: 1; min-width: 0; }
.ur-first-save__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ur-text);
  margin-bottom: 2px;
}
.ur-first-save__sub {
  font-size: 13px;
  color: var(--ur-text-muted);
  line-height: 1.4;
}
.ur-first-save__cta {
  background: var(--ur-text);
  color: #FFFFFF;
  border: none;
  padding: 8px 16px;
  border-radius: 100px;
  font-family: var(--ur-font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s var(--ur-ease);
}
.ur-first-save__cta:hover { background: #000000; }
.ur-first-save__close {
  background: none;
  border: none;
  color: var(--ur-text-faint);
  font-size: 22px;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
  flex-shrink: 0;
}
.ur-first-save__close:hover { color: var(--ur-text); }

@media (max-width: 600px) {
  .ur-first-save { flex-wrap: wrap; }
  .ur-first-save__cta { width: 100%; padding: 10px; margin-top: 4px; }
}


/* ==========================================================================
   v1.3 — AUTH MODAL (Medium-style sign-up shell)
   ========================================================================== */
.ur-auth {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ur-ease);
}
.ur-auth--open { opacity: 1; pointer-events: auto; }
.ur-auth__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(36, 36, 36, 0.6);
}
.ur-auth__panel {
  position: relative;
  width: min(540px, 92vw);
  background: #FFFFFF;
  border-radius: 16px;
  padding: 56px 48px 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  transform: translateY(-8px);
  transition: transform 0.2s var(--ur-ease);
}
.ur-auth--open .ur-auth__panel { transform: translateY(0); }
.ur-auth__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--ur-text-faint);
  cursor: pointer;
  line-height: 1;
  padding: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s, color 0.15s;
}
.ur-auth__close:hover { background: var(--ur-bg-soft); color: var(--ur-text); }

.ur-auth__title {
  font-family: var(--ur-font-serif);
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 32px;
  letter-spacing: -0.02em;
  color: var(--ur-text);
}
.ur-auth__title-signin { display: none; }
.ur-auth--signin .ur-auth__title-signup { display: none; }
.ur-auth--signin .ur-auth__title-signin { display: inline; }

.ur-auth__buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.ur-auth__btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  background: transparent;
  border: 1px solid var(--ur-text);
  border-radius: 100px;
  font-family: var(--ur-font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--ur-text);
  cursor: pointer;
  transition: background 0.15s var(--ur-ease);
  width: 100%;
}
.ur-auth__btn:hover { background: var(--ur-bg-soft); }
.ur-auth__btn svg { flex-shrink: 0; }
.ur-auth__btn-signup,
.ur-auth__btn-signin {
  flex: 1;
  text-align: center;
  margin-right: 34px; /* offsets icon to keep text centered */
}
.ur-auth__btn-signin { display: none; }
.ur-auth--signin .ur-auth__btn-signup { display: none; }
.ur-auth--signin .ur-auth__btn-signin { display: inline; }

.ur-auth__skip {
  display: block;
  width: 100%;
  background: none;
  border: none;
  padding: 12px;
  font-family: var(--ur-font-sans);
  font-size: 13px;
  color: var(--ur-text-muted);
  text-decoration: underline;
  cursor: pointer;
  margin-bottom: 16px;
  transition: color 0.15s;
}
.ur-auth__skip:hover { color: var(--ur-text); }

.ur-auth__notice {
  background: #FFF8E1;
  border: 1px solid #FFE082;
  border-radius: 8px;
  padding: 10px 14px;
  font-family: var(--ur-font-sans);
  font-size: 13px;
  color: #6B5500;
  text-align: center;
  margin-bottom: 16px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.2s, max-height 0.2s, margin 0.2s, padding 0.2s;
  padding-top: 0;
  padding-bottom: 0;
}
.ur-auth__notice--show {
  opacity: 1;
  max-height: 80px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.ur-auth__toggle {
  text-align: center;
  font-family: var(--ur-font-sans);
  font-size: 14px;
  color: var(--ur-text-muted);
  margin-bottom: 16px;
}
.ur-auth__toggle a {
  color: var(--ur-text);
  font-weight: 500;
  text-decoration: underline;
}
.ur-auth__toggle-signin { display: none; }
.ur-auth--signin .ur-auth__toggle-signup { display: none; }
.ur-auth--signin .ur-auth__toggle-signin { display: inline; }

.ur-auth__legal {
  font-family: var(--ur-font-sans);
  font-size: 12px;
  color: var(--ur-text-faint);
  text-align: center;
  line-height: 1.5;
  margin: 0;
}
.ur-auth__legal a {
  color: var(--ur-text-muted);
  text-decoration: underline;
}

@media (max-width: 600px) {
  .ur-auth__panel { padding: 48px 24px 24px; border-radius: 12px; }
  .ur-auth__title { font-size: 28px; }
}


/* ==========================================================================
   v1.3 — SCROLL TO TOP (bottom-left)
   ========================================================================== */
.ur-scrolltop {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 250;
  width: 44px;
  height: 44px;
  background: var(--ur-text);
  color: #FFFFFF;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.25s var(--ur-ease), transform 0.25s var(--ur-ease), background 0.15s;
}
.ur-scrolltop:hover { background: #000000; }
.ur-scrolltop--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.ur-scrolltop svg { width: 20px; height: 20px; }

/* On mobile, push it slightly so it doesn't overlap the rail (which is hidden anyway) */
@media (max-width: 600px) {
  .ur-scrolltop { right: 16px; bottom: 16px; width: 40px; height: 40px; }
  .ur-scrolltop svg { width: 18px; height: 18px; }
}


/* ==========================================================================
   v1.3 — SAVED LIBRARY PAGE
   ========================================================================== */
.ur-saved {
  margin-top: var(--ur-space-5);
}

.ur-saved-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ur-space-4);
}

.ur-saved-card {
  position: relative;
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: var(--ur-space-4);
  padding: var(--ur-space-4) 0;
  border-bottom: 1px solid var(--ur-border-faint);
  align-items: start;
}
.ur-saved-card:last-child { border-bottom: none; }

.ur-saved-card__image {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 4px;
  background: var(--ur-bg-soft);
}
.ur-saved-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ur-saved-card__body { min-width: 0; }
.ur-saved-card__category {
  font-family: var(--ur-font-sans);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ur-accent);
  margin-bottom: 6px;
}
.ur-saved-card__title {
  font-family: var(--ur-font-serif);
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 var(--ur-space-2);
  letter-spacing: -0.01em;
}
.ur-saved-card__title a {
  color: var(--ur-text);
  text-decoration: none;
}
.ur-saved-card__title a:hover { text-decoration: underline; }
.ur-saved-card__excerpt {
  font-family: var(--ur-font-serif);
  font-size: 16px;
  color: var(--ur-text-muted);
  line-height: 1.5;
  margin: 0 0 var(--ur-space-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ur-saved-card__meta {
  font-family: var(--ur-font-sans);
  font-size: 13px;
  color: var(--ur-text-faint);
  display: flex;
  gap: 6px;
  align-items: center;
}
.ur-saved-card__meta .dot {
  width: 3px;
  height: 3px;
  background: var(--ur-text-faint);
  border-radius: 50%;
}
.ur-saved-card__remove {
  background: none;
  border: none;
  color: var(--ur-text-faint);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.ur-saved-card__remove:hover {
  background: var(--ur-bg-soft);
  color: var(--ur-text);
}
.ur-saved-card__remove svg { width: 18px; height: 18px; }

@media (max-width: 700px) {
  .ur-saved-card { grid-template-columns: 100px 1fr auto; gap: var(--ur-space-3); }
  .ur-saved-card__title { font-size: 17px; }
  .ur-saved-card__excerpt { font-size: 14px; }
}

.ur-saved-empty {
  text-align: center;
  padding: var(--ur-space-8) var(--ur-space-4);
  font-family: var(--ur-font-sans);
}
.ur-saved-empty svg {
  width: 48px;
  height: 48px;
  color: var(--ur-text-faint);
  margin-bottom: var(--ur-space-3);
}
.ur-saved-empty h2 {
  font-family: var(--ur-font-serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--ur-text);
  margin: 0 0 var(--ur-space-2);
}
.ur-saved-empty p {
  color: var(--ur-text-muted);
  font-size: 15px;
  max-width: 420px;
  margin: 0 auto var(--ur-space-4);
  line-height: 1.5;
}
.ur-saved-empty__cta {
  display: inline-block;
  padding: 10px 20px;
  background: var(--ur-text);
  color: #FFFFFF;
  border-radius: 100px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s;
}
.ur-saved-empty__cta:hover { background: #000000; color: #FFFFFF; }

/* ==========================================================================
   v1.3.1 PATCH — WP admin bar offset + topbar layout polish
   ========================================================================== */

/* When the WP admin bar is visible (logged-in admins), push everything down */
body.admin-bar .ur-topbar {
  top: 32px;
}
body.admin-bar.has-topbar {
  padding-top: 88px; /* 32px admin bar + 56px topbar */
}
body.admin-bar .ur-rail {
  top: 88px;
  height: calc(100vh - 88px);
}

@media (max-width: 782px) {
  /* WP shrinks admin bar to 46px on small screens */
  body.admin-bar .ur-topbar { top: 46px; }
  body.admin-bar.has-topbar { padding-top: 102px; }
  body.admin-bar .ur-rail { top: 102px; height: calc(100vh - 102px); }
}

/* Topbar layout fix — give logo proper space, prevent overlap */
.ur-topbar__inner {
  gap: 12px;
}
.ur-topbar__logo {
  min-width: 88px;
  margin-right: 4px;
}
.ur-topbar__search {
  flex: 1 1 auto;
  max-width: 360px;
  min-width: 0;
}

/* On small/medium widths where logo + search are tight, hide the wordmark on logo */
@media (max-width: 920px) {
  .ur-topbar__logo span { display: none; }
  .ur-topbar__logo img { height: 28px; }
}

/* Make sure topbar visually layers above the rail */
.ur-topbar { z-index: 200; }
.ur-rail { z-index: 90; }

/* ==========================================================================
   v1.3.2 PATCH — logo sizing + friendly 404
   ========================================================================== */

/* Logo: 32px matches search input height (36px) with breathing room */
.ur-topbar__logo img {
  height: 32px;
  width: auto;
  display: block;
}
.ur-topbar__logo {
  min-width: auto;
  padding: 4px 0;
}

/* If the wordmark image is wider than its container, allow it */
.ur-topbar__logo {
  flex-shrink: 0;
}

/* Friendly 404 page — Medium style */
.ur-404 {
  max-width: 540px;
  margin: 0 auto;
  padding: var(--ur-space-8) var(--ur-space-4);
  text-align: center;
  font-family: var(--ur-font-sans);
}
.ur-404__art {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--ur-space-4);
  color: var(--ur-text-faint);
}
.ur-404__art svg { width: 100%; height: 100%; }
.ur-404__title {
  font-family: var(--ur-font-serif);
  font-size: 36px;
  font-weight: 700;
  color: var(--ur-text);
  margin: 0 0 var(--ur-space-3);
  letter-spacing: -0.02em;
}
.ur-404__sub {
  font-size: 17px;
  color: var(--ur-text-muted);
  line-height: 1.5;
  margin: 0 0 var(--ur-space-5);
}
.ur-404__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.ur-404__btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s var(--ur-ease);
}
.ur-404__btn--primary {
  background: var(--ur-text);
  color: #FFFFFF;
}
.ur-404__btn--primary:hover { background: #000000; color: #FFFFFF; }
.ur-404__btn--ghost {
  background: transparent;
  color: var(--ur-text);
  border: 1px solid var(--ur-border);
}
.ur-404__btn--ghost:hover { border-color: var(--ur-text); }

/* ==========================================================================
   v1.3.6 PATCH — recommended-section card sizing (Medium proportions)
   ========================================================================== */

/* Constrain recommended grid to a narrower max width so cards aren't too wide */
.ur-recommended {
  max-width: 760px;
}

/* Recommended cards: tighter image ratio, capped height, smaller title */
.ur-recommended .ur-card__image {
  aspect-ratio: 16 / 9;
  max-height: 220px;
  margin-bottom: 14px;
}

.ur-recommended .ur-card__title {
  font-size: 18px;
  line-height: 1.25;
  margin-bottom: 6px;
}

.ur-recommended .ur-card__excerpt {
  font-size: 14px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  margin-bottom: 8px;
}

.ur-recommended .ur-card__category {
  font-size: 11px;
  margin-bottom: 4px;
}

.ur-recommended .ur-card__meta {
  font-size: 12px;
}

/* Tighter gap between the two recommended cards */
.ur-recommended__grid {
  gap: 28px;
}

@media (max-width: 700px) {
  .ur-recommended .ur-card__image { max-height: 180px; }
}

/* ==========================================================================
   v1.3.7 PATCH — secondary recommended section spacing
   ========================================================================== */

/* Second recommended section sits directly under the first, no extra border */
.ur-recommended--secondary {
  border-top: none;
  padding-top: 0;
}

/* ==========================================================================
   v1.3.8 PATCH — tighten top space on homepage and archives
   ========================================================================== */

/* Reduce the empty band above "LATEST FROM UTILRA" hero kicker */
.ur-home {
  padding-top: var(--ur-space-5);  /* was --ur-space-7 (64px → 32px) */
}

/* Reading column on article pages — also tighten */
.ur-article {
  padding-top: var(--ur-space-5);  /* was --ur-space-7 */
}

/* Force flex layout on top row — in case a parent rule is overriding */
.ur-author-bio .ur-author-bio__top {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: var(--ur-space-3) !important;
  margin-bottom: var(--ur-space-4) !important;
}
 
/* Force name to BLACK, override any inherited blue from theme */
.ur-author-bio .ur-author-bio__name,
.ur-author-bio .ur-author-bio__name a,
.ur-author-bio h3.ur-author-bio__name,
.ur-author-bio h3.ur-author-bio__name a {
  color: var(--ur-text) !important;
  text-decoration: none !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  font-family: var(--ur-font-serif) !important;
}
 
.ur-author-bio .ur-author-bio__name a:hover {
  color: var(--ur-text) !important;
  text-decoration: underline !important;
}
 
/* Force the CTA button to render as a pill, not inherit link styles */
.ur-author-bio .ur-author-bio__cta,
.ur-author-bio a.ur-author-bio__cta {
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 8px 16px !important;
  border: 1px solid var(--ur-text) !important;
  border-radius: 100px !important;
  font-family: var(--ur-font-sans) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: var(--ur-text) !important;
  text-decoration: none !important;
  background: transparent !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  width: auto !important;
  height: auto !important;
}
 
.ur-author-bio .ur-author-bio__cta:hover,
.ur-author-bio a.ur-author-bio__cta:hover {
  background: var(--ur-text) !important;
  color: #FFFFFF !important;
}
 
/* Clamp the SVG inside the CTA — prevents it from filling the screen */
.ur-author-bio .ur-author-bio__cta svg,
.ur-author-bio a.ur-author-bio__cta svg {
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
  vertical-align: middle !important;
}
 
/* Avatar — ensure size is respected */
.ur-author-bio .ur-author-bio__avatar {
  flex-shrink: 0 !important;
  width: 56px !important;
  height: 56px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
}
 
/* Identity — flex child, don't stretch too wide */
.ur-author-bio .ur-author-bio__identity {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}
 
/* Kicker — ensure block display */
.ur-author-bio .ur-author-bio__kicker {
  display: block !important;
  font-family: var(--ur-font-sans) !important;
  font-size: 13px !important;
  color: var(--ur-text-faint) !important;
  margin-bottom: 2px !important;
}
}
