/* Plangrida 공개 아티클 목록/상세 */

.article-site {
    min-width: 320px;
    background: #f9f9ff;
    word-break: keep-all;
}

.article-header,
.article-footer {
    width: min(1120px, 100%);
}

.article-list-main {
    width: min(1120px, calc(100% - 48px));
    margin: 0 auto;
    padding: 46px 0 70px;
}

.article-list-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 36px;
}

.article-list-hero-copy {
    max-width: 680px;
}

.article-list-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 48px);
    line-height: 1.15;
    letter-spacing: -.045em;
}

.article-list-hero-copy > p:last-child {
    margin: 0;
    color: #495267;
    font-size: 16px;
    line-height: 1.75;
}

.article-write-button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 43px;
    padding: 0 19px;
    border: 1px solid #2f6bff;
    border-radius: 11px;
    background: #2f6bff;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(47, 107, 255, .16);
    transition: transform .18s ease, background .18s ease;
}

.article-write-button::before {
    content: "+";
    margin-right: 7px;
    font-size: 18px;
    line-height: 1;
}

.article-write-button:hover {
    background: #1957ec;
    color: #fff;
    transform: translateY(-1px);
}

.article-write-button[hidden] {
    display: none;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.article-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e9e7f2;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(45, 44, 90, .055);
    transition: transform .18s ease, box-shadow .18s ease;
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 38px rgba(45, 44, 90, .1);
}

.article-card-image {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f1f0fb;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .3s ease;
}

.article-card:hover .article-card-image img {
    transform: scale(1.025);
}

.article-card-body {
    padding: 21px 21px 23px;
}

.article-card time,
.article-detail-head time {
    display: block;
    color: #72798b;
    font-size: 12px;
    font-weight: 700;
}

.article-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px 15px;
    color: #72798b;
    font-size: 12px;
    font-weight: 700;
}

.article-meta-row > * {
    position: relative;
}

.article-meta-row > * + * {
    padding-left: 14px;
}

.article-meta-row > * + *::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #a9afbc;
    transform: translateY(-50%);
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.article-tags li {
    padding: 5px 9px;
    border: 1px solid #e5e2f2;
    border-radius: 999px;
    background: #f8f7ff;
    color: #596176;
    font-size: 11px;
    font-weight: 700;
}

.article-card h2 {
    margin: 9px 0 10px;
    font-size: 19px;
    line-height: 1.45;
    letter-spacing: -.025em;
}

.article-card h2 a,
.article-read-link {
    text-decoration: none;
}

.article-card h2 a:hover,
.article-read-link:hover {
    color: var(--accent-dark);
}

.article-card p {
    min-height: 4.8em;
    margin: 0 0 17px;
    overflow: hidden;
    color: #4d5568;
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.article-read-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 800;
}

.article-empty,
.article-not-found {
    padding: 80px 24px;
    border: 1px solid #e9e7f2;
    border-radius: 16px;
    background: #fff;
    text-align: center;
}

.article-empty p,
.article-not-found p {
    margin: 0 0 18px;
    color: #687084;
}

.article-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 38px;
    font-size: 13px;
    font-weight: 700;
}

.article-pagination a {
    padding: 8px 13px;
    border: 1px solid #e5e2ef;
    border-radius: 9px;
    background: #fff;
    text-decoration: none;
}

.article-detail-main {
    width: min(900px, calc(100% - 48px));
    margin: 0 auto;
    padding: 34px 0 72px;
}

.article-detail {
    padding: 44px 52px 48px;
    border: 1px solid #e9e7f2;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 38px rgba(45, 44, 90, .06);
}

.article-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #5f6679;
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
}

.article-back:hover {
    color: var(--accent-dark);
}

.article-detail-head {
    max-width: 760px;
    margin: 44px 0 30px;
}

.article-detail-head h1 {
    margin: 0 0 17px;
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.32;
    letter-spacing: -.045em;
    overflow-wrap: anywhere;
}

.article-cover {
    margin: 0 0 43px;
    overflow: hidden;
    border-radius: 15px;
    background: #f1f0fb;
}

.article-cover img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    display: block;
    object-fit: cover;
}

.article-content {
    max-width: 720px;
    margin: 0 auto;
    color: #272d3b;
    font-size: 17px;
    line-height: 1.95;
    letter-spacing: -.012em;
    overflow-wrap: anywhere;
}

.article-content p {
    margin: 0 0 1.65em;
}

.article-content h2,
.article-content h3 {
    color: #171b25;
    line-height: 1.45;
    letter-spacing: -.03em;
}

.article-content h2 {
    margin: 2.2em 0 .75em;
    font-size: 27px;
}

.article-content h3 {
    margin: 1.9em 0 .65em;
    font-size: 21px;
}

.article-content ul,
.article-content ol {
    margin: 0 0 1.65em;
    padding-left: 1.5em;
}

.article-content li + li {
    margin-top: .55em;
}

.article-detail-footer {
    max-width: 720px;
    margin: 55px auto 0;
    padding: 24px;
    border-radius: 13px;
    background: #f4f3ff;
}

.article-detail-footer p {
    margin: 0 0 8px;
    color: #555d71;
    font-size: 13px;
}

