:root{
  --bg:#f4f7fb;
  --bg-soft:#eef3f9;
  --surface:#ffffff;
  --surface-2:#f8fbff;
  --ink:#142033;
  --muted:#627089;
  --line:#dbe5f0;
  --line-strong:#c8d5e4;
  --accent:#2563eb;
  --accent-2:#7c3aed;
  --accent-soft:rgba(37,99,235,.08);
  --success:#138a52;
  --warn:#9a6700;
  --shadow:0 10px 30px rgba(23,43,77,.08);
  --shadow-sm:0 6px 18px rgba(23,43,77,.06);
  --radius:20px;
}

*{ box-sizing:border-box; }

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.08), transparent 28%),
    radial-gradient(circle at top right, rgba(124,58,237,.06), transparent 26%),
    linear-gradient(180deg, #f8fbff 0%, #f3f7fc 100%);
  color:var(--ink);
}

a{
  color:inherit;
}

.wrap{
  max-width:1240px;
  margin:0 auto;
  padding:28px 20px 40px;
}

/* Top area */
.topbar{
  display:grid;
  grid-template-columns: 1fr auto auto;
  gap:16px;
  align-items:center;
  padding:18px 20px;
  margin-bottom:22px;
  background:rgba(255,255,255,.78);
  backdrop-filter: blur(14px);
  border:1px solid rgba(255,255,255,.7);
  box-shadow:var(--shadow-sm);
  border-radius:24px;
}

@media (max-width: 980px){
  .topbar{
    grid-template-columns:1fr;
  }
}

.brand{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.brand h1{
  margin:0;
  font-size:clamp(1.5rem, 2vw, 2rem);
  font-weight:800;
  letter-spacing:-.03em;
  color:#0f172a;
}

.brand .sub{
  color:var(--muted);
  font-size:13px;
  letter-spacing:.02em;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border-radius:999px;
  background:linear-gradient(180deg, #ffffff, #f2f7ff);
  border:1px solid var(--line);
  font-size:12px;
  color:var(--muted);
  font-weight:600;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9);
}

form{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

input{
  min-width:180px;
  padding:11px 13px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--ink);
  outline:none;
  transition:border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}

input:focus{
  border-color:rgba(37,99,235,.45);
  box-shadow:0 0 0 4px rgba(37,99,235,.10);
}

button{
  padding:11px 14px;
  border-radius:14px;
  border:1px solid rgba(37,99,235,.18);
  background:linear-gradient(135deg, var(--accent), #3b82f6);
  color:#fff;
  cursor:pointer;
  font-weight:700;
  box-shadow:0 8px 20px rgba(37,99,235,.18);
  transition:transform .15s ease, box-shadow .2s ease, filter .2s ease;
}

button:hover{
  transform:translateY(-1px);
  filter:brightness(1.03);
  box-shadow:0 12px 24px rgba(37,99,235,.22);
}

.note,
.warn{
  padding:14px 16px;
  border-radius:16px;
  margin:14px 0;
  font-size:13px;
  line-height:1.55;
  box-shadow:var(--shadow-sm);
}

.note{
  background:linear-gradient(180deg, #eef6ff, #f8fbff);
  border:1px solid #cfe1ff;
  color:#1d4f91;
}

.warn{
  background:linear-gradient(180deg, #fff7df, #fffaf0);
  border:1px solid #f0d58a;
  color:#7a5a00;
}

/* Layout */
.grid{
  display:grid;
  grid-template-columns:minmax(0, 2.2fr) 340px;
  gap:20px;
}

@media (max-width: 1080px){
  .grid{
    grid-template-columns:1fr;
  }
}

/* Hero */
.hero{
  position:relative;
  overflow:hidden;
  border-radius:28px;
  background:
    linear-gradient(135deg, rgba(37,99,235,.95), rgba(124,58,237,.90)),
    #1e293b;
  color:#fff;
  box-shadow:0 24px 60px rgba(37,99,235,.22);
}

.hero::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,.18), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(255,255,255,.12), transparent 22%);
  pointer-events:none;
}

.hero-in{
  position:relative;
  display:grid;
  grid-template-columns:1.12fr .88fr;
  min-height:420px;
}

@media (max-width: 980px){
  .hero-in{
    grid-template-columns:1fr;
  }
}

.hero-img{
  position:relative;
  max-height:480px;
  background:rgba(255,255,255,.08);
}

.hero-img::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg, rgba(15,23,42,.00), rgba(15,23,42,.12));
}

.hero-img img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.hero-body{
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:34px 32px;
}

.kicker{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin-bottom:12px;
}

.chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.18);
  color:#fff;
  backdrop-filter: blur(6px);
}

.meta{
  color:rgba(255,255,255,.76);
  font-size:12px;
  font-weight:500;
}

.hero-title{
  margin:6px 0 14px;
  font-size:clamp(1rem, 1vw, 2.7rem);
  line-height:1.05;
  letter-spacing:-.04em;
  font-weight:750;
}

.hero-title a{
  text-decoration:none;
}

