body.theme-hikaya {
  background-color: #FDFBF7;
}

.theme-hikaya .site-header {
  background-color: #FFFDF9;
  border-block-end: 2px solid #EAE3D5;
}

.theme-hikaya .button:not(.button-secondary) {
  background-color: #842339;
  border-color: #842339;
  color: #FFFFFF;
}

.theme-hikaya :where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Reading Progress Bar */
.hikaya-reading-bar {
  position: fixed;
  inset-block-start: 0;
  inset-inline-start: 0;
  inline-size: 0%;
  block-size: 3px;
  background: linear-gradient(90deg, #842339, #C4841D);
  z-index: 9999;
  transition: inline-size 0.1s ease;
}

/* Story Narrative Cards */
.theme-hikaya .hikaya-story-card {
  background-color: #FFFFFF;
  border: 1px solid #EAE3D5;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-block-end: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.theme-hikaya .hikaya-story-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #D3C9B8;
}

.theme-hikaya .hikaya-story-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.4;
}

.theme-hikaya .hikaya-story-title a {
  color: #1F1D1A;
  text-decoration: none;
}

.theme-hikaya .hikaya-story-title a:hover {
  color: #842339;
}

.theme-hikaya .hikaya-story-excerpt {
  color: #635B52;
  font-size: 0.96875rem;
  line-height: 1.75;
  margin: 0 0 1rem 0;
}

.theme-hikaya .hikaya-story-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: #8A8175;
}

.theme-hikaya .hikaya-reading-time {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background-color: #F7F3EB;
  color: #842339;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
}

.theme-hikaya .hikaya-quote-box {
  margin-block: 1.5rem;
  padding: 1.25rem 1.5rem;
  background-color: #F7F3EB;
  border-inline-start: 4px solid #842339;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: #1F1D1A;
  font-size: 1.0625rem;
  line-height: 1.8;
}

.theme-hikaya .hikaya-reader-container {
  max-inline-size: 48rem;
  margin-inline: auto;
}

/* Home feed, tabs and thread chrome. Without these the tabs render as bare
   inline links and the cards lose their separation. Logical properties only,
   so one stylesheet serves both RTL and LTR. */
.theme-hikaya .hikaya-hero { padding-block: 2.5rem 1.25rem; text-align: center; border-block-end: 1px solid var(--color-border); background: var(--color-surface-soft); }
.theme-hikaya .hikaya-hero-inner { max-inline-size: 48rem; margin-inline: auto; }
.theme-hikaya .hikaya-hero h1 { margin-block: .25rem .75rem; font-size: clamp(1.8rem, 4vw, 2.5rem); }
.theme-hikaya .hikaya-hero-lede { color: var(--color-muted); line-height: 1.75; }

.theme-hikaya .hikaya-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.5rem .5rem; }
.theme-hikaya .hikaya-toolbar-title { margin: 0; font-size: 1.35rem; }
.theme-hikaya .hikaya-actions { display: flex; gap: .5rem; }

.theme-hikaya .hikaya-feed-tabs { display: flex; flex-wrap: wrap; gap: .4rem; padding-block: .5rem 1.25rem; border-block-end: 1px solid var(--color-border); }
.theme-hikaya .hikaya-feed-tabs a { padding: .5rem .9rem; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface); color: var(--color-muted); font-size: .85rem; font-weight: 700; text-decoration: none; white-space: nowrap; transition: border-color .15s ease, color .15s ease; }
.theme-hikaya .hikaya-feed-tabs a:hover { border-color: var(--color-primary); color: var(--color-primary); }
.theme-hikaya .hikaya-feed-tabs a[aria-current="page"] { border-color: var(--color-primary); background: var(--color-primary); color: #fff; }

.theme-hikaya .hikaya-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: start; padding-block: 1.5rem 3rem; }
.theme-hikaya .hikaya-grid.has-hikaya-sidebar { grid-template-columns: minmax(0, 1fr) minmax(15rem, 19rem); }
.theme-hikaya .hikaya-feed { display: grid; gap: 2rem; min-inline-size: 0; }
.theme-hikaya .hikaya-sidebar { position: sticky; inset-block-start: 5.5rem; display: grid; gap: 1rem; }

.theme-hikaya .hikaya-story-kicker { display: flex; align-items: center; gap: .5rem; margin-block-end: .4rem; }
.theme-hikaya .hikaya-type { font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--color-primary); }
.theme-hikaya .hikaya-story-card.is-discussion .hikaya-type { color: var(--color-secondary); }

.theme-hikaya .hikaya-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-block-start: .75rem; }
.theme-hikaya .hikaya-tags a { padding: .2rem .5rem; border-radius: .4rem; background: var(--color-surface-soft); color: var(--color-primary); font-size: .72rem; font-weight: 700; text-decoration: none; }

.theme-hikaya .hikaya-reader-head { margin-block-end: 2rem; padding-block-end: 1.5rem; border-block-end: 1px solid var(--color-border); }
.theme-hikaya .hikaya-reader-kicker { display: flex; align-items: center; gap: .75rem; margin-block-end: .75rem; font-size: .875rem; }
.theme-hikaya .hikaya-reader-head h1 { margin-block: 0 1rem; font-size: clamp(1.7rem, 4vw, 2.25rem); line-height: 1.35; }
.theme-hikaya .hikaya-reader-byline { display: flex; align-items: center; gap: .6rem; color: var(--color-muted); font-size: .875rem; }
.theme-hikaya .hikaya-reader-body { font-size: 1.125rem; line-height: 1.85; margin-block-end: 2rem; }

.theme-hikaya .hikaya-question-actions,
.theme-hikaya .hikaya-answer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-block: 1rem; }
.theme-hikaya .hikaya-answers { margin-block-start: 2.5rem; padding-block-start: 2rem; border-block-start: 2px solid var(--color-border); }
.theme-hikaya .hikaya-answer { padding: 1.5rem; margin-block-end: 1.5rem; border: 1px solid var(--card-border); border-radius: var(--card-radius); background: var(--card-bg); box-shadow: var(--card-shadow); }
.theme-hikaya .hikaya-answer.is-best { border-color: var(--color-primary); }
.theme-hikaya .hikaya-answer-byline { display: inline-flex; align-items: center; gap: .5rem; margin-inline-start: auto; color: var(--color-muted); font-size: .8125rem; }

.theme-hikaya .hikaya-comments { margin-block-start: 1rem; padding-inline-start: 1rem; border-inline-start: 2px solid var(--color-border); display: grid; gap: .75rem; }
.theme-hikaya .hikaya-comment { font-size: .9rem; color: var(--color-text); }
.theme-hikaya .hikaya-comment-meta { display: block; margin-block-start: .25rem; color: var(--color-muted); font-size: .75rem; }
.theme-hikaya .hikaya-comment-form { display: grid; gap: .5rem; margin-block-start: 1rem; }
.theme-hikaya .hikaya-composer { margin-block-start: 2.5rem; padding-block-start: 2rem; border-block-start: 2px solid var(--color-border); }

@media (max-width: 900px) {
  .theme-hikaya .hikaya-grid.has-hikaya-sidebar { grid-template-columns: 1fr; }
  .theme-hikaya .hikaya-sidebar { position: static; }
  .theme-hikaya .hikaya-toolbar { align-items: stretch; flex-direction: column; }
}
@media (max-width: 620px) {
  .theme-hikaya .hikaya-feed-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .theme-hikaya .hikaya-answer { padding: 1rem; }
  .theme-hikaya .hikaya-answer-byline { margin-inline-start: 0; }
}
