/* Amelia's free web tools. Builds on styles.css (tokens, nav, buttons, footer, sticky CTA). */

.tool-page { background: radial-gradient(120% 60% at 50% 0%, #1c1650 0%, var(--night-1) 40%, var(--night-0) 100%) fixed, var(--night-0); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 10px 16px; border-radius: 12px; background: var(--honey); color: #2a1a0e; }
.skip:focus { left: 12px; }
:focus-visible { outline: 2.5px solid var(--honey); outline-offset: 3px; border-radius: 6px; }

.tool-main { padding: 112px 0 120px; display: grid; gap: 40px; }
.tool-main > * { min-width: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13.5px; color: var(--muted); }
.crumbs a { color: var(--lav-2); }
.crumbs a:hover { text-decoration: underline; }

.tool-hero { max-width: 820px; }
.tool-hero .display { font-size: clamp(36px, 5.4vw, 64px); }
.tool-hero .lead { max-width: 40em; }
.tool-hero .updated { margin-top: 12px; }

/* ---------- Cards and forms ---------- */
.tool-card-big {
  background: linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .04));
  border-radius: 28px; padding: clamp(20px, 3vw, 32px);
  box-shadow: inset 0 0 0 1px var(--line), 0 30px 60px rgba(4, 3, 22, .35);
}
form.tool-card-big { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px 20px; align-items: end; max-width: 980px; }
form.tool-card-big .btn { justify-self: start; }
.field { display: grid; gap: 8px; }
.field label { font-size: 14.5px; font-weight: 800; color: var(--cream); }
.field small { font-size: 12.5px; color: var(--muted); font-weight: 600; line-height: 1.4; }
.field input, .field select {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 14px; border: 0;
  font: 800 16px/1.2 var(--round); color: var(--cream); color-scheme: dark;
  background: rgba(7, 8, 26, .55); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .16);
}
.field input:focus, .field select:focus { outline: none; box-shadow: inset 0 0 0 2px var(--lav); }
.form-error { grid-column: 1 / -1; color: var(--rose); font-size: 14.5px; }

