/* Guides section, Attio guide articles, the two Attio posts and the blog index.
   Built on the tokens and the .post-* article styles in styles.css. No italic,
   no serif: emphasis is weight or colour. */

/* ---------- shared bits ---------- */
.g-chip {
  display: inline-flex; align-items: center; gap: 0.4rem; min-height: 26px; padding: 0 0.6rem;
  border: 1px solid var(--border); border-radius: 99px; background: var(--surface);
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); white-space: nowrap;
}
.g-chip--tag { color: var(--accent-tone); border-color: rgba(79, 106, 92, 0.28); background: rgba(79, 106, 92, 0.06); }
/* baseline from the name, so text after a chip ("Attio CSV import") sits on one line */
.g-logo { display: inline-flex; align-items: baseline; gap: 0.45rem; white-space: nowrap; }
.g-logo img { width: 18px; height: 18px; flex: none; object-fit: contain; align-self: center; }
.g-logos { display: inline-flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.g-logos__arrow { color: var(--text-soft); font-family: var(--font-mono); font-size: 0.8rem; }

/* Attio credential: logomark plus "Attio Expert Partner", linked to the profile */
.g-cred {
  display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.95rem 0.5rem 0.6rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 99px;
  font-size: 0.9rem; font-weight: 500; color: var(--text); box-shadow: var(--shadow-sm);
  transition: border-color 0.2s var(--ease);
}
.g-cred:hover { border-color: var(--text); }
.g-cred img { width: 22px; height: 22px; flex: none; }
.g-cred small { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-soft); }

/* ---------- guides index and Attio hub ---------- */
.guides-page .pagehead { padding-bottom: clamp(2rem, 4vw, 3rem); }
.guides-page .eyebrow--chapter a { color: inherit; }
.guides-page .eyebrow--chapter a:hover { color: var(--text); }
.guides-page .section__sub { max-width: 62ch; }
.guides-page .g-cred { margin-top: clamp(1.4rem, 3vw, 2rem); }

