/* ============================================================
   OTIA Currency Service — interactive / refined / precise
   ============================================================ */
.currency-card{
  --fx:#14936a;
  --fx-rgb:20,147,106;
  --ink:#242420;
  --muted:#85847d;
  position:relative;
  width:min(690px,100%);
  overflow:hidden;
  border:1px solid rgba(44,44,39,.075);
  border-radius:18px;
  background:
    radial-gradient(circle at 84% -24%,rgba(var(--fx-rgb),.095),transparent 32%),
    linear-gradient(145deg,rgba(255,255,255,.998),rgba(248,247,244,.982));
  box-shadow:
    0 14px 36px rgba(36,35,31,.052),
    0 1px 0 rgba(255,255,255,.85),
    inset 0 1px 0 rgba(255,255,255,.98);
  color:var(--ink);
  isolation:isolate;
}
.currency-card.is-down{
  --fx:#d14f60;
  --fx-rgb:209,79,96;
}
.currency-card.is-flat{
  --fx:#77756f;
  --fx-rgb:119,117,111;
}
.currency-card::before{
  content:"";
  position:absolute;
  z-index:-1;
  left:-74px;
  top:-112px;
  width:232px;
  height:232px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(var(--fx-rgb),.08),transparent 68%);
  pointer-events:none;
}
.currency-card::after{
  content:"";
  position:absolute;
  left:0;
  top:12px;
  bottom:12px;
  width:2px;
  border-radius:0 99px 99px 0;
  background:linear-gradient(180deg,transparent,var(--fx) 22%,var(--fx) 78%,transparent);
  box-shadow:0 0 10px rgba(var(--fx-rgb),.18);
  opacity:.90;
}
.currency-shell{
  display:grid;
  grid-template-columns:270px minmax(0,1fr);
  min-height:196px;
}
.currency-summary{
  position:relative;
  display:flex;
  min-width:0;
  flex-direction:column;
  padding:12px 14px 10px 16px;
  border-right:1px solid rgba(47,46,42,.055);
}
.currency-summary::after{
  content:"";
  position:absolute;
  right:-1px;
  top:16px;
  width:1px;
  height:40px;
  background:linear-gradient(180deg,rgba(var(--fx-rgb),.36),transparent);
}
.currency-topline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-width:0;
  gap:10px;
}
.currency-pair-wrap{
  display:flex;
  align-items:center;
  min-width:0;
  gap:8px;
}
.currency-code-orb{
  width:32px;
  height:32px;
  flex:0 0 32px;
  display:grid;
  place-items:center;
  border:1px solid rgba(var(--fx-rgb),.15);
  border-radius:9px;
  background:
    linear-gradient(180deg,rgba(var(--fx-rgb),.085),rgba(var(--fx-rgb),.045));
  color:var(--fx);
  font:790 10px/1 ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.055em;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.8),
    0 3px 10px rgba(var(--fx-rgb),.05);
}
.currency-pair{
  min-width:0;
  flex:1 1 auto;
}
.currency-pair strong{
  display:block;
  overflow:hidden;
  color:#272722;
  font-size:12.5px;
  font-weight:790;
  letter-spacing:-.012em;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.currency-pair span{
  display:block;
  max-width:none;
  margin-top:1px;
  overflow:visible;
  color:#8e8d86;
  font-size:9px;
  font-weight:560;
  line-height:1.15;
  text-overflow:clip;
  white-space:nowrap;
}
.currency-live{
  display:inline-flex;
  flex:0 0 auto;
  align-items:center;
  gap:6px;
  color:#7f7e77;
  font-size:8px;
  font-weight:780;
  letter-spacing:.07em;
  text-transform:uppercase;
}
.currency-live i{
  position:relative;
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--fx);
  box-shadow:
    0 0 0 3px rgba(var(--fx-rgb),.075),
    0 0 8px rgba(var(--fx-rgb),.22);
}
.currency-live i::after{
  content:"";
  position:absolute;
  inset:-3px;
  border:1px solid rgba(var(--fx-rgb),.34);
  border-radius:50%;
  animation:fxLivePulse 2.2s ease-out infinite;
}
@keyframes fxLivePulse{
  0%{transform:scale(.76);opacity:.68}
  72%,100%{transform:scale(1.85);opacity:0}
}
.currency-rate-row{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:9px;
  margin-top:9px;
}
.currency-rate-value{
  display:flex;
  min-width:0;
  align-items:baseline;
  gap:6px;
}
.currency-rate-value strong{
  color:#191916;
  font-size:37px;
  font-weight:620;
  line-height:.92;
  letter-spacing:-.048em;
  font-variant-numeric:tabular-nums;
}
.currency-rate-value span{
  color:#77766f;
  font-size:10.5px;
  font-weight:780;
  letter-spacing:.045em;
}
.currency-day-change{
  display:flex;
  flex:0 0 auto;
  flex-direction:column;
  align-items:flex-end;
  gap:3px;
}
.currency-change-pill{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:4px 7px;
  border:1px solid rgba(var(--fx-rgb),.15);
  border-radius:999px;
  background:rgba(var(--fx-rgb),.06);
  color:var(--fx);
  font-size:9px;
  font-weight:790;
  line-height:1;
  font-variant-numeric:tabular-nums;
}
.currency-change-abs{
  color:#919089;
  font-size:8.5px;
  font-weight:620;
  font-variant-numeric:tabular-nums;
}
.currency-stats{
  display:grid;
  grid-template-columns:1fr;
  gap:0;
  margin-top:7px;
  padding-top:5px;
  border-top:1px solid rgba(47,46,42,.055);
}
.currency-stat-column{
  display:contents;
}
.currency-stat{
  display:grid;
  grid-template-columns:minmax(0,1fr) 82px;
  align-items:center;
  gap:10px;
  min-width:0;
  min-height:20px;
}
.currency-stat+.currency-stat{
  border-top:1px solid rgba(47,46,42,.035);
}
.currency-stat span{
  overflow:hidden;
  color:#85847d;
  font-size:8.7px;
  font-weight:560;
  line-height:1.15;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.currency-stat strong{
  display:block;
  min-width:82px;
  color:#3d3c37;
  font-size:10px;
  font-weight:780;
  line-height:1.15;
  text-align:right;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.currency-stat strong.fx-up{color:#14936a}
.currency-stat strong.fx-down{color:#d14f60}
.currency-chart-convert{
  display:flex;
  min-width:0;
  align-items:center;
  gap:5px;
  overflow:hidden;
  white-space:nowrap;
}
.currency-chart-convert-label{
  flex:0 0 auto;
  margin-right:2px;
  color:#85847d;
  font-size:8.7px;
  font-weight:620;
}
.currency-convert-edit{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:3px;
  min-width:0;
  height:20px;
}
.currency-convert-input{
  width:5ch;
  max-width:10ch;
  min-width:3ch;
  appearance:textfield;
  -moz-appearance:textfield;
  padding:1px 1px 2px;
  border:0;
  border-bottom:1px solid rgba(55,54,49,.15);
  border-radius:0;
  outline:0;
  background:transparent;
  color:#302f2b;
  font:790 10px/1.1 inherit;
  text-align:right;
  font-variant-numeric:tabular-nums;
  transition:border-color .16s ease,box-shadow .16s ease,color .16s ease;
}
.currency-convert-input::-webkit-outer-spin-button,
.currency-convert-input::-webkit-inner-spin-button{
  margin:0;
  -webkit-appearance:none;
}
.currency-convert-input:hover{
  border-bottom-color:rgba(var(--fx-rgb),.38);
}
.currency-convert-input:focus{
  border-bottom-color:var(--fx);
  color:#1f1e1b;
  box-shadow:0 4px 7px -7px rgba(var(--fx-rgb),.72);
}
.currency-convert-code{
  flex:0 0 auto;
  color:#5e5c56;
  font-size:8.8px;
  font-weight:780;
  letter-spacing:.025em;
}
.currency-convert-equals{
  flex:0 0 auto;
  padding:0 1px;
  color:#aaa8a0;
  font-size:8.5px;
  font-weight:650;
}

/* Right-side chart module */
.currency-chart-shell{
  position:relative;
  min-width:0;
  padding:9px 11px 8px 10px;
}
.currency-chart-shell::before{
  content:"";
  position:absolute;
  right:13px;
  top:8px;
  width:34px;
  height:1px;
  background:linear-gradient(90deg,transparent,rgba(var(--fx-rgb),.23));
}
.currency-chart-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  height:25px;
  padding:0 1px 4px;
}
.currency-chart-label{
  min-width:0;
  overflow:hidden;
  color:#74736d;
  font-size:9.5px;
  font-weight:720;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.currency-range-tabs{
  display:flex;
  flex:0 0 auto;
  align-items:center;
  gap:10px;
  padding:0;
  border:0;
  background:transparent;
}
.currency-range-tab{
  position:relative;
  min-width:22px;
  border:0;
  border-radius:0;
  padding:4px 0 5px;
  background:transparent;
  color:#a09e97;
  font-size:8px;
  font-weight:760;
  line-height:1;
  cursor:pointer;
  transition:color .16s ease,transform .16s ease;
}
.currency-range-tab::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:0;
  width:0;
  height:1.5px;
  border-radius:99px;
  background:var(--fx);
  box-shadow:0 0 7px rgba(var(--fx-rgb),.22);
  transform:translateX(-50%);
  transition:width .18s ease,opacity .18s ease;
  opacity:0;
}
.currency-range-tab:hover{
  color:#56544e;
}
.currency-range-tab:active{
  transform:translateY(1px);
}
.currency-range-tab.active{
  color:#2d2c28;
}
.currency-range-tab.active::after{
  width:100%;
  opacity:1;
}
.currency-chart{
  position:relative;
  height:150px;
  overflow:hidden;
  border-radius:11px;
  background:
    radial-gradient(circle at 84% 6%,rgba(var(--fx-rgb),.040),transparent 36%),
    linear-gradient(180deg,rgba(var(--fx-rgb),.018),transparent 64%);
  touch-action:none;
}
.currency-chart svg{
  display:block;
  width:100%;
  height:100%;
}
.currency-chart-grid{
  stroke:rgba(47,46,42,.05);
  stroke-width:1;
}
.currency-chart-line{
  fill:none;
  stroke:var(--fx);
  stroke-width:2.2;
  stroke-linecap:round;
  stroke-linejoin:round;
  vector-effect:non-scaling-stroke;
  filter:drop-shadow(0 3px 5px rgba(var(--fx-rgb),.13));
}
.currency-chart-end{
  fill:#fff;
  stroke:var(--fx);
  stroke-width:2;
  vector-effect:non-scaling-stroke;
}
.currency-chart-end-pulse{
  fill:rgba(var(--fx-rgb),.12);
  stroke:rgba(var(--fx-rgb),.24);
  stroke-width:1;
  transform-box:fill-box;
  transform-origin:center;
  animation:fxChartPulse 2.35s ease-out infinite;
}
@keyframes fxChartPulse{
  0%{opacity:.72;transform:scale(.58)}
  74%,100%{opacity:0;transform:scale(2)}
}
.currency-chart-cross{
  opacity:0;
  pointer-events:none;
}
.currency-chart.is-hovering .currency-chart-cross{
  opacity:1;
}
.currency-chart-cross line{
  stroke:rgba(42,41,37,.14);
  stroke-width:1;
  stroke-dasharray:3 4;
}
.currency-chart-cross circle{
  fill:#fff;
  stroke:var(--fx);
  stroke-width:2;
}

.currency-chart-axis{
  position:absolute;
  left:8px;
  right:8px;
  bottom:2px;
  height:15px;
  pointer-events:none;
}
.currency-axis-label{
  position:absolute;
  bottom:0;
  transform:translateX(-50%);
  color:#a09e97;
  font:620 7.5px/1 ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.01em;
  white-space:nowrap;
}
.currency-axis-label:first-child{
  transform:none;
}
.currency-axis-label:last-child{
  transform:translateX(-100%);
}
.currency-chart-marker,
.currency-chart-hover-dot{
  position:absolute;
  z-index:4;
  width:9px;
  height:9px;
  border:2px solid var(--fx);
  border-radius:50%;
  background:#fff;
  box-shadow:
    0 0 0 3px rgba(var(--fx-rgb),.08),
    0 2px 7px rgba(var(--fx-rgb),.16);
  transform:translate(-50%,-50%);
  pointer-events:none;
}
.currency-chart-marker::after{
  content:"";
  position:absolute;
  inset:-5px;
  border:1px solid rgba(var(--fx-rgb),.22);
  border-radius:50%;
  animation:fxMarkerPulse 2.5s ease-out infinite;
}
@keyframes fxMarkerPulse{
  0%{transform:scale(.55);opacity:.55}
  72%,100%{transform:scale(1.7);opacity:0}
}
.currency-chart-hover-dot{
  display:none;
  width:8px;
  height:8px;
  z-index:6;
  box-shadow:0 0 0 3px rgba(var(--fx-rgb),.07);
}
.currency-chart.is-hovering .currency-chart-hover-dot{
  display:block;
}
.currency-chart-horizon{
  position:absolute;
  z-index:1;
  left:0;
  right:0;
  top:1px;
  height:1px;
  background:linear-gradient(90deg,transparent,rgba(var(--fx-rgb),.20),transparent);
  opacity:.55;
  pointer-events:none;
}
.currency-chart-horizon::after{
  content:"";
  position:absolute;
  top:-1px;
  left:-22%;
  width:18%;
  height:2px;
  border-radius:99px;
  background:linear-gradient(90deg,transparent,rgba(var(--fx-rgb),.45),transparent);
  animation:fxHorizonSweep 5.5s ease-in-out infinite;
}
@keyframes fxHorizonSweep{
  0%,15%{left:-22%;opacity:0}
  30%{opacity:.9}
  72%{opacity:.55}
  100%{left:106%;opacity:0}
}

.currency-chart-tooltip{
  position:absolute;
  z-index:5;
  min-width:104px;
  padding:7px 8px;
  border:1px solid rgba(47,46,42,.07);
  border-radius:9px;
  background:rgba(255,255,255,.97);
  box-shadow:0 8px 22px rgba(35,34,31,.10);
  opacity:0;
  transform:translateY(2px);
  pointer-events:none;
  transition:opacity .1s ease,transform .1s ease;
  backdrop-filter:blur(10px);
}
.currency-chart.is-hovering .currency-chart-tooltip{
  opacity:1;
  transform:none;
}
.currency-chart-tooltip strong{
  display:block;
  color:#292824;
  font-size:10px;
  font-weight:780;
  font-variant-numeric:tabular-nums;
}
.currency-chart-tooltip span{
  display:block;
  margin-top:2px;
  color:#898881;
  font-size:8px;
}
.currency-chart-loading{
  height:143px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#8f8e87;
  font-size:9px;
}
.currency-chart-loading::before{
  content:"";
  width:6px;
  height:6px;
  margin-right:6px;
  border-radius:50%;
  background:var(--fx);
  box-shadow:0 0 0 4px rgba(var(--fx-rgb),.07);
  animation:fxLivePulse 2.1s ease-out infinite;
}

/* Thin, readable footer */
.currency-card-foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:9px;
  min-height:27px;
  padding:5px 11px 6px 16px;
  border-top:1px solid rgba(47,46,42,.055);
  background:
    linear-gradient(90deg,rgba(var(--fx-rgb),.012),transparent 38%),
    rgba(247,246,242,.62);
}
.currency-source{
  display:flex;
  min-width:0;
  align-items:center;
  gap:5px;
  overflow:hidden;
  color:#8d8c85;
  font-size:8px;
  font-weight:560;
  white-space:nowrap;
}
.currency-source-dot{
  width:5px;
  height:5px;
  flex:0 0 5px;
  border-radius:50%;
  background:#4c9e6c;
  box-shadow:0 0 0 3px rgba(76,158,108,.06);
}
.currency-source a{
  overflow:hidden;
  color:#6f6e68;
  font-weight:660;
  text-decoration:none;
  text-overflow:ellipsis;
  white-space:nowrap;
  border:0;
}
.currency-source a:hover{text-decoration:underline}
.currency-history-quality{
  flex:0 0 auto;
  color:#94938c;
  font-size:8px;
  font-weight:590;
  white-space:nowrap;
}

/* Mobile: same information density, readable type, no wasted height. */
@media(max-width:680px){
  .currency-axis-label{
    font-size:7px;
  }
  .currency-chart-axis{
    left:6px;
    right:6px;
    height:13px;
  }

  .currency-card{
    width:100%;
    border-radius:15px;
  }
  .currency-shell{
    grid-template-columns:1fr;
    min-height:0;
  }
  .currency-summary{
    padding:10px 11px 8px 12px;
    border-right:0;
    border-bottom:1px solid rgba(47,46,42,.05);
  }
  .currency-summary::after{
    display:none;
  }
  .currency-code-orb{
    width:30px;
    height:30px;
    flex-basis:30px;
    border-radius:8px;
    font-size:9.5px;
  }
  .currency-pair strong{
    font-size:12px;
  }
  .currency-pair span{
    max-width:none;
    overflow:visible;
    font-size:8.5px;
    text-overflow:clip;
  }
  .currency-live{
    font-size:7.5px;
  }
  .currency-rate-row{
    margin-top:7px;
  }
  .currency-rate-value strong{
    font-size:34px;
  }
  .currency-rate-value span{
    font-size:10px;
  }
  .currency-change-pill{
    padding:4px 6px;
    font-size:8.5px;
  }
  .currency-change-abs{
    font-size:8px;
  }
  .currency-stats{
    gap:0;
    margin-top:5px;
    padding-top:4px;
  }
  .currency-stat{
    grid-template-columns:minmax(0,1fr) 80px;
    min-height:20px;
  }
  .currency-stat span{
    font-size:8.3px;
  }
  .currency-stat strong{
    min-width:80px;
    font-size:9.6px;
  }
  .currency-chart-convert{
    gap:4px;
  }
  .currency-chart-convert-label{
    font-size:8.1px;
  }
  .currency-convert-input{
    font-size:9.6px;
    height:21px;
  }
  .currency-convert-code{
    font-size:8.4px;
  }
  .currency-convert-equals{
    font-size:8.2px;
  }
  .currency-chart-shell{
    padding:7px 8px 5px;
  }
  .currency-chart-top{
    height:23px;
    padding-bottom:3px;
  }
  .currency-chart-label{
    font-size:8.8px;
  }
  .currency-range-tab{
    min-width:26px;
    padding:3px 5px;
    font-size:7.7px;
  }
  .currency-chart{
    height:102px;
  }
  .currency-chart-loading{
    height:96px;
    font-size:8.5px;
  }
  .currency-card-foot{
    min-height:25px;
    padding:4px 8px 5px 12px;
  }
  .currency-source{
    font-size:7.7px;
  }
  .currency-history-quality{
    font-size:7.7px;
  }
}

/* Small phones: remove secondary decoration before shrinking information. */
@media(max-width:390px){
  .currency-pair span{
    display:block;
    max-width:150px;
    overflow:visible;
    text-overflow:clip;
  }
  .currency-live span{
    display:none;
  }
  .currency-live{
    gap:0;
  }
  .currency-rate-value strong{
    font-size:32px;
  }
  .currency-stats{
    gap:0;
  }
  .currency-stat{
    grid-template-columns:minmax(0,1fr) 76px;
  }
  .currency-stat strong{
    min-width:76px;
  }
  .currency-chart-convert-label{
    display:none;
  }
  .currency-chart-convert{
    gap:3px;
  }
  .currency-convert-input{
    max-width:8ch;
  }
  .currency-chart{
    height:94px;
  }
  .currency-history-quality{
    display:none;
  }
}


.currency-chart-end,
.currency-chart-end-pulse{
  display:none !important;
}
