/* 
   TEMPLATES / ESSAY HELPER PAGE
   */

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.template-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.template-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent);
  transform: translateX(-100%);
  transition: transform 0.3s;
}

.template-card:hover::before {
  transform: translateX(0);
}

.template-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.template-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.template-icon {
  width: 44px;
  height: 44px;
  background: var(--bg);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.template-meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  margin-top: 0.5rem;
}

.essay-builder {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  margin-top: 2rem;
}

.essay-section {
  margin-bottom: 1.5rem;
}

.essay-section label {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}

.essay-section input,
.essay-section textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  transition: border 0.2s;
  font-family: inherit;
}

.essay-section input:focus,
.essay-section textarea:focus {
  border-color: var(--accent);
}

.essay-section textarea {
  min-height: 100px;
  resize: vertical;
  font-family: var(--serif);
}

.essay-preview {
  background: var(--paper);
  border-left: 4px solid var(--accent);
  padding: 2rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-top: 1.5rem;
  border-radius: 4px;
  white-space: pre-wrap;
}
