.ai-reference-page { background: #fcfdfc; color: #202520; }
.ai-main { max-width: 1465px; margin: 0 auto; padding: 40px 4.2% 56px; }
.ai-intro { display: grid; grid-template-columns: 1fr 330px; gap: 40px; align-items: center; padding-bottom: 28px; }
.ai-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .12em; color: #365c1f; margin: 0 0 12px; }
.ai-intro h1 { font-size: clamp(28px,3.5vw,48px); line-height: 1.55; letter-spacing: -.04em; margin: 0; font-weight: 700; }
.ai-intro h1 span { background: linear-gradient(transparent 70%,#c5f777 70%); }
.ai-lead { font-size: 16px; line-height: 1.9; color: #627456; margin: 17px 0 0; }
.ai-directory { background: #202520; color: #fff; border-radius: 16px; padding: 21px 23px; transform: rotate(1deg); box-shadow: 5px 5px 0 #c5f777; }
.ai-directory-label { display: block; font-size: 12px; color: #c5f777; margin-bottom: 10px; }
.ai-directory a { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid #678155; padding: 15px 0; font-size: 14px; }
.ai-directory a:last-child { padding-bottom: 1px; }
.ai-directory a span { color: #c5f777; white-space: nowrap; font-family: 'DM Sans',sans-serif; }
.ai-directory a:hover { color: #c5f777; }
.ai-directory a:focus-visible { outline-color: #c5f777; }
.ai-scope-note { display: flex; align-items: center; gap: 18px; border-top: 1px solid #e1ebda; border-bottom: 1px solid #e1ebda; padding: 15px 0; margin: 0 0 32px; }
.ai-scope-note > span { font-size: 12px; font-weight: 700; white-space: nowrap; color: #365c1f; }
.ai-scope-note p { font-size: 13px; line-height: 1.8; margin: 0; max-width: 710px; color: #64705c; }
.ai-scope-note time { margin-left: auto; font-size: 12px; color: #64705c; white-space: nowrap; }
.ai-section { scroll-margin-top: 25px; margin-bottom: 46px; }
.ai-section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 22px; }
.ai-section-heading h2 { font-size: 25px; line-height: 1.5; letter-spacing: -.025em; margin: 0; }
.ai-section-heading > span { font-size: 13px; color: #64705c; white-space: nowrap; padding-bottom: 4px; }
.outcome-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.outcome-card { overflow: hidden; background: #fff; border: 1px solid #dee9d6; border-radius: 16px; }
.case-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 22px 26px 8px; }
.case-label { font-size: 12px; line-height: 1.6; }
.case-number { font: 400 24px 'DM Sans',sans-serif; }
.outcome-card h3 { font: 700 38px 'DM Sans',sans-serif; letter-spacing: -.035em; margin: 0; padding: 0 26px 20px; }
.outcome-card h3 a, .implementation-card h3 a { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.outcome-card h3 a:hover, .implementation-card h3 a:hover { text-decoration: underline; text-underline-offset: 5px; }
.outcome-card h3 span { font-size: 28px; }
.case-webflow .case-top, .case-webflow h3 { background: #365c1f; color: #fff; }
.case-tally .case-top, .case-tally h3 { background: #c5f777; color: #202520; }
.case-webflow h3 a:focus-visible { outline-color: #c5f777; }
.case-fact { padding: 23px 26px; background: #f2f6ed; min-height: 200px; display: flex; flex-direction: column; justify-content: space-between; gap: 9px; border-bottom: 1px solid #e3ecdd; }
.case-fact p { font-size: 13px; line-height: 1.7; margin: 0; color: #627456; }
.case-fact > strong { font: 600 58px 'DM Sans',sans-serif; letter-spacing: -.04em; color: #5d7f45; }
.case-fact > strong > span { font-size: 29px; }
.case-fact > strong > .fact-arrow { font-size: 32px; color: #7fa564; margin: 0 13px; }
.case-fact > .fact-words { font-family: 'Noto Sans JP',sans-serif; font-size: 30px; line-height: 1.55; font-weight: 600; letter-spacing: -.02em; }
.case-body { padding: 24px 26px; }
.case-body h4 { font-size: 14px; margin: 0 0 9px; font-weight: 700; color: #5d7f45; }
.case-body p { font-size: 16px; line-height: 1.9; margin: 0; color: #536049; }
.case-insight { border-left: 3px solid #98ba80; padding-left: 13px; margin-top: 22px; }
.case-insight > span { display: block; font-size: 12px; color: #365c1f; margin-bottom: 6px; font-weight: 600; }
.case-insight p { font-size: 14px; }
.case-body .case-caveat { font-size: 12px; line-height: 1.8; margin-top: 18px; color: #6f7968; }
.case-source { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 23px; border-top: 1px solid #e3ecdd; padding-top: 16px; font-size: 14px; font-weight: 600; color: #365c1f; line-height: 1.7; }
.case-source:hover { text-decoration: underline; text-underline-offset: 4px; }
.case-source > span { font-size: 20px; }
.section-intro { font-size: 14px; line-height: 1.8; color: #65725b; margin: -9px 0 22px; }
.implementation-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.implementation-card { background: #fff; border: 1px solid #dee9d6; border-radius: 15px; overflow: hidden; display: flex; flex-direction: column; }
.implementation-top { padding: 24px; background: #eff4eb; }
.case-stripe .implementation-top { background: #e0e9ff; }
.case-gitbook .implementation-top { background: #eaf5d6; }
.implementation-top h3 { font: 600 25px 'DM Sans',sans-serif; letter-spacing: -.025em; margin: 17px 0 10px; }
.implementation-top h3 span { font-size: 20px; }
.implementation-top p { font-size: 14px; line-height: 1.8; margin: 0; }
.implementation-card .case-body { display: flex; flex-direction: column; flex: 1; padding: 23px; }
.case-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.case-tags span { font-size: 12px; line-height: 1.6; background: #f2f6ed; border-radius: 5px; padding: 5px 8px; color: #365c1f; }
.implementation-card .case-source { margin-top: auto; }
.implementation-card .case-insight { margin-bottom: 23px; }
.selection-notes { background: #f1f6ee; border: 1px solid #d8e5cf; border-radius: 12px; scroll-margin-top: 25px; }
.selection-notes summary { cursor: pointer; padding: 20px 24px; font-size: 15px; font-weight: 600; line-height: 1.7; }
.selection-notes summary > span { float: right; color: #365c1f; }
.selection-notes[open] summary > span { transform: rotate(45deg); }
.selection-notes summary:focus-visible { outline: 3px solid #365c1f; outline-offset: 3px; }
.selection-notes > div { padding: 0 24px 23px; max-width: 1000px; }
.selection-notes p { font-size: 14px; line-height: 1.9; color: #536049; }
.selection-notes a { font-size: 14px; color: #365c1f; text-decoration: underline; text-underline-offset: 4px; }
.selection-notes .selection-date { font-size: 12px; margin-bottom: 0; }
.back-gallery { display: inline-block; font-size: 14px; color: #365c1f; margin-top: 28px; padding: 8px 0; }
.back-gallery:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width:1100px) {
  .ai-intro { grid-template-columns: 1fr 300px; gap: 28px; }
  .implementation-grid { grid-template-columns: 1fr; }
  .implementation-card { display: grid; grid-template-columns: minmax(240px,1fr) 2fr; }
  .implementation-top { height: 100%; }
  .ai-scope-note { flex-wrap: wrap; gap: 8px 15px; }
}
@media (max-width:760px) {
  .ai-main { padding: 28px 5% 38px; }
  .ai-intro { grid-template-columns: 1fr; gap: 22px; padding-bottom: 24px; }
  .ai-intro h1 { font-size: clamp(25px,6.9vw,38px); }
  .ai-lead { font-size: 14px; }
  .ai-directory { padding: 12px 18px; transform: none; }
  .ai-directory-label { display: none; }
  .ai-directory a { padding: 9px 0; font-size: 13px; }
  .ai-directory a:nth-child(2) { border-top: 0; }
  .ai-scope-note { margin-bottom: 28px; }
  .ai-scope-note time { margin-left: 0; }
  .ai-section-heading { display: block; margin-bottom: 19px; }
  .ai-section-heading h2 { font-size: 22px; margin-bottom: 8px; }
  .ai-eyebrow { font-size: 11px; }
  .outcome-grid { grid-template-columns: 1fr; gap: 23px; }
  .case-top, .outcome-card h3 { padding-left: 21px; padding-right: 21px; }
  .case-fact, .case-body { padding: 22px 21px; }
  .case-fact { min-height: 185px; }
  .case-fact > strong { font-size: 54px; }
  .case-fact > .fact-words { font-size: 27px; }
  .implementation-card { display: flex; }
  .implementation-top { padding: 22px; }
  .selection-notes summary { padding: 18px; font-size: 14px; }
  .selection-notes > div { padding: 0 18px 20px; }
}

/* Shared yellow / black / white brand palette. */
.ai-reference-page { background: #fff; color: #151515; }
.ai-eyebrow, .ai-scope-note > span, .case-source,
.case-insight > span, .selection-notes summary > span,
.selection-notes a, .back-gallery { color: #151515; }
.ai-intro h1 span { background: linear-gradient(transparent 70%, #c4b5fd 70%); }
.ai-directory { background: #151515; box-shadow: 5px 5px 0 #6c3bff; }
.ai-directory-label, .ai-directory a span, .ai-directory a:hover { color: #c4b5fd; }
.ai-directory a { border-top-color: #555; }
.ai-directory a:focus-visible, .case-webflow h3 a:focus-visible { outline-color: #8b5cf6; }
.ai-scope-note { border-color: #dedede; }
.ai-lead, .ai-scope-note p, .ai-scope-note time,
.ai-section-heading > span, .case-fact p, .case-body p,
.case-body .case-caveat, .section-intro, .selection-notes p { color: #666; }
.outcome-card, .implementation-card { border-color: #dedede; }
.case-webflow .case-top, .case-webflow h3 { background: #151515; color: #fff; }
.case-tally .case-top, .case-tally h3 { background: #6c3bff; color: #fff; }
.case-fact { background: #fff; border-bottom-color: #dedede; }
.case-fact > strong, .case-body h4 { color: #151515; }
.case-fact > strong > .fact-arrow { color: #151515; }
.case-insight { border-left-color: #6c3bff; }
.implementation-top, .case-stripe .implementation-top,
.case-gitbook .implementation-top { background: #f1ecff; }
.case-tags span { background: #f1ecff; color: #151515; }
.selection-notes { background: #fff; border-color: #dedede; }
.selection-notes summary:focus-visible { outline-color: #6c3bff; }
