.tone-heading > p {
    font-size: 17px;
    line-height: 2;
}
.tone-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    align-items: start;
    gap: 28px;
    padding-bottom: 65px;
}
.tone-controls {
    position: sticky;
    top: 20px;
    padding: 21px;
    border: 1px solid #d8d2c4;
    border-radius: 16px;
    background: var(--cream);
}
.tone-controls h2 {
    margin: 0 0 10px;
    font-size: 21px;
}
.tone-controls-note {
    margin: 0;
    color: #635f55;
    font-size: 12px;
    line-height: 1.9;
}
.tone-field {
    margin-top: 22px;
}
.tone-field > label {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 700;
}
.tone-color-row {
    display: flex;
    align-items: stretch;
    gap: 9px;
}
.tone-color-trigger {
    width: 44px;
    height: 44px;
    padding: 3px;
    flex-shrink: 0;
    border: 1px solid #b7ac97;
    border-radius: 7px;
    background: white;
    cursor: pointer;
}
.tone-color-row input[type="text"] {
    min-width: 0;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #b7ac97;
    border-radius: 7px;
    color: var(--ink);
    font: 600 16px Consolas,monospace;
    background: white;
}
.tone-color-row input:focus-visible {
    outline: 3px solid var(--orange);
    outline-offset: 2px;
}
.tone-color-row input[aria-invalid="true"] {
    border-color: #b52626;
}
#tone-input-help {
    margin-top: 12px;
}
.tone-input-error {
    margin: 5px 0 0;
    color: #a32020;
    font-size: 12px;
    line-height: 1.8;
}
.tone-input-error:empty {
    display: none;
}
.tone-field.is-selected > label {
    color: #b33b14;
}
.tone-color-trigger[aria-pressed="true"] {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}
.tone-palettes {
    margin-top: 24px;
}
.tone-palettes h3 {
    margin: 0 0 10px;
    font-size: 15px;
}
.tone-palettes > label {
    display: block;
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: 700;
}
.tone-palettes select {
    width: 100%;
    padding: 10px;
    border: 1px solid #b7ac97;
    border-radius: 8px;
    background: white;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
}
.tone-palette-colors {
    max-height: 170px;
    margin-top: 12px;
    padding: 4px;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid #d0c7b6;
    border-radius: 8px;
    background: #fff;
}
.tone-palette-group {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
}
.tone-palette-group[hidden] {
    display: none;
}
.tone-swatch {
    min-width: 0;
    width: 100%;
    height: 28px;
    padding: 0;
    border: 1px solid #0003;
    border-radius: 4px;
    cursor: pointer;
}
.tone-swatch[aria-pressed="true"] {
    outline: 2px solid var(--ink);
    outline-offset: 1px;
}
.tone-selected-name {
    margin: 9px 0 0;
    min-height: 2.5em;
    font-size: 12px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}
