:root {
    --paper: #faf9f6;
    --ink: #272735;
    --muted: #6d6c78;
    --purple: #6954aa;
    --purple-dark: #513d8e;
    --line: #e5e2ea;
    --lavender: #f0ecf8;
    --serif: Georgia,'Times New Roman',serif;
    --sans: Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 32px;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

button,textarea {
    font: inherit;
}

button,a,textarea {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

[hidden] {
    display: none!important;
}

:focus-visible {
    outline: 3px solid #937bc6;
    outline-offset: 5px;
}

.page-width {
    width: min(1120px,calc(100% - 80px));
    margin-inline: auto;
}

.site-header {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.wordmark {
    display: flex;
    align-items: center;
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1;
}

.wordmark-light {
    font-weight: 400;
    color: var(--muted);
}

.brand-dot {
    color: var(--purple);
}

.brand-icon {
    display: grid;
    place-items: center;
    background: var(--purple);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    margin-right: 11px;
    font-family: var(--serif);
    font-size: 28px;
    font-style: italic;
    padding: 0 4px 5px 0;
}

nav {
    display: flex;
    gap: 32px;
    font-size: 13px;
    font-weight: 500;
}

nav a:hover,.feedback-strip a:hover {
    color: var(--purple);
}

nav a:last-child span {
    margin-left: 6px;
}

.intro {
    text-align: center;
    padding: 60px 0 42px;
}

.eyebrow {
    font-size: 10px;
    letter-spacing: 2.1px;
    font-weight: 650;
    color: var(--purple);
    margin: 0 0 19px;
}

.small-star {
    font-size: 17px;
    vertical-align: -1px;
    margin-right: 7px;
}

h1 {
    font-family: var(--serif);
    font-size: clamp(40px,4.7vw,62px);
    font-weight: 400;
    letter-spacing: -2.4px;
    line-height: 1.12;
    margin: 0;
}

h1 em {
    color: var(--purple);
    font-weight: 400;
}

.intro-description {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.75;
    margin: 21px 0 0;
}

.workspace {
    display: grid;
    grid-template-columns: minmax(0,1.65fr) minmax(0,1fr);
    border: 1px solid #ded9e5;
    border-radius: 18px;
    overflow: hidden;
    background: white;
    box-shadow: 0 9px 35px #39304706;
}

.editor {
    padding: 25px 27px 23px;
    min-width: 0;
}

.editor-heading,.result-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.editor-heading label,.result-heading h2 {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.section-number {
    font-size: 10px;
    color: #868091;
    font-weight: 500;
    letter-spacing: .6px;
    margin-right: 10px;
}

.language-tag {
    font-size: 10px;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 2px 8px;
}

textarea {
    display: block;
    width: 100%;
    height: 241px;
    min-height: 160px;
    max-height: 600px;
    resize: vertical;
    border: 0;
    border-radius: 5px;
    background: white;
    padding: 22px 0 12px;
    margin: 12px 0 0;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.85;
}

textarea::placeholder {
    color: #8a8793;
    opacity: 1;
}

textarea:focus-visible {
    outline-offset: 5px;
    outline-width: 2px;
}

.editor-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 10px;
    color: #797580;
    padding: 11px 0 15px;
    border-bottom: 1px solid var(--line);
    font-variant-numeric: tabular-nums;
}

.editor-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-top: 19px;
}

.editor-actions p {
    font-size: 10px;
    color: var(--muted);
    margin: 0;
    max-width: 170px;
    line-height: 1.7;
}

.hint-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #b4a9cc;
    margin-right: 6px;
    vertical-align: 2px;
}

.editor.ready .hint-dot {
    background: #418266;
}

button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    flex-shrink: 0;
    color: #fff;
    background: var(--purple);
    border: 1px solid var(--purple);
    border-radius: 8px;
    padding: 12px 17px;
    font-size: 12px;
    font-weight: 550;
    transition: background .15s,transform .15s;
}

