.desktop-window {
    position: absolute;
    display: none;
    width: min(680px, calc(100% - 8rem));
    min-width: 360px;
    min-height: 260px;
    max-height: 72vh;
    overflow: hidden;
    background: var(--panel);
    border: 2px solid #315c62;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.desktop-window.is-open {
    display: flex;
    flex-direction: column;
}

.desktop-window.is-active {
    border-color: #082e33;
    box-shadow: 0 24px 65px rgba(0, 20, 24, .32);
}

.window-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    min-height: 42px;
    padding: .45rem .55rem .45rem .8rem;
    color: #fff;
    background: linear-gradient(90deg, #083f45, #0e6d73);
    border-bottom: 2px solid #315c62;
    cursor: move;
    user-select: none;
}

.window-titlebar h2 {
    margin: 0;
    font-size: .98rem;
}

.window-actions {
    display: flex;
    gap: .35rem;
}

.window-button {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 30px;
    color: #0c2428;
    background: #eef7f8;
    border: 1px solid #123f45;
    border-radius: 4px;
    font-weight: 900;
    cursor: pointer;
}

.window-button:hover {
    background: #fff7d8;
}

.window-button-close:hover {
    color: #fff;
    background: var(--danger);
}

.window-content {
    flex: 1;
    padding: 1rem;
    overflow: auto;
}

.window-resize-handle {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 22px;
    height: 22px;
    padding: 0;
    background:
        linear-gradient(135deg, transparent 0 45%, #315c62 45% 55%, transparent 55%),
        linear-gradient(135deg, transparent 0 62%, #315c62 62% 72%, transparent 72%);
    border: 0;
    cursor: nwse-resize;
}

.window-resize-handle:focus-visible {
    outline-offset: -3px;
}

.window-about {
    top: 0;
    left: 0;
}

.window-blog {
    top: 1rem;
    left: 3vw;
}

.window-post {
    top: 2.4rem;
    left: 6vw;
}

.window-documents {
    top: 1.35rem;
    left: 9vw;
}

.window-contact {
    top: .75rem;
    left: 12vw;
}

.window-trash {
    top: 2.1rem;
    left: 15vw;
}

.window-section {
    margin-bottom: 1rem;
}

.info-grid,
.service-list,
.project-grid,
.split-content,
.contact-layout {
    display: grid;
    gap: .9rem;
}

.info-grid,
.split-content,
.contact-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-grid article,
.service-item,
.project-card,
.split-content section,
.contact-card,
.document-list li {
    padding: .85rem;
    background: #fff;
    border: 1px solid #c6d8dc;
    border-radius: 6px;
}

.info-grid article:nth-child(3):last-child {
    grid-column: 1 / -1;
}

.project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card p {
    font-size: .93rem;
}

.project-card p + p {
    margin-top: .5rem;
}

.survey-feedback {
    margin-bottom: .85rem;
    padding: .65rem .75rem;
    background: #fff7d8;
    border: 1px solid #e1bc4f;
    border-radius: 6px;
    font-weight: 800;
}

.survey-step-label {
    margin-bottom: .25rem;
    color: var(--muted);
    font-size: .85rem;
    font-weight: 800;
    text-transform: uppercase;
}

.survey-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: 1rem;
}

.survey-actions button {
    min-width: 90px;
}

.survey-result p {
    margin-bottom: 1rem;
}

.survey-result-message {
    font-size: 1.05rem;
    font-weight: 800;
}

.survey-result h4 {
    margin: 1rem 0 .45rem;
}

.survey-list {
    display: grid;
    gap: .35rem;
    margin: .45rem 0 .8rem;
    padding-left: 1.1rem;
}

.document-list {
    display: grid;
    gap: .55rem;
    padding: 0;
    list-style: none;
}

.document-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.document-list small {
    color: var(--muted);
}

.folder-path {
    margin-bottom: .85rem;
    padding: .55rem .7rem;
    color: #24454a;
    background: #fff;
    border: 1px inset #c6d8dc;
    border-radius: 4px;
    font-family: Consolas, "Courier New", monospace;
    font-size: .9rem;
    overflow-wrap: anywhere;
}

.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: .75rem;
    margin-bottom: 1rem;
}

