:root {
    color-scheme: light;
    --ink: #102033;
    --muted: #64748b;
    --line: #d9e2ec;
    --paper: #ffffff;
    --soft: #f6f8fb;
    --teal: #0f766e;
    --blue: #2563eb;
    --amber: #f59e0b;
    --red: #dc2626;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--soft);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
.itx-topbar {
    align-items: center;
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 20px;
    justify-content: space-between;
    min-height: 68px;
    padding: 10px max(20px, calc((100vw - 1180px) / 2));
    position: sticky;
    top: 0;
    z-index: 10;
}
.itx-brand { align-items: center; display: flex; gap: 11px; }
.itx-logo {
    align-items: center;
    background: var(--teal);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-weight: 700;
    height: 40px;
    justify-content: center;
    width: 40px;
}
.itx-brand strong, .itx-brand small { display: block; }
.itx-brand small { color: var(--muted); font-size: 12px; margin-top: -2px; }
.itx-nav { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.itx-nav a, .itx-nav-primary {
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    padding: 9px 12px;
}
.itx-nav-primary { background: var(--ink); border-color: var(--ink); color: #fff !important; }
.itx-main {
    margin: 0 auto;
    max-width: 1180px;
    padding: 24px 20px 56px;
}
.itx-tool {
    align-items: stretch;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, .92fr) minmax(340px, 1.08fr);
}
.itx-copy, .itx-uploader, .itx-results {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
}
.itx-copy {
    min-height: 360px;
    padding: 34px;
}
.itx-kicker {
    color: var(--teal);
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 12px;
    text-transform: uppercase;
}
h1 {
    font-size: 44px;
    letter-spacing: 0;
    line-height: 1.08;
    margin: 0 0 16px;
}
.itx-lead { color: #334155; font-size: 18px; margin: 0; }
.itx-trust {
    display: grid;
    gap: 9px;
    margin-top: 28px;
}
.itx-trust span {
    border-left: 4px solid var(--amber);
    color: #334155;
    padding-left: 10px;
}
.itx-uploader { padding: 24px; }
.itx-uploader input[type=file] {
    height: 1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    width: 1px;
}
.itx-dropzone {
    align-items: center;
    background: #f8fbff;
    border: 2px dashed #9db2c8;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    min-height: 220px;
    overflow: hidden;
    padding: 22px;
    position: relative;
    text-align: center;
    transition: background-color .15s ease, border-color .15s ease;
}
.itx-dropzone::before {
    background: url("../img/itaxviewer-og.png") center / cover no-repeat;
    border-radius: 8px;
    content: "";
    inset: 14px;
    opacity: .08;
    position: absolute;
}
.itx-dropzone > * { position: relative; z-index: 1; }
.itx-dropzone.is-dragover { background: #edfdf8; border-color: var(--teal); }
.itx-drop-icon {
    align-items: center;
    background: var(--blue);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-weight: 700;
    height: 54px;
    justify-content: center;
    width: 54px;
}
.itx-dropzone strong { font-size: 20px; }
.itx-dropzone small, .itx-selected, .itx-progress p, .itx-section-head p, .itx-empty { color: var(--muted); }
.itx-selected { font-size: 14px; margin-top: 12px; word-break: break-word; }
.itx-submit, .itx-modal-box button[type=submit] {
    background: var(--teal);
    border: 0;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    margin-top: 16px;
    min-height: 46px;
    padding: 12px 18px;
    width: 100%;
}
.itx-submit:disabled { cursor: wait; opacity: .65; }
.itx-progress {
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-top: 14px;
    padding: 13px;
}
.itx-progress-row { align-items: center; display: flex; justify-content: space-between; }
.itx-bar { background: #e5edf5; border-radius: 999px; height: 11px; margin-top: 9px; overflow: hidden; }
.itx-bar span { background: var(--blue); display: block; height: 100%; width: 0; }
.itx-warning {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    color: #9a3412;
    padding: 10px 12px;
}
.itx-results { margin-top: 18px; padding: 24px; }
.itx-section-head { align-items: end; display: flex; gap: 18px; justify-content: space-between; }
.itx-section-head h2 { font-size: 24px; margin: 0; }
.itx-section-head p { margin: 0; text-align: right; }
.itx-list { display: grid; gap: 12px; margin-top: 18px; }
.itx-file {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 14px;
}
.itx-file-main { align-items: center; display: flex; gap: 13px; min-width: 0; }
.itx-file-icon {
    align-items: center;
    background: #eef2ff;
    border-radius: 8px;
    color: var(--blue);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    height: 42px;
    justify-content: center;
    width: 42px;
}
.itx-file h3 { font-size: 16px; line-height: 1.25; margin: 0 0 3px; overflow-wrap: anywhere; }
.itx-file p { margin: 0; overflow-wrap: anywhere; }
.itx-file-status { color: var(--teal); font-size: 13px; }
.itx-file[data-status=failed] .itx-file-status { color: var(--red); }
.itx-file-actions { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; max-width: 430px; }
.itx-action, .itx-ghost, .itx-danger {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    min-height: 36px;
    padding: 7px 10px;
}
.itx-action { background: var(--ink); border-color: var(--ink); color: #fff; }
.itx-danger { color: var(--red); }
.itx-empty { margin: 20px 0 0; }
.itx-modal {
    align-items: center;
    background: rgba(15, 23, 42, .48);
    bottom: 0;
    display: flex;
    justify-content: center;
    left: 0;
    padding: 18px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 50;
}
.itx-modal[hidden] { display: none; }
.itx-modal-box {
    background: #fff;
    border-radius: 8px;
    max-width: 460px;
    padding: 22px;
    position: relative;
    width: 100%;
}
.itx-modal-box h3 { margin: 0 0 14px; }
.itx-modal-box input, .itx-modal-box textarea {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: block;
    font: inherit;
    margin-top: 10px;
    padding: 10px 11px;
    width: 100%;
}
.itx-modal-close {
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 24px;
    position: absolute;
    right: 12px;
    top: 8px;
}
.itx-share-main { padding-top: 22px; }
.itx-share-head {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 14px;
    padding: 20px;
}
.itx-share-head h1 { font-size: 28px; margin: 0 0 6px; }
.itx-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.itx-pdf-frame {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    height: calc(100vh - 210px);
    min-height: 620px;
    width: 100%;
}
@media (max-width: 920px) {
    .itx-tool { grid-template-columns: 1fr; }
    h1 { font-size: 34px; }
    .itx-copy { min-height: auto; }
}
@media (max-width: 680px) {
    .itx-topbar { align-items: flex-start; flex-direction: column; }
    .itx-nav { justify-content: flex-start; }
    .itx-main { padding: 14px 12px 38px; }
    .itx-copy, .itx-uploader, .itx-results { padding: 18px; }
    h1 { font-size: 30px; }
    .itx-section-head { align-items: flex-start; flex-direction: column; }
    .itx-section-head p { text-align: left; }
    .itx-file { grid-template-columns: 1fr; }
    .itx-file-actions { justify-content: flex-start; max-width: none; }
    .itx-pdf-frame { min-height: 560px; }
}