button:hover {
    background: var(--purple-dark);
    transform: translateY(-1px);
}

button:disabled {
    opacity: .65;
    cursor: wait;
    transform: none;
}

.button-arrow {
    font-size: 19px;
    font-weight: 400;
    line-height: 1;
}

.form-error {
    font-size: 12px;
    color: #a13948;
    margin: 14px 0 0;
}

.result-panel {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg,#f6f3fa,#efebf6);
    border-left: 1px solid var(--line);
    padding: 25px 25px 21px;
    text-align: center;
}

.status-tag {
    font-size: 9px;
    color: #756588;
    border: 1px solid #dbd3e9;
    background: #f9f7fb;
    border-radius: 20px;
    padding: 3px 8px;
    white-space: nowrap;
}

.result-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px 9px 24px;
    min-height: 280px;
}

.insight-art {
    position: relative;
    width: 133px;
    height: 113px;
    margin: 0 0 24px;
    display: grid;
    place-items: center;
}

.orbit {
    position: absolute;
    inset: 6px 17px;
    border: 1px solid #d1c4e5;
    border-radius: 50%;
    transform: rotate(-35deg);
}

.orbit-two {
    inset: 15px 3px;
    transform: rotate(35deg);
}

.orbit-three {
    inset: 22px 24px;
    transform: rotate(70deg);
}

.art-spark {
    color: #8e75b8;
    font-size: 57px;
    line-height: 1;
    font-family: var(--serif);
}

.orbit-dot {
    position: absolute;
    top: 17px;
    right: 15px;
    width: 8px;
    height: 8px;
    background: #a68bc9;
    border: 2px solid #f3eff8;
    border-radius: 50%;
}

.result-content h3 {
    font-family: var(--serif);
    font-size: 21px;
    font-weight: 400;
    line-height: 1.4;
    margin: 0 0 11px;
    letter-spacing: -.4px;
}

.result-content>p:last-child {
    font-size: 12px;
    line-height: 1.8;
    color: #787083;
    max-width: 250px;
    margin: 0;
}

.result-note {
    border-top: 1px solid #e0d9eb;
    padding-top: 15px;
    color: #787083;
    font-size: 10px;
    line-height: 1.8;
    margin: 0;
}

.result-note span {
    margin-right: 4px;
}

.result-kicker {
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--purple);
    margin: 0;
}

.result-score {
    font-family: var(--serif);
    font-size: 82px;
    line-height: 1.3;
    color: var(--purple);
    letter-spacing: -4px;
    margin: 3px 0 5px;
}

.result-panel.loading .insight-art {
    animation: breathe 1.4s ease-in-out infinite;
}

.writing-tip {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 12px;
    margin: 19px 0 0;
    color: #7c7784;
}

.tip-label {
    font-size: 8px;
    letter-spacing: 1.1px;
    font-weight: 650;
    white-space: nowrap;
}

.writing-tip p {
    font-size: 11px;
    margin: 0;
}

.about-section {
    padding: 69px 0 48px;
    scroll-margin-top: 20px;
}

.about-heading {
    text-align: center;
}

.about-heading .eyebrow {
    font-size: 9px;
    margin-bottom: 10px;
}

.about-heading h2 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 32px;
    line-height: 1.3;
    letter-spacing: -.7px;
    margin: 0;
}

.about-heading>p:last-child {
    font-size: 12px;
    color: var(--muted);
    margin: 10px 0 0;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 48px;
    margin-top: 36px;
}

.feature-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: var(--purple);
    background: var(--lavender);
    border-radius: 9px;
    font-family: var(--serif);
    font-size: 20px;
    margin-bottom: 14px;
}

.about-grid h3 {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 9px;
}

.about-grid p {
    font-size: 12px;
    line-height: 1.9;
    color: var(--muted);
    margin: 0;
}

.feedback-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 25px 0;
}

