:root {
    --bg: #f6f8f7;
    --panel: rgba(255, 255, 255, 0.9);
    --panel-strong: #ffffff;
    --line: rgba(27, 52, 43, 0.1);
    --ink: #23312c;
    --muted: #70807a;
    --accent: #157a63;
    --accent-strong: #0f624f;
    --shadow: 0 8px 28px rgba(18, 37, 31, 0.06);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Manrope', sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(232, 243, 238, 0.8), transparent 28%),
        linear-gradient(180deg, #fbfcfc 0%, #f4f7f6 100%);
}

.app-body {
    overflow-x: hidden;
}

.landing-page-body {
    overflow-x: hidden;
}

.landing-login-shell {
    min-height: 100vh;
    padding: 32px 20px;
    color: #f6faf8;
    background:
        radial-gradient(circle at 18% 18%, rgba(38, 139, 112, 0.18), transparent 28%),
        radial-gradient(circle at 82% 22%, rgba(227, 183, 97, 0.16), transparent 26%),
        linear-gradient(135deg, #102521 0%, #183932 48%, #0f211d 100%);
}

.landing-login-layout {
    display: grid;
    grid-template-columns: minmax(320px, 1.15fr) minmax(360px, 440px);
    gap: 36px;
    align-items: center;
    max-width: 1180px;
    min-height: calc(100vh - 64px);
    margin: 0 auto;
}

.landing-login-copy {
    min-width: 0;
}

.landing-login-copy-card {
    display: grid;
    gap: 20px;
    max-width: 620px;
}

.landing-login-copy .lead {
    color: rgba(236, 244, 240, 0.84);
}

.landing-login-copy h1 {
    font-size: clamp(44px, 8vw, 92px);
    letter-spacing: -0.04em;
    line-height: 0.94;
}

.landing-login-points {
    display: grid;
    gap: 12px;
}

.landing-login-point {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
}

.landing-login-point span {
    color: rgba(236, 244, 240, 0.8);
    line-height: 1.6;
}

.landing-login-panel {
    width: 100%;
}

.landing-login-layout > .landing-messages {
    position: static;
    grid-column: 1 / -1;
    margin-bottom: 8px;
}

.landing-shell {
    position: relative;
    min-height: 100vh;
    color: #f6faf8;
    background:
        radial-gradient(circle at 18% 18%, rgba(38, 139, 112, 0.18), transparent 28%),
        radial-gradient(circle at 82% 22%, rgba(227, 183, 97, 0.16), transparent 26%),
        linear-gradient(135deg, #102521 0%, #183932 48%, #0f211d 100%);
}

.landing-slab {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    transition: transform 0.8s cubic-bezier(.22, .84, .24, 1);
    z-index: 0;
}

.landing-slab-left {
    left: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 58%),
        linear-gradient(180deg, rgba(9, 25, 21, 0.92) 0%, rgba(15, 37, 32, 0.82) 100%);
}

.landing-slab-right {
    right: 0;
    background:
        linear-gradient(225deg, rgba(255, 255, 255, 0.05), transparent 54%),
        linear-gradient(180deg, rgba(17, 41, 35, 0.92) 0%, rgba(10, 23, 20, 0.84) 100%);
}

.landing-shell.is-activated .landing-slab-left {
    transform: translateX(-62vw);
}

.landing-shell.is-activated .landing-slab-right {
    transform: translateX(62vw);
}

.landing-stage {
    position: relative;
    z-index: 1;
    display: grid;
    align-items: center;
    min-height: 100vh;
    padding: 40px;
}

.landing-messages {
    position: absolute;
    top: 24px;
    left: 40px;
    right: 40px;
    z-index: 3;
}

.landing-hero {
    display: grid;
    grid-template-columns: minmax(320px, 1.15fr) minmax(420px, 0.95fr);
    gap: 48px;
    align-items: center;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
}

.landing-brand-copy {
    max-width: 560px;
}

.landing-brand-copy .lead {
    color: rgba(236, 244, 240, 0.8);
}

.landing-brand-copy h1 {
    font-size: clamp(48px, 8vw, 104px);
    letter-spacing: -0.04em;
    line-height: 0.94;
}

.landing-activation-zone {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 540px;
}

.landing-emblem {
    position: relative;
    width: min(66vw, 520px);
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.22), transparent 18%),
        radial-gradient(circle at 68% 68%, rgba(17, 102, 82, 0.34), transparent 32%),
        linear-gradient(180deg, rgba(241, 246, 243, 0.14), rgba(241, 246, 243, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 30px 90px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(12px);
}

.landing-emblem-core,
.landing-emblem-ring {
    position: absolute;
    inset: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.landing-emblem-core {
    width: 38%;
    height: 38%;
    background:
        linear-gradient(180deg, rgba(232, 244, 239, 0.96), rgba(179, 215, 204, 0.4));
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.18);
}

.landing-emblem-ring-one {
    width: 58%;
    height: 58%;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.landing-emblem-ring-two {
    width: 78%;
    height: 78%;
    border: 1px dashed rgba(226, 239, 234, 0.24);
}

.landing-emblem-grid {
    position: absolute;
    inset: 50%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    width: 26%;
    height: 26%;
    transform: translate(-50%, -50%);
}

.landing-emblem-grid span {
    border-radius: 10px;
    background: rgba(17, 74, 60, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.landing-power-button {
    position: absolute;
    right: -22px;
    top: 50%;
    width: 148px;
    height: 148px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background:
        radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.32), transparent 20%),
        linear-gradient(180deg, #25b287 0%, #138061 100%);
    box-shadow:
        0 18px 44px rgba(14, 87, 66, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transform: translateY(-50%) scale(1);
    transition: transform 0.74s cubic-bezier(.22, .84, .24, 1), opacity 0.4s ease;
    z-index: 2;
}

.landing-power-button:hover {
    transform: translateY(-50%) scale(1.03);
}

.landing-power-button-static {
    cursor: default;
    pointer-events: none;
}

.landing-power-button-static:hover {
    transform: translateY(-50%) scale(1);
}

.landing-shell.is-activated .landing-power-button {
    transform: translate(220px, -50%) scale(0.26);
    opacity: 0.22;
}

.landing-power-icon {
    position: relative;
    display: inline-flex;
    width: 54px;
    height: 54px;
    border: 6px solid #f7fffc;
    border-top-color: transparent;
    border-radius: 50%;
}

.landing-power-icon::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -14px;
    width: 6px;
    height: 30px;
    border-radius: 999px;
    background: #f7fffc;
    transform: translateX(-50%);
}

.landing-auth-panel {
    position: absolute;
    top: 50%;
    right: min(6vw, 72px);
    width: min(460px, calc(100vw - 32px));
    transform: translateY(-50%) translateX(60px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s ease 0.2s, transform 0.65s cubic-bezier(.22, .84, .24, 1) 0.18s;
    z-index: 2;
}

.landing-auth-panel.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
}

.landing-auth-panel-static {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
}

.landing-auth-card {
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    background: rgba(252, 255, 253, 0.92);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.22);
    color: var(--ink);
}

.landing-auth-card .lead {
    color: var(--muted);
}

.landing-auth-form {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

a {
    color: inherit;
    text-decoration: none;
}

.page-shell {
    display: grid;
    grid-template-columns: 248px 1fr;
    align-items: start;
    min-height: 100vh;
    min-width: 0;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 18px 16px 16px;
    background: linear-gradient(180deg, #19241f 0%, #141d19 100%);
    color: #f2f7f5;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-mobile-bar,
.sidebar-backdrop,
.mobile-topbar,
.app-nav-toggle,
.sidebar-close {
    display: none;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand small {
    color: rgba(249, 241, 230, 0.76);
    line-height: 1.4;
    font-size: 12px;
}

.sidebar-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-compact {
    flex: 1;
    min-width: 0;
}

.brand-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.brand-copy strong {
    font-size: 14px;
    line-height: 1.35;
}

.user-badge {
    display: grid;
    gap: 4px;
    padding: 14px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
}

.user-badge span {
    color: rgba(249, 241, 230, 0.76);
    font-size: 12px;
}

.user-badge-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    color: inherit;
    box-shadow: none;
}

.user-badge-button:hover {
    box-shadow: none;
    background: rgba(255, 255, 255, 0.08);
}

.user-badge-copy {
    display: grid;
    gap: 6px;
}

.user-menu {
    position: relative;
}

.sidebar-user-dock {
    margin-top: auto;
}

.user-menu-caret {
    color: rgba(249, 241, 230, 0.76);
    font-size: 14px;
    transition: transform 0.18s ease;
}

.user-menu.is-open .user-menu-caret {
    transform: rotate(180deg);
}

.user-menu-panel {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    z-index: 20;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: #1c2823;
    box-shadow: 0 14px 32px rgba(8, 16, 13, 0.28);
}

.user-menu.is-open .user-menu-panel {
    display: grid;
    gap: 8px;
}

.user-menu-panel a,
.user-menu-panel button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 14px;
    border-radius: 14px;
    color: #f2f7f5;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
}

.user-menu-panel a:hover,
.user-menu-panel button:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.user-menu-logout {
    margin: 0;
}

.brand-kicker,
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 11px;
    font-weight: 800;
}

.nav {
    display: grid;
    gap: 6px;
}

.nav-group {
    display: grid;
    gap: 8px;
}

.sidebar-section {
    display: grid;
    gap: 8px;
}

.sidebar-main {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    display: grid;
    align-content: start;
    gap: 18px;
    padding-bottom: 12px;
}

.sidebar,
.sidebar-main {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.sidebar::-webkit-scrollbar,
.sidebar-main::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.nav-group-title {
    margin: 0 4px;
    color: rgba(249, 241, 230, 0.48);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.nav a,
.logout-form button,
.action-link,
.secondary-link,
.auth-form button {
    border: 0;
    border-radius: 12px;
    padding: 11px 12px;
    font: inherit;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease;
}

button,
input[type='submit'],
input[type='button'] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 12px;
    padding: 10px 16px;
    font: inherit;
    cursor: pointer;
    color: #fff;
    background: var(--accent);
    box-shadow: 0 6px 18px rgba(21, 122, 99, 0.16);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

button:hover,
input[type='submit']:hover,
input[type='button']:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(21, 122, 99, 0.18);
}

.danger-button {
    background: linear-gradient(135deg, #c94b3c 0%, #a3372b 100%);
    box-shadow: 0 6px 18px rgba(163, 55, 43, 0.18);
}

.danger-button:hover {
    box-shadow: 0 10px 22px rgba(163, 55, 43, 0.22);
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    gap: 8px;
    width: auto;
    min-width: 38px;
    height: 38px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--muted);
    box-shadow: none;
}

.icon-button:hover,
.icon-button:focus-visible {
    color: var(--accent-strong);
    background: #fff;
}

.app-nav-toggle[data-tooltip]::after,
.sidebar-close[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translate(-50%, 6px);
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(18, 33, 28, 0.94);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 10px 24px rgba(18, 33, 28, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
    z-index: 50;
}

.app-nav-toggle[data-tooltip]::before,
.sidebar-close[data-tooltip]::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: calc(100% + 4px);
    width: 10px;
    height: 10px;
    background: rgba(18, 33, 28, 0.94);
    transform: translateX(-50%) rotate(45deg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
    z-index: 49;
}

.app-nav-toggle[data-tooltip]:hover::after,
.app-nav-toggle[data-tooltip]:focus-visible::after,
.sidebar-close[data-tooltip]:hover::after,
.sidebar-close[data-tooltip]:focus-visible::after,
.app-nav-toggle[data-tooltip]:hover::before,
.app-nav-toggle[data-tooltip]:focus-visible::before,
.sidebar-close[data-tooltip]:hover::before,
.sidebar-close[data-tooltip]:focus-visible::before {
    opacity: 1;
}

.app-nav-toggle[data-tooltip]:hover::after,
.app-nav-toggle[data-tooltip]:focus-visible::after,
.sidebar-close[data-tooltip]:hover::after,
.sidebar-close[data-tooltip]:focus-visible::after {
    transform: translate(-50%, 0);
}

.icon-button-danger {
    border-color: rgba(154, 49, 36, 0.24);
    color: #9a3124;
}

.icon-button-danger:hover,
.icon-button-danger:focus-visible {
    color: #7f261e;
    background: rgba(154, 49, 36, 0.08);
}

.icon-button-large {
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0 14px;
}

.icon-button-primary {
    border-color: rgba(21, 122, 99, 0.24);
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
    color: #fff;
    box-shadow: 0 8px 18px rgba(21, 122, 99, 0.18);
}

.icon-button-primary:hover,
.icon-button-primary:focus-visible {
    color: #fff;
    background: linear-gradient(135deg, var(--accent-strong) 0%, var(--accent) 100%);
    box-shadow: 0 10px 22px rgba(21, 122, 99, 0.22);
}

.icon-button-muted {
    border-color: rgba(27, 52, 43, 0.12);
    color: var(--ink);
}

.icon-button-muted:hover,
.icon-button-muted:focus-visible {
    color: var(--accent-strong);
    background: rgba(255, 255, 255, 0.98);
}

.icon-button-create,
.icon-button-edit,
.icon-button-cancel,
.icon-button-open,
.icon-button-move {
    border-color: rgba(21, 122, 99, 0.16);
}

.delete-icon {
    display: inline-block;
    width: 17px;
    height: 17px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 3h6l1 2h4v2H4V5h4l1-2Zm1 6h2v9h-2V9Zm4 0h2v9h-2V9ZM6 9h12l-1 12H7L6 9Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 3h6l1 2h4v2H4V5h4l1-2Zm1 6h2v9h-2V9Zm4 0h2v9h-2V9ZM6 9h12l-1 12H7L6 9Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.create-icon,
.edit-icon,
.cancel-icon,
.open-icon,
.move-icon,
.save-icon,
.back-icon,
.up-icon,
.down-icon,
.print-icon,
.export-icon,
.show-icon,
.hide-icon,
.lock-icon {
    display: inline-block;
    width: 17px;
    height: 17px;
    background: currentColor;
}

.create-icon {
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 4h2v7h7v2h-7v7h-2v-7H4v-2h7V4Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 4h2v7h7v2h-7v7h-2v-7H4v-2h7V4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.edit-icon {
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15.8 3.6a2.5 2.5 0 0 1 3.6 0l1 1a2.5 2.5 0 0 1 0 3.6l-9.9 9.9-4.7 1.1 1.1-4.7 9.9-9.9ZM14.4 6 8.1 12.3l-.5 2 2-.5L15.9 7.5l-1.5-1.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15.8 3.6a2.5 2.5 0 0 1 3.6 0l1 1a2.5 2.5 0 0 1 0 3.6l-9.9 9.9-4.7 1.1 1.1-4.7 9.9-9.9ZM14.4 6 8.1 12.3l-.5 2 2-.5L15.9 7.5l-1.5-1.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.cancel-icon {
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6.4 5 5.6 5.6L17.6 5 19 6.4 13.4 12 19 17.6 17.6 19 12 13.4 6.4 19 5 17.6 10.6 12 5 6.4 6.4 5Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6.4 5 5.6 5.6L17.6 5 19 6.4 13.4 12 19 17.6 17.6 19 12 13.4 6.4 19 5 17.6 10.6 12 5 6.4 6.4 5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.open-icon {
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 5h7v2H7v10h10v-5h2v7H5V5Zm8 0h6v6h-2V8.4l-6.3 6.3-1.4-1.4L15.6 7H13V5Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 5h7v2H7v10h10v-5h2v7H5V5Zm8 0h6v6h-2V8.4l-6.3 6.3-1.4-1.4L15.6 7H13V5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.move-icon {
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 3h2v5h3l-4 4-4-4h3V3Zm1 18-4-4h3v-5h2v5h3l-4 4ZM3 11h5V8l4 4-4 4v-3H3v-2Zm18 0v2h-5v3l-4-4 4-4v3h5Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 3h2v5h3l-4 4-4-4h3V3Zm1 18-4-4h3v-5h2v5h3l-4 4ZM3 11h5V8l4 4-4 4v-3H3v-2Zm18 0v2h-5v3l-4-4 4-4v3h5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.save-icon {
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17 3H5a2 2 0 0 0-2 2v14h18V7l-4-4ZM7 5h8v4H7V5Zm12 12H5V11h14v6Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17 3H5a2 2 0 0 0-2 2v14h18V7l-4-4ZM7 5h8v4H7V5Zm12 12H5V11h14v6Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.back-icon {
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m10.8 5-7 7 7 7 1.4-1.4L7.6 13H20v-2H7.6l4.6-4.6L10.8 5Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m10.8 5-7 7 7 7 1.4-1.4L7.6 13H20v-2H7.6l4.6-4.6L10.8 5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.up-icon {
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12 5 7 7-1.4 1.4-4.6-4.6V19h-2V8.8l-4.6 4.6L5 12l7-7Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12 5 7 7-1.4 1.4-4.6-4.6V19h-2V8.8l-4.6 4.6L5 12l7-7Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.down-icon {
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12 19-7-7 1.4-1.4 4.6 4.6V5h2v10.2l4.6-4.6L19 12l-7 7Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12 19-7-7 1.4-1.4 4.6 4.6V5h2v10.2l4.6-4.6L19 12l-7 7Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.print-icon {
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 3h10v4H7V3Zm10 8h2v6h-2v4H7v-4H5v-6h2v4h10v-4Zm-2 8v-4H9v4h6Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 3h10v4H7V3Zm10 8h2v6h-2v4H7v-4H5v-6h2v4h10v-4Zm-2 8v-4H9v4h6Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.export-icon {
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 3 7 8h3v6h4V8h3l-5-5Zm-7 13h14v5H5v-5Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 3 7 8h3v6h4V8h3l-5-5Zm-7 13h14v5H5v-5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.show-icon {
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 5c5.5 0 9.5 5.5 9.5 7s-4 7-9.5 7S2.5 13.5 2.5 12 6.5 5 12 5Zm0 2.5A4.5 4.5 0 1 0 16.5 12 4.5 4.5 0 0 0 12 7.5Zm0 2A2.5 2.5 0 1 1 9.5 12 2.5 2.5 0 0 1 12 9.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 5c5.5 0 9.5 5.5 9.5 7s-4 7-9.5 7S2.5 13.5 2.5 12 6.5 5 12 5Zm0 2.5A4.5 4.5 0 1 0 16.5 12 4.5 4.5 0 0 0 12 7.5Zm0 2A2.5 2.5 0 1 1 9.5 12 2.5 2.5 0 0 1 12 9.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.hide-icon {
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m3.3 4.7 16 16-1.4 1.4-3.1-3.1A10.9 10.9 0 0 1 12 19c-5.5 0-9.5-5.5-9.5-7a11.7 11.7 0 0 1 3.5-4.9L1.9 6.1l1.4-1.4Zm5.1 5.1A4.5 4.5 0 0 0 14.2 15l-1.6-1.6a2.5 2.5 0 0 1-3.2-3.2L8.4 9.8Zm3.6-4.8c5.5 0 9.5 5.5 9.5 7a11.6 11.6 0 0 1-4 5.2l-1.4-1.4a9.9 9.9 0 0 0 2.9-3.8c-.7-1.2-3.5-4.5-7-4.5-.7 0-1.4.1-2 .3L8.3 6.1A10.1 10.1 0 0 1 12 5Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m3.3 4.7 16 16-1.4 1.4-3.1-3.1A10.9 10.9 0 0 1 12 19c-5.5 0-9.5-5.5-9.5-7a11.7 11.7 0 0 1 3.5-4.9L1.9 6.1l1.4-1.4Zm5.1 5.1A4.5 4.5 0 0 0 14.2 15l-1.6-1.6a2.5 2.5 0 0 1-3.2-3.2L8.4 9.8Zm3.6-4.8c5.5 0 9.5 5.5 9.5 7a11.6 11.6 0 0 1-4 5.2l-1.4-1.4a9.9 9.9 0 0 0 2.9-3.8c-.7-1.2-3.5-4.5-7-4.5-.7 0-1.4.1-2 .3L8.3 6.1A10.1 10.1 0 0 1 12 5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.lock-icon {
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17 9V7a5 5 0 0 0-10 0v2H5v12h14V9h-2Zm-8 0V7a3 3 0 0 1 6 0v2H9Zm3 8a2 2 0 1 1 2-2 2 2 0 0 1-2 2Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17 9V7a5 5 0 0 0-10 0v2H5v12h14V9h-2Zm-8 0V7a3 3 0 0 1 6 0v2H9Zm3 8a2 2 0 1 1 2-2 2 2 0 0 1-2 2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

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

.nav a {
    background: rgba(255, 255, 255, 0.06);
    font-size: 14px;
    color: rgba(242, 247, 245, 0.92);
}

.nav-link-label {
    display: inline-block;
}

.nav a:hover,
.logout-form button:hover,
.action-link:hover,
.auth-form button:hover {
    transform: translateY(-1px);
}

.logout-form button,
.action-link,
.auth-form button {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
    color: #fff;
}

.button-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    white-space: nowrap;
    border: 0;
}

.full-width {
    width: 100%;
}

.secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink);
    box-shadow: none;
}

.content {
    padding: 26px 28px 32px;
    min-width: 0;
}

.messages {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.message {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(29, 107, 82, 0.18);
    background: rgba(29, 107, 82, 0.08);
}

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

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

.settings-shell {
    display: grid;
    gap: 20px;
    max-width: 820px;
}

.settings-intro h1 {
    margin-bottom: 8px;
    font-size: clamp(34px, 5vw, 46px);
}

.settings-card {
    padding: 24px;
    border-radius: 24px;
}

.settings-card-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.settings-card-head h2,
.settings-card-head h3 {
    margin: 0;
    font-size: 24px;
}

.settings-card-head-inline {
    margin-bottom: 14px;
}

.settings-divider {
    height: 1px;
    margin: 4px 0 2px;
    background: rgba(27, 52, 43, 0.08);
}

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

.settings-password-stack {
    display: grid;
    gap: 14px;
    max-width: 520px;
}

.access-setting-list {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.access-setting-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid rgba(27, 52, 43, 0.08);
    border-radius: 18px;
    background: rgba(248, 251, 250, 0.92);
    cursor: pointer;
}

.access-setting-copy {
    display: grid;
    gap: 4px;
}

.access-setting-copy strong {
    font-size: 18px;
    font-weight: 700;
}

.access-setting-copy small {
    color: var(--muted);
    line-height: 1.45;
}

.access-switch-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.access-switch-control input[type='checkbox'] {
    width: 46px;
    height: 26px;
    margin: 0;
    appearance: none;
    border-radius: 999px;
    background: rgba(120, 136, 130, 0.28);
    position: relative;
    transition: background 0.18s ease;
    cursor: pointer;
}

.access-switch-control input[type='checkbox']::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(18, 37, 31, 0.18);
    transition: transform 0.18s ease;
}

.access-switch-control input[type='checkbox']:checked {
    background: #ff8a1c;
}

.access-switch-control input[type='checkbox']:checked::after {
    transform: translateX(20px);
}

.hero {
    min-height: calc(100vh - 64px);
    align-items: center;
}

.hero-copy {
    max-width: 640px;
}

h1 {
    margin: 0;
    font-size: clamp(28px, 3.2vw, 40px);
    line-height: 1.02;
}

.hero h1,
.auth-card h1 {
    font-size: clamp(34px, 4vw, 56px);
}

h2 {
    margin: 0;
    font-size: 22px;
}

.lead {
    margin: 14px 0 0;
    max-width: 720px;
    font-size: 18px;
    line-height: 1.6;
    color: var(--muted);
}

.compact-lead {
    font-size: 15px;
    max-width: 620px;
}

.stats-grid,
.content-grid {
    display: grid;
    gap: 18px;
}

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 18px;
}

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

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(6px);
}

.profile-card {
    margin-bottom: 18px;
}

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

.org-grid div {
    display: grid;
    gap: 8px;
}

.org-grid strong {
    line-height: 1.5;
}

.stat-card {
    min-height: 132px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stat-card span,
.muted {
    color: var(--muted);
}

.stat-card strong {
    font-size: 44px;
}

.stat-card-caption {
    font-size: 24px !important;
    line-height: 1.2;
}

.procurement-guide-grid {
    margin-bottom: 18px;
}

.workflow-step {
    display: grid;
    gap: 10px;
    align-content: start;
}

.workflow-step p {
    margin: 0;
    line-height: 1.6;
}

.section-note {
    margin: 6px 0 0;
    max-width: 860px;
    line-height: 1.6;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.section-head a {
    color: var(--accent-strong);
    font-weight: 700;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.tab-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.52);
    font-weight: 700;
}

.tab-link-active {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
    border-color: transparent;
    color: #fff;
}

.page-actions,
.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.danger-link {
    border-color: rgba(154, 49, 36, 0.24);
    color: #9a3124;
}

.document-header-card {
    padding-top: 18px;
    padding-bottom: 18px;
}

.filter-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    color: var(--ink);
}

.filter-chip span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(29, 107, 82, 0.12);
    color: var(--accent-strong);
    font-size: 13px;
    font-weight: 800;
}

.filter-chip-active {
    border-color: rgba(29, 107, 82, 0.28);
    background: rgba(29, 107, 82, 0.08);
}

.warning-text {
    color: #9a3124;
    font-weight: 700;
}

.stacked-layout {
    display: grid;
    gap: 18px;
}

.protocol-lock-card {
    border: 1px solid rgba(154, 49, 36, 0.16);
    background: linear-gradient(180deg, rgba(255, 248, 246, 0.98) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.diia-sign-card-note {
    margin-top: 4px;
}

.diia-sign-hero {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

.diia-sign-hero-copy {
    display: grid;
    gap: 6px;
}

.protocol-sign-methods {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 14px;
}

.diia-brand-button,
.diia-brand-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    width: fit-content;
    max-width: 100%;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid #111;
    background: #111;
    color: #fff;
    line-height: 1;
    overflow: hidden;
}

.diia-brand-button:hover,
.diia-brand-button:focus-visible,
.diia-brand-link:hover,
.diia-brand-link:focus-visible {
    background: #000;
    border-color: #000;
    color: #fff;
}

.diia-brand-logo {
    display: block !important;
    height: 24px !important;
    width: 126px !important;
    max-width: 126px !important;
    min-height: 24px;
    min-width: 0;
    flex: 0 0 auto;
    object-fit: contain;
}

.diia-brand-link {
    min-height: 48px;
    padding: 10px 20px;
    font-size: 18px;
    text-decoration: none;
}

.diia-sign-list {
    display: grid;
    gap: 10px;
}

.diia-sign-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
}

.diia-sign-person {
    display: grid;
    gap: 4px;
}

.diia-sign-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.diia-sign-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(84, 98, 116, 0.12);
    color: #415161;
    font-size: 13px;
    font-weight: 800;
}

.diia-sign-pill-signed {
    background: rgba(29, 107, 82, 0.12);
    color: var(--accent-strong);
}

.diia-sign-pill-pending {
    background: rgba(181, 127, 0, 0.12);
    color: #8f6400;
}

.diia-sign-pill-error {
    background: rgba(154, 49, 36, 0.12);
    color: #9a3124;
}

.form-card form,
.stacked-layout {
    width: 100%;
}

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

.knowledge-grid {
    display: grid;
    gap: 18px;
}

.knowledge-list-card {
    display: grid;
    gap: 16px;
}

.knowledge-list-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
}

.knowledge-list-head h2 {
    margin: 10px 0 0;
    font-size: 24px;
}

.knowledge-list-head h2 a {
    color: var(--ink);
    text-decoration: none;
}

.knowledge-list-head h2 a:hover {
    color: var(--accent-strong);
}

.knowledge-summary {
    margin: 0;
    font-size: 15px;
    line-height: 1.65;
}

.knowledge-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.knowledge-meta-grid > div,
.knowledge-meta-list > div {
    display: grid;
    gap: 4px;
}

.knowledge-meta-label,
.knowledge-meta-list dt {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.knowledge-list-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.knowledge-empty {
    display: grid;
    gap: 12px;
    justify-items: start;
}

.knowledge-empty h2,
.knowledge-meta-card h2 {
    margin: 0;
}

.knowledge-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.7fr);
    gap: 20px;
    align-items: start;
}

.knowledge-detail-card,
.knowledge-meta-card,
.knowledge-editor-card {
    display: grid;
    gap: 18px;
}

.knowledge-sidebar {
    display: grid;
    gap: 18px;
}

.knowledge-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.03em;
    background: rgba(27, 52, 43, 0.08);
    color: var(--ink);
}

.status-pill-draft {
    background: rgba(27, 52, 43, 0.08);
    color: #33413b;
}

.status-pill-in_progress {
    background: rgba(197, 135, 25, 0.14);
    color: #7c5800;
}

.status-pill-actual {
    background: rgba(29, 107, 82, 0.12);
    color: var(--accent-strong);
}

.status-pill-needs_review {
    background: rgba(177, 78, 59, 0.12);
    color: #8d2e20;
}

.status-pill-archived {
    background: rgba(74, 88, 96, 0.12);
    color: #42535d;
}

.knowledge-content {
    color: #1a1f1d;
    font-size: 16px;
    line-height: 1.72;
}

.knowledge-content > :first-child {
    margin-top: 0;
}

.knowledge-content h1,
.knowledge-content h2,
.knowledge-content h3,
.knowledge-content h4,
.knowledge-content h5,
.knowledge-content h6 {
    margin: 0 0 16px;
    color: #1f2e29;
    line-height: 1.25;
}

.knowledge-content p,
.knowledge-content ul,
.knowledge-content ol,
.knowledge-content blockquote,
.knowledge-content figure,
.knowledge-content table {
    margin: 0 0 16px;
}

.knowledge-content img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
}

.knowledge-content table {
    width: 100%;
    border-collapse: collapse;
}

.knowledge-content th,
.knowledge-content td {
    padding: 10px 12px;
    border: 1px solid rgba(27, 52, 43, 0.14);
    vertical-align: top;
}

.knowledge-content blockquote {
    margin-left: 0;
    padding: 16px 18px;
    border-left: 4px solid rgba(29, 107, 82, 0.24);
    border-radius: 0 16px 16px 0;
    background: rgba(233, 249, 245, 0.72);
}

.knowledge-meta-list {
    display: grid;
    gap: 14px;
    margin: 0;
}

.knowledge-meta-list dd {
    margin: 0;
    font-weight: 700;
    color: var(--ink);
}

.field-group {
    display: grid;
    gap: 8px;
}

.field-group-wide {
    grid-column: 1 / -1;
}

.inline-toggle {
    align-items: start;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.checkbox-label input {
    width: auto;
    margin: 0;
}

.nested-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.48);
}

.field-group label {
    font-weight: 700;
}

.field-group small {
    color: var(--muted);
}

.access-switch-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.access-switch-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 74px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(246, 250, 248, 0.9) 100%);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.access-switch-card:hover {
    border-color: rgba(21, 122, 99, 0.22);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.access-switch-card.is-checked {
    border-color: rgba(21, 122, 99, 0.32);
    box-shadow: 0 10px 24px rgba(21, 122, 99, 0.08);
}

.access-switch-copy {
    display: grid;
    gap: 0;
}

.access-switch-copy strong {
    font-size: 17px;
    line-height: 1.25;
}

.access-switch-copy small {
    color: var(--muted);
    line-height: 1.55;
}

.access-switch-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 24px;
    margin-top: 2px;
}

.section-head-compact {
    margin-top: 28px;
}

.password-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.field-errors,
.form-errors {
    display: grid;
    gap: 6px;
    color: #9a3124;
    font-size: 14px;
}

.form-errors {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid rgba(154, 49, 36, 0.2);
    border-radius: 14px;
    background: rgba(154, 49, 36, 0.08);
}

.line-items {
    display: grid;
    gap: 16px;
}

.line-item-row {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.44);
}

.agenda-card {
    padding: 0;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(248, 251, 250, 0.92) 100%);
}

.agenda-card[open] {
    border-color: rgba(21, 122, 99, 0.24);
    box-shadow: 0 14px 32px rgba(21, 122, 99, 0.08);
}

.agenda-card-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    cursor: pointer;
    list-style: none;
}

.agenda-card-summary::-webkit-details-marker {
    display: none;
}

.agenda-card-title-wrap {
    display: flex;
    align-items: start;
    gap: 14px;
    min-width: 0;
}

.agenda-card-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    min-width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(21, 122, 99, 0.12);
    color: var(--accent-strong);
    font-weight: 800;
}

.agenda-card-title {
    display: block;
    margin-bottom: 4px;
    font-size: 17px;
    line-height: 1.25;
    color: var(--ink);
}

.agenda-card-toggle {
    position: relative;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.agenda-card-toggle::before,
.agenda-card-toggle::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 1px;
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: var(--accent-strong);
    transition: transform 0.18s ease;
}

.agenda-card-toggle::after {
    transform: rotate(90deg);
}

.agenda-card[open] .agenda-card-toggle::after {
    transform: rotate(0deg);
}

.agenda-card-body {
    margin: 0 18px 18px;
}

.agenda-vote-card {
    padding-top: 8px;
    border-top: 1px solid rgba(27, 52, 43, 0.08);
}

.agenda-form-actions {
    justify-content: flex-start;
    margin-top: 12px;
}

.line-item-main {
    display: grid;
    grid-template-columns: 2fr 0.9fr 0.9fr 1.1fr;
    gap: 14px;
}

.line-item-name {
    min-width: 0;
}

.delete-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: var(--muted);
}

.table-link {
    color: var(--accent-strong);
    font-weight: 700;
}

.table-link.table-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    gap: 8px;
    min-width: 38px;
    height: 38px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(21, 122, 99, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--accent-strong);
}

.icon-button .button-label,
.table-link.table-link-icon .button-label {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

.table-link.table-link-icon:hover,
.table-link.table-link-icon:focus-visible {
    color: var(--accent);
    background: #fff;
}

.table-number {
    letter-spacing: 0.02em;
}

.table-total {
    font-variant-numeric: tabular-nums;
}

.table-button {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--accent-strong);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.protocol-sign-card {
    margin-top: 24px;
}

.protocol-live-sign-panel {
    display: grid;
    gap: 12px;
}

.protocol-live-flow {
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
    display: grid;
    gap: 6px;
}

.protocol-live-sign-status {
    min-height: 22px;
    font-size: 14px;
    color: var(--muted);
}

.protocol-live-sign-status[data-tone='success'] {
    color: var(--accent-strong);
}

.protocol-live-sign-status[data-tone='error'] {
    color: #9a3124;
}

.protocol-signature-stream {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.protocol-signature-item {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(180px, 0.85fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid rgba(27, 52, 43, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
}

.protocol-signature-item.is-signed {
    border-color: rgba(21, 122, 99, 0.18);
    background: rgba(241, 249, 246, 0.9);
}

.protocol-signature-person,
.protocol-signature-meta {
    min-width: 0;
}

.protocol-signature-person strong,
.protocol-signature-meta strong {
    display: block;
}

.protocol-signature-status {
    color: var(--accent-strong);
}

.protocol-signature-status-pending {
    color: var(--muted);
}

.protocol-signature-actions {
    display: flex;
    justify-content: flex-end;
}

.table-button-danger {
    color: #9a3124;
}

.table-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.table-actions form,
.page-actions form {
    margin: 0;
}

.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.table-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid rgba(29, 107, 82, 0.18);
    border-radius: 999px;
    background: rgba(29, 107, 82, 0.08);
    color: var(--accent-strong);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.table-chip-danger {
    border-color: rgba(154, 49, 36, 0.18);
    background: rgba(154, 49, 36, 0.08);
    color: #9a3124;
}

.table-chip-muted {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.55);
    color: var(--muted);
}

.table-chip-disabled {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.4);
    color: var(--muted);
    cursor: default;
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover td {
    background: rgba(29, 107, 82, 0.05);
}

.row-title {
    font-weight: 700;
}

.row-subline {
    color: var(--muted);
    font-size: 13px;
}

.table-form-wrap {
    overflow-x: auto;
}

.table-form input,
.table-form textarea,
.table-form select {
    min-width: 90px;
}

.table-form textarea {
    min-height: 46px;
    resize: vertical;
}

.table-form-cell-wide {
    min-width: 220px;
}

.table-form-cell-select {
    min-width: 320px;
}

.table-form-cell-qty {
    width: 88px;
    min-width: 88px;
}

.table-form-cell-price {
    width: 108px;
    min-width: 108px;
}

.table-form-cell-total {
    width: 120px;
    min-width: 120px;
}

.table-form-actions {
    min-width: 160px;
}

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

.document-meta div {
    display: grid;
    gap: 8px;
}

.document-meta-compact div {
    gap: 4px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(29, 107, 82, 0.1);
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.status-badge-danger {
    background: rgba(154, 49, 36, 0.1);
    color: #9a3124;
}

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

.is-hidden {
    display: none;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 11px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

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

.auth-card {
    width: min(420px, 100%);
}

.auth-form p {
    display: grid;
    gap: 8px;
    margin: 0 0 14px;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px 12px;
    font: inherit;
    background: var(--panel-strong);
    color: var(--ink);
}

input[type='checkbox'],
input[type='radio'] {
    width: 20px;
    height: 20px;
    padding: 0;
    border-radius: 6px;
    accent-color: var(--accent);
    background: transparent;
    flex: 0 0 auto;
}

input[type='radio'] {
    border-radius: 50%;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-items: end;
}

.filter-grid-check {
    justify-content: end;
}

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

.task-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.95fr);
    gap: 18px;
}

.planner-filter-card {
    margin-bottom: 18px;
}

.planner-filter-card-compact {
    padding: 14px 16px;
}

.planner-filter-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.3fr) repeat(5, minmax(140px, 1fr)) auto auto;
    gap: 12px;
    align-items: center;
}

.planner-filter-row-wide {
    grid-template-columns: minmax(220px, 1.35fr) repeat(5, minmax(135px, 1fr)) auto auto;
}

.planner-filter-row-compact {
    grid-template-columns: minmax(220px, 1.35fr) repeat(5, minmax(124px, 1fr)) auto auto;
    gap: 10px;
}

.planner-filter-row-compact input:not([type='checkbox']),
.planner-filter-row-compact select {
    min-height: 40px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.planner-filter-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.planner-filter-actions .secondary-link {
    min-height: 40px;
    padding: 8px 12px;
}

.page-header-compact {
    margin-bottom: 12px;
}

.page-header-compact .lead {
    margin-top: 8px;
}

.planner-search,
.planner-filter {
    min-width: 0;
}

.planner-checkbox {
    justify-self: start;
}

.planner-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(260px, 1fr));
    gap: 18px;
    align-items: start;
}

.planner-board-wrap {
    overflow-x: auto;
    padding-bottom: 6px;
}

.planner-board-statuses {
    grid-template-columns: 300px repeat(7, minmax(228px, 1fr));
    min-width: 1980px;
    gap: 14px;
}

.planner-column {
    background: transparent;
}

.planner-column-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 16px 16px 0 0;
    color: #fff;
}

.planner-column-head h2 {
    font-size: 18px;
    line-height: 1.15;
}

.planner-column-head span {
    font-weight: 800;
}

.planner-column-head-green {
    background: linear-gradient(135deg, #13b86e 0%, #0c9f61 100%);
}

.planner-column-head-violet {
    background: linear-gradient(135deg, #9e65b9 0%, #8d56a8 100%);
}

.planner-column-head-blue {
    background: linear-gradient(135deg, #4f82c8 0%, #3d71ba 100%);
}

.planner-column-head-teal {
    background: linear-gradient(135deg, #18a99a 0%, #0f998b 100%);
}

.planner-column-head-chronicle {
    background: linear-gradient(135deg, #2f3e54 0%, #1f2b3c 100%);
}

.planner-column-head-sand {
    background: linear-gradient(135deg, #b98a3e 0%, #a9772f 100%);
}

.planner-column-head-slate {
    background: linear-gradient(135deg, #5d708c 0%, #465971 100%);
}

.planner-column-head-rose {
    background: linear-gradient(135deg, #c15f72 0%, #a84b5c 100%);
}

.planner-column-body {
    display: grid;
    gap: 10px;
    min-height: 220px;
    padding: 10px 0 0;
    max-height: calc(100vh - 285px);
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
}

.planner-column-body-chronicle {
    min-height: 320px;
}

.planner-card {
    display: grid;
    gap: 6px;
    padding: 12px 12px 11px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 8px 20px rgba(59, 35, 8, 0.06);
}

.planner-card:hover {
    transform: translateY(-1px);
    border-color: rgba(29, 107, 82, 0.22);
}

.planner-card.is-dragging {
    opacity: 0.72;
    transform: rotate(1.2deg) scale(1.02);
    box-shadow: 0 18px 32px rgba(18, 37, 31, 0.18);
}

.planner-card-task {
    cursor: grab;
    user-select: none;
}

.planner-card-link {
    display: grid;
    gap: 6px;
    color: inherit;
}

.planner-dragging .planner-card-link {
    pointer-events: none;
}

.planner-card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.planner-card-code {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.planner-card-priority {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.planner-card-priority-low {
    background: rgba(29, 107, 82, 0.08);
    color: var(--accent-strong);
}

.planner-card-priority-medium {
    background: rgba(79, 130, 200, 0.12);
    color: #2f5f9f;
}

.planner-card-priority-high {
    background: rgba(185, 138, 62, 0.14);
    color: #8c6223;
}

.planner-card-priority-critical {
    background: rgba(168, 75, 92, 0.14);
    color: #9a3124;
}

.planner-card-meta {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}

.planner-card-assignee {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.35;
}

.planner-card-assignee::before {
    content: '';
    width: 14px;
    height: 14px;
    background: currentColor;
    opacity: 0.7;
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 12a4 4 0 1 0-4-4 4 4 0 0 0 4 4Zm0 2c-4.1 0-7 2.1-7 5v1h14v-1c0-2.9-2.9-5-7-5Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 12a4 4 0 1 0-4-4 4 4 0 0 0 4 4Zm0 2c-4.1 0-7 2.1-7 5v1h14v-1c0-2.9-2.9-5-7-5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.planner-card strong {
    line-height: 1.3;
}

.planner-column-body.is-drop-target {
    padding: 10px 8px 8px;
    border: 1px dashed rgba(21, 122, 99, 0.34);
    border-radius: 16px;
    background: rgba(233, 249, 245, 0.36);
}

.planner-column-chronicle .planner-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
    padding: 10px 10px 9px;
}

.planner-card-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.planner-card-chronicle .planner-card-link {
    min-width: 0;
    gap: 3px;
}

.planner-card-chronicle .planner-card-topline {
    justify-content: flex-start;
}

.planner-card-chronicle .planner-card-topline .planner-card-meta {
    margin-left: auto;
    flex: 0 0 auto;
}

.planner-card-chronicle strong {
    font-size: 14px;
    line-height: 1.25;
}

.planner-card-seen-button {
    width: auto;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
    padding: 0 8px;
    margin-left: 8px;
}

.planner-seen-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.planner-card-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--accent);
}

.planner-card-dot-created {
    background: #13b86e;
}

.planner-card-dot-updated {
    background: #4f82c8;
}

.planner-card-dot-status_changed {
    background: #18a99a;
}

.planner-card-dot-commented {
    background: #9e65b9;
}

.planner-card-dot-files_added {
    background: #b98a3e;
}

.planner-card-dot-checklist {
    background: #c15f72;
}

.planner-empty {
    padding: 14px 12px;
    border: 1px dashed var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.34);
    color: var(--muted);
    font-size: 14px;
}

.task-page-header {
    margin-bottom: 18px;
}

.planner-task-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding: 0 2px;
}

.task-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink);
    font: inherit;
    cursor: pointer;
    box-shadow: none;
}

.task-status-pill-active {
    background: var(--accent);
    border-color: transparent;
    color: #fff;
}

.planfix-task-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 0.95fr);
    gap: 18px;
}

.task-side-panel {
    align-self: start;
    position: sticky;
    top: 24px;
}

.task-description-card,
.checklist-card,
.messenger-card,
.task-side-panel {
    background: rgba(255, 255, 255, 0.94);
}

.task-side-details {
    margin-top: 16px;
}

.task-side-details summary {
    cursor: pointer;
    font-weight: 700;
}

.task-title-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.task-title-menu {
    position: relative;
}

.task-title-menu-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
    box-shadow: none;
    list-style: none;
}

.task-title-menu-trigger::-webkit-details-marker {
    display: none;
}

.task-title-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel-strong);
    box-shadow: var(--shadow);
    z-index: 10;
}

.task-title-menu-item {
    width: 100%;
    justify-content: flex-start;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: none;
}

.task-title-trigger {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: clamp(32px, 4vw, 58px);
    line-height: 1.02;
    text-align: left;
    cursor: pointer;
}

.task-title-trigger:hover {
    color: var(--accent-strong);
}

.task-title-form {
    display: grid;
    gap: 12px;
    max-width: 780px;
    margin-top: 14px;
}

.task-description-form {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.task-description-display {
    position: relative;
}

.task-description-display-editable {
    padding: 12px 14px;
    border: 1px dashed transparent;
    border-radius: 16px;
    cursor: text;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.task-description-display-editable:hover,
.task-description-display-editable:focus {
    border-color: rgba(21, 122, 99, 0.18);
    background: rgba(239, 249, 245, 0.5);
    outline: none;
}

.task-description-edit-hint {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12px;
}

.task-description-display.is-hidden,
.task-title-form.is-hidden,
.task-description-form.is-hidden {
    display: none;
}

.task-title-bar h1 {
    margin: 0;
    font-size: clamp(30px, 3.4vw, 42px);
}

.task-inline-form {
    margin-top: 16px;
}

.task-description p {
    margin: 0;
    line-height: 1.7;
}

.task-rich-text {
    display: grid;
    gap: 10px;
    line-height: 1.65;
}

.task-rich-text p,
.task-rich-text ul,
.task-rich-text blockquote {
    margin: 0;
}

.task-rich-text ul {
    padding-left: 22px;
}

.task-rich-text li + li {
    margin-top: 6px;
}

.task-rich-text blockquote {
    padding: 14px 16px;
    border-left: 4px solid rgba(29, 107, 82, 0.25);
    border-radius: 0 14px 14px 0;
    background: rgba(29, 107, 82, 0.06);
    color: var(--muted);
}

.task-rich-text code {
    padding: 2px 8px;
    border-radius: 8px;
    background: rgba(47, 36, 24, 0.08);
    font-size: 0.95em;
}

.task-rich-text a {
    color: var(--accent-strong);
    font-weight: 700;
}

.task-rich-text .protocol-document {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    font-family: Georgia, "Times New Roman", serif;
    color: #1f1f1f;
}

.task-rich-text .protocol-centered {
    text-align: center;
}

.task-rich-text .protocol-date-line {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin: 18px 0;
}

.task-rich-text .protocol-section {
    margin: 26px 0;
}

.task-rich-text .protocol-agenda-list {
    padding-left: 22px;
}

.task-rich-text .protocol-agenda-list li {
    margin-bottom: 8px;
}

.task-rich-text .protocol-votes {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0 16px;
    table-layout: fixed;
}

.task-rich-text .protocol-votes th,
.task-rich-text .protocol-votes td {
    padding: 8px 10px;
    border: 1.4px solid rgba(27, 52, 43, 0.56);
    vertical-align: top;
}

.task-rich-text .protocol-votes th {
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
    color: inherit;
    background: rgba(246, 248, 247, 0.85);
}

.task-rich-text .protocol-votes td:nth-child(1),
.task-rich-text .protocol-votes th:nth-child(1) {
    width: 7%;
    text-align: center;
}

.task-rich-text .protocol-votes td:nth-child(2),
.task-rich-text .protocol-votes th:nth-child(2) {
    width: 43%;
}

.task-rich-text .protocol-votes td:nth-child(3),
.task-rich-text .protocol-votes th:nth-child(3) {
    width: 25%;
    text-align: center;
}

.task-rich-text .protocol-votes td:nth-child(4),
.task-rich-text .protocol-votes th:nth-child(4) {
    width: 25%;
}

.task-rich-text .protocol-vote-summary p {
    margin-bottom: 4px;
}

.task-rich-text .protocol-signatures {
    margin-top: 42px;
}

.task-rich-text .protocol-signature-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 24px;
}

.task-rich-text .protocol-signature-title {
    max-width: 320px;
}

.task-rich-text .protocol-signature-line {
    min-width: 280px;
    text-align: right;
    white-space: nowrap;
}

.task-subtask-list,
.task-comment-stream,
.attachment-list,
.participant-list,
.meta-list {
    display: grid;
    gap: 12px;
}

.participant-picker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-height: 50px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel-strong);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.participant-picker:focus-within {
    border-color: rgba(29, 107, 82, 0.28);
    box-shadow: 0 0 0 4px rgba(29, 107, 82, 0.08);
}

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

.participant-picker-input {
    min-width: 180px;
    width: auto;
    flex: 1 1 180px;
    border: 0;
    padding: 6px 0;
    background: transparent;
}

.participant-picker-input:focus {
    outline: none;
}

.participant-token {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid rgba(29, 107, 82, 0.18);
    border-radius: 999px;
    background: rgba(29, 107, 82, 0.08);
    color: var(--accent-strong);
    font: inherit;
    cursor: pointer;
}

.participant-token-remove {
    font-size: 18px;
    line-height: 1;
}

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

.participant-inline-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    font-size: 13px;
}

