/* gotools.css — the chrome for every page under /tools/go.
 *
 * ONE STYLESHEET FOR THE WHOLE SECTION, because the pages are deliberately the
 * same shape: an input, a convert action, a result panel, a token table and an
 * explanation. Eight per-tool sheets would be eight copies of these rules, and
 * the first divergence between them would be an accident rather than a decision.
 *
 * It styles only what css.css does not. The shell already provides the type
 * scale, the link colours and the light/dark variables; everything here is the
 * section's own layout and the one state css.css has no rule for — a disabled
 * control, which without this is pixel-identical to a live one.
 */

.gt__lede {
  font-size: 1.15rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.gt__panel {
  border: 1px solid rgba(128, 128, 128, 0.35);
  border-radius: 8px;
  padding: 1rem 1.15rem 1.25rem;
  margin: 1.25rem 0 1.75rem;
}

.gt__status {
  font-size: 0.95rem;
  margin: 0 0 0.75rem;
  opacity: 0.85;
}

.gt__status[data-state='error'] {
  opacity: 1;
  font-weight: 600;
}

.gt__field {
  display: block;
  margin-bottom: 1rem;
}

.gt__label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.gt__hint {
  display: block;
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 0.4rem;
}

.gt__input {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid rgba(128, 128, 128, 0.5);
  border-radius: 6px;
  background: transparent;
  color: inherit;
}

.gt__textarea {
  min-height: 9rem;
  resize: vertical;
}

.gt__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.gt__button {
  font: inherit;
  font-weight: 600;
  padding: 0.45rem 0.95rem;
  border-radius: 6px;
  border: 1px solid rgba(128, 128, 128, 0.6);
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.gt__button:hover:not(:disabled) {
  border-color: currentColor;
}

/* css.css styles no :disabled anywhere, so without this rule a control that is
 * genuinely unavailable — the module has not finished loading — looks exactly
 * like one that is ready and simply not responding. */
.gt__button:disabled,
.gt__input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.gt__swap {
  font-size: 0.95rem;
}

.gt__out {
  margin: 0.75rem 0 0;
}

.gt__outlabel {
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.gt__code {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.05rem;
  padding: 0.6rem 0.7rem;
  border-radius: 6px;
  background: rgba(128, 128, 128, 0.12);
  overflow-x: auto;
  white-space: pre;
}

.gt__refused {
  border-left: 4px solid rgba(200, 60, 60, 0.75);
  padding-left: 0.75rem;
  margin: 0.75rem 0;
}

.gt__note {
  font-size: 0.93rem;
  opacity: 0.9;
  margin: 0.6rem 0 0;
}

/* The token table. It is the product on several of these pages — the answer is
 * the derivation, not the one-line result — so it is readable rather than dense. */
.gt__tablewrap {
  overflow-x: auto;
  margin: 1rem 0;
}

.gt__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.gt__table th,
.gt__table td {
  text-align: left;
  padding: 0.35rem 0.6rem 0.35rem 0;
  border-bottom: 1px solid rgba(128, 128, 128, 0.25);
  vertical-align: top;
}

.gt__table code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre;
}

.gt__row--refused td {
  background: rgba(200, 60, 60, 0.09);
}

.gt__badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(128, 128, 128, 0.5);
  white-space: nowrap;
}

/* The hub's card grid. */
.gt__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
  padding: 0;
  list-style: none;
}

.gt__card {
  border: 1px solid rgba(128, 128, 128, 0.35);
  border-radius: 8px;
  padding: 0.9rem 1rem 1rem;
}

.gt__card h2 {
  font-size: 1.1rem;
  margin: 0 0 0.4rem;
}

.gt__card p {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
}

.gt__backlink {
  margin: 2rem 0 0;
  font-size: 0.95rem;
}
