/*
 * Gid trust-center and privacy-control pages.
 * Extends legal.css with compact assurance cards, evidence tables,
 * responsive actions, and the public account-deletion form.
 */

.trust-shell {
    color-scheme: dark;
}

.trust-shell .btn-primary {
    background: var(--legal-orange);
    box-shadow: 0 10px 30px rgba(241, 118, 25, 0.2);
}

.trust-shell .btn-primary:hover {
    background: var(--legal-orange);
    box-shadow: 0 14px 36px rgba(241, 118, 25, 0.3);
}

.trust-shell .legal-body {
    padding-top: 6.75rem;
}

.trust-page.legal-container {
    width: min(100%, 1040px);
    padding-top: clamp(1.7rem, 4vw, 3.6rem);
}

.trust-page .legal-header {
    max-width: 820px;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
}

.trust-page .legal-header h1 {
    font-size: clamp(2.35rem, 6.5vw, 4.4rem);
}

.trust-page .legal-summary {
    max-width: 720px;
}

.trust-status-line {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    max-width: 720px;
    margin: 1.25rem auto 0;
    padding: 0.8rem 1rem;
    color: var(--legal-text-muted);
    background: rgba(241, 118, 25, 0.065);
    border: 1px solid rgba(241, 118, 25, 0.24);
    border-radius: 0.9rem;
    font-size: 0.88rem;
    line-height: 1.55;
    text-align: left;
}

.trust-status-line::before {
    content: '';
    flex: 0 0 auto;
    width: 0.52rem;
    height: 0.52rem;
    margin-top: 0.42rem;
    background: var(--legal-orange);
    border-radius: 50%;
    box-shadow: 0 0 14px rgba(241, 118, 25, 0.68);
}

.trust-status-line strong {
    color: var(--legal-text);
}

.trust-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.trust-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.85rem;
    padding: 0.72rem 1.05rem;
    color: #ffffff !important;
    background: var(--legal-orange);
    border: 1px solid var(--legal-orange);
    border-radius: 0.8rem;
    font-size: 0.88rem;
    font-weight: 750 !important;
    line-height: 1.2;
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.trust-button:hover {
    color: #ffffff !important;
    background: var(--legal-orange);
    box-shadow: 0 12px 30px rgba(241, 118, 25, 0.25);
    transform: translateY(-1px);
}

.trust-button--secondary {
    color: var(--legal-text) !important;
    background: rgba(255, 255, 255, 0.045);
    border-color: var(--legal-border);
}

.trust-button--secondary:hover {
    color: #ffffff !important;
    background: rgba(241, 118, 25, 0.08);
    border-color: var(--legal-border-strong);
}

.assurance-grid,
.control-grid,
.process-grid {
    display: grid;
    gap: 0.9rem;
    width: min(100%, 840px);
    margin: 0 auto 3rem;
}

.assurance-grid,
.process-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1.25rem;
    margin-bottom: 1rem;
}

.assurance-card,
.trust-card,
.process-card {
    position: relative;
    min-width: 0;
    padding: 1.2rem;
    background: var(--legal-surface-quiet);
    border: 1px solid var(--legal-border);
    border-radius: 1rem;
}

.assurance-card::before,
.process-card::before {
    content: '';
    position: absolute;
    top: 1.15rem;
    left: 1.15rem;
    width: 0.48rem;
    height: 0.48rem;
    background: var(--legal-orange);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(241, 118, 25, 0.48);
}

.assurance-label,
.process-label {
    display: block;
    margin: 0 0 0.65rem 0.85rem;
    color: var(--legal-text-soft);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    line-height: 1.25;
    text-transform: uppercase;
}

.assurance-value,
.process-card h3,
.trust-card h3 {
    display: block;
    margin: 0 0 0.48rem;
    color: var(--legal-text);
    font-size: 1rem;
    font-weight: 750;
    letter-spacing: -0.015em;
    line-height: 1.35;
}

.assurance-card p,
.trust-card p,
.process-card p {
    margin: 0;
    color: var(--legal-text-muted);
    font-size: 0.88rem;
    line-height: 1.65;
}

.trust-card {
    padding: 1.35rem;
}

.truth-note {
    width: min(100%, 760px);
    margin: 1.25rem auto;
    padding: 1.25rem 1.35rem;
    color: var(--legal-text-muted);
    background: rgba(241, 118, 25, 0.06);
    border: 1px solid rgba(241, 118, 25, 0.24);
    border-left: 3px solid var(--legal-orange);
    border-radius: 0.95rem;
    font-size: 0.95rem;
    line-height: 1.72;
}

.truth-note strong {
    color: var(--legal-text);
}

