/* ---------- question page: a warm photo beside the family's story ---------- */
.qd-story-wrap { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 0; background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 1px 2px rgba(20, 40, 59, 0.04), 0 14px 32px rgba(20, 40, 59, 0.08); }
.qd-story-wrap > .qd-story { margin: 0; border: 0; border-radius: 0; box-shadow: none; align-self: center; }
.qd-photo { position: relative; margin: 0; min-height: 260px; }
.qd-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 40% 30%; }
.qd-photo figcaption { position: absolute; left: 12px; bottom: 12px; padding: 4px 9px; border-radius: 999px; font: 500 0.68rem/1 var(--sans); color: #fff; background: rgba(20, 40, 59, 0.55); backdrop-filter: blur(4px); }
@media (max-width: 760px) { .qd-story-wrap { grid-template-columns: minmax(0, 1fr); } .qd-photo { min-height: 200px; } }

/* ---------- home: "Every question here comes from a family" ---------- */
.fam-band { background: var(--wash); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: clamp(48px, 6vw, 84px) 0; }
.fam { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(28px, 4.5vw, 64px); align-items: center; }
.fam-photos { display: grid; grid-template-columns: 1.35fr 1fr; grid-template-rows: 1fr 1fr; gap: 14px; height: clamp(380px, 38vw, 500px); }
.fam-tile { position: relative; display: block; overflow: hidden; border-radius: 20px; background: var(--line); box-shadow: 0 1px 2px rgba(20, 40, 59, 0.05), 0 16px 34px rgba(20, 40, 59, 0.12); color: inherit; }
.fam-tile.big { grid-row: 1 / span 2; }
.fam-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease, ease); }
.fam-tile:hover { text-decoration: none; }
.fam-tile:hover img { transform: scale(1.04); }
.fam-cap { position: absolute; left: 12px; right: 12px; bottom: 12px; display: grid; gap: 5px; justify-items: start; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(6px); box-shadow: 0 6px 18px rgba(20, 40, 59, 0.14); transform: translateY(0); transition: transform 0.25s; }
.fam-tile:hover .fam-cap { transform: translateY(-3px); }
.fam-cap b { font: 600 0.98rem/1.3 var(--serif-text, var(--serif)); color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fam-tile.big .fam-cap b { font-size: 1.12rem; }
.fam-tile:not(.big) .fam-cap b { -webkit-line-clamp: 1; }
.fam-cap small { font: 500 0.76rem/1.2 var(--sans); color: var(--brass-ink, var(--brass)); }
.fam-cap .cc { font-size: 0.7rem; }
.fam-words h2 { font-family: var(--serif); font-size: clamp(1.9rem, 3.2vw, 2.6rem); line-height: 1.12; margin: 10px 0 18px; color: var(--ink); }
.fam-words p { font: 400 1.08rem/1.65 var(--serif-text, var(--serif)); color: var(--ink-2); margin: 0 0 14px; max-width: 34em; }
.fam-words .row { margin-top: 26px; }
.fam-note { display: block; margin-top: 22px; font: 500 0.74rem/1.3 var(--sans); color: var(--sub); }
@media (max-width: 900px) {
  .fam { grid-template-columns: minmax(0, 1fr); }
  .fam-photos { height: 420px; }
}
@media (max-width: 560px) {
  .fam-photos { grid-template-columns: 1fr; grid-template-rows: 300px; height: auto; }
  .fam-tile:not(.big) { display: none; }
  .fam-tile.big { grid-row: auto; }
}

/* ---------- home hero: the faces the work is for ---------- */
.hero-faces { display: inline-flex; align-items: center; gap: 14px; margin-top: 26px; color: var(--ink-2); }
.hero-faces:hover { text-decoration: none; }
.hero-faces-row { display: inline-flex; }
.hero-faces-row img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(20, 40, 59, 0.14); margin-left: -14px; transition: transform 0.25s var(--ease, ease); }
.hero-faces-row img:first-child { margin-left: 0; }
.hero-faces:hover .hero-faces-row img { transform: translateX(calc(var(--i) * 3px)); }
.hero-faces-text { font: 400 0.98rem/1.4 var(--serif-text, var(--serif)); }
.hero-faces-text b { color: var(--ink); }
.hero-faces-text em { font-style: normal; font-weight: 600; font-family: var(--sans); font-size: 0.88rem; color: var(--pine-deep); white-space: nowrap; }

