* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f6f7f9;
    color: #20242a;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

.landing-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 7% 10%, rgba(40, 132, 103, 0.16), transparent 29%),
        linear-gradient(135deg, #f3f8f5 0%, #f8faf9 52%, #eef4f1 100%);
    color: #16332b;
}

.landing-topbar {
    width: min(1240px, calc(100% - 64px));
    min-height: 88px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.landing-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #16332b;
    text-decoration: none;
}

.landing-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: #176b55;
    color: white;
    font-size: 21px;
    font-weight: 750;
    box-shadow: 0 10px 24px rgba(23, 107, 85, 0.18);
}

.landing-brand strong,
.landing-brand small {
    display: block;
}

.landing-brand strong {
    font-size: 19px;
    letter-spacing: -0.02em;
}

.landing-brand small {
    margin-top: 2px;
    color: #5d746d;
    font-size: 12px;
}

.landing-access-link {
    border: 1px solid rgba(23, 107, 85, 0.24);
    border-radius: 999px;
    padding: 9px 15px;
    color: #176b55;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.landing-main {
    width: min(1240px, calc(100% - 64px));
    margin: 0 auto;
    padding: 56px 0 76px;
}

.landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(350px, 0.72fr);
    align-items: center;
    gap: clamp(48px, 7vw, 100px);
}

.landing-copy {
    max-width: 760px;
}

.landing-eyebrow {
    margin: 0 0 18px;
    color: #176b55;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.landing-copy > h1 {
    max-width: 720px;
    margin: 0;
    color: #102d25;
    font-size: clamp(44px, 5.2vw, 72px);
    font-weight: 720;
    letter-spacing: -0.055em;
    line-height: 0.99;
}

.landing-lead {
    max-width: 650px;
    margin: 28px 0 0;
    color: #526a63;
    font-size: 18px;
    line-height: 1.65;
}

.landing-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 50px;
}

.landing-features article {
    padding: 18px 18px 20px;
    border-top: 1px solid rgba(23, 107, 85, 0.25);
}

.landing-features article > span {
    color: #4d8d7c;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.landing-features h2 {
    margin: 13px 0 8px;
    color: #173b31;
    font-size: 15px;
}

.landing-features p {
    margin: 0;
    color: #647a74;
    font-size: 13px;
    line-height: 1.55;
}

.landing-login-card {
    position: relative;
    padding: 34px;
    border: 1px solid rgba(14, 72, 57, 0.11);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 30px 80px rgba(26, 67, 55, 0.14);
    overflow: hidden;
}

.landing-login-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 34px;
    width: 56px;
    height: 4px;
    border-radius: 0 0 4px 4px;
    background: #2d997b;
}

.landing-login-heading > p {
    margin: 0 0 9px;
    color: #32816c;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.landing-login-heading h2 {
    margin: 0;
    color: #183a31;
    font-size: 27px;
    letter-spacing: -0.025em;
}

.landing-login-heading > span {
    display: block;
    margin: 9px 0 27px;
    color: #6a7e78;
    font-size: 13px;
    line-height: 1.5;
}

.landing-login-card .form-field {
    margin-bottom: 17px;
}

.landing-login-card .form-field label {
    color: #405b53;
    font-size: 13px;
}

.landing-login-card .form-field input {
    border-color: #d5e0dc;
    background: #fbfdfc;
}

.landing-login-card .form-field input:focus {
    border-color: #2d997b;
    outline: 3px solid rgba(45, 153, 123, 0.11);
}

.landing-login-button {
    width: 100%;
    border: 0;
    border-radius: 10px;
    padding: 13px 18px;
    background: #176b55;
    color: white;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(23, 107, 85, 0.18);
}

.landing-login-button:hover {
    background: #105a47;
}

.landing-privacy-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0 0;
    color: #71847e;
    font-size: 11px;
    line-height: 1.5;
}

