body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: #ffffff;
  color: #111;
}

/* NAVBAR */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 40px;
  border-bottom: 1px solid #eee;
}

.nav-left {
  font-weight: 500;
}

.nav-left span {
  font-size: 12px;
  margin-left: 4px;
  opacity: 0.6;
}

.nav-right a {
  margin-left: 24px;
  text-decoration: none;
  color: #666;
  font-size: 14px;
}

/* MAIN */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 90px;
}

h1 {
  font-size: 42px;
  margin-bottom: 8px;
}

.subtitle {
  color: #666;
  margin-bottom: 10px;
}

.math-line {
  font-size: 14px;
  opacity: 0.35;
  margin-bottom: 40px;
}

/* INPUT */
.input-box {
  position: relative;
  width: 680px;
  border: 1px solid #e6e6e6;
  border-radius: 16px;
  padding: 16px;
  background: #fff;
}

textarea {
  width: 100%;
  min-height: 56px;
  max-height: 160px;
  resize: none;
  border: none;
  outline: none;
  font-size: 16px;
  line-height: 1.5;
  padding-right: 56px; /* reserve space for button */
  box-sizing: border-box;
}

.input-box button {
  position: absolute;
  right: 16px;
  bottom: 16px; /* 🔴 anchor to bottom, not center */
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #c0c0c0;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 200ms linear;
}

.input-box button.active {
  background-color: #111;
}

/* 🔴 THIS IS THE KEY LINE */
textarea {
  pointer-events: auto;
}

/* HELPER */
.helper-text {
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  color: #888;
}

/* EXAMPLES */
.examples {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.examples button {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #e6e6e6;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
}

/* OUTPUT */
.math-output {
  width: 680px;
  margin-top: 24px;
  font-size: 16px;
  line-height: 1.7;
}

/* FOOTER */
.footer-text {
  margin-top: 60px;
  font-size: 12px;
  letter-spacing: 0.15em;
  opacity: 0.25;
}

.topbar{
  display:flex; justify-content:space-between; align-items:center;
  padding:18px 28px; border-bottom:1px solid #eee;
}
.brand{ font-weight:600; }
.muted{ color:#888; font-size:13px; }
.links a{ margin-left:16px; color:#333; text-decoration:none; }
.links a.active{ font-weight:700; }

.feedback-page{
  max-width:820px;
  margin:40px auto;
  padding:0 24px;
}
.feedback-page h1{ margin:0 0 8px; }

#feedbackText{
  width:100%;
  min-height:140px;
  padding:14px;
  border:1px solid #e6e6e6;
  border-radius:14px;
  outline:none;
}
.feedback-row{
  display:flex;
  gap:10px;
  margin-top:10px;
}
#feedbackEmail{
  flex:1;
  padding:10px 12px;
  border:1px solid #e6e6e6;
  border-radius:14px;
  outline:none;
}
#feedbackBtn{
  padding:10px 16px;
  border-radius:14px;
  border:1px solid #111;
  background:#111;
  color:#fff;
  cursor:pointer;
}
#feedbackBtn:disabled{ opacity:.6; cursor:not-allowed; }
.feedback-status{ margin-top:10px; font-size:13px; }

.modal.hidden { display: none; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-card {
  width: min(520px, 92vw);
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  border: 1px solid #eaeaea;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}

.modal-card h2 {
  margin: 0 0 8px 0;
  font-size: 20px;
}

.modal-card p {
  margin: 0 0 14px 0;
  color: #444;
}

.modal-card input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #ddd;
  outline: none;
  font-size: 14px;
}

.modal-status { margin-top: 10px; min-height: 18px; color: #b00020; }

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.btn-primary, .btn-secondary {
  border-radius: 999px;
  padding: 10px 14px;
  border: 1px solid #ddd;
  cursor: pointer;
}

.btn-primary {
  background: #111;
  color: #fff;
  border-color: #111;
}

.btn-secondary {
  background: #fff;
  color: #111;
}

.status {
  margin-top: 14px;
  font-style: italic;
  opacity: 0.8;
}