.task-subtask-item {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.48);
}

.task-subtask-item:hover {
    border-color: rgba(29, 107, 82, 0.28);
    background: rgba(29, 107, 82, 0.06);
}

.task-comment-item {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.5);
}

.task-comment-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.checklist-card {
    padding-top: 18px;
    padding-bottom: 16px;
}

.checklist-list {
    display: grid;
    gap: 0;
}

.checklist-item {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 12px;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid rgba(27, 52, 43, 0.08);
    background: transparent;
}

.checklist-item:last-child {
    border-bottom: 0;
}

.checklist-toggle-form {
    margin: 0;
}

.checklist-toggle {
    width: 18px;
    height: 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    padding: 0;
}

.checklist-toggle.is-done {
    border-color: var(--accent);
    background: var(--accent);
}

.checklist-item-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.checklist-item-title {
    font-size: 15px;
}

.checklist-item-actions {
    gap: 6px;
}

.checklist-delete-button {
    min-width: 30px;
    min-height: 30px;
    padding: 0;
    border: 1px solid rgba(27, 52, 43, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--muted);
    box-shadow: none;
    font-size: 18px;
    line-height: 1;
}

.checklist-item-done {
    text-decoration: line-through;
    color: var(--muted);
}

.checklist-create-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(27, 52, 43, 0.08);
}