.landing-privacy-note span {
    color: #2d997b;
    font-size: 8px;
}

.landing-footer {
    width: min(1240px, calc(100% - 64px));
    margin: 0 auto;
    padding: 25px 0 30px;
    border-top: 1px solid rgba(23, 107, 85, 0.14);
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: #6b7f79;
    font-size: 12px;
}

.topbar {
    min-height: 72px;
    background: white;
    border-bottom: 1px solid #e4e7eb;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 32px;
}

.brand-name {
    font-size: 22px;
    font-weight: 700;
}

.brand-module {
    margin-top: 2px;
    color: #68707c;
    font-size: 13px;
}

.brand-link {
    color: inherit;
    text-decoration: none;
}

.admin-link {
    color: #444b55;
    text-decoration: none;
    font-size: 14px;
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 14px;
}

.topbar-nav a,
.link-button {
    border: 0;
    padding: 0;
    background: none;
    color: #444b55;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.topbar-nav a:hover,
.link-button:hover {
    text-decoration: underline;
}

.mobile-label {
    display: none;
}

.user-name {
    color: #68707c;
}

.login-container {
    width: min(440px, calc(100% - 32px));
    margin: 70px auto;
}

.login-card {
    padding: 30px;
    border: 1px solid #e1e5e9;
    border-radius: 14px;
    background: white;
}

.login-card h1 {
    margin: 0;
}

.login-card > p {
    margin: 8px 0 26px;
    color: #68707c;
}

.login-button {
    width: 100%;
}

.container {
    width: min(1180px, calc(100% - 40px));
    margin: 40px auto;
}

.page-header h1 {
    margin: 0;
    font-size: 30px;
}

.page-header p {
    color: #68707c;
    margin-top: 8px;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.page-header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
}

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 8px;
    padding: 11px 18px;

    background: #20242a;
    color: white;

    font: inherit;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #ccd2d9;
    border-radius: 8px;
    padding: 10px 17px;

    background: white;
    color: #20242a;

    font: inherit;
    font-weight: 650;
    cursor: pointer;
}

.danger-button {
    border: 1px solid #e0b8bb;
    border-radius: 8px;
    padding: 10px 17px;
    background: #fff7f7;
    color: #8a1f25;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
}

.archived-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #f4e9d3;
    color: #7a5413;
    font-size: 12px;
    font-weight: 700;
}

.inline-form {
    margin: 0;
}

.message-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.message {
    padding: 12px 14px;
    border: 1px solid #d8dde3;
    border-radius: 8px;
    background: white;
    font-size: 14px;
}

.message-success {
    border-color: #b9d8c0;
    background: #f5fbf6;
    color: #285f37;
}

.message-error {
    border-color: #e5bfc1;
    background: #fff7f7;
    color: #8a1f25;
}

.search-panel {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 12px;

    padding: 20px;
    margin-top: 28px;
}

.search-row {
    display: flex;
    gap: 10px;
}

.search-row input {
    flex: 1;

    padding: 12px 14px;

    border: 1px solid #ccd2d9;
    border-radius: 8px;

    font-size: 15px;
}

.search-row button {
    border: 0;
    border-radius: 8px;

    padding: 0 22px;

    font-weight: 600;
    cursor: pointer;
}

.clear-link {
    display: flex;
    align-items: center;

    padding: 0 10px;

    color: #68707c;
    text-decoration: none;
}

.results-header {
    margin: 28px 0 14px;
    color: #5b6470;
}

.question-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 24px;
    color: #68707c;
    font-size: 14px;
}

.pagination a {
    color: #303740;
    font-weight: 650;
    text-decoration: none;
}

.question-card {
    background: white;

    border: 1px solid #e1e5e9;
    border-radius: 12px;

    padding: 20px 22px;
}

.question-card-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.question-code {
    color: #68707c;
    font-size: 13px;
    font-weight: 600;
}