.hero-title a:hover{
  text-decoration:underline;
  text-decoration-thickness:2px;
  text-underline-offset:4px;
}

.hero-snippet{
  max-width:60ch;
  color:rgba(255,255,255,.88);
  font-size:15px;
  line-height:1.75;
}

/* Panels */
.panel{
  border:1px solid rgba(255,255,255,.8);
  border-radius:24px;
  background:rgba(255,255,255,.82);
  backdrop-filter: blur(12px);
  padding:18px;
  box-shadow:var(--shadow-sm);
}

.panel h3{
  margin:0 0 12px;
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.12em;
  color:#3c4a63;
}

.trend{
  display:grid;
  grid-template-columns:24px 1fr;
  gap:12px;
  padding:14px 0;
  border-top:1px solid var(--line);
}

.trend:first-of-type{
  border-top:none;
  padding-top:4px;
}

.trend a{
  text-decoration:none;
  font-weight:700;
  color:#122033;
  line-height:1.4;
}

.trend a:hover{
  color:var(--accent);
}

.trend .tmeta{
  color:var(--muted);
  font-size:12px;
  margin-top:6px;
}

.tidx{
  display:flex;
  align-items:flex-start;
  justify-content:center;
  width:24px;
  height:24px;
  border-radius:999px;
  background:var(--accent-soft);
  color:var(--accent);
  font-size:12px;
  font-weight:800;
  padding-top:4px;
}

/* Sections */
.section{
  margin-top:24px;
}

.section-head{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:10px;
  margin:0 0 14px;
  padding:0 4px;
}

.section-head h2{
  margin:0;
  font-size:20px;
  letter-spacing:-.03em;
  color:#0f172a;
}

.section-head .small{
  color:var(--muted);
  font-size:12px;
  font-weight:600;
}

/* Cards */
.cards{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:16px;
}

@media (max-width: 1100px){
  .cards{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px){
  .cards{
    grid-template-columns:1fr;
  }
}

.card{
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border-radius:22px;
  border:1px solid rgba(255,255,255,.9);
  background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,251,255,.96));
  box-shadow:var(--shadow-sm);
  transition:transform .18s ease, box-shadow .22s ease, border-color .2s ease;
}

.card:hover{
  transform:translateY(-4px);
  box-shadow:0 18px 36px rgba(23,43,77,.12);
  border-color:#d5e2f0;
}

.card .thumb{
  aspect-ratio:16/9;
  background:linear-gradient(135deg, #e9eff8, #f7faff);
  overflow:hidden;
}

.card .thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .35s ease;
}

.card:hover .thumb img{
  transform:scale(1.03);
}

.card .body{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:16px;
}

.card .body .meta{
  color:var(--muted);
  font-size:12px;
  font-weight:600;
}

.card .title{
  margin:0;
  font-size:17px;
  line-height:1.35;
  letter-spacing:-.02em;
  color:#0f172a;
}

.card .title a{
  text-decoration:none;
}

.card .title a:hover{
  color:var(--accent);
}

.card .snippet{
  color:#4c5b73;
  font-size:13px;
  line-height:1.65;
}

/* Action buttons */
.actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:8px;
}

.btnlink{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:9px 11px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  color:#23324a;
  text-decoration:none;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  transition:all .18s ease;
}

.btnlink:hover{
  background:#f3f8ff;
  border-color:#cfe0f5;
  color:var(--accent);
  transform:translateY(-1px);
}

.toast{
  font-size:12px;
  color:var(--success);
  font-weight:700;
  display:none;
}

/* Auth */
.site-auth{
  display:flex;
  align-items:center;
  gap:12px;
  padding:8px 12px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.82);
  border-radius:16px;
  box-shadow:var(--shadow-sm);
  z-index:500;
}

.site-auth__welcome{
  font-size:13px;
  color:#22314a;
  font-weight:600;
}

.site-auth__logout{
  margin:0;
  display:inline-block;
}

.site-auth button{
  padding:8px 12px;
  border:1px solid #d7e1ec;
  background:#fff;
  color:#1f2e45;
  border-radius:12px;
  font-weight:700;
  box-shadow:none;
}

.site-auth button:hover{
  background:#f6f9fd;
}

/* Nav */
.nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.nav a{
  color:#22314a;
  font-size:13px;
  font-weight:700;
  padding:9px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  text-decoration:none;
  background:rgba(255,255,255,.86);
  transition:all .18s ease;
}

.nav a:hover{
  color:var(--accent);
  border-color:#cfe0f5;
  background:#f4f8ff;
}

/* Footer */
.footer{
  margin-top:30px;
  padding:20px 8px 4px;
  border-top:1px solid rgba(98,112,137,.16);
  color:var(--muted);
  font-size:12px;
}

.footer .btnlink{
  background:rgba(255,255,255,.82);
}

/* Better empty thumbs */
.thumb:empty::before,
.hero-img:empty::before{
  content:"No image available";
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
  color:#7a8aa3;
  font-size:13px;
  font-weight:600;
}
