/*
  Freehit Blog.
  Colours come from the Freehit "1-Minute Earning" logo (ink + rupee-bottle mint)
  and the freehitapp.org blue. Headlines/UI: Schibsted Grotesk. Article text:
  Atkinson Hyperlegible. Only content and images from the WordPress backup.
  Light theme only, by choice: ad units and the WordPress images are drawn for white.
*/

:root {
  --ink: #16191d;
  --ink-2: #262b31;
  --muted: #5d6875;
  --line: #e2e7ee;
  --wash: #f3f6fa;
  --paper: #ffffff;
  --blue: #0082f3;
  --blue-text: #0064c2;
  --mint: #3ee0b0;
  --mint-deep: #0f8f6c;

  --emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
  --display: var(--font-display), "Arial Narrow", Arial, sans-serif, var(--emoji);
  --body: var(--font-body), Verdana, Tahoma, sans-serif, var(--emoji);

  --max: 1200px;
  --gutter: 24px;
  --measure: 700px;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-text); }
img { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 {
  color: var(--ink);
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

mark { background: #c9f7e8; color: inherit; border-radius: 2px; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 2px solid transparent;
  border-radius: 8px;
  font: 700 15px/1 var(--display);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
/* the old landing page's Divi buttons: blue / orange / purple, green on hover */
.btn-freehit, .btn-swing, .btn-sixer { min-height: 52px; padding: 0 30px; border-radius: 100px; color: #fff; font-size: 17px; letter-spacing: .02em; }
.btn-freehit { background: #1ca5ff; }
.btn-swing { background: #e09900; }
.btn-sixer { background: #8300e9; }
.btn-freehit:hover, .btn-swing:hover, .btn-sixer:hover { background: #7cda24; color: #fff; }

/* ------------------------------------------------------------ top bar + header */
.topbar { background: var(--ink); color: rgba(255, 255, 255, .7); font: 500 13px/1 var(--display); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; }
.topbar-apps { display: flex; align-items: center; gap: 18px; overflow-x: auto; scrollbar-width: none; }
.topbar-apps span { color: rgba(255, 255, 255, .45); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.topbar-apps a { color: #fff; text-decoration: none; padding: 11px 0; white-space: nowrap; }
.topbar-apps a:hover { color: var(--mint); }
.site-tagline { margin: 0; color: var(--mint); white-space: nowrap; }

.site-header { position: relative; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 32px;
  min-height: 76px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 9px; }
.brand-name { font: 900 24px/1 var(--display); letter-spacing: -0.03em; }
.brand-name span { margin-left: 5px; color: var(--blue); font-weight: 500; letter-spacing: -0.01em; }

.site-nav { display: flex; align-items: center; gap: 26px; font: 600 15px/1 var(--display); }
.site-nav a { color: var(--ink); text-decoration: none; padding: 10px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--blue-text); border-bottom-color: var(--blue); }
.site-nav .nav-search { display: none; }

.header-search { position: relative; }
.header-search input[type=search] {
  width: 220px;
  height: 44px;
  padding: 0 14px 0 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--wash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235d6875' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5.5'/%3E%3Cpath d='m11 11 4 4'/%3E%3C/svg%3E") 13px 50% no-repeat;
  color: var(--ink);
  font: 500 15px/1 var(--display);
}
.header-search input[type=search]:focus { outline: none; border-color: var(--blue); background-color: #fff; }

.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  display: none;
  width: 360px;
  max-width: 90vw;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 32px rgba(22, 25, 29, .12);
}
.search-dropdown.open { display: block; }
.search-dropdown a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--ink);
  font: 600 15px/1.35 var(--display);
  text-decoration: none;
}
.search-dropdown a:hover { background: var(--wash); }
.search-dropdown .see-all { color: var(--blue-text); }
.search-dropdown .none { padding: 12px; color: var(--muted); font: 400 14px/1.4 var(--display); }

/* ------------------------------------------------------------ shared bits */
.cat {
  color: var(--blue-text);
  font: 700 12px/1 var(--display);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
}
.cat:hover { color: var(--ink); }

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  color: var(--muted);
  font: 500 14px/1.4 var(--display);
}

.entry-meta > * + *::before { content: "·"; margin-right: 14px; color: #b6bfca; }

.rail-title {
  margin: 0 0 6px;
  color: var(--muted);
  font: 700 12px/1 var(--display);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.section-title { margin: 72px 0 24px; font-size: 30px; }

/* ------------------------------------------------------------ home: featured */
.archive-container { padding-bottom: 8px; }

.featured {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 56px;
  padding-top: 44px;
}
.featured-lead { display: grid; align-content: start; gap: 16px; max-width: 780px; }
.featured-thumb img { display: block; width: 100%; border-radius: var(--radius); }
.featured-title { margin: 0; font-size: clamp(34px, 4.6vw, 58px); line-height: 1.06; letter-spacing: -0.03em; }
.featured-title a, .entry-title a { color: inherit; text-decoration: none; }
.featured-title a:hover, .entry-title a:hover { color: var(--blue-text); }
.featured .excerpt { margin: 0; color: var(--muted); font-size: 19px; line-height: 1.55; }

.featured-rest { padding-left: 32px; border-left: 1px solid var(--line); }
.featured-rest ol { margin: 0; padding: 0; list-style: none; }
.featured-rest li { display: grid; gap: 8px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.featured-rest li:last-child { border-bottom: 0; }
.featured-rest li a { color: var(--ink); font: 700 18px/1.3 var(--display); letter-spacing: -0.01em; text-decoration: none; }
.featured-rest li a:hover { color: var(--blue-text); }
.featured-rest time { color: var(--muted); font: 500 13px/1 var(--display); }

/* ------------------------------------------------------------ post list */
.post-list { display: grid; }
.entry { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 32px 0; border-bottom: 1px solid var(--line); }
.entry:first-child { padding-top: 0; }
.entry.has-thumb { grid-template-columns: minmax(0, 1fr) 260px; align-items: start; }
.entry-text { display: grid; gap: 10px; max-width: 760px; }
.entry .entry-title { margin: 0; font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; }
.entry .excerpt { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.6; }
.entry-thumb img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }

/* ------------------------------------------------------------ archive heads + pagination */
.archive-head { padding: 52px 0 36px; margin-bottom: 40px; border-bottom: 1px solid var(--line); }
.archive-kind { margin: 0 0 12px; color: var(--blue-text); font: 700 12px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; }
.archive-title { margin: 0; font-size: clamp(34px, 5vw, 56px); letter-spacing: -0.03em; }
.archive-count { margin: 12px 0 0; color: var(--muted); font: 500 15px/1 var(--display); }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 64px 0 80px; font: 700 15px/1 var(--display); }
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
}
.pagination a:hover { border-color: var(--ink); }
.pagination .current { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ------------------------------------------------------------ post page */
.post-page { padding-bottom: 32px; }
.crumbs { display: flex; gap: 10px; padding-top: 32px; color: #9aa4b0; font: 600 14px/1 var(--display); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--blue-text); }

.post-head { max-width: 880px; padding-top: 26px; }
.post-title { margin: 0; font-size: clamp(34px, 5vw, 56px); line-height: 1.06; letter-spacing: -0.03em; }
.post-meta { margin-top: 22px; color: var(--muted); font: 500 15px/1.5 var(--display); }
.post-meta strong { color: var(--ink); font-weight: 700; }
.post-meta a { color: var(--blue-text); text-decoration: none; }
.post-cover { margin: 32px 0 44px; }
.post-cover img { display: block; width: 100%; max-height: 520px; object-fit: cover; border-radius: 14px; }

.post-layout { display: grid; grid-template-columns: minmax(0, var(--measure)) 320px; justify-content: space-between; gap: 64px; }
.post-aside { display: grid; align-content: start; gap: 36px; position: sticky; top: 24px; align-self: start; }

.post-body { color: var(--ink-2); font-size: 19px; line-height: 1.75; }
.post-body > :first-child { margin-top: 0; }
.post-body p { margin: 0 0 1.15em; }
.post-body h2 { margin: 1.9em 0 .55em; font-size: 31px; line-height: 1.15; }
.post-body h3 { margin: 1.6em 0 .5em; font-size: 24px; line-height: 1.2; }
.post-body h4 { margin: 1.4em 0 .4em; font-size: 20px; }
.post-body a { color: var(--blue-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.post-body a:hover { text-decoration-thickness: 2px; }
.post-body strong { color: var(--ink); }
.post-body ul, .post-body ol { margin: 0 0 1.3em; padding-left: 1.3em; }
.post-body li { margin: .4em 0; padding-left: .2em; }
.post-body li::marker { color: var(--blue); font-weight: 700; }
.post-body blockquote { margin: 1.6em 0; padding: 18px 24px; border-left: 4px solid var(--mint); background: var(--wash); border-radius: 0 8px 8px 0; }
.post-body blockquote p:last-child { margin-bottom: 0; }
.post-body img { display: block; margin: 1.6em auto; border-radius: var(--radius); }
.post-body figure { margin: 1.6em 0; }
.post-body figcaption { color: var(--muted); font: 500 14px/1.4 var(--display); text-align: center; }
.post-body table { display: block; overflow-x: auto; width: 100%; margin: 1.6em 0; border-collapse: collapse; font: 500 16px/1.45 var(--display); }
.post-body th, .post-body td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.post-body th { background: var(--wash); color: var(--ink); font-weight: 700; }
.post-body hr { margin: 2.4em 0; border: 0; border-top: 1px solid var(--line); }

.post-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 36px; font: 600 14px/1 var(--display); }
.post-tags span { margin-right: 4px; color: var(--muted); }
.post-tags a { padding: 9px 14px; border-radius: 999px; background: var(--wash); color: var(--ink); text-decoration: none; }
.post-tags a:hover { background: var(--ink); color: #fff; }

.related-posts ul { margin: 0; padding: 0; list-style: none; }
.related-posts li { border-bottom: 1px solid var(--line); }
.related-posts li:last-child { border-bottom: 0; }
.related-posts a { display: block; padding: 14px 0; color: var(--ink); font: 700 16px/1.35 var(--display); text-decoration: none; }
.related-posts a:hover { color: var(--blue-text); }

.post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 72px 0 40px; padding-top: 40px; border-top: 1px solid var(--line); }
.post-nav a { display: block; padding: 20px 22px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; }
.post-nav a:hover { border-color: var(--ink); }
.post-nav .post-nav-next { grid-column: 2; text-align: right; }
.post-nav .label { display: block; margin-bottom: 6px; color: var(--muted); font: 700 12px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.post-nav .title { display: block; font: 700 17px/1.3 var(--display); }

/* ------------------------------------------------------------ landing page */
.landing-hero { background: var(--wash); border-bottom: 1px solid var(--line); }
.landing-hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: center; gap: 56px; padding-top: 64px; padding-bottom: 64px; }
.landing-copy { display: grid; gap: 22px; }
.landing-lead { margin: 0; color: var(--ink); font: 700 22px/1.3 var(--display); }
.landing-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.landing-art { width: 340px; }
.landing-body { max-width: var(--measure); margin: 64px auto 88px; }

/* ------------------------------------------------------------ search, 404 */
.container { max-width: calc(var(--measure) + var(--gutter) * 2); margin: 0 auto; padding: 56px var(--gutter) 88px; }
.search-panel h1 { margin: 0 0 18px; font-size: 44px; letter-spacing: -0.03em; }
.search-panel p { margin: 0 0 20px; color: var(--muted); }
.search-panel form { position: relative; display: flex; gap: 10px; }
.search-panel input[type=search] {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wash);
  color: var(--ink);
  font: 500 17px/1 var(--display);
}
.search-panel input[type=search]:focus { outline: none; border-color: var(--blue); background: #fff; }
.search-panel button {
  height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font: 700 16px/1 var(--display);
  cursor: pointer;
}
.search-panel button:hover { background: var(--blue); }
.search-panel .search-dropdown { left: 0; right: auto; width: 100%; }
#search-results { margin-top: 36px; }
.search-empty, .search-summary { color: var(--muted); font: 500 16px/1.5 var(--display); }
.search-results-list { margin: 0; padding: 0; list-style: none; }
.search-results-list li { border-bottom: 1px solid var(--line); }
.search-results-list a { display: block; padding: 16px 0; color: var(--ink); font: 700 20px/1.3 var(--display); text-decoration: none; }
.search-results-list a:hover { color: var(--blue-text); }

/* ------------------------------------------------------------ footer */
.site-footer { margin-top: 0; background: var(--ink); color: rgba(255, 255, 255, .7); font: 500 15px/1.5 var(--display); }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 48px; padding-top: 64px; padding-bottom: 48px; }
.site-footer .brand { color: #fff; }
.footer-brand p { max-width: 380px; margin: 18px 0 0; }
.site-footer nav { display: grid; align-content: start; gap: 12px; }
.site-footer h2 { margin: 0 0 4px; color: var(--mint); font: 700 12px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; }
.site-footer nav a { color: #fff; text-decoration: none; }
.site-footer nav a:hover { color: var(--mint); }
.site-footer .footer-base { display: flex; gap: 24px; padding-top: 20px; padding-bottom: 28px; border-top: 1px solid rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .5); font-size: 14px; }
.footer-base span { margin-right: auto; }
.footer-base a { color: rgba(255, 255, 255, .7); text-decoration: none; }
.footer-base a:hover { color: #fff; }

/* ------------------------------------------------------------ ads */
.ad-slot { margin: 40px 0 0; text-align: center; }
.post-aside .ad-slot { margin: 0; }
.ad-slot ins[data-ad-status="unfilled"] { display: none !important; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1080px) {
  .site-header .wrap { gap: 22px; }
  .header-search input[type=search] { width: 180px; }
  .entry.has-thumb { grid-template-columns: minmax(0, 1fr) 200px; }
  .featured { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .featured-rest { padding-left: 0; border-left: 0; }
  .featured-rest ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .featured-rest li:nth-last-child(2) { border-bottom: 0; }
  .post-layout { grid-template-columns: minmax(0, 1fr); }
  .post-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
  .post-aside .ad-slot { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .site-header .wrap { grid-template-columns: auto 1fr; gap: 0 16px; padding-bottom: 0; }
  .site-nav { grid-column: 1 / -1; grid-row: 2; gap: 22px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
  .site-nav a { white-space: nowrap; padding: 14px 0; }
  .site-nav .nav-search { display: inline; }
  .header-search { display: none; }
  .landing-hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 48px; padding-bottom: 48px; }
  .landing-art { width: 220px; justify-self: center; }
  .site-footer .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .topbar .site-tagline { display: none; }
  .site-header .wrap { min-height: 64px; padding-top: 12px; }
  .brand img { width: 34px; height: 34px; }
  .brand-name { font-size: 21px; }
  .featured { padding-top: 28px; }
  .featured-rest ol { grid-template-columns: minmax(0, 1fr); }
  .featured-rest li:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .featured .excerpt { font-size: 17px; }
  .section-title { margin-top: 56px; font-size: 26px; }
  .entry, .entry.has-thumb { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 26px 0; }
  .entry.has-thumb .entry-thumb { grid-row: 1; }
  .entry .entry-title { font-size: 22px; }
  .entry .excerpt { font-size: 16px; }
  .post-body { font-size: 18px; }
  .post-body h2 { font-size: 26px; }
  .post-body h3 { font-size: 21px; }
  .post-aside { grid-template-columns: minmax(0, 1fr); }
  .post-nav { grid-template-columns: minmax(0, 1fr); }
  .post-nav .post-nav-next { grid-column: 1; text-align: left; }
  .archive-head { padding: 36px 0 28px; margin-bottom: 32px; }
  .btn-freehit, .btn-swing, .btn-sixer { flex: 1 1 100%; }
  .site-footer .wrap { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 48px; }
  .site-footer .footer-base { flex-wrap: wrap; gap: 12px 20px; }
  .container { padding-top: 40px; }
  .search-panel h1 { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
