@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css");

:root {
    color-scheme: dark;
    --bg: #090b0c;
    --nav: #0b0d0e;
    --panel: #101314;
    --panel-raised: #15191a;
    --panel-hover: #191d1e;
    --line: #24292b;
    --line-strong: #343b3d;
    --text: #f1f0eb;
    --muted: #a5aaab;
    --subtle: #6f7779;
    --teal: #cc5c63;
    --teal-soft: rgba(204, 92, 99, 0.11);
    --orange: #b9575e;
    --orange-hover: #c9686f;
    --green: #6bcf83;
    --rose: #e87979;
    --amber: #c58b91;
    --radius: 6px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
    font-family: Inter, "Segoe UI", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
}

* { box-sizing: border-box; }

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    background: var(--bg);
    color: var(--text);
}

a { color: inherit; }
button,
input,
select,
textarea { font: inherit; }

h1,
h2,
h3,
p { overflow-wrap: anywhere; }

h1,
h2,
h3 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 500;
    letter-spacing: 0;
}

h1 {
    margin: 0;
    font-size: 2.35rem;
    line-height: 1.05;
}

.account-shell {
    display: grid;
    grid-template-columns: 15rem minmax(0, 1fr);
    min-height: 100vh;
}

.app-navigation {
    display: flex;
    position: sticky;
    top: 0;
    flex-direction: column;
    height: 100vh;
    border-right: 1px solid var(--line);
    background: var(--nav);
    overflow-y: auto;
}

.app-navigation a { text-decoration: none; }

.app-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 5.35rem;
    padding: 0 1.4rem;
    border-bottom: 1px solid var(--line);
}

.app-brand-logo {
    width: 2.15rem;
    height: 2.15rem;
    flex: 0 0 2.15rem;
    object-fit: contain;
    filter: saturate(0.82) brightness(0.92) drop-shadow(0 0 7px rgba(204, 92, 99, 0.14));
}

.app-brand > span:last-child,
.app-user > span:nth-child(2) {
    display: grid;
    min-width: 0;
}

.app-brand strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.22rem;
    font-weight: 500;
}

.app-brand small,
.app-user small {
    margin-top: 0.15rem;
    color: var(--subtle);
    font-size: 0.68rem;
}

.app-nav-primary {
    display: grid;
    gap: 0.18rem;
    padding: 1rem 0.85rem;
}

