/* =====================================================================
   Site colors & fonts - edit these to restyle the whole site
   ===================================================================== */
:root {
  --bg: #ffffff;
  --text: #37352f;
  --muted: #787774;
  --border: #e9e9e7;
  --hover: #f1f1ef;
  --sidebar-bg: #fbfbfa;
  --link: #2e7bd6;
  --accent: #2e7bd6;          /* buttons, active filters */
  --card-bg: #ffffff;
  --tag-bg: #e3e2e0;
  --tag-free: #dbeddb;
  --tag-paid: #ffe2dd;
  --tag-sale: #fdecc8;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --content-width: 900px;
  --sidebar-width: 250px;
  --radius: 6px;
}

/* =====================================================================
   Basics
   ===================================================================== */
* { box-sizing: border-box; }
html { scroll-padding-top: 70px; }
body { margin: 0; font-family: var(--font); font-size: 16px; color: var(--text); background: var(--bg); line-height: 1.6; }
a { color: var(--link); text-decoration-color: rgba(46, 123, 214, .35); text-underline-offset: 2px; }
a:hover { text-decoration-color: currentColor; }
img, video { max-width: 100%; height: auto; }
.muted { color: var(--muted); }

/* =====================================================================
   Top bar
   ===================================================================== */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; height: 56px; padding: 0 20px; background: rgba(255,255,255,.95); border-bottom: 1px solid var(--border); backdrop-filter: blur(6px); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text); text-decoration: none; }
