:root {
    --ink-950: #0b1620;
    --ink-900: #102433;
    --ink-800: #17384a;
    --ink-700: #2d5367;
    --ink-500: #5f8091;
    --sand-300: #f2d39c;
    --sand-200: #f6e5c2;
    --sand-100: #fbf4e8;
    --mint-500: #3f9b93;
    --mint-400: #69b4aa;
    --coral-400: #e08a53;
    --cream-50: #fffdf8;
    --white-90: rgba(255, 255, 255, 0.9);
    --white-75: rgba(255, 255, 255, 0.75);
    --border-soft: rgba(23, 56, 74, 0.12);
    --border-strong: rgba(23, 56, 74, 0.2);
    --shadow-soft: 0 20px 50px rgba(11, 22, 32, 0.08);
    --shadow-card: 0 24px 60px rgba(16, 36, 51, 0.14);
    --shadow-lift: 0 30px 70px rgba(16, 36, 51, 0.2);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --transition: 240ms ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--ink-900);
    background:
        radial-gradient(circle at top left, rgba(105, 180, 170, 0.22), transparent 30%),
        radial-gradient(circle at top right, rgba(224, 138, 83, 0.18), transparent 28%),
        radial-gradient(circle at bottom left, rgba(242, 211, 156, 0.3), transparent 35%),
        linear-gradient(160deg, #fffdf7 0%, #f5f4ef 52%, #eef5f4 100%);
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: auto;
    border-radius: 999px;
    pointer-events: none;
    z-index: -1;
    filter: blur(10px);
    animation: floatOrb 12s ease-in-out infinite;
}

body::before {
    top: -4rem;
    right: -6rem;
    width: 20rem;
    height: 20rem;
    background: rgba(63, 155, 147, 0.14);
}

body::after {
    bottom: -8rem;
    left: -5rem;
    width: 24rem;
    height: 24rem;
    background: rgba(224, 138, 83, 0.1);
    animation-delay: -4s;
}

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

button {
    border: 0;
}

.container {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

.home-page {
    padding: 1rem 0 1.5rem;
}

.home-hero {
    position: relative;
    display: block;
    padding: clamp(1.2rem, 2.2vw, 1.9rem);
    margin-bottom: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(11, 22, 32, 0.95), rgba(23, 56, 74, 0.88)),
        linear-gradient(140deg, rgba(242, 211, 156, 0.08), transparent 60%);
    box-shadow: var(--shadow-lift);
    overflow: hidden;
}

.home-hero::before,
.home-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.home-hero::before {
    top: -6rem;
    right: -6rem;
    width: 18rem;
    height: 18rem;
    background: radial-gradient(circle, rgba(242, 211, 156, 0.18), transparent 65%);
}

.home-hero::after {
    bottom: -8rem;
    left: 35%;
    width: 22rem;
    height: 22rem;
    background: radial-gradient(circle, rgba(105, 180, 170, 0.15), transparent 68%);
}

.hero-copy,
.hero-insight-card {
    position: relative;
    z-index: 1;
}

.hero-copy {
    max-width: 100%;
}

.hero-kicker,
.section-kicker,
.panel-eyebrow,
.card-kicker,
.insight-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    font-size: 0.76rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 800;
}

.hero-kicker {
    color: #f8e6c4;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 0.9rem;
}

.home-hero h1,
.app-container h1 {
    font-family: "DM Serif Display", Georgia, serif;
    font-weight: 400;
    letter-spacing: -0.03em;
}

.home-hero h1 {
    color: #fef8ee;
    font-size: clamp(2.45rem, 4.1vw, 4.15rem);
    line-height: 0.92;
    max-width: 15ch;
    margin-bottom: 0.7rem;
}

.subtitle {
    max-width: 58rem;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1rem;
    line-height: 1.55;
}

.hero-note {
    max-width: 64rem;
    margin-top: 0.75rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.98rem;
    line-height: 1.6;
}

.hero-cta,
.back-btn,
.event-style form button,
.survey-style form button,
.todo-style form button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.95rem 1.5rem;
    border-radius: 999px;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}

.hero-cta {
    font-weight: 800;
}

