@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;600;650;700&family=Manrope:wght@400;500;600;650;700;750;800&display=swap");
:root {
    --ink: #1d302b;
    --muted: #64736d;
    --green: #123b35;
    --mint: #c4ecd5;
    --line: #e0e7e2;
    --surface: #f5f8f6;
    --white: #fff;
    --danger: #a93435;
    font-family: "DM Sans", system-ui, sans-serif;
    color: var(--ink);
    background: var(--surface);
    font-size: 16px;
    line-height: 1.5;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
}
a {
    color: var(--green);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
button,
input,
select,
textarea {
    font: inherit;
}
button,
a,
input,
textarea,
select {
    -webkit-tap-highlight-color: transparent;
}
button {
    cursor: pointer;
}
button:disabled {
    cursor: wait;
    opacity: 0.6;
}
[hidden] {
    display: none !important;
}
h1,
h2,
h3,
h4 {
    font-family: Manrope, system-ui, sans-serif;
    line-height: 1.25;
    letter-spacing: -0.035em;
    margin: 0 0 0.65rem;
}
h1 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 750;
}
h2 {
    font-size: 1.35rem;
    font-weight: 750;
}
h3 {
    font-size: 1.1rem;
}
h4 {
    font-size: 1rem;
    margin-top: 1rem;
}
p {
    margin: 0.5rem 0 1rem;
}
.muted {
    color: var(--muted);
}
.small {
    font-size: 0.875rem;
}
.eyebrow {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    font-weight: 700;
    margin-bottom: 1rem;
}
.page {
    max-width: 1440px;
    margin: auto;
    padding: 2.8rem 3.5rem 4rem;
}
.app-header {
    background: white;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 2.5rem;
    align-items: center;
    min-height: 84px;
    padding: 1rem 3.5rem;
}
.brand {
    font-family: Manrope, sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    gap: 0.25rem;
    align-items: center;
    letter-spacing: -0.04em;
    white-space: nowrap;
}
.brand-light {
    font-weight: 400;
}
.brand-symbol {
    display: inline-grid;
    place-content: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    color: var(--mint);
    background: var(--green);
    font-size: 1.55rem;
    margin-right: 0.45rem;
}
.app-header nav {
    display: flex;
    gap: 1.8rem;
    flex: 1;
    font-size: 0.925rem;
    font-weight: 500;
}
.app-header nav a {
    color: var(--muted);
}
.app-header nav a[aria-current] {
    color: var(--green);
    font-weight: 700;
}
.app-header form {
    margin: 0;
}
.text-button {
    border: 0;
    background: none;
    color: var(--muted);
    padding: 0.5rem;
    font-size: 0.875rem;
}
.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.page-heading p {
    margin-bottom: 0;
}
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid var(--green);
    border-radius: 9px;
    padding: 0.8rem 1.2rem;
    background: var(--green);
    color: white;
    font-weight: 600;
    font-size: 0.925rem;
    min-height: 46px;
    white-space: nowrap;
}
.button:hover {
    text-decoration: none;
    background: #24594e;
}
.button.secondary {
    background: white;
    color: var(--green);
    border-color: #cbd8d0;
}
.button.secondary:hover {
    background: #edf5f0;
}
.button.full {
    display: flex;
    width: 100%;
    margin-top: 0.8rem;
}
.intro-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    background: var(--green);
    color: #f6fffa;
    border-radius: 18px;
    padding: 2.4rem 2.7rem;
    margin-bottom: 2.7rem;
    overflow: hidden;
}
.intro-banner h2 {
    font-size: 1.65rem;
    max-width: 600px;
    margin-top: 1rem;
}
.intro-banner p {
    color: #c0d6ca;
    max-width: 650px;
    margin-bottom: 0;
}
.pill {
    display: inline-block;
    background: var(--mint);
    color: var(--green);
    border-radius: 30px;
    padding: 0.25rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.pill.pale {
    background: #edf3ee;
    color: #526d5b;
}
.voice-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 170px;
    height: 130px;
    transform: rotate(-7deg);
    opacity: 0.85;
}
.voice-mark i {
    display: block;
    width: 12px;
    height: 35px;
    border-radius: 15px;
    background: var(--mint);
}
.voice-mark i:nth-child(2),
.voice-mark i:nth-child(6) {
    height: 62px;
}
.voice-mark i:nth-child(3),
.voice-mark i:nth-child(5) {
    height: 92px;
}
.voice-mark i:nth-child(4) {
    height: 125px;
}
.section-heading {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    margin: 1.6rem 0 1.1rem;
}
.section-heading h2 {
    margin: 0;
}
.count {
    font-size: 0.9rem;
    background: #e9eeea;
    border-radius: 7px;
    padding: 0.25rem 0.5rem;
    color: var(--muted);
    vertical-align: middle;
    margin-left: 0.4rem;
}
.search {
    display: flex;
    gap: 0.6rem;
    max-width: 470px;
}
.search input {
    margin: 0;
    min-width: 0;
}
.offer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
}
.offer-card {
    display: block;
    background: white;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.4rem;
    transition:
        transform 0.15s,
        border-color 0.15s;
}
.offer-card:hover {
    border-color: #9cb5a5;
    transform: translateY(-2px);
    text-decoration: none;
}
.offer-card h3 {
    margin-top: 1.4rem;
    font-size: 1.25rem;
}
.offer-card p {
    color: var(--muted);
    margin-bottom: 1.8rem;
}
.card-top,
.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
}
.card-meta {
    font-size: 0.875rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}