/* ---------- Results ---------- */
.result { display: grid; gap: 18px; max-width: 980px; animation: rise .5s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.result-hero {
  display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center;
  padding: 24px; border-radius: 26px;
  background: radial-gradient(120% 140% at 0% 0%, rgba(255, 213, 138, .2), rgba(169, 155, 255, .12) 60%, rgba(255, 255, 255, .04));
  box-shadow: inset 0 0 0 1px rgba(255, 213, 138, .3);
}
.result-hero img { width: 84px; height: auto; }
.result-hero .big { font-family: var(--serif); font-weight: 700; font-size: clamp(28px, 4vw, 44px); line-height: 1.05; color: var(--honey); letter-spacing: -.02em; }
.result-hero p { color: var(--text); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat { padding: 16px 18px; border-radius: 20px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); }
.stat b { display: block; font-size: 22px; color: var(--cream); line-height: 1.2; }
.stat span { font-size: 13.5px; color: var(--muted); }
.timeline { list-style: none; display: grid; gap: 0; border-radius: 20px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.timeline li { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 13px 18px; font-size: 15px; color: var(--text); }
.timeline li:nth-child(odd) { background: rgba(255, 255, 255, .03); }
.timeline li.past { opacity: .55; }
.timeline li.now { color: var(--cream); background: rgba(255, 213, 138, .1); }
.timeline time { color: var(--lav-2); white-space: nowrap; }
.result .note { font-size: 14px; color: var(--muted); }

/* ---------- Amelia ad ---------- */
.app-ad {
  position: relative; display: grid; grid-template-columns: 1.3fr .7fr; gap: 28px; align-items: center;
  padding: clamp(24px, 4vw, 44px); border-radius: 32px; overflow: hidden;
  background: radial-gradient(90% 120% at 100% 0%, rgba(247, 166, 193, .22), transparent 60%), linear-gradient(160deg, #2a2170, #17133f 70%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 40px 80px rgba(4, 3, 22, .45);
}
.app-ad .kicker { margin-bottom: 12px; gap: 8px; }
.app-ad .kicker img { border-radius: 6px; }
.ad-title { font-family: var(--serif); font-weight: 650; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
.ad-title em { font-style: italic; color: var(--honey); }
.app-ad-copy > p { margin-top: 12px; color: var(--text); max-width: 34em; }
.ticks { list-style: none; display: grid; gap: 8px; margin: 18px 0 22px; }
.ticks li { position: relative; padding-left: 28px; color: var(--cream); font-size: 15.5px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .35em; width: 17px; height: 17px; border-radius: 50%; background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23123' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.ad-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.ad-cta .fine { max-width: 18em; }
.app-ad-phone { justify-self: center; width: min(250px, 100%); }
.app-ad-phone img { border-radius: 34px; box-shadow: 0 0 0 6px #0c0a22, 0 0 0 7.5px rgba(255, 255, 255, .18), 0 30px 60px rgba(0, 0, 0, .5); transform: rotate(3deg); }
.app-ad-amelia { position: absolute; right: clamp(150px, 26%, 300px); bottom: -8px; width: 92px; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .4)); }

/* ---------- Long-form content ---------- */
.block { max-width: 820px; display: grid; gap: 14px; }
.block h2 { font-family: var(--serif); font-weight: 650; font-size: clamp(25px, 3vw, 34px); line-height: 1.15; letter-spacing: -.015em; color: var(--cream); text-wrap: balance; }
.block h3 { font-size: 18px; font-weight: 900; color: var(--cream); margin-top: 6px; }
.block p, .block li { font-weight: 600; font-size: 17px; line-height: 1.65; color: var(--text); }
.block strong { color: var(--cream); font-weight: 800; }
.block ul, .block ol { padding-left: 1.3em; display: grid; gap: 6px; }
.block a, .disclaimer a { color: var(--lav-2); text-decoration: underline; text-underline-offset: 3px; }
.callout { padding: 16px 20px; border-radius: 18px; background: rgba(247, 166, 193, .1); box-shadow: inset 0 0 0 1px rgba(247, 166, 193, .3); }
.callout p { color: var(--cream); }

.table-wrap { max-width: 980px; overflow-x: auto; border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line); background: rgba(255, 255, 255, .03); }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
caption { text-align: left; padding: 16px 18px 6px; font-size: 13.5px; color: var(--muted); font-weight: 700; }
th, td { text-align: left; padding: 12px 18px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--text); font-weight: 700; }
thead th { font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--honey); font-weight: 900; }
tbody th { color: var(--cream); white-space: nowrap; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
table.weeks tr.current { background: rgba(255, 213, 138, .14); }
table.weeks tr.current th a::after { content: " ←"; color: var(--honey); }
table.weeks th a { color: var(--cream); }

.qa details { border-radius: 18px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); }
.qa summary { cursor: pointer; list-style: none; padding: 16px 48px 16px 20px; position: relative; font-weight: 900; font-size: 16.5px; color: var(--cream); }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--honey); transition: transform .3s var(--ease); }
.qa details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.qa details > div { padding: 0 20px 18px; display: grid; gap: 10px; }
.sources ul { list-style: none; padding: 0; }
.sources li { font-size: 15px; }
.disclaimer { max-width: 820px; font-size: 13.5px; color: var(--muted); font-weight: 600; line-height: 1.5; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tool-card { display: grid; gap: 6px; padding: 20px; border-radius: 22px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); transition: transform .35s var(--spring), background .3s; }
.tool-card:hover { transform: translateY(-3px); background: rgba(255, 255, 255, .09); }
.tool-card .tc-emoji { font-size: 28px; }
.tool-card b { font-size: 17px; color: var(--cream); }
.tool-card span:last-child { font-size: 14.5px; color: var(--muted); font-weight: 600; }
.related { max-width: none; }

/* ---------- Checklists ---------- */
.checklist { display: grid; gap: 20px; max-width: 980px; }
.check-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.check-progress { font-size: 17px; color: var(--text); }
.check-progress b { color: var(--honey); font-size: 22px; }
.check-actions { display: flex; gap: 8px; }
.check-sec { border: 0; display: grid; gap: 8px; }
.check-sec legend { font-family: var(--serif); font-size: 22px; font-weight: 650; color: var(--cream); margin-bottom: 8px; }
.check-sec ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.check-sec label { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; height: 100%; }
.check-sec label:hover { background: rgba(255, 255, 255, .07); }
.check-sec input { appearance: none; flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 7px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .3); display: grid; place-content: center; cursor: pointer; }
.check-sec input:checked { background: var(--mint); box-shadow: none; }
.check-sec input:checked::after { content: ""; width: 12px; height: 12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7' fill='none' stroke='%23123' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.check-sec span { display: grid; gap: 2px; font-size: 15.5px; color: var(--cream); }
.check-sec small { font-size: 13px; color: var(--muted); font-weight: 600; }
.check-sec input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, .3); }