/* ---------- home: photo on top of each question card ---------- */
a.card.photocard { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.photocard .qc-photo { position: relative; margin: 0; height: 170px; background: var(--line); }
.photocard .qc-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease, ease); }
.photocard:hover .qc-photo img { transform: scale(1.04); }
.photocard .cause { padding: clamp(18px, 2.2vw, 24px); flex: 1; }

/* ---------- questions page: a photo beside each row, on top of each tile ---------- */
.qrow.has-photo { grid-template-columns: 128px minmax(0, 1fr) auto; align-items: stretch; }
.qrow-photo { position: relative; display: block; min-height: 128px; border-radius: 14px; overflow: hidden; background: var(--line); }
.qrow-photo img, .qt-photo img, .ar-bty-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease, ease); }
.qrow:hover .qrow-photo img, .qtile2:hover .qt-photo img, .ar-bty:hover .ar-bty-photo img { transform: scale(1.05); }
.qrow-photo .qrow-mark { position: absolute; left: 8px; bottom: 8px; width: 32px; height: 32px; border-radius: 10px; box-shadow: 0 2px 8px rgba(20, 40, 59, 0.18); }
.qtile2.has-photo { overflow: hidden; }
.qt-photo { position: relative; display: block; height: 150px; margin: -22px -24px 2px; background: var(--line); }
@media (max-width: 640px) {
  .qrow.has-photo { grid-template-columns: minmax(0, 1fr); }
  .qrow-photo { min-height: 160px; }
  .qrow-photo .qrow-mark { display: grid; }
}

/* ---------- challenges page: a photo on top of each challenge card ---------- */
.ar-bty.has-photo { grid-template-rows: auto auto 1fr auto; overflow: hidden; }
.ar-bty-photo { position: relative; display: block; height: 130px; margin: -18px -18px 0; background: var(--line); }
.ar-bties .ar-bty-photo { margin: -20px -20px 0; }

/* ---------- Lend your AI: one card, the action is the hero ---------- */
/* the section gets its own plain background and a clear end, so it never runs into the practice round below */
#connect.band { background: var(--paper); border-bottom: 1px solid var(--line); padding-bottom: clamp(64px, 7vw, 96px); }

.ln-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 2px 4px rgba(20, 40, 59, 0.04), 0 24px 56px rgba(20, 40, 59, 0.10); overflow: hidden; }

