:root {
    --teal: #22b3ac;
    --teal-dark: #119b95;
    --line: #111;
    --muted: #666;
    --paper: #fff;
    --page: #eeeeee;
    --soft: #dedede;
    --blue: #178dcc;
    --green: #19b394;
    --orange: #ffac4d;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--page);
    color: #111;
    font-family: Arial, Helvetica, sans-serif;
}

.topbar {
    background: var(--teal);
    min-height: 64px;
    box-shadow: none;
}

.topbar-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 18px;
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .2px;
    background: transparent;
    padding: 18px 22px;
    align-self: stretch;
}

.brand-mark {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #e5363c;
    border-radius: 3px;
    font-weight: 900;
    font-size: 12px;
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
    flex: 1;
}

.nav-menu a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .25px;
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #f6ffff;
}

.mobile-menu {
    display: none;
    margin-left: auto;
    border: 0;
    background: rgba(255,255,255,.16);
    color: #fff;
    padding: 9px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.page-wrap {
    max-width: 1160px;
    margin: 0 auto;
    padding: 12px 18px 60px;
}

.sheet {
    background: var(--paper);
    border: 1px solid #b9b9b9;
    margin: 0 auto;
    padding: 28px 34px 26px;
    min-height: 720px;
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
}

.editor-sheet {
    width: min(100%, 1120px);
}

.sheet-header {
    display: grid;
    grid-template-columns: 150px 1fr 210px;
    gap: 18px;
    align-items: start;
    margin-bottom: 24px;
}

.logo-editor input[type="file"] {
    display: none;
}

.logo-label {
    display: block;
    width: 124px;
    cursor: pointer;
    position: relative;
}

.logo-label img {
    width: 124px;
    height: 124px;
    object-fit: contain;
    display: block;
    border: 1px solid #ddd;
    background: #f5f5f5;
}

.logo-label img.is-empty {
    opacity: 0;
}

.logo-label span {
    display: inline-block;
    margin-top: 8px;
    padding: 5px 9px;
    font-size: 11px;
    background: var(--teal);
    color: #fff;
    border-radius: 3px;
}

.plain-input {
    border: 0;
    outline: 0;
    background: transparent;
    color: #111;
    font-family: Arial, Helvetica, sans-serif;
    padding: 2px 0;
    min-width: 0;
}

.plain-input:focus {
    background: #fff9d8;
    box-shadow: inset 0 -1px 0 #f0c24b;
}

.company-input {
    width: 100%;
    font-size: 24px;
    line-height: 1.2;
    text-transform: uppercase;
    margin-top: 16px;
}


.company-address-input {
    width: 100%;
    font-size: 14px;
    line-height: 1.25;
    margin-top: 7px;
}

.company-address-input::placeholder {
    color: #777;
}

.thin-line {
    border-bottom: 2px solid var(--line);
    margin-top: 10px;
    width: 100%;
}

.slip-title-zone {
    text-align: right;
    padding-top: 15px;
}

.slip-title-input {
    width: 100%;
    text-align: right;
    font-size: 25px;
    text-transform: uppercase;
}

.period-row {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.period-input,
.year-input {
    font-size: 22px;
    text-align: right;
}

.period-input { width: 82px; }
.year-input { width: 72px; }

.employee-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 8px 0 18px;
}

.info-row {
    display: grid;
    grid-template-columns: 160px 14px 1fr;
    align-items: center;
    gap: 4px;
    min-height: 25px;
    font-size: 15px;
}

.info-label {
    font-weight: 700;
    width: 100%;
}

.inline-pair {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.short-code {
    max-width: 72px;
}

.payroll-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
    margin-top: 12px;
}

.section-heading {
    background: #6a6a6a;
    padding: 8px 11px;
}

.heading-input {
    color: #fff;
    font-weight: 700;
    width: 100%;
    font-size: 14px;
}

.heading-input:focus {
    color: #111;
}

.items-list {
    min-height: 16px;
}

.item-row {
    display: grid;
    grid-template-columns: 1fr 142px 26px;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #d8d8d8;
    min-height: 30px;
    font-size: 15px;
}

.item-row input[type="text"] {
    width: 100%;
}

.money-input {
    width: 100%;
    text-align: right;
}

.remove-item {
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 50%;
    background: #e75858;
    color: #fff;
    line-height: 20px;
    cursor: pointer;
    font-size: 16px;
}

.total-line {
    display: grid;
    grid-template-columns: 1fr 160px;
    gap: 10px;
    align-items: center;
    background: #dedede;
    padding: 7px 10px;
    font-size: 15px;
    font-weight: 700;
}

.total-line strong {
    text-align: right;
}

.total-label-input {
    width: 100%;
    font-weight: 700;
}

.add-item {
    border: 0;
    color: #005fff;
    background: transparent;
    padding: 10px 0 0;
    font-size: 13px;
    cursor: pointer;
}

.add-item:before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 5px;
    border-radius: 50%;
    background: #31cc66;
    vertical-align: -2px;
}