.checklist-input {
    min-height: 42px;
}

.checklist-add-button {
    min-width: 104px;
}

.checklist-inline-error {
    margin-top: 10px;
}

.task-comment-body {
    line-height: 1.7;
}

.attachment-list {
    grid-template-columns: repeat(auto-fit, minmax(200px, max-content));
}

.attachment-list-column {
    grid-template-columns: 1fr;
}

.attachment-chip,
.participant-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
}

.participant-list {
    grid-template-columns: repeat(auto-fit, minmax(140px, max-content));
}

.meta-list div {
    display: grid;
    gap: 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.meta-list div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.file-input {
    padding: 8px 0;
}

.task-side-details {
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.task-side-details summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0;
    color: var(--accent-strong);
}

.messenger-card {
    padding-bottom: 18px;
}

.messenger-thread {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.message-bubble {
    display: grid;
    gap: 10px;
    max-width: min(100%, 860px);
    padding: 14px 16px;
    border: 1px solid rgba(27, 52, 43, 0.08);
    border-radius: 18px 18px 18px 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 4px 14px rgba(18, 37, 31, 0.04);
}

.message-bubble-own {
    justify-self: end;
    border-color: rgba(21, 122, 99, 0.12);
    border-radius: 18px 18px 8px 18px;
    background: rgba(239, 249, 245, 0.96);
}

.message-bubble-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.messenger-attachments {
    margin-bottom: 16px;
}

.message-composer {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(27, 52, 43, 0.08);
    border-radius: 18px;
    background: rgba(250, 252, 251, 0.98);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.richtext-shell {
    display: grid;
    gap: 12px;
}

.richtext-source,
.richtext-source-input {
    display: none;
}

.richtext-editor {
    min-height: 132px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    line-height: 1.7;
    outline: none;
}

.richtext-editor:focus {
    border-color: rgba(21, 122, 99, 0.28);
    box-shadow: 0 0 0 4px rgba(21, 122, 99, 0.08);
}

.message-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.toolbar-button {
    min-width: 42px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(27, 52, 43, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--ink);
    box-shadow: none;
    font-weight: 800;
}

.toolbar-button:hover {
    box-shadow: 0 8px 20px rgba(59, 35, 8, 0.08);
}

.message-composer-input {
    min-height: 132px;
    padding: 14px 16px;
    border-radius: 16px;
    resize: vertical;
    line-height: 1.7;
}

.message-composer-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.attachment-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--ink);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.attachment-trigger:hover {
    transform: translateY(-1px);
    border-color: rgba(29, 107, 82, 0.2);
    box-shadow: 0 10px 20px rgba(59, 35, 8, 0.08);
}

.message-send-button {
    min-width: 140px;
}

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

.task-context-form {
    gap: 16px;
}

.task-meta-list {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(27, 52, 43, 0.08);
}

.message-composer input[type='file'] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: rgba(29, 107, 82, 0.28);
    box-shadow: 0 0 0 4px rgba(29, 107, 82, 0.08);
}

@media (max-width: 1080px) {
    .landing-stage {
        padding: 24px;
        align-items: start;
    }

    .landing-messages {
        position: static;
        margin-bottom: 18px;
    }

    .landing-login-shell {
        padding: 24px 16px;
    }

    .landing-login-layout {
        grid-template-columns: 1fr;
        gap: 24px;
        align-items: start;
        min-height: auto;
    }

    .landing-hero {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 72px;
    }

    .landing-activation-zone {
        min-height: 360px;
    }

    .landing-emblem {
        width: min(82vw, 420px);
    }

    .landing-power-button {
        right: 50%;
        top: auto;
        bottom: -20px;
        width: 116px;
        height: 116px;
        transform: translateX(50%) scale(1);
    }

    .landing-power-button:hover,
    .landing-power-button-static:hover {
        transform: translateX(50%) scale(1);
    }

    .landing-auth-panel,
    .landing-auth-panel-static {
        position: static;
        width: 100%;
        margin: 0 auto;
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .page-shell {
        grid-template-columns: 1fr;
    }

    .stats-grid,
    .content-grid {
        grid-template-columns: 1fr;
    }

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

    .form-grid,
    .filter-grid,
    .planner-filter-row,
    .line-item-main,
    .org-grid,
    .document-meta,
    .task-detail-layout,
    .task-stats-grid,
    .planner-board,
    .planfix-task-layout,
    .knowledge-layout,
    .knowledge-meta-grid {
        grid-template-columns: 1fr;
    }

    .planner-board-statuses {
        min-width: 0;
    }

    .planner-task-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .task-side-panel {
        position: static;
    }

    .message-composer-footer,
    .message-bubble-head,
    .checklist-create-form {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

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

    .access-switch-grid {
        grid-template-columns: 1fr;
    }

    .password-fields-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .page-shell {
        display: block;
    }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 69;
        background: rgba(18, 37, 31, 0.38);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.18s ease;
    }

.sidebar {
        position: fixed;
        top: 12px;
        left: 12px;
        bottom: 12px;
        z-index: 70;
        width: min(320px, calc(100vw - 24px));
        padding: 18px;
        border-radius: 24px;
        box-shadow: 0 24px 48px rgba(18, 37, 31, 0.2);
        overflow-y: auto;
        transform: translateX(calc(-100% - 24px));
        transition: transform 0.2s ease;
    }

    .sidebar-main {
        flex: initial;
        min-height: auto;
        overflow: visible;
        padding-bottom: 0;
    }

    .sidebar-head {
        align-items: center;
    }

    .sidebar-mobile-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .sidebar-close,
    .app-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        box-shadow: none;
    }

    .sidebar-close {
        width: 40px;
        height: 40px;
        min-width: 40px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.08);
        color: #f2f7f5;
        font-size: 22px;
        line-height: 1;
    }

    .content {
        padding: 18px 14px 24px;
    }

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

    .mobile-topbar {
        position: sticky;
        top: 10px;
        z-index: 20;
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 16px;
        padding: 12px 14px;
        border: 1px solid rgba(27, 52, 43, 0.08);
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.92);
        box-shadow: 0 14px 32px rgba(18, 37, 31, 0.08);
        backdrop-filter: blur(14px);
    }

    .app-nav-toggle {
        flex-direction: column;
        gap: 4px;
        width: 44px;
        height: 44px;
        min-width: 44px;
        border-radius: 14px;
        background: rgba(248, 251, 250, 0.96);
        color: var(--ink);
    }

    .app-nav-toggle span {
        display: block;
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
    }

    .mobile-topbar-brand {
        display: grid;
        gap: 2px;
        min-width: 0;
    }

    .mobile-topbar-brand strong,
    .mobile-topbar-brand small {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-topbar-brand small {
        color: var(--muted);
    }

    .app-shell-menu-open {
        overflow: hidden;
    }

    .app-shell-menu-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .app-shell-menu-open .sidebar {
        transform: translateX(0);
    }

    .card,
    .table-form-wrap {
        overflow-x: auto;
    }

    .data-table {
        min-width: 680px;
    }

    .tabs,
    .page-actions,
    .form-actions,
    .table-actions,
    .inline-actions {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .tabs::-webkit-scrollbar,
    .page-actions::-webkit-scrollbar,
    .form-actions::-webkit-scrollbar,
    .table-actions::-webkit-scrollbar,
    .inline-actions::-webkit-scrollbar {
        display: none;
    }

    .planner-column-body {
        max-height: 420px;
    }

    .diia-sign-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .diia-sign-meta {
        width: 100%;
        justify-content: flex-start;
    }

    .diia-brand-button {
        width: fit-content;
        max-width: min(100%, 180px);
        min-height: 38px;
        padding: 7px 10px;
    }

    .diia-brand-logo {
        height: 22px !important;
        width: 116px !important;
        max-width: 116px !important;
    }

}

.public-body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Manrope', sans-serif;
    color: var(--ink);
    overflow-x: hidden;
    background:
        radial-gradient(circle at top left, rgba(230, 244, 236, 0.86), transparent 24%),
        linear-gradient(180deg, #fcfdfc 0%, #f3f7f5 100%);
}

.public-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 32px;
}

