.tlip {
    --tlip-ink: #10233d;
    --tlip-muted: #5a6b7f;
    --tlip-line: #dbe4ee;
    --tlip-soft: #f5f8fb;
    --tlip-accent: #0b6bcb;
    --tlip-accent-dark: #084d92;
    --tlip-good: #177245;
    --tlip-warn: #8a4b08;
    color: var(--tlip-ink);
    font-family: inherit;
}

.tlip * { box-sizing: border-box; }

.tlip-shell {
    max-width: 980px;
    margin: 0 auto;
    border: 1px solid var(--tlip-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 18px 55px rgba(16, 35, 61, .08);
    overflow: hidden;
}

.tlip-hero {
    padding: 32px 34px 26px;
    background: linear-gradient(135deg, #f7fbff 0%, #edf6ff 100%);
    border-bottom: 1px solid var(--tlip-line);
}

.tlip-eyebrow,
.tlip-kicker {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--tlip-accent-dark);
}

.tlip-hero h2 {
    margin: 8px 0 10px;
    font-size: clamp(28px, 4.2vw, 42px);
    line-height: 1.12;
}

.tlip-hero p,
.tlip-note p,
.tlip-info-card p,
.tlip-disclaimer p {
    margin: 0;
    line-height: 1.65;
}

.tlip-note {
    margin: 24px 34px 0;
    padding: 15px 17px;
    border-left: 4px solid var(--tlip-accent);
    background: #f3f8fe;
    border-radius: 10px;
    line-height: 1.6;
}

.tlip-form { padding: 28px 34px 12px; }

.tlip-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.tlip-field {
    display: block;
    padding: 18px;
    border: 1px solid var(--tlip-line);
    border-radius: 14px;
    background: #fff;
}

.tlip-field-wide { grid-column: 1 / -1; }

.tlip-label {
    display: block;
    margin-bottom: 9px;
    font-weight: 800;
    line-height: 1.35;
}

.tlip-label b { color: #b42318; }
.tlip-optional { color: var(--tlip-muted); font-weight: 600; font-size: 12px; }

.tlip-money-input {
    display: flex;
    align-items: center;
    min-height: 50px;
    border: 1px solid #bdc9d7;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.tlip-money-input > span {
    padding: 0 13px;
    font-weight: 800;
    color: #4e6177;
    border-right: 1px solid var(--tlip-line);
}

.tlip input {
    width: 100%;
    min-width: 0;
    padding: 13px 14px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--tlip-ink);
    font: inherit;
    font-size: 16px;
}

.tlip-money-input:focus-within {
    border-color: var(--tlip-accent);
    box-shadow: 0 0 0 3px rgba(11, 107, 203, .12);
}

.tlip-field small {
    display: block;
    margin-top: 8px;
    color: var(--tlip-muted);
    line-height: 1.45;
}

.tlip-error {
    display: block;
    min-height: 18px;
    margin-top: 5px;
    color: #b42318;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.tlip-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 9px;
}

.tlip-quick button,
.tlip-secondary {
    appearance: none;
    border: 1px solid #b9c7d6;
    border-radius: 9px;
    background: #fff;
    color: var(--tlip-ink);
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.tlip-quick button { padding: 7px 10px; font-size: 13px; }
.tlip-quick button:hover, .tlip-secondary:hover { background: var(--tlip-soft); }

.tlip-actions {
    display: flex;
    gap: 10px;
    padding-top: 18px;
}

.tlip-primary,
.tlip-secondary {
    min-height: 48px;
    padding: 0 18px;
}

.tlip-primary {
    flex: 1;
    border: 0;
    border-radius: 10px;
    background: var(--tlip-accent);
    color: #fff;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
}

.tlip-primary:hover { background: var(--tlip-accent-dark); }

.tlip-results {
    margin: 16px 34px 28px;
    padding: 24px;
    border: 1px solid #cfe0f3;
    border-radius: 18px;
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8fc 100%);
}

.tlip-result-top {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

.tlip-result-top h3 {
    margin: 5px 0 4px;
    font-size: clamp(34px, 6vw, 50px);
    line-height: 1;
    color: var(--tlip-good);
}

.tlip-result-top p {
    margin: 8px 0 0;
    color: var(--tlip-muted);
    max-width: 650px;
    line-height: 1.55;
}

.tlip-result-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.tlip-small { min-height: 38px; padding: 0 12px; font-size: 13px; }

.tlip-flow {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 10px;
    align-items: center;
    margin: 22px 0;
}

.tlip-flow-card {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--tlip-line);
    border-radius: 12px;
    background: #fff;
}

.tlip-flow-card span { display: block; color: var(--tlip-muted); font-size: 13px; }
.tlip-flow-card strong { display: block; margin-top: 4px; font-size: 21px; }
.tlip-flow-owner { border-color: #c7e3d5; background: #f7fcf9; }
.tlip-arrow { color: #7a8a9d; font-weight: 900; }

.tlip-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.tlip-metric {
    padding: 15px;
    border: 1px solid var(--tlip-line);
    border-radius: 12px;
    background: #fff;
}

.tlip-metric span { display: block; min-height: 34px; color: var(--tlip-muted); font-size: 12px; line-height: 1.35; }
.tlip-metric strong { display: block; margin-top: 5px; font-size: 18px; word-break: break-word; }

.tlip-breakdown {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--tlip-line);
    border-radius: 14px;
    background: #fff;
}

.tlip-breakdown h4 { margin: 0 0 11px; font-size: 18px; }
.tlip-breakdown ul { list-style: none; margin: 0; padding: 0; }
.tlip-breakdown li {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 0;
    border-bottom: 1px dashed #dce4ed;
}
.tlip-breakdown li:last-child { border-bottom: 0; }
.tlip-breakdown li span { color: var(--tlip-muted); }
.tlip-breakdown li strong { text-align: right; }
.tlip-breakdown .tlip-total { font-size: 16px; }
.tlip-breakdown .tlip-total span, .tlip-breakdown .tlip-total strong { color: var(--tlip-ink); font-weight: 850; }
.tlip-equity-note { margin: 12px 0 0; color: var(--tlip-muted); line-height: 1.55; }

.tlip-method {
    margin-top: 15px;
    padding: 14px 16px;
    border-radius: 11px;
    background: #eef5fd;
    line-height: 1.55;
    font-size: 14px;
}

.tlip-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 0 34px 26px;
}

.tlip-info-card {
    padding: 17px;
    border: 1px solid var(--tlip-line);
    border-radius: 13px;
    background: #fff;
}

.tlip-info-card strong { display: block; margin-bottom: 6px; }
.tlip-info-card p { color: var(--tlip-muted); font-size: 14px; }

.tlip-disclaimer {
    margin: 0 34px 34px;
    padding: 18px;
    border: 1px solid #ead7bd;
    border-radius: 14px;
    background: #fffaf2;
}

.tlip-disclaimer strong { display: block; margin-bottom: 6px; color: #72420a; }
.tlip-disclaimer p { color: #5f4b33; font-size: 13px; }

@media (max-width: 760px) {
    .tlip-shell { border-radius: 16px; }
    .tlip-hero { padding: 24px 18px 20px; }
    .tlip-note { margin: 18px 18px 0; }
    .tlip-form { padding: 20px 18px 10px; }
    .tlip-fields { grid-template-columns: 1fr; }
    .tlip-field-wide { grid-column: auto; }
    .tlip-actions { flex-direction: column; }
    .tlip-primary, .tlip-secondary { width: 100%; }
    .tlip-results { margin: 14px 18px 22px; padding: 18px; }
    .tlip-result-top { flex-direction: column; }
    .tlip-result-actions { width: 100%; }
    .tlip-result-actions .tlip-secondary { width: auto; flex: 1; }
    .tlip-flow { grid-template-columns: 1fr; }
    .tlip-arrow { transform: rotate(90deg); justify-self: center; }
    .tlip-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tlip-info-grid { grid-template-columns: 1fr; padding: 0 18px 22px; }
    .tlip-disclaimer { margin: 0 18px 22px; }
}

@media (max-width: 480px) {
    .tlip-metrics { grid-template-columns: 1fr; }
    .tlip-result-actions { flex-direction: column; }
    .tlip-result-actions .tlip-secondary { width: 100%; }
    .tlip-breakdown li { align-items: flex-start; }
    .tlip-breakdown li span { max-width: 60%; }
}

@media print {
    .tlip-form,
    .tlip-actions,
    .tlip-result-actions,
    .tlip-info-grid,
    .tlip-disclaimer,
    .tlip-note { display: none !important; }
    .tlip-shell, .tlip-results { border: 0; box-shadow: none; margin: 0; padding: 0; }
    .tlip-results[hidden] { display: none !important; }
}