.question-card h2 {
    margin: 5px 0 0;

    font-size: 18px;
    font-weight: 650;
}

.version-badge {
    height: fit-content;

    border: 1px solid #d8dde3;
    border-radius: 999px;

    padding: 5px 10px;

    color: #58616c;
    font-size: 12px;
}

.metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;

    margin-top: 16px;
}

.meta-item {
    background: #f1f3f5;
    border-radius: 999px;

    padding: 6px 10px;

    font-size: 12px;
}

.status-row {
    margin-top: 15px;
}

.status {
    color: #54606d;
    font-size: 13px;
}

.no-version {
    margin-top: 15px;
    color: #8a5c00;
    font-size: 13px;
}

.empty-state {
    text-align: center;

    background: white;

    border: 1px solid #e1e5e9;
    border-radius: 12px;

    padding: 55px 20px;
}

.empty-state h2 {
    margin: 0;
    font-size: 19px;
}

.empty-state p {
    margin-bottom: 0;
    color: #68707c;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-field label {
    color: #59626e;
    font-size: 12px;
    font-weight: 600;
}

.filter-field select {
    width: 100%;
    padding: 10px 11px;

    background: white;

    border: 1px solid #ccd2d9;
    border-radius: 8px;

    font-size: 14px;
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-top: 18px;
}

.filter-actions button {
    border: 0;
    border-radius: 8px;

    padding: 10px 18px;

    font-weight: 600;
    cursor: pointer;
}

.question-card-link {
    color: inherit;
    text-decoration: none;
}

.question-card-link .question-card {
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}

.question-card-link:hover .question-card {
    border-color: #c8ced6;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}


/* Página de detalhe */

.detail-navigation {
    margin-bottom: 24px;
}

.detail-navigation a {
    color: #59626e;
    text-decoration: none;
    font-size: 14px;
}

.detail-navigation a:hover {
    text-decoration: underline;
}

.detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;

    margin-bottom: 28px;
}

.detail-header h1 {
    margin: 6px 0 0;
    font-size: 30px;
}

.detail-version {
    flex-shrink: 0;

    padding: 7px 12px;

    border: 1px solid #d8dde3;
    border-radius: 999px;

    background: white;

    color: #58616c;
    font-size: 13px;
}

.detail-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-section {
    background: white;

    border: 1px solid #e1e5e9;
    border-radius: 12px;

    padding: 24px;

    margin-bottom: 16px;
}

.detail-section h2 {
    margin: 0 0 18px;

    font-size: 17px;
}

.stem,
.rationale {
    line-height: 1.65;
}

.stem p:first-child,
.rationale p:first-child {
    margin-top: 0;
}

.stem p:last-child,
.rationale p:last-child {
    margin-bottom: 0;
}


/* Alternativas */

.option-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-option {
    display: flex;
    gap: 14px;

    padding: 15px;

    border: 1px solid #e1e5e9;
    border-radius: 10px;
}

.correct-option {
    border-color: #b9d8c0;
    background: #f5fbf6;
}

.option-position {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 30px;
    height: 30px;

    border-radius: 50%;
    background: #f0f2f4;

    font-size: 13px;
    font-weight: 700;
}

.option-content {
    flex: 1;
}

.option-text {
    line-height: 1.5;
}

.correct-label {
    margin-top: 7px;

    color: #347645;

    font-size: 12px;
    font-weight: 700;
}

.option-feedback {
    margin-top: 10px;

    color: #626b76;
    font-size: 13px;
}


/* Classificações */

.classification-list {
    display: flex;
    flex-direction: column;
}

.classification-row {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 20px;

    padding: 11px 0;

    border-bottom: 1px solid #edf0f2;
}

.classification-row:last-child {
    border-bottom: 0;
}

.classification-dimension {
    color: #69727d;
    font-size: 13px;
    font-weight: 600;
}

.classification-value {
    font-size: 14px;
}