.hero-cta.primary {
    color: var(--ink-950);
    background: linear-gradient(135deg, var(--sand-300), #f7e8c9);
    box-shadow: 0 18px 36px rgba(242, 211, 156, 0.18);
}

.hero-cta.secondary {
    color: #fef8ee;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-cta:hover,
.back-btn:hover,
.event-style form button:hover:not(:disabled),
.survey-style form button:hover:not(:disabled),
.todo-style form button:hover {
    transform: translateY(-2px);
}

.section-kicker,
.panel-eyebrow,
.card-kicker {
    color: var(--mint-500);
    background: rgba(63, 155, 147, 0.1);
}

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

.app-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    overflow: hidden;
    min-height: 15.5rem;
    padding: 1.4rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(251, 246, 236, 0.95));
    box-shadow: var(--shadow-card);
    color: inherit;
    text-decoration: none;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.app-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 0.32rem;
    background: linear-gradient(90deg, var(--mint-500), var(--sand-300), var(--coral-400));
}

.app-card::after {
    content: "";
    position: absolute;
    inset: auto -2rem -2rem auto;
    width: 8rem;
    height: 8rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(63, 155, 147, 0.15), transparent 70%);
    transition: transform 400ms ease;
}

.app-card-button {
    width: 100%;
    text-align: left;
    appearance: none;
    cursor: pointer;
}

.app-card:hover {
    transform: translateY(-0.35rem);
    box-shadow: 0 30px 65px rgba(16, 36, 51, 0.18);
    border-color: rgba(63, 155, 147, 0.24);
}

.app-card:hover::after {
    transform: scale(1.15);
}

.panel-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.9rem;
    margin-bottom: 0.85rem;
    border-radius: 999px;
    background: rgba(16, 36, 51, 0.06);
    color: var(--ink-800);
    font-size: 0.77rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.app-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.app-title {
    font-family: "DM Serif Display", Georgia, serif;
    font-size: 1.55rem;
    line-height: 1.05;
    margin-bottom: 0.55rem;
}

.app-desc {
    color: var(--ink-700);
    font-size: 0.96rem;
    line-height: 1.55;
    width: 100%;
}

.app-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.9rem;
    color: var(--ink-900);
    font-weight: 800;
}

.app-card-link::after {
    content: "\2192";
    transition: transform var(--transition);
}

.app-card:hover .app-card-link::after {
    transform: translateX(0.3rem);
}

.hidden {
    display: none;
}

.back-btn {
    margin: 1.25rem auto 1rem;
    color: var(--ink-950);
    background: linear-gradient(135deg, var(--sand-300), #f8e6be);
    box-shadow: 0 14px 28px rgba(224, 138, 83, 0.16);
}

.app-container {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto 2rem;
    padding: 1rem 0 2rem;
}

.app-container > header {
    position: relative;
    margin-bottom: 1.35rem;
    padding: clamp(1.5rem, 3.6vw, 2.35rem);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(16, 36, 51, 0.95), rgba(23, 56, 74, 0.88)),
        linear-gradient(145deg, rgba(242, 211, 156, 0.08), transparent 60%);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.app-container > header::after {
    content: "";
    position: absolute;
    right: -2rem;
    bottom: -2rem;
    width: 11rem;
    height: 11rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(242, 211, 156, 0.16), transparent 68%);
}

.app-container h1 {
    color: #fff8ea;
    font-size: clamp(2.3rem, 4vw, 3.7rem);
    line-height: 1;
    margin-top: 0.85rem;
}

.panel-subtitle {
    max-width: 46rem;
    margin-top: 0.8rem;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.75;
}

.form-card,
.table-card,
.survey-style .preview,
.response-card,
.todo-section,
.task-form-section {
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(251, 245, 235, 0.94));
    box-shadow: var(--shadow-soft);
}

.card-heading {
    margin-bottom: 1.3rem;
}

.card-heading h2,
.preview h2,
.responses h2,
.todo-section h3 {
    font-family: "DM Serif Display", Georgia, serif;
    font-weight: 400;
}

.card-heading h2,
.preview h2,
.responses h2 {
    font-size: 2rem;
    line-height: 1.08;
}

.card-heading.split {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
}

