/* Nhanh News — news portal theme for the sites module. Mobile first. */
:root {
  --primary: #b91c1c;
  --primary-ink: color-mix(in srgb, var(--primary) 82%, #000);
  --ink: #16181d;
  --ink-2: #3f4450;
  --ink-3: #5f6470;
  --line: #e6e6e9;
  --soft: #f5f5f6;
  --serif: var(--heading-font, "Merriweather", Georgia, "Times New Roman", serif);
  --sans: var(--body-font, "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  --wrap: 1200px;
  --r: 6px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.6; color: var(--ink); background: #fff; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary-ink); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-family: var(--serif); line-height: 1.3; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 20; padding: 8px 12px; background: #fff; }
.empty { padding: 48px 0; text-align: center; color: var(--ink-2); }
.time { display: block; margin-top: 4px; font-size: 13px; color: var(--ink-3); }
.kicker { display: inline-block; margin-bottom: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--primary-ink); }
.btn { display: inline-block; padding: 10px 20px; border-radius: var(--r); background: var(--primary-ink); color: #fff; font-weight: 600; font-size: 14px; }
.btn:hover { color: #fff; filter: brightness(1.1); }
.btn--ghost { background: var(--soft); color: var(--ink); }
.btn--ghost:hover { color: var(--primary-ink); }

/* Top bar + masthead + navbar */
.topbar { background: #111317; color: #c9cbd1; font-size: 13px; }
.topbar__inner { display: flex; justify-content: space-between; gap: 16px; min-height: 34px; align-items: center; }
.topbar__links { display: flex; gap: 16px; }
.topbar a:hover { color: #fff; }
.masthead__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__img { width: auto; max-height: 48px; }
.brand__text { font-family: var(--serif); font-weight: 900; font-size: 30px; letter-spacing: -0.02em; color: var(--primary-ink); }
.masthead__tagline { display: none; margin: 0; color: var(--ink-3); font-size: 14px; font-style: italic; }
.navbar { position: sticky; top: 0; z-index: 10; background: var(--primary-ink); color: #fff; box-shadow: 0 2px 8px rgb(0 0 0 / 12%); }
.navbar__inner { display: flex; align-items: center; min-height: 46px; }
.navbar ul { display: flex; margin: 0; padding: 0; list-style: none; }
.navbar__links { display: none; flex: 1; }
.navbar__links a { display: flex; align-items: center; height: 46px; padding: 0 14px; font-weight: 600; font-size: 15px; }
.navbar__links a:hover { color: #fff; background: rgb(0 0 0 / 18%); }
.nav__home { padding: 0 12px !important; }
.navbar__m { margin-left: auto; }
.navbar__m summary { display: grid; gap: 5px; width: 44px; height: 44px; padding: 14px 11px; cursor: pointer; list-style: none; }
.navbar__m summary::-webkit-details-marker { display: none; }
.navbar__m summary span { display: block; height: 2px; border-radius: 2px; background: #fff; }
.navbar__drop { position: absolute; left: 0; right: 0; top: 100%; background: #fff; color: var(--ink); box-shadow: 0 12px 24px rgb(0 0 0 / 14%); }
.navbar__drop ul { flex-direction: column; padding: 8px 16px 16px; }
.navbar__drop a { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.navbar__drop .nav__home { display: none; }

/* Breaking ticker */
.ticker { border-bottom: 1px solid var(--line); background: #fff; }
.ticker__inner { display: flex; align-items: center; gap: 12px; min-height: 44px; overflow: hidden; }
.ticker__label { flex-shrink: 0; padding: 4px 10px; border-radius: 4px; background: var(--primary-ink); color: #fff; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.ticker__viewport { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker__track { display: flex; gap: 40px; width: max-content; margin: 0; padding: 0; list-style: none; animation: ticker 60s linear infinite; }
.ticker__track li { white-space: nowrap; font-size: 14px; font-weight: 500; }
.ticker__track li::before { content: "•"; margin-right: 12px; color: var(--primary); }
.ticker:hover .ticker__track, .ticker:focus-within .ticker__track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Featured banner */
.banner { display: grid; gap: 16px; padding-top: 20px; }
.banner__lead { position: relative; overflow: hidden; border-radius: var(--r); background: #111; }
.banner__lead-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; opacity: 0.92; transition: transform 0.5s ease; }
.banner__lead:hover img { transform: scale(1.03); }
.banner__lead-body { position: absolute; inset: auto 0 0 0; padding: 72px 20px 20px; background: linear-gradient(180deg, transparent, rgb(0 0 0 / 82%)); color: #fff; }
.banner__lead-body .kicker { padding: 2px 8px; border-radius: 3px; background: var(--primary-ink); color: #fff; }
.banner__lead-title { font-size: clamp(22px, 3.4vw, 34px); font-weight: 900; }
.banner__lead-title a:hover { color: #fff; text-decoration: underline; }
.banner__lead-excerpt { display: none; margin: 10px 0 0; color: #e5e6ea; font-size: 15px; }
.banner__side { display: grid; gap: 16px; }
.banner__item { position: relative; overflow: hidden; border-radius: var(--r); background: #111; }
.banner__item-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; opacity: 0.9; transition: transform 0.5s ease; }
.banner__item:hover img { transform: scale(1.04); }
.banner__item-body { position: absolute; inset: auto 0 0 0; padding: 48px 16px 14px; background: linear-gradient(180deg, transparent, rgb(0 0 0 / 80%)); color: #fff; }
.banner__item-body .kicker { color: #fecaca; }
.banner__item-title { font-size: 17px; font-weight: 700; }
.banner__item-title a:hover { color: #fff; text-decoration: underline; }
/* A post without a cover: the text sits on the dark card instead of over a picture. */
.banner__lead--plain, .banner__item--plain { display: flex; align-items: flex-end; }
.banner__lead--plain { min-height: 280px; background: linear-gradient(135deg, var(--primary-ink), #111); }
.banner__item--plain { min-height: 132px; background: linear-gradient(135deg, #2a2b31, #111); }
.banner__lead--plain .banner__lead-body, .banner__item--plain .banner__item-body { position: static; background: none; width: 100%; }
.banner__lead--plain .banner__lead-body { padding: 32px 24px 24px; }
.banner__lead--plain .banner__lead-excerpt { display: block; }
.banner__item--plain .banner__item-body { padding: 20px 16px 16px; }
.strip3 { display: grid; gap: 20px; padding-top: 24px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }

/* Cards */
.cardv__media { display: block; overflow: hidden; margin-bottom: 10px; border-radius: var(--r); }
.cardv__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 0.4s ease; }
.cardv:hover .cardv__media img { transform: scale(1.04); }
.cardv__title { font-size: 17px; font-weight: 700; }
.cardh { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: start; }
.cardh__media { display: block; overflow: hidden; border-radius: var(--r); }
.cardh__media img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; }
.cardh__title { font-size: 16px; font-weight: 700; }
.cardh__excerpt { display: none; margin: 6px 0 0; color: var(--ink-2); font-size: 14px; }

/* Columns + blocks */
.columns { display: grid; gap: 32px; padding-top: 28px; padding-bottom: 48px; }
.columns__main { min-width: 0; }
.block + .block { margin-top: 36px; }
.block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.block__title { position: relative; font-size: 20px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.02em; }
.block__title::after { content: ""; position: absolute; left: 0; bottom: -10px; width: 56px; height: 2px; background: var(--primary); }
.block__more { font-size: 13px; font-weight: 600; color: var(--primary-ink); }
.block__list { display: flex; flex-direction: column; gap: 18px; }
.block__list .cardh { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.catblock { display: grid; gap: 18px; }
.catblock__excerpt { margin: 8px 0 0; color: var(--ink-2); font-size: 14px; }
.catblock__list { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.catblock__list .cardh { grid-template-columns: 100px minmax(0, 1fr); }
.catblock__list .cardh__title { font-size: 15px; }
.pager { display: flex; justify-content: center; gap: 12px; margin-top: 28px; }

/* Sidebar widgets */
.widget + .widget { margin-top: 28px; }
.widget__title { margin-bottom: 14px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); font-size: 18px; font-weight: 900; text-transform: uppercase; }
.mostread { margin: 0; padding: 0; list-style: none; counter-reset: rank; }
.mostread li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); counter-increment: rank; font-family: var(--serif); font-weight: 700; font-size: 15px; line-height: 1.4; }
.mostread li::before { content: counter(rank); font-size: 28px; line-height: 1; font-weight: 900; color: color-mix(in srgb, var(--primary) 70%, #fff); }
.catlist { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 0; list-style: none; }
.catlist a { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: var(--r); background: var(--soft); font-weight: 600; font-size: 14px; }
.catlist img { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; }

/* Listing */
.listhead { position: relative; overflow: hidden; background: #15171c; color: #fff; }
.listhead__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.32; }
.listhead__body { position: relative; padding-top: 32px; padding-bottom: 32px; }
.listhead__title { font-size: clamp(28px, 4vw, 40px); font-weight: 900; }
.listhead__desc { max-width: 680px; margin: 8px 0 0; color: #dedfe3; }
.listhead .crumbs, .listhead .crumbs a { color: #dedfe3; }
.listlead { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.listlead .cardh { grid-template-columns: 1fr; }
.listlead .cardh__title { font-size: 24px; }
.listlead .cardh__excerpt { display: block; font-size: 15px; }
.grid3 { display: grid; gap: 24px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; color: var(--ink-3); }
.crumbs a:hover { text-decoration: underline; }

/* Article */
.article__title { font-size: clamp(26px, 4vw, 38px); font-weight: 900; line-height: 1.25; }
.article__meta { display: flex; align-items: center; gap: 14px; margin: 12px 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.article__meta .kicker, .article__meta .time { margin: 0; }
.article__cover { margin: 0 0 20px; }
.article__cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r); }
.prose { font-family: var(--serif); font-size: 18px; line-height: 1.75; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose h2 { margin: 1.5em 0 0.5em; font-size: 23px; }
.prose li { margin-bottom: 0.4em; }
.prose a { color: var(--primary-ink); text-decoration: underline; }
.prose blockquote { margin: 1.5em 0; padding: 14px 18px; border-left: 4px solid var(--primary); background: var(--soft); font-size: 16px; font-style: italic; }
.prose img { border-radius: var(--r); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.tags a { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--soft); font-size: 13px; font-weight: 500; }
.share { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.share a { padding: 6px 14px; border-radius: var(--r); background: var(--soft); }
.notfound { padding: 96px 16px; text-align: center; }
.notfound__code { margin: 0; font-family: var(--serif); font-weight: 900; font-size: 96px; line-height: 1; color: var(--primary-ink); }

/* Footer */
.footer { padding: 48px 0 20px; background: #111317; color: #c9cbd1; font-size: 14px; }
.footer a:hover { color: #fff; }
.footer__grid { display: grid; gap: 28px; }
.footer__brand { margin: 0; font-family: var(--serif); font-weight: 900; font-size: 24px; color: #fff; }
.footer__about { margin: 10px 0 0; max-width: 360px; }
.footer__head { margin: 0 0 10px; font-weight: 700; color: #fff; text-transform: uppercase; font-size: 13px; letter-spacing: 0.06em; }
.footer__cats, .footer__menu { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.footer__cats { grid-template-columns: 1fr 1fr; }
.footer__copy { margin-top: 32px; padding-top: 16px; border-top: 1px solid #2a2d33; color: #9a9ca3; font-size: 13px; }

@media (min-width: 640px) {
  .strip3 { grid-template-columns: repeat(3, 1fr); }
  .grid3 { grid-template-columns: repeat(2, 1fr); }
  .cardh { grid-template-columns: 200px minmax(0, 1fr); gap: 16px; }
  .cardh__excerpt { display: block; }
  .catblock__list .cardh__excerpt { display: none; }
  .banner__lead-excerpt { display: block; }
  .masthead__tagline { display: block; }
  .footer__grid { grid-template-columns: 1.4fr 1.2fr 1fr; }
}
@media (min-width: 1000px) {
  .navbar__links { display: block; }
  .navbar__m { display: none; }
  .banner { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .banner__lead-media img { aspect-ratio: auto; height: 100%; min-height: 460px; }
  .banner__side { grid-template-rows: 1fr 1fr; }
  .banner__item-media img { aspect-ratio: auto; height: 100%; min-height: 222px; }
  .layout-portal .columns { grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; }
  .columns--article { grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; }
  .columns__side { position: sticky; top: 64px; align-self: start; }
  .catblock { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; }
  .grid3 { grid-template-columns: repeat(3, 1fr); }
  .layout-wide .catblock { grid-template-columns: minmax(0, 1.3fr) minmax(0, 2fr); }
  .layout-wide .catblock__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .layout-wide .catblock__list .cardh { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; }
  * { transition: none !important; }
}
