/* A centered, page-based workspace. The animated field remains behind the UI. */
.hero { display: flex; flex-direction: column; gap: 0; padding: 76px 0 60px; text-align: center; }
.hero-copy { width: 100%; max-width: 1040px; margin: 0 auto; }
.hero-actions { justify-content: center; }
.hero h1 { max-width: 980px; margin: 0 auto 24px; font-size: clamp(46px,5.8vw,78px); }
html[lang=ar] .hero h1 { font-size: clamp(43px,5.6vw,73px); }
html:not([lang=ar]) :is(.section-heading h2,.directory-group-head h3,.tool-page-hero h1,.more-tools h2,.home-support-teaser h2) { font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif; font-weight: 650; }
.hero-lede { max-width: 690px; margin: 0 auto; }
.hero-actions { margin: 32px 0 0; }
.hero-market { width: min(100%,820px); max-width: none; margin: 56px auto 0; text-align: center; }
.market-content { padding-top: 24px; padding-bottom: 27px; }
.market-status,.market-spectrum { justify-content: center; }
.market-detail { text-align: center; }
.market-spectrum { margin-top: 23px; }
.warn { text-align: center; margin: 0 auto 82px; max-width: 820px; }
.section-heading { display: block; text-align: center; margin: 0 auto 42px; }
.section-heading>div:first-child { max-width: 780px; margin: auto; }
.section-heading p { max-width: 620px; margin: 0 auto; }
.tool-directory { display: grid; gap: 43px; max-width: 1050px; margin: 0 auto; }
.directory-group-head { text-align: center; margin: 0 auto 22px; }
.directory-group-head h3 { margin: 0 0 3px; font-size: clamp(23px,2.7vw,34px); line-height: 1.18; letter-spacing: -.03em; }
html[lang=ar] .directory-group-head h3 { letter-spacing: 0; }
.directory-group-head p { margin: 0; color: var(--muted); font-size: 13px; }
.directory-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.directory-grid:has(> :nth-child(3)) { grid-template-columns: repeat(3,minmax(0,1fr)); }
.directory-card { display: flex; flex-direction: column; min-height: 220px; padding: 25px 28px 26px; border-radius: 11px; transition: border-color .25s,background .25s,transform .25s; }
.directory-card:hover { transform: translateY(-3px); border-color: var(--line-hi); background: linear-gradient(145deg,#ffffff1c,#ffffff08); }
.directory-card-top { display: flex; align-items: center; justify-content: flex-end; }
.card-arrow { display: grid; place-items: center; width: 30px; height: 30px; color: var(--text); border: 1px solid var(--line); border-radius: 6px; font-size: 16px; letter-spacing: 0; }
.directory-card-copy { display: grid; gap: 7px; margin-top: auto; }
.directory-card-copy strong { display: block; color: var(--text); font-size: clamp(21px,2.1vw,28px); line-height: 1.2; letter-spacing: -.025em; }
html[lang=ar] .directory-card-copy strong { letter-spacing: 0; }
.directory-card-copy small { display: block; max-width: 420px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.home-support-teaser { display: grid; justify-items: center; gap: 20px; max-width: 1050px; margin: 0 auto 60px; padding: 40px 30px; border-radius: 12px; text-align: center; }
.home-support-teaser h2 { font-size: clamp(28px,3.5vw,43px); line-height: 1.15; margin: 0 0 10px; }
.home-support-teaser p { color: var(--muted); max-width: 560px; margin: 0 auto; font-size: 14px; }
.home-support-teaser>a { display: inline-flex; align-items: center; gap: 18px; padding: 11px 16px; color: #151515; background: #efefef; border-radius: 6px; font-size: 13px; font-weight: 750; }
.home-support-teaser>a:hover { background: #d5d5d5; }

body[data-page=home] .tool-grid,body[data-page=home] .support-section,body[data-page=home] .tool-page-hero,body[data-page=home] .more-tools { display: none; }
body[data-page=home] .tools-section { padding-bottom: 75px; }

.tool-page-hero { max-width: 900px; margin: 0 auto; padding: 85px 0 51px; text-align: center; }
.tool-page-hero h1 { margin: 13px auto 13px; font-size: clamp(43px,5.4vw,72px); line-height: 1.1; letter-spacing: -.045em; }
html:not([lang=ar]) .tool-page-hero h1 { font-weight: 700; letter-spacing: -.045em; }
html[lang=ar] .tool-page-hero h1 { letter-spacing: 0; line-height: 1.23; }
.tool-page-hero p { max-width: 650px; margin: 0 auto; color: var(--muted); font-size: 16px; line-height: 1.7; }
.page-hero-actions { display: flex; justify-content: center; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 25px; }
.page-back,.page-utility { display: inline-flex; align-items: center; min-height: 36px; color: var(--text); background: #ffffff0a; border: 1px solid var(--line); border-radius: 6px; padding: 7px 12px; font-size: 12px; font-weight: 700; }
.page-utility { gap: 6px; }
.page-back:hover,.page-utility:hover { background: #ffffff1b; border-color: var(--line-hi); }
.support-page-hero .page-back { margin-top: 26px; }
body[data-page^="tool-"] .hero,body[data-page^="tool-"] .warn,body[data-page^="tool-"] .section-heading,body[data-page^="tool-"] .tool-directory,body[data-page^="tool-"] .support-section,body[data-page^="tool-"] .home-support-teaser { display: none; }
body[data-page^="tool-"] .tools-section { padding-bottom: 73px; }
body[data-page^="tool-"] .tool-grid { display: block; max-width: 920px; margin: 0 auto; }
body[data-page^="tool-"] .tool-card { display: none; border-radius: 12px; }
body[data-page="tool-scanner"] #tool-scanner,body[data-page="tool-signals"] #tool-signals,body[data-page="tool-discipline"] #tool-discipline,body[data-page="tool-paper"] #tool-paper,body[data-page="tool-loss"] #tool-loss,body[data-page="tool-change"] #tool-change,body[data-page="tool-convert"] #tool-convert { display: block; }
body[data-page^="tool-"] .tool-head { display: none; }
body[data-page^="tool-"] .tool-card .b { max-width: 840px; margin: 0 auto; padding: clamp(24px,4.5vw,48px); }
body[data-page^="tool-"] .tool-card input,body[data-page^="tool-"] .tool-card select { background: #0a0a0bc7; }
.more-tools { max-width: 1050px; margin: 0 auto 82px; text-align: center; }
.more-tools h2 { font-size: clamp(28px,3.2vw,42px); margin: 0 0 28px; line-height: 1.15; }
.next-tools-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; text-align: start; }
.next-tool-card { display: flex; flex-direction: column; min-height: 110px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 8px; background: #ffffff07; transition: background .2s,border-color .2s; }
.next-tool-card:hover { border-color: var(--line-hi); background: #ffffff16; }
.next-tool-card .directory-card-copy { margin-top: auto; }
.next-tool-card .directory-card-copy strong { font-size: 16px; }

body[data-page=support] .hero,body[data-page=support] .warn,body[data-page=support] .tools-section,body[data-page=support] .home-support-teaser,body[data-page=support] .more-tools { display: none; }
body[data-page=support] .support-section { border-top: 0; padding: 0 0 100px; }
body[data-page=support] .support-section .section-heading { display: none; }
body[data-page=support] .support-grid { max-width: 1050px; margin: auto; }
body[data-page=support] .wallet-value { font: 12px/1.45 Consolas,ui-monospace,monospace; }
body[data-page=support] .contact-line,body[data-page=support] .privacy-line { text-align: center; }
body:not([data-page=home]) .feed-home { display: none; }
.usage-line { margin: 24px auto 4px; text-align: center; color: var(--muted); font-size: 14px; }
.usage-line strong { color: var(--text); font-variant-numeric: tabular-nums; }

html[data-theme=light] .directory-card:hover { background: #fffdfa; }
html[data-theme=light] .home-support-teaser>a { color: #fff; background: #302e2b; }
html[data-theme=light] .home-support-teaser>a:hover { background: #55504a; }
html[data-theme=light] .page-back,html[data-theme=light] .page-utility,html[data-theme=light] .next-tool-card { color: #292724; background: #ffffffad; }
html[data-theme=light] .next-tool-card:hover { background: #fffdfa; }
html[data-theme=light] body[data-page^="tool-"] .tool-card input,html[data-theme=light] body[data-page^="tool-"] .tool-card select { background: #fffdfa; }

@media(max-width:900px) {
  .hero { padding-top: 65px; }
  .hero-market { margin-top: 43px; }
  .directory-grid:has(> :nth-child(3)) { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .support-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:650px) {
  .hero { padding: 47px 0 38px; }
  .hero h1,html[lang=ar] .hero h1 { font-size: clamp(40px,10.2vw,57px); }
  .hero-market { margin-top: 33px; }
  .directory-grid,.directory-grid:has(> :nth-child(3)),.next-tools-grid { grid-template-columns: 1fr; }
  .tool-directory { gap: 41px; }
  .directory-card { min-height: 178px; padding: 20px; }
  .directory-group-head { margin-bottom: 17px; }
  .home-support-teaser { padding: 37px 20px; }
  .tool-page-hero { padding: 53px 0 32px; }
  .tool-page-hero h1 { font-size: clamp(39px,9.6vw,53px); }
  .tool-page-hero p { font-size: 14px; }
  body[data-page^="tool-"] .tool-card .b { padding: 21px 18px 26px; }
  .more-tools { margin-bottom: 58px; }
  .support-grid { grid-template-columns: 1fr; }
}

/* Clear controls and restrained orange feedback for the main actions. */
:root { --orange: #ee9c52; --orange-ink: #20150e; --orange-wash: rgba(238,156,82,.16); }
html[data-theme=light] { --orange: #aa5522; --orange-ink: #fff; --orange-wash: rgba(170,85,34,.1); }
body { font-size: 16px; }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
.nav-links a:hover,.nav-links a.is-current { color: var(--text); }
.nav-links a.is-current { box-shadow: inset 0 -2px var(--orange); }
#lsel,.nav-share,.theme-toggle { min-height: 44px; }
.theme-toggle { width: 44px; flex-basis: 44px; }
.primary-action,.tool-card .b>button:not(.g),.r button:not(.g),.home-support-teaser>a { color: var(--orange-ink); background: var(--orange); border-color: var(--orange); min-height: 49px; }
.primary-action:hover,.tool-card .b>button:not(.g):hover,.r button:not(.g):hover,.home-support-teaser>a:hover { color: var(--orange-ink); background: color-mix(in srgb,var(--orange) 84%,white); border-color: var(--orange); }
html[data-theme=light] .primary-action,html[data-theme=light] .tool-card .b>button:not(.g),html[data-theme=light] .r button:not(.g),html[data-theme=light] .home-support-teaser>a { color: #fff; background: var(--orange); border-color: var(--orange); }
html[data-theme=light] .primary-action:hover,html[data-theme=light] .tool-card .b>button:not(.g):hover,html[data-theme=light] .home-support-teaser>a:hover { color: #fff; background: #874015; }
.primary-action,.tool-card .b>button,.r button,.page-back,.page-utility,.support-link,.copy-btn,.home-support-teaser>a { transition: background .2s,border-color .2s,transform .2s,box-shadow .2s; }
button:disabled { cursor: wait; opacity: .7; }
.primary-action:active,.tool-card .b>button:active,.r button:active,.page-back:active,.page-utility:active,.home-support-teaser>a:active { transform: scale(.985); }
.tool-card .b>button,.r button { min-height: 49px; font-size: 15px; }
.tool-card .b>button.g,.r button.g { border-color: var(--line-hi); }
.tool-card .b>button.g:hover,.r button.g:hover { border-color: var(--orange); }
.tool-card button.s { min-height: 37px; }
label { font-size: 14px; color: #bbb8b5; margin: 14px 0 7px; }
input,select { min-height: 48px; font-size: 16px; }
input:focus,select:focus,html[data-theme=light] input:focus,html[data-theme=light] select:focus { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-wash); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.tool-page-hero p,.hero-lede { font-size: 16px; }
.tool-card .mu,.tool-card .r { font-size: 14px; }
.support-card p { font-size: 14px; line-height: 1.65; }
.support-link,.copy-btn { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; border-bottom-color: var(--orange); }
.support-link:hover,.copy-btn:hover { color: var(--orange); }
.support-value { font-size: 15px; }
.page-back,.page-utility { min-height: 44px; padding-inline: 15px; font-size: 14px; }
.market-topline { gap: 16px; }
.refresh-market { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: auto; min-width: 142px; min-height: 44px; padding: 8px 12px; font-size: 13px; font-weight: 700; }
.refresh-market span:last-child { font-size: 19px; line-height: 1; }
.refresh-market:hover { border-color: var(--orange); }
.refresh-market:disabled { cursor: wait; opacity: .7; }
.refresh-market.is-loading span:last-child { animation: refresh-spin .9s linear infinite; }
@keyframes refresh-spin { to { transform: rotate(360deg); } }
.market-spectrum .is-active { color: #ffdab8; border-color: var(--orange); background: var(--orange-wash); }
html[data-theme=light] .market-spectrum .is-active { color: #783710; border-color: var(--orange); background: var(--orange-wash); }

.directory-card,.next-tool-card,.support-card,.home-support-teaser { position: relative; overflow: hidden; }
.directory-card::before,.next-tool-card::before,.support-card::before,.home-support-teaser::before { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; background: radial-gradient(260px circle at var(--pointer-x,50%) var(--pointer-y,50%),var(--orange-wash),transparent 72%); transition: opacity .25s; }
.directory-card>* , .next-tool-card>* , .support-card>* , .home-support-teaser>* { position: relative; z-index: 1; }
.directory-card:hover::before,.directory-card:focus-visible::before,.next-tool-card:hover::before,.next-tool-card:focus-visible::before,.support-card:hover::before,.support-card:focus-within::before,.home-support-teaser:hover::before,.home-support-teaser:focus-within::before { opacity: 1; }
.directory-card:hover,.directory-card:focus-visible,.next-tool-card:hover,.next-tool-card:focus-visible { border-color: var(--orange); box-shadow: inset 0 1px var(--orange-wash),0 22px 45px #0002; }
.directory-card.is-pressed,.next-tool-card.is-pressed { transform: scale(.99); }
.directory-card .card-arrow,.next-tool-card .card-arrow { transition: transform .22s,color .22s,border-color .22s; }
.directory-card:hover .card-arrow,.directory-card:focus-visible .card-arrow,.next-tool-card:hover .card-arrow,.next-tool-card:focus-visible .card-arrow { transform: translate(2px,-2px); color: var(--orange); border-color: var(--orange); }
.card-visual { display: grid; place-items: center; width: 61px; height: 61px; margin: 21px 0 13px; color: var(--orange); background: var(--orange-wash); border: 1px solid color-mix(in srgb,var(--orange) 40%,transparent); border-radius: 9px; font: 700 29px/1 "Segoe UI",Arial,sans-serif; letter-spacing: -.06em; transition: transform .28s,background .28s; }
.directory-card:hover .card-visual,.directory-card:focus-visible .card-visual { transform: translateY(-3px); background: color-mix(in srgb,var(--orange-wash) 80%,transparent); }
.directory-card { min-height: 247px; }
.directory-card-copy small { font-size: 14px; }
.next-tool-card { min-height: 122px; }
.next-tool-card .directory-card-copy strong { font-size: 17px; }
.brand-mark { width: 48px; height: 48px; padding: 2px; border-color: var(--line); }
.brand-mark svg { display: block; width: 100%; height: 100%; }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand:hover .brand-mark svg,.brand:focus-visible .brand-mark svg { transform: rotate(-5deg) scale(1.05); }
.brand-mark svg { transition: transform .3s ease; }
.card-visual { width: 82px; height: 82px; padding: 5px; color: var(--text); background: color-mix(in srgb,var(--surface-hi) 83%,var(--orange-wash)); border-color: color-mix(in srgb,var(--orange) 31%,var(--line)); }
.card-visual svg,.next-tool-visual svg,.tool-hero-mark svg { display: block; width: 100%; height: 100%; }
.card-visual svg { transition: transform .35s ease; }
.directory-card:hover .card-visual svg,.directory-card:focus-visible .card-visual svg { transform: scale(1.09) rotate(-3deg); }
.next-tool-visual { display: block; width: 47px; height: 47px; margin: 4px 0 8px; color: var(--text); opacity: .85; transition: transform .25s,opacity .25s; }
.next-tool-card:hover .next-tool-visual,.next-tool-card:focus-visible .next-tool-visual { transform: translateY(-2px) scale(1.06); opacity: 1; }
.next-tool-card { min-height: 159px; }
.tool-hero-mark { width: 102px; height: 102px; margin: 0 auto 21px; padding: 5px; color: var(--text); background: color-mix(in srgb,var(--surface-hi) 84%,var(--orange-wash)); border: 1px solid color-mix(in srgb,var(--orange) 35%,var(--line)); border-radius: 13px; box-shadow: 0 18px 42px #0001; }
.site-toast { position: fixed; z-index: 110; inset-inline-end: 22px; bottom: 22px; max-width: min(360px,calc(100vw - 32px)); padding: 12px 17px; border: 1px solid var(--orange); border-radius: 9px; color: var(--text); background: color-mix(in srgb,var(--bg) 88%,white); box-shadow: 0 16px 36px #0004; font-size: 14px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .23s,transform .23s; }
.site-toast.is-visible { opacity: 1; transform: translateY(0); }
.site-confirm-overlay { position: fixed; z-index: 120; inset: 0; display: grid; place-items: center; padding: 18px; background: #000b; backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); }
.site-confirm-dialog { position: relative; width: min(100%,500px); max-height: min(90vh,700px); overflow: auto; padding: 30px; border: 1px solid var(--line-hi); border-radius: 12px; color: var(--text); background: color-mix(in srgb,var(--bg) 90%,white); box-shadow: 0 25px 70px #0008; animation: site-dialog-in .2s ease-out both; }
.site-confirm-dialog::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: var(--orange); }
.site-confirm-dialog.is-danger::before { background: #c65d55; }
.site-confirm-dialog h2 { font-size: clamp(22px,3vw,28px); line-height: 1.2; margin: 0 0 12px; }
.site-confirm-dialog p { color: var(--muted); font-size: 16px; line-height: 1.65; margin: 0 0 23px; }
.site-dialog-input { display: block; width: 100%; min-height: 48px; margin: -5px 0 22px; padding: 11px 13px; color: var(--text); background: var(--surface); border: 1px solid var(--line-hi); border-radius: 7px; font: inherit; }
.site-dialog-input:focus { outline: 2px solid var(--orange); outline-offset: 2px; }
textarea.site-dialog-input { min-height: 135px; resize: vertical; direction: ltr; font: 13px/1.5 ui-monospace,Consolas,monospace; }
.site-confirm-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.site-confirm-actions button { min-height: 48px; flex: 1 1 150px; border-radius: 7px; padding: 10px 14px; font-size: 15px; font-weight: 700; transition: background .18s,border-color .18s,transform .18s; }
.site-confirm-actions button:hover { transform: translateY(-1px); }
.site-confirm-cancel { color: var(--text); background: transparent; border: 1px solid var(--line-hi); }
.site-confirm-cancel:hover { background: var(--surface-hi); }
.site-confirm-accept { color: var(--orange-ink); background: var(--orange); border: 1px solid var(--orange); }
.site-confirm-accept:hover { filter: brightness(1.09); }
.site-confirm-accept.is-danger { color: #fff; background: #a53d35; border-color: #a53d35; }
.site-confirm-accept.is-danger:hover { background: #bd4a40; }
@keyframes site-dialog-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.mh button { min-width: 44px; min-height: 44px; font-size: 20px; }

@media(max-width:650px) {
  .site-nav { flex-wrap: wrap; row-gap: 3px; padding: 8px 10px 5px; }
  .brand { order: 1; }
  .nav-actions { order: 2; margin-inline-start: auto; }
  .nav-links { display: flex; order: 3; width: 100%; gap: 0; justify-content: stretch; border-top: 1px solid var(--line); }
  .nav-links a { flex: 1 1 0; justify-content: center; min-height: 42px; font-size: 13px; }
  .brand-name { display: none; }
  #lsel,.nav-share,.theme-toggle { min-height: 38px; }
  .theme-toggle { width: 38px; flex-basis: 38px; }
  .hero { padding-top: 39px; }
  .tool-page-hero { padding-top: 43px; }
  .directory-card { min-height: 209px; }
  .card-visual { width: 68px; height: 68px; margin: 13px 0 12px; padding: 4px; }
  .brand-mark { width: 42px; height: 42px; }
  .tool-hero-mark { width: 82px; height: 82px; margin-bottom: 16px; }
  .refresh-market { min-width: 96px; min-height: 42px; font-size: 11px; gap: 5px; }
  .refresh-market span:last-child { font-size: 16px; }
  .support-card p { font-size: 14px; }
  .site-toast { inset-inline-end: 14px; bottom: 14px; }
  .tools-section { scroll-margin-top: 137px; }
}
@media(prefers-reduced-motion:reduce) {
  .directory-card,.next-tool-card,.support-card,.home-support-teaser,.site-toast,.brand-mark svg,.card-visual svg,.next-tool-visual { transition: none; }
  .refresh-market.is-loading span:last-child { animation: none; }
  .site-confirm-dialog { animation: none; }
}

/* Trade discipline follows the same card and control language as the other tools. */
[hidden] { display: none!important; }
.discipline-alert { position: fixed; z-index: 45; top: 92px; left: 50%; transform: translateX(-50%); width: min(560px,calc(100vw - 28px)); min-height: 48px; padding: 10px 18px; color: #fff; background: #8f332c; border: 1px solid #d06a62; border-radius: 9px; box-shadow: 0 18px 40px #0006; font-weight: 750; text-align: center; }
.discipline-alert:hover { background: #a53b32; }
#tool-discipline .dtabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin: 19px 0; }
#tool-discipline .dtabs button,#tool-discipline #d_getp,#tool-discipline #d_dec,#tool-discipline #d_save,#tool-discipline #d_rf,#tool-discipline #d_copy,#tool-discipline #d_clr { min-height: 46px; padding: 10px 13px; color: var(--text); background: var(--surface-hi); border: 1px solid var(--line-hi); border-radius: 7px; font-weight: 700; }
#tool-discipline .dtabs button { margin: 0; width: 100%!important; font-size: 14px!important; }
#tool-discipline .dtabs button.on { color: var(--orange-ink); background: var(--orange); border-color: var(--orange); }
#tool-discipline #d_getp,#tool-discipline #d_dec,#tool-discipline #d_save,#tool-discipline #d_copy { width: 100%; margin-top: 11px; }
#tool-discipline #d_dec,#tool-discipline #d_save { color: var(--orange-ink); background: var(--orange); border-color: var(--orange); }
#tool-discipline button:disabled { opacity: .48; cursor: not-allowed; }
#tool-discipline .dchips { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; margin-top: 8px; }
#tool-discipline .dchips button { min-height: 40px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; font-size: 14px; font-weight: 700; }
#tool-discipline .dchips button.on { color: var(--orange); border-color: var(--orange); }
#tool-discipline .drow { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 8px; }
#tool-discipline .drow button { width: 100%!important; margin: 0; min-height: 44px; }
#tool-discipline .dsell,#tool-discipline .dhit { border: 1px solid; border-radius: 7px; padding: 12px; text-align: center; font-weight: 750; margin: 11px 0; }
#tool-discipline .dsell { color: #f5aaa3; background: #962f2f24; border-color: #b64b4b; }
#tool-discipline .dhit { color: #9bd5ad; background: #23813b25; border-color: #489362; }
#tool-discipline .dl { direction: ltr; unicode-bidi: plaintext; }
#tool-discipline .dw { color: #dfb985; font-size: 14px; margin-top: 9px; }
#tool-discipline .dst { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 15px 0; }
#tool-discipline .dst>div { padding: 12px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; text-align: center; font-size: 13px; }
#tool-discipline .dst b { display: block; color: var(--text); font-size: 20px; font-variant-numeric: tabular-nums; }
#tool-discipline .dt { width: 100%; border-collapse: collapse; margin-top: 9px; font-size: 13px; }
#tool-discipline .dt :is(th,td) { padding: 8px 5px; border-top: 1px solid var(--line); text-align: start; }
#tool-discipline .dt th { color: var(--muted); }
html[data-theme=light] #tool-discipline .dtabs button:not(.on),html[data-theme=light] #tool-discipline .dchips button,html[data-theme=light] #tool-discipline #d_getp,html[data-theme=light] #tool-discipline #d_rf { color: #292724; background: #ffffffad; }
html[data-theme=light] #tool-discipline :is(.dtabs button.on,#d_dec,#d_save,#d_copy) { color: #fff; }
html[data-theme=light] #tool-discipline .dsell { color: #8b261e; background: #b33c3220; }
html[data-theme=light] #tool-discipline .dhit { color: #196c32; background: #23813b1d; }
html[data-theme=light] #tool-discipline .dw { color: #875019; }
@media(max-width:650px) {
  .discipline-alert { top: 108px; }
  #tool-discipline .dtabs { grid-template-columns: 1fr; }
  #tool-discipline .dst { grid-template-columns: 1fr 1fr; }
}
