/* =========================================================
   143TOOL - SIP Calculator Styles
   Version: 1.0.0
   ========================================================= */

.sip-card {
    padding: 30px;
    max-width: 780px;
    margin: 0 auto;
}

/* ---------- CURRENCY ---------- */
.sip-currency { margin-bottom: 22px; }

.sip-currency-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
}

.sip-currency-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 5px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.sip-cur {
    padding: 10px 8px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 13px;
    border-radius: var(--radius-sm);
    transition: background .2s ease, color .2s ease;
}

.sip-cur:hover {
    color: var(--text);
    background: color-mix(in srgb, var(--primary) 6%, transparent);
}

.sip-cur.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    box-shadow: 0 4px 14px rgba(233, 30, 99, .22);
}

/* ---------- FORM ---------- */
.sip-card .form-group { margin-bottom: 20px; }

.sip-card label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-hint {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 12px;
}

/* Input wrapper */
.sip-input-wrap { position: relative; }

.sip-input-wrap input {
    width: 100%;
    padding: 13px 15px 13px 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--body-bg);
    color: var(--text);
    font-size: 17px;
    font-weight: 600;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.sip-input-wrap input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}

.sip-input-wrap input.sip-right-pad { padding-right: 90px; }

.sip-input-wrap input::-webkit-outer-spin-button,
.sip-input-wrap input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.sip-input-wrap input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.sip-cur-symbol {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 700;
    pointer-events: none;
}

.sip-symbol-right {
    left: auto;
    right: 14px;
    font-size: 13px;
}

/* ---------- DURATION MODES ---------- */
.sip-duration-modes {
    display: flex;
    gap: 5px;
    padding: 4px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}

.sip-duration-mode {
    flex: 1;
    padding: 9px 8px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 13px;
    border-radius: var(--radius-sm);
    transition: background .2s ease, color .2s ease;
}

.sip-duration-mode:hover {
    color: var(--text);
    background: color-mix(in srgb, var(--primary) 6%, transparent);
}

.sip-duration-mode.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    box-shadow: 0 3px 10px rgba(233, 30, 99, .2);
}

.sip-duration-panel { display: none; }

.sip-duration-panel.active {
    display: block;
    animation: sipFade .2s ease;
}

.sip-duration-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.sip-duration-field { position: relative; }

.sip-duration-field input {
    width: 100%;
    padding: 13px 60px 13px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--body-bg);
    color: var(--text);
    font-size: 17px;
    font-weight: 600;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.sip-duration-field input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}

.sip-duration-field input::-webkit-outer-spin-button,
.sip-duration-field input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.sip-duration-field input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.sip-duration-suffix {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    pointer-events: none;
}

/* ---------- STEP-UP ---------- */
.sip-stepup {
    margin-bottom: 20px;
    padding: 16px 18px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.sip-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    margin: 0;
}

.sip-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.sip-stepup-panel {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--border);
    animation: sipFade .2s ease;
}

/* ---------- ACTIONS ---------- */
.sip-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ---------- ERROR ---------- */
.sip-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 ---------- */
.sip-result {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
    animation: sipFade .3s ease;
}

@keyframes sipFade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Hero */
.sip-hero-wrap { text-align: center; margin-bottom: 26px; }

.sip-hero-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.sip-hero {
    font-size: clamp(36px, 7vw, 52px);
    font-weight: 900;
    line-height: 1.05;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    word-break: break-word;
}

.sip-hero-sub {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

/* Summary */
.sip-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 22px;
}

.sip-stat {
    padding: 16px 18px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.sip-stat-highlight {
    background: color-mix(in srgb, var(--primary) 8%, transparent);
    border-color: color-mix(in srgb, var(--primary) 22%, var(--border));
}

.sip-stat-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.sip-stat-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
    word-break: break-word;
}

.sip-stat-green { color: #10b981; }

/* Visual bar */
.sip-visual { margin-bottom: 24px; }

.sip-visual-bar {
    display: flex;
    height: 22px;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface-2);
}

.sip-visual-invested {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #6366f1);
    transition: width .5s cubic-bezier(.22,.85,.35,1);
}

.sip-visual-gain {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    transition: width .5s cubic-bezier(.22,.85,.35,1);
}

.sip-visual-legend {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 10px;
}

.sip-visual-legend strong { color: var(--text); }

.sip-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.sip-legend-invested { background: #6366f1; }
.sip-legend-gain     { background: #10b981; }

/* Table */
.sip-table-wrap {
    margin-top: 24px;
    padding: 20px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.sip-table-title {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 700;
}

.sip-table-scroll {
    max-height: 340px;
    overflow-y: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
}

.sip-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.sip-table thead th {
    position: sticky;
    top: 0;
    background: var(--surface-2);
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    font-size: 11px;
    text-align: right;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

.sip-table thead th:first-child { text-align: left; }

.sip-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    text-align: right;
}

.sip-table tbody td:first-child {
    text-align: left;
    font-weight: 700;
}

.sip-table tbody tr:last-child td { border-bottom: 0; }

.sip-table tbody tr:hover {
    background: color-mix(in srgb, var(--primary) 5%, transparent);
}

.sip-table .sip-gain-cell { color: #10b981; font-weight: 700; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 620px) {
    .sip-card { padding: 20px; }
    .sip-currency-options { grid-template-columns: repeat(2, 1fr); }
    .sip-summary { grid-template-columns: 1fr; }
    .sip-stat-value { font-size: 18px; }
    .sip-actions .btn { flex: 1; }
    .sip-duration-row { grid-template-columns: 1fr; }
    .sip-table { font-size: 12px; }
    .sip-table th,
    .sip-table td { padding: 8px 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;
    }
}
