/* =====================================================================
   Health Tips — public pages (/health-tips…) + contributor studio
   (/my-health-tips). Uses the site tokens from styles.css :root.
   ===================================================================== */

.ht-public, .ht-studio { background: var(--bg); color: var(--ink); }
.ht-mute { color: var(--mute); }
.ht-small { font-size: 13px; }
.ht-lede { color: var(--mute); font-size: 18px; line-height: 1.55; max-width: 720px; margin: 10px 0 0; }
.ht-empty { text-align: center; color: var(--mute); padding: 48px 16px; font-size: 16px; }
.ht-empty a { color: var(--teal-700); }
.ht-crumb { display: inline-block; font-size: 14px; color: var(--mute); margin-bottom: 8px; }
.ht-crumb:hover { color: var(--teal-700); }
.ht-disclaimer { margin: 36px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--bg-2); color: var(--mute); font-size: 13px; line-height: 1.55; }

/* ---------- Avatars ---------- */
.ht-avatar { flex: none; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: var(--teal-50); color: var(--teal-800); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 24px; }
.ht-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ht-avatar-sm { width: 36px; height: 36px; font-size: 15px; }
.ht-avatar-lg { width: 112px; height: 112px; font-size: 40px; }

/* ---------- Chips ---------- */
.ht-chips, .ht-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.ht-chip { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 980px; border: 1px solid var(--line); background: var(--bg); font-size: 13px; color: var(--ink-2); transition: all .15s; }
.ht-chip:hover { border-color: var(--teal-600); color: var(--teal-700); }
.ht-chip.is-active { background: var(--teal-600); border-color: var(--teal-600); color: #fff; }

/* ---------- List hero + tabs ---------- */
.ht-list-hero { background: linear-gradient(180deg, var(--teal-50) 0%, var(--bg) 100%); padding: 56px 0 32px; }
.ht-list-hero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 300; letter-spacing: -1px; line-height: 1.08; margin: 8px 0 0; }
.ht-search { display: flex; gap: 8px; margin-top: 24px; max-width: 560px; }
.ht-search input { flex: 1; min-width: 0; padding: 12px 18px; border-radius: 980px; border: 1px solid rgba(0,0,0,.14); font: inherit; font-size: 15px; background: #fff; }
.ht-search input:focus { outline: 2px solid var(--teal-400); outline-offset: 1px; }
.ht-listing { padding: 24px 20px 64px; }
.ht-typetabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.ht-typetabs::-webkit-scrollbar { display: none; }
.ht-typetabs a { padding: 10px 14px; font-size: 15px; color: var(--mute); border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.ht-typetabs a.is-active { color: var(--ink); border-color: var(--teal-600); font-weight: 500; }

/* ---------- Card grid ---------- */
.ht-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin-top: 24px; }
.ht-card-item { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); transition: transform .2s, box-shadow .2s; }
.ht-card-item:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.08); }
.ht-card-img { position: relative; aspect-ratio: 4 / 3; background: var(--teal-50); display: flex; align-items: center; justify-content: center; }
.ht-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ht-card-img.ht-type-exercise { background: var(--blue-50); }
.ht-card-img.ht-type-tip { background: #FFF4E0; }
.ht-card-ic { font-size: 48px; }
.ht-card-kind { position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: 980px; background: rgba(255,255,255,.92); font-size: 12px; font-weight: 500; }
.ht-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ht-card-body h3 { font-size: 17px; font-weight: 600; line-height: 1.3; margin: 0; }
.ht-card-body p { font-size: 14px; color: var(--mute); line-height: 1.5; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ht-card-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: auto; padding-top: 6px; font-size: 12px; color: var(--mute); }
.ht-pager { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 32px; font-size: 14px; color: var(--mute); }
.ht-pager a { color: var(--teal-700); font-weight: 500; }

/* ---------- Article ---------- */
.ht-preview-bar { background: #FFF4E0; color: #6B4600; text-align: center; padding: 10px 16px; font-size: 14px; }
.ht-preview-bar a { color: inherit; text-decoration: underline; }
.ht-article { max-width: 920px; padding-top: 24px; padding-bottom: 64px; }
.ht-crumbs { font-size: 14px; color: var(--mute); display: flex; gap: 6px; flex-wrap: wrap; }
.ht-crumbs a:hover { color: var(--teal-700); }
.ht-art-head { margin-top: 16px; }
.ht-kind { display: inline-block; padding: 4px 12px; border-radius: 980px; background: var(--teal-50); color: var(--teal-800); font-size: 13px; font-weight: 500; }
.ht-art-head h1 { font-size: clamp(30px, 4.6vw, 46px); font-weight: 400; letter-spacing: -.8px; line-height: 1.12; margin: 12px 0 0; }
.ht-byline { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 15px; }
.ht-byline small { color: var(--mute); }
.ht-reviewed { margin: 8px 0 0; font-size: 13px; color: var(--teal-700); }
.ht-hero-media { margin-top: 24px; display: grid; gap: 16px; }
.ht-hero-media.has-both { grid-template-columns: 3fr 2fr; align-items: stretch; }
.ht-hero-media.has-both .ht-cover img { height: 100%; max-height: none; }
.ht-cover { margin: 0; border-radius: 18px; overflow: hidden; background: var(--bg-2); }
.ht-cover img { width: 100%; max-height: 560px; object-fit: cover; display: block; }
.ht-video { border-radius: 18px; overflow: hidden; background: #000; }
.ht-video iframe { width: 100%; border: 0; display: block; }
.ht-video-youtube iframe { aspect-ratio: 16 / 9; }
.ht-video-instagram { background: #fff; border: 1px solid var(--line); }
.ht-video-instagram iframe { height: 640px; }
.ht-gallery { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; }
.ht-gallery img { width: 140px; height: 105px; object-fit: cover; border-radius: 10px; flex: none; }
.ht-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin: 24px 0 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.ht-facts div { padding: 12px 16px; box-shadow: 0 0 0 .5px var(--line); }
.ht-facts dt { font-size: 12px; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; }
.ht-facts dd { margin: 4px 0 0; font-weight: 500; font-size: 15px; }
.ht-caution { margin-top: 20px; padding: 14px 16px; border-radius: 12px; background: #FFF4E0; color: #5C3D00; font-size: 15px; line-height: 1.55; }
.ht-prose { margin-top: 24px; font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.ht-recipe-grid { display: grid; grid-template-columns: minmax(240px, 1fr) 2fr; gap: 32px; margin-top: 32px; }
.ht-recipe-grid.is-single { grid-template-columns: 1fr; }
.ht-recipe-grid h2, .ht-related h2 { font-size: 22px; font-weight: 500; margin: 0 0 12px; }
.ht-ingredients { background: var(--bg-3); border: 1px solid var(--line); border-radius: 16px; padding: 20px; align-self: start; }
.ht-ingredients ul { list-style: none; margin: 0; padding: 0; }
.ht-ingredients li { padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 15px; line-height: 1.45; }
.ht-ingredients li:last-child { border-bottom: 0; }
.ht-steps ol { list-style: none; counter-reset: s; margin: 0; padding: 0; }
.ht-steps li { counter-increment: s; position: relative; padding: 0 0 18px 46px; font-size: 16px; line-height: 1.65; }
.ht-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--teal-600); color: #fff; font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.ht-author-card { display: flex; gap: 16px; align-items: center; margin-top: 32px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; }
.ht-author-card p { margin: 0; }
.ht-author-card h3 { margin: 2px 0; font-size: 18px; font-weight: 600; }
.ht-insta { display: inline-block; margin-top: 6px; color: var(--teal-700); font-size: 14px; font-weight: 500; }
.ht-related { margin-top: 48px; }

/* ---------- Contributor page ---------- */
.ht-author-hero { background: linear-gradient(180deg, var(--teal-50) 0%, var(--bg) 100%); padding: 48px 0 24px; }
.ht-author-wrap { display: flex; gap: 28px; align-items: flex-start; }
.ht-author-hero h1 { font-size: clamp(30px, 4.4vw, 44px); font-weight: 400; letter-spacing: -.8px; margin: 0; }
.ht-bio { max-width: 680px; line-height: 1.6; color: var(--ink-2); margin: 12px 0 0; }
.ht-links { display: flex; gap: 16px; margin-top: 14px; }
.ht-links a { color: var(--teal-700); font-weight: 500; font-size: 15px; }

/* ---------- Studio ---------- */
.ht-studio { background: var(--bg-3); min-height: calc(100vh - 80px); }
.ht-studio-wrap { max-width: 960px; padding-top: 28px; padding-bottom: 64px; }
.ht-studio-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.ht-studio-head h1 { font-size: 32px; font-weight: 400; letter-spacing: -.6px; margin: 0; }
.ht-studio-head p { margin: 6px 0 0; }
.ht-studio-tabs { display: flex; gap: 4px; background: var(--bg-2); padding: 4px; border-radius: 980px; }
.ht-studio-tabs a { padding: 8px 14px; border-radius: 980px; font-size: 14px; color: var(--mute); white-space: nowrap; }
.ht-studio-tabs a.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.ht-flash { margin-top: 18px; padding: 12px 16px; border-radius: 12px; background: var(--teal-50); color: var(--teal-950); font-size: 14px; line-height: 1.5; }
.ht-flash.is-error { background: #FFE9E7; color: #8A1C12; }
.ht-flash.is-warn { background: #FFF4E0; color: #5C3D00; }
.ht-flash a { color: inherit; text-decoration: underline; }
.ht-gate { max-width: 520px; margin: 48px auto; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 40px 28px; }
.ht-gate-ic { font-size: 44px; }
.ht-gate h1 { font-size: 26px; font-weight: 500; margin: 10px 0 8px; }
.ht-gate p { color: var(--mute); line-height: 1.6; margin: 0 0 20px; }
.ht-gate a:not(.btn) { color: var(--teal-700); }
.ht-new { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 22px; }
.ht-new-card { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; transition: border-color .15s, transform .15s; }
.ht-new-card:hover { border-color: var(--teal-600); transform: translateY(-1px); }
.ht-new-card strong { display: block; font-size: 15px; font-weight: 600; }
.ht-new-card small { display: block; color: var(--mute); font-size: 13px; margin-top: 2px; }
.ht-new-ic { font-size: 28px; }
.ht-mylist { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ht-myrow { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.ht-mythumb { flex: none; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--teal-50); display: flex; align-items: center; justify-content: center; font-size: 28px; }
.ht-mythumb img { width: 100%; height: 100%; object-fit: cover; }
.ht-mybody { flex: 1; min-width: 0; }
.ht-mymeta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 12px; color: var(--mute); }
.ht-mytitle { display: block; margin-top: 4px; font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ht-mytitle:hover { color: var(--teal-700); }
.ht-note { margin: 6px 0 0; font-size: 13px; color: #5C3D00; background: #FFF4E0; padding: 6px 10px; border-radius: 8px; }
.ht-myact { display: flex; gap: 6px; flex: none; }
.ht-btn-sm { padding: 7px 14px; font-size: 13px; }
.ht-status { display: inline-block; padding: 2px 9px; border-radius: 980px; font-size: 12px; font-weight: 500; background: var(--bg-2); color: var(--ink-2); vertical-align: middle; }
.ht-status.is-submitted { background: var(--blue-50); color: var(--blue-600); }
.ht-status.is-changes_requested { background: #FFF4E0; color: #8A5A00; }
.ht-status.is-rejected { background: #FFE9E7; color: #8A1C12; }
.ht-status.is-published { background: var(--teal-50); color: var(--teal-800); }

.ht-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-top: 16px; }
.ht-card h2 { font-size: 20px; font-weight: 500; margin: 0 0 4px; }
.ht-card h3 { font-size: 16px; font-weight: 600; margin: 4px 0 12px; }
.ht-card h3:not(:first-child) { margin-top: 20px; }
.ht-form h2#terms { margin-top: 28px; }
.ht-editor-title { font-size: 26px; font-weight: 400; margin: 4px 0 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ht-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; margin-top: 14px; }
.ht-field:first-child { margin-top: 0; }
.ht-field small { font-weight: 400; color: var(--mute); font-size: 12px; }
.ht-field input:not([type=checkbox]):not([type=file]), .ht-field textarea, .ht-field select,
.ht-ingrow input, .ht-steprow textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(0,0,0,.15); font: inherit; font-size: 15px; font-weight: 400; background: #fff; color: var(--ink);
}
.ht-field textarea, .ht-steprow textarea { resize: vertical; line-height: 1.5; }
.ht-field input:focus, .ht-field textarea:focus, .ht-field select:focus, .ht-ingrow input:focus, .ht-steprow textarea:focus { outline: 2px solid var(--teal-400); outline-offset: 0; border-color: transparent; }
.ht-grid2, .ht-grid3, .ht-grid5 { display: grid; gap: 12px; margin-top: 14px; }
.ht-grid2 { grid-template-columns: repeat(2, 1fr); }
.ht-grid3 { grid-template-columns: repeat(3, 1fr); }
.ht-grid5 { grid-template-columns: repeat(5, 1fr); }
.ht-grid2 .ht-field, .ht-grid3 .ht-field, .ht-grid5 .ht-field { margin-top: 0; }
.ht-card > .ht-grid3:first-of-type, .ht-card > .ht-grid5:first-of-type { margin-top: 0; }
.ht-ingrow { display: grid; grid-template-columns: 140px 1fr 36px; gap: 8px; margin-bottom: 8px; }
.ht-steprow { display: grid; grid-template-columns: 30px 1fr 36px; gap: 8px; align-items: start; margin-bottom: 8px; }
.ht-stepno { width: 28px; height: 28px; margin-top: 8px; border-radius: 50%; background: var(--teal-600); color: #fff; font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.ht-x { width: 36px; height: 40px; border-radius: 10px; color: var(--mute); font-size: 20px; }
.ht-x:hover { background: #FFE9E7; color: #8A1C12; }
.ht-add { margin-top: 4px; color: var(--teal-700); font-weight: 500; font-size: 14px; padding: 6px 0; }
.ht-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.ht-media { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; }
.ht-media img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.ht-cover-badge { position: absolute; left: 6px; top: 6px; background: var(--teal-600); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 980px; }
.ht-media-rm { display: flex; gap: 6px; align-items: center; padding: 6px 8px; font-size: 12px; background: #fff; }
.ht-taggroup { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.ht-taglabel { width: 80px; font-size: 13px; color: var(--mute); }
.ht-tagpick input { position: absolute; opacity: 0; pointer-events: none; }
.ht-tagpick span { display: inline-block; padding: 6px 12px; border-radius: 980px; border: 1px solid var(--line); font-size: 13px; cursor: pointer; transition: all .15s; }
.ht-tagpick input:checked + span { background: var(--teal-600); color: #fff; border-color: var(--teal-600); }
.ht-tagpick input:focus-visible + span { outline: 2px solid var(--teal-400); }
.ht-rules { background: #FFF9EE; border-color: #F5DFB5; font-size: 14px; line-height: 1.55; color: #5C3D00; }
.ht-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.ht-actions form { margin: 0; }
.ht-actions-sticky { position: sticky; bottom: 0; background: linear-gradient(180deg, rgba(250,250,251,0) 0%, var(--bg-3) 30%); padding: 18px 0 14px; z-index: 5; }
.ht-actions .btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.ht-locked p { margin: 0; line-height: 1.55; }
.ht-delete { margin-top: 28px; text-align: center; }
.ht-delete button { color: #B42318; font-size: 14px; text-decoration: underline; }
.ht-avatar-row { display: flex; gap: 16px; align-items: center; margin: 16px 0 6px; }
.ht-avatar-row .ht-field { margin-top: 0; }
.ht-terms { margin: 10px 0 0; padding-left: 20px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.ht-terms li { margin-bottom: 8px; }
.ht-check { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 15px; font-weight: 500; }
.ht-check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--teal-600); }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .ht-hero-media.has-both, .ht-recipe-grid { grid-template-columns: 1fr; }
  .ht-hero-media.has-both .ht-cover img { height: auto; max-height: 420px; }
  .ht-video-instagram iframe { height: 560px; }
  .ht-new { grid-template-columns: 1fr; }
  .ht-grid3, .ht-grid5 { grid-template-columns: repeat(2, 1fr); }
  .ht-author-wrap { flex-direction: column; gap: 16px; }
}
@media (max-width: 560px) {
  .ht-list-hero { padding: 36px 0 20px; }
  .ht-lede { font-size: 16px; }
  .ht-search .btn { padding: 12px 16px; }
  .ht-grid2 { grid-template-columns: 1fr; }
  .ht-ingrow { grid-template-columns: 90px 1fr 32px; }
  .ht-myrow { flex-wrap: wrap; }
  .ht-myact { width: 100%; justify-content: flex-end; }
  .ht-studio-head h1 { font-size: 26px; }
  .ht-studio-tabs { width: 100%; overflow-x: auto; }
  .ht-taglabel { width: 100%; }
  .ht-cover img { max-height: 360px; }
}

/* styles.css pads every <section> 52–64px on tablet/phone; these are inner blocks. */
.ht-new, .ht-steps, .ht-related { padding: 0; }

/* ---------- Save (♥) ---------- */
.ht-save-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 16px; }
.ht-save { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 980px; border: 1px solid rgba(0,0,0,.18); background: #fff; font-size: 15px; font-weight: 500; color: var(--ink); transition: all .15s; }
.ht-save:hover { border-color: #D63A5A; color: #D63A5A; }
.ht-save.is-saved { background: #FFE8EE; border-color: #F4B6C5; color: #C21E45; }
.ht-save[disabled] { opacity: .6; }
.ht-save-ic { font-size: 18px; line-height: 1; }
.ht-save-n { font-size: 13px; color: var(--mute); }
.ht-save-link { font-size: 13px; color: var(--teal-700); font-weight: 500; }
.ht-card-saves { color: #C21E45; }
.ht-empty .btn { margin-top: 12px; }