.framework-table-wrap {
    width: min(100%, 840px);
    margin: 1.25rem auto;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--legal-border);
    border-radius: 1rem;
}

.framework-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--legal-text-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

.framework-table th,
.framework-table td {
    padding: 1rem 1.05rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--legal-border);
}

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

.framework-table th {
    color: var(--legal-text-soft);
    background: rgba(255, 255, 255, 0.025);
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.framework-table td:first-child {
    width: 21%;
    color: var(--legal-text);
    font-weight: 750;
}

.framework-table td:nth-child(2) {
    width: 27%;
}

.status-plain {
    display: inline-flex;
    padding: 0.3rem 0.55rem;
    color: var(--legal-orange);
    background: rgba(241, 118, 25, 0.08);
    border: 1px solid rgba(241, 118, 25, 0.24);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.25;
}

.evidence-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    width: min(100%, 760px);
    margin: 1.25rem auto 0;
}

.evidence-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
    padding: 0.95rem 1rem;
    color: var(--legal-text) !important;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--legal-border);
    border-radius: 0.85rem;
    font-size: 0.86rem;
    font-weight: 650 !important;
    text-decoration: none !important;
}

.evidence-link::after {
    content: '\2197';
    flex: 0 0 auto;
    color: var(--legal-orange);
}

.evidence-link--internal::after {
    content: '\2192';
}

.evidence-link:hover {
    color: #ffffff !important;
    background: rgba(241, 118, 25, 0.07);
    border-color: var(--legal-border-strong);
}

.trust-language {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin: 1rem 0 0;
}

.trust-language a {
    padding: 0.35rem 0.62rem;
    color: var(--legal-text-soft);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--legal-border);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
}

.trust-language a[aria-current='page'] {
    color: #ffffff;
    background: rgba(241, 118, 25, 0.1);
    border-color: rgba(241, 118, 25, 0.32);
}

.trust-footer {
    color: var(--legal-text-muted);
    background: var(--legal-bg-deep);
    border-top: 1px solid var(--legal-border);
}

.trust-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    min-height: 6.4rem;
    padding-top: 1.4rem;
    padding-bottom: 1.4rem;
}

.trust-footer__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--legal-text) !important;
    font-size: 0.92rem;
    font-weight: 800;
    text-decoration: none;
}

.trust-footer__brand img {
    width: 2.15rem;
    height: 2.15rem;
    object-fit: cover;
    border-radius: 0.6rem;
}

.trust-footer__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem 1.2rem;
}

.trust-footer__links a {
    color: var(--legal-text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
}

.trust-footer__links a:hover {
    color: var(--legal-orange);
}

.trust-footer small {
    color: var(--legal-text-soft);
    font-size: 0.72rem;
}

.process-grid {
    margin-bottom: 2.6rem;
}

.process-card {
    padding-top: 1.15rem;
}

.deletion-form {
    width: min(100%, 680px);
    margin: 1.25rem auto 0;
    padding: clamp(1.15rem, 3vw, 1.7rem);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--legal-border);
    border-radius: 1rem;
}

.form-field {
    margin-bottom: 1.2rem;
}

.form-field label,
.confirmation-check {
    color: var(--legal-text);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.5;
}

.form-field label {
    display: block;
    margin-bottom: 0.45rem;
}

/* Password and text are listed alongside email on purpose. Only the email
   selector existed, so `/auth/action` rendered raw grey browser boxes on a dark
   card. `text` matters just as much: a Show-password toggle flips the input's
   type, and without it the field would restyle itself mid-interaction. */