.double-line-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 20px 0 15px;
}

.double-line {
    border-top: 2px solid #111;
    border-bottom: 1px solid #111;
    height: 4px;
}

.take-home-editor {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 150px;
    align-items: center;
    gap: 12px;
    width: calc((100% - 24px) / 2);
    margin: 0 auto 24px 0;
}

.take-label {
    font-size: 18px;
    text-transform: uppercase;
    width: 100%;
}

.take-home-editor strong {
    border: 2px solid #222;
    padding: 4px 12px;
    text-align: right;
    min-height: 32px;
    font-size: 18px;
}

.bottom-editor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.transfer-editor {
    display: grid;
    gap: 5px;
    align-content: start;
}

.transfer-title {
    font-weight: 700;
    width: 180px;
}

.note-row {
    display: flex;
    gap: 4px;
    align-items: flex-start;
    margin-top: 24px;
}

.note-label {
    width: 70px;
    font-weight: 700;
}

.note-text {
    resize: vertical;
    width: 100%;
    line-height: 1.35;
}

.signature-editor {
    text-align: center;
}

.signature-date-row-editor {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-bottom: 8px;
}

.date-input {
    width: 100%;
    text-align: center;
    font-size: 15px;
}

.signature-grid-editor {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-top: 0;
}

.signature-grid-editor > div {
    min-height: 138px;
    display: grid;
    grid-template-rows: 28px 1fr 24px 24px;
    align-items: end;
}

.signature-label,
.signature-name,
.signature-role {
    width: 100%;
    text-align: center;
}

.signature-name {
    font-weight: 700;
}

