/* In Work News — Clean Modern UI (works with existing template classes)
   Targets: .container .nav .brand .badge .navlinks .pill .cta .footer .btnrow
*/

:root{
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface2: #f1f5f9;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --shadow: 0 14px 34px rgba(15, 23, 42, 0.10);

  --accent: #2563eb;
  --accent2: #1d4ed8;
  --accentSoft: rgba(37, 99, 235, 0.10);

  --radius: 18px;
  --radiusSm: 12px;
  --maxw: 1040px;
}

@media (prefers-color-scheme: dark){
  :root{
    --bg: #0b1220;
    --surface: #0f172a;
    --surface2: #111c33;
    --text: #e5e7eb;
    --muted: #a8b3c7;
    --border: rgba(148,163,184,.22);
    --shadow: 0 16px 40px rgba(0,0,0,.45);
    --accentSoft: rgba(37, 99, 235, 0.18);
  }
}

*{ box-sizing:border-box; }
html, body{
  margin:0;
  padding:0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  line-height:1.6;
}

img{ max-width:100%; height:auto; }

a{
  color: var(--accent);
  text-decoration:none;
}
a:hover{ text-decoration:underline; }

.container{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 18px 28px;
}

/* --- Top nav --- */
.nav{
  position: sticky;
  top: 0;
  z-index: 50;
  margin: 0 -18px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(10px);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand img{
  width: 30px;
  height: 30px;
  border-radius: 10px;
  padding: 6px;
  background: radial-gradient(450px 140px at 20% 0%, var(--accentSoft), transparent 70%);
  border: 1px solid color-mix(in srgb, var(--border) 60%, var(--accent));
}

.badge{
  margin-left: 8px;
  font-size: 12px;
  font-weight: 800;
  color: color-mix(in srgb, var(--text) 75%, var(--muted));
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  white-space: nowrap;
}

.navlinks{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* --- Buttons --- */
.pill,
.cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  border-radius: 999px;
  padding: 10px 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  user-select:none;
  text-decoration:none !important;
}

.pill{
  background: var(--surface);
  border-color: var(--border);
  color: var(--muted);
}
.pill:hover{
  background: var(--surface2);
  color: var(--text);
  text-decoration:none;
}

.cta{
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: #fff !important;
  box-shadow: 0 14px 28px rgba(37,99,235,0.24);
}
.cta:hover{
  filter: brightness(0.98);
  text-decoration:none;
}

/* --- Page sections / cards --- */
.card,
.panel,
.hero,
.post{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* If your pages already have generic wrappers, make them look like cards */
.page,
.content,
.main,
.body{
  margin-top: 16px;
}

/* Headings */
h1, h2, h3{
  letter-spacing: -0.03em;
  line-height: 1.2;
}
h1{ font-size: 30px; margin: 18px 0 10px; }
h2{ font-size: 20px; margin: 18px 0 10px; }
h3{ font-size: 16px; margin: 16px 0 8px; }
p{ margin: 10px 0; color: var(--text); }
small, .muted{ color: var(--muted); }

/* Make common blocks look good even if templates are simple */
hr{
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 18px 0;
}

ul, ol{ padding-left: 20px; }
li{ margin: 6px 0; }

/* Source buttons if you output them */
button, input[type="submit"]{
  font-family: inherit;
}

.source-buttons,
.btnrow{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Forms/buttons that act like links */
form{ margin: 0; }
form button{
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 12px;
  font-weight: 800;
  cursor:pointer;
}
form button:hover{
  border-color: color-mix(in srgb, var(--border) 60%, var(--accent));
}

/* --- Footer --- */
.footer{
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  display:grid;
  gap: 12px;
}

/* Make the big CTA appear top + bottom nicely */
.footer .cta{
  width: 100%;
  text-align:center;
}

/* Responsive tweaks */
@media (max-width: 520px){
  .container{ padding: 14px 14px 22px; }
  .nav{ margin: 0 -14px; padding: 12px 14px; }
  h1{ font-size: 26px; }
  .badge{ display:none; }
}
