:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fbfe;
    --surface-accent: #eef4fb;
    --surface-xml: #eef4ff;
    --surface-manual: #eef6f8;
    --text: #17304a;
    --text-soft: #60758b;
    --primary: #0d4fa7;
    --primary-deep: #0a3b7d;
    --manual: #3b6d7a;
    --manual-deep: #214b57;
    --accent: #f0b647;
    --success: #1f7a59;
    --danger: #b24638;
    --border: rgba(23, 48, 74, 0.12);
    --shadow-sm: 0 8px 24px rgba(17, 40, 66, 0.06);
    --shadow-md: 0 18px 44px rgba(17, 40, 66, 0.08);
    --radius-sm: 14px;
    --radius-md: 22px;
    --radius-lg: 30px;
    --font-heading: "Barlow", sans-serif;
    --font-body: "Source Sans 3", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    min-width: 0;
}

body {
    margin: 0;
    min-height: 100vh;
    min-width: 0;
    overflow-x: hidden;
    background:
        linear-gradient(180deg, #f7f9fc 0, #f1f6fb 320px, var(--bg) 100%),
        var(--bg);
    color: var(--text);
    font-family: var(--font-body);
}

body.modal-open {
    overflow: hidden;
}

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.page-shell {
    width: min(1140px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 36px;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 12px;
    z-index: 12;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
}

.brand-logo {
    height: 58px;
    width: auto;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-tag,
.eyebrow,
.section-kicker,
.field-label,
.footer-label,
.summary-card span,
.entity-card dt,
.product-meta span,
.entry-option-tag,
.entry-panel-badge {
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.brand-tag {
    font-size: 0.71rem;
    color: var(--text-soft);
}

.brand-copy strong {
    font-family: var(--font-heading);
    font-size: 1.02rem;
    font-weight: 700;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link,
.header-cta,
.footer-link {
    text-decoration: none;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nav-link {
    padding: 10px 14px;
    color: var(--text-soft);
    font-weight: 700;
}

.nav-link:hover,
.nav-link:focus-visible {
    background: var(--surface-accent);
    color: var(--text);
    outline: none;
}

.nav-link.active,
.header-cta.active {
    background: linear-gradient(180deg, var(--primary), var(--primary-deep));
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(13, 79, 167, 0.18);
    border-color: transparent;
}

.header-cta {
    padding: 10px 16px;
    background: var(--surface-accent);
    color: var(--primary-deep);
    border: 1px solid rgba(13, 79, 167, 0.14);
    font-weight: 700;
}

.header-cta:hover,
.header-cta:focus-visible {
    background: rgba(13, 79, 167, 0.12);
    color: var(--primary-deep);
    border-color: rgba(13, 79, 167, 0.24);
    outline: none;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 24px;
    align-items: stretch;
    padding: 34px 0 18px;
}

.hero-copy,
.hero-summary,
.guide-card,
.entry-option,
.entry-panel,
.site-footer,
.entry-empty {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.hero-copy,
.hero-summary {
    padding: 34px;
    border-radius: var(--radius-lg);
}

.eyebrow,
.section-kicker,
.footer-label,
.entry-option-tag,
.entry-panel-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.eyebrow {
    background: var(--surface-accent);
    color: var(--primary-deep);
}

.section-kicker {
    background: rgba(13, 79, 167, 0.08);
    color: var(--primary);
}

.hero-title,
.section-title,
.modal-title,
.hero-summary-title,
.entry-panel-title {
    margin: 0;
    font-family: var(--font-heading);
    letter-spacing: -0.03em;
    line-height: 1;
}

.hero-title {
    margin-top: 18px;
    font-size: clamp(2.7rem, 4.8vw, 4.3rem);
    max-width: 12ch;
}

.hero-text,
.section-text,
.modal-text,
.guide-card p,
.site-footer p,
.step-list span,
.entry-empty,
.entry-option p,
.entry-option-list li,
.entry-panel-text,
.panel-callout span {
    line-height: 1.6;
}

.hero-text {
    max-width: 58ch;
    margin: 18px 0 0;
    color: var(--text-soft);
    font-size: 1.08rem;
}

.hero-actions,
.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-actions {
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-1px);
    outline: none;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(13, 79, 167, 0.18);
}

.btn-secondary,
.btn-ghost {
    background: #ffffff;
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary {
    background: var(--surface-accent);
    color: var(--primary-deep);
    border-color: rgba(13, 79, 167, 0.12);
}

.btn-secondary-alt {
    background: var(--manual);
    color: #ffffff;
    border-color: var(--manual);
    box-shadow: 0 10px 24px rgba(59, 109, 122, 0.18);
}

.btn-secondary-alt:hover,
.btn-secondary:hover,
.btn-ghost:hover {
    background: var(--surface-accent);
}

.btn-secondary-alt:hover,
.btn-secondary-alt:focus-visible {
    background: var(--manual-deep);
    border-color: var(--manual-deep);
}

.hero-summary {
    background: linear-gradient(180deg, #ffffff, #f9fbfe);
}

.hero-summary-title {
    margin-top: 16px;
    font-size: 2rem;
}

.step-list {
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
    display: grid;
    gap: 18px;
}

.step-list li {
    display: grid;
    gap: 6px;
    padding: 0 0 18px;
    border-bottom: 1px solid var(--border);
}

.step-list li:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.step-list strong {
    font-family: var(--font-heading);
    font-size: 1.12rem;
}

.step-list span {
    color: var(--text-soft);
}

.guide-section {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 10px 0 8px;
}

.guide-card {
    padding: 24px;
    border-radius: 24px;
}

.guide-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--surface-accent);
    color: var(--primary);
    font-family: var(--font-heading);
    font-weight: 700;
}

.guide-card h3 {
    margin: 16px 0 8px;
    font-family: var(--font-heading);
    font-size: 1.3rem;
}

.guide-card p {
    margin: 0;
    color: var(--text-soft);
}

.request-section {
    padding-top: 48px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.section-title {
    margin-top: 14px;
    font-size: clamp(2.1rem, 4vw, 3.2rem);
    max-width: 14ch;
}

.section-text {
    max-width: 52ch;
    margin: 0;
    color: var(--text-soft);
}

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

.entry-option {
    width: 100%;
    padding: 24px;
    border-radius: 24px;
    text-align: left;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.entry-option:hover,
.entry-option:focus-visible {
    transform: translateY(-2px);
    outline: none;
}

.entry-option.is-active {
    box-shadow: 0 20px 42px rgba(17, 40, 66, 0.12);
}

.entry-option-xml {
    background: linear-gradient(180deg, #f8fbff, var(--surface-xml));
}

.entry-option-xml.is-active {
    border-color: rgba(13, 79, 167, 0.28);
}

.entry-option-manual {
    background: linear-gradient(180deg, #fffefb, var(--surface-manual));
}

.entry-option-manual.is-active {
    border-color: rgba(59, 109, 122, 0.3);
}

.entry-option-tag {
    background: rgba(255, 255, 255, 0.74);
    color: var(--text-soft);
}

.entry-option-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
}

.entry-option-head strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.6rem;
    line-height: 1;
}

.entry-option-head p {
    margin: 10px 0 0;
    color: var(--text-soft);
}

.entry-option-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    flex: 0 0 auto;
}

.entry-option-xml .entry-option-icon {
    background: rgba(13, 79, 167, 0.1);
    color: var(--primary);
}

.entry-option-manual .entry-option-icon {
    background: rgba(59, 109, 122, 0.14);
    color: var(--manual-deep);
}

.entry-option-icon svg {
    width: 26px;
    height: 26px;
}

.entry-option-list {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.entry-option-list li {
    position: relative;
    padding-left: 18px;
    color: var(--text-soft);
}

.entry-option-list li::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.entry-option-xml .entry-option-list li::before {
    background: var(--primary);
}

.entry-option-manual .entry-option-list li::before {
    background: var(--manual);
}

.entry-option-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    color: var(--text-soft);
    font-weight: 700;
}

.entry-option-action::before {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(23, 48, 74, 0.08);
    color: currentColor;
    font-size: 1rem;
    line-height: 1;
}

.entry-option.is-active .entry-option-action::before {
    content: "−";
}

.entry-option-manual .entry-option-action {
    color: var(--manual-deep);
}

.entry-empty {
    margin-top: 18px;
    padding: 18px 20px;
    border-radius: 20px;
    color: var(--text-soft);
    text-align: center;
}

.entry-panels {
    margin-top: 18px;
}

.entry-panel {
    padding: 28px;
    border-radius: 26px;
}

.entry-panel-xml {
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.entry-panel-manual {
    background: linear-gradient(180deg, #ffffff, #fffaf0);
}

.entry-panel-header {
    margin-bottom: 20px;
}

.entry-panel-badge {
    background: rgba(13, 79, 167, 0.08);
    color: var(--primary);
}

.entry-panel-badge-manual {
    background: rgba(59, 109, 122, 0.14);
    color: var(--manual-deep);
}

.entry-panel-title {
    margin-top: 14px;
    font-size: clamp(2rem, 4vw, 2.8rem);
}

.entry-panel-text {
    margin: 12px 0 0;
    color: var(--text-soft);
    max-width: 62ch;
}

.panel-callout {
    display: grid;
    gap: 6px;
    margin-bottom: 18px;
    padding: 16px 18px;
    border-radius: 18px;
}

.panel-callout strong {
    font-family: var(--font-heading);
    font-size: 1rem;
}

.panel-callout-xml {
    background: var(--surface-xml);
    border: 1px solid rgba(13, 79, 167, 0.1);
    color: var(--primary-deep);
}

.panel-callout-manual {
    background: var(--surface-manual);
    border: 1px solid rgba(59, 109, 122, 0.14);
    color: var(--manual-deep);
}

.request-form,
.manual-form {
    display: grid;
    gap: 18px;
}

.manual-form {
    padding: 24px;
    border: 1px solid rgba(59, 109, 122, 0.14);
    border-radius: 26px;
    background: linear-gradient(180deg, #ffffff, #f8fcfd);
    box-shadow: var(--shadow-sm);
}

.manual-flow-intro {
    display: grid;
    gap: 10px;
    padding-bottom: 6px;
}

.manual-flow-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(59, 109, 122, 0.1);
    color: var(--manual-deep);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.manual-flow-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    line-height: 1.05;
}

.manual-flow-text {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.6;
    max-width: 70ch;
}

.manual-inline-heading {
    display: grid;
    gap: 8px;
}

.manual-section {
    display: grid;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid rgba(59, 109, 122, 0.14);
}

.manual-summary-section {
    background: transparent;
}

.manual-form > .field-grid {
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
}

.manual-section-heading {
    display: grid;
    gap: 8px;
}

.manual-section-heading-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

.manual-section-kicker,
.manual-item-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(59, 109, 122, 0.1);
    color: var(--manual-deep);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.manual-section-title,
.manual-item-title {
    margin: 0;
    font-family: var(--font-heading);
    line-height: 1.05;
}

.manual-section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.manual-section-text,
.manual-item-text,
.manual-items-empty {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.6;
}

.btn-add-item {
    white-space: nowrap;
}

.manual-items-empty {
    padding: 18px 20px;
    border: 1px dashed rgba(59, 109, 122, 0.26);
    border-radius: 18px;
    background: rgba(59, 109, 122, 0.05);
}

.manual-items-list {
    display: grid;
    gap: 16px;
}

.manual-freight-result[hidden] {
    display: none;
}

.manual-freight-result {
    display: grid;
    gap: 16px;
    padding: 20px;
    border: 1px solid rgba(13, 79, 167, 0.14);
    border-radius: 20px;
    background: linear-gradient(180deg, #f8fbff, #eef4fb);
}

.manual-freight-header {
    display: grid;
    gap: 8px;
}

.manual-freight-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(13, 79, 167, 0.08);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.manual-freight-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    line-height: 1.05;
}

.manual-freight-text {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.6;
}

.manual-freight-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.manual-freight-card,
.manual-freight-total {
    padding: 16px 18px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(13, 79, 167, 0.08);
}

.manual-freight-card span,
.manual-freight-total span {
    display: block;
    margin-bottom: 8px;
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.manual-freight-card strong,
.manual-freight-total strong {
    display: block;
    font-family: var(--font-heading);
    color: var(--primary-deep);
}

.manual-freight-card strong {
    font-size: 1.16rem;
}

.manual-freight-total {
    background: linear-gradient(180deg, #0d4fa7, #0a3b7d);
    border-color: rgba(13, 79, 167, 0.2);
}

.manual-freight-total span,
.manual-freight-total strong {
    color: #ffffff;
}

.manual-item-card {
    display: grid;
    gap: 18px;
    padding: 20px;
    border: 1px solid rgba(59, 109, 122, 0.18);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: none;
}

.manual-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.manual-item-title {
    margin-top: 10px;
    font-size: 1.35rem;
}

.manual-item-text {
    margin-top: 10px;
}

.manual-item-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid rgba(59, 109, 122, 0.18);
    border-radius: 999px;
    background: #ffffff;
    color: var(--manual-deep);
    font-weight: 700;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.manual-item-remove:hover,
.manual-item-remove:focus-visible {
    background: rgba(59, 109, 122, 0.08);
    border-color: rgba(59, 109, 122, 0.32);
    outline: none;
}

.manual-item-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.manual-item-grid .form-field:first-child {
    grid-column: 1 / -1;
}

.manual-legacy-hidden {
    display: none;
}

.form-note {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(13, 79, 167, 0.1);
    background: var(--surface-accent);
    color: var(--primary-deep);
    line-height: 1.5;
}

.upload-field,
.form-field {
    display: grid;
    gap: 10px;
}

.field-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-soft);
}

.upload-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 18px;
    border: 1.5px dashed rgba(13, 79, 167, 0.28);
    background: #f7fbff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.upload-box:hover,
.upload-box:focus-visible {
    background: #f2f7fd;
    border-color: var(--primary);
    outline: none;
}

.upload-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.upload-title {
    font-family: var(--font-heading);
    font-size: 1.16rem;
    font-weight: 700;
    color: var(--primary-deep);
}

.upload-subtitle,
.helper-text,
.file-name {
    color: var(--text-soft);
}

.upload-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 152px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 700;
    text-align: center;
}

.upload-meta {
    display: grid;
    gap: 4px;
}

.file-name {
    font-weight: 600;
}

.inline-preview {
    padding: 14px 16px;
    border-radius: 16px;
    line-height: 1.5;
}

.preview-success {
    border: 1px solid rgba(31, 122, 89, 0.16);
    background: #edf8f2;
    color: var(--success);
}

.preview-error {
    border: 1px solid rgba(178, 70, 56, 0.16);
    background: #fff3f1;
    color: var(--danger);
}

.preview-loading {
    border: 1px solid rgba(13, 79, 167, 0.14);
    background: #eef5ff;
    color: var(--primary-deep);
}

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

.form-field-full {
    grid-column: 1 / -1;
}

.input-shell,
.textarea-shell {
    position: relative;
}

.input-shell svg,
.textarea-shell svg {
    position: absolute;
    left: 16px;
    color: var(--primary);
}

.input-shell svg {
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
}

.textarea-shell svg {
    top: 16px;
    width: 20px;
    height: 20px;
}

.input-shell input,
.input-shell select,
.textarea-shell textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #ffffff;
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-shell input {
    min-height: 54px;
    padding: 0 16px 0 50px;
}

.input-shell select {
    min-height: 54px;
    padding: 0 44px 0 50px;
    appearance: none;
}

.textarea-shell textarea {
    min-height: 120px;
    resize: vertical;
    padding: 16px 16px 16px 50px;
}

.input-shell input:focus,
.input-shell select:focus,
.textarea-shell textarea:focus {
    border-color: rgba(13, 79, 167, 0.35);
    box-shadow: 0 0 0 4px rgba(13, 79, 167, 0.08);
    outline: none;
}

.input-shell-select::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 18px;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--text-soft);
    border-bottom: 2px solid var(--text-soft);
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

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

.choice-card {
    display: grid;
    gap: 10px;
    min-height: 118px;
    padding: 20px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.choice-card input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--primary);
}

.choice-card.selected {
    background: #eef5ff;
    border-color: rgba(13, 79, 167, 0.3);
    box-shadow: 0 10px 24px rgba(13, 79, 167, 0.08);
}

.choice-title {
    font-family: var(--font-heading);
    font-size: 1.14rem;
    color: var(--primary-deep);
}

.choice-text {
    color: var(--text-soft);
    line-height: 1.5;
}

.modal[hidden],
.status-toast[hidden] {
    display: none;
}

.modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(12, 26, 44, 0.48);
    backdrop-filter: blur(6px);
    z-index: 40;
}

.modal-panel {
    width: min(960px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 28px;
    border-radius: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 24px 60px rgba(17, 40, 66, 0.18);
    position: relative;
}

.modal-panel-wide {
    width: min(1080px, 100%);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--surface-accent);
    color: var(--primary-deep);
    font-size: 1.5rem;
}

.xml-report {
    display: grid;
    gap: 20px;
}

.xml-header h3 {
    margin: 12px 0 0;
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1;
}

.xml-header p {
    margin: 12px 0 0;
    color: var(--text-soft);
    line-height: 1.6;
    max-width: 58ch;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.summary-card {
    padding: 18px;
    border-radius: 18px;
    background: var(--surface-soft);
    border: 1px solid rgba(13, 79, 167, 0.08);
}

.summary-card span,
.entity-card dt,
.product-meta span {
    display: block;
    margin-bottom: 8px;
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 700;
}

.summary-card strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary-deep);
}

.entity-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
}

.entity-card {
    padding: 22px;
    border-radius: 22px;
    background: var(--surface-soft);
    border: 1px solid rgba(13, 79, 167, 0.08);
}

.entity-card h4 {
    margin: 12px 0;
    font-family: var(--font-heading);
    font-size: 1.45rem;
}

.entity-card dl {
    margin: 0;
    display: grid;
    gap: 10px;
}

.entity-card div {
    display: grid;
    gap: 2px;
}

.entity-card dd {
    margin: 0;
    line-height: 1.5;
}

.route-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: var(--surface-accent);
    color: var(--primary);
}

.route-chip svg {
    width: 34px;
    height: 34px;
}

.products-section {
    display: grid;
    gap: 14px;
}

.products-section h4 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.35rem;
}

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

.product-card {
    padding: 18px;
    border-radius: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
}

.product-card h5 {
    margin: 0 0 14px;
    font-family: var(--font-heading);
    font-size: 1.16rem;
}

.product-card p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.6;
}

