/*
 * Home page "Practice Slip" section (index.html, between "Why HDL2Chips" and the FAQ).
 * Left: short text. Right: a small example slip (plain HTML, no script, no web font).
 * Uses the shared theme tokens (--primary, --text-main, --text-muted, --border) so light and dark mode follow the site.
 * The example slip keeps its own paper colours in both themes, like the real slip.
 */

.pslip-section {
    padding: 25px 0;
    margin-top: 25px;
    background: transparent;
    width: 100%;
    text-align: left;
}

.pslip-container {
    padding: 0 40px;
}

.pslip-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    align-items: center;
}

.pslip-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}

.pslip-tag {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.pslip-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.2;
    margin: 0;
}

.pslip-text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.pslip-points {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pslip-points li {
    position: relative;
    padding-left: 18px;
    font-size: 0.9rem;
    color: var(--text-main);
}

.pslip-points li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

.pslip-note {
    margin: 6px 0 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.pslip-demo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* The zigzag mask also clips a box-shadow, so the shadow is drawn on this wrapper instead. */
.pslip-shadow {
    width: 100%;
    max-width: 360px;
    filter: drop-shadow(0 8px 18px rgba(15, 23, 42, 0.22)) drop-shadow(0 0 1px rgba(15, 23, 42, 0.35));
}

.pslip-paper {
    position: relative;
    width: 100%;
    padding: 20px 20px 30px;
    color: #111827;
    font-family: "Courier New", Courier, monospace;
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
    background: #ffffff repeating-linear-gradient(to bottom, rgba(17, 24, 39, 0) 0, rgba(17, 24, 39, 0) 2px, rgba(17, 24, 39, 0.045) 3px);
    -webkit-mask: linear-gradient(#000, #000) top / 100% calc(100% - 8px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 8px repeat-x;
    mask: linear-gradient(#000, #000) top / 100% calc(100% - 8px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 8px repeat-x;
}

.pslip-paper h3 {
    margin: 0 0 8px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.pslip-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.pslip-row span:first-child {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pslip-row span:last-child {
    white-space: nowrap;
}

.pslip-rule {
    border: 0;
    border-top: 2px dashed rgba(17, 24, 39, 0.55);
    margin: 8px 0;
}

.pslip-total {
    font-size: 17px;
    font-weight: 700;
}

.pslip-msg {
    margin-top: 6px;
    text-align: center;
}

.pslip-fine {
    text-align: center;
    font-size: 11px;
    opacity: 0.75;
}

.pslip-mark {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: rgba(37, 99, 235, 0.11);
    transform: rotate(-22deg);
    white-space: nowrap;
}

.pslip-caption {
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (max-width: 900px) {
    .pslip-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .pslip-section {
        padding: 24px 16px 16px;
    }

    .pslip-container {
        padding: 0;
    }

    .pslip-shadow {
        max-width: 100%;
    }
}
