/* ============================================================================
   JNVKAA Stories: reading, list, writing and moderation (docs/specs/stories.md f).
   MOBILE-FIRST. Class selectors only (no inline styles anywhere in the story pages).
   Uses the tokens from site.css (teal / cream / ink, Inter + Noto Sans Telugu).
   - Story cards are the shared tile (.pg-card.pg-tile from console.css): same radius, padding,
     16:9 media and meta row as the event and album cards. Grid: 1 > 2 > 3 > 4 > 5 columns.
   - The reading page keeps the story in a .measure column inside the fluid shell; the cover and
     the related stories break out wider. Telugu text gets a taller line height.
   ========================================================================== */
.st-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.st-scope :focus-visible { outline: 2px solid var(--teal-700); outline-offset: 2px; border-radius: 6px; }
.st-scope [hidden] { display: none !important; }
.st-muted { color: var(--muted); }
.st-flash { margin: 0 0 var(--sp-4); }
.st-row-gap { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.st-mt { margin-top: var(--sp-4); }
.st-mt-lg { margin-top: var(--sp-8); }
.st-nowrap { white-space: nowrap; }

/* ---------- type chip, status badge, lock --------------------------------------------------- */
.st-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: var(--cream);
  color: var(--teal-700); font-family: var(--font-body); font-weight: 600; font-size: var(--fs-2xs); line-height: 1.35; white-space: nowrap; }
.st-chip i { font-size: .95em; }
.st-badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: var(--fs-2xs);
  font-family: var(--font-body); font-weight: 600; border: 1px solid transparent; white-space: nowrap; line-height: 1.5; }
