body .main {
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
}

@media (min-width: 1200px) {
  body .main {
      max-width: 80ch;
  }
}

@media (min-width: 1600px) {
  body .main {
      max-width: 100ch;
  }
}

a {
  color: inherit; /* Inherits text color, no distinct color */
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.4); /* Subtle underline color */
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover {
  text-decoration-color: rgba(255, 255, 255, 0.7); /* Slightly stronger underline on hover */
}

p {
  margin-bottom: 1.5rem;
}

a.anchor {
  opacity: 0;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Base64 tool textarea fixes (dark mode friendly) */
#b64tool textarea {
  color: var(--content);
  background-color: var(--entry);
  border: 1px solid var(--border);
}

#b64tool textarea::placeholder {
  color: var(--secondary);
}

.calculator-box {
  margin: 20px 0;
  display: flex;
  gap: 10px;
}

.calculator-box input {
  flex: 1;
  padding: 10px;
  font-size: 16px;
}

.calculator-box button {
  padding: 10px 15px;
  font-size: 16px;
  cursor: pointer;
}

.result-box {
  margin-top: 25px;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.binary-block {
  margin-top: 15px;
}

.binary-output {
  font-family: monospace;
  margin-top: 10px;
}

.result-error {
  color: red;
  margin-top: 15px;
}

.calculator-box input {
  color: #ffffff;
  background-color: #1e1e1e; /* optional: better contrast */
  border: 1px solid #444;    /* optional: cleaner dark look */
}

.calculator-box input::placeholder {
  color: #aaaaaa;
}

/* Strengthen result visual hierarchy */
.result-box {
  background: var(--background-secondary);
  border: 2px solid var(--border);
  padding: 20px;
  border-radius: 8px;
  margin-top: 20px;
}

.result-grid > div {
  padding: 6px 0;
  border-bottom: 1px dashed var(--border-alt);
}

.result-grid > div:last-child {
  border-bottom: none;
}

.binary-block summary {
  font-weight: bold;
  cursor: pointer;
  margin-top: 10px;
}

/* Cookie modal title should NOT be H1 (SEO). Keep it styled like a title. */
#silktide-modal header .silktide-modal-title {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.2;
}
