/* Fontish Substitute Finder — Design Layer */
/* Preserves the established 1140px Fontish content width. */

.prototype {
    width: min(100% - 40px, 1140px);
    margin: 48px auto 80px;
}

.prototype__header {
    max-width: 850px;
    margin-bottom: 36px;
}

.prototype__eyebrow {
    margin-bottom: 12px;
    color: #6251bf;
    font-size: 13px;
    font-weight: 750;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.prototype__header h1 {
    max-width: 850px;
    margin-bottom: 16px;
    color: #292344;
    font-size: clamp(36px, 4.5vw, 52px);
    line-height: 1.12;
    letter-spacing: -.025em;
}

.prototype__intro {
    max-width: 720px;
    color: #626272;
    font-size: clamp(16px, 1.7vw, 19px);
    line-height: 1.65;
}

.fsf-hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 22px;
    margin-top: 22px;
}

.fsf-hero-features span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #515168;
    font-size: 14px;
    font-weight: 600;
}

.fsf-hero-features span::before {
    content: "✓";
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #eeeafb;
    color: #5945b2;
    font-size: 12px;
    font-weight: 800;
}

.fsf-panel {
    min-width: 0;
}

.fsf-goal input:focus-visible + span {
    outline: 3px solid #3f6ae0;
    outline-offset: 3px;
}

.fsf-submit:focus-visible,
.fsf-search:focus-visible {
    outline: 3px solid #3f6ae0;
    outline-offset: 3px;
}

@media (max-width: 600px) {
    .prototype {
        width: calc(100% - 28px);
        margin-top: 28px;
    }

    .prototype__header {
        margin-bottom: 28px;
    }

    .prototype__header h1 {
        font-size: clamp(34px, 8vw, 42px);
    }

    .fsf-hero-features {
        gap: 10px 16px;
    }

    .fsf-hero-features span {
        font-size: 13px;
    }

    .fsf-panel {
        padding: 18px;
    }

    .fsf-search-wrap {
        max-width: 100%;
    }
}

@media (max-width: 380px) {
    .prototype {
        width: calc(100% - 24px);
    }

    .fsf-panel {
        padding: 16px;
    }

    .fsf-hero-features {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* FONTISH STANDARD HERO — STEP 322B */
    .fontish-fsf-plugin {
    scroll-behavior: smooth;
}

.fsf-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 32px;
    width: 100%;
    max-width: none;
    min-height: 450px;
    margin-bottom: 36px;
    padding: 54px 44px;
    overflow: hidden;
    border: 1px solid #e7def7;
    border-radius: 28px;
    background:
        radial-gradient(
            ellipse at 96% 5%,
            rgba(151, 115, 224, .40),
            transparent 43%
        ),
        radial-gradient(
            ellipse at 65% 105%,
            rgba(115, 202, 220, .22),
            transparent 37%
        ),
        linear-gradient(
            115deg,
            #ffffff 0%,
            #faf7ff 48%,
            #eee7ff 100%
        );
}

.fsf-hero__content {
    position: relative;
    z-index: 2;
    min-width: 0;
}

.fsf-hero__badge {
    display: inline-block;
    margin: 0 0 24px;
    padding: 8px 15px;
    border-radius: 999px;
    background: #6040c7;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;
    text-transform: uppercase;
}

.fsf-hero h1 {
    max-width: 620px;
    margin: 0 0 20px;
    color: #24183f;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(39px, 4.4vw, 60px);
    line-height: 1.08;
    letter-spacing: -.035em;
}

.fsf-hero .prototype__intro {
    max-width: 520px;
    margin: 0 0 26px;
    color: #625c72;
    font-size: clamp(16px, 1.65vw, 18px);
    line-height: 1.65;
}

.fsf-hero__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 50px;
    padding: 0 22px;
    border-radius: 10px;
    background: #135ef2;
    color: #ffffff;
    font-size: 15px;
    font-weight: 750;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(19, 94, 242, .14);
}

.fsf-hero__cta:hover {
    background: #084ed2;
    color: #ffffff;
}

.fsf-hero__cta:focus-visible {
    outline: 3px solid #24183f;
    outline-offset: 4px;
}

.fsf-hero__features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 24px;
    color: #5a4b78;
    font-size: 12px;
    font-weight: 650;
}

