.tq-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 0 0 40px;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
    background: var(--surface);
}

.tq-grid article {
    padding: 22px 20px 24px;
    border-right: 1px solid var(--line);
}

.tq-grid article:last-child {
    border-right: none;
}

.tq-grid h2 {
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: #111;
}

.tq-grid p {
    color: #111;
    font-size: 0.98rem;
    line-height: 1.5;
}

.tq-ask,
.tq-papers {
    max-width: 760px;
    margin: 0 0 40px;
}

.tq-ask h2,
.tq-papers h2 {
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.85rem;
    color: #111;
    margin-bottom: 12px;
}

.tq-ask p,
.tq-papers p {
    color: #111;
    margin-bottom: 14px;
}

.tq-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
}

.tq-chips button {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 0.95rem;
    color: #111;
    background: #fff;
    border: 1px solid var(--line);
    padding: 8px 12px;
    cursor: pointer;
    text-align: left;
}

.tq-chips button:hover,
.tq-chips button:focus {
    border-color: var(--pink-deep);
    color: var(--pink-deep);
    outline: none;
}

.tq-ask label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    color: #111;
}

.tq-ask textarea {
    width: 100%;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.05rem;
    color: #111;
    background: #fff;
    border: 1px solid #111;
    padding: 12px 14px;
    line-height: 1.45;
    resize: vertical;
}

.tq-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
}

.tq-ask button[type="submit"] {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.02rem;
    font-weight: 700;
    color: #fff;
    background: var(--pink-deep);
    border: 1px solid #111;
    padding: 10px 16px;
    cursor: pointer;
}

.tq-ask button[type="submit"]:hover,
.tq-ask button[type="submit"]:focus {
    background: #8d0e4b;
    outline: 2px solid #111;
    outline-offset: 2px;
}

.tq-ask button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: wait;
}

.tq-meta,
.tq-used {
    color: #444;
    font-size: 0.95rem;
}

.tq-answer {
    margin-top: 22px;
    background: #fff;
    border: 1px solid var(--line);
    border-left: 3px solid var(--pink);
    padding: 18px 20px 16px;
}

.tq-answer h3 {
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #111;
}

.tq-answer #answer-body {
    color: #111;
    white-space: pre-wrap;
}

.tq-papers ul {
    margin: 0;
    padding-left: 1.2rem;
}

.tq-papers li {
    margin-bottom: 8px;
    color: #111;
}

.tq-papers a {
    color: #111;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid var(--pink);
}

.tq-papers a:hover,
.tq-papers a:focus {
    color: var(--pink-deep);
}

@media (max-width: 900px) {
    .tq-grid {
        grid-template-columns: 1fr 1fr;
    }
    .tq-grid article:nth-child(2n) {
        border-right: none;
    }
    .tq-grid article:nth-child(-n+2) {
        border-bottom: 1px solid var(--line);
    }
}

@media (max-width: 640px) {
    .tq-grid {
        grid-template-columns: 1fr;
    }
    .tq-grid article {
        border-right: none;
        border-bottom: 1px solid var(--line);
    }
    .tq-grid article:last-child {
        border-bottom: none;
    }
}
