.bank-profile-page { max-width: 1280px; margin: 0 auto; }
.bank-profile-page > .share-tools { margin: 28px 0 0; padding: 16px 20px; border: 1px solid var(--line); background: #fff; }
.share-native[hidden] { display: none; }
.bank-profile-hero, .bank-profile-about { background: #fff; border: 1px solid var(--line); padding: clamp(24px,4vw,48px); margin-bottom: 32px; }
.bank-profile-hero { border-top: 3px solid var(--blue); }
.bank-profile-heading { display: flex; gap: 28px; align-items: center; min-width: 0; }
.bank-profile-heading > div { min-width: 0; }
.bank-profile-heading h1 { margin: 8px 0 16px; overflow-wrap: anywhere; }
.bank-profile-logo { flex: 0 0 140px; width: 140px; height: 140px; padding: 14px; object-fit: contain; border: 1px solid var(--line); background: #fff; }
.bank-profile-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; margin: 32px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.bank-profile-stats dt { color: var(--muted); font-size: .85rem; }
.bank-profile-stats dd { font-size: 1.8rem; font-weight: 700; margin: 8px 0 0; }
.bank-profile-about { width: 100%; box-sizing: border-box; border: 1px solid #d8dee7; border-radius: 3px; padding: clamp(24px,3.2vw,40px); margin-bottom: 36px; }
.bank-profile-about-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; }
.bank-profile-about-heading h2 { margin-top:0; }
.bank-profile-updated { flex:0 0 auto; margin:0; padding-top:2px; color:var(--muted); font-size:.82rem; text-align:right; }
.bank-profile-updated time { display:block; margin-top:4px; color:var(--text); font-size:.9rem; font-weight:600; }
.bank-content-tabs { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 18px; border-bottom:1px solid var(--line); }
.bank-content-tabs a { padding:13px 18px; border-bottom:3px solid transparent; text-decoration:none; color:var(--muted); font-weight:600; }
.bank-content-tabs a[aria-selected="true"], .bank-content-tabs a:hover { color:var(--blue); border-bottom-color:var(--blue); background:#edf4ff; }
.bank-profile-editor-tools { display:flex; gap:6px; margin:0 0 8px; }
.bank-profile-editor-tools button { min-width:42px; min-height:40px; border:1px solid var(--line); background:#fff; cursor:pointer; }
.bank-profile-editor textarea { width:100%; box-sizing:border-box; }
.bank-profile-copy ul { padding-left:1.4rem; }
.bank-profile-copy li { margin:.4rem 0; }
.bank-profile-history[hidden], .bank-profile-about[hidden] { display:none; }
.bank-profile-copy { width: 100%; max-width: none; line-height: 1.85; overflow-wrap: anywhere; }
.bank-profile-copy p { max-width: none; }
.bank-profile-history { padding-top: 8px; }
.bank-profile-history > p { color: var(--muted); }
.bank-profile-empty { background: #fff; padding: 28px; border: 1px solid var(--line); }
.fact-bank-link { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; text-decoration: none; color: inherit; }
.fact-bank-link span { min-width: 0; overflow-wrap: anywhere; }
.fact-bank-link:hover, .fact-bank-link:focus-visible { color: var(--blue); text-decoration: underline; }
@media (max-width: 620px) {
    .bank-profile-about { padding: 22px 18px; margin-bottom: 28px; }
    .bank-profile-about-heading { flex-direction:column; gap:10px; }
    .bank-profile-updated { text-align:left; }
    .bank-profile-heading { align-items: flex-start; flex-direction: column; gap: 20px; }
    .bank-profile-logo { flex-basis: auto; width: 112px; height: 112px; }
    .bank-profile-stats { grid-template-columns: 1fr; gap: 18px; }
    .bank-profile-history .pagination { flex-wrap: wrap; }
}

.bank-archive-card { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 24px; overflow-wrap: anywhere; }
.bank-archive-card h3 { margin: 16px 0; font-size: 1.15rem; }
.bank-archive-card > p { color: var(--muted); font-size: .9rem; }

.fact-bank-card { position: relative; }
.fact-bank-card .fact-bank-link::after { content: ""; position: absolute; inset: 0; }
.fact-bank-card:focus-within { outline: 2px solid #1c69d4; outline-offset: 3px; }

.bank-profile-page { padding-bottom: clamp(56px,7vw,96px); }
.bank-history-tools { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 24px; margin: 28px 0 20px; }
.bank-history-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); }
.bank-history-tabs a { display: block; padding: 13px 16px; border-bottom: 3px solid transparent; color: var(--muted); text-decoration: none; font-weight: 600; }
.bank-history-tabs a[aria-current="page"] { color: var(--blue); border-bottom-color: var(--blue); background: #edf4ff; }
.bank-history-tabs a:hover { color: var(--blue); }
.bank-history-search { flex: 0 1 430px; min-width: 0; }
.bank-history-search label { display: block; margin-bottom: 8px; font-size: .85rem; font-weight: 600; }
.bank-history-search > div { display: flex; gap: 8px; }
.bank-history-search input { min-width: 0; width: 100%; flex: 1; padding: 12px; border: 1px solid #9aa7b7; background: white; font: inherit; }
.bank-history-search .button { flex: 0 0 auto; }
.bank-history-summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 16px; font-size: .9rem; }
.bank-history-summary p { margin: 0; color: var(--muted); }
.bank-contest-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.bank-contest-row { position: relative; display: grid; grid-template-columns: 64px minmax(0,1fr) minmax(180px,220px); align-items: center; gap: 22px; padding: 24px; border: 1px solid var(--line); border-radius: 4px; background: white; }
.bank-contest-row:has(a):hover { border-color: var(--blue); box-shadow: 0 3px 12px #1426390d; }
.bank-contest-logo { width: 64px; height: 64px; padding: 6px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 700; font-size: .85rem; }
.bank-contest-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.bank-contest-main, .bank-contest-aside { min-width: 0; }
.bank-contest-row h3 { font-size: 1.1rem; margin: 5px 0 8px; line-height: 1.45; overflow-wrap: anywhere; }
.bank-contest-row h3 a { color: var(--ink,#142639); text-decoration: none; }
.bank-contest-row h3 a::after { content: ""; position: absolute; inset: 0; }
.bank-contest-row:focus-within { outline: 2px solid var(--blue); outline-offset: 3px; }
.bank-contest-row .bank-contest-meta, .bank-contest-row .bank-contest-organization, .bank-contest-row .bank-contest-archive-label { margin: 0; color: var(--muted); font-size: .85rem; line-height: 1.55; overflow-wrap: anywhere; }
.bank-contest-row .bank-contest-archive-label { margin-top: 8px; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.bank-contest-aside { text-align: right; }
.bank-contest-aside p { margin: 10px 0; font-size: .85rem; color: var(--muted); }
.bank-contest-action { font-size: .85rem; font-weight: 600; color: var(--blue); }
.bank-contest-row.bank-archive-card .status-badge { background: #f0f2f5; color: #58677a; }
.bank-history-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; margin: 32px 0 0; }
.bank-page-numbers { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bank-page-numbers a { display: grid; place-items: center; min-width: 40px; min-height: 44px; padding: 4px 10px; border: 1px solid var(--line); text-decoration: none; background: white; }
.bank-page-numbers a[aria-current="page"] { background: var(--blue); border-color: var(--blue); color: white; }
@media (max-width: 700px) {
    .bank-history-tools { align-items: stretch; gap: 20px; }
    .bank-history-tabs { width: 100%; }
    .bank-history-tabs a { padding: 12px 10px; font-size: .85rem; }
    .bank-history-search { flex-basis: 100%; }
    .bank-contest-row { grid-template-columns: 48px minmax(0,1fr); gap: 14px; padding: 18px; align-items: start; }
    .bank-contest-logo { width: 48px; height: 48px; padding: 4px; }
    .bank-contest-row h3 { font-size: 1rem; }
    .bank-contest-aside { grid-column: 1/-1; text-align: left; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; border-top: 1px solid var(--line); padding-top: 14px; }
    .bank-contest-aside p { margin: 0; }
    .bank-contest-action { margin-left: auto; }
}
.bank-profile-tabs-enabled .bank-profile-history { display:none; }
.bank-profile-tabs-enabled .bank-profile-history:target { display:block; }
.bank-profile-tabs-enabled .bank-profile-about:target { display:block; }
