/* Theme "beacon": a contemporary startup/tech news identity — dark
   navy-charcoal masthead and footer bookending light, airy content
   sections in between (rather than a fully dark or fully light site like
   several other themes here). Sans-serif throughout (Inter, no serif),
   bold headline weights, a muted secondary blue alongside the site's own
   configurable --accent, and image-overlay "showcase" cards for
   categories. Same renderHome/renderCategory/renderPost/renderTag/
   renderSearch/renderAbout contract as every other theme
   (see functions/_themes/beacon.js). */

:root {
  --navy-900:#0b0f15; --navy-800:#121822; --navy-700:#1c2530;
  --ink-900:#12151b; --ink-700:#3a414c; --ink-500:#6b7280; --ink-300:#c7ccd3; --ink-100:#eef0f3;
  --paper:#f7f8fa; --paper-raised:#ffffff;
  --accent: #3b6df0; /* overridden per-site by documentShell's inline :root style */
  --accent2: #6fa8ff;
  --radius:10px;
  --shadow-sm:0 1px 2px rgba(11,15,21,.06);
  --shadow-md:0 10px 30px rgba(11,15,21,.10);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--paper); color: var(--ink-900); }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
.wrap { max-width: 1260px; margin: 0 auto; padding: 0 20px; }

/* ---- Placeholder image system ---- */
.ph { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; object-fit: cover; overflow: hidden; background: linear-gradient(135deg,#1c2530,#2a3644 60%,#1c2530); color: rgba(255,255,255,.3); }
.ph.tone-blue { background: linear-gradient(135deg,#132234,#1d3a5c 60%,#132234); }
.ph.tone-teal { background: linear-gradient(135deg,#0f2320,#17403a 60%,#0f2320); }
.ph.tone-plum { background: linear-gradient(135deg,#221728,#3a2246 60%,#221728); }
.ph svg { width: 24%; }
img.ph { background: none; }
.ratio-16-9 { aspect-ratio: 16/9; }
.ratio-4-3 { aspect-ratio: 4/3; }
.ratio-1-1 { aspect-ratio: 1/1; }
.ratio-3-2 { aspect-ratio: 3/2; }

/* ---- Masthead (dark) ---- */
.masthead { background: var(--navy-900); color: #fff; }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; gap: 20px; flex-wrap: wrap; }
.logo-group { display: flex; align-items: center; gap: 12px; }
.logo-box { width: 40px; height: 40px; border-radius: 9px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex-shrink: 0; }
.logo-img { height: 72px; width: auto; max-width: 420px; object-fit: contain; }
.site-name { font-weight: 800; font-size: 21px; letter-spacing: -.01em; color: #fff; }
.site-tagline { font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-300); margin-top: 2px; }

.main-nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.main-nav a { display: inline-flex; align-items: center; height: 40px; padding: 0 13px; color: #d7dbe2; font-weight: 600; font-size: 13.5px; border-radius: 6px; }
.main-nav a:hover, .main-nav a.home { color: #fff; background: rgba(255,255,255,.08); }
.masthead-actions { display: flex; align-items: center; gap: 10px; }
.icon-dot { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.08); display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 800; color: #fff; }
.icon-dot:hover { background: var(--accent); }
.btn-subscribe { background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; padding: 9px 18px; border-radius: 7px; white-space: nowrap; }
.btn-subscribe:hover { filter: brightness(1.08); }

/* ---- Section headers & tags ---- */
.section { padding: 42px 0; }
.section-dark { background: var(--navy-900); color: #fff; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; gap: 12px; flex-wrap: wrap; }
.section-title { font-size: 21px; font-weight: 800; color: var(--ink-900); display: flex; align-items: center; gap: 10px; }
.section-dark .section-title { color: #fff; }
.section-title .swatch { width: 8px; height: 18px; border-radius: 2px; background: var(--accent); }
.section-sub { font-size: 13.5px; color: var(--ink-500); margin-top: 4px; }
.section-dark .section-sub { color: var(--ink-300); }
.section-viewall { font-size: 12.5px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.section-dark .section-viewall { color: var(--accent2); }
.section-viewall:hover { text-decoration: underline; }

.tag { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 4px 10px; border-radius: 5px; }
.meta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--ink-500); }
.section-dark .meta-row { color: var(--ink-300); }
.meta-row .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }

/* ---- Featured grid (homepage top: hero + 2 features) ---- */
.featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature-card { display: block; background: var(--paper-raised); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.feature-card > .ph, .feature-card > img { border-radius: var(--radius) var(--radius) 0 0; }
.feature-card-body { padding: 16px 18px 20px; }
.feature-card h3 { font-size: 17px; line-height: 1.32; font-weight: 800; margin: 8px 0 8px; color: var(--ink-900); }
.feature-card h3 a:hover { color: var(--accent); }
.feature-card p { font-size: 13px; color: var(--ink-500); margin: 0 0 10px; }

/* ---- Category showcase: image-overlay cards ---- */
.showcase-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 18px; }
.showcase-card { position: relative; display: block; border-radius: var(--radius); overflow: hidden; min-height: 150px; }
.showcase-card > .ph, .showcase-card > img { position: absolute; inset: 0; width: 100%; height: 100%; }
.showcase-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,15,21,.05) 30%, rgba(11,15,21,.82) 100%); }
.showcase-card-body { position: relative; z-index: 1; padding: 18px; display: flex; flex-direction: column; justify-content: flex-end; min-height: 150px; }
.showcase-card h3 { color: #fff; font-size: 16.5px; font-weight: 800; }
.showcase-card .meta-row { color: rgba(255,255,255,.75); margin-top: 4px; }

/* ---- Main feed + sidebar ---- */
.main-grid { display: grid; grid-template-columns: 1fr 320px; gap: 36px; align-items: start; }
.feed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 22px; }
.feed-card { display: flex; flex-direction: column; background: var(--paper-raised); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.feed-card > .ph, .feed-card > img { aspect-ratio: 16/9; }
.feed-card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.feed-card h3 { font-size: 15px; line-height: 1.32; font-weight: 700; color: var(--ink-900); }
.feed-card h3 a:hover { color: var(--accent); }
.feed-card .meta-row { margin-top: auto; padding-top: 2px; }

/* ---- Sidebar ---- */
.widget { background: var(--paper-raised); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.widget h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; margin-bottom: 16px; color: var(--ink-900); border-left: 3px solid var(--accent); padding-left: 10px; }
.trending-list { display: flex; flex-direction: column; }
.trending-item { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--ink-100); align-items: center; }
.trending-item:first-child { padding-top: 0; }
.trending-item:last-child { border-bottom: none; padding-bottom: 0; }
.trending-item .ph, .trending-item img { border-radius: 6px; aspect-ratio: 1/1; }
.trending-item h4 { font-size: 13px; font-weight: 700; line-height: 1.34; color: var(--ink-900); }
.trending-item .meta-row { font-size: 11px; margin-top: 3px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a { background: var(--ink-100); border-radius: 6px; padding: 7px 13px; font-size: 12.5px; font-weight: 700; color: var(--ink-700); }
.tag-cloud a:hover { background: var(--accent); color: #fff; }
.newsletter-widget { background: linear-gradient(160deg, var(--navy-900), var(--navy-700)); color: #fff; }
.newsletter-widget h3 { color: #fff; border-left-color: var(--accent2); }
.newsletter-widget p { font-size: 13px; color: var(--ink-300); margin: 0 0 14px; }
.ad-widget { border: 1px dashed var(--ink-300); background: transparent; border-radius: var(--radius); text-align: center; color: var(--ink-500); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; padding: 50px 10px; }

.newsletter-form { display: flex; flex-direction: column; gap: 10px; }
.newsletter-form input { padding: 11px 13px; border-radius: 7px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #fff; font-size: 13.5px; font-family: inherit; }
.newsletter-form input::placeholder { color: rgba(255,255,255,.45); }
.newsletter-form button { background: var(--accent); color: #fff; padding: 11px; border-radius: 7px; font-weight: 700; font-size: 13.5px; cursor: pointer; border: none; }
.newsletter-form button:hover:not(:disabled) { filter: brightness(1.1); }
.newsletter-fine { font-size: 11px; color: var(--ink-300); margin-top: 10px; }

/* ---- Full-width newsletter banner (mid-page) ---- */
.newsletter-banner { background: linear-gradient(120deg, var(--navy-900), var(--navy-700)); color: #fff; border-radius: 16px; padding: 40px; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.newsletter-banner h2 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.newsletter-banner p { font-size: 14px; color: var(--ink-300); max-width: 46ch; }
.newsletter-banner .newsletter-form { flex-direction: row; min-width: 320px; }
.newsletter-banner .newsletter-form input { flex: 1; }
.newsletter-banner .newsletter-form button { flex-shrink: 0; padding: 11px 22px; }

/* ---- Category/tag/search listing pages ---- */
.category-title { font-size: 28px; font-weight: 800; color: var(--ink-900); margin: 0 0 6px; }
.category-desc { font-size: 14px; color: var(--ink-500); margin: 0 0 26px; }
.search-form { display: flex; gap: 10px; margin: 0 0 26px; max-width: 520px; }
.search-form input { flex: 1; padding: 12px 16px; border: 1px solid var(--ink-100); border-radius: 8px; font-size: 15px; font-family: inherit; background: var(--paper-raised); }
.search-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.search-form button { background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 0 22px; font-weight: 700; cursor: pointer; }
.pagination { display: flex; justify-content: space-between; margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--ink-100); font-weight: 700; font-size: 13.5px; }
.pagination a { color: var(--accent); }
.empty-state { text-align: center; padding: 80px 20px; color: var(--ink-500); }
.empty-state h1 { color: var(--ink-900); font-size: 26px; margin-bottom: 8px; }
.btn { display: inline-block; margin-top: 14px; background: var(--accent); color: #fff; padding: 10px 20px; border-radius: 8px; font-weight: 700; font-size: 13.5px; }

/* ---- Single post ---- */
.single-post { max-width: 740px; margin: 0 auto; }
.breadcrumb { font-size: 12px; color: var(--ink-500); margin-bottom: 14px; }
.breadcrumb a { font-weight: 700; color: var(--ink-900); }
.single-post-header h1 { font-size: clamp(26px,4vw,38px); line-height: 1.2; margin: 12px 0 14px; color: var(--ink-900); font-weight: 800; }
.single-post-headline { width: 100%; max-height: 460px; object-fit: cover; margin: 22px 0 30px; border-radius: var(--radius); }
.single-post-content { font-size: 17px; }
.single-post-content p { margin: 0 0 22px; }
.single-post-content h2 { font-size: 22px; font-weight: 800; margin: 32px 0 14px; }
.single-post-content h3 { font-size: 19px; font-weight: 700; margin: 24px 0 12px; }
.single-post-content img { margin: 24px 0; width: 100%; border-radius: var(--radius); }
.single-post-content a { color: var(--accent); text-decoration: underline; }
.single-post-content blockquote { border-left: 3px solid var(--accent); margin: 26px 0; padding-left: 20px; font-style: italic; color: var(--ink-700); }

.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--ink-100); }
.tag-pill-link { background: var(--ink-100); color: var(--ink-700); font-size: 12.5px; font-weight: 700; padding: 5px 14px; border-radius: 6px; }
.tag-pill-link:hover { background: var(--accent); color: #fff; }

.related-posts { max-width: 740px; margin: 56px auto 0; border-top: 1px solid var(--ink-100); padding-top: 28px; }
.related-posts h2 { font-size: 18px; font-weight: 800; margin-bottom: 18px; }

.page-layout { max-width: 1260px; margin: 0 auto; padding: 36px 20px 60px; }

/* ---- Footer (dark, 4 columns) ---- */
.site-footer { background: var(--navy-900); color: var(--ink-300); padding: 46px 0 0; margin-top: 10px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 30px; padding-bottom: 28px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-grid h4 { color: #fff; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 14px; }
.footer-grid p { font-size: 13px; color: var(--ink-300); line-height: 1.6; }
.footer-grid ul { display: flex; flex-direction: column; gap: 9px; }
.footer-grid li a:hover { color: #fff; }
.footer-logo { font-weight: 800; font-size: 20px; color: #fff; margin-bottom: 10px; }
.footer-recent-item { display: grid; grid-template-columns: 44px 1fr; gap: 10px; margin-bottom: 12px; align-items: center; }
.footer-recent-item .ph, .footer-recent-item img { border-radius: 5px; aspect-ratio: 1/1; }
.footer-recent-item h5 { font-size: 12.5px; font-weight: 600; line-height: 1.3; color: var(--ink-300); }
.footer-recent-item h5 a:hover { color: #fff; }
.footer-bottom { padding: 18px 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--ink-500); }
.footer-social { display: flex; gap: 8px; }

@media (max-width: 1080px) {
  .main-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .featured-grid { grid-template-columns: 1fr; }
  .showcase-grid { grid-template-columns: 1fr 1fr; }
  .feed-grid { grid-template-columns: 1fr 1fr; }
  .newsletter-banner .newsletter-form { flex-direction: column; min-width: 0; width: 100%; }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
  .showcase-grid { grid-template-columns: 1fr; }
  .feed-grid { grid-template-columns: 1fr; }
}