.action-row {
    width: min(100%, 1120px);
    margin: 28px auto 0;
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.btn {
    border: 0;
    color: #fff;
    padding: 12px 18px;
    border-radius: 3px;
    font-weight: 700;
    cursor: pointer;
}

.btn-warning { background: var(--orange); }
.btn-primary { background: var(--blue); }
.btn-info { background: #13a7c6; }
.btn-success { background: var(--green); }

.btn:hover {
    filter: brightness(.95);
}

.contact-card {
    width: min(100%, 1120px);
    margin: 28px auto 0;
    background: #fff;
    padding: 24px;
    border: 1px solid #d6d6d6;
}

.contact-card h2 {
    margin: 0 0 10px;
}

@media (max-width: 980px) {
    .topbar-inner {
        flex-wrap: wrap;
        gap: 10px;
    }

    .mobile-menu {
        display: inline-flex;
    }

    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding-bottom: 12px;
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-menu a {
        display: block;
        width: 100%;
        padding: 10px 0;
    }

    .brand {
        align-self: center;
        padding: 13px 12px;
    }

    .sheet {
        padding: 20px;
    }

    .sheet-header {
        grid-template-columns: 112px 1fr;
    }

    .slip-title-zone {
        grid-column: 1 / -1;
        text-align: left;
        padding-top: 0;
    }

    .slip-title-input,
    .period-row,
    .period-input,
    .year-input {
        text-align: left;
        justify-content: flex-start;
    }

    .logo-label,
    .logo-label img {
        width: 96px;
        height: 96px;
    }

    .company-input,
    .slip-title-input {
        font-size: 20px;
    }

    .company-address-input {
        font-size: 13px;
    }

    .employee-grid,
    .payroll-grid,
    .bottom-editor-grid,
    .double-line-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .take-home-editor {
        grid-template-columns: 1fr 180px;
        width: 100%;
    }

    .signature-editor {
        padding-top: 0;
    }
}

@media (max-width: 620px) {
    .page-wrap {
        padding: 10px 8px 36px;
    }

    .sheet {
        padding: 14px;
        min-height: auto;
    }

    .sheet-header {
        grid-template-columns: 1fr;
    }

    .logo-label,
    .logo-label img {
        width: 110px;
        height: 110px;
    }

    .info-row {
        grid-template-columns: 108px 10px 1fr;
        font-size: 13px;
    }

    .inline-pair {
        flex-wrap: wrap;
    }

    .item-row {
        grid-template-columns: 1fr 112px 24px;
        gap: 6px;
        font-size: 13px;
    }

    .total-line {
        grid-template-columns: 1fr 110px;
        font-size: 13px;
    }

    .take-home-editor {
        grid-template-columns: 1fr;
        gap: 8px;
        width: 100%;
    }

    .take-home-editor strong {
        width: 190px;
        justify-self: end;
    }

    .signature-grid-editor {
        grid-template-columns: 1fr;
    }

    .action-row {
        justify-content: stretch;
    }

    .btn {
        flex: 1 1 140px;
    }
}


/* Content pages */
.content-page-wrap {
    padding-top: 26px;
}

.content-hero,
.content-card,
.price-card-content {
    width: min(100%, 1120px);
    margin: 0 auto 18px;
    background: #fff;
    border: 1px solid #d2d2d2;
    padding: 28px;
    box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

.content-hero {
    padding: 36px 32px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--teal-dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .8px;
}

.content-hero h1,
.content-card h2,
.price-card-content h2 {
    margin: 0 0 12px;
    line-height: 1.25;
}

.content-hero h1 {
    font-size: 34px;
    font-weight: 700;
}

.content-hero p,
.content-card p,
.price-card-content p,
.price-card-content li {
    font-size: 16px;
    line-height: 1.65;
}

.feature-grid-content,
.price-grid-content,
.contact-grid-content,
.two-column-content {
    width: min(100%, 1120px);
    margin: 0 auto 18px;
    display: grid;
    gap: 18px;
}

.feature-grid-content,
.price-grid-content {
    grid-template-columns: repeat(3, 1fr);
}

.contact-grid-content,
.two-column-content {
    grid-template-columns: repeat(2, 1fr);
}

.feature-grid-content article {
    background: #f8f8f8;
    border: 1px solid #e1e1e1;
    padding: 20px;
}

.feature-grid-content h3 {
    margin: 0 0 8px;
}

.price-card-content {
    margin: 0;
}

.featured-price {
    border-color: var(--teal);
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.price-label {
    color: var(--muted);
    font-weight: 700;
}

.price-card-content ul {
    margin: 12px 0 0;
    padding-left: 20px;
}

@media (max-width: 980px) {
    .content-hero h1 {
        font-size: 28px;
    }

    .feature-grid-content,
    .price-grid-content,
    .contact-grid-content,
    .two-column-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .content-hero,
    .content-card,
    .price-card-content {
        padding: 20px;
    }

    .content-hero h1 {
        font-size: 24px;
    }

    .content-hero p,
    .content-card p,
    .price-card-content p,
    .price-card-content li {
        font-size: 14px;
    }
}


.product-showcase {
    overflow: hidden;
}

.product-image-block {
    margin: 18px 0 0;
    background: #f8f8f8;
    border: 1px solid #e1e1e1;
    padding: 14px;
}

.product-image-block img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #d8d8d8;
    background: #fff;
}

.product-image-block figcaption {
    margin-top: 10px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.product-image-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 6px;
}

.product-image-grid .product-image-block {
    margin-top: 12px;
}

@media (max-width: 980px) {
    .product-image-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .product-image-block {
        padding: 10px;
    }

    .product-image-block figcaption {
        font-size: 13px;
    }
}