.event-style main,
.todo-style main {
    display: grid;
    gap: 1.35rem;
}

.event-style main {
    grid-template-columns: minmax(320px, 0.95fr) minmax(420px, 1.05fr);
    align-items: start;
}

.survey-style .container {
    display: grid;
    grid-template-columns: minmax(340px, 1fr) minmax(300px, 0.82fr);
    gap: 1.35rem;
    margin: 0 auto 1.35rem;
    padding: 0;
}

.form-card,
.table-card,
.survey-style .preview,
.response-card,
.task-form-section {
    padding: 1.5rem;
}

.filter-group {
    min-width: 13rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-group {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--ink-900);
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.95rem 1rem;
    margin-bottom: 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(23, 56, 74, 0.16);
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink-900);
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition), background var(--transition);
}

input::placeholder,
textarea::placeholder {
    color: rgba(45, 83, 103, 0.6);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(63, 155, 147, 0.72);
    box-shadow: 0 0 0 0.3rem rgba(63, 155, 147, 0.13);
    background: #ffffff;
}

textarea {
    min-height: 8rem;
    resize: vertical;
}

.event-style form button,
.survey-style form button,
.todo-style form button {
    padding-inline: 1.4rem;
    background: linear-gradient(135deg, var(--ink-900), var(--ink-800));
    color: #fffaf0;
    font-weight: 800;
    box-shadow: 0 18px 36px rgba(16, 36, 51, 0.18);
}

.event-style form button:disabled,
.survey-style form button:disabled {
    background: #d3d9dd;
    color: #667887;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.error {
    display: none;
    margin: -0.2rem 0 0.8rem;
    color: #c05b4d;
    font-size: 0.92rem;
    font-weight: 700;
}

.table-container,
.response-card {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 36rem;
}

th,
td {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid rgba(23, 56, 74, 0.1);
    text-align: left;
    vertical-align: top;
}

th {
    color: #fef6e5;
    background: linear-gradient(135deg, var(--ink-900), var(--ink-800));
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

tbody tr {
    transition: background var(--transition), transform var(--transition);
}

tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.55);
}

tbody tr:hover {
    background: rgba(63, 155, 147, 0.08);
}

.empty-row td {
    color: var(--ink-700);
    text-align: center;
    font-weight: 700;
}

.survey-style .preview {
    position: sticky;
    top: 1.5rem;
    display: grid;
    gap: 1rem;
    align-self: start;
}

.preview-box {
    padding: 1.2rem;
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 245, 238, 0.9)),
        linear-gradient(135deg, rgba(242, 211, 156, 0.16), transparent 65%);
    border: 1px solid rgba(23, 56, 74, 0.08);
}

.preview-box p {
    color: var(--ink-800);
    line-height: 1.7;
}

.preview-box p + p {
    margin-top: 0.45rem;
}

.preview-box strong {
    color: var(--ink-950);
}

.responses {
    padding: 0;
}

.summary-box {
    background:
        linear-gradient(180deg, rgba(63, 155, 147, 0.09), rgba(255, 255, 255, 0.92)),
        linear-gradient(135deg, rgba(242, 211, 156, 0.12), transparent 65%);
}

.todo-style main {
    max-width: 1080px;
    margin: 0 auto;
}

.todo-lists {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.35rem;
}

.todo-section {
    overflow: hidden;
}

.todo-section h3 {
    padding: 1.2rem 1.4rem;
    color: #fff6e8;
    background: linear-gradient(135deg, var(--ink-900), var(--ink-800));
    font-size: 1.8rem;
}

.task-list {
    list-style: none;
    min-height: 16rem;
    max-height: 30rem;
    overflow-y: auto;
    padding: 0.65rem;
}

.task-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
    margin-bottom: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(23, 56, 74, 0.08);
    background: rgba(255, 255, 255, 0.92);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.task-list li:hover {
    transform: translateY(-2px);
    border-color: rgba(63, 155, 147, 0.22);
    box-shadow: 0 16px 28px rgba(16, 36, 51, 0.08);
}

.task-list li:last-child {
    margin-bottom: 0;
}