.card-meta strong {
    white-space: nowrap;
}
.empty-state {
    grid-column: 1/-1;
    text-align: center;
    border: 1px dashed #bdcec2;
    border-radius: 16px;
    padding: 3.5rem 2rem;
    color: var(--muted);
    background: white;
}
.empty-state h2 {
    color: var(--ink);
}
.empty-symbol {
    display: block;
    font-size: 2.4rem;
    color: #638f73;
    margin-bottom: 1rem;
}
.panel {
    padding: 1.6rem;
    background: white;
    border: 1px solid var(--line);
    border-radius: 13px;
    margin-bottom: 1.2rem;
}
.panel .section-heading:first-child {
    margin-top: 0;
}
.narrow {
    max-width: 780px;
}
.editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 1.6rem;
    align-items: start;
}
.editor-sidebar {
    position: sticky;
    top: 1rem;
    min-width: 0;
}
.voice-panel {
    background: #eff7f0;
    border-color: #d3e6d5;
}
.voice-panel h2 {
    font-size: 1.45rem;
}
.voice-panel .eyebrow {
    color: #5d7f66;
}
.record-button {
    width: 100%;
    padding: 1.1rem;
    border: 0;
    border-radius: 10px;
    background: var(--green);
    color: white;
    font-weight: 600;
    margin: 0.4rem 0;
}
.record-button.recording {
    background: #a43636;
}
.record-button:focus-visible {
    outline: 3px solid #7dbca1;
    outline-offset: 3px;
}
.totals > div {
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
    margin-bottom: 0.8rem;
    font-size: 0.925rem;
}
.totals .grand-total {
    font-size: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    margin-top: 1rem;
}
.totals > form {
    margin: 0;
}
.day-card {
    background: white;
    border: 1px solid #cfded4;
    border-radius: 13px;
    padding: 1.3rem;
    margin-bottom: 1.4rem;
}
.day-card > .section-heading {
    margin-top: 0;
}
.course-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
}
.course-card summary {
    padding: 1rem;
    background: #f3f7f4;
    cursor: pointer;
    font-weight: 700;
}
.course-card summary span {
    font-weight: 400;
    font-size: 0.875rem;
    margin-left: 0.8rem;
}
.course-content {
    padding: 1rem;
}
.item-card {
    background: #fafcfb;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 1rem;
    margin-bottom: 0.9rem;
}
.entry-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.8rem;
}
.entry-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}
.entry-actions button {
    border: 0;
    background: transparent;
    padding: 0.4rem 0.45rem;
    font-size: 0.75rem;
    color: #54675e;
    border-radius: 5px;
    min-height: 36px;
}
.entry-actions button:hover {
    background: #e6eee8;
}
.entry-actions button.danger-text {
    color: var(--danger);
}
.add-button {
    border: 1px dashed #afc4b6;
    background: transparent;
    color: var(--green);
    width: 100%;
    font-size: 0.875rem;
}
.add-button:hover {
    background: #edf6f0;
}
.field-grid {
    display: grid;
    gap: 0 1rem;
}
.field-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.item-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.field-grid > div {
    min-width: 0;
}
label,
legend {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}
input:not([type="hidden"]):not([type="checkbox"]),
select,
textarea {
    width: 100%;
    border: 1px solid #ccd8d0;
    border-radius: 7px;
    background: white;
    color: var(--ink);
    padding: 0.7rem 0.75rem;
    min-height: 44px;
    margin-bottom: 1rem;
    outline: none;
}
input:focus,
select:focus,
textarea:focus {
    border-color: #4c896b;
    box-shadow: 0 0 0 3px #dceee2;
}
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%2353675d' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 30px;
}
textarea {
    resize: vertical;
}
input[type="checkbox"] {
    margin: 0.5rem;
}
.help-text,
.form-help {
    font-size: 0.875rem;
    color: var(--muted);
    margin: -0.5rem 0 1rem;
}
form ul {
    color: var(--danger);
    font-size: 0.875rem;
    padding-left: 1.2rem;
}
.notice {
    padding: 1rem 1.2rem;
    border-radius: 9px;
    margin: 0 0 1.3rem;
    background: #e5f0e8;
    border: 1px solid #bfd8c6;
}
.notice.error {
    background: #fff0ef;
    border-color: #edc4c1;
    color: #8b3434;
}
.notice.success {
    background: #e8f6eb;
}
.notice ul {
    margin-bottom: 0;
}
.back-link {
    display: inline-block;
    font-size: 0.875rem;
    margin-bottom: 0.7rem;
}
.separator {
    color: #9aada0;
    margin: 0 0.65rem;
}
.history-row {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.875rem;
}
.record-list {
    margin-top: 1.5rem;
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}
.record-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.3rem 1.5rem;
    border-bottom: 1px solid var(--line);
}
.record-row:last-child {
    border: 0;
}
.record-row:hover {
    background: #f0f7f2;
    text-decoration: none;
}
.record-row h3 {
    margin-bottom: 0.3rem;
}
.record-row > span {
    font-size: 0.875rem;
}
.proposal-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.3rem;
}
.proposed {
    border-color: #90b69e;
    background: #f8fff9;
}
.proposal-day {
    border-top: 1px solid var(--line);
    padding-top: 1rem;
    margin-top: 1rem;
}
.proposal-day li {
    margin-bottom: 0.7rem;
}
.login-page {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    min-height: 100vh;
}
.login-story {
    background: var(--green);
    color: white;
    padding: 3.5rem 4.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.login-story h1 {
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    letter-spacing: -0.05em;
    line-height: 1.1;
}
.login-story .eyebrow,
.login-story p {
    color: #bed6c8;
}
.login-story .brand-symbol {
    background: #29564a;
}
.login-story p {
    font-size: 1.1rem;
}
.login-form {
    width: 100%;
    max-width: 500px;
    margin: auto;
    padding: 3rem;
}
.login-form h2 {
    font-size: 1.8rem;
}
.login-form form {
    margin: 2rem 0;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
:focus-visible {
    outline: 3px solid #77a98a;
    outline-offset: 3px;
}
@media (min-width: 1450px) {
    .page {
        padding-top: 3.5rem;
    }
}
@media (max-width: 1150px) {
    .page {
        padding: 2rem;
    }
    .app-header {
        padding: 1rem 2rem;
        gap: 1.5rem;
    }
    .app-header nav {
        gap: 1rem;
    }
    .offer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .editor-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
    }
    .item-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .entry-actions button {
        font-size: 0.8rem;
    }
}
@media (max-width: 850px) {
    .app-header {
        flex-wrap: wrap;
        gap: 0.7rem 1rem;
        padding: 1rem 1.2rem;
    }
    .app-header nav {
        order: 3;
        flex-basis: 100%;
        overflow-x: auto;
        padding-top: 0.5rem;
    }
    .app-header form {
        margin-left: auto;
    }
    .page {
        padding: 1.5rem 1rem 5rem;
    }
    .editor-layout {
        display: flex;
        flex-direction: column;
    }
    .editor-layout > div,
    .editor-sidebar {
        width: 100%;
    }
    .editor-sidebar {
        position: static;
    }
    .page-heading {
        align-items: flex-start;
    }
    .page-heading > .button {
        position: fixed;
        bottom: 1rem;
        right: 1rem;
        z-index: 4;
        box-shadow: 0 6px 24px #123b3530;
    }
    .intro-banner {
        padding: 1.7rem;
    }
    .intro-banner h2 {
        font-size: 1.5rem;
    }
    .voice-mark {
        min-width: 100px;
        gap: 5px;
    }
    .voice-mark i {
        width: 8px;
    }
    .page-heading h1 {
        font-size: 1.8rem;
    }
    .day-card {
        padding: 1rem;
    }
    .day-card > .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.4rem;
    }
    .login-story {
        padding: 2rem;
    }
    .login-story h1 {
        font-size: 3rem;
    }
    .login-form {
        padding: 2rem;
    }
    .entry-actions button {
        min-height: 44px;
    }
    .proposal-columns {
        grid-template-columns: 1fr;
    }
    .save-button {
        width: 100%;
    }
    .item-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 560px) {
    .offer-grid {
        grid-template-columns: 1fr;
    }
    .page-heading {
        flex-wrap: wrap;
    }
    .section-heading {
        flex-wrap: wrap;
    }
    .search {
        width: 100%;
        max-width: none;
    }
    .voice-mark {
        display: none;
    }
    .intro-banner {
        padding: 1.5rem;
    }
    .field-grid.two {
        grid-template-columns: 1fr;
    }
    .course-content {
        padding: 0.75rem;
    }
    .item-card {
        padding: 0.75rem;
    }
    .panel {
        padding: 1.2rem;
    }
    .entry-actions {
        gap: 0;
    }
    .entry-actions button {
        padding: 0.4rem;
        font-size: 0.8rem;
    }
    .login-page {
        display: block;
    }
    .login-story {
        min-height: 280px;
        padding: 1.7rem;
        gap: 2rem;
    }
    .login-story h1 {
        font-size: 2.4rem;
    }
    .login-story > p {
        display: none;
    }
    .login-story > div > p {
        margin: 0;
        font-size: 1rem;
    }
    .login-form {
        padding: 2rem 1.5rem;
    }
    .record-row {
        padding: 1rem;
    }
    .card-meta {
        flex-wrap: wrap;
    }
}
@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

.day-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    padding: 0.25rem 0;
    font-size: 1.2rem;
    list-style: none;
}
.day-heading:before {
    content: "+";
    font-weight: 600;
}
.day-card[open] > .day-heading:before {
    content: "−";
}
.day-heading strong {
    flex: 1;
}
.day-content {
    margin-top: 1.2rem;
}
.day-navigation {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    margin-bottom: 1rem;
    padding-bottom: 0.3rem;
}
.day-navigation button {
    border: 1px solid #c5d8cb;
    border-radius: 30px;
    padding: 0.5rem 0.9rem;
    background: white;
    color: var(--green);
    white-space: nowrap;
    min-height: 44px;
}
.subtotal {
    text-align: right;
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 1rem;
}
.day-card {
    scroll-margin-top: 1rem;
}
