/* "How it works" page */

.howto-hero { position: relative; overflow: hidden; padding: 165px 0 40px; text-align: center; background: linear-gradient(180deg, #fff7f5 0%, var(--paper) 100%); }
.howto-hero::before { position: absolute; width: 560px; height: 560px; right: -200px; top: -220px; border-radius: 50%; background: radial-gradient(circle, rgba(235,101,98,.16), transparent 68%); content: ""; }
.howto-hero::after { position: absolute; width: 440px; height: 440px; left: -260px; bottom: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(107,76,230,.1), transparent 70%); content: ""; }
.howto-hero .container { position: relative; z-index: 1; }
.howto-hero h1 { max-width: 880px; margin: 0 auto 24px; font-size: clamp(42px, 6vw, 72px); }
.howto-hero .hero-copy { margin-inline: auto; }

.smart-letters { display: flex; justify-content: center; gap: clamp(8px, 2vw, 22px); margin: 46px 0 34px; }
.smart-letters span { display: flex; width: clamp(56px, 12vw, 120px); aspect-ratio: .9; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 26px; background: #fff; box-shadow: 0 18px 40px rgba(65, 43, 38, .1); font-size: clamp(34px, 7vw, 68px); font-weight: 900; line-height: 1; letter-spacing: -.04em; opacity: 0; transform: translateY(24px) scale(.8); animation: letter-pop .7s cubic-bezier(.2, 1.3, .4, 1) forwards, letter-float 5s ease-in-out infinite; animation-delay: calc(var(--i) * .12s), calc(.9s + var(--i) * .3s); }
.smart-letters b { display: inline-block; padding: 0 .08em .08em 0; color: transparent; background: var(--gradient); -webkit-background-clip: text; background-clip: text; font-weight: 900; }
.smart-letters small { margin-top: 10px; color: var(--muted); font-size: clamp(8px, 1.5vw, 12px); font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
@keyframes letter-pop { to { opacity: 1; transform: none; } }
@keyframes letter-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.scroll-hint { display: inline-block; color: #b44878; font-size: 14px; font-weight: 750; text-decoration: none; }
.scroll-hint span { display: inline-block; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(4px); } }


/* SMART accordion: horizontal on desktop, vertical on mobile */
.smart-acc { display: flex; gap: 12px; height: 440px; }
.smart-item { --c: var(--pink); --c-soft: #fdf1f5; position: relative; display: flex; flex: 1 1 0; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 26px; background: #fff; transition: flex-grow .55s cubic-bezier(.3, .9, .3, 1), box-shadow .3s, border-color .3s; }
.smart-item.is-active { flex-grow: 6; border-color: color-mix(in srgb, var(--c) 40%, transparent); background: linear-gradient(160deg, var(--c-soft), #fff 70%); box-shadow: 0 24px 54px rgba(65, 43, 38, .1); }
.smart-head { display: flex; flex: 0 0 auto; flex-direction: column; align-items: center; justify-content: space-between; width: 100%; max-width: 100%; padding: 26px 0; border: 0; background: transparent; color: var(--ink); cursor: pointer; transition: width .55s; }
.smart-item:not(.is-active) .smart-head:hover .smart-letter { transform: scale(1.12); }
.smart-letter { display: block; color: #cfc8cc; font-size: clamp(64px, 9vw, 120px); font-weight: 900; line-height: 1; padding: 0 .1em .12em 0; letter-spacing: -.06em; transition: transform .35s cubic-bezier(.3, 1.5, .5, 1), font-size .5s; }
.smart-item.is-active .smart-letter { transform: scale(1.08); color: transparent; background: var(--gradient); -webkit-background-clip: text; background-clip: text; }
.smart-word { color: var(--muted); font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; transition: color .3s; }
.smart-item.is-active .smart-word { color: var(--c); }
.smart-head:focus-visible { outline: 3px solid var(--c); outline-offset: -3px; border-radius: 26px; }

.smart-item.is-active .smart-head { width: auto; flex: 0 0 clamp(120px, 15vw, 190px); }
.smart-panel { flex: 1 1 auto; min-width: 0; width: 0; opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s .25s; }
.smart-item.is-active .smart-panel { width: auto; opacity: 1; visibility: visible; transition: opacity .45s .2s, visibility 0s; }
.smart-item:not(.is-active) .smart-panel { position: absolute; }
.smart-panel-inner { display: flex; height: 100%; min-width: 300px; flex-direction: column; justify-content: center; padding: 30px 34px 30px 0; }
.smart-panel h3 { margin-bottom: 12px; font-size: clamp(24px, 3vw, 34px); }
.smart-panel p { margin: 0 0 22px; color: var(--muted); font-size: 16px; }
.smart-panel em { color: var(--ink); font-style: normal; font-weight: 700; }
.compare { display: grid; gap: 10px; }
.compare > div { padding: 12px 16px; border-radius: 14px; font-size: 15px; font-weight: 650; }
.compare small { display: block; margin-bottom: 2px; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.compare-bad { background: #f4f1f2; color: #8a838d; text-decoration: line-through; text-decoration-color: rgba(138, 131, 141, .5); }
.compare-bad small { text-decoration: none; display: block; }
.compare-good { background: var(--gradient); color: #fff; box-shadow: 0 10px 22px rgba(223, 98, 112, .22); }
.compare-good small { color: rgba(255, 255, 255, .8); }

@media (max-width: 900px) {
  .smart-acc { flex-direction: column; height: auto; gap: 10px; }
  .smart-item, .smart-item.is-active { flex: none; flex-direction: column; }
  .smart-head, .smart-item.is-active .smart-head { flex-direction: row; justify-content: flex-start; gap: 18px; width: 100%; padding: 14px 22px; }
  .smart-letter { font-size: 52px; }
  .smart-word { writing-mode: horizontal-tb; transform: none; font-size: 13px; }
  .smart-panel, .smart-item:not(.is-active) .smart-panel { position: static; display: grid; width: auto; grid-template-rows: 0fr; opacity: 1; visibility: visible; transition: grid-template-rows .45s ease; }
  .smart-item.is-active .smart-panel { grid-template-rows: 1fr; transition: grid-template-rows .45s ease; }
  .smart-panel-inner { min-width: 0; height: auto; overflow: hidden; padding: 0 24px; }
  .smart-item.is-active .smart-panel-inner { padding: 4px 24px 26px; }
  .smart-panel > * { min-height: 0; }
}
@media (max-width: 700px) {
  .smart-letters span { width: 58px; aspect-ratio: 1; border-radius: 18px; }
  .smart-letters small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  }
@media (prefers-reduced-motion: reduce) {
  .smart-letters span { animation: none; opacity: 1; transform: none; }
  .scroll-hint span { animation: none; }
  .smart-item, .smart-panel { transition: none; }
}

/* Goal type explorer */
.goal-preview-card[data-type] { cursor: pointer; transition: transform .25s, box-shadow .25s, border-color .25s; }
.goal-preview-card[data-type]:hover { transform: translateY(-4px); }
.goal-preview-card[data-type].is-selected { border-color: var(--t); box-shadow: 0 0 0 3px color-mix(in srgb, var(--t) 35%, transparent), 0 20px 42px rgba(52, 40, 45, .12); }
.goal-preview-card[data-type]:focus-visible { outline: 3px solid var(--t, var(--pink)); outline-offset: 3px; }
.explorer { margin-top: 40px; }
.explorer-body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 5vw, 56px); align-items: center; padding: clamp(20px, 4vw, 40px); border: 1px solid var(--line); border-radius: 30px; background: #fff; box-shadow: var(--shadow); animation: seg-in .45s ease both; }
.explorer-card { align-self: center; }
.explorer-img { position: relative; max-width: 460px; margin-inline: auto; }
.explorer-img img { width: 100%; }
.explorer-img { overflow: hidden; border-radius: 28px; }
.ex-area { position: absolute; border: 3px solid var(--t); border-radius: 16px; box-shadow: 0 0 0 999px rgba(242, 242, 247, .72), 0 0 18px color-mix(in srgb, var(--t) 60%, transparent); pointer-events: none; transition: left .35s cubic-bezier(.3, .9, .3, 1), top .35s cubic-bezier(.3, .9, .3, 1), width .35s cubic-bezier(.3, .9, .3, 1), height .35s cubic-bezier(.3, .9, .3, 1); }
.explorer-notes h3 { margin-bottom: 6px; font-size: clamp(22px, 2.6vw, 30px); }
.ex-intro { margin: 0 0 18px; color: var(--muted); }
.ex-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ex-list li { padding: 14px 16px; border: 1px solid var(--line); border-left: 5px solid var(--t); border-radius: 18px; background: #fff; cursor: pointer; transition: background .25s, box-shadow .25s; }
.ex-list li.on { background: color-mix(in srgb, var(--t) 7%, #fff); box-shadow: 0 12px 28px rgba(65, 43, 38, .09); }
.ex-head { display: flex; align-items: center; gap: 12px; }
.ex-head strong { font-size: 16px; }
.ex-tags { margin-left: auto; display: flex; gap: 4px; }
.ex-tags b { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 7px; background: #f4ecee; color: #b44878; font-size: 11px; font-weight: 900; }
.ex-text { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.ex-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.ex-list li .ex-cmp { display: grid; }
.ex-cmp div { padding: 8px 12px; border-radius: 12px; font-size: 13px; font-weight: 650; line-height: 1.4; }
.ex-cmp small { display: block; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.ex-bad { background: #f4f1f2; color: #8a838d; }
.ex-bad span { text-decoration: line-through; }
.ex-good { background: color-mix(in srgb, var(--t) 14%, #fff); }
.ex-good small { color: var(--t); }
@media (max-width: 900px) { .explorer-body { grid-template-columns: 1fr; } .explorer-card { position: static; } }
@media (max-width: 700px) { .ex-cmp { grid-template-columns: 1fr; } }
.goal-preview-card[data-type] > p:nth-of-type(1) { margin-bottom: 14px; }
.card-more { display: inline-flex; gap: 4px; align-self: flex-start; margin: auto 0 4px 8px; position: relative; top: 0; padding: 5px 13px; border: 1px solid color-mix(in srgb, var(--t) 45%, transparent); border-radius: 999px; color: var(--t); font-size: 12px; font-weight: 800; transition: background .2s, color .2s; }
.goal-preview-card[data-type]:hover .card-more { background: var(--t); color: #fff; }
.goal-preview-card[data-type].is-selected .card-more { background: color-mix(in srgb, var(--t) 12%, #fff); }


/* How goals connect */
.connect { max-width: 920px; margin: 64px auto 0; }
.connect-head { margin-bottom: 28px; text-align: center; }
.connect-head h3 { margin-bottom: 6px; font-size: clamp(24px, 3vw, 32px); }
.connect-head p { max-width: 560px; margin: 0 auto; color: var(--muted); }
.connect-map { --ln: rgba(32, 28, 44, .28); display: grid; grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1.35fr); align-items: center; padding: clamp(18px, 3vw, 32px); border: 1px solid var(--line); border-radius: 30px; background: #fff; box-shadow: var(--shadow); }
.c-card { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border: 3px solid var(--n); border-radius: 20px; background: #f2f2f7; }
.c-type { color: var(--n); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.c-card strong { font-size: 16px; line-height: 1.3; }
.c-hint { color: var(--muted); font-size: 13px; }
.c-root { padding: 20px; }
.c-root strong { font-size: clamp(20px, 2.4vw, 26px); }
.c-root::after { position: absolute; top: 50%; left: calc(100% + 3px); width: 40px; height: 2px; background: var(--ln); content: ""; }
.c-bar { display: block; height: 8px; margin: 12px 0 4px; overflow: hidden; border-radius: 8px; background: rgba(32, 28, 44, .1); }
.c-bar i { display: block; width: 67%; height: 100%; border-radius: inherit; background: var(--n); }
.c-subs { grid-column: 3; margin: 0; padding: 0; list-style: none; }
.c-subs > li { position: relative; padding: 7px 0 7px 36px; }
.c-subs > li::before { position: absolute; left: 0; top: 53px; width: 36px; height: 2px; background: var(--ln); content: ""; }
.c-subs > li::after { position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--ln); content: ""; }
.c-subs > li:first-child::after { top: 53px; }
.c-subs > li:last-child::after { bottom: calc(100% - 53px); }
.c-child { position: relative; margin: 14px 0 0 34px; }
.c-child::before { position: absolute; left: -18px; top: -14px; width: 18px; height: 50px; border-bottom: 2px solid var(--ln); border-left: 2px solid var(--ln); border-bottom-left-radius: 12px; content: ""; }
.n-primary { --n: #ea4f5a; } .n-long { --n: #ef6a30; } .n-std { --n: #5b8def; } .n-short { --n: #3fb53f; } .n-per { --n: #b43fd0; }
@media (max-width: 760px) {
  .connect-map { grid-template-columns: 1fr; }
  .c-root::after { top: 100%; left: 28px; width: 2px; height: 24px; }
  .c-subs { grid-column: 1; margin: 24px 0 0 28px; }
  .c-subs > li:first-child::after { top: -24px; }
  .c-subs > li { padding-left: 28px; }
  .c-subs > li::before { width: 28px; }
  .c-child { margin-left: 22px; }
}
.tap-hint { color: #b44878; font-weight: 700; text-decoration: none; }
.tap-hint:hover { text-decoration: underline; }
#smart { padding-top: 50px; }