.empty-task {
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--ink-700);
    font-weight: 700;
    min-height: 12rem;
    background: rgba(251, 244, 232, 0.78);
    box-shadow: none;
}

.empty-task:hover {
    transform: none;
    border-color: rgba(23, 56, 74, 0.08);
}

.task-label {
    flex: 1;
    line-height: 1.6;
}

.task-label strong {
    display: block;
    color: var(--ink-950);
    font-size: 1.05rem;
    margin-bottom: 0.3rem;
}

.task-label small,
.task-label em {
    display: block;
    color: var(--ink-700);
}

.task-label em {
    margin-top: 0.2rem;
    font-style: normal;
}

.task-icons {
    display: flex;
    gap: 0.6rem;
    flex-shrink: 0;
}

.task-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(23, 56, 74, 0.1);
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink-900);
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}

.task-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 36, 51, 0.12);
}

.complete-icon:hover,
.restore-icon:hover {
    background: rgba(63, 155, 147, 0.12);
    color: var(--mint-500);
}

.delete-icon:hover {
    background: rgba(192, 91, 77, 0.12);
    color: #c05b4d;
}

.priority-urgent {
    color: #cc5848;
}

.priority-high {
    color: #d26e3b;
}

.priority-medium {
    color: #b88b2f;
}

.priority-low {
    color: #338070;
}

.toast-region {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    display: grid;
    gap: 0.7rem;
    width: min(22rem, calc(100% - 2rem));
    z-index: 30;
}

.toast {
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    background: rgba(16, 36, 51, 0.94);
    color: #fffaf0;
    box-shadow: 0 18px 36px rgba(11, 22, 32, 0.24);
    border: 1px solid rgba(255, 255, 255, 0.08);
    opacity: 0;
    transform: translateY(1rem);
    animation: toastIn 320ms ease forwards;
}

.toast.success {
    background: rgba(23, 56, 74, 0.96);
}

.toast.info {
    background: rgba(63, 155, 147, 0.95);
}

.toast.fade-out {
    animation: toastOut 280ms ease forwards;
}

[data-reveal] {
    opacity: 0;
    transform: translateY(1.6rem);
    transition: opacity 700ms ease, transform 700ms ease;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

.panel-shell.panel-live {
    animation: panelIn 500ms ease both;
}

::-webkit-scrollbar {
    width: 0.7rem;
    height: 0.7rem;
}

::-webkit-scrollbar-track {
    background: rgba(16, 36, 51, 0.06);
}

::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: linear-gradient(180deg, var(--ink-700), var(--mint-500));
}

@keyframes floatOrb {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, 1rem, 0);
    }
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(0.75rem);
    }
}

@keyframes panelIn {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1024px) {
    .app-grid,
    .todo-lists {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-hero,
    .event-style main,
    .survey-style .container {
        grid-template-columns: 1fr;
    }

    .survey-style .preview {
        position: static;
    }
}

@media (max-width: 768px) {
    .home-page {
        padding-top: 1rem;
    }

    .home-hero,
    .app-container > header,
    .form-card,
    .table-card,
    .survey-style .preview,
    .response-card,
    .task-form-section {
        border-radius: 1.5rem;
    }

    .app-grid,
    .todo-lists {
        grid-template-columns: 1fr;
    }

    .card-heading.split,
    .form-row {
        flex-direction: column;
    }

    .todo-style form button {
        width: 100%;
    }

    .task-list li {
        flex-direction: column;
    }

    .task-icons {
        width: 100%;
        justify-content: flex-end;
    }

    table {
        min-width: 32rem;
    }
}

@media (max-width: 540px) {
    .container,
    .app-container {
        width: min(100%, calc(100% - 1rem));
    }

    .home-hero {
        padding: 1.4rem;
    }

    .home-hero h1,
    .app-container h1 {
        font-size: 2.4rem;
    }

    .card-heading h2,
    .preview h2,
    .responses h2,
    .todo-section h3 {
        font-size: 1.55rem;
    }

    .hero-cta,
    .back-btn,
    .event-style form button,
    .survey-style form button,
    .todo-style form button {
        width: 100%;
    }

    th,
    td {
        padding: 0.8rem;
    }

    table {
        min-width: 28rem;
    }
}
