.ag-tool {
  max-width: 900px;
  margin: 0 auto 40px;
  font-family:
    "Kumbh Sans",
    "Mulish",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  color: #212934;
  line-height: 1.6;
  box-sizing: border-box;
}
.ag-tool *,
.ag-tool *::before,
.ag-tool *::after {
  box-sizing: border-box;
}
.ag-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 8px 32px rgba(13, 18, 103, 0.06), 0 1px 3px rgba(33, 41, 52, 0.05);
  border: 1px solid #e2e2e2;
}
.ag-card + .ag-card {
  margin-top: 16px;
}
.ag-card-title {
  font-size: 1.1em;
  font-weight: 800;
  color: #212934;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
.ag-label {
  display: block;
  font-size: 0.76em;
  font-weight: 700;
  color: #747474;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.ag-hint {
  font-size: 0.85em;
  color: #747474;
  margin-top: 8px;
}
.ag-input,
.ag-select,
.ag-textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e2e2e2;
  border-radius: 10px;
  font-size: 1em;
  font-family: inherit;
  color: #212934;
  background: #fafafa;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
  line-height: 1.5;
  font-weight: 500;
}
.ag-textarea {
  min-height: 180px;
  resize: vertical;
}
.ag-input:focus,
.ag-select:focus,
.ag-textarea:focus {
  outline: none;
  border-color: #f76635;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(247, 102, 53, 0.12);
}
.ag-input::placeholder,
.ag-textarea::placeholder {
  color: #a8afb9;
  font-weight: 400;
}
.ag-input[type=number] {
  font-variant-numeric: tabular-nums;
}
.ag-file-drop {
  display: block;
  border: 2px dashed #d2d2d2;
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  background: #fafafa;
  cursor: pointer;
  transition: all 0.2s;
}
.ag-file-drop:hover,
.ag-file-drop.dragover {
  border-color: #f76635;
  background: #fff8f5;
}
.ag-file-drop input[type=file] {
  display: none;
}
.ag-file-drop p {
  margin: 8px 0;
  color: #4a4e57;
}
.ag-file-drop strong {
  color: #f76635;
  font-weight: 700;
}
.ag-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  background: #f76635;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 0.95em;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.ag-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(247, 102, 53, 0.3);
  background: #d94d1f;
  color: #ffffff;
}
.ag-btn:active {
  transform: translateY(0);
}
.ag-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.ag-btn-ghost {
  background: #fafafa;
  color: #4a4e57;
  border: 1px solid #e2e2e2;
}
.ag-btn-ghost:hover {
  background: #f0f0f0;
  color: #212934;
  box-shadow: none;
}
.ag-btn-small {
  padding: 8px 14px;
  font-size: 0.82em;
  font-weight: 600;
}
.ag-btn.copied,
.ag-btn-small.copied {
  background: #dcfce7 !important;
  color: #16a34a !important;
  border-color: #86efac !important;
}
.ag-btn-full {
  width: 100%;
}
.ag-segmented {
  display: inline-flex;
  background: #f0f0f0;
  border-radius: 12px;
  padding: 4px;
  gap: 2px;
}
.ag-segmented button {
  padding: 8px 18px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #4a4e57;
  font-size: 0.88em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.ag-segmented button:hover {
  color: #212934;
}
.ag-segmented button.active {
  background: #ffffff;
  color: #f76635;
  box-shadow: 0 2px 8px rgba(13, 18, 103, 0.08);
}
.ag-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.ag-pill {
  padding: 8px 16px;
  background: #ffffff;
  border: 1px solid #e2e2e2;
  border-radius: 999px;
  color: #4a4e57;
  font-size: 0.85em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.ag-pill:hover {
  border-color: #f76635;
  color: #f76635;
}
.ag-pill.active {
  background: #f76635;
  border-color: #f76635;
  color: #ffffff;
}
.ag-result {
  background: #fff8f5;
  border: 1px solid #fed7c5;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.ag-result-value {
  font-size: 1.6em;
  font-weight: 800;
  color: #f76635;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.ag-result-label {
  font-size: 0.78em;
  color: #747474;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  margin-bottom: 4px;
}
.ag-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.ag-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.ag-grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.ag-info {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  padding: 14px 18px;
  border-radius: 8px;
  color: #1e40af;
  font-size: 0.92em;
  margin: 16px 0;
}
.ag-info strong {
  color: #1e3a8a;
}
.ag-warn {
  background: #fff8f5;
  border-left: 4px solid #f76635;
  padding: 14px 18px;
  border-radius: 8px;
  color: #9a3412;
  font-size: 0.92em;
  margin: 16px 0;
}
.ag-warn strong {
  color: #7c2d12;
}
.ag-success {
  background: #f0fdf4;
  border-left: 4px solid #16a34a;
  padding: 14px 18px;
  border-radius: 8px;
  color: #14532d;
  font-size: 0.92em;
  margin: 16px 0;
}
.ag-success strong {
  color: #052e16;
}
.ag-error {
  background: #fef2f2;
  border-left: 4px solid #ef4444;
  padding: 14px 18px;
  border-radius: 8px;
  color: #7f1d1d;
  font-size: 0.92em;
  margin: 16px 0;
}
.ag-code {
  background: #f6f6f6;
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  padding: 14px 18px;
  font-family:
    "SF Mono",
    Monaco,
    "Cascadia Code",
    Consolas,
    monospace;
  font-size: 0.88em;
  color: #212934;
  position: relative;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.ag-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.ag-row.right {
  justify-content: flex-end;
}
.ag-row.between {
  justify-content: space-between;
}
.ag-spacer {
  height: 20px;
}
@media (max-width: 767px) {
  .ag-card {
    padding: 20px;
    border-radius: 12px;
  }
  .ag-grid-2,
  .ag-grid-3 {
    grid-template-columns: 1fr;
  }
  .ag-result-value {
    font-size: 1.35em;
  }
  .ag-segmented {
    display: flex;
    width: 100%;
  }
  .ag-segmented button {
    flex: 1;
    padding: 10px 8px;
    font-size: 0.82em;
  }
}
.ag-prompt-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 899px) {
  .ag-prompt-layout {
    grid-template-columns: 1fr;
  }
}
.ag-prompt-search {
  margin-bottom: 14px;
}
.ag-prompt-gallery {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 720px;
  overflow-y: auto;
  padding: 4px;
}
.ag-prompt-gallery::-webkit-scrollbar {
  width: 6px;
}
.ag-prompt-gallery::-webkit-scrollbar-thumb {
  background: #d2d2d2;
  border-radius: 3px;
}
.ag-prompt-tile {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  background: #ffffff;
  border: 1px solid #e2e2e2;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  font-family: inherit;
  width: 100%;
}
.ag-prompt-tile:hover {
  border-color: #f76635;
  background: #fff8f5;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(247, 102, 53, 0.1);
}
.ag-prompt-tile.active {
  border-color: #f76635;
  background: #fff8f5;
  box-shadow: 0 6px 16px rgba(247, 102, 53, 0.18);
}
.ag-prompt-tile-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.88em;
  color: #ffffff;
  background: #f76635;
}
.ag-prompt-tile-icon[data-cat=redaction] {
  background: #f76635;
}
.ag-prompt-tile-icon[data-cat=code] {
  background: #8b5cf6;
}
.ag-prompt-tile-icon[data-cat=seo] {
  background: #16a34a;
}
.ag-prompt-tile-icon[data-cat=freelance] {
  background: #3b82f6;
}
.ag-prompt-tile-icon[data-cat=image] {
  background: #ec4899;
}
.ag-prompt-tile-icon[data-cat=data] {
  background: #f59e0b;
}
.ag-prompt-tile-body {
  flex: 1;
  min-width: 0;
}
.ag-prompt-tile-title {
  font-weight: 700;
  color: #212934;
  font-size: 0.92em;
  margin-bottom: 2px;
}
.ag-prompt-tile-desc {
  font-size: 0.8em;
  color: #747474;
  line-height: 1.4;
}
.ag-prompt-editor {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  border: 1px solid #e2e2e2;
  box-shadow: 0 8px 32px rgba(13, 18, 103, 0.06), 0 1px 3px rgba(33, 41, 52, 0.05);
  position: sticky;
  top: 20px;
}
.ag-prompt-editor-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid #e2e2e2;
  margin-bottom: 18px;
}
.ag-prompt-editor-icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1em;
  color: #ffffff;
  background: #f76635;
}
.ag-prompt-editor-icon[data-cat=redaction] {
  background: #f76635;
}
.ag-prompt-editor-icon[data-cat=code] {
  background: #8b5cf6;
}
.ag-prompt-editor-icon[data-cat=seo] {
  background: #16a34a;
}
.ag-prompt-editor-icon[data-cat=freelance] {
  background: #3b82f6;
}
.ag-prompt-editor-icon[data-cat=image] {
  background: #ec4899;
}
.ag-prompt-editor-icon[data-cat=data] {
  background: #f59e0b;
}
.ag-prompt-editor-title {
  font-size: 1.15em;
  font-weight: 800;
  color: #212934;
  letter-spacing: -0.01em;
}
.ag-prompt-editor-desc {
  font-size: 0.88em;
  color: #747474;
  margin-top: 2px;
}
.ag-prompt-editor-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 1100px) {
  .ag-prompt-editor-body {
    grid-template-columns: 1fr 1fr;
  }
}
.ag-prompt-field + .ag-prompt-field {
  margin-top: 12px;
}
.ag-prompt-preview .ag-code {
  min-height: 180px;
  max-height: 360px;
  overflow-y: auto;
  font-size: 0.82em;
  line-height: 1.5;
}