.article-detail-footer a {
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.article-editor-main {
    width: min(900px, calc(100% - 48px));
    margin: 0 auto;
    padding: 34px 0 72px;
}

.article-access-check,
.article-editor {
    border: 1px solid #e9e7f2;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 38px rgba(45, 44, 90, .06);
}

.article-access-check {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 24px;
    text-align: center;
}

.article-access-check p {
    margin: 0;
    color: #687084;
}

.article-access-check a {
    color: #2f6bff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.article-access-check[hidden],
.article-editor[hidden],
.article-image-preview[hidden],
.article-form-error[hidden] {
    display: none;
}

.article-editor {
    padding: 38px 48px 46px;
}

.article-editor-head {
    margin: 36px 0 32px;
}

.article-editor-head h1 {
    margin: 0 0 12px;
    font-size: clamp(31px, 5vw, 43px);
    line-height: 1.2;
    letter-spacing: -.045em;
}

.article-editor-head > p:last-child {
    margin: 0;
    color: #596176;
    font-size: 15px;
    line-height: 1.7;
}

.article-form-error {
    margin-bottom: 21px;
    padding: 14px 16px;
    border: 1px solid #f4c8cb;
    border-radius: 10px;
    background: #fff1f2;
    color: #a52731;
    font-size: 14px;
    line-height: 1.55;
}

.article-write-form {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.article-form-field {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.article-form-field label {
    color: #242a38;
    font-size: 14px;
    font-weight: 800;
}

.article-form-field input[type="text"],
.article-form-field input[type="file"],
.article-form-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #dcd9e8;
    border-radius: 11px;
    background: #fff;
    color: #202532;
    font: inherit;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.article-form-field input[type="text"],
.article-form-field input[type="file"] {
    min-height: 48px;
    padding: 11px 13px;
}

.article-form-field input[type="file"] {
    color: #596176;
    font-size: 13px;
}

.article-form-field input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 8px 12px;
    border: 0;
    border-radius: 7px;
    background: #efeffa;
    color: #343b50;
    font-weight: 750;
    cursor: pointer;
}

.article-form-field textarea {
    min-height: 440px;
    resize: vertical;
    padding: 15px;
    line-height: 1.75;
}

.article-form-field input:focus,
.article-form-field textarea:focus {
    border-color: #4b7cff;
    box-shadow: 0 0 0 3px rgba(47, 107, 255, .11);
}

.article-form-field small {
    color: #70788a;
    font-size: 12px;
    line-height: 1.65;
}

.article-form-field small code {
    padding: 2px 4px;
    border-radius: 4px;
    background: #f0eff7;
    color: #3e465a;
}

.article-image-preview {
    max-width: 520px;
    overflow: hidden;
    border: 1px solid #e5e2ee;
    border-radius: 12px;
    background: #f1f0fb;
}

.article-image-preview img {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    object-fit: cover;
}

.article-seo-note {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 20px;
    border-radius: 12px;
    background: #f2f2ff;
    color: #50596d;
    font-size: 13px;
    line-height: 1.65;
}

.article-seo-note strong {
    color: #28334e;
    font-size: 14px;
}

.article-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 5px;
}

.article-form-cancel,
.article-form-submit {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0 19px;
    border-radius: 10px;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.article-form-cancel {
    border: 1px solid #dedbe7;
    background: #fff;
    color: #4e5669;
}

.article-form-submit {
    border: 1px solid #2f6bff;
    background: #2f6bff;
    color: #fff;
}

.article-form-submit:disabled {
    cursor: wait;
    opacity: .65;
}

.article-footer {
    padding-top: 0;
}

@media (max-width: 860px) {
    .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .article-list-main,
    .article-detail-main,
    .article-editor-main {
        width: calc(100% - 36px);
    }
    .article-list-main { padding: 28px 0 48px; }
    .article-grid { grid-template-columns: 1fr; gap: 17px; }
    .article-list-hero { align-items: flex-start; flex-direction: column; gap: 18px; margin-bottom: 27px; }
    .article-list-hero h1 { font-size: 34px; }
    .article-write-button { min-height: 41px; padding: 0 16px; }
    .article-card-body { padding: 18px; }
    .article-card p { min-height: 0; }
    .article-detail-main { padding: 10px 0 48px; }
    .article-detail {
        padding: 27px 20px 30px;
        border-radius: 14px;
    }
    .article-detail-head { margin: 32px 0 23px; }
    .article-detail-head h1 { font-size: 30px; }
    .article-tags { margin-top: 14px; }
    .article-cover { margin-bottom: 30px; border-radius: 10px; }
    .article-content { font-size: 16px; line-height: 1.85; }
    .article-content h2 { font-size: 23px; }
    .article-content h3 { font-size: 19px; }
    .article-detail-footer { margin-top: 42px; padding: 19px; }
    .article-editor-main { padding: 10px 0 48px; }
    .article-editor { padding: 27px 20px 30px; border-radius: 14px; }
    .article-editor-head { margin: 30px 0 26px; }
    .article-editor-head h1 { font-size: 30px; }
    .article-form-field textarea { min-height: 360px; }
    .article-form-actions { align-items: stretch; flex-direction: column-reverse; }
    .article-form-cancel,
    .article-form-submit { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .article-card,
    .article-card-image img,
    .article-write-button { transition: none; }
}