.fsf-hero__features span::before {
    content: "●";
    margin-right: 7px;
    color: #6845dc;
    font-size: 10px;
}

.fsf-hero__art {
    position: relative;
    min-width: 0;
    height: 320px;
}

.fsf-hero__art-heading {
    position: absolute;
    top: 0;
    left: 7%;
    color: #8061a6;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
}

.fsf-hero__card {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 57%;
    height: 235px;
    padding: 18px;
    border: 1px solid #e7dafa;
    border-radius: 22px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 18px 40px rgba(72, 36, 127, .12);
}

.fsf-hero__card--original {
    top: 38px;
    left: 2%;
    transform: rotate(-5deg);
}

.fsf-hero__card--substitute {
    top: 65px;
    right: 0;
    transform: rotate(5deg);
}

.fsf-hero__card-label {
    color: #8a73a4;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .11em;
}

.fsf-hero__glyph {
    display: block;
    color: #4b2585;
    font-size: clamp(64px, 8vw, 108px);
    line-height: 1;
    text-align: center;
}

.fsf-hero__glyph--serif {
    font-family: Georgia, serif;
}

.fsf-hero__glyph--sans {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
    letter-spacing: -.08em;
}

.fsf-hero__card-footer {
    color: #6f6084;
    font-size: 11px;
}

.fsf-hero__connection {
    position: absolute;
    z-index: 3;
    top: 46%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid #d9c9f6;
    border-radius: 50%;
    background: #ffffff;
    color: #6744c5;
    font-size: 26px;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(50, 26, 96, .13);
    transform: translate(-50%, -50%);
}

.fsf-hero__floating {
    position: absolute;
    z-index: 4;
    right: 6%;
    bottom: 0;
    padding: 11px 15px;
    border: 1px solid #e7def5;
    border-radius: 12px;
    background: #ffffff;
    color: #553d84;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 8px 22px rgba(65, 39, 107, .10);
}

#fsf-search-section {
    scroll-margin-top: 24px;
}

@media (max-width: 850px) {
    .fsf-hero {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 38px 30px;
    }

    .fsf-hero__art {
        width: min(100%, 500px);
        margin: 0 auto;
    }
}

