/* ============================================================
   goldrechner.css: nur fuer /goldrechner (Goldrechner mit allen
   Legierungen, Logik in goldrechner.js). Baut auf home.css und
   content.css auf und nutzt deren Farb-Token.
   ============================================================ */
.gr-tool {
  margin: 2rem 0 2.75rem;
  background: var(--ivory-2);
  border: 1px solid var(--hairline-dark);
  border-radius: 10px;
  overflow: hidden;
}
.gr-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: .9rem 1.5rem;
  padding: 1.25rem 1.4rem 1.1rem;
  background: var(--pine-2); color: var(--ivory);
}
.gr-lbl {
  display: block; margin: 0 0 .2rem;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold);
}
.gr-big {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 1.35rem; line-height: 1.2; color: var(--gold-pale);
  font-variant-numeric: tabular-nums;
}
.gr-head-sum { text-align: right; }
.prose .gr-stand { flex: 1 1 100%; margin: 0; font-size: .82rem; line-height: 1.5; color: rgba(244, 241, 232, 0.7); }

.gr-group { padding: .2rem 1.4rem 1rem; border-top: 1px solid var(--hairline-dark); }
.gr-group:first-of-type { border-top: 0; }
.prose .gr-group h3 { margin: 1.1rem 0 .2rem; }
.prose .gr-group .gr-note { margin: 0 0 .5rem; font-size: .88rem; line-height: 1.5; color: #4a5b51; }

.gr-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 8.75rem 8.75rem;
  align-items: center; gap: .45rem 1rem;
  padding: .7rem 0;
  border-top: 1px solid var(--hairline-dark);
}
.gr-note + .gr-row, h3 + .gr-row { border-top: 0; }
.gr-name { min-width: 0; cursor: pointer; }
.gr-stempel {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 500; font-size: 1rem; color: var(--ink);
}
.gr-karat { color: var(--ink); font-size: .95rem; }
.gr-hint { display: block; margin-top: .1rem; font-size: .84rem; line-height: 1.4; color: #5b6b62; }
.gr-hint a { color: var(--gold-dark); text-underline-offset: 3px; }

.gr-input {
  display: flex; align-items: center;
  border: 1px solid rgba(22, 40, 30, 0.25); border-radius: 6px; background: #fff;
  transition: border-color .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.gr-input input {
  width: 100%; min-width: 0; border: 0; background: transparent;
  padding: .6rem .55rem; font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 1rem; color: var(--ink); text-align: right;
}
.gr-input input:focus { outline: none; }
.gr-input input::placeholder { color: #9aa59e; }
.gr-input:focus-within { border-color: var(--gold-dark); box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.28); }
.gr-input input[aria-invalid="true"] { color: #a33a2a; }
.gr-unit { padding-right: .6rem; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: .9rem; color: #5b6b62; }

.gr-out {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 1rem; text-align: right; color: #7b877f;
  font-variant-numeric: tabular-nums;
}
.gr-row.is-filled .gr-out { color: var(--ink); font-weight: 500; }

.gr-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem 1.5rem; padding: 1.15rem 1.4rem;
  background: var(--ivory); border-top: 1px solid var(--hairline-dark);
}
.gr-foot .gr-lbl { color: var(--gold-dark); }
.gr-foot .gr-big { color: var(--ink); font-size: 1.55rem; }
.gr-foot-meta { font-size: .85rem; color: #5b6b62; }
.gr-reset {
  font: 500 .78rem/1 'DM Sans', ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
  color: var(--ink); background: transparent;
  border: 1px solid rgba(22, 40, 30, 0.3); border-radius: 4px; padding: .75rem 1rem;
  transition: border-color .2s var(--ease-out), color .2s var(--ease-out);
}
.gr-reset:hover { border-color: var(--gold-dark); color: var(--gold-dark); }
.gr-reset:focus-visible { outline: 2px solid var(--gold-dark); outline-offset: 2px; }
.prose .gr-fine { margin: 0; padding: 0 1.4rem 1.25rem; background: var(--ivory); font-size: .82rem; line-height: 1.55; color: #4a5b51; }

@media (max-width: 600px) {
  .gr-head, .gr-group, .gr-foot { padding-left: 1rem; padding-right: 1rem; }
  .prose .gr-fine { padding-left: 1rem; padding-right: 1rem; }
  .gr-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .gr-name { grid-column: 1 / -1; }
  .gr-head-sum { text-align: left; }
}
