/* =========================================================
   143TOOL - Percentage Calculator Styles
   Version: 1.0.0
   ========================================================= */

.pct-card {
    padding: 30px;
    max-width: 760px;
    margin: 0 auto;
}

/* ---------- TABS ---------- */
.pct-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 5px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 28px;
}

.pct-tab {
    flex: 1 1 auto;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13px;
    border-radius: var(--radius-sm);
    transition: background .2s ease, color .2s ease;
    white-space: nowrap;
    min-width: 130px;
}

.pct-tab:hover {
    color: var(--text);
    background: color-mix(in srgb, var(--primary) 6%, transparent);
}

.pct-tab.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    box-shadow: 0 4px 14px rgba(233, 30, 99, .22);
}

/* ---------- PANELS ---------- */
.pct-panel {
    display: none;
}

.pct-panel.active {
    display: block;
    animation: pctFade .25s ease;
}

@keyframes pctFade {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.pct-question {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: clamp(16px, 2.2vw, 20px);
    font-weight: 600;
    color: var(--text);
    line-height: 2;
}

.pct-inline-input {
    width: 120px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--body-bg);
    color: var(--text);
    font-size: 17px;
    font-weight: 700;
    text-align: center;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.pct-inline-input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}

.pct-inline-input::-webkit-outer-spin-button,
.pct-inline-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pct-inline-input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* ---------- ACTIONS ---------- */
.pct-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 26px;
}

/* ---------- ERROR ---------- */
.pct-error {
    margin-top: 20px;
    padding: 12px 15px;
    background: color-mix(in srgb, var(--danger) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--border));
    border-radius: var(--radius-sm);
    color: var(--danger);
    font-size: 14px;
    font-weight: 600;
}

/* ---------- RESULT ---------- */
.pct-result {
    margin-top: 28px;
    padding: 24px;
    text-align: center;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--primary) 10%, var(--surface)),
        color-mix(in srgb, var(--secondary) 8%, var(--surface)));
    border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
    border-radius: var(--radius-lg);
    animation: pctFade .3s ease;
}

.pct-result-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.pct-result-value {
    font-size: clamp(32px, 6vw, 48px);
    font-weight: 900;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    word-break: break-word;
}

.pct-result-formula {
    margin-top: 10px;
    font-size: 14px;
    color: var(--text-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------- STEPS ---------- */
.pct-steps {
    margin-top: 22px;
    padding: 20px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.pct-steps-title {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 700;
}

.pct-steps-list {
    margin: 0;
    padding-left: 22px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.9;
}

.pct-steps-list li strong {
    color: var(--text);
    font-weight: 700;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 620px) {
    .pct-card { padding: 20px; }
    .pct-tabs { flex-direction: column; }
    .pct-tab { min-width: 0; text-align: left; }
    .pct-inline-input { width: 90px; font-size: 16px; }
    .pct-actions .btn { flex: 1; }
    .pct-question { font-size: 16px; gap: 8px; }
}
/* =========================================================
   SEO ARTICLE / ADSENSE CONTENT
   ========================================================= */

.tool-article {
    max-width: 800px;
    margin: 60px auto 40px;
    padding: 30px 0;
    border-top: 1px solid var(--border);
}

.tool-article h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    margin: 36px 0 14px;
    line-height: 1.3;
    letter-spacing: -.4px;
}

.tool-article h2:first-child {
    margin-top: 0;
}

.tool-article h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin: 24px 0 10px;
    line-height: 1.4;
}

.tool-article p {
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-muted);
    margin: 0 0 16px;
}

.tool-article ul,
.tool-article ol {
    padding-left: 22px;
    margin: 0 0 18px;
}

.tool-article li {
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.tool-article strong {
    color: var(--text);
    font-weight: 700;
}

.tool-article a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: color .15s ease;
}

.tool-article a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

@media (max-width: 620px) {
    .tool-article {
        padding: 20px 0;
        margin: 40px auto 20px;
    }
    .tool-article h2 {
        font-size: 20px;
        margin: 28px 0 12px;
    }
    .tool-article h3 {
        font-size: 16px;
        margin: 20px 0 8px;
    }
    .tool-article p,
    .tool-article li {
        font-size: 15px;
        line-height: 1.7;
    }
}