.feedback-strip h2 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 21px;
    letter-spacing: -.3px;
    margin: 0 0 3px;
}

.feedback-strip p {
    font-size: 11px;
    color: var(--muted);
    margin: 0;
}

.feedback-strip a {
    font-size: 12px;
    font-weight: 550;
    white-space: nowrap;
}

.feedback-strip a span {
    margin-left: 17px;
    font-size: 18px;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: #817c88;
    font-size: 10px;
    padding: 22px 0 27px;
}

.skip-link {
    position: absolute;
    left: 20px;
    top: -70px;
    z-index: 2;
    background: white;
    border: 1px solid var(--purple);
    border-radius: 6px;
    padding: 10px 15px;
}

.skip-link:focus {
    top: 12px;
}

@keyframes breathe {
    50% {
        opacity: .45;
        transform: scale(.92);
    }
}

@media(min-width:1450px) {
    .intro {
        padding-top: 75px;
        padding-bottom: 50px;
    }
}

@media(max-width:1000px) {
    .page-width {
        width: calc(100% - 48px);
    }
    .workspace {
        grid-template-columns: minmax(0,1.5fr) minmax(0,1fr);
    }
    .editor,.result-panel {
        padding: 22px;
    }
    .result-heading {
        flex-wrap: wrap;
    }
    .result-heading .status-tag {
        margin-left: 23px;
    }
    .editor-actions {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }
    .editor-actions p {
        max-width: none;
    }
    .editor-actions button {
        width: 100%;
    }
    .about-grid {
        gap: 28px;
    }
    .writing-tip {
        align-items: center;
    }
    .writing-tip p {
        max-width: 470px;
    }
}

@media(max-width:680px) {
    .page-width {
        width: calc(100% - 36px);
    }
    .site-header {
        height: 78px;
    }
    .wordmark {
        font-size: 21px;
    }
    .brand-icon {
        width: 31px;
        height: 31px;
        font-size: 25px;
        margin-right: 8px;
    }
    nav {
        font-size: 11px;
        gap: 18px;
    }
    nav a:last-child {
        display: none;
    }
    .intro {
        padding: 39px 0 29px;
    }
    .eyebrow {
        font-size: 8px;
        letter-spacing: 1.4px;
        margin-bottom: 17px;
    }
    h1 {
        font-size: clamp(35px,8.9vw,52px);
        letter-spacing: -1.5px;
    }
    .intro-description {
        font-size: 13px;
        max-width: 330px;
        margin: 17px auto 0;
    }
    .desktop-break {
        display: none;
    }
    .workspace {
        grid-template-columns: 1fr;
        border-radius: 14px;
    }
    .editor {
        padding: 20px;
    }
    textarea {
        height: 235px;
        font-size: 14px;
    }
    .editor-meta {
        font-size: 9px;
    }
    .editor-actions {
        gap: 15px;
    }
    .editor-actions p {
        font-size: 11px;
    }
    button {
        font-size: 13px;
        padding: 13px 16px;
    }
    .result-panel {
        border-left: 0;
        border-top: 1px solid var(--line);
        padding: 20px;
    }
    .result-heading {
        flex-wrap: nowrap;
    }
    .result-heading .status-tag {
        margin-left: 0;
    }
    .result-content {
        min-height: 235px;
        padding: 24px 9px;
    }
    .insight-art {
        width: 110px;
        height: 90px;
        margin-bottom: 18px;
    }
    .art-spark {
        font-size: 46px;
    }
    .result-note {
        font-size: 10px;
    }
    .writing-tip {
        display: block;
        text-align: center;
        padding: 0 13px;
        margin-top: 19px;
    }
    .tip-label {
        font-size: 8px;
    }
    .writing-tip p {
        font-size: 11px;
        margin-top: 5px;
    }
    .about-section {
        padding: 44px 0 33px;
    }
    .about-heading h2 {
        font-size: 27px;
    }
    .about-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        margin-top: 29px;
    }
    .about-grid article {
        display: grid;
        grid-template-columns: 34px 1fr;
        column-gap: 15px;
    }
    .feature-icon {
        grid-row: 1/3;
        margin: 0;
    }
    .about-grid h3 {
        margin-bottom: 6px;
    }
    .about-grid p {
        grid-column: 2;
    }
    .feedback-strip {
        align-items: flex-start;
        flex-direction: column;
        gap: 13px;
        padding: 22px 0;
    }
    .feedback-strip h2 {
        font-size: 21px;
    }
    .feedback-strip p {
        max-width: 280px;
    }
    .site-footer {
        font-size: 9px;
        padding: 19px 0 24px;
    }
}

