@view-transition {
    navigation: auto;
}

:root {
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;

    --leading-lg: 1.75rem; 
    --leading-xl: 1.75rem; 
    --leading-2xl: 2rem; 
    --leading-3xl: 2.25rem;

    --color-white: #ffffff;
    --color-black: #000000;

    --color-gray-100: #F3F4F6;
    --color-gray-200: #E5E7EB;
    --color-gray-300: #D1D5DB;
    --color-gray-400: #9CA3AF;
    --color-gray-500: #6B7280;
    --color-gray-600: #6B7280;
    --color-gray-700: #374151;
    --color-gray-800: #1F2937;
    --color-gray-900: #111827;

    --color-red-100: #FEE2E2;
    --color-red-200: #FECACA;
    --color-red-300: #FCA5A5;
    --color-red-400: #F87171;
    --color-red-500: #EF4444;
    --color-red-600: #DC2626;
    --color-red-700: #B91C1C;
    --color-red-800: #991B1B;
    --color-red-900: #7F1D1D;

    --color-blue-100: #DBEAFE;
    --color-blue-200: #BFDBFE;
    --color-blue-300: #93C5FD;
    --color-blue-400: #60A5FA;
    --color-blue-500: #3B82F6;
    --color-blue-600: #2563EB;
    --color-blue-700: #1D4ED8;
    --color-blue-800: #1E40AF;
    --color-blue-900: #1E3A8A;

    --color-green-50: #ECFDF5; 
    --color-green-100: #D1FAE5; 
    --color-green-200: #A7F3D0; 
    --color-green-300: #6EE7B7; 
    --color-green-400: #34D399; 
    --color-green-500: #10B981; 
    --color-green-600: #059669; 
    --color-green-700: #047857; 
    --color-green-800: #065F46; 
    --color-green-900: #064E3B; 


}


*, ::before, ::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: var(--color-gray-200);
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans",
               sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
               "Segoe UI Symbol", "Noto Color Emoji";
}

body {
  margin: 0;
  line-height: inherit;
  background-color: var(--color-white);
  color: var(--color-gray-900);
}

h1, h2, h3, h4, h5, h6, p {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

a {
  color: inherit;
  text-decoration: inherit;
}

ul, ol, menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  vertical-align: middle;
  margin-inline: auto;
  max-width: 100%;
  height: auto;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  line-height: inherit;
}

button {
  cursor: pointer;
  background: none;
}

:disabled {
  cursor: default;
}

table {
  border-collapse: collapse;
  border-color: inherit;
}

caption {
  text-align: left;
  color: var(--color-gray-500);
}

/* 8. Misc */
::placeholder {
  color: var(--color-gray-400);
  opacity: 1;
}


.no-scrollbar::-webkit-scrollbar {
    display: none;
}
/* Hide scrollbar for IE, Edge and Firefox */
.no-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.intersect-hide {
    opacity: 0;
    transition: all 1s;
}

.intersect-show {
    opacity: 1;
}

.htmx-indicator{
    display:none;
    opacity:0;
    transition: opacity 500ms ease-in;
}

.htmx-request .htmx-indicator{
    display:inline-block;
    opacity:1
}
.htmx-request.htmx-indicator{
    display:inline-block;
    opacity:1
}

.htmx-indicator-hide{
    display: block;
}

.htmx-request .htmx-indicator-hide{
    display: none;
}
.htmx-request.htmx-indicator-hide{
    display: none;
}

ruby {
    ruby-position: under;
}

{{/* [data-js-word].active {
    color: black;
} */}}

span.translating {
    text-decoration: underline #00a6f4;
}

[data-js-word].translating {
    text-decoration: underline #00a6f4;
}

#translate-widget.htmx-added {
    opacity: 0;
    transform: translateY(8px);
}

#translate-widget {
    opacity: 1;
    transition: all 100ms ease-in;
}

#speed-widget.htmx-added {
    opacity: 0;
    transform: translateY(8px);
}

#speed-widget {
    opacity: 1;
    transition: all 100ms ease-in;
}

{{/* button[data-speed].active {
    background-color: #3c82f6;
} */}}

.recording-item.htmx-added {
opacity: 0;
}

.recording-item {
opacity: 1;
transition: opacity 1s ease-out;
}

@keyframes fade-in {
    from { opacity: 0; }
}

@keyframes fade-out {
    to { opacity: 0; }
}

@keyframes slide-from-right {
    from { transform: translateX(90px); }
}

@keyframes slide-to-left {
    to { transform: translateX(-90px); }
}