.public-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    padding: 14px 18px;
    border: 1px solid rgba(27, 52, 43, 0.08);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(21, 122, 99, 0.12), rgba(227, 183, 97, 0.12)),
        rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 28px rgba(18, 37, 31, 0.05);
}

.public-alert-content {
    display: grid;
    gap: 6px;
    line-height: 1.6;
}

.public-alert-content p {
    margin: 0;
}

.public-alert-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    font-weight: 700;
}

.public-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 0 24px;
}

.public-brand {
    display: grid;
    gap: 4px;
    min-width: 0;
    color: var(--ink);
}

.public-header-controls {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: 18px;
}

.public-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
    gap: 18px;
    flex-wrap: wrap;
}

.public-nav a,
.public-inline-link {
    color: var(--ink);
    font-weight: 700;
}

.public-nav a[aria-current='page'] {
    color: var(--accent-strong);
}

.public-nav-toggle,
.public-nav-close,
.public-nav-backdrop,
.public-header-panel-head {
    display: none;
}

.public-main {
    display: grid;
    gap: 22px;
}

.public-hero,
.public-cta,
.public-article-shell,
.public-list-card {
    border: 1px solid rgba(27, 52, 43, 0.08);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 40px rgba(18, 37, 31, 0.06);
}

.public-hero-layered {
    position: relative;
    overflow: hidden;
}