.st-badge-draft { background: #eef1f2; color: #33464a; border-color: #d5dde0; }
.st-badge-review { background: #e6f4f5; color: var(--teal-700); border-color: #b7dfe1; }
.st-badge-warn { background: #fff4e0; color: #7a4a00; border-color: #f3d39b; }
.st-badge-ok { background: #e7f6ec; color: #1d6b3a; border-color: #b9e2c7; }
.st-badge-bad { background: #fdecec; color: #8f1d1d; border-color: #f2c2c2; }
.st-lock { color: var(--teal-700); }

/* ---------- list page -------------------------------------------------------------------------- */
.section.section-fluid.st-page { padding-block: var(--sp-6) var(--sp-8); }
@media (min-width: 1024px) { .section.section-fluid.st-page { padding-block: var(--sp-8) 3rem; } }
.st-filters { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px; margin: -2px -2px var(--sp-3);
  -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.st-filters::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .st-filters { flex-wrap: wrap; overflow: visible; } }
.st-filter { flex: 0 0 auto; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 6px; min-height: var(--ctl-h-sm);
  padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: var(--fs-sm);
  font-weight: 500; white-space: nowrap; transition: border-color .15s, color .15s, background .15s; }
.st-filter i { color: var(--teal-700); font-size: .9em; }
.st-filter:hover { border-color: var(--teal-300); color: var(--teal-700); }
.st-filter[aria-current="true"] { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 600; }
.st-filter[aria-current="true"] i { color: #fff; }
@media (pointer: coarse) { .st-filter { min-height: 40px; } }

.st-toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); margin: 0 0 var(--sp-4); }
.st-toolbar .field { margin: 0; min-width: 0; }
.st-toolbar-q { grid-column: 1 / -1; }
.st-toolbar select { width: 100%; }
.st-search { position: relative; display: flex; gap: 6px; }
.st-search input { flex: 1; min-width: 0; }
.st-toolbar .st-search input { padding-left: 2.1rem; }
.st-search-ico { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; pointer-events: none; }
@media (min-width: 768px) {
  .st-toolbar { grid-template-columns: minmax(0, 1fr) 11rem 11rem; align-items: center; }
  .st-toolbar-q { grid-column: auto; }
}
@media (min-width: 1280px) { .st-toolbar { grid-template-columns: minmax(0, 32rem) 11rem 11rem; } }
.st-topics { align-items: center; margin: 0 0 var(--sp-5); }
.st-topics-label { font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.st-count { margin: 0 0 var(--sp-3); font-size: var(--fs-sm); color: var(--muted); font-variant-numeric: tabular-nums; }

/* card grid: 1 > 2 > 3 > 4 > 5 columns */
.st-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); }
@media (min-width: 560px) { .st-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .st-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .st-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-5); } }
@media (min-width: 1600px) { .st-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
/* legacy grid name (kept for any old markup) */
.st-cards { display: grid; gap: var(--sp-4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .st-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* story card (extras on top of .pg-card.pg-tile) */
.st-card { color: var(--ink); text-decoration: none; }
.st-card:hover { color: var(--ink); }
.st-card:hover .st-card-title { color: var(--teal-700); }
.st-card-media { background: var(--sand); }
.st-card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.st-card-flags { position: absolute; left: var(--sp-2); top: var(--sp-2); right: var(--sp-2); display: flex; flex-wrap: wrap; gap: 6px; }
.st-card-flags .st-chip { background: rgba(255, 255, 255, .95); box-shadow: 0 2px 8px -2px rgba(0, 29, 35, .35); }
.st-feature-tag { position: absolute; right: var(--sp-2); bottom: var(--sp-2); display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px;
  border-radius: 999px; background: rgba(0, 29, 35, .78); color: #ffd36b; font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .04em; }
.st-card-body { gap: 6px; padding: var(--sp-3) var(--sp-4) var(--sp-4); }
.st-card-title { transition: color .15s; }
.st-card-title:lang(te) { line-height: 1.6; }
.st-card-ex { -webkit-line-clamp: 3; }
.st-card-ex:lang(te) { line-height: 1.75; }
.st-card-meta { margin-top: auto; padding-top: 2px; font-size: var(--fs-xs); }
.st-card-author { min-width: 0; max-width: 100%; }
.st-card-author > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* featured: a swipe row on phones, a grid from tablets; a lone featured story becomes a wide spotlight */
.st-featured { display: flex; gap: var(--sp-4); overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px var(--sp-2); margin: 0 -2px var(--sp-6); scrollbar-width: thin; }
.st-featured > .st-card { flex: 0 0 86%; scroll-snap-align: start; }
@media (min-width: 768px) {
  .st-featured { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .st-featured > .st-card { flex: none; }
}
@media (min-width: 1280px) { .st-featured { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.st-featured > .st-card:only-child { flex-basis: 100%; }
@media (min-width: 768px) {
  .st-featured:has(> .st-card:only-child) { grid-template-columns: minmax(0, 1fr); }
  .st-featured > .st-card:only-child { flex-direction: row; min-height: 280px; }
  .st-featured > .st-card:only-child .st-card-media { width: 52%; flex: none; aspect-ratio: auto; }
  .st-featured > .st-card:only-child .st-card-body { padding: var(--sp-8); justify-content: center; gap: var(--sp-3); }
  .st-featured > .st-card:only-child .st-card-title { font-size: clamp(1.3rem, 1rem + 1vw, 1.85rem); -webkit-line-clamp: 3; }
  .st-featured > .st-card:only-child .st-card-ex { font-size: var(--fs-md); max-width: 56ch; -webkit-line-clamp: 4; }
  .st-featured > .st-card:only-child .st-card-meta { margin-top: var(--sp-2); }
}
.st-pager { margin-top: var(--sp-6); }
.st-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2); }
.st-empty { text-align: center; padding: var(--sp-8) var(--sp-4); background: #fff; border: 1px dashed var(--line-strong); border-radius: var(--card-radius); }
.st-empty i { font-size: 1.75rem; color: var(--teal); }
.st-empty h2, .st-empty h3 { font-size: var(--fs-md); margin: var(--sp-3) 0 var(--sp-1); }

/* write-your-story call to action */
.st-cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-4) var(--sp-5); margin-top: var(--sp-8); padding: var(--sp-6);
  border-radius: var(--card-radius); color: #fff; background: linear-gradient(120deg, var(--teal-700), var(--teal) 60%, #1aa9ae); box-shadow: 0 24px 50px -30px rgba(11, 101, 105, .9); }
.st-cta-ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .16); font-size: 1.3rem; flex: 0 0 48px; }
.st-cta > div { flex: 1 1 320px; min-width: 0; }
.st-cta h2 { color: #fff; font-size: var(--fs-lg); margin: 0 0 4px; }
.st-cta p { margin: 0; color: rgba(255, 255, 255, .88); font-size: var(--fs-sm); max-width: 70ch; }
@media (min-width: 1024px) { .st-cta { padding: var(--sp-6) var(--sp-8); } .st-cta h2 { font-size: 1.25rem; } }

/* ---------- reading page --------------------------------------------------------------------- */
.st-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120; background: transparent; pointer-events: none; }
.st-progress > span { display: block; height: 100%; width: 100%; background: var(--teal); transform-origin: 0 50%; transform: scaleX(0); }
@supports (animation-timeline: scroll()) {
  .st-progress > span { animation: st-progress linear both; animation-timeline: scroll(root); }
  @keyframes st-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}
.pagehead.st-pagehead { padding-block: 1rem; }
.pagehead.st-pagehead .crumb { margin: 0; }
.st-read { padding-block: var(--sp-6) 3rem; }
@media (min-width: 768px) { .st-read { padding-block: var(--sp-8) 4rem; } }
/* the story column: readable measure, centred in the fluid shell */
.st-col { max-width: var(--measure); margin-inline: auto; }
.st-read .st-col.measure { max-width: min(100%, 44rem); }
/* wide elements break out of the measure, up to the shell width */
.st-cover, .st-related { --st-wide: min(100vw - 2 * var(--gutter), 1080px); width: var(--st-wide); max-width: none; margin-left: calc(50% - var(--st-wide) / 2); }
.st-related { --st-wide: min(100vw - 2 * var(--gutter), 1440px); }
.st-preview-frame .st-cover, .st-preview-frame .st-related, .st-review .st-cover { width: auto; margin-left: 0; }

.st-head { display: grid; gap: var(--sp-3); }
.st-crumb { font-size: var(--fs-sm); color: var(--muted); }
.st-crumb a { color: var(--teal-700); }
.st-title { font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.75rem); line-height: 1.15; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
.st-title:lang(te) { line-height: 1.5; }
.st-dek { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); color: #34494d; margin: 0; line-height: 1.55; text-wrap: pretty; }
.st-dek:lang(te) { line-height: 1.9; }
.st-byline { display: flex; align-items: center; gap: var(--sp-2) var(--sp-3); flex-wrap: wrap; color: var(--muted); font-size: var(--fs-sm);
  padding: var(--sp-3) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: var(--sp-1); }
.st-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--cream); color: var(--teal-700);
  display: inline-grid; place-items: center; font-family: var(--font-head); font-weight: 700; flex: 0 0 40px; }
.st-byline strong { color: var(--ink); font-weight: 600; }
.st-byline a { font-weight: 600; }
.st-meta-sep::before { content: "·"; margin: 0 .1rem; }
.st-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.st-tag { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; background: #fff;
  border: 1px solid var(--line); font-size: var(--fs-xs); color: var(--ink); }
a.st-tag:hover { border-color: var(--teal-300); color: var(--teal-700); }
a.st-tag[aria-current="true"] { background: var(--cream); border-color: var(--teal-300); color: var(--teal-700); font-weight: 600; }
.st-cover { margin-block: var(--sp-6) var(--sp-8); }
.st-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--card-radius); background: var(--sand); }
.st-cover figcaption, .st-body figcaption { font-size: var(--fs-sm); color: var(--muted); margin-top: var(--sp-2); text-align: center; }

