/* IWD Guide: homepage, article, archive, search and 404 layouts. Values follow the Trusted Guide mockup. */

html { scroll-behavior: smooth; scroll-padding-top: 120px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

.iwd-main { margin-block: 0; overflow-x: clip; }
.iwd-main > * { margin-block: 0; }
.iwd-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.iwd-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.iwd-hero h1, .iwd-block h2, .iwd-block h3, .iwd-goal h3, .iwd-path h3, .iwd-news h2, .iwd-panel h2, .iwd-related h2, .iwd-card__title, .iwd-article__title, .iwd-archive__title { font-family: var(--wp--preset--font-family--heading); color: var(--wp--preset--color--navy); line-height: 1.15; letter-spacing: -.01em; margin: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) { .iwd-wrap { padding: 0 16px; } }

/* Hero */
.iwd-hero { background: linear-gradient(180deg, #fff 0%, var(--wp--preset--color--paper) 100%); border-bottom: 1px solid var(--wp--preset--color--line); }
.iwd-hero__inner { padding-top: 76px; padding-bottom: 72px; }
.iwd-hero h1 { font-size: clamp(40px, 5.6vw, 68px); font-weight: 750; letter-spacing: -.03em; max-width: 12ch; }
.iwd-hero__lede { font-size: 20px; color: var(--wp--preset--color--muted); max-width: 34em; margin: 20px 0 30px; }
.iwd-search { position: relative; max-width: 620px; margin: 0; }
.iwd-search svg { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--wp--preset--color--navy); pointer-events: none; }
.iwd-search input { width: 100%; font: 400 19px var(--wp--preset--font-family--body); color: var(--wp--preset--color--ink); padding: 20px 22px 20px 58px; border: 2px solid var(--wp--preset--color--navy); border-radius: 16px; background: #fff; box-shadow: 0 14px 34px -18px rgba(11, 37, 69, .45); }
.iwd-search input:focus { outline: none; border-color: var(--wp--preset--color--gold); box-shadow: 0 0 0 4px var(--wp--preset--color--gold-soft), 0 14px 34px -18px rgba(11, 37, 69, .45); }
.iwd-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.iwd-chips > span { font-size: 15px; color: var(--wp--preset--color--muted); align-self: center; margin-right: 2px; }
.iwd-chip { display: inline-flex; align-items: center; gap: 8px; font: 400 15px var(--wp--preset--font-family--body); color: var(--wp--preset--color--navy); background: #fff; border: 1.5px solid var(--wp--preset--color--line); border-radius: 999px; padding: 8px 15px 8px 11px; text-decoration: none; }
.iwd-chip:hover { border-color: var(--wp--preset--color--navy); }
.iwd-chip svg { width: 18px; height: 18px; }
@media (max-width: 960px) { .iwd-hero__inner { padding-top: 44px; padding-bottom: 48px; } }

/* Trust strip */
.iwd-trust { border-bottom: 1px solid var(--wp--preset--color--line); background: #fff; }
.iwd-trust ul { list-style: none; margin: 0; padding: 18px 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 28px; }
.iwd-trust li { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--wp--preset--color--ink); }
.iwd-trust li svg { color: var(--wp--preset--color--gold); flex-shrink: 0; }

/* Sections */
.iwd-block { padding: 84px 0; }
.iwd-sec-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 34px; flex-wrap: wrap; }
.iwd-sec-head h2, .iwd-section-title { font-size: clamp(30px, 3.4vw, 42px); letter-spacing: -.02em; }
.iwd-section-title { margin-bottom: 34px; }
/* The flow layout's block gap sets margin-top on the next block and wins over margin-bottom, so set the gap there too. */
.iwd-main .iwd-section-title + * { margin-block-start: 34px; }
.iwd-sec-head p { margin: 10px 0 0; color: var(--wp--preset--color--muted); max-width: 40em; }
.iwd-meta { font-size: 15px; color: var(--wp--preset--color--muted); }
.iwd-nomatch { color: var(--wp--preset--color--muted); font-size: 18px; margin: 0 0 24px; }
.iwd-nomatch[hidden], .iwd-market[hidden] { display: none; }
@media (max-width: 720px) { .iwd-block { padding: 56px 0; } }

/* Tool grid */
.iwd-goals { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; align-items: stretch; }
.iwd-goal { grid-column: span 4; background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 20px; padding: 24px 22px 14px; display: flex; flex-direction: column; scroll-margin-top: 120px; transition: border-color .2s, box-shadow .2s; }
.iwd-goal--wide { grid-column: span 6; }
.iwd-goal:target { border-color: var(--wp--preset--color--navy); box-shadow: 0 0 0 3px var(--wp--preset--color--gold-soft); }
.iwd-goal__head { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--wp--preset--color--line); margin-bottom: 6px; }
.iwd-goal__icon { width: 46px; height: 46px; border-radius: 14px; background: var(--wp--preset--color--mist); color: var(--wp--preset--color--navy); display: grid; place-items: center; flex-shrink: 0; }
.iwd-goal__head h3 { font-size: 21px; }
.iwd-goal__head small { display: block; color: var(--wp--preset--color--muted); font-size: 14px; margin-top: 2px; }
.iwd-tiles { list-style: none; margin: 0; padding: 0; }
.iwd-goal--wide .iwd-tiles { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; }
.iwd-tile[hidden], .iwd-goal[hidden] { display: none; }
.iwd-tile a { display: flex; gap: 12px; align-items: flex-start; padding: 12px 8px; margin: 0 -8px; border-radius: 12px; text-decoration: none; color: var(--wp--preset--color--ink); }
.iwd-tile a:hover { background: var(--wp--preset--color--mist); }
.iwd-tile a:hover b { text-decoration: underline; text-decoration-color: var(--wp--preset--color--gold); text-underline-offset: 3px; }
.iwd-tile svg { width: 22px; height: 22px; color: var(--wp--preset--color--navy-2); flex-shrink: 0; margin-top: 2px; }
.iwd-tile b { display: block; color: var(--wp--preset--color--navy); font-size: 16px; }
.iwd-tile span > span { display: block; font-size: 14px; color: var(--wp--preset--color--muted); line-height: 1.4; }
.iwd-calc-foot { margin: 26px 0 0; font-size: 15px; }
.iwd-calc-foot a { font-weight: 700; display: inline-block; padding-block: 4px; min-height: 24px; }
/* Desktop: rows of 7+5 and 3+3+6 fill all 12 columns. */
@media (min-width: 1061px) { .iwd-goal--retire { grid-column: span 7; } .iwd-goal--home { grid-column: span 5; } .iwd-goal--debt, .iwd-goal--tax { grid-column: span 3; } .iwd-goal--grow { grid-column: span 6; } .iwd-goal--debt .iwd-tiles, .iwd-goal--tax .iwd-tiles { grid-template-columns: 1fr; } }
@media (max-width: 1060px) { .iwd-goal, .iwd-goal--wide { grid-column: span 6; } }
@media (max-width: 720px) { .iwd-goal, .iwd-goal--wide { grid-column: 1 / -1; } .iwd-goal--wide .iwd-tiles { grid-template-columns: 1fr; } }

/* Start here */
.iwd-path-sec { background: var(--wp--preset--color--navy); color: #DCE5F0; }
.iwd-path-sec h2 { color: #fff; }
.iwd-path-sec .iwd-sec-head p { color: #B6C5D8; }
.iwd-path { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); counter-reset: s; position: relative; }
.iwd-path li { position: relative; padding: 0 26px 0 0; }
.iwd-path li::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--wp--preset--color--navy); border: 2px solid var(--wp--preset--color--gold); color: #fff; font: 750 18px var(--wp--preset--font-family--heading); position: relative; z-index: 1; margin-bottom: 18px; }
.iwd-path li::after { content: ""; position: absolute; top: 22px; left: 44px; right: 0; height: 2px; background: rgba(201, 162, 39, .45); }
.iwd-path li:last-child::after { display: none; }
.iwd-path h3 { color: #fff; font-size: 21px; margin-bottom: 8px; }
.iwd-path p { margin: 0 0 12px; font-size: 16px; color: #B6C5D8; }
.iwd-path a { color: #F0D97A; font-weight: 700; font-size: 15px; display: inline-block; padding-block: 4px; min-height: 24px; }
@media (max-width: 900px) { .iwd-path { grid-template-columns: 1fr 1fr; row-gap: 36px; } .iwd-path li:nth-child(2)::after { display: none; } }
@media (max-width: 560px) { .iwd-path { grid-template-columns: 1fr; } .iwd-path li { padding: 0 0 0 64px; } .iwd-path li::before { position: absolute; left: 0; top: 0; margin: 0; } .iwd-path li::after { left: 21px; top: 44px; bottom: -36px; right: auto; width: 2px; height: auto; } .iwd-path li:nth-child(2)::after { display: block; } }

/* Post cards: front page, archive, search, related */
.iwd-card-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.iwd-card { border-top: 3px solid var(--wp--preset--color--navy); padding-top: 18px; min-width: 0; }
.iwd-card__img { margin: 0 0 18px; border-radius: 14px; overflow: hidden; }
.iwd-card__img img { width: 100%; height: auto; display: block; }
.iwd-card__date { display: block; color: var(--wp--preset--color--muted); font-size: 14px; }
.iwd-card__title { font-size: 22px; margin: 6px 0 8px; }
.iwd-card__title a { color: var(--wp--preset--color--navy); text-decoration: none; }
.iwd-card__title a:hover { text-decoration: underline; text-decoration-color: var(--wp--preset--color--gold); }
.iwd-card__excerpt { margin: 0 0 10px; font-size: 16px; }
.iwd-card__excerpt p { margin: 0; }
@media (max-width: 900px) { .iwd-card-list { grid-template-columns: 1fr; } }
@media (min-width: 901px) and (max-width: 1060px) { .iwd-card-list { grid-template-columns: repeat(2, 1fr); } }

/* Market snapshot */
.iwd-market { padding-top: 0; }
.iwd-panel { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 20px; padding: 28px; display: grid; grid-template-columns: 1fr; gap: 18px 40px; align-items: start; }
.iwd-panel h2 { font-size: 24px; margin-bottom: 6px; }
.iwd-panel__intro p { color: var(--wp--preset--color--muted); margin: 0; }
@media (min-width: 900px) { .iwd-panel { grid-template-columns: 1fr 2fr; } }
.iwd-mkt { width: 100%; border-collapse: collapse; font-size: 16px; }
.iwd-mkt td { padding: 11px 0; border-bottom: 1px solid var(--wp--preset--color--line); }
.iwd-mkt td:nth-child(2) { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--wp--preset--color--navy); }
.iwd-mkt td:nth-child(3) { text-align: right; color: var(--wp--preset--color--muted); font-size: 14px; padding-left: 12px; }

/* Newsletter band */
.iwd-news { background: var(--wp--preset--color--gold-soft); border-top: 1px solid #EADFB8; border-bottom: 1px solid #EADFB8; }
.iwd-news__inner { display: flex; justify-content: space-between; align-items: center; gap: 24px 48px; flex-wrap: wrap; padding-top: 64px; padding-bottom: 64px; }
.iwd-news h2 { font-size: clamp(30px, 3.4vw, 40px); }
.iwd-news p { margin: 12px 0 0; color: #4C4A3E; }
.iwd-btn { display: inline-flex; align-items: center; font: 700 15px/1 var(--wp--preset--font-family--body); border-radius: 10px; padding: 14px 20px; text-decoration: none; background: var(--wp--preset--color--navy); color: #fff; }
.iwd-btn:hover { background: var(--wp--preset--color--navy-2); color: #fff; }

/* Article and page */
.iwd-article { padding: 56px 16px 72px; }
.iwd-article__title { font-size: clamp(32px, 4.4vw, 52px); font-weight: 750; letter-spacing: -.02em; }
.iwd-article__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--wp--preset--color--muted); font-size: 15px; margin: 14px 0 28px; }
.iwd-article__img { margin: 0 0 32px; }
.iwd-article__img img { width: 100%; height: auto; border-radius: 14px; display: block; }
.iwd-related { max-width: 1200px; margin: 72px auto 0; padding-top: 36px; border-top: 1px solid var(--wp--preset--color--line); }
.iwd-related h2 { font-size: 28px; margin-bottom: 24px; }

/* Archive, search, 404 */
.iwd-archive { padding: 56px 16px 80px; }
.iwd-archive__title { font-size: clamp(32px, 4.4vw, 52px); font-weight: 750; letter-spacing: -.02em; margin-bottom: 12px; }
.iwd-archive__desc { color: var(--wp--preset--color--muted); max-width: 44em; margin: 0 0 32px; }
.iwd-archive .iwd-searchblock { margin: 0 0 32px; }
.iwd-pagination { margin-top: 40px; gap: 16px; }
.iwd-pagination a, .iwd-pagination .page-numbers { display: inline-block; min-width: 24px; min-height: 24px; padding: 2px 6px; text-align: center; }
.iwd-empty { font-size: 18px; color: var(--wp--preset--color--muted); }
.iwd-notfound__top { padding: 64px 16px 8px; }
.iwd-notfound__top .iwd-searchblock { margin-top: 24px; }
.iwd-searchblock .wp-block-search__input { border: 2px solid var(--wp--preset--color--navy); border-radius: 12px; padding: 12px 16px; font: 400 17px var(--wp--preset--font-family--body); }
.iwd-searchblock .wp-block-search__button { background: var(--wp--preset--color--navy); color: #fff; border: 0; border-radius: 10px; padding: 12px 18px; font: 700 15px var(--wp--preset--font-family--body); cursor: pointer; }

/* Tool hubs (F-07) and tool/guide links (F-04) */
.iwd-hubpage .iwd-hub, .iwd-hubpage .iwd-hubnav { max-width: 1200px; }
.iwd-hub { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 20px; padding: 24px 22px 14px; margin: 32px 0 0; }
.iwd-hub__head { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--wp--preset--color--line); margin-bottom: 6px; }
.iwd-hub__head h2 { font-family: var(--wp--preset--font-family--heading); color: var(--wp--preset--color--navy); font-size: 24px; line-height: 1.15; margin: 0; overflow-wrap: anywhere; }
.iwd-hub__head p { margin: 2px 0 0; color: var(--wp--preset--color--muted); font-size: 14px; }
.iwd-hub .iwd-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 18px; }
.iwd-hub .iwd-tile a { min-height: 44px; }
@media (max-width: 1060px) { .iwd-hub .iwd-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .iwd-hub { padding: 20px 16px 8px; } .iwd-hub .iwd-tiles { grid-template-columns: 1fr; } }
.iwd-hubnav { margin: 48px 0 0; padding-top: 28px; border-top: 1px solid var(--wp--preset--color--line); }
.iwd-hubnav h2, .iwd-trycalc h2 { font-family: var(--wp--preset--font-family--heading); color: var(--wp--preset--color--navy); font-size: 24px; line-height: 1.15; margin: 0 0 16px; }
.iwd-hubnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.iwd-hubnav a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border: 1px solid var(--wp--preset--color--line); border-radius: 999px; background: #fff; color: var(--wp--preset--color--navy); text-decoration: none; font-size: 16px; }
.iwd-hubnav a:hover { background: var(--wp--preset--color--mist); text-decoration: underline; text-decoration-color: var(--wp--preset--color--gold); text-underline-offset: 3px; }
.iwd-hubnav svg { color: var(--wp--preset--color--navy-2); flex-shrink: 0; }
.iwd-trycalc { max-width: 760px; margin: 40px auto 0; padding: 20px 22px 8px; background: var(--wp--preset--color--gold-soft); border: 1px solid var(--wp--preset--color--line); border-radius: 14px; }
.iwd-trycalc .iwd-tile a:hover { background: #fff; }
.iwd-trycalc .iwd-tile a { min-height: 44px; }