.public-hero-layered::before,
.public-hero-layered::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    filter: blur(10px);
    opacity: 0.9;
}

.public-hero-layered::before {
    top: -60px;
    right: -20px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(21, 122, 99, 0.16), transparent 68%);
}

.public-hero-layered::after {
    bottom: -80px;
    left: 10%;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(227, 183, 97, 0.16), transparent 70%);
}

.public-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
    gap: 24px;
    padding: 34px;
}

.public-hero-copy h1,
.public-article-shell h1 {
    margin: 0;
    font-size: clamp(30px, 4.5vw, 56px);
    line-height: 0.98;
}

.public-hero-copy,
.public-hero-panel {
    position: relative;
    z-index: 1;
}

.public-hero-richtext {
    margin-top: 14px;
}

.public-hero-richtext p {
    color: var(--muted);
}

.public-button-row,
.public-header-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.public-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(21, 122, 99, 0.16);
}

.public-button-secondary {
    border: 1px solid rgba(27, 52, 43, 0.1);
    background: rgba(255, 255, 255, 0.88);
    color: var(--ink);
    box-shadow: none;
}

.public-hero-panel {
    display: grid;
    gap: 12px;
}

.public-stat-card,
.public-card {
    display: grid;
    gap: 10px;
    padding: 20px;
    border: 1px solid rgba(27, 52, 43, 0.08);
    border-radius: 22px;
    background: rgba(248, 251, 250, 0.96);
}