.form-field input[type='email'],
.form-field input[type='password'],
.form-field input[type='text'] {
    width: 100%;
    min-height: 3.1rem;
    padding: 0.75rem 0.9rem;
    color: var(--legal-text);
    background: rgba(8, 12, 19, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 0.75rem;
    font: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field input[type='email']::placeholder,
.form-field input[type='password']::placeholder,
.form-field input[type='text']::placeholder {
    color: var(--legal-text-soft);
}

.form-field input[type='email']:focus,
.form-field input[type='password']:focus,
.form-field input[type='text']:focus {
    outline: none;
    border-color: var(--legal-orange);
    box-shadow: 0 0 0 3px rgba(241, 118, 25, 0.18);
}

/* Chrome paints its own pale-blue autofill background, which reads as a light
   box punched into a dark card. Repaint it with an inset shadow, the only
   property the autofill style does not override. */
.form-field input[type='email']:-webkit-autofill,
.form-field input[type='password']:-webkit-autofill,
.form-field input[type='text']:-webkit-autofill {
    -webkit-text-fill-color: var(--legal-text);
    -webkit-box-shadow: 0 0 0 60rem rgba(8, 12, 19, 0.96) inset;
    caret-color: var(--legal-text);
}

.field-hint {
    margin: 0.45rem 0 0;
    color: var(--legal-text-soft) !important;
    font-size: 0.77rem !important;
    line-height: 1.5 !important;
}

.confirmation-check {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.65rem;
    align-items: start;
    margin: 0 0 1.25rem;
    color: var(--legal-text-muted);
    font-weight: 550;
}

.confirmation-check input {
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.15rem;
    accent-color: var(--legal-orange);
}

.deletion-form .trust-button {
    width: 100%;
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

.deletion-form .trust-button:disabled {
    cursor: wait;
    opacity: 0.62;
    transform: none;
}

.form-status {
    min-height: 1.5rem;
    margin: 0.75rem 0 0;
    color: var(--legal-text-muted);
    font-size: 0.82rem;
    line-height: 1.55;
    text-align: center;
}

.form-status[data-state='error'] {
    color: var(--legal-orange);
}

.deletion-success {
    width: min(100%, 680px);
    margin: 1.25rem auto 0;
    padding: 1.6rem;
    background: rgba(241, 118, 25, 0.06);
    border: 1px solid rgba(241, 118, 25, 0.28);
    border-radius: 1rem;
    text-align: center;
}

.deletion-success:focus {
    outline: 3px solid rgba(241, 118, 25, 0.4);
    outline-offset: 4px;
}

.deletion-success h3 {
    margin: 0 0 0.65rem;
    color: var(--legal-text);
    font-size: 1.25rem;
}

.deletion-success p {
    margin: 0 auto 0.75rem;
    color: var(--legal-text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
}

.noscript-note {
    width: min(100%, 680px);
    margin: 1rem auto 0;
    padding: 0.85rem 1rem;
    color: var(--legal-text-muted);
    background: rgba(241, 118, 25, 0.06);
    border: 1px solid rgba(241, 118, 25, 0.2);
    border-radius: 0.8rem;
    font-size: 0.82rem;
    line-height: 1.55;
}

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

[hidden] {
    display: none !important;
}

@media (max-width: 1024px) {
    .trust-page.legal-container {
        width: min(100%, 940px);
    }
}

@media (max-width: 768px) {
    body.trust-nav-open {
        overflow: hidden;
    }

    .trust-shell .legal-body {
        padding-top: 6.1rem;
    }

    .trust-page.legal-container {
        padding-top: 1.9rem;
    }

    .trust-page .legal-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1.65rem;
    }

    .assurance-grid,
    .process-grid,
    .control-grid,
    .evidence-links {
        grid-template-columns: 1fr;
    }

    .assurance-grid,
    .process-grid {
        margin-bottom: 2.4rem;
    }

    .framework-table-wrap {
        overflow: visible;
        background: transparent;
        border: 0;
        border-radius: 0;
    }

    .framework-table,
    .framework-table tbody,
    .framework-table tr,
    .framework-table td {
        display: block;
        width: 100%;
    }

    .framework-table thead {
        display: none;
    }

    .framework-table tr {
        margin-bottom: 0.75rem;
        overflow: hidden;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--legal-border);
        border-radius: 0.9rem;
    }

    .framework-table td,
    .framework-table td:first-child,
    .framework-table td:nth-child(2) {
        width: 100%;
        padding: 0.75rem 0.9rem;
        border-bottom: 1px solid var(--legal-border);
    }

    .framework-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.28rem;
        color: var(--legal-text-soft);
        font-size: 0.65rem;
        font-weight: 800;
        letter-spacing: 0.1em;
        text-transform: uppercase;
    }

    .trust-footer__inner {
        flex-direction: column;
        justify-content: center;
        min-height: 9rem;
        text-align: center;
    }
}

@media (max-width: 420px) {
    .trust-shell .legal-body {
        padding-top: 5.75rem;
    }

    .trust-page.legal-container {
        padding-top: 1.65rem;
    }

    .trust-page .legal-header h1 {
        font-size: 2.25rem;
    }

    .trust-page .legal-summary {
        margin-top: 0.9rem;
    }

    .trust-status-line {
        padding: 0.72rem 0.78rem;
        font-size: 0.8rem;
    }

    .trust-hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .trust-button {
        width: 100%;
    }

    .assurance-card,
    .trust-card,
    .process-card {
        padding: 1.05rem;
    }

    .truth-note {
        padding: 1rem;
        font-size: 0.88rem;
    }

    .deletion-form {
        padding: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .trust-button,
    .form-field input[type='email'],
    .form-field input[type='password'],
    .form-field input[type='text'] {
        transition: none;
    }
}