.product-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.product-meta div {
    padding: 12px;
    border-radius: 14px;
    background: var(--surface-soft);
}

.product-meta strong {
    display: block;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 28px;
    padding: 22px 26px;
    border-radius: 24px;
}

.footer-label {
    background: var(--surface-accent);
    color: var(--primary);
}

.site-footer p {
    margin: 10px 0 0;
    max-width: 54ch;
    color: var(--text-soft);
}

.footer-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--surface-accent);
    color: var(--primary-deep);
}

.footer-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.footer-link-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.9;
}

.footer-link-social {
    min-width: 132px;
}

.footer-link-text {
    line-height: 1;
}

.site-footer-rich {
    align-items: flex-start;
    padding: 26px 28px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.site-footer-brand {
    display: grid;
    gap: 8px;
}

.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.site-footer-rich .footer-link {
    border: 1px solid rgba(13, 79, 167, 0.14);
    font-weight: 700;
}

.site-footer-rich .footer-link:hover,
.site-footer-rich .footer-link:focus-visible {
    background: rgba(13, 79, 167, 0.12);
    border-color: rgba(13, 79, 167, 0.24);
    outline: none;
}

.status-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    max-width: min(420px, calc(100% - 28px));
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(23, 48, 74, 0.96);
    color: #ffffff;
    box-shadow: 0 16px 34px rgba(17, 40, 66, 0.18);
    z-index: 60;
}

