:root {
  --ink: #17211b;
  --muted: #687169;
  --green: #2d8a57;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #f5f7f3;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button, input { font: inherit; }

.shell {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  padding: 72px 24px 32px;
  display: flex;
  flex-direction: column;
}

.shell::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .32;
  pointer-events: none;
  background-image: linear-gradient(#dce2dc 1px, transparent 1px),
                    linear-gradient(90deg, #dce2dc 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, black, transparent 73%);
}

.glow { position: absolute; border-radius: 50%; pointer-events: none; }
.glow-one { width: 410px; height: 410px; background: #dfff725c; top: -180px; right: -80px; }
.glow-two { width: 300px; height: 300px; background: #7ed2a429; bottom: 70px; left: -160px; }
.hero { width: min(900px, 100%); margin: auto; position: relative; z-index: 1; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: #4d6e59; font-size: 12px; font-weight: 800; letter-spacing: .18em; }
.eyebrow span { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px #2d8a571f; }
h1 { margin: 20px 0 18px; font: 400 clamp(46px, 7.5vw, 82px)/.98 Georgia, serif; letter-spacing: -.052em; }
h1 em { color: var(--green); font-weight: 400; }
.intro { max-width: 610px; color: var(--muted); line-height: 1.7; font-size: 17px; margin: 0 0 34px; }
.intro code { color: var(--ink); background: #e7ece6; border-radius: 5px; padding: 2px 6px; font-size: 14px; }
.builder { padding: 26px; background: #ffffffdb; border: 1px solid #ccd6cde6; border-radius: 22px; box-shadow: 0 22px 70px #25412e1c; backdrop-filter: blur(10px); }
.builder label, .result-top { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.input-row, .result-row { display: flex; align-items: center; }
.input-row { margin-top: 10px; border: 1.5px solid #cbd3cc; background: white; border-radius: 13px; padding: 0 14px; transition: .2s; }
.input-row:focus-within { border-color: var(--green); box-shadow: 0 0 0 4px #2d8a571a; }
.link-icon { color: var(--green); font-size: 20px; margin-right: 10px; }
.input-row input { width: 100%; height: 58px; border: 0; outline: 0; color: var(--ink); background: transparent; font: 14px ui-monospace, monospace; }
.input-row input::placeholder { color: #9ba49d; }
.clear { border: 0; background: #edf1ed; border-radius: 50%; color: #687169; cursor: pointer; width: 27px; height: 27px; font-size: 19px; }
.error { color: #b13d3d; font-size: 13px; margin: 10px 2px 0; }
.result-block { margin-top: 18px; padding: 16px; border-radius: 14px; background: #f2f4f1; border: 1px dashed #cfd6cf; transition: .2s; }
.result-block.active { background: #f0f8f2; border-style: solid; border-color: #b7d8c2; }
.result-top { display: flex; justify-content: space-between; color: #657069; margin-bottom: 11px; }
.status { color: #8b948d; font-weight: 600; letter-spacing: 0; text-transform: none; }
.active .status { color: var(--green); }
.result-row { gap: 14px; }
.result-row output { flex: 1; min-width: 0; color: #7b847d; white-space: nowrap; overflow-x: auto; padding: 12px 2px; font: 13px ui-monospace, monospace; }
.active output { color: #244b33; }
.copy-button { flex: 0 0 auto; border: 0; border-radius: 10px; padding: 13px 18px; color: white; background: var(--green); font-weight: 800; cursor: pointer; transition: .15s; }
.copy-button:hover:not(:disabled) { transform: translateY(-1px); background: #237247; }
.copy-button:disabled { cursor: not-allowed; background: #bec6bf; }
.example-button { margin-top: 16px; padding: 0; border: 0; background: transparent; color: #477056; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.formula { margin: 27px 6px 0; display: flex; align-items: center; justify-content: center; gap: 22px; color: #707a72; }
.formula div { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.formula b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #e5ebe5; color: #496253; font-size: 10px; }
.formula i { color: #a5afa7; font-style: normal; }
footer { position: relative; z-index: 1; margin: 54px auto 0; color: #8a938c; text-align: center; font-size: 12px; }

@media (max-width: 620px) {
  .shell { padding: 42px 16px 24px; }
  h1 { font-size: 48px; }
  .builder { padding: 18px; border-radius: 18px; }
  .result-row { align-items: stretch; flex-direction: column; }
  .copy-button { width: 100%; }
  .formula { gap: 10px; }
  .formula div { flex-direction: column; text-align: center; font-size: 11px; }
  .formula i { margin-top: -17px; }
}