.classification-role {
    display: inline-block;

    margin-left: 8px;
    padding: 3px 7px;

    border-radius: 999px;

    background: #f0f2f4;

    color: #69727d;
    font-size: 11px;
}


/* Tags */

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-tag {
    padding: 6px 10px;

    border-radius: 999px;
    background: #f1f3f5;

    font-size: 12px;
}


/* Referências */

.reference-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.reference-item {
    line-height: 1.5;
}

.reference-meta,
.reference-notes {
    margin-top: 5px;

    color: #68707c;
    font-size: 13px;
}

.reference-meta a {
    color: inherit;
}


/* Histórico */

.version-list {
    display: flex;
    flex-direction: column;
}

.version-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;

    padding: 12px 0;

    border-bottom: 1px solid #edf0f2;
}

.version-row-link {
    color: inherit;
    text-decoration: none;
}

.version-row-link:hover {
    background: #fafbfc;
}

.compare-link {
    display: inline-block;
    margin: -5px 0 12px;
    color: #4f5863;
    font-size: 13px;
}

.version-row:last-child {
    border-bottom: 0;
}

.version-meta {
    color: #68707c;
    font-size: 13px;
}

.version-change-note {
    max-width: 520px;
    margin-top: 6px;
    color: #4f5863;
    line-height: 1.4;
}

.review-action {
    position: relative;
}

.review-action summary {
    list-style: none;
}

.review-action summary::-webkit-details-marker {
    display: none;
}

.review-action-form {
    position: absolute;
    z-index: 10;
    right: 0;
    top: calc(100% + 8px);
    width: min(420px, calc(100vw - 40px));
    padding: 18px;
    border: 1px solid #d8dde3;
    border-radius: 10px;
    background: white;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.14);
}

.review-action-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 650;
}

.review-action-form textarea {
    width: 100%;
    margin-bottom: 5px;
    padding: 10px;
    border: 1px solid #ccd2d9;
    border-radius: 8px;
    font: inherit;
}

.review-action-form .primary-button {
    margin-top: 14px;
}

.review-event-list {
    display: flex;
    flex-direction: column;
}

.review-event {
    padding: 13px 0;
    border-bottom: 1px solid #edf0f2;
    font-size: 14px;
}

.review-event:last-child {
    border-bottom: 0;
}

.review-comment {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f6f7f9;
    line-height: 1.5;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 28px;
}

.dashboard-column {
    min-width: 0;
}

.dashboard-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.dashboard-heading h2 {
    margin: 0;
    font-size: 17px;
}

.dashboard-heading span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #e9ecef;
    font-size: 12px;
    font-weight: 700;
}

.dashboard-card,
.dashboard-empty {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
    padding: 16px;
    border: 1px solid #e1e5e9;
    border-radius: 10px;
    background: white;
}

.archived-section {
    margin-top: 36px;
}

.archived-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.compare-controls {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    margin: 24px 0;
    padding: 18px;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    background: white;
}

.compare-controls .form-field {
    flex: 1;
    margin: 0;
}

.diff-block {
    overflow: hidden;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
}

.diff-line {
    min-height: 24px;
    padding: 4px 10px;
    white-space: pre-wrap;
}

.diff-added {
    background: #eaf7ed;
    color: #285f37;
}

.diff-added::before {
    content: "+ ";
}

.diff-removed {
    background: #fff0f0;
    color: #8a1f25;
}

.diff-removed::before {
    content: "− ";
}

.compare-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.compare-option {
    margin-bottom: 8px;
    padding: 10px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
}

.dashboard-card {
    color: inherit;
    text-decoration: none;
}

.dashboard-card:hover {
    border-color: #b7bec7;
}

.dashboard-card strong,
.dashboard-card small {
    color: #68707c;
}

.dashboard-empty {
    color: #7a838d;
    font-size: 14px;
}