.folder-item {
    display: grid;
    align-content: start;
    justify-items: center;
    gap: .3rem;
    min-height: 122px;
    padding: .75rem .45rem;
    color: var(--ink);
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 6px;
}

.folder-item:hover,
.folder-item:focus-visible {
    background: #dce9eb;
    border-color: #9fb7bd;
}

.folder-item span {
    font-weight: 800;
    overflow-wrap: anywhere;
}

.contact-form input,
.contact-form textarea,
.newsletter-form input,
.math-challenge input {
    width: 100%;
    padding: .7rem;
    border: 1px solid #8aa5ab;
    border-radius: 5px;
    background: #fff;
}

.contact-form textarea {
    resize: vertical;
}

.contact-card {
    font-style: normal;
}

.newsletter-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem;
}

.newsletter-form {
    display: grid;
    align-content: start;
    gap: .65rem;
}

.newsletter-subscribe-column {
    align-content: start;
    display: grid;
    gap: .65rem;
}

.newsletter-form label {
    font-weight: 800;
}

.newsletter-consent {
    align-items: flex-start;
    display: grid;
    gap: .55rem;
    grid-template-columns: auto 1fr;
    line-height: 1.45;
}

.newsletter-form .newsletter-consent input {
    margin-top: .2rem;
    width: auto;
}

.newsletter-consent span {
    font-weight: 400;
}

.newsletter-privacy-note {
    color: #526a70;
    font-size: .9rem;
    line-height: 1.45;
    margin: 0;
}

.contact-reveal h3 {
    margin-bottom: .45rem;
}

.contact-reveal-wide {
    max-width: 760px;
}

.math-challenge {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: .8rem;
}

.math-challenge label {
    display: grid;
    gap: .25rem;
    font-weight: 800;
}

.math-challenge input {
    width: 110px;
}

.contact-data-list {
    display: grid;
    gap: .55rem;
    margin: .9rem 0 0;
}

.contact-data-row {
    display: grid;
    grid-template-columns: minmax(110px, .7fr) minmax(0, 1fr);
    gap: .65rem;
    align-items: center;
    padding: .65rem;
    background: #f6fbfb;
    border: 1px solid #c6d8dc;
    border-radius: 6px;
}

.contact-data-row dt {
    font-weight: 800;
}

.contact-data-row dd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
    min-width: 0;
    margin: 0;
}

.contact-data-value {
    min-height: 1.5em;
    overflow-wrap: anywhere;
}

.reveal-button {
    flex: 0 0 auto;
    min-height: 36px;
    padding: .45rem .65rem;
}

.form-message {
    margin-bottom: .9rem;
    padding: .8rem;
    background: #fff7d8;
    border: 1px solid #e1bc4f;
    border-radius: 6px;
}

.contact-reveal-message {
    margin-top: .75rem;
    margin-bottom: 0;
}

.mikrotik-toolbar {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.mikrotik-toolbar p {
    margin: 0;
}

.mikrotik-script-list {
    display: grid;
    gap: 1rem;
}

.mikrotik-script summary {
    cursor: pointer;
    display: grid;
    gap: .55rem;
    list-style: none;
}

.mikrotik-script summary::-webkit-details-marker {
    display: none;
}

.mikrotik-script summary::after {
    color: #0e8f7f;
    content: "Pokaż kod";
    font-size: .88rem;
    font-weight: 700;
}

.mikrotik-script[open] summary {
    margin-bottom: .75rem;
}

.mikrotik-script[open] summary::after {
    content: "Ukryj kod";
}

.mikrotik-script summary span {
    color: #12343b;
    font-size: calc(1.08rem + 2pt);
    font-weight: 700;
    line-height: 1.25;
}

.mikrotik-script summary small {
    color: #526a70;
    font-size: .92rem;
    line-height: 1.45;
}

.mikrotik-script textarea {
    background: #101820;
    border: 1px solid rgba(18, 52, 59, .22);
    border-radius: 6px;
    color: #f7f3df;
    font-family: "Courier New", monospace;
    font-size: .92rem;
    line-height: 1.5;
    min-height: 260px;
    padding: 1rem;
    resize: vertical;
    width: 100%;
}