.status-toast.status-toast-info {
    border-left: 4px solid var(--accent);
}

.status-toast.status-toast-error {
    border-left: 4px solid #ff8e80;
}

@media (max-width: 1040px) {
    .hero,
    .section-heading,
    .entity-grid {
        grid-template-columns: 1fr;
    }

    .guide-section,
    .entry-selector,
    .summary-grid,
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .route-chip {
        min-height: 64px;
    }
}

@media (max-width: 960px) {
    .entry-selector {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .page-shell {
        width: 100%;
        max-width: 100%;
        padding: 12px 14px 12px;
    }

    .site-header,
    .site-nav {
        flex-wrap: wrap;
    }

    .site-nav {
        width: 100%;
    }

    .section-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .guide-section,
    .entry-selector,
    .field-grid,
    .manual-item-grid,
    .manual-freight-grid,
    .choice-grid,
    .summary-grid,
    .products-grid,
    .product-meta {
        grid-template-columns: 1fr;
    }

    .hero-copy,
    .hero-summary,
    .guide-card,
    .entry-option,
    .entry-panel,
    .manual-form,
    .manual-item-card,
    .site-footer,
    .entry-empty {
        padding: 24px;
    }

    .manual-item-card {
        display: grid;
        gap: 16px;
    }

    .manual-item-card > div {
        min-width: 0;
        width: 100%;
    }

    .manual-item-card button[data-remove-manual-item] {
        margin-left: 0;
        align-self: stretch;
        width: 100%;
    }

    .manual-item-card .input-shell,
    .manual-item-card .form-field {
        width: 100%;
    }

    .entry-panel,
    .manual-form {
        width: 100%;
    }

    .page-shell {
        overflow-x: hidden;
    }

    .modal-panel {
        padding: 24px 18px;
    }
}

@media (max-width: 680px) {
    .site-header {
        position: static;
        border-radius: 18px;
        padding: 14px;
    }

    .brand {
        width: 100%;
        justify-content: space-between;
    }

    .brand-logo {
        height: 50px;
    }

    .hero {
        padding-top: 20px;
        gap: 16px;
    }

    .hero-copy,
    .hero-summary,
    .guide-card,
    .entry-option,
    .entry-panel,
    .manual-form,
    .manual-item-card,
    .site-footer,
    .entry-empty {
        padding: 20px;
        border-radius: 22px;
    }

    .hero-title {
        font-size: 2.3rem;
        max-width: none;
    }

    .hero-summary-title,
    .section-title,
    .entry-panel-title {
        font-size: 1.9rem;
        max-width: none;
    }

    .section-heading {
        align-items: start;
    }

    .entry-option-head {
        flex-direction: column;
        align-items: start;
    }

    .manual-section-heading-row,
    .manual-item-header {
        flex-direction: column;
        align-items: stretch;
    }

    .entry-option-icon {
        width: 50px;
        height: 50px;
    }

    .upload-box {
        flex-direction: column;
        align-items: start;
    }

    .upload-badge {
        width: 100%;
        min-width: 0;
    }

    .modal {
        padding: 10px;
    }

    .modal-panel {
        width: 100%;
        max-height: calc(100dvh - 20px);
        border-radius: 22px;
        padding: 22px 16px;
    }

    .modal-close {
        top: 12px;
        right: 12px;
    }
}

@media (max-width: 520px) {
    .brand-copy {
        display: none;
    }

    .nav-link,
    .header-cta,
    .footer-link,
    .btn,
    .btn-secondary-alt,
    .manual-item-remove {
        width: 100%;
    }

    .site-nav {
        display: grid;
        gap: 8px;
    }

    .hero-actions,
    .action-row,
    .site-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .site-footer-links {
        justify-content: stretch;
    }

    .request-section {
        padding-top: 36px;
    }

    .field-grid {
        gap: 14px;
    }

    .input-shell input {
        min-height: 52px;
    }

    .modal {
        padding: 6px;
    }

    .modal-panel {
        max-height: calc(100dvh - 12px);
        border-radius: 18px;
        padding: 20px 14px 16px;
    }

    .status-toast {
        right: 12px;
        left: 12px;
        bottom: 12px;
        max-width: none;
    }

    .page-shell {
        width: calc(100% - 12px);
    }
}