.app-nav-link {
    display: grid;
    grid-template-columns: 1.75rem minmax(0, 1fr);
    align-items: center;
    min-height: 2.65rem;
    border-left: 2px solid transparent;
    border-radius: 4px;
    padding: 0 0.75rem;
    color: #afb5b6;
    font-size: 0.86rem;
    transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.app-nav-link i {
    color: #b9c0c1;
    font-size: 1rem;
}

.app-nav-link:hover {
    background: #121617;
    color: var(--text);
}

.app-nav-link.is-active {
    border-left-color: var(--teal);
    background: #1a1e20;
    color: #fff;
}

.app-nav-link.is-active i { color: var(--teal); }

.app-nav-category {
    margin: 1rem 0 0.35rem;
    padding: 0 0.75rem;
    color: #596163;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
}

.app-user {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: auto 0.85rem 0;
    border-top: 1px solid var(--line);
    padding: 1rem 0.65rem 0.8rem;
    color: var(--text);
    transition: background 120ms ease, border-color 120ms ease;
}

.app-user:hover { border-top-color: var(--line-strong); background: #121617; }
.app-user-chevron { margin-left: auto; color: var(--subtle); font-size: 0.7rem; }

.app-user-avatar {
    display: grid;
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    place-items: center;
    border-radius: 50%;
    background: #e7e8e3;
    color: #16191a;
    font-family: Georgia, serif;
    font-size: 0.82rem;
}

.app-user strong {
    overflow: hidden;
    font-size: 0.76rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-form { padding: 0 0.85rem 1rem; }

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    min-height: 2.4rem;
    border: 0;
    border-radius: 4px;
    padding: 0 0.75rem;
    background: transparent;
    color: #777f81;
    cursor: pointer;
    font-size: 0.76rem;
    text-align: left;
}

.sidebar-logout:hover {
    background: #151819;
    color: var(--text);
}

.account-main {
    min-width: 0;
    padding: 2.35rem 2.5rem;
}

.account-container {
    width: min(100%, 70rem);
    margin: 0 auto;
}

.eyebrow {
    margin: 0 0 0.55rem;
    color: var(--teal);
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
}

.account-copy {
    margin: 0.6rem 0 0;
    color: var(--muted);
    font-size: 0.87rem;
    line-height: 1.55;
}

.users-header {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: center;
    width: min(100%, 82rem);
    min-height: 5.5rem;
    margin-bottom: 1.75rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1.25rem;
}

.users-header h1 { font-size: 2.25rem; }

.button,
.table-action,
.icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.button,
.table-action {
    min-height: 2.5rem;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.button {
    border: 1px solid var(--orange);
    background: var(--orange);
    color: #fff;
}

.button:hover {
    border-color: var(--orange-hover);
    background: var(--orange-hover);
}

.table-action {
    border: 1px solid var(--line-strong);
    background: #111516;
    color: #d5d8d6;
}

.table-action:hover {
    border-color: #51595b;
    background: #1a1e20;
    color: #fff;
}

.danger-action:hover {
    border-color: rgba(232, 121, 121, 0.6);
    background: rgba(232, 121, 121, 0.09);
    color: #f3a3a3;
}

.icon-action {
    width: 2.45rem;
    height: 2.45rem;
    border: 1px solid var(--line-strong);
    background: #111516;
    color: #aeb5b6;
}

.icon-action:hover {
    border-color: #596163;
    color: #fff;
}

.notice {
    width: fit-content;
    margin: 0 0 1rem;
    border-left: 2px solid var(--green);
    padding: 0.65rem 0.85rem;
    background: rgba(107, 207, 131, 0.08);
    color: #a8ddb4;
    font-size: 0.82rem;
}

.notes-workspace {
    padding: 0;
    overflow: hidden;
}

.notes-topbar {
    display: grid;
    grid-template-columns: minmax(12rem, 0.65fr) minmax(18rem, 1fr) auto;
    align-items: center;
    gap: 1.5rem;
    min-height: 5.35rem;
    border-bottom: 1px solid var(--line);
    padding: 0 1.85rem;
    background: #0b0e0f;
}

.notes-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notes-title-icon {
    display: none;
    color: var(--teal);
}

.notes-title h1 { font-size: 1.65rem; }

.notes-title p {
    margin: 0.2rem 0 0;
    color: var(--subtle);
    font-size: 0.68rem;
}

.command-search {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem;
    width: min(100%, 34rem);
    min-height: 2.65rem;
    justify-self: center;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 0 0.8rem;
    background: #101415;
    color: var(--subtle);
}

.command-search:focus-within {
    border-color: rgba(204, 92, 99, 0.58);
    box-shadow: 0 0 0 3px rgba(204, 92, 99, 0.08);
}

.command-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 0.82rem;
}

.command-search kbd {
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 0.1rem 0.35rem;
    background: #1a1e20;
    color: #858d8f;
    font: 0.68rem/1.2 Consolas, monospace;
}

.notes-workspace > .notice { margin: 1rem 1.85rem 0; }

.notes-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18rem;
    min-height: calc(100vh - 5.35rem);
}

.notes-content {
    min-width: 0;
    padding: 1.2rem 1.85rem 3rem;
}

.notes-filter {
    display: grid;
    grid-template-columns: auto minmax(10rem, 13rem) minmax(10rem, 13rem) auto auto;
    align-items: end;
    gap: 0.55rem;
    margin-bottom: 0.55rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1rem;
}

.notes-filter-summary {
    display: grid;
    align-content: center;
    min-height: 2.45rem;
    margin-right: auto;
}

.notes-filter-summary strong {
    font-family: Georgia, serif;
    font-size: 1.05rem;
    font-weight: 500;
}

.notes-filter-summary span {
    color: var(--subtle);
    font-size: 0.62rem;
}

.notes-filter label {
    display: grid;
    gap: 0.25rem;
}

.notes-filter label > span {
    color: var(--subtle);
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
}

.notes-filter input,
.notes-filter select {
    width: 100%;
    height: 2.45rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0 0.7rem;
    outline: 0;
    background: #101314;
    color: #ced2d1;
    font-size: 0.76rem;
}

.notes-filter input:focus,
.notes-filter select:focus {
    border-color: rgba(204, 92, 99, 0.58);
}

.note-stream { position: relative; }

.note-entry {
    display: grid;
    position: relative;
    grid-template-columns: 2.25rem minmax(12rem, 1.7fr) minmax(10rem, 0.9fr) 5.2rem 1.25rem;
    align-items: center;
    gap: 0.7rem;
    min-height: 3.55rem;
    border-bottom: 1px solid var(--line);
    padding: 0.4rem 0.35rem 0.4rem 0;
    cursor: pointer;
    outline: 0;
}

.note-entry:hover,
.note-entry:focus-visible {
    background: #101415;
}

.note-entry-icon {
    display: grid;
    width: 2.25rem;
    height: 2.25rem;
    place-items: center;
    border-radius: var(--radius);
    background: #202526;
    color: #d5d8d6;
    font-size: 0.9rem;
}

.note-entry-icon.teal { background: rgba(204, 92, 99, 0.11); color: var(--teal); }
.note-entry-icon.amber { background: rgba(197, 139, 145, 0.13); color: var(--amber); }
.note-entry-icon.rose { background: rgba(232, 121, 121, 0.13); color: var(--rose); }
.note-entry-icon.green { background: rgba(107, 207, 131, 0.12); color: var(--green); }

.note-entry-copy {
    display: grid;
    min-width: 0;
    gap: 0.15rem;
}

.note-entry-copy strong {
    overflow: hidden;
    color: #edf0ed;
    font-size: 0.8rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.note-entry-copy small {
    overflow: hidden;
    color: #8c9496;
    font-size: 0.67rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.note-entry-tags {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.note-type-badge,
.note-tag {
    display: inline-flex;
    align-items: center;
    min-height: 1.3rem;
    border-radius: 4px;
    padding: 0.08rem 0.42rem;
    font-size: 0.59rem;
    white-space: nowrap;
}

.note-type-badge { background: rgba(204, 92, 99, 0.1); color: #e5a0a4; }
.note-type-badge.amber { background: rgba(197, 139, 145, 0.12); color: #dca7ac; }
.note-type-badge.rose { background: rgba(232, 121, 121, 0.12); color: #ef9b9b; }
.note-type-badge.green { background: rgba(107, 207, 131, 0.12); color: #8bda9d; }
.note-tag { background: #1b2022; color: #9fa6a8; }

.note-privacy {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #858d8f;
    font-size: 0.64rem;
}

.note-entry-arrow {
    color: #555d5f;
    font-size: 0.75rem;
}

.notes-sidebar {
    border-left: 1px solid var(--line);
    background: #0b0e0f;
}

.notes-sidebar > section {
    padding: 1.4rem 1.25rem;
    border-bottom: 1px solid var(--line);
}

.notes-sidebar header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.notes-sidebar h2 {
    margin: 0;
    font-size: 0.98rem;
}

.notes-sidebar header > span {
    color: var(--subtle);
    font-size: 0.68rem;
}

.saved-views,
.tag-list { display: grid; gap: 0.16rem; }

.saved-views a,
.tag-list a {
    display: grid;
    grid-template-columns: 1.6rem minmax(0, 1fr) auto;
    align-items: center;
    min-height: 2.35rem;
    border-radius: 4px;
    padding: 0 0.65rem;
    color: #9fa6a8;
    font-size: 0.75rem;
    text-decoration: none;
}

.saved-views a:hover,
.tag-list a:hover,
.saved-views a.is-active,
.tag-list a.is-active {
    background: #1a1e20;
    color: #f1f3f0;
}

.saved-views a.is-active { box-shadow: inset 2px 0 var(--teal); }

.saved-views i { color: #c0c6c5; }
.saved-views small,
.tag-list small { color: #697173; }

.tag-list i {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--teal);
}

.tag-list a:nth-child(4n + 2) i { background: var(--orange); }
.tag-list a:nth-child(4n + 3) i { background: var(--green); }
.tag-list a:nth-child(4n + 4) i { background: var(--rose); }

.tag-list p {
    color: var(--subtle);
    font-size: 0.72rem;
}

.privacy-note {
    display: flex;
    gap: 0.65rem;
    margin: 1.25rem;
    border: 1px solid var(--line);
    padding: 0.85rem;
    color: var(--green);
}

.privacy-note div { display: grid; gap: 0.2rem; }
.privacy-note strong { color: #c9cfcc; font-size: 0.7rem; }
.privacy-note span { color: var(--subtle); font-size: 0.63rem; line-height: 1.4; }

.notes-empty {
    display: grid;
    min-height: 20rem;
    place-items: center;
    align-content: center;
    gap: 0.6rem;
    color: var(--subtle);
    text-align: center;
}

.notes-empty > i { font-size: 1.8rem; }
.notes-empty h2 { margin: 0; color: var(--text); font-size: 1.2rem; }
.notes-empty p { margin: 0; font-size: 0.76rem; }

.form-stack {
    display: grid;
    gap: 1rem;
    margin-top: 1.4rem;
}

.form-field {
    display: grid;
    gap: 0.42rem;
    color: #c6ccca;
    font-size: 0.72rem;
    font-weight: 700;
}

.form-field input,
.form-field select,
.form-field textarea,
.monitor-search input,
.share-picker select,
.share-selected {
    width: 100%;
    min-height: 2.6rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 0.65rem 0.75rem;
    outline: 0;
    background: #0c0f10;
    color: var(--text);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.monitor-search input:focus,
.share-picker select:focus {
    border-color: rgba(204, 92, 99, 0.62);
    box-shadow: 0 0 0 3px rgba(204, 92, 99, 0.08);
}

.form-field textarea {
    min-height: 15rem;
    resize: vertical;
}

.checkbox-field {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    color: #c6ccca;
    font-size: 0.76rem;
}

.checkbox-field input { accent-color: var(--teal); }

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}

.modal-backdrop {
    position: fixed;
    z-index: 20;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.76);
    backdrop-filter: blur(6px);
}

.modal {
    width: min(96vw, 44rem);
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 1.5rem;
    background: #121617;
    box-shadow: var(--shadow);
}

.modal-wide { width: min(96vw, 64rem); }
.note-view-modal { width: min(96vw, 70rem); }

.modal-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1rem;
}

.modal h2 { margin: 0; font-size: 1.55rem; }

.modal-close {
    display: grid;
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 2.25rem;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: #a7adae;
    text-decoration: none;
}

.modal-close:hover { border-color: #565e60; color: #fff; }

.modal-meta {
    margin: 0.55rem 0 0;
    color: var(--subtle);
    font-size: 0.68rem;
}

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

.form-field-full { grid-column: 1 / -1; }

.note-view-code,
.note-view-plain {
    max-height: 58vh;
    overflow: auto;
    margin: 1.25rem 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem;
    background: #090b0c;
    color: #d9ddda;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.note-view-code {
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: 0.82rem;
    line-height: 1.6;
}

.note-view-plain {
    min-height: 14rem;
    font-size: 0.88rem;
    line-height: 1.7;
}

.token-keyword { color: #e5a0a4; font-weight: 700; }
.token-string { color: #80d092; }
.token-comment { color: #747d7f; font-style: italic; }
.token-variable { color: #c8a7b7; }
.token-key { color: #dca7ac; }
.token-literal { color: #e87979; }

.validation-summary-errors,
.field-validation-error { color: #ef9999; font-size: 0.75rem; }

.users-directory {
    width: min(100%, 82rem);
    border: 1px solid var(--line);
    background: #0d1011;
}

.users-directory-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4.5rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--line);
}

.users-directory-heading h2 {
    margin: 0;
    font-size: 1.05rem;
}

.users-directory-heading p {
    margin: 0.25rem 0 0;
    color: var(--subtle);
    font-size: 0.7rem;
}

.users-active-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #8bd69c;
    font-size: 0.7rem;
}

.users-list-header,
.user-row {
    display: grid;
    grid-template-columns: minmax(15rem, 1.4fr) minmax(9rem, 0.8fr) minmax(8rem, 0.65fr) 3rem;
    align-items: center;
    gap: 1rem;
}

.users-list-header {
    min-height: 2rem;
    padding: 0 1rem;
    border-bottom: 1px solid var(--line);
    background: #111516;
    color: #747c7e;
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
}

.user-row {
    min-height: 4.25rem;
    padding: 0.55rem 1rem;
    border-bottom: 1px solid var(--line);
    transition: background-color 140ms ease;
}

.user-row:last-child { border-bottom: 0; }
.user-row:hover { background: #131718; }

.user-identity {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    display: grid;
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 2.35rem;
    place-items: center;
    border: 1px solid rgba(204, 92, 99, 0.3);
    border-radius: 50%;
    background: var(--teal-soft);
    color: #e58a90;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.95rem;
}

.user-name {
    display: grid;
    min-width: 0;
    gap: 0.15rem;
}

.user-name strong {
    overflow: hidden;
    color: #e9ebe8;
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-name small {
    color: var(--subtle);
    font-size: 0.67rem;
}

.user-you-badge,
.user-role,
.user-status {
    display: inline-flex;
    width: fit-content;
    align-items: center;
}

.user-you-badge {
    border: 1px solid rgba(204, 92, 99, 0.25);
    padding: 0.15rem 0.4rem;
    background: var(--teal-soft);
    color: #df858b;
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
}

.user-role {
    gap: 0.4rem;
    color: #aeb5b4;
    font-size: 0.73rem;
}

.user-role.is-admin { color: #df858b; }

.user-status {
    gap: 0.45rem;
    color: #b5bcba;
    font-size: 0.72rem;
}

.user-status > span {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: #727a7c;
}

.user-status.is-active > span {
    background: var(--green);
    box-shadow: 0 0 0 3px rgba(107, 207, 131, 0.09);
}

.user-status.is-inactive { color: #858c8e; }
.user-row-action { justify-self: end; }
.user-row-action .icon-action { width: 2.25rem; height: 2.25rem; }

.text-link { border: 0; padding: 0; background: transparent; color: var(--teal); cursor: pointer; }

.account-home {
    width: min(100%, 54rem);
    margin: 8vh auto 0;
    border-left: 2px solid var(--teal);
    padding: 1.5rem 2rem;
}

.account-home h1 { font-size: 2.65rem; }

.account-panel {
    width: min(100%, 28rem);
    margin: 10vh auto 0;
    border: 1px solid var(--line);
    padding: 1.5rem;
    background: var(--panel);
}

.login-page { min-height: 100%; background: var(--bg); }

.login-shell {
    display: grid;
    min-height: 100vh;
    min-height: 100svh;
    place-content: center;
    justify-items: center;
    gap: 1.1rem;
    padding: clamp(1.25rem, 5vh, 3.5rem) 1.25rem;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--text);
    text-decoration: none;
}

.login-brand img {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
    filter: saturate(0.82) brightness(0.92) drop-shadow(0 0 7px rgba(204, 92, 99, 0.14));
}

.login-brand span { display: grid; }
.login-brand strong { font: 500 1.25rem Georgia, "Times New Roman", serif; }
.login-brand small { margin-top: 0.15rem; color: var(--subtle); font-size: 0.67rem; }

.login-panel {
    width: min(100%, 26rem);
    border: 1px solid var(--line-strong);
    border-top: 2px solid var(--teal);
    padding: clamp(1.25rem, 4vw, 1.75rem);
    background: #0d1011;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

.login-heading {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: 0.85rem;
    align-items: start;
}

.login-heading > span {
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    place-items: center;
    border-radius: var(--radius);
    background: var(--teal-soft);
    color: var(--teal);
}

.login-heading h1 { font-size: 2rem; }
.login-heading p:last-child { margin: 0.45rem 0 0; color: var(--muted); font-size: 0.76rem; line-height: 1.5; }
.login-form { margin-top: 1.5rem; }
.login-form .button { width: 100%; }

@media (max-width: 30rem) {
    .login-shell { align-content: center; padding-inline: 0.9rem; }
    .login-panel { padding: 1.2rem 1rem; }
    .login-heading { grid-template-columns: 2.25rem minmax(0, 1fr); gap: 0.7rem; }
    .login-heading > span { width: 2.25rem; height: 2.25rem; }
    .login-heading h1 { font-size: 1.65rem; }
}

.monitor-toolbar {
    display: grid;
    grid-template-columns: minmax(12rem, 1fr) minmax(15rem, 27rem) auto;
    align-items: center;
    gap: 1rem;
    width: min(100%, 82rem);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1.25rem;
}

.monitor-toolbar h1 { font-size: 2.25rem; }

.monitor-search input { font-size: 0.78rem; }
.monitor-toolbar-actions { display: flex; gap: 0.5rem; }

.monitor-summary {
    display: inline-flex;
    margin: 0 0 1.2rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #0e1112;
}

.monitor-summary a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.35rem;
    border-right: 1px solid var(--line);
    padding: 0 0.75rem;
    color: var(--muted);
    font-size: 0.7rem;
    text-decoration: none;
}

.monitor-summary a:last-child { border-right: 0; }
.monitor-summary a.active { background: var(--teal-soft); color: var(--teal); }
.monitor-summary strong { color: #d8dcda; }

.monitor-groups {
    display: grid;
    gap: 1.5rem;
    width: min(100%, 82rem);
}

.monitor-group-heading {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}

.monitor-group-heading h2 { margin: 0; font-size: 1rem; }
.monitor-group-heading span { color: var(--subtle); font-size: 0.65rem; }
.monitor-list { border-top: 1px solid var(--line); }

.monitor-card {
    display: grid;
    grid-template-columns: 2.35rem minmax(12rem, 2fr) minmax(5rem, 0.75fr) minmax(7rem, 0.9fr) minmax(6rem, 0.8fr) 4.8rem;
    align-items: center;
    gap: 0.8rem;
    min-height: 4.3rem;
    border-bottom: 1px solid var(--line);
    padding: 0.55rem 0.75rem;
    color: var(--text);
    text-decoration: none;
}

.monitor-card:hover { background: #111516; }

.monitor-type-icon,
.alert-type-icon {
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    background: var(--teal-soft);
    color: var(--teal);
}

.monitor-type-icon { width: 2.25rem; height: 2.25rem; }
.monitor-identity,
.monitor-metric { display: grid; gap: 0.15rem; min-width: 0; }
.monitor-identity strong { overflow: hidden; font-size: 0.8rem; text-overflow: ellipsis; white-space: nowrap; }
.monitor-identity small,
.monitor-metric small { color: var(--subtle); font-size: 0.62rem; }
.monitor-metric strong { color: #c8cecb; font-size: 0.72rem; }

.monitor-status {
    display: inline-flex;
    justify-content: center;
    border-radius: 4px;
    padding: 0.28rem 0.45rem;
    font-size: 0.63rem;
}

.monitor-status.up { background: rgba(107,207,131,.11); color: var(--green); }
.monitor-status.down { background: rgba(232,121,121,.11); color: var(--rose); }
.monitor-status.pending { background: rgba(197, 139, 145, 0.12); color: var(--amber); }
.monitor-status.paused { background: #1d2223; color: #8e9698; }

.monitor-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem;
    margin: 1.2rem 0;
}

.monitor-detail-grid > div {
    display: grid;
    gap: 0.35rem;
    min-height: 4rem;
    border: 1px solid var(--line);
    padding: 0.75rem;
    background: #0d1011;
}

.monitor-detail-grid span { color: var(--subtle); font-size: 0.58rem; font-weight: 800; }
.monitor-detail-grid strong { font-size: 0.78rem; overflow-wrap: anywhere; }

.history-panel,
.configuration-panel {
    margin: 1.2rem 0;
    border-top: 1px solid var(--line);
    padding-top: 1rem;
}

.history-ticks {
    display: grid;
    grid-template-columns: repeat(24, minmax(0, 1fr));
    gap: 0.2rem;
}

.history-ticks span { height: 1rem; background: #252a2c; }
.history-ticks .history-success { background: var(--green); }
.history-ticks .history-failed { background: var(--rose); }

.monitor-empty { color: var(--subtle); font-size: 0.78rem; }

.calendar-agenda,
.users-page-header,
.users-grid,
.alert-channel-group { width: min(100%, 82rem); }

.calendar-agenda { margin-top: 1.5rem; }
.calendar-agenda h2 { margin: 0; font-size: 1.1rem; }

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.7rem;
}

.calendar-event {
    display: grid;
    grid-template-columns: 10rem minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    min-height: 4.2rem;
    border-top: 1px solid var(--line);
    padding: 0.7rem 0.8rem;
}

.calendar-event:last-child { border-bottom: 1px solid var(--line); }
.calendar-event:hover { background: #111516; }
.calendar-event time { color: var(--orange); font-size: 0.72rem; }
.calendar-event strong { font-size: 0.8rem; }
.calendar-event small { display: block; margin-top: 0.2rem; color: var(--teal); font-size: 0.64rem; }
.calendar-event p { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.72rem; }

.alert-channel-group + .alert-channel-group {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}

.alert-channel-heading {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.65rem;
}

.alert-channel-heading > div { margin-right: auto; }
.alert-type-icon { width: 2.5rem; height: 2.5rem; flex: 0 0 2.5rem; }
.alert-type-icon-small { width: 2rem; height: 2rem; flex-basis: 2rem; }
.alert-channel-count { color: var(--subtle); font-size: 0.68rem; }

.alert-channel-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 0.55rem;
}

.alert-channel-card {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 4rem;
    border: 1px solid var(--line);
    padding: 0.7rem;
    background: #0d1011;
    color: var(--text);
    text-decoration: none;
}

.alert-channel-card:hover { border-color: #485052; background: #121617; }
.alert-channel-card strong { font-size: 0.76rem; }
.alert-channel-card small { display: block; margin-top: 0.2rem; color: var(--subtle); font-size: 0.65rem; }
.alert-channel-arrow { margin-left: auto; color: var(--subtle); }

.share-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
}

.share-selected { display: none; }
.share-selected:not(:empty) { display: block; margin-top: 0.5rem; }
.field-hint { color: var(--subtle); font-size: 0.66rem; }

.password-change-form,
.module-permissions,
.delete-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.module-permissions { display: grid; gap: 0.6rem; }

.site-actions {
    position: fixed;
    top: 1.25rem;
    right: 1.5rem;
    display: flex;
    gap: 0.8rem;
    align-items: center;
    z-index: 2;
}

.site-login {
    border-bottom: 1px solid var(--line-strong);
    padding: 0.35rem 0;
    color: #c7cdca;
    font-size: 0.76rem;
    text-decoration: none;
}

.status { display: inline-flex; align-items: center; gap: 0.45rem; color: #aab0af; font-size: 0.72rem; }
.status-dot { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--green); }

.home-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 4rem 2rem 2rem;
}

.home-content { width: min(100%, 40rem); text-align: center; }
.clock { margin-bottom: 1.8rem; }
.clock-time { font: 600 6.5rem/1 "Cascadia Code", Consolas, monospace; }
.subtitle { color: var(--muted); }

.calendar {
    border-top: 1px solid var(--line);
    padding-top: 1.25rem;
}

.calendar-title { font-family: Georgia, serif; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.25rem; }
.calendar-weekday { color: var(--subtle); font-size: 0.65rem; }
.calendar-day { display: grid; position: relative; aspect-ratio: 1; place-items: center; border: 0; background: transparent; color: #d6dad8; }
.interactive-calendar .calendar-day { cursor: pointer; }
.interactive-calendar .calendar-day:hover,
.calendar-day-selected { background: #171b1c; }
.calendar-day-today { background: var(--orange); color: #fff; font-weight: 800; }
.calendar-event-dot { position: absolute; bottom: 0.3rem; width: 0.25rem; height: 0.25rem; border-radius: 50%; background: var(--teal); }
.home-day-agenda,
.home-event-detail { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: 0.8rem; }
.home-event { display: flex; gap: 0.6rem; width: 100%; border: 0; padding: 0.35rem; background: transparent; color: var(--text); cursor: pointer; }
.home-event span { color: var(--orange); }
.home-event-detail p,
.home-day-agenda small,
.home-event-detail small { color: var(--subtle); }

.wiki-workspace {
    padding: 0;
    overflow: hidden;
}

.wiki-topbar {
    display: grid;
    grid-template-columns: minmax(12rem, 0.65fr) minmax(18rem, 1fr) auto;
    align-items: center;
    gap: 1.5rem;
    min-height: 5.35rem;
    border-bottom: 1px solid var(--line);
    padding: 0 1.85rem;
    background: #0b0e0f;
}

.wiki-title {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.wiki-title > i {
    color: var(--teal);
    font-size: 1.1rem;
}

.wiki-title h1 { font-size: 1.65rem; }
.wiki-title p { margin: 0.2rem 0 0; color: var(--subtle); font-size: 0.68rem; }
.wiki-notice { margin: 1rem 1.85rem 0; }

.wiki-library-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18rem;
    min-height: calc(100vh - 5.35rem);
}

.wiki-library {
    min-width: 0;
    padding: 2rem 2.2rem 3rem;
}

.wiki-library-header {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    align-items: end;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1.25rem;
}

.wiki-library-header h2 {
    margin: 0;
    font-size: 1.75rem;
}

.wiki-library-header p:not(.eyebrow) {
    margin: 0.45rem 0 0;
    color: var(--muted);
    font-size: 0.78rem;
}

.wiki-library-header > span {
    color: var(--subtle);
    font-size: 0.68rem;
    white-space: nowrap;
}

.wiki-article-list { display: grid; }

.wiki-library-row {
    display: grid;
    grid-template-columns: 2.65rem minmax(12rem, 1.5fr) minmax(8rem, 0.8fr) 6.5rem 1rem;
    align-items: center;
    gap: 0.8rem;
    min-height: 5rem;
    border-bottom: 1px solid var(--line);
    padding: 0.65rem 0.4rem;
    color: var(--text);
    text-decoration: none;
}

.wiki-library-row:hover {
    background: #101415;
}

.wiki-library-icon {
    display: grid;
    width: 2.65rem;
    height: 2.65rem;
    place-items: center;
    border-radius: var(--radius);
    background: rgba(204, 92, 99, 0.09);
    color: var(--teal);
}

.wiki-library-copy {
    display: grid;
    min-width: 0;
    gap: 0.25rem;
}

.wiki-library-copy strong {
    overflow: hidden;
    font-size: 0.86rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wiki-library-copy small {
    overflow: hidden;
    color: #8c9496;
    font-size: 0.7rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wiki-library-tags {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.wiki-library-tags span {
    border-radius: 4px;
    padding: 0.22rem 0.45rem;
    background: #1b2022;
    color: #9fa6a8;
    font-size: 0.6rem;
}

.wiki-library-row time {
    color: var(--subtle);
    font-size: 0.65rem;
    text-align: right;
}

.wiki-library-row > i { color: #50585a; font-size: 0.7rem; }

.wiki-library-aside {
    border-left: 1px solid var(--line);
    background: #0b0e0f;
}

.wiki-library-aside > section {
    padding: 1.4rem 1.25rem;
    border-bottom: 1px solid var(--line);
}

.wiki-library-aside h2 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.wiki-tag-index { display: grid; gap: 0.15rem; }

.wiki-tag-index a {
    display: grid;
    grid-template-columns: 1.3rem minmax(0, 1fr) auto;
    align-items: center;
    min-height: 2.2rem;
    border-radius: 4px;
    padding: 0 0.6rem;
    color: #a3aaab;
    font-size: 0.72rem;
    text-decoration: none;
}

.wiki-tag-index a:hover { background: #191d1e; color: #fff; }
.wiki-tag-index i { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--teal); }
.wiki-tag-index a:nth-child(3n + 2) i { background: var(--orange); }
.wiki-tag-index a:nth-child(3n + 3) i { background: var(--green); }
.wiki-tag-index small { color: var(--subtle); }
.wiki-tag-index p { color: var(--subtle); font-size: 0.7rem; }

.wiki-empty {
    display: grid;
    min-height: 26rem;
    place-items: center;
    align-content: center;
    gap: 0.65rem;
    text-align: center;
}

.wiki-empty > i { color: var(--teal); font-size: 2rem; }
.wiki-empty h2 { margin: 0; font-size: 1.35rem; }
.wiki-empty p { max-width: 25rem; margin: 0 0 0.5rem; color: var(--muted); font-size: 0.76rem; }

.wiki-reader-layout {
    display: grid;
    grid-template-columns: 14rem minmax(30rem, 1fr) 16rem;
    min-height: calc(100vh - 5.35rem);
}

.wiki-index,
.wiki-inspector {
    background: #0b0e0f;
}

.wiki-index { border-right: 1px solid var(--line); }

.wiki-index-header {
    display: flex;
    justify-content: space-between;
    padding: 1.25rem 1rem 0.75rem;
    color: #d1d5d3;
    font-family: Georgia, serif;
    font-size: 0.9rem;
}

.wiki-index-header small { color: var(--subtle); font: 0.65rem Inter, sans-serif; }

.wiki-back {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.25rem;
    margin: 0 0.65rem 0.65rem;
    border-bottom: 1px solid var(--line);
    padding: 0 0.45rem;
    color: #8d9597;
    font-size: 0.68rem;
    text-decoration: none;
}

.wiki-back:hover { color: #fff; }
.wiki-index nav { display: grid; padding: 0 0.65rem; }

.wiki-index nav a {
    display: grid;
    grid-template-columns: 1.5rem minmax(0, 1fr);
    gap: 0.5rem;
    align-items: center;
    min-height: 3.3rem;
    border-left: 2px solid transparent;
    border-radius: 3px;
    padding: 0.4rem 0.5rem;
    color: #9ba2a3;
    text-decoration: none;
}

.wiki-index nav a:hover,
.wiki-index nav a.is-active {
    background: #191d1e;
    color: #fff;
}

.wiki-index nav a.is-active { border-left-color: var(--teal); }
.wiki-index nav a > i { color: #7f888a; }
.wiki-index nav a span { display: grid; min-width: 0; gap: 0.2rem; }
.wiki-index nav a strong { overflow: hidden; font-size: 0.69rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.wiki-index nav a small { color: var(--subtle); font-size: 0.58rem; }

.wiki-article {
    min-width: 0;
    padding: 0 2.75rem 5rem;
}

.wiki-article-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    min-height: 4.25rem;
    border-bottom: 1px solid var(--line);
    color: #777f81;
    font-size: 0.65rem;
}

.wiki-article-toolbar > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wiki-article-toolbar > span i { margin-right: 0.25rem; }
.wiki-article-toolbar > div { display: flex; gap: 0.45rem; }

.wiki-article-header {
    max-width: 54rem;
    margin: 0 auto;
    border-bottom: 1px solid var(--line);
    padding: 3rem 0 1.5rem;
}

.wiki-article-header h1 {
    font-size: 2.6rem;
    line-height: 1.12;
}

.wiki-article-header p {
    margin: 0.8rem 0 0;
    color: #aeb4b3;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.95rem;
    line-height: 1.6;
}

.wiki-prose {
    max-width: 54rem;
    margin: 0 auto;
    padding-top: 1.5rem;
    color: #c7cdca;
    font-size: 0.86rem;
    line-height: 1.75;
}

.wiki-prose h1,
.wiki-prose h2,
.wiki-prose h3,
.wiki-prose h4 {
    position: relative;
    margin: 2.1rem 0 0.75rem;
    color: #f0f1ed;
    line-height: 1.25;
}

.wiki-prose h1 { font-size: 1.65rem; }
.wiki-prose h2 { font-size: 1.28rem; }
.wiki-prose h3 { font-size: 1.05rem; }
.wiki-prose p { margin: 0.75rem 0; }
.wiki-prose a { color: #e5a0a4; text-underline-offset: 3px; }
.wiki-prose strong { color: #f2f3ee; }
.wiki-prose ul,
.wiki-prose ol { padding-left: 1.45rem; }
.wiki-prose li { margin: 0.22rem 0; }

.wiki-prose blockquote {
    margin: 1.2rem 0;
    border-left: 2px solid var(--orange);
    padding: 0.3rem 1rem;
    background: rgba(185, 87, 94, 0.05);
    color: #afb5b3;
}

.wiki-prose :not(pre) > code {
    border: 1px solid #303638;
    border-radius: 3px;
    padding: 0.12rem 0.35rem;
    background: #15191a;
    color: #dca7ac;
    font: 0.78rem "Cascadia Code", Consolas, monospace;
}

.wiki-prose img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 42rem;
    margin: 1.4rem auto;
    border: 1px solid var(--line-strong);
    object-fit: contain;
}

.wiki-prose table {
    width: 100%;
    margin: 1.25rem 0;
    border-collapse: collapse;
    font-size: 0.76rem;
}

.wiki-prose th,
.wiki-prose td {
    border: 1px solid var(--line);
    padding: 0.55rem;
    text-align: left;
}

.wiki-prose th { background: #15191a; color: #edf0ed; }

.wiki-code-block {
    overflow: hidden;
    margin: 1.35rem 0;
    border: 1px solid #31383a;
    border-radius: var(--radius);
    background: #0b0e0f;
}

.wiki-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 2.15rem;
    border-bottom: 1px solid var(--line);
    padding: 0 0.7rem;
    background: #141819;
    color: #798183;
    font-size: 0.58rem;
    font-weight: 800;
}

.wiki-code-header button {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    border: 0;
    background: transparent;
    color: #929a9b;
    cursor: pointer;
    font-size: 0.62rem;
}

.wiki-code-header button:hover { color: #fff; }

.wiki-code-block pre {
    overflow-x: auto;
    margin: 0;
    padding: 1rem 1.1rem;
}

.wiki-code-block code {
    font: 0.75rem/1.6 "Cascadia Code", Consolas, monospace;
}

.wiki-inspector {
    border-left: 1px solid var(--line);
    padding: 1.35rem 1.2rem;
}

.wiki-inspector > h2,
.wiki-inspector section h2 {
    margin: 0 0 0.8rem;
    font-size: 0.95rem;
}

.wiki-inspector dl {
    display: grid;
    gap: 0.7rem;
    margin: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1.1rem;
}

.wiki-inspector dl div {
    display: grid;
    grid-template-columns: 4.2rem 1fr;
    gap: 0.5rem;
}

.wiki-inspector dt { color: var(--subtle); font-size: 0.63rem; }
.wiki-inspector dd { margin: 0; color: #bdc3c1; font-size: 0.65rem; }
.wiki-inspector section { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }

.wiki-tag-cloud { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.wiki-tag-cloud a,
.wiki-tag-cloud span {
    border: 1px solid #354042;
    border-radius: 999px;
    padding: 0.25rem 0.5rem;
    color: #e5a0a4;
    font-size: 0.6rem;
    text-decoration: none;
}

.wiki-inspector .privacy-note { margin: 1.1rem 0; }
.wiki-delete { border-top: 1px solid var(--line); padding-top: 1rem; }

.wiki-editor-backdrop {
    padding: 1.5rem;
}

.wiki-editor {
    display: flex;
    width: min(96vw, 82rem);
    height: min(92vh, 58rem);
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: #111415;
    box-shadow: var(--shadow);
}

.wiki-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 4.5rem;
    border-bottom: 1px solid var(--line);
    padding: 0.75rem 1.2rem;
}

.wiki-editor-header h2 { margin: 0; font-size: 1.35rem; }

.wiki-editor-form {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
}

.wiki-editor-form > .validation-summary-errors {
    padding: 0.5rem 1.2rem 0;
}

.wiki-editor-meta {
    display: grid;
    grid-template-columns: minmax(15rem, 1.3fr) minmax(12rem, 1fr) minmax(10rem, 0.8fr);
    gap: 0.75rem;
    border-bottom: 1px solid var(--line);
    padding: 0.9rem 1.2rem;
}

.wiki-editor-title-field input {
    font-family: Georgia, serif;
    font-size: 1rem;
}

.wiki-writing-tools {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-height: 3rem;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
    padding: 0.4rem 1.2rem;
    background: #0d1011;
}

.wiki-writing-tools button,
.wiki-writing-tools select {
    height: 2rem;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: #abb1b0;
}

.wiki-writing-tools button {
    width: 2rem;
    flex: 0 0 2rem;
    cursor: pointer;
}

.wiki-writing-tools button:hover,
.wiki-writing-tools button:focus-visible {
    border-color: var(--line-strong);
    background: #191d1e;
    color: #fff;
}

.wiki-writing-tools button:disabled { opacity: 0.45; cursor: wait; }

.wiki-writing-tools select {
    width: 7rem;
    border-color: var(--line);
    padding: 0 0.4rem;
    font-size: 0.65rem;
}

.wiki-tool-divider {
    width: 1px;
    height: 1.35rem;
    flex: 0 0 1px;
    margin: 0 0.25rem;
    background: var(--line);
}

.wiki-upload-status {
    margin-left: 0.4rem;
    color: var(--subtle);
    font-size: 0.62rem;
    white-space: nowrap;
}

.wiki-editor-content {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
}

.wiki-editor-content > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.wiki-editor-content textarea {
    width: 100%;
    min-height: 0;
    flex: 1;
    resize: none;
    border: 0;
    padding: 1.4rem max(1.4rem, calc((100% - 60rem) / 2));
    outline: 0;
    background: #111415;
    color: #d9ddda;
    font: 0.82rem/1.75 "Cascadia Code", Consolas, monospace;
    tab-size: 4;
}

.wiki-editor-content textarea:focus { background: #121617; }

.wiki-editor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 4rem;
    border-top: 1px solid var(--line);
    padding: 0.65rem 1.2rem;
}

.wiki-editor-footer > span {
    color: var(--subtle);
    font-size: 0.65rem;
}

.wiki-editor-footer > div { display: flex; gap: 0.5rem; }

.password-workspace {
    min-height: 100vh;
    background:
        linear-gradient(90deg, transparent 0, transparent calc(100% - 19rem), rgba(255, 255, 255, 0.012) calc(100% - 19rem)),
        var(--bg);
}

.tool-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: min(100%, 76rem);
    min-height: 7.2rem;
    margin: 0 auto;
    border-bottom: 1px solid var(--line);
}

.tool-page-header h1 { font-size: 2.35rem; }

.local-only-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid rgba(107, 207, 131, 0.28);
    border-radius: 999px;
    padding: 0.45rem 0.7rem;
    background: rgba(107, 207, 131, 0.07);
    color: #96dca5;
    font-size: 0.68rem;
    font-weight: 700;
}

.password-studio {
    display: grid;
    grid-template-columns: minmax(28rem, 1fr) 20rem;
    width: min(100%, 76rem);
    margin: 2.2rem auto 0;
    border: 1px solid var(--line);
    background: #0d1011;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.3);
}

.password-generator-panel {
    min-width: 0;
    padding: 2rem;
}

.password-output-block {
    border-bottom: 1px solid var(--line);
    padding-bottom: 1.5rem;
}

.password-output-heading {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.55rem;
    color: #8b9395;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
}

#password-copy-status {
    color: var(--green);
    text-transform: none;
}

.password-output-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.45rem;
}

.password-output-row input {
    width: 100%;
    height: 3.4rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 0 1rem;
    outline: 0;
    background: #090b0c;
    color: #f2f1ed;
    font: 0.98rem "Cascadia Code", Consolas, monospace;
}

.password-output-row input:focus {
    border-color: rgba(204, 92, 99, 0.58);
    box-shadow: 0 0 0 3px rgba(204, 92, 99, 0.08);
}

.password-output-row .icon-action {
    width: 3.4rem;
    height: 3.4rem;
}

.password-strength {
    display: grid;
    grid-template-columns: minmax(8rem, 1fr) auto auto;
    align-items: center;
    gap: 0.7rem;
    margin-top: 0.7rem;
}

.password-strength-track {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.25rem;
}

.password-strength-track i {
    height: 0.2rem;
    border-radius: 999px;
    background: #252b2c;
}

.password-strength-track[data-level="1"] i:nth-child(-n+1) { background: var(--rose); }
.password-strength-track[data-level="2"] i:nth-child(-n+2) { background: var(--amber); }
.password-strength-track[data-level="3"] i:nth-child(-n+3) { background: var(--teal); }
.password-strength-track[data-level="4"] i:nth-child(-n+4) { background: var(--green); }

#password-strength-label {
    color: #bdc4c2;
    font-size: 0.65rem;
}

#password-entropy {
    color: var(--subtle);
    font-size: 0.62rem;
}

.password-length-control {
    border-bottom: 1px solid var(--line);
    padding: 1.5rem 0;
}

.password-length-control > div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.password-length-control label {
    color: #cbd0ce;
    font-size: 0.78rem;
    font-weight: 700;
}

.password-length-control output {
    display: grid;
    min-width: 2.5rem;
    height: 2rem;
    place-items: center;
    border: 1px solid rgba(185, 87, 94, 0.34);
    border-radius: 4px;
    background: rgba(185, 87, 94, 0.08);
    color: var(--orange);
    font: 0.76rem "Cascadia Code", Consolas, monospace;
}

#password-length {
    width: 100%;
    height: 0.35rem;
    appearance: none;
    border-radius: 999px;
    background: linear-gradient(to right, var(--orange) 0 var(--range-progress), #293031 var(--range-progress) 100%);
    cursor: pointer;
}

#password-length::-webkit-slider-thumb {
    width: 1.15rem;
    height: 1.15rem;
    appearance: none;
    border: 3px solid #111415;
    border-radius: 50%;
    background: var(--orange);
    box-shadow: 0 0 0 1px rgba(185, 87, 94, 0.58);
}

#password-length::-moz-range-thumb {
    width: 0.85rem;
    height: 0.85rem;
    border: 3px solid #111415;
    border-radius: 50%;
    background: var(--orange);
}

.password-range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.45rem;
    color: #555e60;
    font-size: 0.58rem;
}

.password-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 1.5rem 0;
}

.password-options legend {
    grid-column: 1 / -1;
    width: 100%;
    margin-bottom: 0.25rem;
    color: #cbd0ce;
    font-size: 0.78rem;
    font-weight: 700;
}

.password-options label {
    display: flex;
    position: relative;
    align-items: center;
    min-height: 4rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.7rem 0.8rem;
    background: #101415;
    cursor: pointer;
}

.password-options label:has(input:checked) {
    border-color: rgba(204, 92, 99, 0.34);
    background: rgba(204, 92, 99, 0.055);
}

.password-options input {
    width: 1rem;
    height: 1rem;
    flex: 0 0 1rem;
    margin: 0 0.7rem 0 0;
    accent-color: var(--teal);
}

.password-options label > span {
    display: grid;
    grid-template-columns: 1.35rem 1fr;
    align-items: center;
    min-width: 0;
}

.password-options label i {
    grid-row: 1 / 3;
    color: var(--teal);
}

.password-options label strong {
    color: #d4d8d6;
    font-size: 0.72rem;
    font-weight: 650;
}

.password-options label small {
    margin-top: 0.1rem;
    color: var(--subtle);
    font-size: 0.58rem;
}

.password-preferences {
    padding: 1rem 0;
}

.password-preferences label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
}

.password-preferences label > span { display: grid; gap: 0.2rem; }
.password-preferences label + label { margin-top: 0.9rem; border-top: 1px solid var(--line); padding-top: 0.9rem; }
.password-preferences strong { color: #cbd0ce; font-size: 0.72rem; }
.password-preferences small { color: var(--subtle); font-size: 0.62rem; }

.password-preferences input {
    width: 2.3rem;
    height: 1.25rem;
    appearance: none;
    border-radius: 999px;
    background: #2b3133;
    cursor: pointer;
}

.password-preferences input::before {
    display: block;
    width: 0.95rem;
    height: 0.95rem;
    margin: 0.15rem;
    border-radius: 50%;
    background: #9ca3a4;
    content: "";
    transition: transform 140ms ease;
}

.password-preferences input:checked { background: rgba(204, 92, 99, 0.7); }
.password-preferences input:checked::before { background: #ffe5e5; transform: translateX(1.05rem); }

.password-actions {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    margin-top: 0.35rem;
}

.password-generate { min-width: 11rem; }

.password-error {
    min-height: 1rem;
    margin: 0.65rem 0 0;
    color: var(--rose);
    font-size: 0.68rem;
}

.password-security-panel {
    border-left: 1px solid var(--line);
    padding: 2rem 1.5rem;
    background: #0a0d0e;
}

.password-security-icon {
    display: grid;
    width: 3rem;
    height: 3rem;
    place-items: center;
    border: 1px solid rgba(204, 92, 99, 0.28);
    border-radius: 50%;
    background: rgba(204, 92, 99, 0.065);
    color: var(--teal);
    font-size: 1.25rem;
}

.password-security-panel h2 {
    margin: 1.1rem 0 0.65rem;
    font-size: 1.25rem;
}

.password-security-panel > p {
    margin: 0;
    color: #92999a;
    font-size: 0.72rem;
    line-height: 1.65;
}

.password-security-panel dl {
    display: grid;
    gap: 0.75rem;
    margin: 1.5rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 1.1rem 0;
}

.password-security-panel dl div {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}

.password-security-panel dt { color: var(--subtle); font-size: 0.62rem; }
.password-security-panel dd { margin: 0; color: #bdc3c1; font-size: 0.62rem; text-align: right; }

.password-tip {
    display: flex;
    gap: 0.6rem;
    border-left: 2px solid var(--amber);
    padding: 0.65rem 0 0.65rem 0.8rem;
    color: var(--amber);
}

.password-tip p {
    margin: 0;
    color: #92999a;
    font-size: 0.65rem;
    line-height: 1.5;
}

.password-save-dialog {
    width: min(92vw, 34rem);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 0;
    background: #121617;
    color: var(--text);
    box-shadow: var(--shadow);
}

.password-save-dialog::backdrop {
    background: rgba(0, 0, 0, 0.76);
    backdrop-filter: blur(6px);
}

.password-save-dialog form > header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
    border-bottom: 1px solid var(--line);
    padding: 1.25rem;
}

.password-save-dialog h2 {
    margin: 0;
    font-size: 1.35rem;
}

.password-save-dialog header p:last-child {
    margin: 0.4rem 0 0;
    color: var(--muted);
    font-size: 0.7rem;
}

.password-save-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    padding: 1.25rem;
}

.password-save-fields label:first-child,
.password-save-fields label:last-child {
    grid-column: 1 / -1;
}

.password-save-fields textarea {
    min-height: 5rem;
}

.password-save-dialog footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    border-top: 1px solid var(--line);
    padding: 0.9rem 1.25rem;
}

.vault-workspace {
    padding: 0;
    overflow: hidden;
}

.vault-topbar {
    display: grid;
    grid-template-columns: minmax(15rem, 0.7fr) minmax(18rem, 1fr) auto;
    align-items: center;
    gap: 1.5rem;
    min-height: 5.35rem;
    border-bottom: 1px solid var(--line);
    padding: 0 1.85rem;
    background: #0b0e0f;
}

.vault-title {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.vault-title > span {
    display: grid;
    width: 2.15rem;
    height: 2.15rem;
    place-items: center;
    border: 1px solid rgba(107, 207, 131, 0.3);
    border-radius: 50%;
    background: rgba(107, 207, 131, 0.07);
    color: var(--green);
}

.vault-title h1 { font-size: 1.55rem; }
.vault-title p { margin: 0.2rem 0 0; color: var(--subtle); font-size: 0.65rem; }
.vault-notice { margin: 1rem 1.85rem 0; }

.vault-topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
}

.vault-topbar-actions form { margin: 0; }

.vault-unlock {
    display: grid;
    width: min(calc(100% - 2rem), 29rem);
    margin: clamp(3rem, 10vh, 7rem) auto;
    justify-items: center;
    border: 1px solid var(--line);
    border-top: 2px solid var(--teal);
    padding: 2.25rem clamp(1.25rem, 4vw, 2.5rem);
    background: #0d1011;
    box-shadow: var(--shadow);
    text-align: center;
}

.vault-unlock-mark {
    display: grid;
    width: 3.25rem;
    height: 3.25rem;
    margin-bottom: 1.2rem;
    place-items: center;
    border: 1px solid rgba(204, 92, 99, 0.35);
    border-radius: 50%;
    background: var(--teal-soft);
    color: #df7d83;
    font-size: 1.35rem;
}

.vault-unlock h2 {
    margin: 0;
    font-size: 1.65rem;
}

.vault-unlock > p:not(.eyebrow) {
    max-width: 23rem;
    margin: 0.7rem 0 1.4rem;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.65;
}

.vault-unlock-form {
    display: grid;
    width: 100%;
    gap: 1rem;
    text-align: left;
}

.vault-unlock-form .button { width: 100%; }

.vault-unlock-input {
    display: grid;
    position: relative;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: #0a0d0e;
}

.vault-unlock-input:focus-within { border-color: rgba(204, 92, 99, 0.65); }
.vault-unlock-input > i { padding-left: 0.8rem; color: var(--subtle); }

.vault-unlock-input input {
    width: 100%;
    min-width: 0;
    min-height: 2.8rem;
    border: 0;
    padding: 0 0.65rem;
    outline: 0;
    background: transparent;
    color: var(--text);
}

.vault-unlock-visibility {
    width: 2.7rem;
    height: 2.7rem;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.vault-unlock-visibility:hover { color: var(--text); }

.vault-unlock-note {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.25rem;
    color: var(--subtle);
    font-size: 0.64rem;
}

.vault-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18rem;
    min-height: calc(100vh - 5.35rem);
}

.vault-list-panel {
    min-width: 0;
    padding: 1.75rem 2rem 3rem;
}

.vault-list-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1rem;
}

.vault-list-header h2 {
    margin: 0;
    font-size: 1.45rem;
}

.vault-list { display: grid; }

.vault-entry {
    display: grid;
    grid-template-columns: 2.55rem minmax(10rem, 1.2fr) minmax(9rem, 0.9fr) 7rem 6.5rem 1rem;
    align-items: center;
    gap: 0.85rem;
    min-height: 4.8rem;
    border-bottom: 1px solid var(--line);
    padding: 0.6rem 0.4rem;
    cursor: pointer;
    outline: 0;
}

.vault-entry:hover,
.vault-entry:focus-visible {
    background: #101415;
}

.vault-entry-mark {
    display: grid;
    width: 2.55rem;
    height: 2.55rem;
    place-items: center;
    border-radius: var(--radius);
    background: rgba(204, 92, 99, 0.09);
    color: var(--teal);
    font-family: Georgia, serif;
    font-size: 0.95rem;
}

.vault-entry-identity {
    display: grid;
    min-width: 0;
    gap: 0.25rem;
}

.vault-entry-identity strong {
    overflow: hidden;
    color: #edf0ed;
    font-size: 0.82rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vault-entry-identity small {
    overflow: hidden;
    color: var(--subtle);
    font-size: 0.66rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vault-entry-site {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.4rem;
    overflow: hidden;
    color: #8f9798;
    font-size: 0.66rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vault-entry-site i { color: #60696b; }

.vault-entry-secret {
    color: #626b6d;
    font: 0.72rem "Cascadia Code", Consolas, monospace;
    letter-spacing: 0;
}

.vault-entry time {
    color: var(--subtle);
    font-size: 0.62rem;
    text-align: right;
}

.vault-entry > i { color: #4e5658; font-size: 0.7rem; }

.vault-empty {
    display: grid;
    min-height: 25rem;
    place-items: center;
    align-content: center;
    gap: 0.65rem;
    text-align: center;
}

.vault-empty > i { color: var(--green); font-size: 2rem; }
.vault-empty h2 { margin: 0; font-size: 1.35rem; }
.vault-empty p { max-width: 26rem; margin: 0 0 0.45rem; color: var(--muted); font-size: 0.75rem; }

.vault-security {
    border-left: 1px solid var(--line);
    padding: 1.5rem 1.25rem;
    background: #0b0e0f;
}

.vault-security-status {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1.1rem;
    color: var(--green);
}

.vault-security-status > i { font-size: 1.2rem; }
.vault-security-status span { display: grid; gap: 0.15rem; }
.vault-security-status strong { color: #d7dcda; font-size: 0.72rem; }
.vault-security-status small { color: var(--subtle); font-size: 0.6rem; }

.vault-security dl {
    display: grid;
    gap: 0.75rem;
    margin: 1.1rem 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1.1rem;
}

.vault-security dl div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.vault-security dt { color: var(--subtle); font-size: 0.63rem; }
.vault-security dd { margin: 0; color: #c0c6c4; font-size: 0.63rem; }
.vault-security > p { margin: 0; color: #798183; font-size: 0.65rem; line-height: 1.6; }

.vault-detail-modal { width: min(96vw, 48rem); }

.vault-detail-fields {
    display: grid;
    gap: 1rem;
    margin: 1.25rem 0;
}

.vault-detail-fields > div {
    display: grid;
    gap: 0.35rem;
}

.vault-detail-fields > div > span {
    color: var(--subtle);
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
}

.vault-detail-fields > div > div {
    display: flex;
    gap: 0.4rem;
}

.vault-detail-fields input {
    width: 100%;
    min-width: 0;
    min-height: 2.65rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0 0.75rem;
    outline: 0;
    background: #0b0e0f;
    color: #d9ddda;
    font: 0.75rem "Cascadia Code", Consolas, monospace;
}

.vault-detail-fields input:focus { border-color: rgba(204, 92, 99, 0.52); }

.vault-notes-field p {
    margin: 0;
    border-left: 2px solid var(--teal);
    padding: 0.65rem 0.8rem;
    background: rgba(204, 92, 99, 0.04);
    color: #aeb5b3;
    font-size: 0.73rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

.vault-copy-feedback {
    align-self: center;
    margin-left: auto;
    color: var(--green);
    font-size: 0.68rem;
}

.vault-password-input {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.4rem;
}

.vault-password-input .icon-action {
    width: 2.6rem;
    height: 2.6rem;
}

.vault-edit-modal .form-field textarea { min-height: 7rem; }

/* Account and two-factor security */
.profile-workspace {
    width: 100%;
    max-width: 88rem;
    margin: 0 auto;
    padding: 3.2rem clamp(1.5rem, 4vw, 4.5rem);
}

.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1.8rem;
}

.profile-identity { display: flex; align-items: center; gap: 1rem; }
.profile-identity h1 { font-size: 2.2rem; }
.profile-identity p:last-child { margin: 0.4rem 0 0; color: var(--subtle); font-size: 0.72rem; }

.profile-avatar {
    display: grid;
    width: 4rem;
    height: 4rem;
    flex: 0 0 4rem;
    place-items: center;
    border: 1px solid #444b4c;
    border-radius: 50%;
    background: #e7e8e3;
    color: #151819;
    font: 1.7rem Georgia, serif;
}

.security-state {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid rgba(197, 139, 145, 0.32);
    border-radius: 999px;
    padding: 0.5rem 0.75rem;
    background: rgba(197, 139, 145, 0.065);
    color: var(--amber);
    font-size: 0.69rem;
    font-weight: 700;
}

.security-state.enabled { border-color: rgba(107, 207, 131, 0.35); background: rgba(107, 207, 131, 0.07); color: var(--green); }

.page-notice {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
    border-left: 2px solid;
    padding: 0.8rem 1rem;
    background: #101415;
    color: #cfd4d2;
    font-size: 0.76rem;
}

.page-notice.success { border-color: var(--green); }
.page-notice.success i { color: var(--green); }
.page-notice.error { border-color: var(--rose); }
.page-notice.error i { color: var(--rose); }

.profile-grid { display: grid; grid-template-columns: minmax(20rem, 0.88fr) minmax(28rem, 1.12fr); gap: 1.25rem; }
.profile-section { border: 1px solid var(--line); background: #0d1011; }

.profile-section-heading {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-bottom: 1px solid var(--line);
    padding: 1.1rem 1.25rem;
}

.profile-section-heading > span {
    display: grid;
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 2.25rem;
    place-items: center;
    border-radius: var(--radius);
    background: var(--teal-soft);
    color: var(--teal);
}

.profile-section-heading h2 { margin: 0; font-size: 1.1rem; }
.profile-section-heading p { margin: 0.25rem 0 0; color: var(--subtle); font-size: 0.69rem; }
.profile-form { display: grid; gap: 1rem; padding: 1.25rem; }
.profile-field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.form-field small { color: var(--subtle); font-size: 0.62rem; font-weight: 400; }
.confirmation-field { margin-top: 0.35rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.profile-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
.profile-actions.split { justify-content: space-between; }

.security-overview,
.security-enabled-summary {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    margin: 1.25rem;
    border-left: 2px solid var(--amber);
    padding: 0.9rem 1rem;
    background: rgba(197, 139, 145, 0.04);
}

.security-enabled-summary { border-left-color: var(--green); background: rgba(107, 207, 131, 0.04); }
.security-overview > i { color: var(--amber); font-size: 1.3rem; }
.security-enabled-summary > span { color: var(--green); font-size: 1.25rem; }
.security-overview strong, .security-enabled-summary strong { font-size: 0.78rem; }
.security-overview p, .security-enabled-summary p { margin: 0.3rem 0 0; color: var(--subtle); font-size: 0.68rem; line-height: 1.5; }
.security-section > .profile-actions { padding: 0 1.25rem 1.25rem; }

.two-factor-setup { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 1.5rem; padding: 1.4rem; }
.two-factor-qr { align-self: start; padding: 0.6rem; background: #fff; }
.two-factor-qr img { display: block; width: 100%; aspect-ratio: 1; }
.two-factor-setup-copy h3 { margin: 0.2rem 0 0.35rem; font-size: 0.95rem; }
.two-factor-setup-copy p { margin: 0 0 0.75rem; color: var(--subtle); font-size: 0.68rem; line-height: 1.5; }
.two-factor-setup-copy code { display: block; margin-bottom: 1rem; padding: 0.65rem; background: #080a0b; color: var(--teal); font-size: 0.72rem; overflow-wrap: anywhere; }
.setup-step { display: inline-grid; width: 1.35rem; height: 1.35rem; place-items: center; border-radius: 50%; background: var(--teal-soft); color: var(--teal); font-size: 0.62rem; font-weight: 800; }
.inline-security-form { display: grid; grid-template-columns: minmax(8rem, 1fr) auto; gap: 0.5rem; }
.inline-security-form input, .security-management-form .form-field input {
    min-height: 2.6rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 0 0.75rem;
    outline: 0;
    background: #090c0d;
    color: var(--text);
}

.security-management-form { display: grid; gap: 0.85rem; border-top: 1px solid var(--line); padding: 1.1rem 1.25rem 1.25rem; }
.danger-action { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.5rem; border: 1px solid rgba(232, 121, 121, 0.35); border-radius: var(--radius); padding: 0 0.8rem; background: rgba(232, 121, 121, 0.06); color: var(--rose); cursor: pointer; font-size: 0.72rem; font-weight: 700; }

.recovery-section { display: grid; grid-template-columns: minmax(15rem, 0.7fr) 1.3fr; gap: 2rem; margin-top: 1.25rem; border: 1px solid rgba(185, 87, 94, 0.28); padding: 1.5rem; background: rgba(185, 87, 94, 0.035); }

.home-calendar-main { padding: 0; }
.home-account-shell .site-actions { display: none; }
.recovery-section h2 { margin: 0; font-size: 1.25rem; }
.recovery-heading p:last-of-type { color: var(--subtle); font-size: 0.7rem; line-height: 1.55; }
.recovery-heading .table-action { margin-top: 0.7rem; }
.recovery-print-meta { display: none; }
.recovery-code-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; }
.recovery-code-grid code { border: 1px solid var(--line); padding: 0.55rem 0.7rem; background: #090b0c; color: #d8ddda; font-size: 0.74rem; text-align: center; }

@media print {
    body.recovery-printing { background: #fff; color: #17191a; }
    body.recovery-printing * { visibility: hidden !important; }
    body.recovery-printing .recovery-section,
    body.recovery-printing .recovery-section * { visibility: visible !important; }
    body.recovery-printing .recovery-section {
        display: block;
        position: absolute;
        inset: 0;
        width: 100%;
        margin: 0;
        border: 0;
        padding: 18mm;
        background: #fff;
        color: #17191a;
    }
    body.recovery-printing .recovery-heading { display: none; }
    body.recovery-printing .recovery-print-meta { display: grid; gap: 0.2rem; margin-bottom: 10mm; border-bottom: 2px solid #b9575e; padding-bottom: 6mm; }
    body.recovery-printing .recovery-print-meta strong { font: 700 22pt Georgia, serif; }
    body.recovery-printing .recovery-print-meta span { color: #4f5557; font: 10pt "Segoe UI", sans-serif; }
    body.recovery-printing .recovery-print-meta small { margin-top: 4mm; color: #8a3036; font: 9pt "Segoe UI", sans-serif; }
    body.recovery-printing .recovery-code-grid { grid-template-columns: repeat(2, 1fr); gap: 4mm; }
    body.recovery-printing .recovery-code-grid code { border: 1px solid #c9cdce; padding: 4mm; background: #f7f7f7; color: #111; font: 700 12pt Consolas, monospace; }
}

.account-shell-public { min-height: 100vh; padding: 1.5rem; background: var(--bg); }
.account-nav { position: absolute; top: 1.5rem; left: 1.5rem; font: 1.2rem Georgia, serif; }
.account-nav a { color: var(--text); text-decoration: none; }
.two-factor-login { margin-top: 15vh; border-top: 2px solid var(--teal); }
.security-mark { display: grid; width: 2.7rem; height: 2.7rem; margin-bottom: 1rem; place-items: center; border-radius: 50%; background: var(--teal-soft); color: var(--teal); font-size: 1.2rem; }
.account-switch-link { display: inline-block; margin-top: 1rem; color: var(--teal); font-size: 0.7rem; text-decoration: none; }

@media (max-width: 70rem) {
    .account-shell { grid-template-columns: 4.5rem minmax(0, 1fr); }
    .app-brand { justify-content: center; padding: 0; }
    .app-brand > span:last-child,
    .app-nav-link span,
    .app-nav-category,
    .app-user > span:nth-child(2),
    .sidebar-logout span { display: none; }
    .app-nav-link { grid-template-columns: 1fr; justify-items: center; padding: 0; }
    .app-user { justify-content: center; padding-inline: 0; }
    .sidebar-logout { justify-content: center; padding: 0; }
    .notes-layout { grid-template-columns: minmax(0, 1fr) 15rem; }
    .note-entry { grid-template-columns: 2.25rem minmax(10rem, 1fr) minmax(8rem, 0.7fr) 1rem; }
    .note-privacy { display: none; }
    .wiki-reader-layout { grid-template-columns: 12rem minmax(28rem, 1fr); }
    .wiki-inspector { display: none; }
    .password-studio { grid-template-columns: minmax(25rem, 1fr) 17rem; }
    .vault-entry { grid-template-columns: 2.55rem minmax(9rem, 1fr) minmax(8rem, 0.8fr) 6.5rem 1rem; }
    .vault-entry-secret { display: none; }
}

@media (max-width: 54rem) {
    .profile-grid { grid-template-columns: 1fr; }
    .notes-topbar { grid-template-columns: minmax(8rem, auto) 1fr auto; gap: 0.75rem; padding-inline: 1rem; }
    .notes-title p,
    .command-search kbd { display: none; }
    .notes-layout { display: block; }
    .notes-sidebar { display: none; }
    .notes-content { padding-inline: 1rem; }
    .notes-filter { grid-template-columns: auto 1fr 1fr auto auto; }
    .note-entry { grid-template-columns: 2.25rem minmax(0, 1fr) 1rem; }
    .note-entry-tags { display: none; }
    .wiki-topbar { grid-template-columns: minmax(8rem, auto) 1fr auto; gap: 0.75rem; padding-inline: 1rem; }
    .wiki-title p,
    .wiki-search kbd { display: none; }
    .wiki-library-layout { display: block; }
    .wiki-library-aside { display: none; }
    .wiki-reader-layout { display: block; }
    .wiki-index { display: none; }
    .wiki-article { padding-inline: 1.5rem; }
    .wiki-editor-meta { grid-template-columns: 1fr 1fr; }
    .wiki-editor-title-field { grid-column: 1 / -1; }
    .password-studio { grid-template-columns: 1fr; }
    .password-security-panel {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 0 1rem;
        border-top: 1px solid var(--line);
        border-left: 0;
    }
    .password-security-panel h2 { align-self: end; margin-top: 0; }
    .password-security-panel > p,
    .password-security-panel dl,
    .password-security-panel .password-tip { grid-column: 1 / -1; }
    .vault-layout { display: block; }
    .vault-security { display: none; }
    .vault-topbar { grid-template-columns: minmax(12rem, auto) 1fr auto; gap: 0.75rem; padding-inline: 1rem; }
    .vault-title p,
    .vault-search kbd { display: none; }
    .vault-entry { grid-template-columns: 2.55rem minmax(0, 1fr) 6.5rem 1rem; }
    .vault-entry-site { display: none; }
    .monitor-toolbar { grid-template-columns: 1fr auto; }
    .monitor-search { grid-column: 1 / -1; grid-row: 2; }
    .monitor-card { grid-template-columns: 2.35rem minmax(0, 1fr) auto; }
    .monitor-metric { display: none; }
    .monitor-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .calendar-event { grid-template-columns: 1fr; }
}

@media (max-width: 36rem) {
    .account-shell { display: block; padding-bottom: 4.25rem; }
    .app-navigation {
        position: fixed;
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 15;
        height: 4.25rem;
        border-top: 1px solid var(--line);
        border-right: 0;
        overflow-x: auto;
        overflow-y: hidden;
    }
    .app-brand,
    .app-nav-category,
    .app-user,
    .logout-form,
    .app-nav-link:nth-of-type(n + 8) { display: none; }
    .app-nav-primary {
        display: flex;
        justify-content: space-around;
        height: 100%;
        padding: 0.45rem;
    }
    .app-nav-link {
        display: grid;
        width: 3.5rem;
        min-height: 3.2rem;
        place-items: center;
        border-bottom: 2px solid transparent;
        border-left: 0;
    }
    .app-nav-link.is-active { border-bottom-color: var(--teal); }
    .account-main { padding: 1.25rem 1rem; }
    .profile-workspace { padding: 1.25rem 1rem; }
    .profile-header { align-items: flex-start; }
    .profile-avatar { width: 3rem; height: 3rem; flex-basis: 3rem; font-size: 1.25rem; }
    .profile-identity h1 { font-size: 1.65rem; }
    .profile-field-pair, .two-factor-setup, .recovery-section { grid-template-columns: 1fr; }
    .two-factor-qr { width: 11rem; }
    .inline-security-form { grid-template-columns: 1fr; }
    .recovery-code-grid { grid-template-columns: 1fr; }
    .notes-workspace { padding: 0; }
    .notes-topbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        min-height: auto;
        padding: 1rem;
    }
    .notes-title-icon { display: block; }
    .notes-topbar .button { font-size: 0; }
    .notes-topbar .button i { font-size: 1rem; }
    .command-search { grid-column: 1 / -1; grid-row: 2; width: 100%; margin-top: 0.5rem; }
    .notes-filter { grid-template-columns: 1fr 1fr auto; }
    .notes-filter-summary { display: none; }
    .notes-filter .icon-action:last-child { display: none; }
    .note-entry { grid-template-columns: 2.15rem minmax(0, 1fr) 1rem; min-height: 3.55rem; }
    .note-entry-icon { width: 2.15rem; height: 2.15rem; }
    .users-header,
    .section-heading,
    .monitor-toolbar { align-items: flex-start; flex-direction: column; }
    .monitor-toolbar { display: flex; }
    .monitor-toolbar-actions { flex-wrap: wrap; }
    .monitor-summary { display: flex; overflow-x: auto; width: 100%; }
    .modal { width: 100%; padding: 1.1rem; }
    .modal-form-grid,
    .monitor-detail-grid { grid-template-columns: 1fr; }
    .form-field-full { grid-column: auto; }
    .users-list-header { display: none; }
    .user-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.55rem 1rem;
        padding-block: 0.75rem;
    }
    .user-identity { grid-column: 1; grid-row: 1; }
    .user-row-action { grid-column: 2; grid-row: 1; }
    .user-row-field {
        display: inline-flex;
        grid-row: 2;
        align-items: center;
        gap: 0.45rem;
    }
    .user-row-field::before {
        content: attr(data-label);
        color: var(--subtle);
        font-size: 0.58rem;
        font-weight: 800;
        text-transform: uppercase;
    }
    .clock-time { font-size: 3.8rem; }
    .wiki-topbar {
        grid-template-columns: minmax(0, 1fr) auto;
        min-height: auto;
        padding: 1rem;
    }
    .wiki-topbar .button { font-size: 0; }
    .wiki-topbar .button i { font-size: 1rem; }
    .wiki-search { grid-column: 1 / -1; grid-row: 2; width: 100%; margin-top: 0.5rem; }
    .wiki-library { padding: 1.25rem 1rem; }
    .wiki-library-header { align-items: start; flex-direction: column; gap: 0.5rem; }
    .wiki-library-row { grid-template-columns: 2.4rem minmax(0, 1fr) 1rem; }
    .wiki-library-tags,
    .wiki-library-row time { display: none; }
    .wiki-article { padding: 0 1rem 3rem; }
    .wiki-article-toolbar > span { display: none; }
    .wiki-article-toolbar { justify-content: flex-end; }
    .wiki-article-header { padding-top: 1.8rem; }
    .wiki-article-header h1 { font-size: 2rem; }
    .wiki-editor-backdrop { padding: 0; }
    .wiki-editor { width: 100%; height: 100%; max-height: none; border: 0; border-radius: 0; }
    .wiki-editor-meta { grid-template-columns: 1fr; }
    .wiki-editor-title-field { grid-column: auto; }
    .wiki-editor-footer > span { display: none; }
    .wiki-editor-footer { justify-content: flex-end; }
    .tool-page-header {
        min-height: auto;
        align-items: flex-start;
        padding-bottom: 1rem;
    }
    .tool-page-header h1 { font-size: 1.9rem; }
    .local-only-badge { margin-top: 0.25rem; font-size: 0; }
    .local-only-badge i { font-size: 0.9rem; }
    .password-studio { margin-top: 1rem; border-right: 0; border-left: 0; }
    .password-generator-panel { padding: 1.25rem 1rem; }
    .password-options { grid-template-columns: 1fr; }
    .password-output-row { grid-template-columns: minmax(0, 1fr) auto; }
    .password-output-row .icon-action:first-of-type { display: none; }
    .password-security-panel { padding: 1.5rem 1rem; }
    .password-save-fields { grid-template-columns: 1fr; }
    .password-save-fields label:first-child,
    .password-save-fields label:last-child { grid-column: auto; }
    .vault-topbar {
        grid-template-columns: minmax(0, 1fr) auto;
        min-height: auto;
        padding: 1rem;
    }
    .vault-topbar .button { font-size: 0; }
    .vault-topbar .button i { font-size: 1rem; }
    .vault-search { grid-column: 1 / -1; grid-row: 2; width: 100%; margin-top: 0.5rem; }
    .vault-list-panel { padding: 1.25rem 1rem; }
    .vault-list-header { align-items: flex-start; flex-direction: column; }
    .vault-entry { grid-template-columns: 2.35rem minmax(0, 1fr) 1rem; }
    .vault-entry time { display: none; }
    .vault-entry-mark { width: 2.35rem; height: 2.35rem; }
    .vault-detail-fields > div > div { flex-wrap: wrap; }
    .vault-detail-fields input { flex: 1 1 calc(100% - 6rem); }
}
