  :root {
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-200: #bfdbfe;
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-800: #1e40af;
    --blue-900: #1e3a8a;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-900: #0f172a;
    --white-100: #ffffff;
    --radius: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
    --shadow: 0 4px 16px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.05);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.06);
  }

 
  /* ── Main ── */
  main {
    max-width: 1200px;
    margin: 0 auto;
    /*padding: 2.5rem 1.5rem 5rem;*/
  }
 
  /* ── Hero ── */
  .hero {
    text-align: center;
    margin-bottom: 2.5rem;
  }
  .hero h1 {
    font-family: 'Fraunces', serif;
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--slate-900);
    line-height: 1.15;
    letter-spacing: -.03em;
    margin-bottom: .75rem;
  }
  .hero h1 em {
    font-style: italic;
    color: var(--blue-600);
  }
  .hero p {
    font-size: 1.05rem;
    color: var(--slate-500);
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.6;
  }
 
  /* ── Mode Tabs ── */
  .mode-tabs {
    display: flex;
    background: var(--slate-100);
    border-radius: var(--radius);
    padding: 4px;
    gap: 2px;
    margin-bottom: 1.5rem;
	border: 1px solid var(--slate-300);
  }
  .mode-tab {
    flex: 1;
    padding: .55rem 1rem;
    font-size: .9rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    border: none;
    background: transparent;
    border-radius: 7px;
    color: var(--slate-500);
    cursor: pointer;
    transition: all .18s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
  }
  .mode-tab svg { width: 15px; height: 15px; stroke: currentColor; fill: none; flex-shrink: 0; }
  .mode-tab.active {
    background: var(--white-100);
    color: var(--blue-700);
    box-shadow: var(--shadow-sm);
  }
  .mode-tab:hover:not(.active) { color: var(--slate-700); }
 
  /* ── Panels ── */
  .panel { display: none; }
  .panel.active { display: block; }
 
  /* ── URL Panel ── */
  .url-form {
    display: flex;
    gap: .75rem;
    align-items: stretch;
  }
  .url-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
  }
  .url-input-wrap svg {
    position: absolute;
    left: .85rem;
    width: 17px;
    height: 17px;
    stroke: var(--slate-400);
    fill: none;
    pointer-events: none;
  }
  .url-input {
    width: 100%;
    padding: .7rem 1rem .7rem 2.6rem;
    font-size: .95rem;
    font-family: 'DM Mono', monospace;
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius);
    background: var(--white-100);
    color: var(--slate-900);
    transition: border-color .15s, box-shadow .15s;
    outline: none;
  }
  .url-input::placeholder { color: var(--slate-400); font-family: 'DM Sans', sans-serif; }
  .url-input:focus { border-color: var(--blue-400); box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
 
  .notice-box {
    margin-top: .9rem;
    padding: .7rem 1rem;
    background: var(--blue-50);
    border: 1px solid var(--blue-200);
    border-radius: var(--radius);
    font-size: .83rem;
    color: var(--blue-700);
    display: flex;
    gap: .5rem;
    align-items: flex-start;
    line-height: 1.5;
  }
  .notice-box svg { width: 16px; height: 16px; stroke: var(--blue-500); fill: none; flex-shrink: 0; margin-top: .1rem; }
 
  /* ── Code Panels ── */
  .code-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
  }
  @media (max-width: 640px) { .code-grid { grid-template-columns: 1fr; } }
  .code-block { display: flex; flex-direction: column; gap: .4rem; }
  .code-label {
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--slate-600);
    display: flex;
    align-items: center;
    gap: .35rem;
  }
  .code-label .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
  }
  .dot-html { background: #f97316; }
  .dot-css  { background: var(--blue-500); }
  .dot-js   { background: #eab308; }
  .code-textarea {
    width: 100%;
    min-height: 160px;
    padding: .8rem 1rem;
    font-size: .82rem;
    font-family: 'DM Mono', monospace;
    line-height: 1.55;
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius);
    background: var(--slate-50);
    color: var(--slate-700);
    resize: vertical;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
  }
  .code-textarea:focus { border-color: var(--blue-400); box-shadow: 0 0 0 3px rgba(59,130,246,.12); background: var(--white-100); }
 
  .css-full { grid-column: 1 / -1; }
 
  /* ── Scan Button ── */
  .btn-scan {
    width: 100%;
    margin-top: .5rem;
    padding: .85rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    background: var(--blue-600);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background .15s, transform .1s, box-shadow .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    box-shadow: 0 2px 8px rgba(37,99,235,.25);
  }
  .btn-scan svg { width: 18px; height: 18px; stroke: white; fill: none; }
  .btn-scan:hover { background: var(--blue-700); box-shadow: 0 4px 16px rgba(37,99,235,.35); }
  .btn-scan:active { transform: scale(.99); }
  .btn-scan:disabled { background: var(--slate-300); color: var(--slate-500); cursor: not-allowed; box-shadow: none; }
 
  /* ── Loading ── */
  #loading {
    display: none;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--slate-500);
  }
  .spinner {
    width: 38px; height: 38px;
    border: 3px solid var(--blue-100);
    border-top-color: var(--blue-500);
    border-radius: 50%;
    animation: spin .7s linear infinite;
    margin: 0 auto 1rem;
  }
  @keyframes spin { to { transform: rotate(360deg); } }
 
  /* ── Error ── */
  #error-box {
    display: none;
    margin-top: 1.5rem;
    padding: .9rem 1.1rem;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: var(--radius);
    color: #be123c;
    font-size: .9rem;
    display: none;
    align-items: flex-start;
    gap: .5rem;
  }
  #error-box svg { width: 17px; height: 17px; stroke: #e11d48; fill: none; flex-shrink: 0; margin-top: .1rem; }
 
  /* ── Results ── */
  #results {
    display: none;
    margin-top: 2.5rem;
    animation: fadeUp .35s ease;
	scroll-margin-top: 100px;
  }
  @keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
 
  .results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: .75rem;
  }
  .results-title {
    font-family: 'Fraunces', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--slate-900);
    letter-spacing: -.02em;
  }
  .results-stats {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
  }
  .stat-pill {
    font-size: .8rem;
    font-weight: 600;
    padding: .28rem .75rem;
    border-radius: 99px;
  }
  .stat-total { background: var(--blue-50); color: var(--blue-700); border: 1px solid var(--blue-200); }
  .stat-unused { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
  .stat-clean { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
  .stat-libs { background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe; cursor: default; }
 
  /* ── Size Savings Card ── */
  .size-card {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--slate-200);
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
  }
  .size-cell {
    background: var(--white-100);
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .3rem;
  }
  .size-cell-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--slate-500);
  }
  .size-cell-value {
    font-family: serif;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -.03em;
    color: var(--slate-900);
    line-height: 1;
  }
  .size-cell-sub {
    font-size: .75rem;
    color: var(--slate-500);
    margin-top: .1rem;
  }
  .size-cell.saving .size-cell-value { color: var(--blue-600); }
  .size-cell.saving { background: var(--blue-50); }
  .saving-bar-wrap {
    grid-column: 1 / -1;
    background: var(--white-100);
    padding: .6rem 1.25rem .85rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
  }
  .saving-bar-label {
    font-size: .72rem;
    font-weight: 600;
    color: var(--slate-500);
    display: flex;
    justify-content: space-between;
  }
  .saving-bar-track {
    height: 8px;
    background: var(--slate-100);
    border-radius: 99px;
    overflow: hidden;
  }
  .saving-bar-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--blue-500), var(--blue-400));
    transition: width .6s cubic-bezier(.4,0,.2,1);
  }
  @media (max-width: 480px) {
    .size-card { grid-template-columns: 1fr 1fr; }
  }
  
  /* ── Per-file size breakdown ── */
  #size-breakdown {
    margin-bottom: 1.5rem;
  }
  .breakdown-title {
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--slate-500);
    margin-bottom: .5rem;
  }
  .breakdown-table {
    border: 1px solid var(--slate-200);
    border-radius: var(--radius);
    overflow: hidden;
    font-size: .82rem;
  }
  .breakdown-head,
  .breakdown-row {
    display: grid;
    grid-template-columns: 1fr 7rem 7rem 9rem;
    gap: 0;
  }
  .breakdown-head {
    background: var(--slate-50);
    border-bottom: 1.5px solid var(--slate-200);
  }
  .breakdown-head span {
    padding: .45rem .9rem;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--slate-400);
  }
  .breakdown-row {
    background: var(--white);
    border-bottom: 1px solid var(--slate-100);
    transition: background .12s;
  }
  .breakdown-row:last-child { border-bottom: none; }
  .breakdown-row:hover { background: var(--slate-50); }
  .breakdown-row span {
    padding: .55rem .9rem;
    color: var(--slate-700);
    display: flex;
    align-items: center;
    min-width: 0;
  }
  .breakdown-file {
    font-family: monospace;
    font-size: .77rem !important;
    color: var(--slate-600) !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .breakdown-head span,
  .breakdown-row span { text-align: left; }
  .breakdown-head span:nth-child(n+2),
  .breakdown-row span:nth-child(n+2) { text-align: right; justify-content: flex-end; font-variant-numeric: tabular-nums; }
  .breakdown-saved { color: var(--slate-400) !important; }
  .breakdown-saved.has-savings { color: var(--blue-600) !important; font-weight: 600; }
  .breakdown-saved em { font-style: normal; color: var(--slate-400); font-weight: 400; margin-left: .3rem; font-size: .75rem; }
  @media (max-width: 540px) {
    .breakdown-head span:nth-child(3),
    .breakdown-row span:nth-child(3) { display: none; }
    .breakdown-head,
    .breakdown-row { grid-template-columns: 1fr 7rem 9rem; }
  }
 
  /* ── Warning Banner ── */
  .warning-banner {
    background: #fffbeb;
    border: 1.5px solid #fde68a;
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: .7rem;
    align-items: flex-start;
  }
  .warning-banner svg { width: 19px; height: 19px; stroke: #d97706; fill: none; flex-shrink: 0; margin-top: .05rem; }
  .warning-banner-text { font-size: .88rem; line-height: 1.6; color: #92400e; }
  .warning-banner-text strong { font-weight: 600; color: #78350f; display: block; margin-bottom: .2rem; }
 
  /* ── Unused List ── */
  .section-title {
    font-size: .95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--slate-600);
    margin-bottom: .75rem;
    padding-bottom: .4rem;
    border-bottom: 1px solid var(--slate-100);
  }
 
  .unused-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
    margin-bottom: 2rem;
	max-height: 500px;
	overflow-y: auto;
  }
  .unused-item {
    background: var(--white);
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius);
    padding: .7rem 1rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    transition: border-color .15s;
  }
  .unused-item:hover { border-color: var(--blue-300); }
  .unused-item-left { display: flex; flex-direction: column; gap: .25rem; flex: 1; min-width: 0; }
  .unused-selector {
    font-family: 'DM Mono', monospace;
    font-size: .88rem;
    color: var(--slate-700);
    font-weight: 500;
    word-break: break-all;
  }
  .unused-meta {
    font-size: .75rem;
    color: var(--slate-500);
  }
  .unused-tag {
    font-size: .72rem;
    font-weight: 600;
    padding: .18rem .5rem;
    border-radius: 99px;
    flex-shrink: 0;
    align-self: flex-start;
  }
  .tag-unused { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; }
  .tag-skipped { background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe; }
 
  .empty-unused {
    text-align: center;
    padding: 2rem;
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    border-radius: var(--radius);
    color: #15803d;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    font-size: .95rem;
    margin-bottom: 2rem;
  }
  .empty-unused svg { width: 20px; height: 20px; stroke: #16a34a; fill: none; }
 
  /* ── Cleaned CSS ── */
  .cleaned-section {
    margin-top: .25rem;
  }
  .cleaned-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .75rem;
    padding-bottom: .4rem;
    border-bottom: 1px solid var(--slate-100);
  }
  .btn-copy {
    font-size: .8rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    padding: .35rem .85rem;
    background: var(--white-100);
    color: var(--blue-600);
    border: 1.5px solid var(--blue-300);
    border-radius: 7px;
    cursor: pointer;
    transition: background .15s, color .15s;
    display: flex;
    align-items: center;
    gap: .35rem;
  }
  .btn-copy svg { width: 14px; height: 14px; stroke: currentColor; fill: none; }
  .btn-copy:hover { background: var(--blue-600); color: white; border-color: var(--blue-600); }
  .btn-copy.copied { background: #16a34a; color: white; border-color: #16a34a; }
 
  .code-output {
    background: var(--slate-900);
    color: #e2e8f0;
    font-family: monospace;
    font-size: .82rem;
    /*line-height: 1.7;*/
    padding: 1.25rem 1.4rem;
    border-radius: var(--radius);
    overflow-x: auto;
    white-space: pre-wrap !important;
    word-break: break-all;
    max-height: 420px;
    overflow-y: auto;
    tab-size: 2;
  }
  .code-output::-webkit-scrollbar { width: 6px; height: 6px; }
  .code-output::-webkit-scrollbar-track { background: transparent; }
  .code-output::-webkit-scrollbar-thumb { background: var(--slate-600); border-radius: 3px; }
 
  /* ── Divider ── */
  .divider { height: 1.5px; background: var(--slate-100); margin: 2rem 0; }
 
  /* ── Paste mode toggle ── */
  .paste-toggle-wrap {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
  }
  .paste-toggle {
    display: inline-flex;
    background: var(--slate-100);
    border-radius: var(--radius);
    padding: 3px;
    gap: 2px;
	border: 1px solid var(--slate-300);
  }
  .paste-toggle-btn {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .85rem;
    font-size: .82rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    border: none;
    background: transparent;
    border-radius: 7px;
    color: var(--slate-500);
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
  }
  .paste-toggle-btn svg { width: 13px; height: 13px; stroke: currentColor; flex-shrink: 0; }
  .paste-toggle-btn.active {
    background: var(--white-100);
    color: var(--blue-700);
    box-shadow: var(--shadow-sm);
  }
  .paste-toggle-btn:hover:not(.active) { color: var(--slate-700); }
 
  .btn-sample {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .4rem .85rem;
    font-size: .82rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    border: 1.5px solid var(--blue-200);
    background: var(--white-100);
    color: var(--blue-600);
    border-radius: 7px;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
  }
  .btn-sample svg { width: 12px; height: 12px; stroke: currentColor; flex-shrink: 0; }
  .btn-sample:hover { background: var(--blue-600); color: white; border-color: var(--blue-600); }
  .btn-sample.loaded { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
 
  /* ── Per-file output tabs ── */
  .file-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .65rem;
  }
  .file-tab {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .75rem;
    font-size: .78rem;
    font-weight: 600;
    font-family: 'DM Mono', monospace;
    background: var(--slate-100);
    color: var(--slate-500);
    border: 1.5px solid var(--slate-200);
    border-radius: 6px;
    cursor: pointer;
    transition: all .15s;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .file-tab:hover { color: var(--slate-700); background: var(--slate-200); }
  .file-tab.active { background: var(--slate-700); color: #e2e8f0; border-color: var(--slate-700); }
  .file-panel { display: none; }
  .file-panel.active { display: block; }
 
  /* ── Responsive ── */
  @media (max-width: 650px) {
    .url-form { flex-direction: column; }
    .results-header { flex-direction: column; align-items: flex-start; }
    .unused-list { grid-template-columns: 1fr; }
  }
 
  /* ── About Section ── */
  .about-section {
    background: var(--white-100);
    padding: 1rem 0;
  }
  .about-inner {
    max-width: 1200px;
    margin: 0 auto;
  }
  .about-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
  }
  .about-eyebrow {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--blue-600);
    background: var(--blue-50);
    border: 1px solid var(--blue-200);
    padding: .25rem .7rem;
    border-radius: 99px;
    margin-bottom: 1rem;
  }
  .about-heading {
    font-family: 'Fraunces', serif;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--slate-900);
    letter-spacing: -.03em;
    line-height: 1.2;
    margin-bottom: .9rem;
  }
  .about-heading em { font-style: italic; color: var(--blue-600); }
 
  .about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
    margin-bottom: 3rem;
  }
  @media (max-width: 700px) { .about-grid { grid-template-columns: 1fr; } }
 
  .about-block {
    background: var(--slate-50);
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
  }
  .about-block h3 {
    font-family: serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--slate-900);
    letter-spacing: -.02em;
    margin-bottom: .8rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid var(--slate-200);
  }
  .about-block p {
    font-size: .88rem;
    line-height: 1.75;
    color: var(--slate-600);
    margin-bottom: .75rem;
  }
  .about-block p:last-child { margin-bottom: 0; }
  .about-block code {
    font-family: 'DM Mono', monospace;
    font-size: .8rem;
    background: var(--slate-200);
    color: var(--slate-700);
    padding: .1rem .35rem;
    border-radius: 4px;
  }
  .about-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .55rem;
    margin-bottom: .75rem;
  }
  .about-list li {
    font-size: .86rem;
    color: var(--slate-600);
    line-height: 1.6;
    padding-left: 1.1rem;
    position: relative;
  }
  .about-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--blue-400);
    font-size: .8rem;
  }
  .about-list li strong { color: var(--slate-700); font-weight: 600; }
  .about-list li code {
    font-family: 'DM Mono', monospace;
    font-size: .78rem;
    background: var(--slate-200);
    color: var(--slate-700);
    padding: .08rem .3rem;
    border-radius: 4px;
  }