.preferred-label {
    display: inline-block;

    margin-left: 8px;
    padding: 3px 7px;

    border-radius: 999px;
    background: #f0f2f4;

    font-size: 11px;
}

.empty-detail {
    margin: 0;

    color: #7a838d;
    font-size: 14px;
}

/* Formulário de criação */

.form-container {
    max-width: 820px;
}

.question-form {
    margin-top: 28px;
    padding: 24px;

    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 20px;
}

.form-field label {
    font-size: 14px;
    font-weight: 650;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 11px 12px;

    border: 1px solid #ccd2d9;
    border-radius: 8px;

    background: white;
    color: inherit;
    font: inherit;
}

.form-field textarea {
    resize: vertical;
}

.section-kicker {
    margin: 0 0 8px;
    color: #176b55;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.team-container {
    max-width: 1120px;
}

.team-search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 28px 0 18px;
    padding: 14px;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    background: white;
}

.team-search input {
    min-width: 0;
    flex: 1;
    border: 1px solid #ccd2d9;
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
}

.team-search button {
    border: 0;
    border-radius: 8px;
    padding: 11px 18px;
    background: #20242a;
    color: white;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.team-search a {
    padding: 0 8px;
    color: #59626e;
    font-size: 13px;
    text-decoration: none;
}

.team-panel {
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    background: white;
    overflow: hidden;
}

.team-table-header,
.team-row {
    display: grid;
    grid-template-columns: minmax(260px, 1.15fr) minmax(260px, 1fr) 100px 70px;
    align-items: center;
    gap: 18px;
}

.team-table-header {
    padding: 13px 20px;
    border-bottom: 1px solid #e9ecef;
    background: #fafbfc;
    color: #747d87;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.team-row {
    padding: 18px 20px;
    border-bottom: 1px solid #edf0f2;
}

.team-row:last-child {
    border-bottom: 0;
}

.team-person {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.team-person > div {
    min-width: 0;
}

.team-person strong,
.team-person small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-person small {
    margin-top: 4px;
    color: #747d87;
    font-size: 12px;
}

.team-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #e7f1ed;
    color: #176b55;
    font-size: 14px;
    font-weight: 800;
}

.team-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.role-chip {
    padding: 5px 8px;
    border-radius: 999px;
    background: #f0f2f4;
    color: #535c66;
    font-size: 11px;
    font-weight: 650;
}

.role-chip-admin {
    background: #e5f2ed;
    color: #176b55;
}

.muted-text {
    color: #7a838d;
    font-size: 12px;
}

.status-dot {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 650;
}

.status-dot::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.status-active {
    color: #347645;
}

.status-active::before {
    background: #49a363;
}

.status-inactive {
    color: #8a5558;
}

.status-inactive::before {
    background: #bd6f74;
}

.team-actions {
    text-align: right;
    font-size: 12px;
}

.team-actions a {
    color: #176b55;
    font-weight: 700;
    text-decoration: none;
}

.team-actions span {
    color: #939aa2;
}

.team-form-container {
    width: min(820px, calc(100% - 40px));
    margin: 34px auto;
}

.back-link {
    color: #59626e;
    font-size: 13px;
    text-decoration: none;
}

.form-card {
    margin-top: 18px;
    padding: 28px;
    border: 1px solid #e1e5e9;
    border-radius: 14px;
    background: white;
}

.form-header h1 {
    margin: 0;
    font-size: 28px;
}

.form-header > p:last-child {
    margin: 8px 0 26px;
    color: #68707c;
}

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

.team-form-grid .form-field small,
.access-state-card small {
    color: #68707c;
    font-size: 12px;
    line-height: 1.45;
}

.role-form-section {
    margin-top: 6px;
}

.role-checkbox-list ul {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.role-checkbox-list label {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px;
    border: 1px solid #dce1e5;
    border-radius: 9px;
    background: #fafbfc;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
}

.role-checkbox-list input {
    accent-color: #176b55;
}

.access-state-card {
    margin-top: 24px;
    padding: 16px;
    border: 1px solid #e1e5e9;
    border-radius: 10px;
    background: #fafbfc;
}

.access-state-card .checkbox-field {
    align-items: flex-start;
}

.access-state-card .checkbox-field span,
.access-state-card .checkbox-field strong,
.access-state-card .checkbox-field small {
    display: block;
}

.access-state-card .checkbox-field small {
    margin-top: 3px;
}

.taxonomy-container {
    max-width: 1080px;
}

.taxonomy-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 30px;
}

.taxonomy-card {
    border: 1px solid #e1e5e9;
    border-radius: 13px;
    background: white;
    overflow: hidden;
}

.taxonomy-card-inactive {
    background: #fbfbfb;
}

.taxonomy-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    padding: 20px 22px;
    border-bottom: 1px solid #e9ecef;
}

