.tether-page {
  --tether-ink: #11233b;
  --tether-muted: #65758b;
  --tether-line: #d7e1eb;
  --tether-soft: #f4f8fa;
  --tether-green: #087f70;
  --tether-green-dark: #05695e;
  --tether-blue: #315f92;
  --tether-red: #b33b47;
  color: var(--tether-ink);
  font-size: 16px;
  line-height: 1.72;
}

.tether-page *,
.tether-page *::before,
.tether-page *::after { box-sizing: border-box; }
.tether-page [hidden] { display: none !important; }
.tether-page button,
.tether-page input { font: inherit; letter-spacing: 0; }
.tether-page button { cursor: pointer; }
.tether-page h1,
.tether-page h2,
.tether-page h3,
.tether-page p { letter-spacing: 0; }
.tether-page h2 { margin: 0; font-size: 1.55rem; line-height: 1.35; }
.tether-page h3 { margin: 0 0 .45rem; font-size: 1.08rem; line-height: 1.45; }
.tether-page section { margin-top: 3rem; }

.tether-breadcrumb {
  display: flex;
  gap: .55rem;
  align-items: center;
  margin-bottom: 1.2rem;
  color: var(--tether-muted);
  font-size: .88rem;
}
.tether-breadcrumb a { color: var(--tether-green-dark); text-decoration: none; }
.tether-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 176px;
  gap: 2rem;
  align-items: center;
  padding: 1rem 0 2.2rem;
  border-bottom: 1px solid var(--tether-line);
}
.tether-heading h1 { margin: .2rem 0 .8rem; font-size: 2.18rem; line-height: 1.25; }
.tether-heading p:not(.tether-eyebrow) { margin: 0; color: #53667e; font-size: 1.03rem; }
.tether-heading picture { display: block; width: 176px; aspect-ratio: 1; }
.tether-heading img { display: block; width: 100%; height: 100%; object-fit: contain; }
.tether-eyebrow {
  margin: 0 0 .25rem;
  color: var(--tether-green-dark);
  font-size: .82rem;
  font-weight: 800;
}

.tether-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.tether-section-head > span { color: var(--tether-muted); font-size: .88rem; }
.icon-command,
.text-command {
  min-height: 42px;
  border: 1px solid var(--tether-line);
  border-radius: 6px;
  background: #fff;
  color: var(--tether-ink);
  font-weight: 700;
}
.tether-page .icon-command,
.tether-page .text-command {
  border: 1px solid var(--tether-line);
  background: #fff;
  color: var(--tether-ink);
}
.tether-page .icon-command:hover,
.tether-page .text-command:hover {
  border-color: #9fcfc4;
  background: #edf7f4;
  color: var(--tether-green-dark);
}
.icon-command { display: inline-flex; gap: .45rem; align-items: center; padding: .45rem .8rem; }
.text-command { padding: .45rem .8rem; }
.icon-command:hover,
.text-command:hover { border-color: var(--tether-green); color: var(--tether-green-dark); }

.market-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem;
}
.market-card {
  min-width: 0;
  min-height: 142px;
  padding: 1rem;
  border: 1px solid var(--tether-line);
  border-radius: 7px;
  background: #fff;
  margin: 0;
}
.market-card > span { display: block; color: var(--tether-muted); font-size: .88rem; font-weight: 700; }
.market-card strong { display: block; margin: .35rem 0 .15rem; font-size: 1.34rem; line-height: 1.35; overflow-wrap: anywhere; }
.market-card small,
.market-card time { display: block; color: var(--tether-muted); font-size: .76rem; line-height: 1.45; }
.market-card time { margin-top: .55rem; }
.market-card.is-stale { border-color: #d69b42; background: #fffaf0; }
.market-card.is-error { border-color: #e4c5c8; background: #fff8f8; }
.market-card.is-positive [data-market-change] { color: var(--tether-red); }
.market-card.is-negative [data-market-change] { color: var(--tether-blue); }
.market-card-fx { background: #f1f8f6; }
.market-status {
  margin: .75rem 0 0;
  color: var(--tether-muted);
  font-size: .84rem;
}

.tether-calculator {
  padding: 1.4rem;
  border: 1px solid #b9d5d0;
  border-radius: 8px;
  background: #fbfdfd;
}
.rate-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: .25rem .7rem;
  border-radius: 999px;
  background: #e3f3f0;
  color: var(--tether-green-dark) !important;
  font-weight: 800;
}
.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(290px, .95fr);
  gap: 1.4rem;
  align-items: start;
}
.calculator-inputs { min-width: 0; }
.money-field { display: block; margin: 0 0 .55rem; }
.money-field > span,
.fee-settings label > span:first-child { display: block; margin-bottom: .35rem; font-weight: 800; }
.money-field > div,
.fee-input {
  display: flex;
  align-items: center;
  min-height: 58px;
  border: 1px solid #bdcddd;
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}
.money-field > div:focus-within,
.fee-input:focus-within { border-color: var(--tether-green); box-shadow: 0 0 0 3px rgba(8,127,112,.12); }
.money-field input,
.fee-input input {
  min-width: 0;
  width: 100%;
  height: 56px;
  padding: 0 1rem;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--tether-ink);
  font-size: 1.22rem;
  font-weight: 800;
}
.money-field b,
.fee-input b { flex: none; padding-right: 1rem; color: var(--tether-muted); font-size: .9rem; }
.money-field small { display: block; margin-top: .35rem; color: var(--tether-muted); font-size: .8rem; }
.quick-row { display: flex; flex-wrap: wrap; gap: .42rem; margin: .45rem 0 1rem; }
.quick-row button {
  min-height: 40px;
  padding: .35rem .72rem;
  border: 1px solid #c8d6e3;
  border-radius: 6px;
  background: #fff;
  color: #41566f;
  font-size: .84rem;
  font-weight: 700;
}
.quick-row button:hover { border-color: var(--tether-green); color: var(--tether-green-dark); }
.swap-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -.15rem auto .25rem;
  border: 1px solid var(--tether-line);
  border-radius: 50%;
  background: #fff;
  color: var(--tether-green-dark);
  font-size: 1.25rem;
  font-weight: 900;
}
.exchange-fieldset { min-width: 0; margin: 1.1rem 0; padding: 0; border: 0; }
.exchange-fieldset legend { margin-bottom: .45rem; font-weight: 800; }
.exchange-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
.exchange-tabs button {
  min-width: 0;
  min-height: 44px;
  padding: .45rem .35rem;
  border: 1px solid #c8d6e3;
  border-radius: 6px;
  background: #fff;
  color: #40546c;
  font-size: .84rem;
  font-weight: 800;
}
.exchange-tabs button[aria-checked="true"] { border-color: var(--tether-green); background: var(--tether-green); color: #fff; }
.exchange-tabs button:disabled { cursor: not-allowed; opacity: .48; }
.manual-rate { margin-top: .8rem; }
.fee-settings { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--tether-line); }
.toggle-row { display: flex; gap: .7rem; align-items: flex-start; margin-bottom: .8rem; cursor: pointer; }
.toggle-row input { width: 21px; height: 21px; margin: .2rem 0 0; accent-color: var(--tether-green); }
.toggle-row strong,
.toggle-row small { display: block; }
.toggle-row small { color: var(--tether-muted); font-size: .8rem; font-weight: 400; }
.fee-input { min-height: 50px; }
.fee-input input { height: 48px; font-size: 1rem; }