.tone-save-note {
    margin: 13px 0 0;
    color: #635f55;
    font-size: 12px;
    line-height: 1.8;
}
.tone-actions {
    display: grid;
    gap: 8px;
    margin-top: 22px;
}
.tone-actions button {
    padding: 11px 8px;
    border: 1px solid #b7ac97;
    border-radius: 8px;
    background: var(--paper);
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.tone-actions .tone-copy {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}
.tone-status {
    margin: 10px 0 0;
    font-size: 12px;
    line-height: 1.8;
}
.tone-status:empty {
    display: none;
}
.tone-colors-link {
    display: inline-block;
    margin-top: 18px;
    color: #b33b14;
    font-size: 12px;
    line-height: 1.8;
    text-decoration: underline;
    text-underline-offset: 4px;
}
.tone-stage {
    min-width: 0;
}
.tone-stage-heading {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
    color: #6f6c61;
    font: 500 12px Outfit,"M PLUS Rounded 1c",sans-serif;
    letter-spacing: 1px;
}
.tone-preview {
    min-width: 0;
    border: 1px solid #d8d2c4;
    border-radius: 16px;
    overflow: hidden;
    background: var(--tone-bg);
    color: var(--tone-text);
    font-size: 14px;
}
.tone-demo-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    padding: 24px 30px;
    border-bottom: 1px solid currentColor;
}
.tone-demo-brand {
    font: 700 19px Outfit,sans-serif;
    letter-spacing: .5px;
}
.tone-demo-brand > span {
    display: block;
    margin-top: 5px;
    font-family: "M PLUS Rounded 1c",sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0;
}
.tone-demo-topline > a {
    color: inherit;
    font-size: 11px;
}
.tone-demo-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    gap: 24px;
    padding: 36px 30px;
}
.tone-demo-eyebrow {
    font: 500 10px Outfit,sans-serif;
    letter-spacing: 1.6px;
}
.tone-preview .tone-demo-copy h2 {
    margin: 19px 0 18px;
    font-size: clamp(23px, 2.1vw, 31px);
    line-height: 1.7;
    font-weight: 800;
    letter-spacing: 0;
}
.tone-demo-copy > p {
    margin: 0;
    font-size: 13px;
    line-height: 2.1;
}
.tone-demo-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 23px;
    padding: 12px 20px;
    border: 1px solid var(--tone-button);
    border-radius: 30px;
    background: var(--tone-button);
    color: var(--tone-button-text);
    font-size: 12px;
    font-weight: 700;
}
.tone-demo-photo {
    min-width: 0;
    margin: 0;
}
.tone-demo-photo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 70px 70px 10px 10px;
}
.tone-demo-photo figcaption {
    margin-top: 10px;
    text-align: center;
    font: 500 9px/1.8 Outfit,sans-serif;
    letter-spacing: 1.2px;
}
.tone-demo-story {
    margin: 0 30px;
    padding: 28px 0;
    border-top: 1px solid currentColor;
}
.tone-preview .tone-demo-story h3 {
    margin: 10px 0 13px;
    font-size: 21px;
    line-height: 1.8;
}
.tone-demo-story > p {
    margin: 0;
    font-size: 12px;
    line-height: 2;
}
.tone-demo-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    padding: 10px 30px 36px;
}
.tone-demo-features article {
    border-top: 1px solid currentColor;
    padding-top: 15px;
}
.tone-demo-features article > span {
    font: 500 12px Outfit,sans-serif;
}
.tone-preview .tone-demo-features h3 {
    margin: 10px 0;
    font-size: 15px;
    line-height: 1.8;
}
.tone-demo-features p {
    margin: 0;
    font-size: 11px;
    line-height: 1.9;
}
.tone-demo-footer {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 23px 30px;
    border-top: 1px solid currentColor;
    font-size: 10px;
}
.tone-demo-footer > span:first-child {
    font: 700 12px Outfit,sans-serif;
}
.tone-preview-note {
    margin: 15px 0 0;
    color: #6f6c61;
    font-size: 13px;
    line-height: 1.9;
}
@media (max-width: 1100px) {
    .tone-layout {
        grid-template-columns: 225px minmax(0, 1fr);
        gap: 20px;
    }
    .tone-demo-hero {
        grid-template-columns: 1fr;
    }
    .tone-demo-photo {
        max-width: 360px;
        width: 100%;
        margin: auto;
    }
    .tone-demo-photo img {
        aspect-ratio: 4 / 3;
    }
    .tone-demo-story p br {
        display: none;
    }
    .tone-demo-features {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 760px) {
    .tone-layout {
        grid-template-columns: 1fr;
    }
    .tone-controls {
        position: static;
        padding: 20px;
    }
    .tone-controls-note {
        font-size: 13px;
    }
    .tone-field {
        margin-top: 17px;
    }
    .tone-palette-group {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
    .tone-palette-colors {
        max-height: 170px;
    }
    .tone-demo-topline,
    .tone-demo-hero,
    .tone-demo-features,
    .tone-demo-footer {
        padding-left: 22px;
        padding-right: 22px;
    }
    .tone-demo-story {
        margin-left: 22px;
        margin-right: 22px;
    }
    .tone-preview .tone-demo-copy h2 {
        font-size: 27px;
    }
    .tone-demo-copy > p {
        font-size: 14px;
    }
    .tone-demo-story > p,
    .tone-demo-features p {
        font-size: 13px;
    }
    .tone-heading > p {
        font-size: 16px;
    }
    .tone-heading > p br {
        display: none;
    }
}

/* Photo thumbnails and the click-to-cycle hero share one selection state. */
.tone-photo-picker {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}
.tone-photo-option {
    min-width: 0;
    padding: 6px;
    border: 1px solid #d0c7b6;
    border-radius: 10px;
    background: var(--paper);
    color: var(--ink);
    cursor: pointer;
}
.tone-photo-option[aria-pressed="true"] {
    border-color: var(--orange);
    box-shadow: inset 0 0 0 1px var(--orange);
}
.tone-photo-option img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 5px;
}
.tone-photo-option > span {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 700;
}
.tone-photo-hint {
    margin: 9px 0 16px;
    color: #6f6c61;
    font-size: 12px;
    line-height: 1.8;
}
.tone-photo-next {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 70px 70px 10px 10px;
    background: transparent;
    color: inherit;
    cursor: pointer;
}
.tone-photo-next:hover {
    opacity: .92;
}
@media (max-width: 760px) {
    .tone-photo-picker {
        gap: 7px;
    }
    .tone-photo-option {
        padding: 4px;
    }
    .tone-photo-option > span {
        font-size: 12px;
    }
}

.tone-demo-eyebrow {
    color: var(--tone-eyebrow);
}
.tone-field > label > small {
    font-size: 11px;
    font-weight: 400;
}

.tone-preview h2 {
    color: var(--tone-title);
}
.tone-preview h3 {
    color: var(--tone-heading);
}
.tone-field > .tone-link-color {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--ink);
    cursor: pointer;
}
.tone-link-color input {
    margin: 0;
    accent-color: var(--orange);
}

