.page-hero {
    text-align: center;
    padding: 3rem 1.5rem 2rem
}

.page-hero .hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 5px 14px 5px 6px;
    font-size: 10px;
    font-weight: 600;
    color: var(--ink2);
    margin-bottom: 1.4rem
}

.page-hero .hero-pill-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #A855F7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #fff
}

.page-hero h1 {
    font-size: clamp(1.9rem, 4.5vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--ink);
    letter-spacing: -1px;
    margin-bottom: .8rem
}

.page-hero h1 em {
    font-style: normal;
    background: linear-gradient(135deg, var(--primary), #A855F7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent
}

.page-hero p {
    font-size: .95rem;
    color: var(--muted);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7
}

.tool-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem
}

/* TABS */
.tabs {
    display: flex;
    gap: 0;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 5px;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    scrollbar-width: none
}

.tabs::-webkit-scrollbar {
    display: none
}

.tab-btn {
    flex: 1;
    padding: 9px 14px;
    border: none;
    background: none;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all .15s;
    min-width: fit-content
}

.tab-btn.active {
    background: var(--primary);
    color: #fff
}

/* SECTION */
.conv-section {
    display: none
}

.conv-section.active {
    display: block
}

/* CARD */
.card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 14px
}

.card-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px
}

/* INPUT BASE BADGE */
.base-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--primary);
    color: #fff;
    border-radius: 7px;
    padding: 3px 10px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    font-family: 'Fira Code', monospace
}

/* NUMBER INPUT */
.num-input {
    width: 100%;
    border: 2px solid var(--border);
    border-radius: 11px;
    outline: none;
    font-family: 'Fira Code', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ink);
    padding: 13px 16px;
    background: var(--bg);
    transition: border-color .2s, box-shadow .2s;
    letter-spacing: .05em
}

.num-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(91, 79, 233, .1)
}

.num-input::placeholder {
    color: var(--muted);
    font-weight: 400
}

.num-input.error {
    border-color: #FF6B6B;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, .1)
}

.err-msg {
    font-size: 11.5px;
    color: #FF6B6B;
    font-weight: 600;
    margin-top: 5px;
    display: none
}

/* RESULTS GRID */
.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px
}

.result-box {
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all .15s;
    position: relative
}

.result-box:hover {
    border-color: var(--primary);
    background: var(--primary-light)
}

.result-box:hover .rb-copy {
    opacity: 1
}

.rb-label {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 6px
}

.rb-base {
    background: var(--border);
    color: var(--ink2);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 9px;
    font-weight: 800;
    font-family: 'Fira Code', monospace
}

.rb-val {
    font-family: 'Fira Code', monospace;
    font-size: .95rem;
    font-weight: 600;
    color: var(--ink);
    word-break: break-all;
    line-height: 1.5;
    min-height: 22px
}

.rb-copy {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 3px 9px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
    opacity: 0;
    transition: opacity .15s
}

/* STEP BY STEP */
.steps-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    margin-top: 12px
}

.steps-head {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background .1s
}

.steps-head:hover {
    background: var(--bg)
}

.steps-body {
    padding: 0 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease, padding .3s ease
}

.steps-body.open {
    max-height: 500px;
    padding: 14px 16px
}

.step-line {
    font-family: 'Fira Code', monospace;
    font-size: 12.5px;
    color: var(--ink2);
    padding: 3px 0;
    line-height: 1.7
}

.step-line span {
    color: var(--primary);
    font-weight: 700
}

/* ASCII SECTION */
.ascii-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px
}

textarea.ascii-input {
    width: 100%;
    border: 2px solid var(--border);
    border-radius: 11px;
    outline: none;
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    color: var(--ink);
    padding: 12px 14px;
    background: var(--bg);
    resize: none;
    min-height: 100px;
    line-height: 1.6;
    transition: border-color .2s
}

textarea.ascii-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(91, 79, 233, .1)
}

textarea.ascii-input::placeholder {
    color: var(--muted)
}

/* REFERENCE TABLE */
.ref-table {
    width: 100%;
    border-collapse: collapse
}

.ref-table th {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 10px 12px;
    text-align: left;
    border-bottom: 2px solid var(--border);
    background: var(--bg)
}

.ref-table td {
    padding: 9px 12px;
    font-size: 12.5px;
    color: var(--ink2);
    border-bottom: 1px solid var(--border);
    font-family: 'Fira Code', monospace
}

.ref-table tr:last-child td {
    border-bottom: none
}

.ref-table tr:hover td {
    background: var(--bg)
}

.ref-table td:first-child {
    font-weight: 700;
    color: var(--primary)
}

/* SEC HEADER */
.sec-hd {
    font-size: .95rem;
    font-weight: 800;
    color: var(--ink);
    margin: 1.5rem 0 .9rem;
    display: flex;
    align-items: center;
    gap: 8px
}

.sec-hd::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border)
}

/* COPY BTN */
.copy-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    padding: 3px 9px;
    cursor: pointer;
    transition: all .15s
}

.copy-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light)
}

.copy-btn.done {
    border-color: #48C9B0;
    color: #48C9B0;
    background: rgba(72, 201, 176, .08)
}

/* FAQ */
.faq-box {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    overflow: hidden
}

.faq-item {
    border-bottom: 1px solid var(--border)
}

.faq-item:last-child {
    border-bottom: none
}

.faq-q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 18px;
    font-size: .875rem;
    font-weight: 700;
    color: var(--ink);
    cursor: pointer;
    transition: background .12s
}

.faq-q:hover {
    background: var(--bg)
}

.faq-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .2s
}

.faq-icon svg {
    width: 11px;
    height: 11px;
    color: var(--muted);
    transition: transform .2s
}

.faq-item.open .faq-q {
    color: var(--primary)
}

.faq-item.open .faq-icon {
    background: var(--primary-light);
    border-color: var(--primary)
}

.faq-item.open .faq-icon svg {
    color: var(--primary);
    transform: rotate(180deg)
}

.faq-a {
    font-size: .855rem;
    color: var(--ink2);
    line-height: 1.85;
    padding: 0 18px;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease, padding .3s ease
}

.faq-item.open .faq-a {
    max-height: 250px;
    padding: 0 18px 14px
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--ink);
    color: var(--white);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .2);
    transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
    z-index: 999
}

.toast-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2EC99A
}

.toast.show {
    transform: translateX(-50%) translateY(0)
}

@media(max-width:600px) {
    .results-grid {
        grid-template-columns: 1fr
    }

    .ascii-grid {
        grid-template-columns: 1fr
    }
}