/* body typography: 17-18px, 1.75 leading, generous paragraph rhythm */
.st-body { font-size: 1.0625rem; line-height: 1.75; color: #10282d; overflow-wrap: break-word; }
@media (min-width: 768px) { .st-body { font-size: 1.125rem; } }
.st-body:lang(te), .st-body :lang(te) { line-height: 1.95; }
.st-body > * { margin: 0 0 1.15em; }
.st-body > :last-child { margin-bottom: 0; }
.st-body h2 { font-size: 1.4rem; margin: 1.8em 0 .5em; line-height: 1.25; }
.st-body h3 { font-size: 1.18rem; margin: 1.5em 0 .4em; line-height: 1.3; }
.st-body blockquote { margin: 1.6em 0; padding: .2em 0 .2em 1.1em; border-left: 3px solid var(--teal); color: #2b4246; font-size: 1.08em; font-style: italic; }
.st-body blockquote > :last-child { margin-bottom: 0; }
.st-body ul, .st-body ol { padding-left: 1.4em; }
.st-body li { margin: .35em 0; }
.st-body li > p { margin: 0; }
.st-body a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.st-body hr { border: 0; text-align: center; margin: 2.2em 0; }
.st-body hr::after { content: "\2022\00a0\00a0\2022\00a0\00a0\2022"; color: var(--teal-300); letter-spacing: .2em; }
.st-body figure { margin: 1.8em 0; }
.st-body img { border-radius: var(--card-radius); width: 100%; height: auto; }

.st-source { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-3) var(--sp-4); border-radius: var(--card-radius); background: var(--cream); margin: var(--sp-6) 0; font-size: var(--fs-sm); }
.st-source i { color: var(--teal-700); margin-top: 3px; }

.st-teaser { text-align: center; padding: var(--sp-8) var(--sp-5); border-radius: var(--card-radius); background: #fff; border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(0, 29, 35, .04); margin: 0 0 var(--sp-4); }
.st-teaser > i { font-size: 1.75rem; color: var(--teal); }
.st-teaser h1 { font-size: 1.4rem; margin: var(--sp-3) 0 var(--sp-1); }
.st-teaser .st-row-gap { justify-content: center; }

/* actions: inline row on desktop, sticky bottom bar on phones */
.st-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin: var(--sp-8) 0 var(--sp-4); padding: var(--sp-3) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.st-actions form { margin: 0; display: contents; }
.st-act { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 40px; min-height: var(--ctl-h); padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: 600 var(--fs-sm) var(--font-body); cursor: pointer;
  transition: border-color .15s, color .15s, background .15s; }
.st-act:hover { border-color: var(--teal-300); color: var(--teal-700); }
.st-act[aria-pressed="true"] { background: var(--teal-700); border-color: var(--teal-700); color: #fff; }
.st-act[aria-pressed="true"] .st-act-off { display: none; }
.st-act[aria-pressed="false"] .st-act-on { display: none; }
.st-act:disabled { opacity: .6; cursor: progress; }
.st-act-count { font-variant-numeric: tabular-nums; }
@media (max-width: 768px) {
  .st-has-bar { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .st-actions.st-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; margin: 0; padding: 4px 8px calc(4px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line); border-bottom: 0; box-shadow: 0 -10px 30px -18px rgba(0, 29, 35, .35);
    justify-content: space-around; flex-wrap: nowrap; transition: transform .25s ease; }
  .st-actions.st-bar .st-act { flex: 1 1 0; padding: 4px; border: 0; border-radius: 10px; background: transparent; flex-direction: column; gap: 1px; font-size: var(--fs-2xs); min-height: 52px; }
  .st-actions.st-bar .st-act[aria-pressed="true"] { background: var(--cream); color: var(--teal-700); }
  .st-actions.st-bar .st-act i { font-size: 1.1rem; }
  .st-actions.st-bar.st-bar-hidden { transform: translateY(110%); }
  .st-has-bar ~ .whatsapp-float, body:has(.st-has-bar) .whatsapp-float, body:has(.st-has-bar) .back-top { bottom: calc(76px + env(safe-area-inset-bottom)) !important; }
  /* the cookie sheet owns the bottom edge until the visitor chooses */
  body:has(#consent:not([hidden])) .st-actions.st-bar { display: none; }
}
.st-share { margin: var(--sp-5) 0; padding: var(--sp-4); border-radius: var(--card-radius); background: #fff; border: 1px solid var(--line); }
.st-share-h { font-family: var(--font-head); font-weight: 600; font-size: var(--fs-md); margin: 0 0 var(--sp-3); }
.st-share .share-row { margin: 0; }
.st-actionsheet { margin: 0 0 var(--sp-4); }

/* comments */
.st-comments { margin-top: var(--sp-8); }
.st-comments h2 { font-size: var(--fs-lg); }
.st-comment-list { list-style: none; margin: var(--sp-4) 0; padding: 0; display: grid; gap: var(--sp-3); }
.st-comment { background: #fff; border: 1px solid var(--line); border-radius: var(--card-radius); padding: var(--sp-3) var(--sp-4); font-size: var(--fs-base); }
.st-comment-head { display: flex; flex-wrap: wrap; gap: 2px var(--sp-2); align-items: baseline; font-size: var(--fs-xs); color: var(--muted); }
.st-comment-head strong { color: var(--ink); font-size: var(--fs-sm); }
.st-comment-body { white-space: pre-line; margin: 6px 0 0; overflow-wrap: anywhere; line-height: 1.6; }
.st-comment-held { border-style: dashed; background: #fffaf2; }
.st-comment-tools { display: flex; gap: var(--sp-1); margin-top: 4px; flex-wrap: wrap; }
.st-comment-tools form { margin: 0; }
.st-comment-tools details form { display: grid; gap: var(--sp-2); margin-top: var(--sp-2); }
.st-linkbtn { background: none; border: 0; padding: 6px 4px; min-height: 36px; color: var(--teal-700); font: 600 var(--fs-xs) var(--font-body); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
@media (pointer: coarse) { .st-linkbtn { min-height: 44px; } }
.st-counter { font-size: var(--fs-xs); color: var(--muted); text-align: right; display: block; margin-top: 4px; font-variant-numeric: tabular-nums; }
.st-signin { padding: var(--sp-4); border-radius: var(--card-radius); background: var(--cream); display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; justify-content: space-between; font-size: var(--fs-sm); }

/* dialogs / sheets */
.st-dialog { border: 0; border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); box-shadow: var(--shadow-lg); }
.st-dialog::backdrop { background: rgba(0, 20, 25, .55); }
.st-dialog-in { padding: 1.2rem 1.2rem 1rem; }
.st-dialog h2 { font-size: 1.2rem; margin: 0 0 .6rem; }
.st-dialog-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: flex-end; margin-top: 1rem; }
@media (max-width: 640px) { .st-dialog { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 18px 18px 0 0; } }
.st-radio { display: flex; gap: .6rem; align-items: flex-start; padding: .6rem .2rem; min-height: 44px; }
.st-radio input { width: 20px; height: 20px; margin-top: .15rem; flex: 0 0 20px; accent-color: var(--teal-700); }

/* related */
.st-related { margin-top: 2.6rem; }
.st-related h2 { font-size: 1.3rem; }

/* related */
.st-related { margin-top: var(--sp-8); }
.st-related h2 { font-size: var(--fs-lg); }
.st-related-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .st-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .st-related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .st-related-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- member area: my stories (rows), write and preview ----------------------------------- */
.st-tabs { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .3rem; margin: 0 0 1rem; -webkit-overflow-scrolling: touch; }
.st-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: .5rem .95rem; border-radius: 12px;
  background: #fff; border: 1px solid var(--line); color: var(--ink); font: 500 .9rem var(--font-head); }
.st-tab[aria-current="page"] { background: var(--teal-700); color: #fff; border-color: var(--teal-700); }
.st-tab-n { font-size: .74rem; min-width: 1.5em; padding: .05rem .4rem; border-radius: 100px; background: var(--cream); color: var(--teal-700); text-align: center; }
.pg-tab-count { position: relative; } /* keeps the hidden " stories" label inside the scrolling tab row */
.st-tab[aria-current="page"] .st-tab-n { background: rgba(255, 255, 255, .22); color: #fff; }
.st-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .st-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1536px) { .st-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.st-item { background: #fff; border: 1px solid var(--line); border-radius: var(--card-radius); padding: var(--sp-4); box-shadow: 0 1px 2px rgba(0, 29, 35, .04);
  display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.st-item-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.st-item-title { font: 700 var(--fs-md) var(--font-head); margin: 0; color: var(--ink); line-height: 1.35; overflow-wrap: anywhere; }
.st-item-title:lang(te) { line-height: 1.6; }
.st-item-meta { color: var(--muted); font-size: var(--fs-xs); display: flex; flex-wrap: wrap; gap: 2px var(--sp-3); }
.st-note { background: #fff8ec; border: 1px solid #f3d9a8; border-radius: var(--card-radius); padding: var(--sp-3); font-size: var(--fs-sm); }
.st-note-text { white-space: pre-line; display: block; }
.st-note strong { display: block; margin-bottom: 2px; }
.st-item-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: var(--sp-2); border-top: 1px solid var(--line); }
.st-item-actions form { margin: 0; }
.st-fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60; display: inline-flex; align-items: center; gap: .5rem;
  min-height: 56px; padding: .9rem 1.3rem; border-radius: 100px; background: var(--teal-700); color: #fff; font: 600 1rem var(--font-head);
  box-shadow: 0 16px 34px -14px rgba(11, 101, 105, .8); }
.st-fab:hover { color: #fff; background: var(--teal-600); }
@media (min-width: 900px) { .st-fab { position: static; box-shadow: none; } }
.st-hub-head { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between; align-items: flex-end; margin-bottom: 1rem; }
.st-preview .st-banner { margin-bottom: 0; }
.st-lead-help { margin: 0 0 var(--sp-4); font-size: var(--fs-sm); }

/* ---- admin / batch-admin story consoles (layout from console.css) ---- */
.st-banner { display: flex; gap: var(--sp-2); align-items: flex-start; font-size: var(--fs-sm); color: var(--ink-2); background: #f3fbfb;
  border: 1px solid rgba(18, 146, 152, .25); border-radius: var(--card-radius); padding: var(--sp-3) var(--sp-4); margin: 0 0 var(--sp-4); }
.st-banner > i { color: var(--teal); margin-top: 3px; }
.st-star { color: #d99a00; }
.st-author { font-weight: 500; }
.st-comment-text { color: var(--ink); }
.st-storylink { color: var(--ink); font-weight: 500; }
.st-storylink:hover { color: var(--teal-700); }
table.dt .st-badge { font-size: var(--fs-xs); padding: .1rem .5rem; white-space: nowrap; }
/* ---------- writing ------------------------------------------------------------------------- */
.st-types { display: grid; gap: .8rem; grid-template-columns: 1fr; margin: 0; padding: 0; border: 0; }
@media (min-width: 640px) { .st-types { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .st-types { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1600px) { .st-types { grid-template-columns: repeat(4, 1fr); } }
.st-type { position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 2px var(--sp-3); align-items: start; padding: var(--sp-4); border-radius: var(--card-radius);
  background: #fff; border: 2px solid var(--line); cursor: pointer; min-height: 44px; }
.st-type input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.st-type i { grid-row: span 3; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--cream); color: var(--teal-700); font-size: 1.1rem; }
.st-type strong { font-family: var(--font-head); font-size: var(--fs-md); }
.st-type small { color: var(--muted); font-size: var(--fs-sm); line-height: 1.45; }
.st-type:has(input:checked) { border-color: var(--teal-700); box-shadow: 0 0 0 3px rgba(18, 146, 152, .18); }
.st-type:has(input:focus-visible) { outline: 2px solid var(--teal-700); outline-offset: 2px; }

.st-compose { display: grid; gap: 1rem; padding-bottom: 7rem; grid-template-columns: minmax(0, 1fr); }
.st-compose > *, .st-section, .st-section > *, .st-review > *, .st-editor { min-width: 0; }
.st-compose textarea, .st-compose input:not([type=checkbox]):not([type=radio]), .st-compose select { width: 100%; max-width: 100%; }
.st-compose .field { margin: 0; }
.st-compose .field small, .st-help { color: var(--muted); font-size: var(--fs-xs); display: block; margin-top: .3rem; }
.st-grow { field-sizing: content; min-height: 2.8em; resize: vertical; }
.st-title-input { font: 700 1.35rem/1.3 var(--font-head) !important; }
.st-title-input:lang(te) { line-height: 1.6 !important; }
.st-section { background: #fff; border: 1px solid var(--line); border-radius: var(--card-radius); padding: var(--sp-4); display: grid; gap: var(--sp-3); }
.st-section > h2, .st-section legend { font: 600 var(--fs-md) var(--font-head); margin: 0; padding: 0; }
fieldset.st-section { margin: 0; min-width: 0; }
.st-check { display: flex; gap: var(--sp-2); align-items: flex-start; min-height: 36px; padding: 4px 0; font-size: var(--fs-base); }
.st-check input { width: 18px; height: 18px; flex: 0 0 18px; margin-top: .1rem; accent-color: var(--teal-700); }
.st-cover-pick { display: grid; gap: .7rem; }
.st-cover-pick img { width: 100%; max-width: 420px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; background: var(--sand); }
.st-file { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .55rem 1rem; border: 1px dashed var(--teal-300);
  border-radius: 12px; color: var(--teal-700); font: 600 .92rem var(--font-head); cursor: pointer; background: #fff; }
.st-progress-line { height: 6px; border-radius: 6px; background: #e6eef0; overflow: hidden; }
.st-progress-line > span { display: block; height: 100%; width: 0; background: var(--teal); transition: width .2s ease; }

/* editor */
.st-editor { border: 1px solid #c9d6d8; border-radius: 14px; background: #fff; }
.st-editor:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(18, 146, 152, .15); }
.st-editor-area { min-height: 46vh; padding: 1rem; font-size: 1.125rem; line-height: 1.7; }
.st-editor-area .ProseMirror { outline: none; min-height: 44vh; white-space: pre-wrap; word-wrap: break-word; }
.st-editor-area .ProseMirror > * { margin: 0 0 .9em; }
.st-editor-area .ProseMirror h2 { font-size: 1.4rem; }
.st-editor-area .ProseMirror h3 { font-size: 1.18rem; }
.st-editor-area .ProseMirror blockquote { border-left: 4px solid var(--teal); padding-left: 1rem; color: #2b4246; margin-left: 0; }
.st-editor-area .ProseMirror ul, .st-editor-area .ProseMirror ol { padding-left: 1.4em; }
.st-editor-area .ProseMirror img { max-width: 100%; height: auto; border-radius: 10px; }
.st-editor-area .ProseMirror img.ProseMirror-selectednode { outline: 3px solid var(--teal); }
.st-editor-area .ProseMirror p.is-editor-empty:first-child::before { content: attr(data-placeholder); color: #8a9a9d; float: left; height: 0; pointer-events: none; }
.st-editor-area .ProseMirror :lang(te), .st-editor-area .ProseMirror:lang(te) { line-height: 1.95; }
.st-editor textarea.st-plain { border: 0; border-radius: 14px; min-height: 46vh; width: 100%; padding: 1rem; font-size: 1.125rem; line-height: 1.7; resize: vertical; }
.st-toolbar-dock { position: sticky; bottom: 0; z-index: 30; display: flex; gap: .2rem; overflow-x: auto; padding: .35rem; background: #f6fafa;
  border-top: 1px solid var(--line); border-radius: 0 0 14px 14px; will-change: transform; }
/* keyboard open (story-editor.js, visualViewport): the toolbar sits right above the keyboard */
.st-toolbar-dock.st-docked { position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; border-radius: 0; box-shadow: 0 -6px 18px -10px rgba(0, 29, 35, .4); }
.st-tool { flex: 0 0 auto; min-width: 44px; min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: 700 .95rem var(--font-head); cursor: pointer; }
.st-tool:hover { background: #e3eeef; }
.st-tool[aria-pressed="true"] { background: var(--teal-700); color: #fff; }
.st-tool:disabled { opacity: .4; }
.st-tool-sep { flex: 0 0 1px; background: var(--line); margin: .3rem .15rem; }
.st-editor-foot { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; font-size: .84rem; color: var(--muted); padding: .2rem .2rem 0; }


/* sticky save bar: full width on the website shell; beside the sidebar in the consoles */
.st-savebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: flex; gap: var(--sp-2); align-items: center; justify-content: space-between;
  padding: var(--sp-2) var(--gutter, 12px) calc(var(--sp-2) + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line);
  box-shadow: 0 -10px 30px -18px rgba(0, 29, 35, .35); }
.st-savebar-status { font-size: var(--fs-xs); line-height: 1.3; color: var(--muted); min-width: 0; flex: 1 1 auto; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
.st-savebar-status.st-offline { color: #7a4a00; }
.st-savebar-status.st-error { color: #8f1d1d; }
.st-savebar-actions { display: flex; gap: 6px; flex: 0 0 auto; }
@media (min-width: 1000px) { .console-ui .st-savebar { left: var(--side-w, 236px); } }
/* member write page: the bar lines up with the writing column */
@media (min-width: 1024px) { .member-layout .st-savebar { padding-inline: max(var(--gutter), calc((100vw - 920px) / 2)); } }
.st-keyboard-open .st-savebar { display: none; }
body:has(.st-savebar) .back-top { bottom: calc(68px + env(safe-area-inset-bottom)); }

/* write page: the form keeps a comfortable writing width inside the fluid shell */
.st-write .st-compose, .st-write > .st-section, .st-write > .st-banner, .st-write > .st-errors { max-width: 920px; margin-inline: auto; }
.st-write > .pg-section-head, .st-write > .st-lead-help { max-width: 920px; margin-inline: auto; }
body:has(.st-savebar) .st-toolbar-dock:not(.st-docked) { bottom: calc(60px + env(safe-area-inset-bottom)); }
.st-write .st-title-input { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.5rem) !important; }
.st-write .st-editor-area, .st-write .st-editor textarea.st-plain { font-size: 1.0625rem; }
@media (min-width: 768px) { .st-write .st-editor-area, .st-write .st-editor textarea.st-plain { padding: var(--sp-5) var(--sp-6); } }
.st-write .m-form-actions { margin-top: var(--sp-4); }
.st-write .st-section { margin-top: var(--sp-4); }
.st-write .st-compose .st-section { margin-top: 0; }

.st-errors { border: 2px solid #c0392b; background: #fff5f5; border-radius: 12px; padding: .9rem 1rem; }
.st-errors h2 { font-size: 1.05rem; margin: 0 0 .4rem; color: #8f1d1d; }
.st-errors ul { margin: 0; padding-left: 1.2rem; }
.st-errors a { color: #8f1d1d; text-decoration: underline; }
.st-banner { border-radius: 12px; padding: .8rem 1rem; display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; }
.st-banner-info { background: #e6f4f5; border: 1px solid #b7dfe1; }
.st-banner-warn { background: #fff4e0; border: 1px solid #f3d39b; }
.st-coauthors { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.st-coauthors li { display: flex; gap: .5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: .3rem 0; border-bottom: 1px solid var(--line); }
.st-picks { list-style: none; margin: .3rem 0 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.st-picks button { width: 100%; text-align: left; min-height: 44px; padding: .5rem .8rem; border: 0; background: #fff; cursor: pointer; font: inherit; }
.st-picks button:hover, .st-picks button:focus-visible { background: var(--cream); }

/* review */
.st-review { display: grid; gap: 1.2rem; }
@media (min-width: 1100px) { .st-review { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } .st-review-side { position: sticky; top: 76px; } }
.st-review-side { display: grid; gap: 1rem; }
.st-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; font-size: .92rem; }
.st-checklist li { display: flex; gap: .5rem; align-items: flex-start; }
.st-ok { color: #1d6b3a; }
.st-bad { color: #8f1d1d; }
.st-actionsheet details { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.st-actionsheet details + details { margin-top: .5rem; }
.st-actionsheet summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; gap: .5rem; padding: .6rem .9rem; font: 600 .95rem var(--font-head); list-style: none; }
.st-actionsheet summary::-webkit-details-marker { display: none; }
.st-actionsheet details[open] summary { border-bottom: 1px solid var(--line); }
.st-actionsheet form { padding: .8rem .9rem 1rem; display: grid; gap: .7rem; margin: 0; }
.st-actionsheet .field { margin: 0; }
.st-preview-frame { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.st-preview-frame .st-read { padding-top: 1rem; }
.st-diff { list-style: none; margin: 0; padding: 0; font-size: .92rem; display: grid; gap: .3rem; }
.st-diff li { padding: .3rem .6rem; border-radius: 6px; white-space: pre-line; }
.st-diff .st-add { background: #e7f6ec; }
.st-diff .st-add::before { content: "+ "; font-weight: 700; color: #1d6b3a; }
.st-diff .st-del { background: #fdecec; text-decoration: line-through; }
.st-diff .st-del::before { content: "- "; font-weight: 700; color: #8f1d1d; }

/* legacy tool */
.st-legacy-grid { display: grid; gap: .8rem; }
@media (min-width: 1024px) { .st-legacy-grid { grid-template-columns: 1fr 1fr; } }
.st-legacy-pane { background: #fbfcfc; border: 1px solid var(--line); border-radius: 10px; padding: .7rem .9rem; font-size: .92rem; max-height: 340px; overflow: auto; white-space: pre-line; }
.st-legacy-pane.st-body { white-space: normal; font-size: .95rem; }

/* ---------- member pages: shared tile values win over older per-feature sizes ----------------------- */
.member-layout .st-card { border-radius: var(--card-radius); }

/* ---------- motion --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .st-card, .st-card-title, .st-actions.st-bar, .st-progress-line > span, .st-filter, .st-act { transition: none !important; }
  .st-progress { display: none; }
}
.st-col-story { min-width: 200px; max-width: 320px; }
