:root {
    --page: #f7f7f4;
    --surface: #ffffff;
    --text: #2c3931;
    --muted: #858d84;
    --accent: #496f55;
    --accent-dark: #3d6148;
    --accent-soft: #edf2e9;
    --border: #e7e8e1;
    --danger: #bd655e;
    --shadow: 0 8px 24px rgba(35, 48, 37, 0.045);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--page);
    color: var(--text);
    font-family: "DM Sans", sans-serif;
    font-size: 14px;
}

#appShell {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

#appShell[hidden] {
    display: none;
}

html.appPending #publicLanding,
html.appPending #authScreen,
html.appPending #appShell {
    display: none !important;
}

.appLoading {
    display: none;
}

html.appPending .appLoading {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    gap: 11px;
    color: var(--muted);
    font-size: 12px;
}

.appLoading .brandMark {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 9px;
    background: var(--accent);
    color: #fff;
}

.authScreen {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
}

.authScreen[hidden],
.authForm[hidden] {
    display: none;
}

#publicLanding[hidden] {
    display: none;
}

.authHomeLink {
    display: block;
    margin-top: 18px;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
    text-decoration: none;
}

.authHomeLink:hover {
    color: var(--accent-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.publicLanding {
    width: 100%;
    overflow: hidden;
}

.landingHeader,
.landingHero,
.landingSection,
.landingEmailNote,
.landingBottomCta,
.landingFooter {
    width: min(100% - 48px, 1060px);
    margin-right: auto;
    margin-left: auto;
}

.landingHeader {
    display: flex;
    min-height: 78px;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    border-bottom: 1px solid var(--border);
}

.landingBrand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.landingBrand .brandMark {
    width: 32px;
    height: 32px;
}

.landingNav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.landingNav a,
.landingFooter nav a {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.landingNav a:hover,
.landingFooter nav a:hover {
    color: var(--accent-dark);
}

.landingNav .landingSignIn {
    color: var(--text);
}

.landingNav .landingNavCta {
    padding: 10px 15px;
    border-radius: 7px;
    background: var(--accent);
    color: #fff;
}

.landingNav .landingNavCta:hover,
.landingPrimaryButton:hover {
    background: var(--accent-dark);
    color: #fff;
}

.landingHero {
    display: grid;
    min-height: 510px;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: clamp(40px, 8vw, 100px);
    padding-top: 58px;
    padding-bottom: 68px;
}

.landingHeroCopy {
    max-width: 520px;
}

.landingEyebrow {
    margin: 0 0 13px;
    color: var(--accent);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.landingHeroCopy .landingEyebrow i {
    margin-right: 5px;
}

.landingHero h1 {
    max-width: 510px;
    margin: 0;
    font-size: clamp(42px, 6vw, 66px);
    font-weight: 600;
    letter-spacing: -0.06em;
    line-height: 1.06;
}

.landingHero h1 span {
    color: var(--accent);
}

.landingLead {
    max-width: 465px;
    margin: 21px 0 25px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.75;
}

.landingActions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.landingPrimaryButton {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 18px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease;
}

.landingPrimaryButton i {
    font-size: 11px;
}

.landingSecondaryLink {
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.landingSecondaryLink:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.landingReassurance {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 10px;
}

.landingListPreview {
    width: 100%;
    max-width: 410px;
    justify-self: end;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 20px 55px rgba(35, 48, 37, 0.09);
    transform: rotate(1.5deg);
}

.previewTopline,
.previewCategory,
.previewItem,
.previewEmail {
    display: flex;
    align-items: center;
}

.previewTopline {
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 21px;
    font-size: 11px;
    font-weight: 700;
}

.previewTopline > span:first-child i {
    margin-right: 6px;
    color: var(--accent);
}

.previewStatus {
    color: var(--muted);
    font-size: 9px;
    font-weight: 500;
}

.previewCategory {
    gap: 8px;
    padding: 9px 0 7px;
    border-bottom: 1px solid var(--border);
    color: var(--accent-dark);
    font-size: 10px;
    font-weight: 700;
}

.previewCategory > span {
    margin-left: auto;
    color: var(--muted);
    font-size: 9px;
    font-weight: 500;
}

.previewItem {
    min-height: 38px;
    gap: 10px;
    border-bottom: 1px solid #f1f1ed;
    color: var(--text);
    font-size: 10px;
}

.previewCheck {
    width: 14px;
    height: 14px;
    border: 1px solid #d8ddd4;
    border-radius: 4px;
}

.previewPin {
    margin-left: auto;
    color: #a2ad91;
    font-size: 9px;
}

.previewEmail {
    gap: 9px;
    margin-top: 18px;
    padding: 11px 12px;
    border-radius: 7px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-size: 9px;
    font-weight: 600;
}

.previewEmail i:last-child {
    margin-left: auto;
}

.landingSection {
    padding-top: 70px;
    padding-bottom: 70px;
}

.landingFeatures {
    border-top: 1px solid var(--border);
}

.landingSectionIntro {
    max-width: 590px;
    margin-bottom: 30px;
}

.landingSectionIntro h2,
.landingBottomCta h2 {
    margin: 0;
    font-size: clamp(27px, 4vw, 38px);
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1.2;
}

.landingSectionIntro > p:last-child {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

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

.featureCard {
    min-height: 190px;
    padding: 21px 19px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}

.featureIcon {
    display: grid;
    width: 35px;
    height: 35px;
    place-items: center;
    border-radius: 9px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 14px;
}

.featureCard h3,
.howSteps h3 {
    margin: 17px 0 7px;
    font-size: 13px;
    font-weight: 700;
}

.featureCard p,
.howSteps p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.7;
}

.landingHow {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: clamp(35px, 8vw, 100px);
    border-top: 1px solid var(--border);
}

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

.howSteps li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.howSteps li > span {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-size: 11px;
    font-weight: 700;
}

.howSteps h3 {
    margin: 2px 0 5px;
}

.landingEmailNote {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 17px 20px;
    border: 1px solid #e1e8dc;
    border-radius: 9px;
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.landingEmailNote > i {
    margin-top: 2px;
    font-size: 14px;
}

.landingEmailNote p {
    margin: 0;
    font-size: 11px;
    line-height: 1.65;
}

.landingFaq {
    border-top: 1px solid var(--border);
}

.faqList {
    border-top: 1px solid var(--border);
}

.faqList details {
    border-bottom: 1px solid var(--border);
}

.faqList summary {
    position: relative;
    padding: 17px 32px 17px 0;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    list-style: none;
}

.faqList summary::-webkit-details-marker {
    display: none;
}

.faqList summary::after {
    position: absolute;
    top: 15px;
    right: 4px;
    color: var(--accent);
    content: "+";
    font-size: 17px;
    font-weight: 400;
}

.faqList details[open] summary::after {
    content: "−";
}

.faqList details p {
    max-width: 760px;
    margin: -3px 0 17px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.7;
}

.landingBottomCta {
    display: flex;
    min-height: 270px;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    padding: 50px 20px;
    border-radius: 14px;
    background: var(--accent-soft);
    text-align: center;
}

.landingBottomCta .landingEyebrow {
    margin-bottom: 8px;
}

.landingBottomCta > p:not(.landingEyebrow) {
    margin: 11px 0 20px;
    color: var(--muted);
    font-size: 12px;
}

.landingFooter {
    display: flex;
    min-height: 92px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 38px;
    border-top: 1px solid var(--border);
}

.landingFooter > span {
    color: var(--muted);
    font-size: 10px;
}

.landingFooter nav {
    display: flex;
    gap: 17px;
}

.landingFooter nav a {
    font-size: 10px;
}

.authCard {
    width: min(100%, 400px);
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.authCard.verificationMode {
    width: min(100%, 446px);
    padding: 32px;
    border-radius: 14px;
}

.authCard.verificationMode .authMode {
    display: none;
}

.authBrand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    font-weight: 700;
}

.authIntro h1 {
    font-size: 24px;
    font-weight: 500;
}

.authIntro p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.authMode {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin: 22px 0 18px;
    padding: 4px;
    border-radius: 8px;
    background: var(--page);
}

.authModeButton {
    min-height: 36px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-size: 11px;
}

.authModeButton.selected {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 1px 3px rgba(35, 48, 37, 0.1);
}

.authForm {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.authForm label {
    margin-top: 7px;
    font-size: 11px;
    font-weight: 600;
}

.authForm input {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    background: #fafaf8;
    color: var(--text);
    font-size: 12px;
}

.authForm input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(73, 111, 85, 0.1);
}

.authForm .termsAgreement {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 400;
    line-height: 1.5;
}

.authForm .termsAgreement input[type="checkbox"] {
    flex: 0 0 auto;
    width: 15px;
    min-height: 15px;
    margin: 1px 0 0;
    padding: 0;
    accent-color: var(--accent);
}

.authForm .termsAgreement a {
    color: var(--accent-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.authForm button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.authForm input.verificationEmail {
    min-height: 24px;
    padding: 0;
    border: 0;
    border-radius: 0;
    outline: none;
    background: transparent;
    font-size: 13px;
}

.authForm input.verificationEmail:focus {
    border: 0;
    box-shadow: none;
}

.verificationCodeInputs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 0 0 2px;
}

.authForm .verificationCodeInputs input {
    width: 64px;
    min-height: 56px;
    padding: 0;
    text-align: center;
    font-size: 20px;
}

.authCard.verificationMode .authIntro h1 {
    font-size: 26px;
}

.authCard.verificationMode .authIntro p {
    font-size: 13px;
}

.authCard.verificationMode .authStatus {
    margin: 20px 0 14px;
    padding: 13px 14px;
    border: 1px solid #f4e2dc;
    border-radius: 9px;
    background: #fff5f1;
    color: #bd5c4b;
    font-size: 12px;
    text-align: center;
}

.authCard.verificationMode .authForm {
    gap: 8px;
}

.authCard.verificationMode .authForm label {
    margin-top: 7px;
    font-size: 11px;
    font-weight: 600;
}

.authCard.verificationMode .authForm .verificationCodeLabel {
    width: 100%;
    text-align: center;
}

.authCard.verificationMode .authForm button {
    min-height: 46px;
    margin-top: 14px;
    font-size: 13px;
}

.authCard.verificationMode .authForm .authSecondaryButton {
    min-height: 46px;
    margin-top: 0;
}

.authCard.verificationMode .authForm .authTextButton {
    min-height: 34px;
    margin-top: 0;
}

.passwordInputWrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.authForm .passwordInputWrap input {
    padding-right: 44px;
}

.authForm button {
    min-height: 42px;
    margin-top: 12px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: white;
    font-size: 12px;
    font-weight: 600;
}

.authForm button:hover {
    background: var(--accent-dark);
}

.authForm button.passwordToggle {
    position: absolute;
    right: 6px;
    display: grid;
    width: 32px;
    min-height: 32px;
    place-items: center;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
}

.authForm button.passwordToggle:hover {
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.authForm button.passwordToggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.authForm .authSecondaryButton {
    min-height: 38px;
    margin-top: 0;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--accent-dark);
}

.authForm .authSecondaryButton:hover {
    background: var(--accent-soft);
}

.authForm .authTextButton {
    min-height: 32px;
    margin-top: 0;
    background: transparent;
    color: var(--muted);
    font-weight: 500;
}

.authForm .authTextButton:hover {
    background: var(--page);
    color: var(--text);
}

.passwordHint {
    margin-top: -4px;
    color: var(--muted);
    font-size: 10px;
}

.authStatus {
    margin-top: 14px;
    color: var(--danger);
    font-size: 11px;
    line-height: 1.5;
}

.authStatus:empty {
    display: none;
}

.logoutButton {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
}

.logoutButton:hover {
    border-color: var(--border);
    background: var(--page);
    color: var(--text);
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.siteHeader {
    height: 72px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.headerInner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
    width: min(100% - 48px, 1140px);
    height: 100%;
    margin: 0 auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.brandMark {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 8px;
    background: var(--accent);
    color: white;
}

.tabs {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.tabButton {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0 15px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #737b73;
    font-size: 12px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.tabButton:hover {
    background-color: #f2f5f0;
    color: var(--text);
}

.tabButton[aria-selected="true"] {
    border-bottom-color: var(--accent);
    color: var(--accent-dark);
}

.tabButton:focus-visible,
.pageFooter a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -3px;
}

.tabButton i {
    font-size: 13px;
}

.accountMeta {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    color: var(--muted);
    font-size: 11px;
}

.statusDot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}

.avatar {
    position: relative;
    display: grid;
    width: 28px;
    flex: 0 0 auto;
    height: 28px;
    margin-left: 2px;
    place-items: center;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 50%;
    background: #f2f0e9;
    color: var(--accent);
    transition: width 0.18s ease, border-radius 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.avatarHover {
    display: none;
    position: absolute;
    top: 50%;
    left: 36px;
    z-index: 1;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    font-size: 10px;
    font-weight: 600;
    transform: translateY(-50%);
}

.avatar:hover,
.avatar:focus-visible {
    width: 150px;
    border-radius: 999px;
    background: var(--accent);
    color: white;
}

.avatar:focus-visible {
    outline: 2px solid var(--accent-dark);
    outline-offset: 2px;
}

.avatar:hover #profileIcon,
.avatar:focus-visible #profileIcon {
    display: none;
}

.avatar:hover .avatarHover,
.avatar:focus-visible .avatarHover {
    display: inline-flex;
}

.avatar img {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
}

.profileImageStatus {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 2;
    max-width: min(280px, calc(100vw - 32px));
    padding: 6px 9px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface);
    box-shadow: var(--shadow);
    color: var(--text);
    font-size: 10px;
    line-height: 1.4;
}

.profileImageStatus:empty {
    display: none;
}

.visuallyHidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

.pageShell {
    flex: 1 0 auto;
    width: min(100% - 48px, 1020px);
    margin: 38px auto 0;
}

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

h1,
h2,
p {
    margin: 0;
}

.pageIntro h1 {
    font-size: 29px;
    font-weight: 500;
    line-height: 1.25;
}

.pageIntro p,
.dateMeta p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.dateMeta {
    padding-bottom: 4px;
    text-align: right;
}

.dateMeta time {
    font-size: 11px;
    font-weight: 600;
}

.dateMeta p {
    margin-top: 3px;
    font-size: 10px;
}

.tabPanel[hidden] {
    display: none;
}

.listScope {
    display: flex;
    gap: 4px;
    width: fit-content;
    margin: 0 0 16px;
    padding: 4px;
    border-radius: 9px;
    background: #eeefe9;
}

.listScope[hidden] {
    display: none;
}

.listScope button {
    min-height: 34px;
    padding: 0 13px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 11px;
}

.listScope button.selected {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 1px 3px rgba(35, 48, 37, 0.1);
}

.dashboardGrid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 238px;
    align-items: start;
    gap: 22px;
}

.listColumn {
    min-width: 0;
}

.addForm {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-bottom: 22px;
    padding: 15px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.formHeading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.formHeading label {
    font-size: 12px;
    font-weight: 600;
}

.formHeading span {
    color: var(--muted);
    font-size: 9px;
}

kbd {
    margin-left: 3px;
    padding: 2px 4px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #fafaf8;
    font: inherit;
}

.entryControls {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.entryControls textarea {
    flex: 1;
    min-width: 0;
    min-height: 38px;
    max-height: 90px;
    resize: none;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    background: #fafaf8;
    color: var(--text);
    font-size: 11px;
}

.entryControls textarea:focus,
.settingsForm input:focus,
.settingsForm select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(73, 111, 85, 0.1);
}

.entryControls button,
.settingsForm button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 15px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 600;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.entryControls button:hover,
.settingsForm button:hover {
    background: var(--accent-dark);
}

.entryControls button:active,
.settingsForm button:active {
    transform: translateY(1px);
}

.addCategorySelect {
    align-self: flex-start;
    width: min(220px, 100%);
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fafaf8;
    color: var(--text);
    font: inherit;
    font-size: 10px;
}

.addCategorySelect[hidden] {
    display: none;
}

.categoryToolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -3px 0 9px;
}

.addCategoryButton {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface);
    color: var(--accent-dark);
    font: inherit;
    font-size: 10px;
    font-weight: 600;
}

.addCategoryButton:hover {
    background: var(--accent-soft);
}

.categoryDialog {
    width: min(100% - 32px, 380px);
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow);
}

.categoryDialog::backdrop {
    background: rgba(35, 48, 37, 0.35);
}

.categoryDialog form {
    display: grid;
    gap: 12px;
    padding: 22px;
}

.categoryDialog h2 {
    font-size: 16px;
    font-weight: 600;
}

.categoryDialog label {
    font-size: 11px;
    font-weight: 600;
}

.categoryDialog input {
    width: 100%;
    min-height: 40px;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fafaf8;
    color: var(--text);
    font: inherit;
    font-size: 12px;
}

.categoryDialog input:focus {
    border-color: var(--accent);
    outline: 2px solid var(--accent-soft);
}

.categoryDialogStatus {
    color: var(--danger);
    font-size: 11px;
}

.categoryDialogStatus:empty {
    display: none;
}

.categoryDialogActions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 5px;
}

.categoryDialogActions button {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 7px;
    font: inherit;
    font-size: 11px;
    font-weight: 600;
}

.categoryDialogCancel {
    background: var(--surface);
    color: var(--text);
}

.categoryDialogSubmit {
    border-color: var(--accent) !important;
    background: var(--accent);
    color: white;
}

.categoryDialogSubmit:hover {
    background: var(--accent-dark);
}

.settingsForm button.isSaved {
    background: var(--accent-dark);
    animation: settingsSaved 0.35s ease-out;
}

.settingsSaveStatus {
    align-self: flex-end;
    color: var(--danger);
    font-size: 11px;
}

.settingsSaveStatus:empty {
    display: none;
}

@keyframes settingsSaved {
    50% {
        transform: scale(1.04);
    }
}

.listHeadingRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.listHeadingRow h2 {
    font-size: 13px;
    font-weight: 600;
}

.listHeadingRow > span {
    color: var(--muted);
    font-size: 9px;
}

.reorderHint {
    margin: 0;
    color: var(--muted);
    font-size: 9px;
}

.groceryContainer {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px 12px 0 0;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.groceryCategoryHeading {
    display: flex;
    min-height: 34px;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    border-bottom: 1px solid var(--border);
    background: #f5f7f2;
}

.groceryCategoryHeading h3 {
    color: var(--accent-dark);
    font-size: 10px;
    font-weight: 600;
}

.groceryCategoryHeading.dropInto {
    background: var(--accent-soft);
    box-shadow: inset 0 0 0 2px var(--accent);
}

.groceryCategoryHeading.draggableCategory {
    position: relative;
    cursor: grab;
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
}

.groceryCategoryHeading.isDragging {
    background: var(--accent-soft);
    cursor: grabbing;
}

.groceryCategoryHeading.categoryDropBefore {
    box-shadow: 0 -2px 0 var(--accent);
}

.groceryCategoryHeading.categoryDropAfter {
    box-shadow: 0 2px 0 var(--accent);
}

.removeCategoryButton {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.removeCategoryButton:hover {
    background: #ecefe8;
    color: var(--danger);
}

.groceryContainer.isReordering,
.groceryContainer.isReordering * {
    -webkit-user-select: none;
    user-select: none;
}

.grocery {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 74px;
    padding: 12px 15px;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: var(--surface);
    cursor: grab;
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
}

.grocery.dropBefore::before,
.grocery.dropAfter::after {
    position: absolute;
    right: 0;
    left: 0;
    z-index: 2;
    height: 2px;
    background: var(--accent);
    content: "";
    pointer-events: none;
}

.grocery.dropBefore::before {
    top: -1px;
}

.grocery.dropAfter::after {
    bottom: -1px;
}

.grocery.holdReady {
    background: var(--accent-soft);
    box-shadow: inset 0 0 0 2px var(--accent);
}

.groceryCategoryHeading.categoryGroupSelected,
.grocery.categoryGroupSelected {
    position: relative;
    background: var(--accent-soft);
}

.categoryGroupSelected::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: -1px;
    left: 0;
    z-index: 3;
    border: solid var(--accent);
    border-width: 0 2px;
    content: "";
    pointer-events: none;
}

.groceryCategoryHeading.categoryGroupSelected::after {
    border-top-width: 2px;
}

.groceryContainer > .categoryGroupSelected:first-child,
.groceryContainer > .categoryGroupSelected:first-child::after {
    border-radius: 11px 11px 0 0;
}

.categoryGroupSelected.categoryGroupEnd::after {
    border-bottom-width: 2px;
}

.grocery.isDragging {
    z-index: 1;
    background: var(--accent-soft);
    cursor: grabbing;
}

.groceryDragGhost {
    position: fixed;
    z-index: 1000;
    max-width: min(260px, calc(100vw - 32px));
    overflow: hidden;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    pointer-events: none;
    background: var(--surface);
    box-shadow: 0 3px 9px rgba(35, 48, 37, 0.12);
    color: var(--text);
    cursor: grabbing;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grocery:last-child {
    border-bottom: 0;
}

.grocery p {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 13px;
}

.groceryEditInput {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    -webkit-user-select: text;
    user-select: text;
}

.groceryEditInput:focus {
    border-color: var(--accent);
    outline: 2px solid var(--accent-soft);
}

.buttonContainer {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 5px;
}

.itemCategorySelect {
    width: min(128px, 25vw);
    min-width: 78px;
    height: 30px;
    padding: 0 6px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface);
    color: var(--muted);
    font: inherit;
    font-size: 9px;
}

.categorySelectControl {
    display: contents;
}

.categorySelectControl > i {
    display: none;
}

.iconButton {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #fafaf8;
    color: #8b938b;
    font-size: 11px;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.iconButton:hover {
    border-color: var(--border);
    background: var(--surface);
    color: var(--text);
}

.iconButton.active {
    background: var(--accent-soft);
    color: var(--accent);
}

.pinButton {
    display: inline-flex;
    width: auto;
    min-width: 44px;
    padding: 0 9px;
    gap: 6px;
    border-color: var(--border);
    background: var(--surface);
    font-size: 9px;
}

.groceryEditAction {
    display: inline-flex;
    width: auto;
    padding: 0 8px;
    gap: 5px;
    border-color: var(--border);
    font-size: 9px;
}

.groceryEditAction:first-child {
    color: var(--accent);
}

.pinButton .fa-thumbtack {
    transform: rotate(0deg);
    transition: transform 0.25s ease;
}

.pinButton.active .fa-thumbtack {
    transform: rotate(-90deg);
}

@media (prefers-reduced-motion: reduce) {
    .pinButton .fa-thumbtack {
        transition: none;
    }

    .settingsForm button.isSaved {
        animation: none;
    }
}

.iconButton .fa-xmark:hover {
    color: var(--danger);
}

.groceryStatus {
    margin-top: 8px;
    color: var(--danger);
    font-size: 11px;
    line-height: 1.5;
}

.groceryStatus:empty {
    display: none;
}

.listFooter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 38px;
    padding: 0 15px;
    border: 1px solid var(--border);
    border-top: 0;
    border-radius: 0 0 12px 12px;
    background: #fbfbf9;
    color: var(--muted);
    font-size: 9px;
}

.listFooter i {
    margin-right: 4px;
    color: var(--accent);
}

.listMetaRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding-right: 15px;
}

.pinnedCountHint {
    flex: 0 0 auto;
    margin: 0;
    color: var(--muted);
    font-size: 9px;
    text-align: right;
}

.pinHint {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 9px;
}

.pinHint i {
    color: #8b938b;
}

.resetCard {
    overflow: hidden;
    border-radius: 13px;
    background: var(--accent-soft);
}

.resetCard img {
    display: block;
    width: 100%;
    aspect-ratio: 1.2;
    object-fit: cover;
}

.resetContent {
    padding: 19px 18px 16px;
}

.resetEyebrow,
.sectionEyebrow {
    color: var(--accent);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}

.resetEyebrow i {
    margin-right: 5px;
}

.resetContent h2 {
    margin-top: 13px;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.25;
}

.resetDescription {
    margin-top: 12px;
    color: #798279;
    font-size: 10px;
    line-height: 1.55;
}

.resetDate {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(73, 111, 85, 0.12);
    color: var(--muted);
    font-size: 9px;
}

.resetDate time {
    color: var(--accent-dark);
    font-weight: 600;
}

.emailPanel,
.homePanel {
    width: min(100%, 620px);
    margin: 0 auto;
}

.emailIntro {
    margin-bottom: 20px;
}

.sectionEyebrow {
    margin-bottom: 8px;
}

.emailIntro h2 {
    font-size: 23px;
    font-weight: 500;
}

.emailIntro > p:last-child {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.settingsForm {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.settingsForm label {
    margin-top: 5px;
    font-size: 11px;
    font-weight: 600;
}

.settingsForm input,
.settingsForm select {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    background: #fafaf8;
    color: var(--text);
    font-size: 12px;
}

.settingsForm button {
    align-self: flex-end;
    margin-top: 7px;
}

.homeCard {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.homeCard h3 {
    font-size: 14px;
    font-weight: 600;
}

.homeCard > p,
.homeSettingsForm > p {
    margin-top: 7px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.homePrimaryButton,
.homeSecondaryButton,
.homeDangerButton {
    min-height: 36px;
    padding: 0 13px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-size: 11px;
    font-weight: 600;
}

.homePrimaryButton:hover {
    background: var(--accent-dark);
}

.homeSecondaryButton {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}

.homeDangerButton {
    margin: 18px 8px 0 0;
    border: 1px solid #efd9d6;
    background: #fff8f6;
    color: var(--danger);
}

.homeDangerButton:hover {
    background: #fff0ec;
}

#createHomeButton {
    margin-top: 14px;
}

.homeInvitationsSection {
    margin-top: 24px;
}

.homeInvitationsSection h3 {
    margin-bottom: 10px;
}

.homeMemberList {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 14px 0 22px;
    padding: 0;
    list-style: none;
}

.homeMemberList li,
.homeInvitationRow {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfbf9;
    font-size: 11px;
}

.homeMemberList li > span,
.homeInvitationRow > span {
    flex: 1;
}

.homeMemberRemove {
    border: 0;
    background: transparent;
    color: var(--danger);
    font: inherit;
    font-size: 10px;
}

.homeManagementGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.homeInviteForm,
.homeSettingsForm {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.homeInviteForm label,
.homeSettingsForm label {
    font-size: 11px;
    font-weight: 600;
}

.homeInlineControls {
    display: flex;
    gap: 7px;
    width: 100%;
}

.homeInlineControls input,
.homeSettingsForm input,
.homeSettingsForm select {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    background: #fafaf8;
    color: var(--text);
    font: inherit;
    font-size: 11px;
}

.homeInlineControls input:focus,
.homeSettingsForm input:focus,
.homeSettingsForm select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(73, 111, 85, 0.1);
}

.homeSettingsForm input::placeholder {
    color: var(--muted);
    opacity: 1;
}

.homeInvitations {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    color: var(--muted);
    font-size: 10px;
}

.homeInvitationRow {
    flex-wrap: wrap;
    padding: 9px;
}

.homeSettingsForm > p {
    margin: 0;
}

.homeSettingsForm .homePrimaryButton {
    margin-top: auto;
}

.homeStatus {
    margin-top: 12px;
    color: var(--accent-dark);
    font-size: 11px;
    line-height: 1.5;
}

.homeStatus:empty {
    display: none;
}

.pageFooter {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    width: min(100% - 48px, 1020px);
    margin: 34px auto 24px;
    color: var(--muted);
    font-size: 9px;
}

.pageFooter i {
    margin-left: 3px;
}

@media (max-width: 760px) {
    .landingHeader,
    .landingHero,
    .landingSection,
    .landingEmailNote,
    .landingBottomCta,
    .landingFooter {
        width: min(100% - 36px, 1060px);
    }

    .landingNav {
        gap: 15px;
    }

    .landingHero {
        min-height: 0;
        grid-template-columns: 1fr 0.9fr;
        gap: 28px;
        padding-top: 56px;
        padding-bottom: 58px;
    }

    .landingHero h1 {
        font-size: clamp(40px, 7vw, 54px);
    }

    .landingListPreview {
        padding: 18px;
    }

    .featureGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .landingHow {
        gap: 32px;
    }

    .headerInner {
        grid-template-columns: 1fr auto;
        width: min(100% - 32px, 600px);
    }

    .tabs {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: center;
        min-height: 44px;
        gap: 0;
    }

    .tabButton {
        gap: 6px;
        padding: 0 9px;
        font-size: 11px;
    }

    .siteHeader {
        height: 112px;
    }

    .dashboardGrid {
        grid-template-columns: minmax(0, 1fr) 210px;
        gap: 16px;
    }

    .pageShell,
    .pageFooter {
        width: min(100% - 32px, 600px);
    }
}

@media (max-width: 600px) {
    .landingHeader,
    .landingHero,
    .landingSection,
    .landingEmailNote,
    .landingBottomCta,
    .landingFooter {
        width: min(100% - 32px, 1060px);
    }

    .landingHeader {
        min-height: 67px;
        gap: 10px;
    }

    .landingBrand {
        gap: 7px;
        font-size: 12px;
    }

    .landingBrand .brandMark {
        width: 28px;
        height: 28px;
    }

    .landingNav {
        gap: 10px;
    }

    .landingNav a {
        font-size: 10px;
    }

    .landingNav a[href="#features"],
    .landingNav a[href="#how-it-works"],
    .landingNav a[href="#faq"] {
        display: none;
    }

    .landingNav .landingNavCta {
        padding: 8px 10px;
    }

    .landingHero {
        grid-template-columns: 1fr;
        gap: 38px;
        padding-top: 57px;
        padding-bottom: 48px;
    }

    .landingHero h1 {
        font-size: clamp(42px, 12vw, 58px);
    }

    .landingLead {
        font-size: 13px;
    }

    .landingActions {
        gap: 14px;
    }

    .landingListPreview {
        max-width: 390px;
        justify-self: center;
        padding: 19px;
    }

    .landingSection {
        padding-top: 48px;
        padding-bottom: 48px;
    }

    .featureGrid {
        gap: 10px;
    }

    .featureCard {
        min-height: 190px;
        padding: 16px 14px;
    }

    .featureCard h3 {
        font-size: 12px;
    }

    .landingHow {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .landingEmailNote {
        padding: 14px;
    }

    .landingBottomCta {
        min-height: 235px;
    }

    .landingFooter {
        align-items: flex-start;
        flex-wrap: wrap;
        padding-top: 21px;
        padding-bottom: 20px;
    }

    .landingFooter > span {
        order: 1;
        width: 100%;
    }

    .landingFooter nav {
        gap: 11px;
    }

    .landingFooter nav a {
        font-size: 9px;
    }

    html {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    html::-webkit-scrollbar {
        display: none;
    }

    .headerInner {
        width: 100%;
        padding: 0 16px;
    }

    .accountMeta > span:nth-child(2) {
        display: none;
    }

    .pageShell {
        margin-top: 28px;
    }

    .pageIntro {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 20px;
    }

    .pageIntro h1 {
        font-size: 25px;
    }

    .dateMeta {
        padding: 0;
        text-align: left;
    }

    .dashboardGrid {
        grid-template-columns: 1fr;
    }

    .homeManagementGrid {
        grid-template-columns: 1fr;
    }

    .resetCard {
        display: grid;
        grid-template-columns: minmax(110px, 0.8fr) 1.2fr;
    }

    .resetCard img {
        height: 100%;
        min-height: 215px;
        aspect-ratio: auto;
    }

    .resetContent {
        padding: 16px 14px;
    }

    .resetContent h2 {
        font-size: 16px;
    }

    .entryControls {
        flex-direction: column;
    }

    .entryControls button {
        align-self: stretch;
        width: 100%;
    }

    .addCategorySelect {
        align-self: stretch;
        width: 100%;
    }

    .categorySelectControl {
        display: none;
    }

    .pinButton {
        align-items: center;
        width: 30px;
        min-width: 30px;
        padding: 0;
        justify-content: center;
    }

    .pinButton span {
        display: none;
    }

    .pageFooter {
        margin-top: 26px;
    }
}

@media (max-width: 420px) {
    .landingHeader,
    .landingHero,
    .landingSection,
    .landingEmailNote,
    .landingBottomCta,
    .landingFooter {
        width: min(100% - 24px, 1060px);
    }

    .landingNav {
        gap: 7px;
    }

    .landingNav .landingNavCta {
        padding: 8px;
    }

    .landingNav .landingSignIn {
        font-size: 9px;
    }

    .landingActions {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }

    .featureGrid {
        grid-template-columns: 1fr;
    }

    .featureCard {
        min-height: 0;
    }

    .landingFooter {
        gap: 14px;
    }

    .authCard.verificationMode {
        padding: 24px 18px;
    }

    .verificationCodeInputs {
        gap: 8px;
    }

    .authForm .verificationCodeInputs input {
        width: min(64px, calc((100vw - 108px) / 4));
    }

    .listFooter {
        align-items: center;
        flex-direction: row;
        justify-content: space-between;
        gap: 8px;
        padding: 9px 12px;
        white-space: nowrap;
    }

    .resetCard {
        grid-template-columns: 1fr;
    }

    .resetCard img {
        height: 150px;
        min-height: 0;
    }

    .pageFooter {
        flex-direction: column;
    }
}