/* Keep the preview aligned with the first color field and the palette nearby. */
.tone-editor-heading {
    margin-bottom: 20px;
}
.tone-editor-heading h2 {
    margin: 0 0 8px;
    font-size: 21px;
}
.tone-photo-settings {
    max-width: 620px;
    margin-top: 24px;
}
.tone-controls {
    position: static;
}
.tone-controls > .tone-field:first-child {
    margin-top: 0;
}
.tone-controls .tone-palettes {
    margin-top: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #d8d2c4;
}
.tone-stage {
    padding-top: 0;
}
@media (max-width: 760px) {
    .tone-stage {
        padding-top: 0;
    }
}

.tone-color-row + .tone-link-color {
    margin-top: 9px;
    margin-bottom: 0;
}

.tone-palettes + .tone-link-color {
    margin-top: 12px;
    margin-bottom: 0;
}

/* Compact controls leave room for an independent link color. */
.tone-controls .tone-field {
    margin-top: 14px;
}
.tone-controls > .tone-field:first-child {
    margin-top: 0;
}
.tone-field > label {
    margin-bottom: 6px;
}
.tone-color-trigger {
    width: 38px;
    height: 38px;
}
.tone-color-row input[type="text"] {
    padding: 6px 8px;
    font-size: 15px;
}
.tone-color-row + .tone-link-color {
    margin-top: 7px;
}
.tone-controls .tone-palettes {
    margin-top: 10px;
    padding-bottom: 8px;
}
.tone-selected-name {
    min-height: 1.8em;
    margin-top: 6px;
}
.tone-actions {
    margin-top: 14px;
    gap: 6px;
}
.tone-preview a:not(.tone-demo-button) {
    color: var(--tone-link);
}

.tone-native-picker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}
.tone-native-picker input[type="color"] {
    width: 58px;
    height: 42px;
    padding: 3px;
    border: 1px solid #b7ac97;
    border-radius: 7px;
    background: white;
    cursor: pointer;
}
.tone-native-picker label {
    font-size: 12px;
    line-height: 1.7;
    cursor: pointer;
}
.tone-native-picker[hidden],
.tone-palette-colors[hidden] {
    display: none;
}