.taxonomy-title-line,
.taxonomy-card-actions,
.taxonomy-label-main,
.taxonomy-rules {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.taxonomy-title-line h2 {
    margin: 0;
    font-size: 19px;
}

.taxonomy-rules {
    margin-top: 9px;
}

.taxonomy-rules span,
.parent-chip,
.inactive-chip {
    border-radius: 999px;
    padding: 4px 8px;
    background: #f0f2f4;
    color: #67707a;
    font-size: 10px;
    font-weight: 700;
}

.parent-chip {
    background: #eaf2ef;
    color: #326c5d;
}

.inactive-chip {
    background: #f5ebec;
    color: #8a5558;
}

.taxonomy-card-actions {
    flex: 0 0 auto;
    justify-content: flex-end;
}

.taxonomy-card-actions a {
    border: 1px solid #d6dce1;
    border-radius: 8px;
    padding: 8px 10px;
    color: #39434d;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.taxonomy-card-actions a:first-child {
    border-color: #bcd7ce;
    color: #176b55;
}

.taxonomy-label-list {
    display: flex;
    flex-direction: column;
}

.taxonomy-label-row {
    position: relative;
    padding: 14px 76px 14px 22px;
    border-bottom: 1px solid #edf0f2;
}

.taxonomy-label-row:last-child {
    border-bottom: 0;
}

.taxonomy-label-inactive {
    background: #fcfcfc;
}

.taxonomy-label-main strong {
    font-size: 13px;
}

.taxonomy-label-row p {
    margin: 6px 0 0;
    color: #747d87;
    font-size: 12px;
    line-height: 1.45;
}

.taxonomy-label-row > a {
    position: absolute;
    top: 16px;
    right: 22px;
    color: #176b55;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.taxonomy-empty {
    padding: 18px 22px;
    color: #7a838d;
    font-size: 12px;
}

.taxonomy-form-container {
    width: min(720px, calc(100% - 40px));
    margin: 34px auto;
}

.taxonomy-toggle {
    margin-bottom: 10px;
    padding: 14px;
    border: 1px solid #e1e5e9;
    border-radius: 10px;
    background: #fafbfc;
}

.taxonomy-toggle .checkbox-field {
    align-items: flex-start;
}

.taxonomy-toggle .checkbox-field span,
.taxonomy-toggle strong,
.taxonomy-toggle small {
    display: block;
}

.taxonomy-toggle small {
    margin-top: 3px;
    color: #68707c;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
}

.import-container {
    width: min(760px, calc(100% - 40px));
    margin: 34px auto;
}

.import-card {
    padding: 32px;
}

.import-safety-note {
    margin: 4px 0 22px;
    padding: 15px 17px;
    border: 1px solid #bfd9d0;
    border-radius: 10px;
    background: #f2f8f5;
    color: #245a4c;
}

.import-safety-note strong {
    font-size: 13px;
}

.import-safety-note p {
    margin: 5px 0 0;
    font-size: 12px;
    line-height: 1.55;
}

.import-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}

