/* ============ AINsf — global styles ============ */
/* This file is served from /<base>/global.css, so url() paths are RELATIVE
   to it (assets/... → /<base>/assets/...) and work regardless of base path. */

@font-face {
  font-family: "Basis Grotesque Pro";
  src: url("assets/fonts/BasisGrotesquePro-Regular.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Skema Pro News";
  src: url("assets/fonts/SkemaProNews-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IngramMono";
  src: url("assets/fonts/ingram-mono-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --red: #ff3138;
  --red-dark: #e2282f;
  --text: #1c1c1e;
  --text-soft: #3f3f44;
  --gray: #9a9aa0;
  --gray-2: #6f6f75;
  --card: #f2f2f3;
  --line: #e8e8ea;
  --pink: #fadcdc;
  --radius: 20px;
  --font: "Basis Grotesque Pro", -apple-system, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IngramMono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --font-serif: "Skema Pro News", Georgia, "Times New Roman", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, svg { display: block; }

/* ============ Header ============ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1420px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 92px;
}
.logo-img { height: 42px; width: auto; }

.header-actions { display: flex; align-items: center; gap: 38px; }
.action {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  background: none;
  border: none;
  transition: color .15s ease;
}
.action:hover { color: var(--red); }
.community-icon { width: 28px; height: 15px; }
.action-icon { width: 19px; height: 19px; }

.search-bar {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  animation: dropIn .18s ease;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
.search-bar-inner {
  max-width: 1420px;
  margin: 0 auto;
  padding: 16px 40px;
  display: flex;
  gap: 14px;
}
.search-bar input {
  flex: 1;
  font: inherit;
  font-size: 17px;
  padding: 12px 18px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  outline: none;
}
.search-bar input:focus { border-color: var(--red); }
.search-submit {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0 28px;
  font-size: 16px;
  font-weight: 600;
  transition: background .15s ease;
}
.search-submit:hover { background: var(--red-dark); }

/* ============ Layout ============ */

.layout {
  max-width: 1420px;
  margin: 0 auto;
  padding: 26px 40px 40px;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 370px;
  gap: 60px;
  align-items: start;
}
.layout.no-rail { grid-template-columns: 210px minmax(0, 1fr); }

/* ============ Sidebar ============ */

.sidebar { position: sticky; top: 118px; }
.sidebar nav { display: flex; flex-direction: column; }
.nav-item {
  padding: 13px 0;
  font-size: 23px;
  font-weight: 500;
  color: var(--gray);
  letter-spacing: -0.2px;
  transition: color .15s ease;
}
.nav-item:hover { color: var(--text); }
.nav-item.active { color: var(--text); font-weight: 600; }

.media-kit {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
  padding: 14px 26px;
  background: var(--red);
  color: #fff;
  font-size: 19px;
  font-weight: 600;
  border-radius: 999px;
  transition: background .15s ease, transform .15s ease;
}
.media-kit:hover { background: var(--red-dark); transform: translateX(2px); }
.media-kit img { width: 18px; height: 18px; }

/* ============ Feed ============ */

.feed-title { font-size: 21px; font-weight: 700; margin-bottom: 26px; }
.section-title { font-size: 34px; margin-bottom: 34px; }

.post {
  padding-bottom: 44px;
  margin-bottom: 44px;
  border-bottom: 1px solid var(--line);
}
.post:last-of-type { border-bottom: none; }
.post-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.date { font-family: var(--font-mono); font-size: 14px; color: var(--gray); }
.tag {
  font-size: 13.5px;
  font-weight: 600;
  background: var(--card);
  color: var(--text);
  padding: 5px 13px;
  border-radius: 999px;
}
.author { font-size: 15px; color: var(--gray-2); }
.post-title {
  font-size: 29px;
  font-weight: 650;
  line-height: 1.22;
  letter-spacing: -0.3px;
  margin-bottom: 14px;
}
.post-title a { transition: color .15s ease; }
.post-title a:hover { color: var(--red); }
.post-excerpt {
  font-size: 16.5px;
  line-height: 1.5;
  color: var(--text-soft);
  margin-bottom: 26px;
  max-width: 640px;
}
.post-image {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  overflow: hidden;
}
.post-image img,
.post-image > div {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.post-image:hover img,
.post-image:hover > div { transform: scale(1.015); }

.no-results { padding: 40px 0; font-size: 17px; color: var(--gray-2); }

/* Recreated cover artwork */
.img-generic {
  position: relative;
  aspect-ratio: 640 / 356;
  display: flex;
  align-items: flex-end;
  padding: 34px;
}
.generic-badge {
  position: absolute;
  top: 28px;
  left: 34px;
  background: rgba(255, 255, 255, .92);
  color: #1c1c1e;
  font-size: 14px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 999px;
}
.generic-badge.badge-dark { background: rgba(12, 12, 16, .75); color: #fff; }
.generic-title {
  font-size: 46px;
  font-weight: 800;
  letter-spacing: -1px;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .25);
}

/* ============ Right rail ============ */

.rail { position: sticky; top: 118px; display: flex; flex-direction: column; gap: 30px; }

.editors-card { display: block; border-radius: var(--radius); overflow: hidden; background: var(--card); }
.editors-media {
  position: relative;
  aspect-ratio: 370 / 280;
  overflow: hidden;
}
.editors-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.editors-overlay {
  position: absolute;
  inset: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(6, 10, 14, .5) 0%, rgba(6, 10, 14, .32) 40%, rgba(6, 10, 14, .92) 100%);
}
.editors-pill { align-self: flex-start; }
.story-bars { display: flex; gap: 5px; margin-bottom: 14px; }
.story-bars i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .35); }
.story-bars i.filled { background: var(--red); animation: fillBar 3s ease forwards; transform-origin: left; }
@keyframes fillBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.editors-pill {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 999px;
}
.editors-quote {
  margin-top: auto;
  color: #f2ede4;
  font-family: var(--font-serif);
  font-size: 14.5px;
  line-height: 1.45;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.editors-caption {
  padding: 24px 26px 28px;
  font-size: 18.5px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--text);
  transition: color .15s ease;
}
.editors-card:hover .editors-caption { color: var(--red); }

.top-news, .hot-news { background: var(--card); border-radius: var(--radius); padding: 28px 26px; }
.top-news h2, .hot-news h2 { font-size: 22px; font-weight: 700; margin-bottom: 20px; }
.top-news ol { list-style: none; }
.top-news li { padding: 14px 0; border-bottom: 1px solid #e0e0e2; }
.top-news li:last-child { border-bottom: none; padding-bottom: 4px; }
.topnews-item { display: flex; align-items: center; gap: 12px; }
.num {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border: 1.6px solid var(--red);
  border-radius: 50%;
  color: var(--red);
  font-size: 14.5px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.topnews-thumb {
  flex-shrink: 0;
  width: 84px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
}
.topnews-title { font-size: 14.5px; line-height: 1.36; font-weight: 500; transition: color .15s ease; }
.topnews-item:hover .topnews-title { color: var(--red); }

.hot-item { display: flex; gap: 13px; padding: 18px 0; border-bottom: 1px solid #e0e0e2; }
.hot-item:last-child { border-bottom: none; padding-bottom: 4px; }
.hot-thumb { flex-shrink: 0; width: 96px; height: 64px; border-radius: 10px; object-fit: cover; }
.hot-text { min-width: 0; }
.hot-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.hot-meta .date { margin-right: 4px; }
.hot-tag { font-size: 12.5px; font-weight: 600; background: #fff; padding: 4px 11px; border-radius: 999px; }
.hot-title { font-size: 15.5px; line-height: 1.42; font-weight: 500; transition: color .15s ease; }
.hot-item:hover .hot-title { color: var(--red); }

/* Survey card */
.survey-card { background: var(--pink); border-radius: var(--radius); padding: 26px; }
.survey-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.survey-kicker { font-size: 12px; font-weight: 600; letter-spacing: .6px; color: #5c3434; text-transform: uppercase; }
.survey-logo img { height: 18px; width: auto; }
.survey-card h2 { font-size: 26px; font-weight: 700; line-height: 1.2; letter-spacing: -0.3px; margin-bottom: 22px; }
.survey-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: #fff;
  border: none;
  border-radius: 14px;
  padding: 16px 20px;
  font-size: 16.5px;
  font-weight: 600;
  color: var(--text);
  transition: transform .15s ease, box-shadow .15s ease;
}
.survey-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 0, 0, .08); }
.survey-btn img { width: 16px; height: 17px; }

/* ============ Article page ============ */

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--gray); margin-bottom: 18px; }
.breadcrumbs a { color: var(--gray-2); transition: color .15s ease; }
.breadcrumbs a:hover { color: var(--red); }
.breadcrumbs .crumb-sep { color: #c9c9ce; }
.breadcrumbs .current { max-width: 340px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.article-title { font-size: 42px; font-weight: 700; line-height: 1.14; letter-spacing: -0.8px; margin-bottom: 22px; }
.article-meta { display: flex; align-items: center; gap: 16px; margin-bottom: 34px; }
.article-meta .date { font-size: 15px; }
.byline { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text-soft); }
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c96f3f, #7a4028);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 700;
}

.article-hero-figure { margin: 0 0 20px; }
.article-hero-frame {
  position: relative;
  aspect-ratio: 1600 / 900;
  border-radius: 22px;
  overflow: hidden;
}
.article-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.hero-caption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--gray-2);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.hero-credit {
  display: inline;
  color: var(--gray);
  font-size: 12.5px;
}
.hero-credit::before { content: " · "; color: var(--gray); }

.article-hero {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 760 / 390;
  margin-bottom: 36px;
  padding: 28px 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.article-hero .money-stack { position: absolute; inset: 0; overflow: hidden; opacity: .55; }
.article-hero .money-stack i { position: absolute; width: 46%; height: 34px; border-radius: 12px; left: 42%; }
.article-hero .money-stack i:nth-child(1) { top: 8%; background: #b45bd2; transform: rotate(-9deg); }
.article-hero .money-stack i:nth-child(2) { top: 19%; background: #4fb6e8; transform: rotate(-4deg) translateX(3%); }
.article-hero .money-stack i:nth-child(3) { top: 30%; background: #f2c744; transform: rotate(-8deg); }
.article-hero .money-stack i:nth-child(4) { top: 41%; background: #ef7fae; transform: rotate(-3deg) translateX(4%); }
.article-hero .money-stack i:nth-child(5) { top: 52%; background: #58d0a6; transform: rotate(-7deg); }
.article-hero .money-stack i:nth-child(6) { top: 63%; background: #7f8ff2; transform: rotate(-5deg) translateX(2%); }
.hero-top { position: relative; display: flex; align-items: center; gap: 14px; }
.htw-logo { display: grid; grid-template-columns: repeat(2, 17px); grid-template-rows: repeat(2, 17px); gap: 2px; }
.htw-logo i { border-radius: 3px; }
.htw-logo i:nth-child(1) { background: #67c93c; }
.htw-logo i:nth-child(2) { background: #8e5be8; }
.htw-logo i:nth-child(3) { background: #2f9df4; }
.htw-logo i:nth-child(4) { background: #f4c22f; }
.hero-event { color: #fff; font-size: 13.5px; font-weight: 700; letter-spacing: .8px; line-height: 1.35; }
.hero-event span { font-weight: 400; color: rgba(255, 255, 255, .82); letter-spacing: .3px; }
.hero-text { position: relative; color: #fff; font-size: 27px; font-weight: 800; line-height: 1.28; letter-spacing: -0.2px; max-width: 92%; }
.hero-text .hl { color: #8ce23c; }
.hero-note { position: relative; margin-top: 12px; color: rgba(255, 255, 255, .92); font-size: 15px; font-weight: 600; }

/* Markdown body ("content that shines") */
.article-body {
  font-size: 18.5px;
  line-height: 1.62;
  color: #222;
  max-width: 720px;
}
.article-body > *:first-child { margin-top: 0; }
.article-body p { margin: 0 0 26px; }
.article-body h2 {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.25;
  margin: 40px 0 16px;
}
.article-body h3 { font-size: 20px; font-weight: 700; margin: 32px 0 12px; }
.article-body strong { font-weight: 700; color: #111; }
.article-body a { color: var(--red); text-decoration: underline; text-underline-offset: 2px; }
.article-body ul { list-style: none; margin: 0 0 26px; }
.article-body li { position: relative; padding-left: 26px; margin-bottom: 16px; }
.article-body li::before {
  content: "";
  position: absolute;
  left: 3px; top: 11px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--red);
}
.article-body blockquote {
  border-left: 3px solid var(--red);
  padding-left: 20px;
  margin: 0 0 26px;
  font-family: var(--font-serif);
  font-size: 21px;
  line-height: 1.4;
  color: #333;
}
.article-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }

/* ============ About page ============ */

.about-page { max-width: 780px; }
.about-lead {
  font-size: 22px !important;
  line-height: 1.5 !important;
  color: var(--text) !important;
  font-weight: 500;
  margin-bottom: 30px !important;
}
.about-body h2 { margin-top: 44px; }
.about-contacts { margin: 8px 0 26px; }
.about-contacts li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: baseline;
  padding-left: 0 !important;
  margin-bottom: 12px !important;
}
.about-contacts li::before { display: none !important; }
.about-contacts span {
  min-width: 210px;
  font-weight: 600;
  color: var(--text);
}
.about-contacts a { color: var(--red); text-decoration: none; }
.about-contacts a:hover { text-decoration: underline; }
.about-note {
  margin-top: 36px !important;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 14px !important;
  color: var(--gray-2) !important;
}

/* ============ Coming soon ============ */

.coming-soon h1 { font-size: 34px; font-weight: 650; letter-spacing: -0.4px; line-height: 1.2; margin-bottom: 20px; max-width: 460px; }
.coming-soon p { font-size: 16.5px; line-height: 1.55; color: var(--text-soft); max-width: 440px; margin-bottom: 28px; }
.cs-btn {
  display: inline-block;
  border: 1.5px solid var(--red);
  color: var(--red);
  font-size: 16px;
  font-weight: 600;
  padding: 13px 30px;
  border-radius: 999px;
  transition: background .15s ease, color .15s ease;
}
.cs-btn:hover { background: var(--red); color: #fff; }

/* ============ Footer ============ */

.site-footer { border-top: 1px solid var(--line); margin-top: 20px; }
.footer-top {
  max-width: 1420px;
  margin: 0 auto;
  padding: 46px 40px 34px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  align-items: start;
}
.footer-logo img { height: 26px; width: auto; }
.footer-map { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.fcol { display: flex; flex-direction: column; }
.fcol-head { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 14px; }
a.fcol-head:hover { color: var(--red); }
.fcol a { font-size: 14.5px; color: var(--gray-2); padding: 6px 0; transition: color .15s ease; }
.fcol a:hover { color: var(--red); }
.footer-social a { display: inline-flex; align-items: center; gap: 9px; }
.footer-social img { width: 15px; height: 15px; opacity: .7; transition: opacity .15s ease; }
.footer-social a:hover img { opacity: 1; }
.footer-legal {
  max-width: 1420px;
  margin: 0 auto;
  padding: 22px 40px 36px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--gray-2);
}
.footer-legal p { max-width: 900px; }
.footer-legal a { color: var(--gray-2); text-decoration: underline; text-underline-offset: 2px; }
.footer-legal a:hover { color: var(--red); }
.footer-legal strong { color: var(--text); font-weight: 700; }
.footer-copy-line { color: var(--gray); font-weight: 600; }

/* ============ Search page ============ */

.search-page { max-width: 860px; }
.search-field-wrap { position: relative; margin-bottom: 14px; }
.search-field-icon {
  position: absolute;
  left: 20px; top: 50%;
  transform: translateY(-50%);
  width: 20px; height: 20px;
  opacity: .5;
  pointer-events: none;
}
#searchField {
  width: 100%;
  font: inherit;
  font-size: 19px;
  padding: 18px 22px 18px 52px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  outline: none;
  transition: border-color .15s ease;
}
#searchField:focus { border-color: var(--red); }
.search-hint { font-size: 14px; color: var(--gray-2); margin-bottom: 30px; }

/* ============ Responsive ============ */

@media (max-width: 1240px) {
  .layout, .layout.no-rail { grid-template-columns: 190px minmax(0, 1fr); }
  .rail { grid-column: 2; position: static; flex-direction: row; flex-wrap: wrap; }
  .rail > * { flex: 1 1 320px; }
  .footer-map { grid-template-columns: repeat(2, 1fr); row-gap: 30px; }
}
@media (max-width: 820px) {
  .header-inner { height: 72px; padding: 0 20px; }
  .search-bar-inner { padding: 16px 20px; }
  .header-actions { gap: 18px; }
  .action { font-size: 15px; }
  .layout, .layout.no-rail { grid-template-columns: 1fr; padding: 18px 20px 40px; gap: 34px; }
  .sidebar { position: static; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; gap: 4px 22px; align-items: center; }
  .nav-item { font-size: 18px; padding: 8px 0; }
  .media-kit { margin-top: 6px; padding: 10px 20px; font-size: 16px; }
  .article-title { font-size: 30px; }
  .hero-text { font-size: 19px; }
  .footer-top { grid-template-columns: 1fr; padding: 30px 20px 24px; }
  .footer-map { grid-template-columns: 1fr 1fr; }
  .footer-legal { padding: 20px 20px 30px; }
}
