/* finance.css: components that only the finance template library has. Loaded after app.css. */

/* Header */
.header-utils .util-nav { font-weight: 600; }
.header-utils .util-email { display: inline-block; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
@media (max-width: 760px) {
  .header-utils .util-nav { display: none; }
  .header-utils .util-email { display: none; }
  .header-utils { gap: 10px; }
}

/* Card without a thumbnail: a quiet format block instead of an empty box */
.card-blank {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--tint) 0%, #f7fafd 100%);
  color: var(--navy); font-family: "Raleway", sans-serif; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .9rem;
}
.card-blank span { border: 2px solid currentColor; border-radius: 8px; padding: 6px 12px; opacity: .55; }
.card-blank--xlsx { background: linear-gradient(135deg, #e6f3ec 0%, #f5faf7 100%); color: #1d6b43; }
.card-blank--lg { aspect-ratio: 40 / 21; border-radius: var(--media-radius, 10px); font-size: 1.1rem; }

/* Template page */
.tpl-media { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.tpl-media img { display: block; width: 100%; height: auto; aspect-ratio: 40 / 21; object-fit: cover; object-position: top; }
.tpl-media .media-caption { position: absolute; left: 10px; bottom: 10px; background: rgba(11, 37, 69, .82); color: #fff; font-size: .75rem; padding: 3px 9px; border-radius: 999px; }
.product-vendor a { color: inherit; text-decoration: none; }
.product-vendor a:hover { text-decoration: underline; }
.tpl-meta { color: var(--muted); font-size: 1.02rem; margin: 6px 0 14px; }
.product-info .buy-box { flex-wrap: wrap; }
.product-info .upsell a { font-weight: 600; }
.tpl-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; margin: 36px 0 10px; align-items: start; }
.tpl-body .rte h2 { font-size: 1.25rem; margin: 26px 0 8px; }
.tpl-body .rte h2:first-child { margin-top: 0; }
.tpl-side { position: sticky; top: 90px; }
.tpl-faq { max-width: 820px; margin: 10px 0 40px; }
.tpl-faq h2 { font-size: 1.35rem; margin-bottom: 12px; }
.muted-note { color: var(--muted); font-size: .9rem; margin-top: 14px; }
.file-list { list-style: none; padding: 0; margin: 0; }
.file-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .95rem; word-break: break-all; }
.file-list .sz { margin-left: auto; color: var(--muted); white-space: nowrap; }
@media (max-width: 900px) {
  .tpl-body { grid-template-columns: 1fr; gap: 20px; }
  .tpl-side { position: static; }
}

/* Breadcrumb on the navy header band */
.crumbs--dark { position: relative; z-index: 2; color: #9fb3d3; padding-top: 18px; }
.crumbs--dark a { color: #cdd9ee; }
.crumbs--dark a:hover { color: #fff; }

/* Framework and pricing hero: one column, copy only */
.hero--fw { max-width: 760px; padding-top: clamp(18px, 3vw, 34px); }
.hero--fw .sub { max-width: 60ch !important; }
.hero--fw .pbuy { margin-top: 18px; }

/* Where a framework's templates come from */
.source-note { border-left: 4px solid var(--blue); background: var(--tint); border-radius: 0 10px 10px 0; padding: 12px 16px; margin: 0 0 28px; font-size: .95rem; color: #2c3650; }
.source-note--open-source { border-left-color: #1a8f5a; background: #eaf6ef; }
.source-note--practice { border-left-color: #8a96ab; background: #f2f4f8; }
.fw-group { margin-bottom: 18px; }
.fw-group h2 { font-size: 1.3rem; margin: 0 0 14px; }
.fw-group-note { display: inline-block; margin-left: 6px; font-size: .85rem; font-weight: 700; color: var(--blue); background: var(--tint); border-radius: 999px; padding: 2px 9px; vertical-align: middle; }

/* Framework lists (index page, related frameworks) */
.fw-links { list-style: none; padding: 0; margin: 0 0 34px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.fw-links a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm); transition: border-color .15s, transform .15s; }
.fw-links a:hover { border-color: var(--blue); transform: translateY(-1px); }
.fw-links b { color: var(--navy); font-family: "Raleway", sans-serif; font-size: 1.05rem; }
.fw-links span { color: var(--blue); font-size: .85rem; font-weight: 600; }
.fw-links em { font-style: normal; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.fwx-cat h2 { font-size: 1.3rem; margin: 10px 0 14px; }
.src-legend { list-style: none; padding: 0; margin: 0 0 30px; display: grid; gap: 8px; font-size: .92rem; color: #3a4458; }
.src-legend li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.src-pill { display: inline-block; font-size: .78rem; font-weight: 700; border-radius: 999px; padding: 2px 10px; background: var(--tint); color: var(--blue); white-space: nowrap; }
.src-pill--open-source { background: #eaf6ef; color: #1a7a4c; }
.src-pill--practice { background: #f2f4f8; color: #5b6b86; }

/* Pricing */
.pbuy .price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.pbuy .price-note { color: var(--muted); font-size: .95rem; }
.pbuy--dark .price-note { color: #cdd9ee; }
.pbuy .buy-box .btn { min-width: 220px; }
.pbuy--dark .form-msg { color: #ffd6d0; }
.offer-soon { margin: 0 0 12px; color: inherit; }
.pbuy--dark .offer-soon { color: #dbe7f8; }
.pricing-tables { display: grid; grid-template-columns: 1fr 1.4fr; gap: 34px; margin-top: 10px; }
.pricing-tables h3 { margin: 0 0 8px; }
.cat-table a { color: inherit; text-decoration: none; }
.cat-table a:hover { color: var(--blue); text-decoration: underline; }
.fw-table .src-cell { color: var(--muted); font-size: .85rem; padding-right: 12px; }
.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 10px; }
.tier-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: var(--shadow-sm); }
.tier-card p { margin: 0 0 8px; }
.tier-name { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--blue); }
.tier-price { font-family: "Raleway", sans-serif; font-weight: 800; font-size: 1.8rem; color: var(--navy); }
.tier-n { color: var(--muted); font-size: .88rem; }
@media (max-width: 760px) {
  .pricing-tables, .tier-grid { grid-template-columns: 1fr; }
  .pbuy .buy-box .btn { width: 100%; min-width: 0; }
}

/* Home */
.why-grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .why-grid--3 { grid-template-columns: 1fr; } }
.sources-line { color: var(--muted); font-size: .92rem; max-width: 760px; margin: 26px auto 0; }

/* Legal pages */
.legal { max-width: 760px; margin: 30px auto 60px; }
.legal h1 { margin-bottom: 14px; }
.legal h2 { font-size: 1.2rem; margin: 26px 0 8px; }
.legal ul { padding-left: 20px; }

/* [hidden] must win over the display rules of .btn, .panel and friends */
[hidden] { display: none !important; }
.product .product-media { margin-left: 0; margin-right: 0; }
.header-utils { justify-content: flex-end; }
@media (max-width: 989px) {
  .shop-header .page-width { grid-template-columns: auto 1fr; }
  .header-utils .util-link { max-width: none; }
}
body[data-page="template"] .product { padding-bottom: 10px; }
.lib-hero a.btn--primary, .lib-hero a.btn--primary:hover { color: #fff; text-decoration: none; }
.lib-hero a.btn--outline { text-decoration: none; }
.lib-hero p .btn { margin: 4px; }