@media(prefers-reduced-motion:reduce) {
    html {
        scroll-behavior: auto;
    }
    *,*::before,*::after {
        animation: none!important;
        transition: none!important;
    }
}

/* Keep the successful result tight to the writing, especially in phone screenshots. */
.result-panel.has-result .result-content {
    min-height: 205px;
    padding: 14px 0;
}

.result-panel.has-result .result-content h3 {
    font-family: var(--sans);
    font-size: 23px;
    font-weight: 700;
}

.share-button {
    width: 100%;
    margin: 0 0 16px;
    gap: 12px;
}

#share-dialog {
    width: min(620px, calc(100% - 24px));
    max-height: calc(100dvh - 32px);
    padding: 20px;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 14px;
}

#share-dialog::backdrop {
    background: #272735aa;
}

.share-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.share-toolbar h2 {
    margin: 0;
    font-size: 18px;
}

.share-toolbar button {
    background: transparent;
    border-color: var(--line);
    color: var(--ink);
    width: 40px;
    height: 40px;
    padding: 0;
}

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

#share-preview {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
}

.download-button {
    display: block;
    background: var(--purple);
    color: white;
    border-radius: 8px;
    text-align: center;
    padding: 12px;
    margin-top: 18px;
    font-size: 14px;
    font-weight: 600;
}

.download-button:hover {
    background: var(--purple-dark);
}

@media (max-width: 680px) {
    .result-panel.has-result .result-content {
        display: grid;
        grid-template-columns: auto 1fr;
        column-gap: 18px;
        min-height: 0;
        text-align: left;
        padding: 18px 0;
    }

    .result-panel.has-result .result-kicker {
        grid-column: 1;
        font-size: 8px;
    }

    .result-panel.has-result .result-score {
        grid-column: 1;
        grid-row: 2;
        font-size: 64px;
        line-height: 1;
        margin: 5px 0 0;
    }

    .result-panel.has-result .result-content h3 {
        grid-column: 2;
        grid-row: 1 / 3;
        font-size: 23px;
        margin: 0;
    }

    .result-panel.has-result #result-description {
        display: none;
    }
}


.about-more {
    text-align: center;
    margin: 28px 0 0;
    font-size: 13px;
    color: var(--purple);
}

.about-more a {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.about-more a:hover {
    color: var(--purple-dark);
}

nav a[aria-current="page"] {
    color: var(--purple);
    text-decoration: underline;
    text-underline-offset: 5px;
}

.about-page {
    max-width: 760px;
    padding-block: 52px;
}

.about-page-heading {
    margin-bottom: 40px;
}

.about-page-heading h1 {
    font-size: clamp(34px, 5vw, 48px);
    letter-spacing: -1px;
}

.about-copy h2 {
    font-family: var(--serif);
    font-size: 27px;
    font-weight: 400;
    line-height: 1.3;
    margin: 34px 0 14px;
}

.about-copy p, .about-copy li {
    font-size: 15px;
    line-height: 1.85;
    color: var(--muted);
}

.about-copy ul {
    padding-left: 24px;
}

.about-copy li {
    margin-bottom: 12px;
}

@media (max-width: 680px) {
    .about-page {
        padding-block: 34px;
    }
}