.guide-label {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-soft);
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
}
.guide-label img { width: 18px; height: 18px; }
.guide-group { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.guide-group__all, .guide-more a {
  font-size: 0.95rem; color: var(--text); text-decoration: underline;
  text-decoration-color: var(--border-strong); text-underline-offset: 3px;
}
.guide-group__all:hover, .guide-more a:hover { text-decoration-color: var(--text); }
.guide-more { margin: 1.6rem 0 0; color: var(--text-muted); }

/* card grid: guides, posts and related reading */
.g-cards { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.g-cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-cards > li { display: flex; }
.g-card {
  display: flex; flex-direction: column; width: 100%; color: inherit;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.g-card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.g-card:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.g-card__media { position: relative; aspect-ratio: 2 / 1; background: #18181b; overflow: hidden; }
.g-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s var(--ease); }
.g-card:hover .g-card__media img { transform: scale(1.03); }
.g-card__num {
  position: absolute; left: 0.9rem; top: 0.9rem; min-width: 2.4rem; height: 2.4rem; padding: 0 0.5rem;
  display: grid; place-items: center; border-radius: var(--radius-sm);
  background: rgba(250, 250, 250, 0.94); color: var(--text);
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500;
}
.g-card__body { display: flex; flex-direction: column; gap: 0.7rem; flex: 1; padding: 1.2rem 1.3rem 1.3rem; }
.g-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; }
.g-card__meta .g-logos { font-size: 0.86rem; font-weight: 500; color: var(--text); }
.g-card__title { font-size: clamp(1.1rem, 1.6vw, 1.3rem); font-weight: 600; letter-spacing: -0.018em; line-height: 1.25; color: var(--text); margin: 0; }
.g-card__dek { font-size: 0.94rem; line-height: 1.55; color: var(--text-muted); margin: 0; }
.g-card__foot { margin-top: auto; padding-top: 0.3rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }

.guide-service {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  margin-top: clamp(2.5rem, 5vw, 4rem); padding: clamp(1.4rem, 3vw, 2rem);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.guide-service h2 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 600; letter-spacing: -0.02em; margin: 0 0 0.4rem; }
.guide-service p { margin: 0; color: var(--text-muted); max-width: 54ch; }
.guide-cta { padding: clamp(1rem, 3vw, 2rem) 0 clamp(4rem, 8vw, 6rem); }
.guide-cta .post-cta { margin-top: 0; }

@media (max-width: 900px) { .g-cards--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g-cards, .g-cards--3 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- article page ---------- */
/* sections are short now: tighter rhythm than the long-form template */
.post-page .post__part { padding-top: clamp(1.8rem, 3.5vw, 2.8rem); }
.post-page .post__part + .post__part { margin-top: clamp(0.8rem, 1.6vw, 1.4rem); }
.post-page .post__part h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); margin-bottom: 1rem; }
/* decks and ledes in General Sans, never the serif */
.post-page .post__dek { font-family: var(--font-sans); font-size: clamp(1.15rem, 1.8vw, 1.4rem); line-height: 1.45; font-weight: 400; max-width: 46ch; }
.post__kicker .g-chip { letter-spacing: 0.12em; }
.post__kicker.g-kicker { gap: 0.5rem; }
.post__kicker.g-kicker span + span::before { content: none; }
.post__byline { flex-wrap: wrap; }
.post__byline .g-cred { margin-left: auto; }
.post-related .g-cards { margin-top: 1.6rem; }
.post-related__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.post-related__head .post__toc-title { border: 0; padding: 0; margin: 0; }
.post-related__head a { font-size: 0.95rem; color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.post-cta__more { margin: 1.1rem 0 0 !important; font-size: 0.95rem; }
.post-cta__more a { color: #faf6f0; text-decoration: underline; text-decoration-color: rgba(250, 246, 240, 0.4); text-underline-offset: 3px; }
.post-cta__more a:hover { text-decoration-color: #faf6f0; }
.post-author a { color: var(--text); }

.post__part > h2 + p:not(.post-check) { color: var(--text); font-size: 1.08rem; }
.post__part > h2 + .post-check + p { color: var(--text); font-size: 1.08rem; }
.post-sources { font-size: 0.92rem; line-height: 1.55; padding-left: 1.3rem !important; }
.post-sources li { margin-bottom: 0.55rem; overflow-wrap: anywhere; }
.post-check { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-soft); margin: 0 0 1.2rem !important; }

/* tables */
.post-table--compact th, .post-table--compact td { padding: 0.7rem 0.9rem; }
/* a header row that names tools reads as names, not as mono labels */
.post-table thead:has(.g-logo) th { font-family: var(--font-sans); font-size: 0.86rem; letter-spacing: 0; text-transform: none; color: var(--text); font-weight: 600; }
.post-table th .g-logo { font: inherit; color: inherit; }
.post-table td.is-yes::before, .post-table td.is-no::before, .post-table td.is-part::before {
  content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 0.5rem; vertical-align: -0.2em;
  background: center / 16px 16px no-repeat;
}
.post-table td.is-yes::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%234f6a5c' fill-opacity='.14'/%3E%3Cpath d='M4.6 8.3l2.2 2.2 4.6-4.9' fill='none' stroke='%234f6a5c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.post-table td.is-no::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7.25' fill='none' stroke='%23a1a1aa' stroke-width='1.5'/%3E%3Cpath d='M5.5 8h5' stroke='%23a1a1aa' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); }
.post-table td.is-part::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7.25' fill='none' stroke='%234f6a5c' stroke-width='1.5'/%3E%3Cpath d='M8 .75a7.25 7.25 0 010 14.5z' fill='%234f6a5c' fill-opacity='.5'/%3E%3C/svg%3E"); }

/* fact cards: label, short value, one line of context */
.g-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0.7rem; margin: 1.6rem 0 2rem; }
.g-facts > div { background: var(--surface); padding: 1.2rem 1.25rem 1.3rem; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.g-facts dt { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-soft); margin: 0 0 0.6rem; }
.g-facts dd { margin: 0; font-size: 0.92rem; line-height: 1.5; color: var(--text-muted); }
.g-facts dd strong { display: block; font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; color: var(--text); margin-bottom: 0.35rem; }

/* checklist with check icons; .is-open and .is-ask change the icon */
.g-checklist { list-style: none; padding: 0 !important; margin: 1.6rem 0 2rem; display: grid; gap: 0.6rem; }
.g-checklist > li {
  position: relative; margin: 0; padding: 0.95rem 1.1rem 0.95rem 3rem; line-height: 1.55;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.g-checklist > li::before {
  content: ""; position: absolute; left: 1rem; top: 1.08rem; width: 20px; height: 20px; background: center / 20px 20px no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='10' fill='%234f6a5c'/%3E%3Cpath d='M6 10.4l2.6 2.6 5.4-5.8' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.g-checklist > li.is-open::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='9.1' fill='none' stroke='%2371717a' stroke-width='1.6'/%3E%3Cpath d='M7.6 7.8a2.4 2.4 0 114 1.8c-.9.6-1.6 1-1.6 2.1' fill='none' stroke='%2371717a' stroke-width='1.6' stroke-linecap='round'/%3E%3Ccircle cx='10' cy='14.4' r='1' fill='%2371717a'/%3E%3C/svg%3E"); }
.g-checklist > li.is-ask::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='10' fill='%2318181b'/%3E%3Cpath d='M6 10h7.5M10.5 6.5L14 10l-3.5 3.5' fill='none' stroke='%23fff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.g-checklist > li > strong:first-child { color: var(--text); }

/* published / open / ask card, one per check */
.g-verdict { margin: 1.4rem 0 2rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.g-verdict > div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1rem; padding: 1rem 1.2rem; border-top: 1px solid var(--border); }
.g-verdict > div:first-child { border-top: 0; }
.g-verdict dt, .g-verdict__k { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-soft); padding-top: 0.25rem; }
.g-verdict dd, .g-verdict p { margin: 0 !important; font-size: 0.97rem; line-height: 1.6; }
.g-verdict .is-yes dt { color: var(--accent-tone); }
.g-verdict .is-ask { background: var(--bg-elev, #fafafa); }
.g-verdict .is-ask dd { color: var(--text); font-weight: 500; }
.g-verdict ul { margin: 0; padding-left: 1.1rem; }

/* two columns: before and after, or one tool and the other */
.g-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1.6rem 0 2rem; }
.g-split > div { padding: 1.3rem 1.35rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.g-split > div.is-dark { background: #0a0a0a; border-color: #0a0a0a; color: #a1a1aa; }
.g-split > div.is-dark .g-split__head, .g-split > div.is-dark strong { color: #faf6f0; }
.g-split > div.is-dark li { color: #a1a1aa !important; }
.g-split__head { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.9rem !important; font-weight: 600; color: var(--text); font-size: 1.02rem; }
.g-split ul { margin: 0; padding-left: 1.1rem; font-size: 0.96rem; line-height: 1.6; }
.g-split li { margin-bottom: 0.45rem; }
.g-split p { margin: 0; font-size: 0.96rem; line-height: 1.6; }

/* bento: title-and-line cards */
.g-bento { list-style: none; padding: 0 !important; margin: 1.6rem 0 2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0.8rem; }
.g-bento > li { margin: 0; padding: 1.15rem 1.2rem 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; gap: 0.45rem; font-size: 0.93rem; line-height: 1.55; }
.g-bento__k { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-tone); }
.g-bento strong { font-size: 1.04rem; letter-spacing: -0.01em; line-height: 1.3; color: var(--text); }
.g-bento .g-logo { font-weight: 600; color: var(--text); font-size: 1.02rem; }

/* key takeaway: one per page */
.g-callout { margin: 2.4rem 0; padding: 1.5rem 1.6rem 1.6rem; background: #0a0a0a; border-radius: var(--radius); color: #faf6f0; }
.g-callout__label { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; color: #8fbfa5 !important; margin: 0 0 0.7rem !important; }
.g-callout p { color: #faf6f0 !important; font-size: 1.12rem; line-height: 1.5; font-weight: 500; margin: 0; }
.g-callout a { color: #faf6f0 !important; text-decoration-color: rgba(250, 246, 240, 0.45) !important; }

/* steps: numbered timeline with a connecting rule */
.g-steps { list-style: none; padding: 0 !important; margin: 1.6rem 0 2rem; counter-reset: gstep; }
.g-steps > li { counter-increment: gstep; position: relative; margin: 0; padding: 0 0 1.4rem 3.2rem; line-height: 1.6; }
.g-steps > li::before {
  content: counter(gstep); position: absolute; left: 0; top: 0; width: 2rem; height: 2rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border-strong);
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--text);
}
.g-steps > li::after { content: ""; position: absolute; left: calc(1rem - 0.5px); top: 2.2rem; bottom: 0.2rem; width: 1px; background: var(--border-strong); }
.g-steps > li:last-child { padding-bottom: 0; }
.g-steps > li:last-child::after { content: none; }
.g-steps strong { display: block; color: var(--text); margin-bottom: 0.15rem; padding-top: 0.2rem; }

@media (max-width: 640px) {
  .g-split { grid-template-columns: minmax(0, 1fr); }
  .g-verdict > div { grid-template-columns: minmax(0, 1fr); gap: 0.3rem; }
  .post__byline .g-cred { margin-left: 0; }
}

/* ---------- blog index: category filter (assets/js/guides.js unhides it) ---------- */
.blog-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: clamp(1.8rem, 3.5vw, 2.6rem); }
.blog-filter[hidden] { display: none; }
.blog-filter button {
  font: inherit; font-size: 0.9rem; font-weight: 500; line-height: 1; cursor: pointer;
  min-height: 44px; padding: 0 1.05rem; border-radius: 99px;
  background: transparent; color: var(--text-muted); border: 1px solid var(--border-strong);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.blog-filter button:hover { background: var(--surface); border-color: var(--text); color: var(--text); }
.blog-filter button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.blog-filter button:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.blog-filter + .insights-grid { margin-top: 1.4rem; }
.post-card[hidden] { display: none !important; }
/* blog cards: the same meta row as the guide cards */
.insights-grid .post-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.insights-grid .post-card__meta .g-logos { font-size: 0.82rem; font-weight: 500; color: var(--text); }
.insights-grid .post-card__foot { margin-top: auto; padding-top: 0.4rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
/* while a category is selected the grid is even: no oversized feature card */
.insights-grid.is-filtered .post-card:first-child { grid-column: auto; display: flex; }
.insights-grid.is-filtered .post-card:first-child .post-card__media { aspect-ratio: 16 / 9; min-height: 0; }
.insights-grid.is-filtered .post-card:first-child .post-card__body { padding: 1.2rem 1.3rem 1.4rem; justify-content: flex-start; }
.insights-grid.is-filtered .post-card:first-child .post-card__title { font-size: 1.15rem; letter-spacing: -0.015em; line-height: 1.25; }
.insights-grid.is-filtered .post-card:first-child .post-card__dek { font-size: 0.92rem; }

@media (prefers-reduced-motion: reduce) { .g-card, .g-card__media img { transition: none; } }

/* real Attio screenshot that closes a section: no extra gap before the next part */
.post__part > .g-shot:last-child { margin-bottom: 0; }