.tether-result {
  min-width: 0;
  padding: 1.25rem;
  border-left: 4px solid var(--tether-green);
  background: #eef7f5;
}
.primary-result { display: block; margin: .65rem 0 .3rem; color: #075e55; font-size: 2rem; line-height: 1.3; overflow-wrap: anywhere; }
.tether-result > p:not(.tether-eyebrow):not(.freshness-warning) { margin: 0 0 1rem; color: #52677c; }
.result-breakdown { margin: 0; }
.result-breakdown > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .7rem; padding: .58rem 0; border-bottom: 1px solid #cfdfdc; }
.result-breakdown dt { color: #5e7185; }
.result-breakdown dd { margin: 0; text-align: right; font-weight: 800; overflow-wrap: anywhere; }
.premium-positive { color: var(--tether-red); }
.premium-negative { color: var(--tether-blue); }
.freshness-warning { margin: .85rem 0 0; padding: .7rem; border: 1px solid #dbac5f; background: #fff9eb; color: #7b5414; font-size: .84rem; }
.freshness-warning.is-critical { border-color: #d89a9f; background: #fff4f4; color: #8b2630; }
.result-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; margin-top: 1rem; }
.result-actions button {
  min-height: 44px;
  padding: .45rem .35rem;
  border: 1px solid var(--tether-green);
  border-radius: 6px;
  background: var(--tether-green);
  color: #fff;
  font-size: .86rem;
  font-weight: 800;
}
.result-actions button.secondary { background: #fff; color: var(--tether-green-dark); }

.comparison-section,
.history-section,
.guide-section,
.content-section,
.faq-section,
.source-section,
.related-section { padding-top: 2.5rem; border-top: 1px solid var(--tether-line); }
.comparison-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
.comparison-item { padding: 1rem; border: 1px solid var(--tether-line); border-radius: 7px; background: #fff; }
.tether-page .comparison-item { height: 100%; margin: 0; }
.comparison-item span,
.comparison-item small { display: block; color: var(--tether-muted); }
.comparison-item strong { display: block; margin: .25rem 0; font-size: 1.25rem; overflow-wrap: anywhere; }
.comparison-item small { font-size: .8rem; }
.spread-summary { margin: .8rem 0 0; color: #52677c; font-size: .9rem; }

.history-list { display: grid; gap: .5rem; }
.history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .7rem;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: .65rem .85rem;
  border: 1px solid var(--tether-line);
  border-radius: 6px;
  background: #fff;
  color: var(--tether-ink);
  text-align: left;
}
.tether-page .history-item {
  border: 1px solid #c7ddd8;
  border-left: 3px solid var(--tether-green);
  background: #f6fbfa;
  color: var(--tether-ink);
}
.tether-page .history-item:hover {
  border-color: #87bbb0;
  background: #edf7f4;
  color: var(--tether-ink);
}
.tether-page .history-item strong { color: var(--tether-ink); }
.history-item strong,
.history-item span { display: block; }
.history-item span { color: var(--tether-muted); font-size: .82rem; }
.history-item time { color: var(--tether-muted); font-size: .76rem; white-space: nowrap; }
.investment-note { margin: 2.2rem 0 0; padding: 1rem 1.1rem; border: 1px solid #d9c994; background: #fffbed; color: #66562b; }
.investment-note strong { display: block; color: #4e421e; }

.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.4rem; margin-top: 1.2rem; }
.guide-grid article { position: relative; padding-left: 2.6rem; }
.tether-page .guide-grid article,
.tether-page .content-grid article { margin: 0; }
.guide-grid article > span { position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: var(--tether-green); color: #fff; font-weight: 900; }
.guide-grid p,
.content-section p { margin: .35rem 0 0; color: #53667c; }
.content-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin-top: 1rem; }
.formula-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin-top: 1rem; }
.formula-row span { padding: .85rem 1rem; border-left: 3px solid var(--tether-blue); background: #f2f6fa; color: var(--tether-muted); }
.formula-row strong { display: block; color: var(--tether-ink); }
.formula-box { margin-top: 1rem !important; padding: 1rem; border-left: 3px solid var(--tether-green); background: #eff7f5; color: var(--tether-ink) !important; font-weight: 800; }

.faq-section details { border-bottom: 1px solid var(--tether-line); }
.faq-section summary { position: relative; padding: 1rem 2rem 1rem 0; cursor: pointer; font-weight: 800; list-style: none; }
.faq-section summary::-webkit-details-marker { display: none; }
.faq-section summary::after { content: '+'; position: absolute; right: .35rem; top: .9rem; color: var(--tether-green); font-size: 1.25rem; }
.faq-section details[open] summary::after { content: '−'; }
.faq-section details p { margin: 0; padding: 0 0 1rem; color: #53667c; }
.source-links { display: flex; flex-wrap: wrap; gap: .45rem; margin: .9rem 0; }
.source-links a { padding: .45rem .7rem; border: 1px solid var(--tether-line); border-radius: 5px; color: var(--tether-green-dark); text-decoration: none; font-size: .84rem; font-weight: 800; }
.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin-top: 1rem; }
.related-grid a { min-width: 0; padding: 1rem; border: 1px solid var(--tether-line); border-radius: 7px; color: var(--tether-ink); text-decoration: none; }
.related-grid strong,
.related-grid span { display: block; }
.related-grid span { margin-top: .25rem; color: var(--tether-muted); font-size: .84rem; }
.related-grid a:hover { border-color: var(--tether-green); background: #f5fbfa; }

.tether-page button:focus-visible,
.tether-page input:focus-visible,
.tether-page a:focus-visible,
.tether-page summary:focus-visible { outline: 3px solid rgba(49,95,146,.35); outline-offset: 2px; }

@media screen and (max-width: 980px) {
  .market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media screen and (max-width: 760px) {
  .tether-page { font-size: 15px; }
  .tether-page section { margin-top: 2.35rem; }
  .tether-heading { grid-template-columns: minmax(0, 1fr) 112px; gap: 1rem; }
  .tether-heading picture { width: 112px; }
  .tether-heading h1 { font-size: 1.8rem; }
  .calculator-layout { grid-template-columns: 1fr; }
  .tether-result { border-left-width: 3px; }
  .comparison-grid { grid-template-columns: 1fr; }
}

@media screen and (max-width: 520px) {
  .tether-heading { display: block; }
  .tether-heading picture { width: 92px; margin: 1rem 0 0 auto; }
  .tether-heading h1 { font-size: 1.68rem; }
  .tether-section-head { align-items: flex-start; }
  .tether-market .icon-command { justify-content: center; width: 44px; padding: 0; }
  .tether-market .icon-command span:last-child { display: none; }
  .market-grid { grid-template-columns: 1fr; }
  .market-card { min-height: 124px; }
  .tether-calculator { padding: 1rem; }
  .exchange-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .primary-result { font-size: 1.63rem; }
  .result-actions { grid-template-columns: 1fr; }
  .guide-grid,
  .content-grid,
  .formula-row,
  .related-grid { grid-template-columns: 1fr; }
  .history-item { grid-template-columns: 1fr; }
  .history-item time { white-space: normal; }
}

@media screen and (max-width: 350px) {
  .tether-page h2 { font-size: 1.32rem; }
  .tether-calculator { padding: .78rem; }
  .money-field input { padding-left: .7rem; font-size: 1.08rem; }
  .money-field b { padding-right: .7rem; font-size: .78rem; }
  .result-breakdown > div { grid-template-columns: 1fr; gap: .12rem; }
  .result-breakdown dd { text-align: left; }
}
