.tools-menu { position: relative; white-space: nowrap; }
.tools-menu summary { cursor: pointer; padding: 10px; border-radius: 10px; font-size: 13px; font-weight: 700; list-style: none; }
.tools-menu summary::-webkit-details-marker { display: none; }
.tools-menu[open] summary,.tools-menu summary:hover { background: #eaf2ff; color: #2563eb; }
.tools-dropdown { position: absolute; right: 0; top: calc(100% + 10px); width: 200px; padding: 8px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 12px 30px #0f172a18; }
.tools-dropdown a { display: block; padding: 12px; border-radius: 8px; color: #334155; text-decoration: none; }
.tools-dropdown a:hover { background: #eff6ff; }
.exchange-page { max-width: 1080px; margin: auto; }
.exchange-heading { position: relative; padding: 12px 0 20px; }
.exchange-heading h1 { margin: 14px 0; }
.exchange-heading p,.exchange-meta,.exchange-footnote { color: var(--trypify-text-secondary); }
.exchange-flags { position: absolute; right: 0; top: 30px; max-width: 200px; font-size: 32px; line-height: 1.7; letter-spacing: 10px; transform: rotate(-7deg); }
.exchange-rate-card { background: linear-gradient(120deg,#eff6ff,#fff 65%,#f5f3ff); border: 1px solid #dbeafe; }
.exchange-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: end; }
#exchange-status { font-size: clamp(18px,3vw,28px); font-weight: 750; overflow-wrap: anywhere; }
#exchange-status.is-error,#exchange-validation { color: #b42318; font-size: 14px; }
.exchange-meta { font-size: 12px; line-height: 1.7; margin: 12px 0 0; }
.exchange-table-wrap { overflow: auto; max-height: 420px; }
.exchange-results table { width: 100%; min-width: 0; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.exchange-results td,.exchange-results th { padding: 12px 8px; border-bottom: 1px solid #e2e8f0; text-align: right; white-space: nowrap; }
.exchange-results th:first-child { text-align: left; }
.exchange-footnote { font-size: 12px; line-height: 1.8; }
.exchange-footnote span { white-space: nowrap; }
@media(max-width:760px) { .exchange-flags { display: none; } .exchange-pair { grid-template-columns: 1fr 1fr; gap: 8px; } #exchange-refresh { grid-column: 1 / -1; } .exchange-pair select { padding-left: 7px; font-size: 12px; } .site-nav { gap: 8px; } .tools-menu summary { padding: 8px 4px; } }
@media(max-width:400px) { .nav-actions { gap: 4px; } .nav-create { padding: 8px; } .site-nav { padding-left: 10px; } .brand { font-size: 17px; gap: 5px; } .brand-mark { width: 25px; height: 25px; } }

.exchange-currencies { min-width: 0; margin: 8px 0; padding: 0; border: 0; }
.exchange-currencies legend { font-weight: 750; margin-bottom: 12px; }
.exchange-selection-actions { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 12px; }
.exchange-selection-actions span { margin-right: auto; }
.exchange-selection-actions button { min-height: 32px; padding: 7px 10px; font-size: 12px; }
.exchange-currency-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; }
.exchange-currency { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid #dbe3ed; border-radius: 12px; background: #ffffffb3; cursor: pointer; }
.exchange-currency:has(input:checked) { background: #eaf2ff; border-color: #60a5fa; }
.exchange-currency:focus-within { outline: 2px solid #2563eb; outline-offset: 2px; }
.exchange-currency input { flex-shrink: 0; }
.exchange-currency > span:first-of-type { font-size: 23px; }
.exchange-currency strong,.exchange-currency small { display: block; }
.exchange-currency small { font-size: 10px; font-weight: 500; line-height: 1.4; }
.exchange-results td:first-child { text-align: left; }
#exchange-validation:empty { display: none; }
#exchange-refresh { justify-self: start; }
@media(max-width:900px) { .exchange-currency-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media(max-width:600px) { .exchange-currency-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } #exchange-refresh { width: 100%; } .exchange-pair { grid-template-columns: 1fr; } .exchange-currency { padding: 8px; gap: 6px; } }

.exchange-mode { display: flex; gap: 8px; border: 0; padding: 0; margin: 0 0 8px; }
.exchange-mode-label { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.exchange-mode label { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.exchange-mode input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.exchange-mode span { display: block; padding: 12px 18px; border: 1px solid #dbe3ed; border-radius: 10px; background: white; }
.exchange-mode input:checked + span { color: #1d4ed8; background: #dbeafe; border-color: #60a5fa; }
.exchange-mode input:focus-visible + span { outline: 2px solid #2563eb; outline-offset: 2px; }
.exchange-single-fields { display: flex; align-items: end; gap: 14px; }
.exchange-single-fields label { flex: 1; }
.exchange-page [hidden] { display: none !important; }
.exchange-meta.is-stale { color: #92400e; }