@media (max-width: 560px) {
    .fsf-hero {
        padding: 28px 20px;
        border-radius: 20px;
    }

    .fsf-hero__badge {
        margin-bottom: 18px;
    }

    .fsf-hero h1 {
        font-size: clamp(36px, 9vw, 44px);
    }

    .fsf-hero__art {
        height: 240px;
    }

    .fsf-hero__card {
        height: 178px;
        padding: 12px;
        border-radius: 15px;
    }

    .fsf-hero__card--original {
        top: 26px;
    }

    .fsf-hero__card--substitute {
        top: 43px;
    }

    .fsf-hero__glyph {
        font-size: clamp(52px, 15vw, 84px);
    }

    .fsf-hero__connection {
        width: 38px;
        height: 38px;
        font-size: 22px;
    }

    .fsf-hero__floating {
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fontish-fsf-plugin {
        scroll-behavior: auto;
    }
}

/* STEP 324: FONT INSPECTOR WIDTH ALIGNMENT */

/* Match Font Inspector's 1240px maximum hero width. */
@media (min-width: 851px) {
    .prototype {
        width: min(calc(100% - 48px), 1240px);
        max-width: 1240px;
        margin-left: auto;
        margin-right: auto;
    }

    .fsf-hero {
        width: 100%;
        max-width: 1240px;
    }
}

/* STEP 327: UNIFIED WORKSPACE */

/* Join the form sections into one coherent workspace. */
.fsf {
    gap: 0;
}

.fsf > .fsf-panel {
    padding: 28px 32px;
    border-radius: 0;
    box-shadow: none;
}

.fsf > .fsf-panel:first-child {
    border-radius: 18px 18px 0 0;
}

.fsf > .fsf-panel + .fsf-panel {
    border-top: 0;
}

.fsf > .fsf-panel:nth-of-type(4) {
    border-radius: 0 0 18px 18px;
}

/* Consistent section typography and spacing. */
.fsf-panel h2 {
    margin: 0 0 6px;
    color: #29243b;
    font-size: clamp(20px, 2vw, 23px);
    line-height: 1.3;
    letter-spacing: -.02em;
}

.fsf-panel__intro {
    margin: 0 0 18px;
    color: #696778;
    font-size: 15px;
    line-height: 1.55;
}

/* Give the primary search more breathing room. */
.fsf-search-wrap {
    width: 100%;
    max-width: 880px;
}

.fsf-search {
    min-height: 56px;
    border-radius: 11px;
    font-size: 16px;
}

.fsf-selected {
    margin-top: 10px;
    font-size: 13px;
}

/* Matching goals: compact, readable selection cards. */
.fsf-goals {
    gap: 10px;
}

.fsf-goal span {
    min-height: 66px;
    padding: 13px 15px;
    border-radius: 11px;
    font-size: 14px;
    line-height: 1.35;
    transition: border-color .15s, background .15s;
}

.fsf-goal:hover span {
    border-color: #a79ad8;
}

.fsf-goal input:checked + span {
    background: #f3efff;
    border-color: #7455da;
    box-shadow: inset 0 0 0 1px #7455da;
    color: #35235f;
}

/* Optional requirements: align controls consistently. */
.fsf-options {
    align-items: center;
    gap: 16px 24px;
}

.fsf-check {
    min-height: 44px;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
}

.fsf-check input {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    accent-color: #6845dc;
}

.fsf-field label {
    color: #373246;
    font-size: 13px;
}

.fsf-field input,
.fsf-field select {
    min-height: 46px;
    border-radius: 10px;
    font-size: 14px;
}

/* Keep the primary action visually connected to the form. */
.fsf-actions {
    gap: 12px 20px;
}

.fsf-submit {
    min-height: 50px;
    padding: 0 24px;
    border-radius: 10px;
    background: #135ef2;
    font-size: 15px;
}

.fsf-submit:hover {
    background: #084ed2;
    filter: none;
}

.fsf-status {
    font-size: 13px;
    line-height: 1.5;
}

/* Results retain a clear separation from the input workspace. */
.fsf > .fsf-results {
    margin-top: 28px;
    min-width: 0;
}

@media (max-width: 900px) {
    .fsf > .fsf-panel {
        padding: 24px;
    }

    .fsf-goals {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fsf-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .fsf > .fsf-panel {
        padding: 20px 18px;
    }

    .fsf-goals {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .fsf-goal span {
        min-height: 64px;
        padding: 12px;
        font-size: 13px;
    }

    .fsf-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .fsf-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .fsf-submit {
        width: 100%;
    }
}

@media (max-width: 380px) {
    .fsf-goals {
        grid-template-columns: 1fr;
    }

    .fsf-goal span {
        min-height: 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fsf-goal span {
        transition: none;
    }
}

/* STEP 328: SEARCH AND CTA POLISH */

/* Make the font search feel like the primary input. */
.fsf-search-wrap {
    position: relative;
}

.fsf-search {
    min-height: 56px;
    padding: 0 48px 0 18px;
    border: 1px solid #cfcbdc;
    border-radius: 12px;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b5d88' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 17px center;
    background-size: 19px;
    font-size: 16px;
    transition: border-color .15s, box-shadow .15s;
}

.fsf-search:hover {
    border-color: #a99bce;
}

.fsf-search:focus {
    border-color: #7455da;
    box-shadow: 0 0 0 4px rgba(116, 85, 218, .12);
}

.fsf-selected {
    color: #757083;
    font-size: 13px;
}

/* Strengthen the primary CTA. */
.fsf-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 54px;
    padding: 0 28px;
    border-radius: 10px;
    background: #135ef2;
    font-size: 15px;
    font-weight: 750;
    box-shadow: 0 8px 20px rgba(19, 94, 242, .12);
    transition: background .15s, transform .15s;
}

.fsf-submit::after {
    content: "→";
    font-size: 20px;
    font-weight: 500;
    line-height: 1;
}

.fsf-submit:hover:not(:disabled) {
    background: #084ed2;
    transform: translateY(-1px);
}

.fsf-submit:disabled {
    transform: none;
    box-shadow: none;
}

/* Keep readiness messages neutral. */
.fsf-status {
    color: #696778;
    font-size: 13px;
}

.fsf-status[data-state="success"] {
    color: #696778;
}

@media (max-width: 560px) {
    .fsf-search {
        padding-left: 14px;
        padding-right: 44px;
    }

    .fsf-submit {
        width: 100%;
        min-height: 54px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fsf-search,
    .fsf-submit {
        transition: none;
    }
}

/* STEP 329: PRIMARY CTA REFINEMENT */

.fsf-submit {
    min-height: 60px;
    padding: 0 34px;
    font-size: 17px;
    font-weight: 750;
    line-height: 1.2;
    border-radius: 11px;
    gap: 15px;
}

.fsf-submit::after {
    font-size: 21px;
}

.fsf-search:not(:focus) {
    border-color: #d5d1df;
    box-shadow: none;
}

.fsf-search:focus-visible {
    border-color: #7455da;
    box-shadow: 0 0 0 4px rgba(116, 85, 218, .12);
}

@media (max-width: 560px) {
    .fsf-submit {
        width: 100%;
        min-height: 58px;
        font-size: 16px;
    }
}


/* STEP 340 PREVIEW POLISH */
.fsf-v11-preview-settings {
    box-sizing: border-box;
}

.fsf-v11-preview-settings .fsf-v11-specimen-input {
    display: block;
    width: 100%;
    min-height: 60px;
    box-sizing: border-box;
    padding: 15px 18px;
    margin: 0 0 24px;
    border: 1px solid #dcdce7;
    border-radius: 12px;
    background: #fff;
    color: #292638;
    font: inherit;
    font-size: 17px;
    line-height: 1.5;
    transition: border-color .2s, box-shadow .2s;
}

.fsf-v11-preview-settings .fsf-v11-specimen-input:focus {
    outline: none;
    border-color: #7357dc;
    box-shadow: 0 0 0 3px rgba(115, 87, 220, .13);
}

.fsf-v11-preview-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(210px, 250px);
    gap: 24px;
    align-items: end;
}

.fsf-v11-size-control,
.fsf-v11-weight-control {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.fsf-v11-control-label {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #302b43;
}

.fsf-v11-size-control input[type="range"] {
    display: block;
    width: 100%;
    min-width: 0;
    height: 40px;
    margin: 0;
    accent-color: #6551d3;
    cursor: pointer;
}

.fsf-v11-weight-select {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid #dcdce7;
    border-radius: 10px;
    background-color: #fff;
    color: #302b43;
    font: inherit;
    font-size: 15px;
}

.fsf-v11-weight-select:focus-visible,
.fsf-v11-size-control input[type="range"]:focus-visible {
    outline: 2px solid #7357dc;
    outline-offset: 3px;
}

@media (max-width: 700px) {
    .fsf-v11-preview-controls {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .fsf-v11-preview-settings .fsf-v11-specimen-input {
        min-height: 54px;
        font-size: 16px;
    }
}


/* STEP 342D COMPARISON REDESIGN */

.fsf-v11-comparison-panel {
    box-sizing: border-box;
    margin: 28px 0;
    padding: 28px;
    border: 1px solid #e3e2ee;
    border-radius: 16px;
    background: #fff;
    scroll-margin-top: 24px;
}

.fsf-v11-comparison-panel[hidden] {
    display: none !important;
}

.fsf-v11-comparison-heading {
    margin: 0 0 8px;
    color: #29243d;
    font-size: 25px;
    line-height: 1.25;
    font-weight: 750;
}

.fsf-v11-comparison-description {
    margin: 0 0 24px;
    color: #666477;
    font-size: 15px;
    line-height: 1.6;
}

.fsf-v11-comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.fsf-v11-comparison-card {
    box-sizing: border-box;
    min-width: 0;
    padding: 22px;
    border: 1px solid #e3e2ee;
    border-radius: 14px;
    background: #fff;
}

.fsf-v11-comparison-card-header {
    margin-bottom: 15px;
}

.fsf-v11-comparison-role {
    display: inline-block;
    margin-bottom: 9px;
    color: #6751ba;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.fsf-v11-comparison-font-name {
    margin: 0;
    color: #28223d;
    font-size: 22px;
    line-height: 1.3;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.fsf-v11-comparison-card .fsf-v11-actual-weight {
    margin: 0 0 14px;
    color: #696779;
    font-size: 13px;
}

.fsf-v11-comparison-specimen-area {
    min-width: 0;
    padding: 22px;
    border: 1px solid #eeedf5;
    border-radius: 12px;
    background: #f8f7fc;
}

.fsf-v11-comparison-specimen {
    margin: 0;
    line-height: 1.45;
    overflow-wrap: anywhere;
    color: #302b3d;
}

.fsf-v11-comparison-card .fsf-v11-weight-confirmation {
    display: block;
    margin-top: 14px;
    font-size: 13px;
    line-height: 1.5;
}

@media (max-width: 760px) {
    .fsf-v11-comparison-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .fsf-v11-comparison-panel {
        padding: 20px;
    }

    .fsf-v11-comparison-card {
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .fsf-v11-comparison-panel {
        padding: 16px;
    }

    .fsf-v11-comparison-heading {
        font-size: 22px;
    }

    .fsf-v11-comparison-font-name {
        font-size: 20px;
    }

    .fsf-v11-comparison-specimen-area {
        padding: 16px;
    }
}


/* Font Substitute Finder — recommendation cards */
.fsf-v11-result-card {
  padding: 26px 28px;
  margin-bottom: 18px;
  min-width: 0;
}

.fsf-v11-card-header,
.fsf-v11-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.fsf-v11-card-title {
  margin: 0;
  color: #28213f;
  font-size: 23px;
  font-weight: 750;
  line-height: 1.3;
}

.fsf-v11-card-rank {
  color: #6752c8;
  margin-right: 5px;
}

.fsf-v11-card-category {
  color: #66677a;
  font-size: 14px;
  white-space: nowrap;
}

.fsf-v11-card-specimen {
  margin: 25px 0;
  min-height: 45px;
  color: #2e2a3a;
}

.fsf-v11-card-footer {
  border-top: 1px solid #e8e7f0;
  padding-top: 18px;
}

.fsf-v11-card-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  color: #5d5e70;
  font-size: 14px;
}

.fsf-v11-card-primary-score {
  color: #34245b;
  font-size: 15px;
}

.fsf-v11-card-confidence strong {
  font-weight: 650;
  text-transform: capitalize;
}

.fsf-v11-card-preference.is-met {
  color: #28794b;
}

.fsf-v11-card-preference.is-unmet {
  color: #806020;
}

.fsf-v11-card-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.fsf-v11-compare-button {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid #7660d9;
  border-radius: 9px;
  background: #fff;
  color: #6044c9;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}

.fsf-v11-compare-button:hover {
  background: #f3efff;
}

.fsf-v11-get-font {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  color: #1558e8;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.fsf-v11-get-font:hover {
  text-decoration: underline;
}

.fsf-v11-compare-button:focus-visible,
.fsf-v11-get-font:focus-visible {
  outline: 3px solid #8265e8;
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .fsf-v11-result-card {
    padding: 22px 20px;
  }

  .fsf-v11-card-header,
  .fsf-v11-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .fsf-v11-card-title {
    font-size: 21px;
  }

  .fsf-v11-card-specimen {
    margin: 22px 0;
  }

  .fsf-v11-card-actions {
    width: 100%;
    flex-wrap: wrap;
  }
}

@media (max-width: 420px) {
  .fsf-v11-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .fsf-v11-compare-button,
  .fsf-v11-get-font {
    justify-content: center;
    text-align: center;
  }
}


/* STEP 349: FINAL RESPONSIVE REFINEMENTS */

/* Keep flexible content inside its available width. */
.fsf,
.fsf > .fsf-panel,
.fsf-v11-result-card,
.fsf-v11-comparison-grid,
.fsf-v11-comparison-card,
.fsf-v11-preview-settings {
    min-width: 0;
}

.fsf-v11-card-specimen,
.fsf-v11-comparison-specimen-area {
    max-width: 100%;
    overflow-wrap: anywhere;
}

/* Tablet: more balanced goal selection. */
@media (min-width: 761px) and (max-width: 900px) {
    .fsf-goals {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .fsf-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Smaller tablets and larger phones. */
@media (max-width: 760px) {
    .fsf-goals {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fsf-goal span {
        min-height: 68px;
        height: 100%;
    }

    .fsf-v11-card-header,
    .fsf-v11-card-footer {
        gap: 14px;
    }

    .fsf-v11-card-category {
        white-space: normal;
    }

    .fsf-v11-comparison-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Phone layouts. */
@media (max-width: 560px) {
    .fsf-goals {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .fsf-goal span {
        min-height: 64px;
        padding: 12px;
        font-size: 14px;
        line-height: 1.4;
    }

    .fsf-options {
        grid-template-columns: minmax(0, 1fr);
    }

    .fsf-search-wrap,
    .fsf-search,
    .fsf-v11-specimen-input,
    .fsf-v11-preview-controls {
        max-width: 100%;
        min-width: 0;
    }

    .fsf-submit {
        width: 100%;
        min-height: 60px;
        font-size: 17px;
    }

    .fsf-v11-result-card {
        padding: 20px 18px;
    }

    .fsf-v11-card-actions {
        width: 100%;
    }

    .fsf-v11-compare-button,
    .fsf-v11-get-font {
        min-height: 46px;
    }

    .fsf-v11-comparison-card,
    .fsf-v11-comparison-specimen-area {
        min-width: 0;
    }
}

/* Narrow phones: prioritize readable controls. */
@media (max-width: 380px) {
    .fsf-goals {
        grid-template-columns: minmax(0, 1fr);
    }

    .fsf-goal span {
        min-height: 52px;
    }

    .fsf-v11-card-actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .fsf-v11-compare-button,
    .fsf-v11-get-font {
        width: 100%;
        justify-content: center;
    }
}


/* FONTISH SEO CONTENT — STEP 356 */
.fsf-editorial {
    width: min(100% - 48px, 1240px);
    margin: 72px auto 90px;
    color: #25183d;
}

.fsf-editorial-section {
    max-width: 820px;
    margin: 0 auto 70px;
}

.fsf-editorial h2 {
    font-size: clamp(28px, 3vw, 36px);
    line-height: 1.22;
    letter-spacing: -0.025em;
    margin: 0 0 24px;
    color: #25183d;
}

.fsf-editorial h3 {
    font-size: clamp(19px, 2vw, 23px);
    line-height: 1.35;
    margin: 32px 0 12px;
    color: #25183d;
}

.fsf-editorial p {
    font-size: 17px;
    line-height: 1.75;
    margin: 0 0 18px;
    color: #454055;
}

.fsf-editorial strong {
    color: #25183d;
}

.fsf-editorial-flow {
    width: min(1100px, calc(100vw - 48px));
    max-width: none;
    margin: 38px 0 0 50%;
    transform: translateX(-50%);
}

.fsf-editorial-flow img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
}

.fsf-editorial-faq details {
    border: 1px solid #e4e0ef;
    border-radius: 14px;
    margin: 0 0 12px;
    background: #fff;
    overflow: hidden;
}

.fsf-editorial-faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 19px 22px;
    cursor: pointer;
    list-style: none;
}

.fsf-editorial-faq summary::-webkit-details-marker {
    display: none;
}

.fsf-editorial-faq summary h3 {
    font-size: 18px;
    line-height: 1.4;
    margin: 0;
}

.fsf-editorial-faq summary::after {
    content: "+";
    flex: none;
    color: #6554b9;
    font-size: 26px;
    line-height: 1;
}

.fsf-editorial-faq details[open] summary::after {
    content: "−";
}

.fsf-editorial-faq summary:focus-visible {
    outline: 3px solid #6554b9;
    outline-offset: -3px;
}

.fsf-faq-answer {
    padding: 0 22px 12px;
}

.fsf-faq-answer p {
    font-size: 16px;
    line-height: 1.7;
}

@media (max-width: 600px) {
    .fsf-editorial {
        width: calc(100% - 36px);
        margin: 48px auto 60px;
    }

    .fsf-editorial-section {
        margin-bottom: 52px;
    }

    .fsf-editorial p {
        font-size: 16px;
        line-height: 1.7;
    }

    .fsf-editorial-flow {
        width: calc(100vw - 36px);
        margin-top: 26px;
    }

    .fsf-editorial-faq summary {
        padding: 16px;
    }

    .fsf-editorial-faq summary h3 {
        font-size: 16px;
    }

    .fsf-faq-answer {
        padding: 0 16px 10px;
    }
}


/* STEP 358: BALANCED EDITORIAL LAYOUT */

/* One cohesive editorial surface beneath the finder. */
.fsf-editorial {
    box-sizing: border-box;
    width: min(calc(100% - 48px), 1080px);
    max-width: 1080px;
    margin: 64px auto 88px;
    padding: 64px clamp(32px, 6vw, 88px);
    background: #ffffff;
    border: 1px solid #e8e5f0;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(37, 24, 61, 0.035);
}

/* Consistent reading width and section rhythm. */
.fsf-editorial-section {
    box-sizing: border-box;
    width: 100%;
    max-width: 820px;
    margin: 0 auto 52px;
    padding: 0 0 52px;
    border-bottom: 1px solid #eae7f1;
}

.fsf-editorial-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Clear, restrained editorial typography. */
.fsf-editorial h2 {
    font-size: clamp(28px, 3vw, 36px);
    line-height: 1.23;
    letter-spacing: -0.025em;
    margin: 0 0 24px;
    color: #25183d;
}

.fsf-editorial p {
    font-size: 17px;
    line-height: 1.72;
    margin: 0 0 18px;
    color: #454055;
}

.fsf-editorial-section > p:last-child {
    margin-bottom: 0;
}

/* A slightly stronger opening paragraph. */
.fsf-editorial-section > h2 + p {
    font-size: 18px;
    line-height: 1.68;
    color: #342a48;
}

/* Scannable five-step instructions. */
.fsf-editorial-section:not(.fsf-editorial-faq) > h3 {
    position: relative;
    padding-left: 17px;
    margin: 34px 0 14px;
    border-left: 3px solid #6a5acd;
    font-size: clamp(19px, 2vw, 22px);
    line-height: 1.4;
}

/* Keep the approved infographic aligned with the article. */
.fsf-editorial-flow {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 36px 0 0;
    transform: none;
}

.fsf-editorial-flow img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 14px;
}

/* FAQs share the same content width. */
.fsf-editorial-faq {
    max-width: 820px;
}

.fsf-editorial-faq h2 {
    margin-bottom: 28px;
}

.fsf-editorial-faq details {
    border-color: #e6e1f0;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 24, 61, 0.025);
    transition: border-color 0.2s ease;
}

.fsf-editorial-faq details[open] {
    border-color: #cfc5ed;
}

.fsf-editorial-faq summary:hover {
    background: #faf9fd;
}

.fsf-editorial-faq summary h3 {
    border: none;
    padding: 0;
    margin: 0;
}

/* Tablet adjustments. */
@media (max-width: 850px) {
    .fsf-editorial {
        padding: 44px 34px;
        margin-top: 52px;
    }

    .fsf-editorial-section {
        margin-bottom: 44px;
        padding-bottom: 44px;
    }
}

/* Mobile: maintain readable text and balanced gutters. */
@media (max-width: 600px) {
    .fsf-editorial {
        width: calc(100% - 28px);
        margin: 38px auto 56px;
        padding: 28px 20px;
        border-radius: 18px;
    }

    .fsf-editorial-section {
        margin-bottom: 38px;
        padding-bottom: 38px;
    }

    .fsf-editorial h2 {
        font-size: clamp(26px, 7vw, 32px);
        margin-bottom: 20px;
    }

    .fsf-editorial p,
    .fsf-editorial-section > h2 + p {
        font-size: 16px;
        line-height: 1.7;
    }

    .fsf-editorial-section:not(.fsf-editorial-faq) > h3 {
        font-size: 19px;
        margin-top: 28px;
    }

    .fsf-editorial-flow {
        width: 100%;
        margin: 28px 0 0;
    }

    .fsf-editorial-faq summary {
        padding: 17px 15px;
    }

    .fsf-editorial-faq summary h3 {
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fsf-editorial-faq details {
        transition: none;
    }
}


/* STEP 360: MATCH EDITORIAL AND TOOL WIDTH */

/* Align the educational panel with the main finder. */
.fsf-editorial {
    width: min(calc(100% - 48px), 1240px);
    max-width: 1240px;
    padding-left: clamp(28px, 5vw, 72px);
    padding-right: clamp(28px, 5vw, 72px);
}

/* Preserve comfortable paragraph lengths. */
.fsf-editorial-section {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

/* Keep the approved infographic aligned with the reading column. */
.fsf-editorial-flow {
    width: 100%;
    max-width: 100%;
}

/* Match the main tool's responsive gutters. */
@media (max-width: 600px) {
    .fsf-editorial {
        width: calc(100% - 28px);
        padding-left: 20px;
        padding-right: 20px;
    }
}


/* STEP 362: EXACT OUTER WIDTH ALIGNMENT */

/*
 * Use the full width of the existing page container.
 * Do not subtract additional gutters from this element.
 */
.fsf-editorial {
    box-sizing: border-box;
    width: 100%;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
}

/* Preserve the approved editorial reading width. */
.fsf-editorial-section {
    width: 100%;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

/* Avoid reintroducing a narrower outer panel on mobile. */
@media (max-width: 600px) {
    .fsf-editorial {
        width: 100%;
        max-width: 100%;
    }
}


/* STEP 364: EDITORIAL DESIGN POLISH */

/* A subtle editorial surface, without changing the approved width. */
.fsf-editorial {
    margin-top: 46px;
    padding-top: 56px;
    background:
        linear-gradient(
            180deg,
            #faf9ff 0,
            #ffffff 230px
        );
    border-color: #e7e2f0;
    box-shadow: 0 12px 36px rgba(37, 24, 61, 0.035);
}

/* Small brand accent above each main editorial heading. */
.fsf-editorial-section > h2::before {
    content: "";
    display: block;
    width: 44px;
    height: 4px;
    margin-bottom: 20px;
    border-radius: 999px;
    background: #6a5acd;
}

/* More deliberate separation between the three sections. */
.fsf-editorial-section {
    border-bottom-color: #e9e5f1;
}

.fsf-editorial-section:last-child {
    border-bottom: none;
}

/* Keep the instructional headings prominent but restrained. */
.fsf-editorial-section:not(.fsf-editorial-faq) > h3 {
    border-left-color: #7563d3;
}

/* Gentle FAQ hover and expanded states. */
.fsf-editorial-faq details {
    transition:
        border-color 0.18s ease,
        background-color 0.18s ease;
}

.fsf-editorial-faq details[open] {
    border-color: #cfc5ed;
    background: #fdfcff;
}

.fsf-editorial-faq summary:hover {
    background: #f7f5fd;
}

.fsf-editorial-faq summary::after {
    font-weight: 400;
}

/* Maintain the same visual balance on tablets and phones. */
@media (max-width: 850px) {
    .fsf-editorial {
        margin-top: 42px;
        padding-top: 42px;
    }
}

@media (max-width: 600px) {
    .fsf-editorial {
        margin-top: 30px;
        padding-top: 30px;
        background:
            linear-gradient(
                180deg,
                #faf9ff 0,
                #ffffff 160px
            );
    }

    .fsf-editorial-section > h2::before {
        width: 36px;
        height: 3px;
        margin-bottom: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fsf-editorial-faq details {
        transition: none;
    }
}


/* Fontish Finder — matched to Font Inspector page dimensions */
.fontish-fsf-plugin.prototype {
    box-sizing: border-box;
    width: min(1240px, calc(100% - 48px));
    margin: 0 auto 80px;
    padding-top: 0;
}

@media (min-width: 1500px) {
    .fontish-fsf-plugin.prototype {
        width: min(1320px, calc(100% - 48px));
    }
}

.fontish-fsf-plugin .fontish-fsf-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 22px 0;
    color: #777187;
    font-size: 13px;
    line-height: 1.5;
}

.fontish-fsf-plugin .fontish-fsf-breadcrumb a,
.fontish-fsf-plugin .fontish-fsf-breadcrumb span {
    color: inherit;
    font-size: inherit;
    text-decoration: none;
}

.fontish-fsf-plugin .fontish-fsf-breadcrumb a:hover {
    color: #5f43d7;
    text-decoration: underline;
}

@media (max-width: 600px) {
    .fontish-fsf-plugin.prototype {
        width: calc(100% - 28px);
        margin-top: 0;
        padding-top: 0;
    }
}

@media (max-width: 380px) {
    .fontish-fsf-plugin.prototype {
        width: calc(100% - 24px);
    }
}

/* Step 401M — White outer background */
.fontish-fsf-plugin.prototype {
    background: #ffffff;
}