.public-stat-card strong {
    font-size: clamp(24px, 3vw, 36px);
}

.public-stat-card-accent {
    background: linear-gradient(180deg, rgba(233, 249, 245, 0.98), rgba(248, 251, 250, 0.96));
}

.public-stat-card-warm {
    background: linear-gradient(180deg, rgba(252, 245, 232, 0.98), rgba(248, 251, 250, 0.96));
}

.public-section {
    display: grid;
    gap: 14px;
}

.public-section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
}

.public-section-kicker {
    color: var(--muted);
    font-size: 14px;
}

.public-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.public-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.public-feature-card {
    display: grid;
    gap: 14px;
    min-height: 220px;
    padding: 22px;
    border: 1px solid rgba(27, 52, 43, 0.08);
    border-radius: 24px;
    box-shadow: 0 14px 36px rgba(18, 37, 31, 0.05);
}

.public-feature-card h3 {
    margin: 0;
    font-size: 24px;
}

.public-feature-card-accent {
    background: linear-gradient(180deg, rgba(234, 249, 244, 0.96), rgba(255, 255, 255, 0.98));
}

.public-feature-card-neutral {
    background: linear-gradient(180deg, rgba(248, 251, 250, 0.98), rgba(255, 255, 255, 0.98));
}

.public-feature-card-warm {
    background: linear-gradient(180deg, rgba(252, 246, 235, 0.96), rgba(255, 255, 255, 0.98));
}