/* context band: today's question and the reward */
.ln-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 32px; align-items: center; padding: 26px 32px; color: #fff; background: var(--pine-deep); }
.ln-tag { display: inline-flex; align-items: center; gap: 7px; font: 700 0.7rem/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: #a8d8c2; }
.ln-qt { display: block; margin-top: 10px; font: 600 clamp(1.3rem, 2.2vw, 1.65rem)/1.3 var(--serif); color: #fff; }
.ln-qt:hover { color: #e6f6ee; text-decoration: none; }
.ln-prize { display: grid; gap: 8px; }
.ln-prize span { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; color: #cfe7dc; white-space: nowrap; }
.ln-prize b { display: inline-grid; place-items: center; min-width: 48px; padding: 5px 10px; border-radius: 999px; font: 700 0.95rem/1 var(--serif); color: #fff; background: var(--brass); box-shadow: 0 2px 0 var(--brass-ink); }
@media (max-width: 760px) { .ln-top { grid-template-columns: minmax(0, 1fr); padding: 22px; } }

/* the three steps */
.ln-tiles { list-style: none; margin: 0; padding: 30px 28px 26px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px; background: var(--wash); }
@media (max-width: 900px) { .ln-tiles { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 22px 18px; } }
.ln-tile { position: relative; display: grid; align-content: start; gap: 8px; padding: 26px 22px 24px; border-radius: 18px; background: #fff; border: 1.5px solid var(--line); transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease), opacity 0.3s; }
/* arrows between tiles */
.ln-tile:not(:last-child)::after { content: "→"; position: absolute; right: -27px; top: 44px; width: 20px; text-align: center; font: 700 1.3rem/1 var(--sans); color: var(--line-strong); }
@media (max-width: 900px) { .ln-tile:not(:last-child)::after { content: "↓"; right: auto; left: 50%; top: auto; bottom: -22px; margin-left: -10px; font-size: 1.1rem; } }
.ln-tile b { font: 700 1.3rem/1.2 var(--serif); color: var(--ink); }
.ln-tile small { font-size: 0.9rem; line-height: 1.45; color: var(--ink-2); }
.ln-n { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 6px; border-radius: 50%; font: 700 1.25rem/1 var(--serif); color: var(--sub); background: var(--paper); border: 2px solid var(--line-strong); }

/* now: raised, outlined, impossible to miss */
.ln-tile.now { border: 2.5px solid var(--pine); box-shadow: 0 0 0 6px rgba(18, 107, 80, 0.10), 0 18px 40px rgba(18, 107, 80, 0.18); transform: translateY(-6px); }
.ln-tile.now .ln-n { color: #fff; background: var(--pine); border-color: var(--pine); animation: lnPulse 2s ease-in-out infinite; }
@keyframes lnPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(18, 107, 80, 0.35); } 50% { box-shadow: 0 0 0 10px rgba(18, 107, 80, 0); } }
.ln-here { position: absolute; top: -15px; left: 22px; padding: 7px 14px; border-radius: 999px; font: 700 0.78rem/1 var(--sans); letter-spacing: 0.02em; color: #fff; background: var(--brass); box-shadow: 0 3px 0 var(--brass-ink), 0 6px 14px rgba(116, 83, 15, 0.3); animation: lnBob 1.6s ease-in-out infinite; }
@keyframes lnBob { 50% { transform: translateY(-4px); } }

/* done: calm pine with a tick */
.ln-tile.done { background: #f1f8f4; border-color: var(--pine-soft); }
.ln-tile.done .ln-n { color: #fff; background: var(--pine-2); border-color: var(--pine-2); }
.ln-tile.done b { color: var(--pine-deep); }

/* locked: clearly waiting, with a reason */
.ln-tile.locked { background: transparent; border-style: dashed; border-color: var(--line-strong); }
.ln-tile.locked b, .ln-tile.locked small { color: var(--sub); }
.ln-tile.locked .ln-n { color: var(--faint); }
.ln-lock { margin: 6px 0 0; padding: 8px 12px; justify-self: start; border-radius: 999px; font: 600 0.78rem/1 var(--sans); color: var(--sub); background: var(--line-2); }

/* controls inside a tile */
.ln-ctl { display: grid; gap: 10px; margin-top: 10px; }
.ln-ctl input { width: 100%; padding: 16px 18px; font: 500 1.05rem/1.2 var(--sans); color: var(--ink); background: #fff; border: 2px solid var(--line-strong); border-radius: 14px; }
.ln-ctl input::placeholder { color: var(--faint); }
.ln-ctl input:focus { outline: none; border-color: var(--pine); box-shadow: 0 0 0 5px rgba(18, 107, 80, 0.14); }
.ln-big { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 17px 20px; font: 700 1.08rem/1 var(--sans); border-radius: 14px; box-shadow: 0 4px 0 var(--pine-deep); transition: transform 0.15s var(--ease), box-shadow 0.15s; }
.ln-big:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 5px 0 var(--pine-deep), 0 10px 20px rgba(18, 107, 80, 0.25); }
.ln-big:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--pine-deep); }
.ln-big:disabled { opacity: 0.5; box-shadow: none; }
.ln-tile.done .ln-big { color: var(--pine-deep); background: #fff; box-shadow: inset 0 0 0 1.5px var(--pine-soft); }
.ln-err { margin: 0; font-size: 0.86rem; color: var(--stop); }
.ln-err:empty { display: none; }
.ln-peek summary { cursor: pointer; font: 600 0.84rem/1.2 var(--sans); color: var(--pine); }
.ln-peek pre { margin: 8px 0 0; max-height: 220px; overflow: auto; padding: 12px 14px; font: 400 0.76rem/1.5 var(--mono); white-space: pre-wrap; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.ln-link { justify-self: start; margin-top: 4px; padding: 0; font: 600 0.86rem/1.2 var(--sans); color: var(--pine); background: none; border: 0; cursor: pointer; }
.ln-apps { display: flex; flex-wrap: wrap; gap: 8px; }
.ln-apps span { padding: 10px 16px; border-radius: 12px; font: 700 0.95rem/1 var(--sans); color: var(--pine-deep); background: #fff; border: 1.5px solid var(--pine-soft); }
.ln-done-note { margin: 4px 0 0; padding: 12px 14px; font-size: 0.88rem; line-height: 1.45; color: var(--pine-deep); background: var(--pine-wash); border-radius: 12px; }

/* quiet footer: what the AI will do, and the browser-only route */
.ln-foot { display: grid; gap: 14px; padding: 22px 32px 26px; border-top: 1px solid var(--line); }
.ln-does { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; }
.ln-does li { display: inline-flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--ink-2); }
.ln-does .ic { color: var(--pine); }
.ln-alt { margin: 0; font-size: 0.86rem; line-height: 1.5; color: var(--sub); }
.ln-alt a { font-weight: 600; color: var(--pine); }
@media (prefers-reduced-motion: reduce) { .ln-here, .ln-tile.now .ln-n { animation: none; } }

/* ---------- refinement pass ---------- */
/* locked tiles preview what is coming, faintly, under a small lock note */
.ln-locked { position: relative; display: grid; gap: 12px; margin-top: 10px; }
.ln-ghost { opacity: 0.32; filter: grayscale(1); pointer-events: none; user-select: none; }
.ln-ghost .ln-ctl { margin-top: 0; }
.ln-ghost .ln-done-note { display: none; }
.ln-lock { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 7px 12px; justify-self: start; border-radius: 999px; font: 600 0.78rem/1 var(--sans); color: var(--ink-2); background: #fff; border: 1px solid var(--line); }
.ln-tile.locked { background: rgba(255, 255, 255, 0.45); }

/* arrows between tiles: small round connectors */
.ln-tile:not(:last-child)::after { content: "›"; right: -30px; top: 40px; width: 26px; height: 26px; display: grid; place-items: center; font: 700 1.1rem/1 var(--sans); color: var(--pine); background: #fff; border: 1px solid var(--pine-soft); border-radius: 50%; box-shadow: 0 2px 6px rgba(20, 40, 59, 0.08); z-index: 2; }
@media (max-width: 900px) { .ln-tile:not(:last-child)::after { content: "⌄"; right: auto; left: 50%; top: auto; bottom: -24px; margin-left: -13px; } }

/* tile rhythm */
.ln-tiles { gap: 36px; padding: 34px 30px 30px; }
.ln-tile { padding: 28px 24px 24px; gap: 6px; }
.ln-n { margin-bottom: 10px; }
.ln-tile b { font-size: 1.32rem; }
.ln-tile small { min-height: 2.9em; }

/* header: reward pills as a tidy stacked panel */
.ln-prize { padding: 12px 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.12); }
.ln-prize span { font-size: 0.86rem; }

/* header rewards: two struck coins with a plain line each */
.ln-prize { display: grid; gap: 10px; padding: 14px 18px; min-width: 300px; }
.ln-prize > div { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; }
.ln-prize > div > span { display: grid; gap: 2px; font-size: 0.8rem; line-height: 1.3; color: #b9d6c9; white-space: normal; }
.ln-prize > div > span b { display: block; min-width: 0; padding: 0; font: 600 0.98rem/1.2 var(--serif); color: #fff; background: none; box-shadow: none; text-align: left; }
.ln-prize .coin { filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35)); }
.ln-prize > div:hover .coin { transform: rotate(-10deg) scale(1.06); }
@media (max-width: 760px) { .ln-prize { min-width: 0; } }

/* footer: four reassurances in an even grid */
.ln-foot { padding: 22px 30px 24px; gap: 16px; background: #fff; }
.ln-does { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .ln-does { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ln-does li { align-items: flex-start; gap: 10px; font-size: 0.86rem; line-height: 1.4; }
.ln-does .ic { flex: none; margin-top: 1px; padding: 5px; width: 26px; height: 26px; border-radius: 8px; background: var(--pine-wash); box-sizing: border-box; }
.ln-alt { padding-top: 14px; border-top: 1px solid var(--line-2); }

/* While sending an AI is closed in this release: one calm card with the two ways to help today */
.ln-soon { display: grid; gap: 12px; padding: 30px 32px; max-width: 760px; }
.ln-soon .ln-tag { color: var(--pine); }
.ln-soon h3 { margin: 0; font: 600 clamp(1.25rem, 2vw, 1.5rem)/1.3 var(--serif); }
.ln-soon p { margin: 0; line-height: 1.55; }
.ln-soon-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 2px; }
.ln-soon .ln-alt { padding-top: 12px; border-top: 1px solid var(--line-2); }
@media (max-width: 600px) { .ln-soon { padding: 22px 18px; } .ln-soon-cta .btn { flex: 1 1 100%; text-align: center; } }
