/*
Theme Name: Shortlist
Theme URI: https://live-systems.org/
Author: Shortlist
Description: Rounded editorial theme for Shortlist, a publication of SaaS roundups.
Version: 1.0.4
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: shortlist
*/

:root {
  --ink: #1c2230;
  --muted: #5d667a;
  --paper: #f4f6fb;
  --card: #ffffff;
  --line: #e4e7f2;
  --accent: #5b4bff;
  --accent-dark: #3d31c4;
  --coral: #ff7a59;
  --shadow: 0 16px 40px rgba(55, 48, 120, 0.08);
  --sans: "Poppins", "Avenir Next", "Segoe UI", sans-serif;
  --wrap: 1040px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); }
a:hover { color: var(--coral); }
::selection { background: #d9d4ff; }
.skip {
  position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff; padding: 8px 12px; z-index: 20; border-radius: 8px;
}
.skip:focus { left: 12px; top: 12px; }
.wrap { width: min(var(--wrap), calc(100% - 32px)); margin: 0 auto; }
.screen-reader {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.site-header {
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
  backdrop-filter: blur(10px);
}
.header-bar { display: flex; align-items: center; gap: 18px; min-height: 72px; }
.brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink);
  font-weight: 650; font-size: 22px; letter-spacing: -0.03em;
}
.brand .custom-logo { width: 36px; height: 36px; border-radius: 10px; }
.mark {
  width: 28px; height: 28px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--accent), #8d7bff);
  box-shadow: 0 6px 14px rgba(91, 75, 255, 0.35);
}
.nav-toggle {
  display: none; margin-left: auto; background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 14px; cursor: pointer;
}
.site-nav { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.site-nav ul { display: flex; gap: 14px; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 550; }
.site-nav a:hover, .site-nav .current-menu-item > a { color: var(--accent); }
.header-search { display: flex; gap: 6px; }
.header-search input, .contact-form input, .contact-form textarea {
  border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px;
  padding: 8px 14px; font: inherit; font-size: 14px;
}
.header-search input { width: 140px; }
.contact-form textarea { border-radius: 16px; }
.header-search input::placeholder, .contact-form input::placeholder, .contact-form textarea::placeholder { color: #8b93a7; }
.header-search button, .contact-form button {
  border: 0; background: var(--accent); color: #fff; border-radius: 999px; padding: 8px 14px;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.header-search button:hover, .contact-form button:hover { background: var(--accent-dark); }

.hero-band { padding: 28px 0 8px; }
.hero-card {
  background: linear-gradient(135deg, #5b4bff 0%, #7a6bff 48%, #9a7dff 100%);
  color: #fff; border-radius: 28px; padding: 48px 40px 40px; text-align: center;
  box-shadow: 0 20px 50px rgba(91, 75, 255, 0.25);
}
.hero-card .kicker {
  margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: #efeaff;
}
.hero-card h1 {
  margin: 0 auto 14px; max-width: 16em; font-size: clamp(34px, 5vw, 54px); line-height: 1.12;
  font-weight: 650; letter-spacing: -0.035em; overflow-wrap: break-word;
}
.hero-card .intro { max-width: 640px; margin: 0 auto; color: #f3f0ff; font-size: 17px; }
.hero-card .intro p { margin: 0 0 10px; }
.hero-card a { color: #fff; }

.topics { padding: 28px 0 8px; }
.topics h2, .latest h2, .page-head h1 {
  font-weight: 650; letter-spacing: -0.03em; margin: 0;
}
.topics h2, .section-head h2 { font-size: 28px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.tile {
  display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink);
  background: var(--card); border-radius: 20px; padding: 18px 18px 16px; box-shadow: var(--shadow);
}
.tile:hover { transform: translateY(-2px); }
.tile-index { font-size: 12px; font-weight: 650; letter-spacing: 0.08em; color: var(--accent); }
.tile strong { font-size: 18px; letter-spacing: -0.02em; }
.tile span:last-child { color: var(--muted); font-size: 14px; line-height: 1.45; }
.tile:nth-child(2) { background: #f3f1ff; }
.tile:nth-child(3) { background: #fff4f0; }
.tile:nth-child(5) { background: #f3f1ff; }
.tile:nth-child(6) { background: #fff4f0; }

.latest { padding: 22px 0 10px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.section-head a { font-weight: 600; font-size: 14px; }

.rows { display: flex; flex-direction: column; gap: 12px; }
.row {
  display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: center;
  background: var(--card); border-radius: 22px; padding: 12px; box-shadow: var(--shadow);
}
.row-thumb { display: block; border-radius: 16px; overflow: hidden; aspect-ratio: 16/10; background: #ece9ff; }
.row img { width: 100%; height: 100%; object-fit: cover; }
.ph {
  display: flex; align-items: flex-end; height: 100%; padding: 12px; color: var(--accent-dark);
  font-weight: 650; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase;
  background: linear-gradient(160deg, #efeaff, #ffe8e1);
}
.row-body .meta { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.row-body h3 { font-size: 22px; line-height: 1.25; font-weight: 620; letter-spacing: -0.03em; margin: 4px 0 6px; }
.row-body h3 a { color: var(--ink); text-decoration: none; }
.row-body h3 a:hover { color: var(--accent); }
.row-body p { margin: 0; color: var(--muted); font-size: 15px; }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card {
  background: var(--card); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card a.thumb { display: block; aspect-ratio: 16/9; background: #ece9ff; overflow: hidden; }
.card img { width: 100%; height: 100%; object-fit: cover; }
.card .ph { min-height: 160px; }
.card-body { padding: 14px 16px 18px; }
.card-body .meta { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.card-body h3 { font-size: 20px; line-height: 1.25; margin: 6px 0 8px; letter-spacing: -0.02em; }
.card-body h3 a { color: var(--ink); text-decoration: none; }
.card-body h3 a:hover { color: var(--accent); }
.card-body p { margin: 0; color: var(--muted); font-size: 15px; }

.pager { display: flex; gap: 14px; justify-content: center; margin: 28px 0; font-weight: 600; }
.pager a, .pager span { text-decoration: none; }

.page-head { padding: 36px 0 8px; }
.page-head h1 { font-size: clamp(34px, 5vw, 48px); line-height: 1.15; overflow-wrap: break-word; }
.kicker { color: var(--accent); font-size: 12px; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 8px; }
.intro { color: var(--muted); max-width: 680px; }
.intro p { margin: 0 0 10px; }
.wrap-wide { --wrap: 1180px; }
.entry { max-width: 720px; padding-bottom: 48px; }
.entry table {
  width: min(1180px, calc(100vw - 48px));
  max-width: none;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.4em 0 1.6em;
  background: #fff;
  border: 2px solid #5b4bff;
  border-radius: 16px;
  overflow: hidden;
  font-size: 15.5px;
  line-height: 1.45;
  box-shadow: 0 12px 32px rgba(91, 75, 255, 0.1);
}
@media (max-width: 899px) {
  .entry { overflow-x: auto; }
  .entry table { width: 720px; max-width: none; }
}
.entry th, .entry td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 2px solid #d9d4ff;
}
.entry th + th, .entry td + td { border-left: 1px solid #e3defc; }
.entry th {
  background: #5b4bff;
  color: #fff;
  font-size: 14px;
  font-weight: 650;
  border-bottom-color: #3d31c4;
}
.entry th + th { border-left-color: rgba(255, 255, 255, 0.28); }
.entry tbody tr:nth-child(even) td { background: #f6f5ff; }
.entry tbody tr:last-child td { border-bottom: 0; }
.entry th:first-child, .entry td:first-child { width: 18%; }
.entry th:nth-child(3), .entry td:nth-child(3) { width: 24%; }
.entry h2, .entry h3 { font-weight: 620; letter-spacing: -0.02em; line-height: 1.25; }
.entry h2 { font-size: 28px; margin: 1.3em 0 0.4em; }
.entry h3 { font-size: 22px; }
.entry ul, .entry ol { padding-left: 1.2em; }
.entry blockquote { margin: 1.2em 0; padding: 12px 16px; border-radius: 16px; background: #f3f1ff; color: var(--muted); }
.entry img, .hero-img { border-radius: 18px; }
.hero-img { margin: 0 0 22px; max-height: 460px; width: 100%; object-fit: cover; }
.byline { color: var(--muted); font-size: 14px; margin-bottom: 16px; }

.contact-form { display: grid; gap: 10px; max-width: 520px; margin-top: 18px; }
.contact-form input, .contact-form textarea { width: 100%; }
.contact-form button { justify-self: start; padding: 10px 18px; }
.note { background: #efeaff; border-radius: 16px; padding: 12px 14px; }

.site-footer { margin-top: 56px; padding: 28px 0 36px; background: #fff; border-top: 1px solid var(--line); text-align: center; }
.footer-stack { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.footer-nav { width: 100%; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.site-footer li a {
  display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
  color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; background: var(--paper);
}
.site-footer li a:hover { border-color: var(--accent); color: var(--accent); background: #fff; }
.footer-brand strong { font-size: 22px; letter-spacing: -0.03em; }
.footer-brand p { color: var(--muted); margin: 6px 0 0; max-width: 420px; }
.empty { color: var(--muted); }

@media (max-width: 860px) {
  .tiles, .cards { grid-template-columns: 1fr 1fr; }
  .row { grid-template-columns: 140px 1fr; }
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff;
    border-bottom: 1px solid var(--line); padding: 8px 16px 16px; flex-direction: column; align-items: stretch;
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 10px; }
  .header-search input { width: 100%; }
  .hero-card { padding: 32px 20px; border-radius: 22px; }
}
@media (max-width: 560px) {
  .tiles, .cards, .row { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}
