* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f6f7f4;
    color: #1f2933;
    font: 16px/1.5 Arial, Helvetica, sans-serif;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled,
select:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.header,
.footer {
    display: none;
}

.content {
    min-height: 100vh;
    padding: 32px 20px;
}

.content_i {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.app-shell {
    display: grid;
    gap: 22px;
}

.app-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: end;
}

.eyebrow {
    margin: 0 0 4px;
    color: #667085;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0;
    font-size: 34px;
    line-height: 1.1;
}

h2 {
    margin-bottom: 6px;
    font-size: 20px;
}

.summary-pill {
    border: 1px solid #cfd8d3;
    border-radius: 999px;
    padding: 8px 14px;
    background: #fff;
    color: #344054;
    font-weight: 700;
}

.text-button,
.primary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 1px solid #cfd8d3;
    border-radius: 6px;
    padding: 0 14px;
    background: #fff;
    color: #1f2933;
    font-weight: 700;
    text-decoration: none;
}

.primary-link {
    margin-top: 14px;
    border-color: #1f7a6d;
    background: #1f7a6d;
    color: #fff;
}

.new-list,
.add-item-panel,
.list-section,
.manage-card {
    border: 1px solid #d8ded9;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px rgb(16 24 40 / 6%);
}

.new-list {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.5fr) auto;
    gap: 14px;
    align-items: end;
    padding: 18px;
}

.field-stack {
    display: grid;
    gap: 6px;
}

label {
    color: #475467;
    font-size: 13px;
    font-weight: 700;
}

input,
select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cfd8d3;
    border-radius: 6px;
    padding: 9px 11px;
    background: #fff;
    color: #1f2933;
}

input:focus,
select:focus {
    border-color: #1f7a6d;
    outline: 3px solid rgb(31 122 109 / 16%);
}

.primary-button,
.secondary-button,
.danger-button,
.icon-button,
.check-button {
    border: 0;
    border-radius: 6px;
    font-weight: 700;
}

.primary-button,
.secondary-button,
.danger-button {
    min-height: 42px;
    padding: 0 16px;
}

.primary-button {
    background: #1f7a6d;
    color: #fff;
}

.secondary-button {
    background: #30435c;
    color: #fff;
}

.danger-button {
    background: #fff0ed;
    color: #b42318;
}

.add-item-panel {
    overflow: hidden;
}

.add-item-panel summary {
    min-height: 54px;
    padding: 15px 18px;
    background: #fff;
    color: #1f2933;
    font-weight: 800;
    list-style-position: inside;
    cursor: pointer;
}

.add-item-panel[open] summary {
    border-bottom: 1px solid #edf1ee;
}

.add-item-form {
    display: grid;
    grid-template-columns: minmax(150px, 0.9fr) minmax(220px, 1.4fr) 100px 100px;
    gap: 14px;
    align-items: end;
    padding: 18px;
}

.item-name-field,
.item-note-field {
    grid-column: span 2;
}

.list-overview,
.manage-list {
    display: grid;
    gap: 16px;
}

.list-section {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.list-title-row {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
}

.list-title-row p,
.muted-line {
    margin-bottom: 0;
    color: #667085;
}

.list-title-row span {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 5px 10px;
    background: #eef2f1;
    color: #475467;
    font-size: 14px;
    font-weight: 700;
}

.progress-line {
    overflow: hidden;
    height: 8px;
    border-radius: 999px;
    background: #edf1ee;
}

.progress-line span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #d98f36;
}

.items {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.items li {
    display: grid;
    grid-template-columns: 34px 1fr 34px;
    gap: 10px;
    align-items: center;
    min-height: 58px;
    border: 1px solid #edf1ee;
    border-radius: 8px;
    padding: 10px;
    background: #fbfcfb;
}

.item-main {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.item-main strong,
.item-main span,
.item-main small {
    overflow-wrap: anywhere;
}

.item-main span,
.item-main small {
    color: #667085;
}

.is-checked .item-main {
    color: #98a2b3;
    text-decoration: line-through;
}

.check-button {
    width: 30px;
    height: 30px;
    border: 2px solid #1f7a6d;
    background: #fff;
    color: #1f7a6d;
}

.icon-button {
    width: 30px;
    height: 30px;
    background: #eef2f1;
    color: #475467;
    font-size: 20px;
    line-height: 1;
}

.empty-state {
    border: 1px dashed #b8c5be;
    border-radius: 8px;
    padding: 28px;
    background: #fff;
    text-align: center;
}

.empty-state p {
    margin-bottom: 0;
    color: #667085;
}

.manage-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: end;
    padding: 18px;
}

.list-edit-form {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) minmax(220px, 1.5fr) minmax(120px, 0.5fr) auto;
    gap: 14px;
    align-items: end;
}

@media (max-width: 820px) {
    .content {
        padding: 22px 12px;
    }

    .app-header,
    .new-list,
    .add-item-form,
    .manage-card,
    .list-edit-form {
        display: grid;
        grid-template-columns: 1fr;
    }

    .header-actions {
        justify-content: start;
    }

    .item-name-field,
    .item-note-field {
        grid-column: auto;
    }

    .list-title-row {
        display: grid;
    }
}