.slide-it {
    view-transition-name: slide-it;
}

::view-transition-old(slide-it) {
    animation: 180ms cubic-bezier(0.4, 0, 1, 1) both fade-out,
    600ms cubic-bezier(0.4, 0, 0.2, 1) both slide-to-left;
}
::view-transition-new(slide-it) {
    animation: 420ms cubic-bezier(0, 0, 0.2, 1) 90ms both fade-in,
    600ms cubic-bezier(0.4, 0, 0.2, 1) both slide-from-right;
}

{# Page load indicator styles #}

.page-indicator {
    display: none;
}

.htmx-request .page-indicator{
    display:inline;
}

.htmx-request.page-indicator{
    display:inline;
}

.animate-move {
    animation: move 1.5s linear infinite;
}

@keyframes move {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(500%);
    }
}

.new-hidden {
    display: none !important;
}

body {
    overflow-y: scroll;
}

.new-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0; 
}

.wrapper {
    max-width: 800px;
    margin-inline: auto;
}

.wrapper--small {
    max-width: 500px;
    margin-inline: auto;
}

.wrapper--form {
    max-width: 500px;
    margin-inline: auto;
}

.heading {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.heading--large {
    font-size: 24px;
    line-height: 32px;
    font-weight: 600;
}

.heading--3xl {
    font-size: var(--text-3xl);
    line-height: var(--leading-3xl);
    font-weight: 600;
}

.divider {
    margin-block: 16px;
}

.link {
    color: var(--color-blue-500);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.link:hover {
    color: var(--color-blue-600);
}

@media screen and (width <= 639px) {
    .wrapper {
        padding-inline: 8px;
    }

    .wrapper--small {
        padding-inline: 8px;
    }
}

form {
    margin-bottom: 1rem;

    label {
        display: grid;
        gap: 0.25rem;
        font-weight: 600;

        .description {
            font-weight: 400;
            font-style: italic;
        }
    }

    input {
        border: 1px solid var(--color-gray-300);
        border-radius: 0.25rem;
        padding-block: 0.25rem;
        padding-inline: 0.5rem;
        font-weight: 400;
    }

    button {
        margin-top: 0.5rem;
        display: block;
        cursor: pointer;
        width: 100%;
        padding-block: 0.25rem;
        padding-inline: 0.5rem;
        background-color: var(--color-gray-800);
        color: var(--color-white);
        border-radius: 0.25rem;
    }

    button:hover {
        background-color: var(--color-gray-700);
    }

    button:active {
        background-color: var(--color-gray-900);
    }

    button:disabled {
        cursor: not-allowed;
        background-color: pink;
    }

    .error {
        text-align: right;
        display: block;
        color: var(--color-red-500);
        font-size: 12px;
        min-height: 18px;
    }
}

.toast {
    position: fixed;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 90%;
    max-width: 300px;
    padding-inline: 1rem;
    padding-block: 0.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.toast.htmx-swapping {
    opacity: 0;
    transition: opacity 500ms ease-out;
}

.toast.success {
    background-color: var(--color-green-300);
    color: var(--color-black);
}

.toast.error {
    background-color: var(--color-red-300);
    color: var(--color-black);
}

{{/* forms */}}

.form__input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.form__label {
    margin-bottom: 4px;
}

.form__input, .form__textarea {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid grey;
}

.form__error {
    color: var(--color-red-600);
    align-self: end;
    min-height: 21px;
    font-size: 14px;
}

.form__button-bar {
    display: flex;
    justify-content: space-between;
}

.form__button {
    display: block;
    width: 100%;
    height: 34px;
    background-color: var(--color-gray-800);
    color: var(--color-white);
    padding: 4px 8px;
    border-radius: 0.25rem;
    transition: scale ease-in 100ms;
    place-self: start;
    cursor: pointer;
}

.form__button:hover {
    background-color: var(--color-gray-700);
}

.form__button:active {
    background-color: var(--color-gray-900);
    scale: 98%;
}

{{/* main {
    min-height: 100vh;
    padding-top: 48px;
} */}}

{{/* header styles */}}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--color-gray-200);

    .wrapper {
        height: 48px;
        width: 100%;
        max-width: 800px;
        margin-inline: auto;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    @media screen and (width <= 820px) {
        .wrapper {
            padding-inline: 8px;
        }
    }

    .content {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .logo {
        font-size: 1.25rem;
        line-height: 1.75rem;
    }

    .nav {
        display: flex;
        align-items: center;
        gap: 8px;
        z-index: 10001;
    }

    .open-button {
        display: none;
        stroke: black;
    }

    .open-button.white {
        stroke: white;
    }

    .close-button {
        display: none;
    }

    @media screen and (width <= 639px) {
        .nav {
            display: none;
            position: absolute;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background-color: var(--color-white);
            color: black;
            font-size: 1.5rem;
            line-height: 2rem;
        }

        .open {
            display: grid;
            text-align: center;
            place-content: center;
            gap: 1rem;
        }

        .open-button {
            display: block;
        }

        .close-button {
            display: flex;
            justify-content: center;
            text-align: center;
        }
    }

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

    .language-select {
        display: flex;
        gap: 2px;
    }

    .select {
        border: 1px solid #e4e4e7;
        border-radius: 0.25rem;
        padding: 4px;
    }

    .select option {
        color: var(--color-gray-900);
    }

    .avatar {
        position: relative;
        color: white;
        font-weight: 600;
    }
}

.header.guest {
    color: var(--color-white);
    background-color: var(--color-gray-900);
}

.avatar {
    .icon {
        width: 2rem;
        height: 2rem;
        border-radius: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
    }

    .dropdown {
        width: 150px;
        font-weight: 400;
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        margin-top: 0.25rem;
        padding: 0.5rem;
        border-radius: 0.25rem;
        background-color: var(--color-white);
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    }

    .dropdown.show {
        display: grid;
        color: var(--color-gray-900);
    }

    .dropdown a {
        border-radius: 0.25rem;
        margin-bottom: 0.25rem;
        padding-inline: 0.5rem;
    }

    .dropdown a:hover {
        background-color: var(--color-gray-200);
    }

    .dropdown select {
        width: 100%;
    }
}

.globe {
    width: 24px;
    aspect-ratio: 1;
}

{{/* footer styles */}}

.footer {
    text-align: center;
    padding: 64px 0;
    font-size: 14px;
    color: var(--color-gray-100);
    background-color: var(--color-gray-900)

}

{{/* home page styles */}}

.hero {
    min-height: 75vh;
    padding-top: 48px;

}

.hero__content {
    text-align: center;
}

.hero__headline {
    font-size: 3.75rem; /* 60px */
    line-height: 1;
    font-weight: bold;
    margin-bottom: 16px;
}

.hero__subheadline {
    max-width: 500px;
    margin-inline: auto;
    margin-bottom: 32px;
    font-size: 1.5rem; /* 24px */
    line-height: 2rem; /* 32px */
    color: var(--color-gray-700);
}

.hero__actions {
    max-width: 500px;
    margin-inline: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.hero__action {
    display: inline-block;
    padding: 8px 0;
    text-align: center;
    text-transform: uppercase;
    border-radius: 0.25rem;
    transition: 
        scale 50ms ease-in,
        color 50ms ease-in,
        background-color 50ms ease-in;
}

.hero__action:active {
    scale: 98%;
}

.hero__action--primary {
    border: 1px solid var(--color-gray-800);
    background-color: var(--color-gray-800);
    color: var(--color-white);
}

.hero__action--primary:hover {
    background-color: var(--color-gray-700);
}

.hero__action--primary:active {
    background-color: var(--color-gray-900);
}

.hero__action--secondary {
    border: 1px solid var(--color-gray-800);
    color: var(--color-black);
}

.hero__action--secondary:hover {
    background-color: var(--color-gray-200);
}

.hero__action--secondary:active {
    background-color: var(--color-gray-300);
}


@media screen and (width <= 639px) {
    .hero {
        min-height: 100vh;
    }

    .hero__headline {
        font-size: 2.25rem;
        line-height: 2.5rem;
        font-weight: bold;
        margin-bottom: 16px;
    }

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

.support {
    min-height: 50vh;
    text-align: center;
}

.support__headline {
    font-size: 2.25rem; /* 36px */
    line-height: 2.5rem; 
    font-weight: bold;
    text-wrap: balance;
    margin-bottom: 8px;
}

.support__description {
    text-wrap: balance;
}

@media screen and (width <= 639px) {


    .support__headline {
        font-size: 1.875rem; /* 30px */
        line-height: 2.25rem; /* 36px */
    }
}

.home-try {
    min-height: 50vh;
    color: var(--color-white);
    background-color: var(--color-gray-900);
    text-align: center;
    padding-block: 64px;
}

.home-try__headline {
    font-size: 2.25rem; /* 36px */
    line-height: 2.5rem; 
    font-weight: bold;
    text-wrap: balance;
    margin-bottom: 8px;
}

.home-try__description {
    text-wrap: balance;
    color: var(--color-gray-300);
    margin-bottom: 64px;
}

.home-try__action {
    width: 100%;
    max-width: 300px;
    text-transform: uppercase;
    display: inline-block;
    border: 1px solid white;
    border-radius: 0.25rem;
    padding: 8px 0;
    transition:
        scale 50ms ease-in,
        color 50ms ease-in,
        background-color 50ms ease-in;
}

.home-try__action:hover {
    background-color: var(--color-white);
    color: var(--color-gray-900);
}

.home-try__action:active {
    background-color: var(--color-gray-300);
    scale: 98%;
}

@media screen and (width <= 639px) {
    .home-try__headline {
        font-size: 1.875rem; /* 30px */
        line-height: 2.25rem; /* 36px */
    }
}


{{/* sign up and sign in page styles */}}
.auth {
    min-height: 100vh;
    padding-block: 48px;
}

.auth__heading {
    font-size: 1.875rem; /* 30px */
    line-height: 2.25rem; /* 36px */
    margin-bottom: 32px;
}

.auth__subtext {
    font-size: 14px;
    color: var(--color-gray-700);
}

.auth__subtext-link {
    display: inline-block;
    text-decoration: underline;
    text-underline-offset: 0.125em;
    transition: color 50ms ease-in;
}

.auth__subtext-link:hover {
    color: var(--color-blue-700);
}

{{/* try page styles */}}

.try {
    min-height: 100vh;
    padding-top: 48px;
    font-size: 18px;
}

.try__heading {
    font-size: 1.875rem;
    line-height: 2.25rem;
    margin-bottom: 16px; 
}

.try__description {
    font-size: 1.125rem;
    line-height: 1.75rem;
    margin-bottom: 32px;
}

.try__post {
    display: grid;
}

.try__divider {
    margin: 8px 0;
}

{{/* application styles */}}

{{/* profile page styles */}}

.profiles {
    padding-top: 72px;
    background-color: var(--color-gray-200);
    min-height: 100vh;

    h1 {
        font-size: 2rem;
    }

    section {
        padding-inline: 0.5rem;
        max-width: 800px;
        margin-inline: auto;
        margin-bottom: 1rem;
    }

    .new {
        display: flex;
        justify-content: center;
        align-items: end;
        width: 150px;
        height: 100px;
        border: 1px dashed gray;
        border-radius: 0.25rem;
        padding: 1rem;
    }
}



.profiles__list {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-inline: auto;
    overflow-x: auto;
    padding-inline: 0.5rem;
    padding-block: 2rem;
    background-color: white;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); 

    li {
        width: 150px;
        height: 100px;
        border-radius: 0.25rem;
    }

    button {
        width: 150px;
        height: 100px;
        background-color: purple;
        padding: 1rem;
        color: white;
        display: flex;
        justify-content: center;
        align-items: end;
        border-radius: 0.25rem;
    }
}

@media screen and (min-width: 600px) {
    .profiles {
        .new {
            width: 150px;
        }
    }
    
    .profiles__list {
        display: grid;
        grid-template-columns: repeat(
        auto-fit,
        minmax(150px, 1fr)
        );
        padding-block: 0;
        margin-bottom: 1rem;
        background-color: var(--color-gray-200);
        box-shadow: none;
        
        button {
            width: 150px;
        }
    }
}

{{/* new profile page styles */}}

.new-profile {
    padding-top: 5rem;
    padding-inline: 1rem;
    max-width: 500px;
    margin-inline: auto;
}

.profile-form {
    label {
        font-weight:600;
    }

    .input-group {
        display: flex;
        flex-direction: column;
        margin-bottom: 0.5rem;

        label {
            margin-bottom: 0.25rem;
        }
    }

    input[type="text"] {
        padding: 0.25rem 0.5rem;
        border-radius: 0.25rem;
        border: 1px solid grey;
    }

    .color-group {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        align-items: center;

        label {
            margin-bottom: 0;
        }
    }
    
    input[type="color"] {
        border:none;
        padding: 0;
        border-radius: 0.25rem;
        -webkit-appearance: none;
        appearance: none;
    }

    input[type="color"]::-webkit-color-swatch-wrapper {
        padding: 0;
        border-radius: 0.25rem;
    }

    input[type="color"]::-webkit-color-swatch {
        border-radius: 0.25rem; /* This styles the inner color square into a circle */
        border: none;
    }

    input[type="color"]:hover {
        scale: 1.1;
    }

    input[type="color"]:active {
        scale: 1.05;
    }

   
}

.profile-preview {
    margin-bottom: 1rem;

    span {
        display: grid;
        place-content: center;
        font-size: 2rem;
        width: 100px;
        height: 100px;
        color: white;
        font-weight: 600;
        margin-inline: auto;
    }
}

.quick-colors {
    p {
        margin-bottom: 0.25rem;
        font-weight: 600;
    }
}

.colors {
    display: flex;
    justify-content: space-evenly;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.5rem;
    border: 1px solid var(--color-gray-300);
    border-radius: 0.25rem;

    .color {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        transform: scale 1000ms ease-in;
    }

    .color:hover {
        scale: 1.1;
    }

    .color:active {
        scale: 1.05;
    }

    .red {
        background-color: #F00A26;
    }

    .blue {
        background-color: #105DEB;
    }

    .yellow {
        background-color: #F8FA25;
    }

    .pink {
        background-color: #F525EC;
    }

    .purple {
        background-color: #A525FA;
    }

    .green {
        background-color: #10E314;
    }
}

@media screen and (max-width: 500px) {
    .colors {
        justify-content: normal;
    }
}


{{/* stories page styles */}}

.stories-page {
    background-color: var(--color-gray-200);
    padding-block: 48px;
    min-height: 100vh;
}

.stories-create {
    padding-top: 48px;
}
.stories-create__container {
    font-size: 18px;
    background-color: var(--color-gray-900);
    color: var(--color-white);
    padding: 16px;
    border-radius: 0.25rem;
}

.stories-create__heading {
    font-size: 24px;
    line-height: 32px;
    font-weight: 600;
}

.stories-create__hr {
    border: 1px solid var(--color-white);
    margin-block: 8px;
}

.stories-create__description {
    margin-bottom: 16px;
}

.stories-create__cta {
    place-self: center;
    display: grid;
    place-content: center;
    width: 100%;
    max-width: 300px;
    display: block;
    text-align: center;
    height: 48px;
    background-color: var(--color-white);
    color: var(--color-gray-900);
    border: 1px solid var(--color-white);
    border-radius: 0.25rem;
}

.stories-create__cta:hover {
    opacity: .9;
}

.stories-create__cta:active {
    opacity: .8;
    scale: .98;
}

.stories__container {
    font-size: 18px;
    background-color: var(--color-white);
    padding: 16px;
    border-radius: 0.25rem;
    margin-block: 32px;
}

.stories__heading {
    color: var(--color-gray-500);
    margin-bottom: 8px;
}

.stories__levels {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.stories__level {
    width: 50px;
    text-align: center;
    border: 1px solid #e4e4e7;
    padding-inline: 12px;
    padding-block: 4px;
    border-radius: 0.25rem;
}

.stories__level.selected {
    background-color: var(--color-gray-900);
    color: var(--color-white);
}

.stories-list {
    display: grid;
}

.stories-list__item {
    display: flex;
    gap: 1rem;
    align-items: center;
    background-color: var(--color-white);
}

.stories-list__img-wrapper {
    width: 100px;
    aspect-ratio: 1;
    flex-shrink: 0;
    border-radius: 100%;
    overflow: clip;
    background-color: var(--color-gray-900);
}

.stories-list__img {
    object-fit: cover;
}


.stories-list__info-wrapper {
    flex-grow: 1;
    padding-block: 8px;
}

.stories-list__info-wrapper:hover {
    text-decoration: underline;
}

.stories-list__heading {
    font-size: 18px;
    line-height: 1.75rem;
    font-weight: 600;
    text-wrap: wrap;
}

.stories-list__description {
    display: block;
    font-size: 1rem;
}

@media screen and (width <= 639px) {
    .stories-list__img-wrapper {
        width: 75px;
        height: 75px;
    }

    .stories-list__info-wrapper {
        padding-block: 4px;
    }

    .stories-list__description {
        display: none;
    }
}

{{/* new story page styles */}}

.new-story {
    min-height: 100vh;
    padding-top: 48px;
    background-color: var(--color-gray-200);
}

.new-story__content {
    font-size: 18px;
    background-color: var(--color-white);
    padding: 16px;
    border-radius: 0.25rem;
    margin-top: 48px;
}

.new-story__heading {
    font-size: var(--text-2xl);
    line-height: var(--leading-2xl);
    font-weight: 600;
    margin-bottom: 2rem;
}

.story-form {
    display: grid;
    gap: 16px;

    span.form__error {
        display: block;
        text-align: right;
    }
}

.story-form__levels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 1rem;
}

.story-form__levels input[type="radio"] {
  /* Hide the actual radio button */
  display: none;
}

.story-form__levels label {
    display: block;
    cursor: pointer;
    border: 1px solid var(--color-gray-200);
    border-radius: 0.25rem;
    text-align: center;
    font-weight: 600;
    transition: all 0.2s ease;
}

.story-form__levels span {
    display: inline-block;
    width: 100%;
}

.story-form__levels label:hover {
    background: var(--color-gray-200);
}

.story-form__levels input:checked + span {
    color: var(--color-blue-900);
    border: 1px solid var(--color-blue-500);
    background: var(--color-blue-400);
    border-radius: 0.25rem;
}

.levels {
    border: none;
    padding: 0;
    margin: 0;

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 1rem;

    label {
        border: 1px solid var(--color-white);
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        padding-block: 1rem;
        text-align: center;
        border-radius: 0.5rem;
        cursor: pointer;
        font-weight: 600;

        input {
            display: none;
        }
    }

    label:hover {
        border: 1px solid var(--color-blue-100);
        background-color: var(--color-blue-100);
    }

    label:has(input:checked) {
        border: 1px solid var(--color-blue-500);
        background-color: var(--color-blue-100);
    }
}

.voices {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(2, 1fr);
    border: none;
    padding: 0;
    margin: 0;

    .card {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        padding-block: 1rem;
        border-radius: 0.5rem;
        border: 1px solid var(--color-white);
        cursor: pointer;

        p {
            font-weight: 600;
        }

        input {
            display: none;
        }
    }

    .card:hover {
        background-color: var(--color-blue-100);
        border-color: var(--color-blue-100);
    }

    .card:has(input:checked) {
        border: 1px solid var(--color-blue-500);
        background-color: var(--color-blue-100);
    }

}


{{/* status page styles */}}

.status {
    padding-top: 3rem;
    max-width: 600px;
    margin-inline: auto;
}


.status__img-wrapper {
    width: 100vw;
    max-width: 600px;
    margin-bottom: 16px;
    margin-inline: auto;
    aspect-ratio: 1;
    background-color: var(--color-gray-900);
    color: var(--color-white);
}

.status__img {
    object-fit: cover;
}

.status__no-img {
    width: 100%;
    height: 100%;
    display: grid;
    place-content: center;
    padding: 2rem;
    text-align: center;
    text-wrap: balance;
}

.status-story {
    padding-inline: 0.5rem;
}

.status__heading {
    margin-bottom: 2rem;
}

.status__text {
    font-size: var(--text-xl);
    line-height: var(--leading-xl);
    margin-bottom: 0.5rem;
}

@media (min-width: 640px) { 
    .status__img-wrapper {
        aspect-ratio: 16 / 9;
    }

    .status__img {
        width: 100%;
        margin-inline: auto;
        aspect-ratio: 16 / 9;
    }
}

{{/* reader page styles */}}

{{/* reader control styles */}}

.controls {
    border-top: 1px solid var(--color-gray-200);
    height: 60px;
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    background-color: var(--color-white);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    z-index: 1000;
}

.controls__button {
    padding-block: 0.25em;
    padding-inline: 0.75em;
    border: 1px solid var(--color-gray-200);
    border-radius: 0.25em;
    transition:
        background-color 100ms ease-in,
        fill 100ms ease-in,
        stroke 100ms ease-in,
        color 100ms ease-in;
}

.controls__button.active {
    background-color: var(--color-blue-500);
    fill: var(--color-white);
    color: var(--color-white);
}

@media screen and (width <= 639px) {
    .controls {
        padding-block: 1em;
        justify-content: space-evenly;
    }
}

{{/* reader widget shared styles */}}

.widget {
    border: 1px solid var(--color-gray-200);
    position: absolute;
    height: 100px;
    top: -7rem;
    right: 0.5rem;
    background-color: var(--color-white);
    width: 100%;
    max-width: 500px;
    border-radius: 0.375rem;
}

{{/* reader speed widget styles */}}

.speed-widget__button {
    width: 100%;
    height: 100%;
    border: 1px solid var(--color-gray-200);
    border-radius: 0.25rem;
}

.speed-widget__button.active {
    color: var(--color-white);
    background-color: var(--color-blue-500);
}

.speed-widget__list {
    height: 100%;
    display: grid;
    gap: 4px;
    grid-template-columns: repeat(8, 1fr);
    padding: 8px;
}

@media screen and (width <= 639px) {
    .widget {
        top: -100px;
        right: 0px;
    }
}

{{/* reader translate widget styles */}}

.translate-widget__form {
    height: 50px;
    border-bottom: 1px solid var(--color-gray-200);
    display: flex;
    gap: 4px;
    justify-content: start;
    align-items: center;
}

.translate-widget__input {
    flex-grow: 1;
    height: 100%;
    padding-inline: 8px;
}

.translate-widget__preview {
    border-bottom: 1px solid var(--color-gray-200);
    height: 50px;
    padding-inline: 8px;
    margin-right: 32px;
    display: flex;
    justify-content: start;
    align-items: center;
    overflow-x: auto;
    text-wrap: nowrap;
}

.translate-widget__delete {
    position: absolute;
    top: 0;
    right: 0;
    width: 32px;
    height: 100%;
    display: grid;
    place-content: center;
}

.translate-widget__translation {
    height: 50px;
    padding-inline: 8px;
    margin-right: 32px;
    display: flex;
    justify-content: start;
    align-items: center;
    overflow-y: auto;
    text-wrap: none;
}

{{/* reader styles */}}

.reader {
    padding-top: 48px;
    padding-bottom: 60px;
    max-width: 600px;
    margin-inline: auto;
    height: 100vh;
    display:flex;

    scroll-snap-type: x mandatory;
    overflow-x: scroll;
    overflow-y: auto;
    scroll-behavior: smooth;

    /* Hide scrollbar (cross-browser) */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.reader__page {
    width: 100vw;
    max-width: 600px;
    position: relative;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    padding-bottom: 48px;
}

.reader__img-wrapper {
    width: 100vw;
    max-width: 600px;
    margin-inline: auto;
    aspect-ratio: 1;
    background-color: var(--color-gray-900);
    color: var(--color-white);
}

.reader__img {
    object-fit: cover;
}

.reader__no-img {
    width: 100%;
    height: 100%;
    display: grid;
    place-content: center;
    padding: 2rem;
    text-align: center;
    text-wrap: balance;
}

.reader__content {
    padding-inline: 2rem;
}

.reader__heading {
    margin-top: 2rem;
    text-align: center;
    text-wrap: balance;
    margin-bottom: 2rem;
}

.reader__paragraph {
    margin-top: 4rem;
    font-size: var(--text-2xl);
    line-height: var(--leading-2xl); 
    margin-bottom: 16px;
}

.reader__word {
    color: var(--color-gray-500);
    cursor: pointer;
}

.reader__word.active {
    color: var(--color-black);
}

.text--top {
        margin-bottom: 16px;
    }

@media screen and (width <= 639px) {
    .reader {
        padding-inline: 8px;
    }

}

@media (min-width: 640px) { 
    .reader__img-wrapper {
        aspect-ratio: 16 / 9;
    }

    .reader__img {
        width: 100%;
        margin-inline: auto;
        aspect-ratio: 16 / 9;
    }
}

{{/* level one reader styles */}}

.reader--one {
    position: relative;
    max-width: 800px;
    min-height: 100vh;
    margin: auto;

    display:flex;
    
    scroll-snap-type: x mandatory;
    overflow-x: scroll;
    scroll-behavior: smooth;

    /* Hide scrollbar (cross-browser) */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */

    .part {
        width: 100vw;
        max-width: 800px;
        position: relative;
        scroll-snap-align: start;
        scroll-snap-stop: always;
        padding-bottom: 48px;
    }

    .page_number {
        position: absolute;
        bottom: 48px;
        right: 0.5rem;
    }

    .image_wrapper {
        width: 100vw;
        max-width: 800px;
        margin-inline: auto;
        aspect-ratio: 1;
        margin-bottom: 16px;
        background-color: blue;
    }
    .text_wrapper {
        max-width: 800px;
        margin-inline: auto;
        font-size: 32px;
        padding-inline: 0.5rem;
    }

    .title {
        font-size: 48px;
        line-height: 48px;
        text-align: center;
    }

    .controls {
    z-index: 1000;
        border-top: 2px solid black;
        position: fixed;
        width: 100vw;
        bottom: 0;
        left: 0;
        height: 48px;
        background: white;
        display: flex;
        justify-content: center;

    }
@media (min-width: 640px) { 
    .image_wrapper {
        aspect-ratio: 16/9;
    }
}
}



.reader--one::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.reader--two {
    position: relative;
    max-width: 800px;
    min-height: 100vh;
    margin: auto;

    display:flex;
    
    scroll-snap-type: x mandatory;
    overflow-x: scroll;
    scroll-behavior: smooth;

    /* Hide scrollbar (cross-browser) */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */

    .part {
        width: 100vw;
        max-width: 800px;
        position: relative;
        scroll-snap-align: start;
        scroll-snap-stop: always;
        padding-bottom: 48px;
    }

    .page_number {
        position: absolute;
        bottom: 48px;
        right: 0.5rem;
    }

    .image_wrapper {
        width: 100vw;
        max-width: 800px;
        margin-inline: auto;
        aspect-ratio: 1/1;
        margin-bottom: 16px;
    }
    .text_wrapper {
        max-width: 800px;
        margin-inline: auto;
        font-size: 20px;
        padding-inline: 0.5rem;
    }

    .text--top {
        margin-bottom: 16px;
    }

    .text--bottom {
        margin-bottom: 48px;
    }

    .title {
        font-size: 48px;
        line-height: 48px;
        text-align: center;
    }

    .controls {
        border-top: 2px solid black;
        position: fixed;
        width: 100vw;
        bottom: 0;
        left: 0;
        height: 48px;
        background: white;
        display: flex;
        justify-content: center;

    }
}


.reader--three {
    position: relative;
    max-width: 800px;
    min-height: 100vh;
    margin: auto;

    display:flex;
    
    scroll-snap-type: x mandatory;
    overflow-x: scroll;
    scroll-behavior: smooth;

    /* Hide scrollbar (cross-browser) */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */

    .part {
        width: 100vw;
        max-width: 800px;
        position: relative;
        scroll-snap-align: start;
        scroll-snap-stop: always;
        padding-bottom: 48px;
    }

    .page_number {
        position: absolute;
        bottom: 48px;
        right: 0.5rem;
    }

    .image_wrapper {
        width: 100vw;
        max-width: 800px;
        margin-inline: auto;
        aspect-ratio: 1/1;
        margin-bottom: 16px;
    }
    .text_wrapper {
        max-width: 800px;
        margin-inline: auto;
        font-size: 20px;
        padding-inline: 0.5rem;
    }

    .text--top {
        margin-bottom: 16px;
    }

    .text--bottom {
        margin-bottom: 48px;
    }

    .title {
        font-size: 48px;
        line-height: 48px;
        text-align: center;
    }

    .controls {
        border-top: 2px solid black;
        position: fixed;
        width: 100vw;
        bottom: 0;
        left: 0;
        height: 48px;
        background: white;
        display: flex;
        justify-content: center;

    }
}

.admin {
    padding-top: 48px;
    min-height: 100vh;
}

.admin-page {
    padding-block: 48px;
    min-height: 100vh;
}

.admin-contents {
    padding-top: 48px;
    min-height: 100vh;
}

.paragraph-img-wrapper {
    width: 100px;
    aspect-ratio: 1;
    background-color: var(--color-gray-900);
}

.action-btn {
    padding-block: 0.25rem;
    padding-inline: 1rem;
    background-color: var(--color-blue-500);
    color: var(--color-white);
    border-radius: 0.25rem;
}

.action-btn:hover {
    background-color: var(--color-blue-400);
}

.action-btn:active {
    background-color: var(--color-blue-600);
}

.content-field {
    padding-inline: 1rem;
    padding-block: 0.25rem;
    border: 1px solid var(--color-gray-300);
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

.admin-article {
    border: 1px solid var(--color-gray-300);
    border-radius: 0.25rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.table-row {
    border-top: solid 1px var(--color-gray-300);
}

.table-row.published {
    background-color: var(--color-green-500);
}

.table-row.unpublished {
    background-color: var(--color-red-500);
}

.table-cell {
    padding-inline: 0.5rem;
    padding-block: 0.25rem;
}

.table-cell.published {
    background-color: var(--color-green-500);
}

.table-cell.unpublished {
    background-color: var(--color-red-500);
}

.table-cell.link {
    color: var(--color-black);
    text-decoration: none;
}

.table-cell.link:hover {
    text-decoration: underline;
    text-underline-offset: 0.25rem;
    color: var(--color-blue-500);
}

{{/* not found styles */}}

.not-found {
    margin-top: 96px;
}
.not-found-heading {
    text-align: center;
    font-size: var(--text-3xl);
    line-height: var(--leading-3xl);
    font-weight: 600;
    margin-bottom: 2rem;
}