/* ==========================================================
   My Workout AI  -  CONTACT, PRIVACY AND TERMS

   Loaded only on those three pages.

   A legal page has one job: be read. So the column is narrow, the
   text is a size somebody can actually read, and the headings are
   far enough apart to find.
   ========================================================== */


/* ==========================================================
   CONTACT
   ========================================================== */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 30px;
    align-items: start;
}

.contact-form {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 30px 32px;
}

.pg-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pg-fld {
    margin-bottom: 18px;
}

.pg-fld label {
    display: block;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

.pg-fld input,
.pg-fld select,
.pg-fld textarea {
    width: 100%;
    padding: 13px 15px;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    line-height: 1.6;
}

.pg-fld textarea {
    resize: vertical;
}

.pg-fld input:focus,
.pg-fld select:focus,
.pg-fld textarea:focus {
    outline: none;
    border-color: var(--brand);
}

/* The honeypot. Hidden from people, left in the page for bots.
   left:-9999px rather than display:none, because some bots skip
   anything that is display:none. */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.pg-small {
    margin: 16px 0 0;
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--muted);
}

.pg-small a:not(.btn) {
    color: var(--brand);
}

.page-note {
    padding: 14px 18px;
    border-radius: 11px;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 22px;
}

.page-note.ok {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.page-note.bad {
    color: #ff8080;
    background: rgba(255, 90, 90, 0.1);
    border: 1px solid rgba(255, 90, 90, 0.35);
}


/* ---------- the details beside the form ---------- */
.contact-side .side-box {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px 26px;
    margin-bottom: 16px;
}

.contact-side .side-box.quiet {
    background: none;
    border-style: dashed;
}

.contact-side h3 {
    font-family: 'Barlow Condensed', Arial, sans-serif;
    font-size: 20px;
    letter-spacing: 0.5px;
    margin: 0 0 16px;
}

.side-p {
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--muted);
    margin: 0 0 14px;
}

.side-p b {
    color: var(--text);
}

.detail-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.detail-list li {
    display: flex;
    gap: 13px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.detail-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.detail-list span {
    flex: none;
    font-size: 17px;
}

.detail-list small {
    display: block;
    font-size: 10.5px;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 3px;
}

.detail-list a,
.detail-list b {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    word-break: break-word;
}

.detail-list a:hover {
    color: var(--brand);
}

.side-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.side-links li {
    border-bottom: 1px solid var(--line);
}

.side-links li:last-child {
    border-bottom: 0;
}

.side-links a {
    display: block;
    padding: 11px 0;
    font-size: 13.5px;
    color: var(--muted);
    text-decoration: none;
}

.side-links a:hover {
    color: var(--brand);
}


/* ==========================================================
   PRIVACY AND TERMS
   ========================================================== */
.legal {
    font-size: 16px;
    line-height: 1.8;
}

/* the box at the top that says it in three lines */
.legal-summary {
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 4px solid var(--brand);
    border-radius: 14px;
    padding: 24px 26px;
    margin-bottom: 40px;
}

.legal-summary b {
    display: block;
    font-family: 'Barlow Condensed', Arial, sans-serif;
    font-size: 19px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 8px;
}

.legal-summary p {
    margin: 0;
    font-size: 15.5px;
    line-height: 1.75;
}

.legal h2 {
    font-family: 'Barlow Condensed', Arial, sans-serif;
    font-size: 29px;
    line-height: 1.2;
    margin: 46px 0 14px;
    padding-top: 6px;
    scroll-margin-top: 100px;
}

.legal h2:first-of-type {
    margin-top: 0;
}

.legal p {
    margin: 0 0 20px;
    color: var(--text);
}

/* :not(.btn) matters. Without it this rule paints the text of any
   button sitting in prose orange and underlines it - and on a filled
   orange button that is orange text on an orange background, which is
   how the About page ended up with a button nobody could read.

   A link styled as a button is not a prose link. */
.legal a:not(.btn) {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal-list {
    margin: 0 0 24px;
    padding-left: 24px;
}

.legal-list li {
    margin-bottom: 11px;
    line-height: 1.75;
}

.legal-list b {
    color: var(--text);
}


/* ---------- the table of what is stored ---------- */
.legal .table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    margin-bottom: 26px;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14.5px;
    min-width: 560px;
}

.legal-table th {
    text-align: left;
    padding: 14px 18px;
    font-size: 11px;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--card);
    border-bottom: 1px solid var(--line);
}

.legal-table td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    line-height: 1.65;
    color: var(--muted);
}

.legal-table tr:last-child td {
    border-bottom: 0;
}

.legal-table td b {
    display: block;
    color: var(--text);
    margin-bottom: 3px;
}

/* the table name, in small monospace under each row */
.legal-table td small {
    display: block;
    font-family: Consolas, Menlo, monospace;
    font-size: 11.5px;
    color: var(--brand);
    opacity: 0.75;
}


/* ---------- the box at the very bottom ---------- */
.legal-foot {
    margin-top: 48px;
    padding: 30px 32px;
    border: 2px dashed var(--line);
    border-radius: 16px;
    text-align: center;
}

.legal-foot b {
    display: block;
    font-family: 'Barlow Condensed', Arial, sans-serif;
    font-size: 24px;
    margin-bottom: 8px;
}

.legal-foot p {
    color: var(--muted);
    font-size: 14.5px;
    max-width: 440px;
    margin: 0 auto 20px;
}


/* ==========================================================
   SMALLER SCREENS
   ========================================================== */
@media (max-width: 950px) {

    .contact-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {

    .contact-form {
        padding: 24px 20px;
    }

    .pg-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .legal {
        font-size: 15.5px;
    }

    .legal h2 {
        font-size: 25px;
        margin-top: 38px;
    }

    .legal-summary,
    .legal-foot {
        padding: 22px 20px;
    }
}


/* The two buttons at the bottom of the About page. A page that
   explains the site should end by pointing at it, not stop dead. */
.legal-cta {
    display: flex;
    gap: 11px;
    flex-wrap: wrap;
    margin-top: 34px;
    padding-top: 26px;
    border-top: 1px solid var(--line);
}