.public-feature-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.public-card {
    color: inherit;
    overflow-wrap: anywhere;
}

.public-news-card {
    min-height: 180px;
}

.public-card p,
.public-list-row p,
.public-cta p,
.public-footer-note,
.public-rich-text p,
.public-rich-text ul,
.public-rich-text blockquote {
    margin: 0;
    line-height: 1.7;
    color: var(--ink);
}

.public-list-card {
    padding: 8px 22px;
}

.public-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(27, 52, 43, 0.08);
    color: inherit;
}

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

.public-list-row span,
.public-meta {
    color: var(--muted);
    font-size: 14px;
}

.public-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 30px;
}

.public-article-shell {
    padding: 30px 34px;
}

.public-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.public-meta-views {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(29, 107, 82, 0.08);
}

.public-rich-text {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.public-page-stream {
    display: grid;
    gap: 18px;
    margin-top: 18px;
}

.public-rich-text ul {
    padding-left: 22px;
}

.public-page-stream > p,
.public-page-stream > ul,
.public-page-stream > blockquote {
    margin: 0;
    line-height: 1.7;
    color: var(--ink);
}

.public-page-stream > ul {
    padding-left: 22px;
}

.public-page-stream > blockquote {
    padding: 14px 16px;
    border-left: 4px solid rgba(29, 107, 82, 0.2);
    border-radius: 0 16px 16px 0;
    background: rgba(29, 107, 82, 0.05);
}

.public-rich-text a,
.public-page-stream a {
    color: var(--accent-strong);
    font-weight: 700;
    text-decoration-line: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.18em;
    text-decoration-color: rgba(21, 122, 99, 0.42);
    word-break: break-word;
}

.public-rich-text a:hover,
.public-rich-text a:focus-visible,
.public-page-stream a:hover,
.public-page-stream a:focus-visible {
    color: var(--accent);
    text-decoration-color: currentColor;
}

.public-rich-text img,
.public-page-stream img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 18px;
}

.public-rich-text table,
.public-page-stream table {
    width: 100%;
    border-collapse: collapse;
}

.public-rich-text th,
.public-rich-text td,
.public-page-stream th,
.public-page-stream td {
    padding: 10px 12px;
    border: 1px solid rgba(27, 52, 43, 0.14);
    vertical-align: top;
}

.public-rich-text figcaption,
.public-page-stream figcaption {
    color: var(--muted);
    font-size: 14px;
    margin-top: 8px;
}

.public-rich-text figure,
.public-page-stream figure {
    margin: 0;
}

.public-rich-text li + li {
    margin-top: 6px;
}

.public-rich-text blockquote {
    padding: 14px 16px;
    border-left: 4px solid rgba(29, 107, 82, 0.2);
    border-radius: 0 16px 16px 0;
    background: rgba(29, 107, 82, 0.05);
}

.public-share-box {
    display: grid;
    gap: 14px;
    margin-top: 28px;
    padding: 18px 20px;
    border: 1px solid rgba(27, 52, 43, 0.08);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(248, 251, 250, 0.98), rgba(255, 255, 255, 0.96));
}

.public-share-box p {
    margin: 6px 0 0;
    color: var(--muted);
}

.public-share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.public-share-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(27, 52, 43, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--ink);
    font-weight: 700;
    box-shadow: none;
    cursor: pointer;
}

.public-share-link:hover,
.public-share-link:focus-visible {
    color: var(--accent-strong);
    border-color: rgba(21, 122, 99, 0.24);
}

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

.public-page-block {
    display: grid;
    gap: 14px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(27, 52, 43, 0.08);
}

.public-page-block:first-of-type {
    margin-top: 18px;
}

.public-board-section {
    display: grid;
    gap: 14px;
}

.public-board-section h3 {
    margin: 0;
    font-size: 18px;
}

.public-board-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.public-board-grid-chair {
    grid-template-columns: minmax(0, 1fr);
}

.public-board-card strong {
    font-size: 18px;
    line-height: 1.3;
}

.public-board-card p {
    margin: 0;
}

.public-page-media-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
    gap: 18px;
    align-items: start;
}

.public-page-image,
.public-gallery-image,
.public-card-media {
    width: 100%;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 16px 34px rgba(18, 37, 31, 0.08);
}

.public-page-image {
    min-height: 280px;
    max-height: 420px;
}

.public-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.public-gallery-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(27, 52, 43, 0.08);
    border-radius: 22px;
    background: rgba(248, 251, 250, 0.96);
}

.public-gallery-image {
    aspect-ratio: 4 / 3;
}

.public-card-media {
    margin-bottom: 2px;
    aspect-ratio: 16 / 10;
}

.public-feed-row {
    align-items: start;
}

.public-list-row-empty,
.public-card-empty {
    color: var(--muted);
}

.public-stat-card-text p {
    color: var(--muted);
}

.cms-quick-grid {
    margin-bottom: 18px;
}

.cms-block-type-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.cms-block-type-list div {
    display: grid;
    gap: 6px;
    padding: 16px;
    border: 1px solid rgba(27, 52, 43, 0.08);
    border-radius: 18px;
    background: rgba(248, 251, 250, 0.82);
}

.cms-block-type-list span {
    color: var(--muted);
    line-height: 1.6;
}

.page-inline-adders {
    margin-top: 18px;
    margin-bottom: 18px;
}

