/* HaydeMag 5.1 / Mobile-first editorial refinement.
   No third-party fonts, scripts, trackers, or license checks. */
:root { --hd-51-ease:cubic-bezier(.2,.75,.25,1); }
.haydemag-v51 .hd-recent-block { padding:22px; }
.hd-recent-list { display:grid;gap:16px; }
.hd-recent-item { display:grid;grid-template-columns:102px minmax(0,1fr);gap:13px;align-items:center;min-width:0; }
.hd-recent-media { aspect-ratio:1.22;display:block;border-radius:13px;overflow:hidden;background:var(--surface-alt);min-width:0; }
.hd-recent-media img { display:block;width:100%;height:100%;object-fit:cover;transition:transform .3s var(--hd-51-ease); }
.hd-recent-media:hover img { transform:scale(1.06); }
.hd-recent-placeholder { width:100%;height:100%;background:linear-gradient(135deg,var(--surface-alt),var(--accent-soft));color:var(--accent);display:grid;place-items:center; }
.hd-recent-placeholder svg { width:27px;height:27px; }
.hd-recent-body { min-width:0; }
.hd-recent-category { color:var(--accent);font-size:10px;font-weight:850;line-height:1.5;letter-spacing:.025em;display:block; }
.hd-recent-body h3 { margin:4px 0 5px;font-size:13.5px;line-height:1.4;font-weight:780;letter-spacing:-.023em;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden; }
.hd-recent-body time { display:block;font-size:10.5px;color:var(--muted); }
.haydemag-v51 .hd-author-profile { display:grid;grid-template-columns:76px minmax(0,1fr);gap:19px;padding:26px 27px;margin:40px 0 28px;border:1px solid var(--border);border-radius:24px;background:linear-gradient(126deg,var(--surface),var(--surface-alt));box-shadow:0 12px 35px rgba(26,39,79,.03); }
.haydemag-v51 .hd-author-avatar { display:block;width:76px;height:76px;border-radius:24px;overflow:hidden;box-shadow:0 3px 12px #0001; }
.haydemag-v51 .hd-author-photo { object-fit:cover;border-radius:24px;width:100%;height:100%; }
.haydemag-v51 .hd-author-details { min-width:0; }
.haydemag-v51 .hd-author-kicker { color:var(--accent);font-size:10px;font-weight:850;letter-spacing:.12em; }
.haydemag-v51 .hd-author-details h3 { font-size:21px;letter-spacing:-.045em;margin:5px 0 8px; }
.haydemag-v51 .hd-author-details p { color:var(--muted);font-size:13px;line-height:1.7;max-width:600px;margin-bottom:14px; }
.hd-author-stats { border-top:1px solid var(--border);padding-top:12px;display:flex;align-items:center;flex-wrap:wrap;gap:9px 18px;justify-content:space-between;font-size:11px;font-weight:750; }
.hd-author-stats>span { color:var(--muted); }
.hd-author-stats>a { color:var(--accent);display:inline-flex;gap:6px;align-items:center; }
.hd-author-stats svg { width:15px;height:15px; }
.haydemag-v51 .story-card .story-image .hd-recent-placeholder { min-height:165px; }
.haydemag-v51 .featured-grid .hd-recent-placeholder { min-height:200px; }
.haydemag-v51 .section-heading h2 { text-wrap:balance; }
.haydemag-v51 .story-title { text-wrap:pretty; }
.haydemag-v51 .story-image img { background:var(--surface-alt); }
.haydemag-v51 .site-sidebar .sidebar-head { margin-bottom:17px; }
@media (min-width:768px) {
  .haydemag-v51 .site-header { border-bottom:1px solid var(--border); }
  .haydemag-v51 .nav-shell { box-shadow:0 9px 24px rgba(24,30,60,.045); }
  .haydemag-v51 .featured-item { transition:transform .3s var(--hd-51-ease),box-shadow .3s var(--hd-51-ease); }
  .haydemag-v51 .featured-item:hover { transform:translateY(-4px);box-shadow:0 22px 48px rgba(25,38,78,.13); }
  .haydemag-v51 .story-card { transition:transform .27s var(--hd-51-ease),box-shadow .27s var(--hd-51-ease); }
  .haydemag-v51 .story-card:hover { transform:translateY(-4px); }
  .haydemag-v51 .home-content-layout,.haydemag-v51 .inner-layout { gap:32px; }
  .haydemag-v51 .hd-recent-block { border:1px solid var(--border); }
}
/* Android-style responsive experience. The bottom navbar is removed, not merely disguised. */
@media (max-width:767px) {
  :root { --hd-appbar-height:70px; }
  .haydemag-v51 { font-family:Roboto,"Noto Sans",system-ui,-apple-system,"Segoe UI",Arial,sans-serif;letter-spacing:0; }
  .haydemag-v51 h1,.haydemag-v51 h2,.haydemag-v51 h3,.haydemag-v51 h4 { font-family:Roboto,"Noto Sans",system-ui,-apple-system,"Segoe UI",Arial,sans-serif;letter-spacing:-.027em; }
  .haydemag-v51 button,.haydemag-v51 input,.haydemag-v51 textarea,.haydemag-v51 select { font-family:inherit; }
  .haydemag-v51 .container { width:calc(100% - 32px); }
  .haydemag-v51 .topbar,.haydemag-v51 .site-header,.haydemag-v51 .nav-shell,.haydemag-v51 .hd-bottom-nav { display:none!important; }
  .haydemag-v51 .hd-appbar { display:block; height:70px;position:sticky;top:0;z-index:200;background:color-mix(in srgb,var(--surface) 95%,transparent);border-bottom:1px solid var(--border);backdrop-filter:blur(24px) saturate(1.35);-webkit-backdrop-filter:blur(24px) saturate(1.35);transition:box-shadow .2s var(--hd-51-ease); }
  .haydemag-v51.hd-header-scrolled .hd-appbar { box-shadow:0 8px 24px rgba(20,28,58,.075); }
  .haydemag-v51 .hd-appbar-inner { max-width:620px;width:calc(100% - 30px);min-height:70px;height:70px;gap:8px; }
  .haydemag-v51 .hd-app-brand { display:flex;align-items:center;gap:9px;min-width:0;flex:1;max-width:none; }
  .haydemag-v51 .hd-app-brand-icon { width:39px;height:39px;border-radius:14px;font-weight:900;font-size:23px;box-shadow:0 5px 14px color-mix(in srgb,var(--accent) 17%,transparent); }
  .haydemag-v51 .hd-app-brand-copy { min-width:0;display:flex;flex-direction:column;justify-content:center;gap:2px;overflow:hidden; }
  .haydemag-v51 .hd-app-wordmark { font-size:19px;font-weight:850;line-height:1.08;letter-spacing:-.045em;white-space:nowrap;text-overflow:ellipsis;overflow:hidden; }
  .haydemag-v51 .hd-app-wordmark .hd-brand-dot { color:var(--accent); }
  .haydemag-v51 .hd-app-subtitle { display:block;font-size:8px;line-height:1.25;letter-spacing:.095em;font-weight:750;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
  .haydemag-v51 .hd-app-logo { height:39px;width:auto;max-width:80px;object-fit:contain; }
  .haydemag-v51 .hd-app-actions { gap:4px;flex-shrink:0; }
  .haydemag-v51 .hd-app-icon { width:39px;height:42px;border-radius:13px;background:transparent;color:var(--ink);touch-action:manipulation;transition:background .15s,color .15s,transform .15s; }
  .haydemag-v51 .hd-app-icon svg { width:21px;height:21px; }
  .haydemag-v51 .hd-app-icon:active { transform:scale(.93); }
  .haydemag-v51 .hd-app-menu { background:var(--accent-soft);color:var(--accent); }
  .haydemag-v51 .site-footer { padding-bottom:0!important; }
  .haydemag-v51 .back-to-top { bottom:calc(20px + env(safe-area-inset-bottom))!important;right:16px; }
  .haydemag-v51 .hd-sheet-backdrop:not([hidden]) { background:rgba(9,15,30,.45); }
  .haydemag-v51 .hd-mobile-sheet { border-radius:29px 29px 0 0;padding-bottom:calc(25px + env(safe-area-inset-bottom)); }
  .hd-menu-shortcuts { display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:10px 0 18px; }
  .hd-menu-shortcuts button { display:flex;align-items:center;justify-content:center;gap:9px;min-height:48px;border:1px solid var(--border);background:var(--surface-alt);color:var(--ink);border-radius:16px;font-weight:760;font-size:12px; }
  .hd-menu-shortcuts button svg { width:18px;height:18px;color:var(--accent); }
  .hd-menu-shortcuts button[data-theme-toggle]::after { content:"Ubah tema"; }
  .haydemag-v51 .search-panel { position:fixed;top:70px;left:0;right:0;z-index:205;width:100%;padding:19px 0;max-height:calc(100dvh - 70px);overflow:auto;border-bottom:1px solid var(--border);box-shadow:0 22px 35px rgba(17,25,59,.14); }
  .haydemag-v51 .search-panel-inner { width:calc(100% - 32px); }
  .haydemag-v51 .search-field { font-size:16px; }
  .haydemag-v51 .home-main { padding-top:12px;padding-bottom:56px; }
  .haydemag-v51 .home-intro { padding:23px 0 24px; }
  .haydemag-v51 .home-intro h1 { font-size:clamp(29px,7.3vw,36px);letter-spacing:-.039em;line-height:1.12;max-width:530px;margin:9px 0 12px; }
  .haydemag-v51 .home-intro p { font-size:13px;line-height:1.65;color:var(--muted); }
  .haydemag-v51 .news-ticker { border-radius:12px;border:1px solid var(--border);padding-right:8px; }
  .haydemag-v51 .topic-rail { margin-top:17px; }
  .haydemag-v51 .topic-rail-links a { min-height:38px;display:flex;align-items:center;font-size:12px;padding:8px 14px;border-radius:999px; }
  .haydemag-v51 .featured-grid,.haydemag-v51.hd-hero-equal .featured-grid,.haydemag-v51.hd-hero-immersive .featured-grid { grid-template-rows:clamp(290px,79vw,380px) 168px;gap:11px; }
  .haydemag-v51 .featured-item { border-radius:21px; }
  .haydemag-v51 .featured-item-1 .featured-copy { padding:24px; }
  .haydemag-v51 .featured-item-1 .featured-copy h3 { font-size:clamp(25px,6.3vw,32px);letter-spacing:-.033em;line-height:1.18; }
  .haydemag-v51 .featured-item:not(.featured-item-1) .featured-copy h3 { letter-spacing:-.01em; }
  .haydemag-v51 .home-content-layout { margin-top:38px; }
  .haydemag-v51 .section-heading h2 { font-size:25px;letter-spacing:-.03em; }
  .haydemag-v51 .story-title { letter-spacing:-.025em; }
  .haydemag-v51 .stories-grid.is-list .story-card,.haydemag-v51.hd-mobile-app .stories-grid.is-list .story-card { grid-template-columns:minmax(0,1fr) 118px;min-height:132px;padding:11px 11px 11px 13px;gap:12px;border-radius:17px;border:1px solid var(--border);box-shadow:0 2px 12px rgba(27,37,65,.028); }
  .haydemag-v51 .stories-grid.is-list .story-card .story-image { min-height:108px;aspect-ratio:1.12/1;border-radius:12px; }
  .haydemag-v51 .stories-grid.is-list .story-card .story-body { padding:2px 0 0; }
  .haydemag-v51 .stories-grid.is-list .story-card .story-title { font-size:14px;font-weight:780;line-height:1.38;margin:5px 0; }
  .haydemag-v51 .stories-grid.is-list .story-card .post-meta { font-size:10px;line-height:1.45; }
  .haydemag-v51 .stories-grid.is-list .story-card .story-excerpt { display:none; }
  .haydemag-v51 .stories-grid.is-list .story-card .hd-save-story { top:11px;right:11px; }
  .haydemag-v51 .site-sidebar { margin-top:34px; }
  .haydemag-v51 .hd-recent-block { background:var(--surface);border:1px solid var(--border);padding:18px 16px; }
  .haydemag-v51 .hd-recent-list { gap:15px; }
  .haydemag-v51 .hd-recent-item { grid-template-columns:102px minmax(0,1fr);gap:13px; }
  .haydemag-v51 .hd-recent-media { aspect-ratio:1.2; }
  .haydemag-v51 .hd-recent-body h3 { font-size:13px;line-height:1.37; }
  .haydemag-v51 .article-page { padding-top:22px; }
  .haydemag-v51 .article-header h1 { font-size:clamp(29px,7.4vw,39px);line-height:1.17;letter-spacing:-.035em; }
  .haydemag-v51 .article-cover>img { border-radius:18px; }
  .haydemag-v51 .article-content { font-size:16px;line-height:1.85; }
  .haydemag-v51 .article-content h2 { letter-spacing:-.03em; }
  .haydemag-v51 .hd-author-profile { display:grid;grid-template-columns:58px minmax(0,1fr);gap:13px;padding:18px 16px;border-radius:20px;margin:32px 0 26px; }
  .haydemag-v51 .hd-author-avatar { width:58px;height:58px;border-radius:18px; }
  .haydemag-v51 .hd-author-photo { width:58px;height:58px;border-radius:18px; }
  .haydemag-v51 .hd-author-details h3 { font-size:17px;margin:3px 0 7px; }
  .haydemag-v51 .hd-author-details p { font-size:12px;line-height:1.65;margin-bottom:11px; }
  .haydemag-v51 .hd-author-kicker { font-size:9px; }
  .haydemag-v51 .hd-author-stats { gap:6px;flex-direction:column;align-items:flex-start; }
  .haydemag-v51 .category-articles .story-image .hd-recent-placeholder { min-height:90px; }
}
@media (max-width:370px) {
  .haydemag-v51 .hd-appbar-inner { width:calc(100% - 24px); }
  .haydemag-v51 .hd-app-actions { gap:1px; }
  .haydemag-v51 .hd-app-icon { width:36px;height:40px; }
  .haydemag-v51 .hd-app-subtitle { font-size:7px; }
  .haydemag-v51 .stories-grid.is-list .story-card,.haydemag-v51.hd-mobile-app .stories-grid.is-list .story-card { grid-template-columns:minmax(0,1fr) 96px;gap:9px;padding:10px; }
  .haydemag-v51 .stories-grid.is-list .story-card .story-image { min-height:96px; }
  .haydemag-v51 .stories-grid.is-list .story-card .story-title { font-size:13px; }
}
@media (max-width:782px) and (min-width:768px) { body.admin-bar .hd-appbar { top:46px; } }
@media (max-width:767px) { body.admin-bar .hd-appbar { top:46px; } body.admin-bar .search-panel { top:116px; } }
@media (prefers-reduced-motion:reduce) { .haydemag-v51 .hd-appbar,.haydemag-v51 .hd-app-icon { transition:none; } }
/* Respect existing v5 admin options while keeping the redesigned default. */
@media (max-width:767px) {
 .haydemag-v51:not(.hd-mobile-hide-topbar) .topbar { display:block!important; }
 .haydemag-v51.hd-mobile-no-appbar .site-header,
 .haydemag-v51.hd-mobile-no-appbar .nav-shell { display:block!important; }
 .hd-menu-shortcuts { grid-template-columns:repeat(auto-fit,minmax(122px,1fr)); }
}
@media (max-width:767px) {
  .haydemag-v51 .entry-content,
  .haydemag-v51 .entry-content h1,
  .haydemag-v51 .entry-content h2,
  .haydemag-v51 .entry-content h3,
  .haydemag-v51 .entry-content h4,
  .haydemag-v51 .article-lede,
  .haydemag-v51 blockquote,
  .haydemag-v51 .hd-author-profile {
    font-family:Roboto,"Noto Sans",system-ui,-apple-system,"Segoe UI",Arial,sans-serif!important;
  }
}