.import-steps li {
    display: flex;
    gap: 9px;
    padding: 12px;
    border: 1px solid #e1e5e9;
    border-radius: 9px;
    background: #fafbfc;
}

.import-steps li > span {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #e5f2ed;
    color: #176b55;
    font-size: 11px;
    font-weight: 800;
}

.import-steps strong,
.import-steps small {
    display: block;
}

.import-steps strong {
    font-size: 12px;
}

.import-steps small {
    margin-top: 3px;
    color: #747d87;
    font-size: 10px;
    line-height: 1.4;
}

.sample-download {
    display: inline-block;
    margin-bottom: 22px;
    color: #176b55;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.import-form {
    padding-top: 22px;
    border-top: 1px solid #e1e5e9;
}

.import-file-field input[type="file"] {
    padding: 9px;
    background: #fafbfc;
}

.import-confirm {
    padding: 15px;
    border: 1px solid #e1e5e9;
    border-radius: 10px;
    background: #fafbfc;
}

.import-confirm .checkbox-field {
    align-items: flex-start;
}

.import-confirm span,
.import-confirm strong,
.import-confirm small {
    display: block;
}

.import-confirm small {
    margin-top: 4px;
    color: #68707c;
    font-size: 11px;
    font-weight: 400;
}

.field-help {
    color: #68707c;
    font-size: 12px;
}

.field-error,
.form-errors {
    color: #a4262c;
    font-size: 13px;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
}

.form-actions a {
    color: #59626e;
    text-decoration: none;
}

.form-section {
    margin-top: 28px;
    padding-top: 10px;
    border-top: 1px solid #e1e5e9;
}

.form-section-header h2 {
    margin: 18px 0 6px;
    font-size: 18px;
}

.form-section-header p {
    margin: 0 0 18px;
    color: #68707c;
    font-size: 13px;
}

.option-form-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.formset-add {
    margin-top: 14px;
}

.danger-link {
    border: 0;
    padding: 0;
    background: none;
    color: #a4262c;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.danger-link:hover {
    text-decoration: underline;
}

.option-form-card {
    padding: 18px;
    border: 1px solid #e1e5e9;
    border-radius: 10px;
    background: #fafbfc;
}

.option-form-number {
    margin-bottom: 14px;
    color: #59626e;
    font-size: 13px;
    font-weight: 700;
}

.option-field:last-child {
    margin-bottom: 0;
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 500;
}

.form-field .checkbox-field input {
    width: auto;
}

.classification-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.classification-form-group {
    padding: 18px;
    border: 1px solid #e1e5e9;
    border-radius: 10px;
    background: #fafbfc;
}

.classification-form-group h3 {
    margin: 0 0 16px;
    font-size: 15px;
}

.classification-form-group .form-field:last-child {
    margin-bottom: 0;
}