.page-inline-blocks {
    display: grid;
    gap: 16px;
}

.page-inline-block-card {
    padding: 18px;
    border: 1px solid rgba(27, 52, 43, 0.08);
    background: rgba(248, 251, 250, 0.9);
}

.page-inline-block-empty {
    padding: 16px 18px;
    border: 1px dashed rgba(27, 52, 43, 0.14);
    border-radius: 16px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.56);
}

.page-editor-block-panel {
    display: grid;
    gap: 16px;
    margin-top: 24px;
    padding: 20px;
    border: 1px solid rgba(27, 52, 43, 0.08);
    border-radius: 18px;
    background: rgba(248, 251, 250, 0.86);
}

.page-editor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.page-editor-block-list {
    display: grid;
    gap: 12px;
}

.page-editor-block-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(27, 52, 43, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
}

.page-editor-block-copy {
    display: grid;
    gap: 4px;
}

.page-editor-block-copy span {
    color: var(--muted);
    font-size: 14px;
}

.page-editor-block-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.page-editor-block-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 12px;
    border: 1px solid rgba(21, 122, 99, 0.18);
    border-radius: 999px;
    background: rgba(233, 249, 245, 0.92);
    color: var(--accent-strong);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.public-footer {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    padding: 22px 0 0;
    color: var(--muted);
}

.public-footer p {
    margin: 6px 0 0;
}

.public-footer-note p {
    margin: 0;
}

.public-footer-contacts {
    display: grid;
    gap: 8px;
}

@media (max-width: 1080px) {
    .public-hero {
        grid-template-columns: 1fr;
    }

    .public-cta,
    .public-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .public-feature-grid,
    .public-card-grid,
    .public-board-grid,
    .public-contact-grid,
    .public-gallery-grid,
    .cms-block-type-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .public-page-media-grid {
        grid-template-columns: 1fr;
    }

    .public-alert {
        flex-direction: column;
        align-items: stretch;
    }
}

.cms-richtext-shell {
    margin-top: 10px;
}

.cms-richtext-host {
    position: relative;
}

.cms-richtext-editor {
    min-height: 180px;
    background: rgba(255, 255, 255, 0.98);
}

.cms-richtext-host .tox-tinymce {
    border: 1px solid rgba(27, 52, 43, 0.1);
    border-radius: 22px;
    box-shadow: 0 14px 40px rgba(18, 37, 31, 0.06);
}

.cms-richtext-host .tox .tox-editor-header {
    border-bottom: 1px solid rgba(27, 52, 43, 0.08);
    background: linear-gradient(180deg, rgba(248, 251, 250, 0.98), rgba(255, 255, 255, 0.98));
}

.cms-richtext-host .tox .tox-toolbar,
.cms-richtext-host .tox .tox-toolbar__primary,
.cms-richtext-host .tox .tox-toolbar__overflow {
    background: transparent;
}

.cms-richtext-host .tox .tox-edit-area__iframe {
    background: rgba(255, 255, 255, 0.98);
}

.cms-block-drawer {
    position: absolute;
    inset: 18px;
    z-index: 20;
}

.cms-block-drawer[hidden] {
    display: none;
}

.cms-block-drawer__scrim {
    position: absolute;
    inset: 0;
    border-radius: 22px;
    background: rgba(18, 37, 31, 0.18);
    backdrop-filter: blur(3px);
}

.cms-block-drawer__panel {
    position: absolute;
    top: 18px;
    right: 18px;
    width: min(440px, calc(100% - 36px));
    max-height: calc(100% - 36px);
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    gap: 16px;
    padding: 18px;
    border: 1px solid rgba(27, 52, 43, 0.1);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 22px 48px rgba(18, 37, 31, 0.18);
    overflow: hidden;
}

.cms-block-drawer__head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
}

.cms-block-drawer__head p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.cms-block-drawer__close {
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0;
    border-radius: 999px;
    background: rgba(248, 251, 250, 0.98);
    color: var(--ink);
    box-shadow: none;
    font-size: 22px;
    line-height: 1;
}

.cms-block-drawer__tabs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid rgba(27, 52, 43, 0.08);
    border-radius: 999px;
    background: rgba(248, 251, 250, 0.94);
    width: fit-content;
}

.cms-block-drawer__tab {
    min-height: 38px;
    padding: 8px 16px;
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    box-shadow: none;
}

.cms-block-drawer__tab.is-active {
    background: var(--accent);
    color: #fff;
}

.cms-block-drawer__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cms-block-drawer__search {
    min-height: 46px;
}

.cms-block-drawer__body {
    display: grid;
    min-height: 0;
    overflow: hidden;
}

.cms-block-drawer__section {
    display: none;
    gap: 12px;
    min-height: 0;
    max-height: 100%;
}

.cms-block-drawer__section.is-active {
    display: grid;
    align-content: start;
    overflow-y: auto;
    padding-right: 4px;
}

.cms-block-card {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(27, 52, 43, 0.08);
    border-radius: 18px;
    background: rgba(248, 251, 250, 0.92);
}

.cms-block-card__copy {
    display: grid;
    gap: 5px;
}

.cms-block-card__copy span,
.cms-block-card__copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.cms-block-card__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 780px) {
    .public-shell {
        width: min(100%, calc(100% - 20px));
        padding-top: 10px;
        padding-bottom: 24px;
    }

    .public-alert {
        padding: 12px 14px;
        border-radius: 16px;
    }

    .public-alert-link {
        width: 100%;
    }

    .public-header {
        position: sticky;
        top: 8px;
        z-index: 40;
        overflow: visible;
        isolation: isolate;
        margin-bottom: 4px;
        padding: 12px 14px;
        border: 1px solid rgba(27, 52, 43, 0.08);
        border-radius: 22px;
        background: rgba(255, 255, 255, 0.9);
        box-shadow: 0 14px 36px rgba(18, 37, 31, 0.08);
        backdrop-filter: blur(14px);
    }

    .public-brand {
        flex: 1;
    }

    .public-brand strong {
        font-size: 17px;
        line-height: 1.2;
    }

    .public-brand small {
        font-size: 12px;
        line-height: 1.45;
    }

    .public-nav-toggle {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        width: 46px;
        height: 46px;
        min-width: 46px;
        padding: 0;
        border: 1px solid rgba(27, 52, 43, 0.1);
        border-radius: 16px;
        background: rgba(248, 251, 250, 0.96);
        color: var(--ink);
        box-shadow: none;
    }

    .public-nav-toggle span {
        display: block;
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        transition: transform 0.18s ease, opacity 0.18s ease;
    }

    .public-nav-backdrop {
        display: none;
    }

    .public-header-controls {
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        z-index: 45;
        width: auto;
        max-height: min(72vh, calc(100vh - 96px));
        display: grid;
        align-content: start;
        align-items: start;
        grid-auto-rows: max-content;
        gap: 18px;
        padding: 18px;
        border: 1px solid rgba(27, 52, 43, 0.08);
        border-radius: 24px;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 24px 48px rgba(18, 37, 31, 0.16);
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    }

    .public-header-panel-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
    }

    .public-nav-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        min-width: 40px;
        padding: 0;
        border-radius: 999px;
        background: rgba(248, 251, 250, 0.98);
        color: var(--ink);
        box-shadow: none;
        font-size: 22px;
        line-height: 1;
    }

    .public-nav {
        display: grid;
        gap: 8px;
        justify-content: stretch;
        flex: none;
    }

    .public-nav a {
        display: flex;
        align-items: center;
        min-height: 48px;
        padding: 0 14px;
        border: 1px solid rgba(27, 52, 43, 0.08);
        border-radius: 14px;
        background: rgba(248, 251, 250, 0.96);
    }

    .public-header-actions {
        display: grid;
        gap: 10px;
    }

    .public-header-actions .public-button {
        width: 100%;
    }

    .public-menu-open {
        overflow: hidden;
    }

    .public-menu-open .public-header-controls {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .public-main {
        gap: 16px;
    }

    .public-hero,
    .public-cta,
    .public-article-shell,
    .public-list-card {
        border-radius: 22px;
    }

    .public-hero {
        gap: 18px;
        padding: 22px 18px;
    }

    .public-hero-copy h1,
    .public-article-shell h1 {
        font-size: clamp(32px, 12vw, 46px);
        line-height: 1;
    }

    .public-button-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .public-button-row .public-button {
        width: 100%;
    }

    .public-stat-card,
    .public-card,
    .public-feature-card,
    .public-gallery-card {
        padding: 16px;
        border-radius: 18px;
    }

    .public-feature-card {
        min-height: 0;
    }

    .public-section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .public-article-shell {
        padding: 22px 18px;
    }

    .public-list-card {
        padding: 6px 16px;
    }

    .public-list-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .public-card-grid,
    .public-feature-grid,
    .public-board-grid,
    .public-contact-grid,
    .public-gallery-grid,
    .cms-block-type-list {
        grid-template-columns: 1fr;
    }

    .public-page-media-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .public-page-image {
        min-height: 0;
    }

    .public-page-block {
        margin-top: 18px;
        padding-top: 18px;
    }

    .public-page-stream {
        gap: 14px;
    }

    .public-rich-text table,
    .public-page-stream table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .filter-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .filter-chips::-webkit-scrollbar {
        display: none;
    }

    .page-editor-block-row {
        flex-direction: column;
        align-items: stretch;
    }

    .page-editor-block-actions {
        justify-content: flex-start;
    }

    .protocol-signature-item {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .protocol-signature-actions {
        justify-content: start;
    }

    .protocol-live-key-grid {
        grid-template-columns: 1fr;
    }

    .cms-block-drawer {
        inset: 12px;
    }

    .cms-block-drawer__panel {
        top: 0;
        right: 0;
        width: 100%;
        max-height: 100%;
    }

    .cms-block-drawer__toolbar {
        flex-direction: column;
        align-items: stretch;
    }
}