/* ---------- Birth plan builder ---------- */
.bp { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.bp-form { display: grid; gap: 20px; }
.bp-step { padding: clamp(20px, 3vw, 28px); border-radius: 26px; background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .035)); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 18px; }
.bp-step header { display: flex; gap: 14px; align-items: flex-start; }
.bp-n { flex: none; display: grid; place-content: center; width: 38px; height: 38px; border-radius: 12px; background: var(--honey); color: #2a1a0e; font-weight: 900; }
.bp-n.locked { background: rgba(255, 255, 255, .08); font-size: 15px; }
.bp-step h3 { font-family: var(--serif); font-size: 24px; font-weight: 650; line-height: 1.15; }
.bp-amelia { color: var(--muted); font-size: 15px; margin-top: 4px; }
.q { border: 0; display: grid; gap: 10px; }
.q legend { font-size: 16.5px; font-weight: 900; color: var(--cream); margin-bottom: 8px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.opt span { display: inline-block; padding: 10px 15px; border-radius: 999px; font-size: 14.5px; color: var(--text); background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .16); transition: background .2s, color .2s; }
.opt input:checked + span { color: #2a1a0e; background: var(--honey); box-shadow: none; }
.opt input:focus-visible + span { outline: 2.5px solid var(--lav); outline-offset: 2px; }
.opt-info { display: none; }
.q-info summary { cursor: pointer; font-size: 13.5px; color: var(--lav-2); width: fit-content; }
.q-info p { margin-top: 6px; font-size: 14.5px; color: var(--text); font-weight: 600; line-height: 1.55; }
.bp-side { position: sticky; top: 96px; display: grid; gap: 16px; }
.bp-preview { padding: 22px; border-radius: 24px; background: #fffaf2; color: #2a2238; box-shadow: 0 30px 60px rgba(0, 0, 0, .35); max-height: 46vh; overflow: auto; }
.bp-preview h3 { font-family: var(--serif); font-size: 22px; color: #2a2238; }
.bp-preview .fine { color: #77708a; }
.bp-preview dl { display: grid; gap: 0; margin-top: 10px; }
.bp-preview dt { font-size: 12.5px; color: #77708a; font-weight: 700; padding-top: 8px; }
.bp-preview dd { font-size: 14.5px; font-weight: 800; padding-bottom: 8px; border-bottom: 1px solid #eee5d8; }
.bp-preview h4 { margin-top: 14px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #6b55d6; }
.bp-disclaimer { margin-top: 14px; font-size: 12px; color: #77708a; font-style: italic; font-weight: 600; }
.bp-finish { position: relative; padding: 24px; border-radius: 24px; background: linear-gradient(160deg, #3a2c8a, #1d1650); box-shadow: inset 0 0 0 1px rgba(255, 213, 138, .35); display: grid; gap: 10px; }
.bp-finish img:first-child { position: absolute; right: 14px; top: -34px; width: 74px; }
.bp-finish h3 { font-family: var(--serif); font-size: 24px; line-height: 1.1; padding-right: 70px; }
.bp-finish h3 em { color: var(--honey); }
.bp-finish p { color: var(--text); font-size: 15px; }
.bp-locked { list-style: none; display: grid; gap: 6px; }
.bp-locked li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--cream); }
.bp-locked .bp-n { width: 30px; height: 30px; }
.bp-finish .ticks { margin: 6px 0 8px; }
.bp-finish .appstore { justify-self: start; }

@media (max-width: 980px) {
  .bp { grid-template-columns: 1fr; }
  .bp-side { position: static; }
  .bp-preview { max-height: none; }
  .app-ad { grid-template-columns: 1fr; }
  .app-ad-phone { width: 210px; }
  .app-ad-amelia { right: 18px; bottom: auto; top: 18px; width: 64px; }
}
@media (max-width: 640px) {
  .tool-main { padding-top: 96px; gap: 32px; width: calc(100% - 32px); }
  .result-hero { grid-template-columns: 1fr; text-align: left; }
  .result-hero img { width: 64px; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .app-ad-amelia { display: none; }
  table { font-size: 14px; }
  th, td { padding: 10px 12px; }
}

@media print {
  body { background: #fff !important; color: #000; }
  .nav, .foot, .sticky-cta, .app-ad, .related, .qa, .sources, .crumbs, .check-actions, .tool-hero .lead, .tool-hero .updated, .disclaimer, .block, .skip { display: none !important; }
  .tool-main { padding: 0; }
  .tool-hero .display { color: #000; font-size: 26px; }
  .tool-hero .kicker { display: none; }
  .tool-card-big { box-shadow: none; background: none; padding: 0; }
  .check-sec legend, .check-sec span { color: #000; }
  .check-sec label { box-shadow: inset 0 0 0 1px #ccc; background: none; }
  .check-sec input { box-shadow: inset 0 0 0 1.5px #000; }
}