@media (max-width: 700px) {
    .landing-topbar,
    .landing-main,
    .landing-footer {
        width: min(100% - 32px, 1240px);
    }

    .landing-topbar {
        min-height: 76px;
    }

    .landing-access-link {
        padding: 8px 12px;
        font-size: 12px;
    }

    .landing-main {
        padding: 34px 0 52px;
    }

    .landing-copy > h1 {
        font-size: clamp(39px, 13vw, 54px);
    }

    .landing-lead {
        margin-top: 22px;
        font-size: 16px;
    }

    .landing-features {
        grid-template-columns: 1fr;
        gap: 0;
        margin-top: 34px;
    }

    .landing-features article {
        padding: 16px 0;
    }

    .landing-login-card {
        padding: 28px 24px;
    }

    .landing-footer {
        flex-direction: column;
        gap: 6px;
    }

    .topbar {
        padding: 0 18px;
    }

    .team-search {
        align-items: stretch;
        flex-direction: column;
    }

    .team-table-header {
        display: none;
    }

    .team-row {
        grid-template-columns: 1fr auto;
        gap: 14px;
    }

    .team-person,
    .team-roles {
        grid-column: 1 / -1;
    }

    .team-actions {
        align-self: center;
    }

    .team-form-container {
        width: min(100% - 24px, 820px);
        margin-top: 24px;
    }

    .form-card {
        padding: 22px 18px;
    }

    .team-form-grid,
    .role-checkbox-list ul {
        grid-template-columns: 1fr;
    }

    .taxonomy-card-header {
        align-items: stretch;
        flex-direction: column;
    }

    .taxonomy-card-actions {
        justify-content: flex-start;
    }

    .taxonomy-form-container {
        width: min(100% - 24px, 720px);
        margin-top: 24px;
    }

    .topbar-nav {
        gap: 9px;
        font-size: 12px;
    }

    .topbar-bank-link {
        display: none;
    }

    .desktop-label {
        display: none;
    }

    .mobile-label {
        display: inline;
    }

    .user-name {
        display: none;
    }

    .container {
        width: min(100% - 24px, 1180px);
        margin-top: 24px;
    }

    .search-row {
        flex-direction: column;
    }

    .search-row button {
        padding: 12px;
    }

    .question-card-header {
        flex-direction: column;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .detail-header {
        flex-direction: column;
    }

    .detail-header-actions {
        align-items: flex-start;
        flex-direction: column-reverse;
    }

    .classification-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .classification-form-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .archived-list,
    .compare-columns {
        grid-template-columns: 1fr;
    }

    .compare-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .page-header {
        flex-direction: column;
    }

    .page-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .import-container {
        width: min(100% - 24px, 760px);
        margin-top: 24px;
    }

    .import-card {
        padding: 22px 18px;
    }

    .import-steps {
        grid-template-columns: 1fr;
    }

    .version-row {
        flex-direction: column;
        gap: 5px;
    }
}

.media-form-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.media-form-card {
    min-width: 0;
    padding: 20px;
    border: 1px solid #e1e5e9;
    border-radius: 14px;
    background: #ffffff;
}

.media-form-preview {
    display: block;
    width: 100%;
    height: 210px;
    margin: 12px 0 18px;
    border: 1px solid #e1e5e9;
    border-radius: 10px;
    background: #f8fafc;
    object-fit: contain;
}

.media-form-card input[type="file"] {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.question-media-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.question-media-item {
    min-width: 0;
    margin: 0;
}

.question-media-item a {
    display: flex;
    min-height: 240px;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: 1px solid #e1e5e9;
    border-radius: 14px;
    background: #f8fafc;
}

.question-media-item img {
    display: block;
    max-width: 100%;
    max-height: 520px;
    border-radius: 8px;
}

.question-media-item figcaption {
    margin-top: 10px;
    color: #68707c;
    font-size: 14px;
    line-height: 1.5;
}

.compare-media-list {
    display: grid;
    gap: 18px;
}

.compare-media-list .question-media-item img {
    width: 100%;
    max-height: 360px;
    object-fit: contain;
}

.import-format-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.import-format-grid article {
    display: grid;
    gap: 5px;
    padding: 15px 16px;
    border: 1px solid #dbe5e1;
    border-radius: 12px;
    background: #f8fbfa;
}

.import-format-grid small {
    color: #687a74;
    line-height: 1.45;
}

@media (max-width: 700px) {
    .media-form-list,
    .question-media-gallery,
    .import-format-grid {
        grid-template-columns: 1fr;
    }

    .media-form-card {
        padding: 16px;
    }

    .question-media-item a {
        min-height: 180px;
    }
}

@media (min-width: 701px) and (max-width: 980px) {
    .landing-main {
        padding-top: 38px;
    }

    .landing-hero {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .landing-login-card {
        width: min(100%, 520px);
    }
}

@media (max-width: 700px) {
    .landing-hero {
        grid-template-columns: 1fr;
        gap: 42px;
    }
}