.logo img { width: 32px; height: 32px; }
.toplinks { margin-left: auto; display: flex; align-items: center; gap: 4px; font-size: 14px; }
.toplinks > a, .dropdown > summary { padding: 6px 10px; border-radius: var(--radius); color: var(--muted); text-decoration: none; cursor: pointer; list-style: none; }
.toplinks > a:hover, .dropdown > summary:hover { background: var(--hover); color: var(--text); }
.dropdown { position: relative; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown > summary::after { content: " ▾"; font-size: 11px; }
.dropdown-panel { position: absolute; right: 0; top: 38px; min-width: 240px; padding: 6px; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.dropdown-panel a { display: block; padding: 8px 10px; border-radius: var(--radius); color: var(--text); text-decoration: none; }
.dropdown-panel a:hover { background: var(--hover); }
.dropdown-panel small { display: block; color: var(--muted); }
.toplinks .cta { color: var(--accent); font-weight: 600; }
.menu-button { display: none; margin-left: auto; padding: 6px 10px; font: inherit; font-size: 14px; background: none; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; }

/* =====================================================================
   Sidebar + content area
   ===================================================================== */
.layout { display: flex; align-items: flex-start; }
.sidebar { position: sticky; top: 56px; width: var(--sidebar-width); flex-shrink: 0; height: calc(100vh - 56px); overflow-y: auto; padding: 14px 10px; background: var(--sidebar-bg); border-right: 1px solid var(--border); font-size: 14px; }
.side-link, .side-sub { display: block; padding: 4px 8px; border-radius: var(--radius); color: var(--text); text-decoration: none; }
.side-sub { padding-left: 30px; color: var(--muted); font-size: 13.5px; }
.side-link:hover, .side-sub:hover { background: var(--hover); color: var(--text); }
.side-link.active, .side-sub.active { background: var(--border); color: var(--text); font-weight: 600; }
.side-group > summary { display: flex; align-items: center; gap: 6px; padding-left: 4px; border-radius: var(--radius); cursor: pointer; list-style: none; }
.side-group > summary::-webkit-details-marker { display: none; }
.side-group > summary::before { content: "›"; width: 10px; color: var(--muted); transition: transform .15s; }
.side-group[open] > summary::before { transform: rotate(90deg); }
.side-group > summary .side-link { flex: 1; padding-left: 2px; }
.content { flex: 1; min-width: 0; padding: 40px 32px 80px; }
.page { max-width: var(--content-width); margin: 0 auto; }

/* =====================================================================
   Page header (icon, title, properties)
   ===================================================================== */
.page-cover { display: block; width: 100%; max-height: 260px; object-fit: cover; border-radius: 8px; margin-bottom: 20px; }
.page-icon { display: block; width: 64px; height: 64px; font-size: 56px; line-height: 64px; margin-bottom: 8px; }
h1 { font-size: 2.4rem; line-height: 1.2; margin: 0 0 16px; }
.page-page h1, .page-index h1 { text-align: left; }
.props { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; margin: 0 0 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border); font-size: 14px; }
.props dt { color: var(--muted); }
.props dd { margin: 0; overflow-wrap: anywhere; }
.check { color: #2e7d32; font-weight: 700; }

/* Tags / badges */
.tag { display: inline-block; padding: 0 7px; margin: 1px 2px 1px 0; border-radius: 4px; background: var(--tag-bg); font-size: 13px; line-height: 1.6; color: var(--text); text-decoration: none; white-space: nowrap; }
.tag-free { background: var(--tag-free); }
.tag-paid { background: var(--tag-paid); }
.tag-sale { background: var(--tag-sale); }
a.tag-link:hover { background: var(--border); }

/* =====================================================================
   Notion content
   ===================================================================== */
.notion h2 { font-size: 1.75rem; margin: 2rem 0 .5rem; line-height: 1.3; }
.notion h3 { font-size: 1.35rem; margin: 1.6rem 0 .4rem; line-height: 1.3; }
.notion h4, .notion h5 { font-size: 1.1rem; margin: 1.2rem 0 .3rem; }
.notion p { margin: .4rem 0; }
.notion .spacer { height: .8rem; }
.notion ul, .notion ol { padding-left: 1.6rem; margin: .4rem 0; }
.notion li { margin: .15rem 0; }
.notion hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.notion blockquote { margin: .8rem 0; padding: 2px 16px; border-left: 3px solid var(--text); }
.notion pre { padding: 14px; background: #f7f6f3; border-radius: var(--radius); overflow-x: auto; font-size: 14px; }
.notion code { padding: 1px 4px; background: rgba(135,131,120,.15); border-radius: 3px; font-size: .9em; color: #eb5757; }
.notion pre code { padding: 0; background: none; color: inherit; }
.notion figure { margin: 1rem 0; }
.notion figure img { display: block; border-radius: 4px; }
.notion figcaption { margin-top: 6px; color: var(--muted); font-size: 14px; }
.notion video { display: block; width: 100%; border-radius: 4px; }
.indent { padding-left: 1.6rem; }
.todo { display: flex; gap: 8px; align-items: baseline; }
.child-page a { font-weight: 500; }
.icon { width: 20px; height: 20px; flex-shrink: 0; font-size: 18px; line-height: 20px; }

/* Toggles ("click to expand") */
.toggle > summary { cursor: pointer; padding: 2px 0; }
.toggle > summary h2, .toggle > summary h3, .toggle > summary h4 { display: inline; }
.toggle > :not(summary) { margin-left: 1.4rem; }

/* Callout boxes */
.callout { display: flex; gap: 10px; padding: 14px 16px; margin: .8rem 0; border-radius: var(--radius); background: #f1f1ef; }
.callout-body { flex: 1; min-width: 0; }
.callout-body > :first-child { margin-top: 0; }

/* Columns (stack on phones) */
.columns { display: flex; gap: 24px; margin: .6rem 0; }
.column { flex: 1; min-width: 0; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1rem 0; }
.notion table { border-collapse: collapse; width: 100%; font-size: 14px; }
.notion th, .notion td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; vertical-align: top; }

/* Videos and embeds keep a 16:9 shape; forms grow taller */
.embed { position: relative; width: 100%; }
.embed.video { aspect-ratio: 16 / 9; }
.embed iframe { width: 100%; height: 100%; border: 0; border-radius: 4px; }
.embed.video iframe { position: absolute; inset: 0; }
.embed.form iframe { height: 900px; }
.embed:not(.video):not(.form) iframe { height: 480px; }

/* Bookmark / link preview cards */
.link-card { display: block; padding: 12px 14px; margin: .6rem 0; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); text-decoration: none; }
.link-card:hover { background: var(--hover); }
.link-card-host { display: block; font-weight: 600; }
.link-card-url { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-card figcaption { margin: 4px 0 0; }
/* Rich version: title + description on the left, image on the right */
.link-card.rich { display: flex; height: 112px; padding: 0; overflow: hidden; }
.link-card.rich .link-card-text { flex: 1; min-width: 0; padding: 12px 14px; }
.link-card-title { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-card-desc { display: -webkit-box; margin: 2px 0 6px; color: var(--muted); font-size: 13px; line-height: 1.45; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.link-card.rich .link-card-host { font-weight: 400; font-size: 13px; }
.link-card.rich img { width: 200px; height: 100%; flex-shrink: 0; object-fit: cover; border-left: 1px solid var(--border); }

/* YouTube preview (thumbnail + play button; the player loads on click) */
.yt { cursor: pointer; background: #000; border-radius: 4px; overflow: hidden; }
.yt img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .92; transition: opacity .15s; }
.yt:hover img { opacity: 1; }
.yt-play { position: absolute; top: 50%; left: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; border: 0; border-radius: 12px; background: rgba(33,33,33,.85); cursor: pointer; }
.yt:hover .yt-play { background: #f00; }
.yt-play::before { content: ""; position: absolute; top: 50%; left: 50%; margin: -9px 0 0 -6px; border-style: solid; border-width: 9px 0 9px 16px; border-color: transparent transparent transparent #fff; }

/* Newsletter form (SendFox embed) */
.raw-embed form { padding: 16px; border: 1px solid var(--border); border-radius: 8px; }
.raw-embed input[type="text"], .raw-embed input[type="email"] { width: 100%; max-width: 360px; padding: 8px; font: inherit; border: 1px solid var(--border); border-radius: var(--radius); }
.raw-embed button { padding: 8px 16px; font: inherit; color: #fff; background: var(--accent); border: 0; border-radius: var(--radius); cursor: pointer; }

/* Notion text colors */
.c-gray { color: #787774; } .c-brown { color: #9f6b53; } .c-orange { color: #d9730d; } .c-yellow { color: #cb912f; }
.c-green { color: #448361; } .c-blue { color: #337ea9; } .c-purple { color: #9065b0; } .c-pink { color: #c14c8a; } .c-red { color: #d44c47; }
.bg-gray { background: #f1f1ef; } .bg-brown { background: #f4eeee; } .bg-orange { background: #fbecdd; } .bg-yellow { background: #fbf3db; }
.bg-green { background: #edf3ec; } .bg-blue { background: #e7f3f8; } .bg-purple { background: rgba(244,240,247,.8); } .bg-pink { background: rgba(249,238,243,.8); } .bg-red { background: #fdebec; }
.bg-default { background: none; }

/* =====================================================================
   Lists of cards (tools, categories, courses) + filters
   ===================================================================== */
.list { margin: 1.2rem 0 2rem; }
.list-controls { margin-bottom: 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--sidebar-bg); }
.facet { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.facet-label { width: 100px; font-size: 13px; font-weight: 600; color: var(--muted); }
.chip { padding: 3px 10px; font: inherit; font-size: 13px; color: var(--text); background: #fff; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; }
.chip:hover { border-color: #c7c6c4; }
.chip[aria-pressed="true"] { color: #fff; background: var(--accent); border-color: var(--accent); }
.chip-count { opacity: .6; font-size: 12px; }
.list-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.list-bar .sort { margin-left: auto; }
.list-bar select { padding: 3px 6px; font: inherit; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.link-button { padding: 0; font: inherit; color: var(--link); background: none; border: 0; cursor: pointer; text-decoration: underline; }
.list-empty { padding: 20px; text-align: center; color: var(--muted); }

.group-title { display: flex; align-items: center; gap: 8px; margin: 1.6rem 0 .6rem; font-size: 1.1rem !important; }
.group-title a { color: var(--text); text-decoration: none; }
.group-count { padding: 0 7px; font-size: 12px; font-weight: 400; color: var(--muted); background: var(--hover); border-radius: 999px; }

.cards { display: grid; gap: 14px; padding: 0 !important; margin: 0 !important; list-style: none; }
.cards-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.cards-compact { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.card { margin: 0 !important; }
.card > a { display: flex; flex-direction: column; height: 100%; overflow: hidden; color: var(--text); text-decoration: none; background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 1px 2px rgba(15,15,15,.04); transition: box-shadow .15s, transform .15s; }
.card > a:hover { box-shadow: 0 6px 18px rgba(15,15,15,.1); transform: translateY(-1px); }
.card-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--hover); border-bottom: 1px solid var(--border); }
.card-body { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; }
.card-title { font-weight: 600; font-size: 15px; line-height: 1.35; }
.card-sub { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.card-badges { margin-top: 4px; }
.cards-compact .card-body { padding: 8px 12px; }

/* =====================================================================
   Phones and small tablets
   ===================================================================== */
@media (max-width: 860px) {
  .toplinks { display: none; }
  .menu-button { display: block; }
  .sidebar { display: none; position: fixed; top: 56px; left: 0; z-index: 9; width: 100%; height: calc(100vh - 56px); }
  .menu-open .sidebar { display: block; }
  .content { padding: 24px 16px 60px; }
  h1 { font-size: 1.9rem; }
  .columns { flex-direction: column; gap: 0; }
  .props { grid-template-columns: 110px 1fr; }
  .facet-label { width: 100%; }
}

/* Breadcrumbs above the title of tool and course pages */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--text); text-decoration: underline; }

/* =====================================================================
   Tool pages: header ("hero"), facts, related tools
   ===================================================================== */
.page-tool { max-width: 1040px; }
.tool-hero { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.tool-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.tool-hero-media img, .tool-hero-noimg { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); box-shadow: 0 6px 24px rgba(15,15,15,.08); }
.tool-hero-noimg { display: grid; place-items: center; font-size: 64px; font-weight: 700; color: var(--muted); background: var(--hover); }
.tool-hero h1 { font-size: 2.2rem; margin: 0 0 10px; }
.tool-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 18px; }
.tool-badges .tag { font-size: 14px; padding: 2px 10px; }
.badge-reviewed { padding: 2px 10px; font-size: 14px; font-weight: 600; color: #1d6b3a; background: #e3f4e8; border-radius: 4px; text-decoration: none; }
.badge-reviewed:hover { background: #d2ecdb; }
.button-get { display: inline-flex; flex-direction: column; padding: 12px 22px; margin-bottom: 20px; color: #fff; background: var(--accent); border-radius: 8px; font-weight: 600; font-size: 17px; line-height: 1.3; text-decoration: none; box-shadow: 0 2px 8px rgba(46,123,214,.3); transition: background .15s, transform .15s; }
.button-get:hover { background: #2368b8; transform: translateY(-1px); }
.button-host { font-size: 13px; font-weight: 400; opacity: .85; }
.tool-facts { display: grid; grid-template-columns: 90px 1fr; gap: 8px 12px; margin: 0; font-size: 14px; }
.tool-facts dt { color: var(--muted); }
.tool-facts dd { margin: 0; }
.tool-summary { font-size: 1.05rem; color: var(--muted); }
.related { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.related h2 { font-size: 1.4rem; margin: 0 0 4px; }
.related h2 a { color: var(--text); }
.related .list { margin: 12px 0; }
.see-all { font-weight: 600; text-decoration: none; }

@media (max-width: 860px) {
  .tool-hero-grid { grid-template-columns: 1fr; gap: 18px; }
  .tool-hero h1 { font-size: 1.8rem; }
  .button-get { display: flex; }
  .link-card.rich { height: 96px; }
  .link-card.rich img { width: 96px; }
}
