/* Hello from offical theme of WUSY - The Web Ui System!  */

:root {

    --font-titles:   "Tomorrow", sans-serif;
    --font-subheads: "Tomorrow", sans-serif;
    --font-threads:  "Tomorrow", sans-serif;
    --font-texts:    "Tomorrow", sans-serif;
    --font-codes:    monospace, sans-serif;


    --text-page-title:    clamp(2.625rem, 7vw, 5rem);
    --text-article-title: clamp(1.875rem, 4vw, 3.25rem);
    --text-section-title: clamp(1.25rem, 2.2vw, 1.75rem);
    --text-lead:          clamp(1.125rem, calc(1rem + .35vw), 1.375rem);
    --text-standard:      clamp(0.73rem, calc(.775rem + .25vw), .95rem);
    --text-interface:     clamp(.68rem, calc(.8125rem + .2vw), 1rem);
    --text-caption:       clamp(.68rem, calc(.6875rem + .2vw), .875rem);
    --text-footer-title:  clamp(.75rem, calc(.8125rem + .2vw), 1rem);

    --line-display: 1;
    --line-reading: 1.95;

    --tracking-display: -0.015em;
    --tracking-reading: 0.070em;

    /* --- */

    --tone-marker:  from #A6FF28 r g b;
    --tone-accent:  from #A6FF28 r g b;

    --tone-titles:  from #EAF0E5 r g b;
    --tone-subheads:from #b4b4b4 r g b;
    --tone-threads: from #c7c7c7 r g b;
    --tone-text:    from #EAF0E5 r g b;
    --tone-codes:   from #646464 r g b;

    --tone-warning: from #ffd700 r g b;
    --tone-error:   from #b22222 r g b;
    --tone-success: from #90ee90 r g b;
    --tone-info:    from #00ced1 r g b;

    --tone-white:   from #ffffff r g b;
    --tone-light:   from #EAF0E5 r g b;
    --tone-gray:    from #36403e r g b;
    --tone-dark:    from #161c1b r g b;
    --tone-black:   from #0d1011 r g b;

    --opacity-full:  100%;
    --opacity-max:   75%;
    --opacity-mid:   25%;
    --opacity-min:   5%;
    --opacity-zero:  0%;

    /* --- */

    --outborder-size: 3px;
    --innerborder-size: 1px;

    /* --- */
    
    --space-maxi:   clamp(72px, 10vw, 95px);
    --space-huge:   clamp(40px, 10vw, 60px);
    --space-big:    clamp(25px, 5vw, 35px);
    --space-medium: clamp(15px, 1vw, 18px);
    --space-small:  clamp(12px, .5vw, 16px);
    --space-micro:  clamp(2px, .5vw, 5px);

    /* --- */

    --base-speed:   0.25s;
    --base-radius:  5px;
    --base-blur:    5px

    /* EXTENSION */
    /* Nothing to say here... */

}

/* // layouts   */

@layer layouts {


    div-scroll{
        max-height: 100vh;
    }
    /* body::before {
        content: "";
        position: absolute;
        width: 100vw;
        inset: 0;
        z-index: -1;
        pointer-events: none;
        background-repeat: no-repeat;
        background-position: top center;
        background-size: 100% auto;
        background-image: url(../../trianglebkg.svg);
        display: block;
    } */

    html {
        box-shadow: inset 200px -200px 1000px black;
        background: 
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150%25' height='50%25'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%25' filter='url(%23noise)' opacity='0.075'/%3E%3C/svg%3E"),
            rgb( var( --tone-black ) );
    }

    html::before{
        content: '';
        display: block;
        width: 950px;
        max-width: 100%;
        height: 135px;
        background: radial-gradient(ellipse at center -30%, rgb(202 255 151) 0% 5%, rgb(70 95 48 / 69%) 50% 40%, color(srgb 0 0 0) 80% 90%);
        position: absolute;
        top: 0%;
        left: 50%;
        transform: translateX(-50%);
        mix-blend-mode: exclusion;
        opacity: 75%;
        z-index: -1;
    }

    body {
        min-height: 100%;
    }

    body-mainframe {
        z-index: 1000;
        flex-direction: column;
        min-height: 100%;
    }

    @media only screen {

        @media (max-width: 768px) {

            body:not(:has([name=home])) body-mainframe {
                padding-top: 70px;
            }

        }
    }

}

@layer theme {

    /* 
    //  document foundations 
    */

    /* document and main frame */

    * {
        font-family: var(--font-texts);
        font-size: var( --text-standard );
        font-weight: 300;
        color: rgb( var( --tone-text ) );
        line-height: var( --line-reading );
        letter-spacing: var( --tracking-reading );
    }

    button,
    input,
    select,
    textarea,
    label,
    button-item {
        font-size: var( --text-interface );
        line-height: var( --line-display );
    }

    /* typography and text contents */


    h1,h2,h3,h4,h5,h6 {
        font-family: var( --font-titles );
        letter-spacing: var( --tracking-display );
        width: 100%;
    }

    h1,h1>* {
        font-size: var( --text-page-title );
        line-height: var( --line-display );
        font-weight: bold;
    }

    h2,h2>* {
        font-size: var( --text-article-title );
        line-height: var( --line-display );
        margin-bottom:  calc( var( --space-huge ) / 2 );
        position: relative;
    }

    h3,h3>*,
    h4,h4>* {
        font-size: var( --text-section-title );
        line-height: var( --line-display );
        font-weight: bold;
        margin-bottom:  calc( var( --text-section-title ) / 2 );
    }
    h5,h5>*,
    h6,h6>* {
        font-size: var( --text-standard );
        line-height: var( --line-display );
        font-weight: bold;
    }

    hgroup{
        border-left: 4px solid rgb(var(--tone-accent));
        padding-left: var(--space-medium);
    }

    hgroup > p {
        font-size: var( --text-lead );
        line-height: var( --line-reading );
    }

    footer :is(h1,h2,h3,h4,h5,h6) {
        font-size: var( --text-footer-title );
        line-height: var( --line-display );
    }

    /* header+*,
    hgroup+*{
        margin-top: var(--space-big);
    } */

    h1+*:not( :first-child, hr, :is(div-audioplayer, div-videoplayer) > div-container * ),
    h2+*:not( :first-child, hr, :is(div-audioplayer, div-videoplayer) > div-container * ),
    h3+*:not( :first-child, hr, :is(div-audioplayer, div-videoplayer) > div-container * ),
    h4+*:not( :first-child, hr, :is(div-audioplayer, div-videoplayer) > div-container * ),
    h5+*:not( :first-child, hr, :is(div-audioplayer, div-videoplayer) > div-container * ),
    h6+*:not( :first-child, hr, :is(div-audioplayer, div-videoplayer) > div-container * ),
    div-list[mode=disc]+*:not(hr),
    div-list[mode=dash]+*:not(hr),
    div-taglist+*:not(hr),
    pre+*:not( :first-child, hr),
    p+*:not( :first-child, hr, :is(div-audioplayer, div-videoplayer) > div-container * ),
    *+div-panel, div-panel+* {
        margin-top: var(--space-medium);
    }

    div-list[mode=dash],
    div-list[mode=disc] {
        padding: var(--space-medium);
    }
    div-list[mode=dash] li,
    div-list[mode=disc] li{
        margin-top: var(--space-medium);
    }

    b {
        font-weight: bold;
    }

    mark{
        position: relative;
        background: rgb(var(--tone-marker));
        padding-left: 3px;
        padding-right: 3px;
    }
    mark:before,
    mark:after {
        content: " ";
        display: block;
        position: absolute;
        transform: skew(-0.2rad);
        width: 8px;
        height: 99%;
        background: inherit;
    }
    mark:before {
        left: -3px;
    }
    mark:after {
        right: -3px;
    }


    blockquote {
        padding: var(--space-big);
        border-left: var(--outborder-size) solid rgb(var(--tone-accent));
        border-radius: var(--base-radius);
        background: rgb(var(--tone-light));
    }

    q {
        padding: 0 var(--space-micro);
        border-bottom: var(--innerborder-size) solid rgb(var(--tone-accent));
        border-radius: var(--base-radius);
        background: rgb(var(--tone-marker) / var(--opacity-min));
    }

    header+section,
    section+section {
        margin-top: var(--space-huge);
        padding-top: var(--space-huge);
        border-top: 3px dashed rgb(var(--tone-gray));
    }

    hr {
        margin-top: var(--space-huge);
        margin-bottom: var(--space-huge);
        border-top: 1px dashed rgb( var(--tone-white) / var(--opacity-mid) );
        background:transparent
    }

    a:not( div-tag>a, article-index a, button-item a ) {
        background: transparent;
        font-weight: 700;
        padding: var(--space-micro);
        margin: calc( var(--space-micro) *-1 ) ;
        border-radius: calc( var(--base-radius) / 3 );
    }
    a:not( div-tag>a, article-index a ):hover,
    a:not( div-tag>a, article-index a ):focus {
        background: rgb( var( --tone-accent ) );
        color: rgb( var( --tone-black ) );
    }
 
    caption,
    figcaption,
    small {
        font-size: var( --text-caption );
        line-height: var( --line-reading );
    }

    caption,
    figcaption {
        padding: var(--space-small);
        text-align: center;
    }

    sup, sub {
        font-size: .75em;
        line-height: 0;
    }

    kbd,samp {
        font-weight: inherit;
        padding: calc(var(--space-micro)/4) var(--space-micro);
        margin: calc( (var(--space-micro)/4) *-1) calc( var(--space-micro) *-1 ) ;
        border-width: 0;
        border-radius: var(--base-radius);
        font-family: var(--font-codes);
        background-color: rgb(var(--tone-gray));
        margin: 0 3px;
        letter-spacing: 2px;
    }

    pre,code:not(pre>code) {
        padding: var(--space-medium);
        border-radius: calc( var(--base-radius) * 2) ;
        border: 1px solid rgb(var(--tone-gray) );
        font-family: var(--font-codes);
        background: rgb(var(--tone-dark));
        letter-spacing: 2px;
    }

    /* description lists and tables */

    dl {
        background: rgb( var( --tone-light ) );
        border-radius: calc( var(--base-radius) * 2 );
        border: 1px solid rgb(var(--tone-gray) );
    }

    dl,dt,dd {
        padding: var(--space-small);
    }

    dt {
        font-weight: bold;
        border-right: 1px dashed rgb( var( --tone-dark ) );
    }

    dt:not(dt:first-child), dd:not(:nth-child(2)) {
        border-top: 1px dashed rgb( var( --tone-dark ) );
    }

    table{
        border-radius: calc( var(--base-radius) * 2);
        background: rgb(var(--tone-light) );
        box-shadow: inset 0 0 0 2px rgb(var(--tone-gray) );
        overflow: hidden;
    }
    th {
        font-weight: bold;
        background: rgb(var(--tone-gray) );
        border-right: 1px solid rgb(var(--tone-light));
        border-left: 0;
        border-top: 0;
    }
    tr,td {
        border-left: 1px solid rgb(var(--tone-gray) );
        border-bottom: 1px solid rgb(var(--tone-gray) );
    }
    td {
        min-width: 100px;
        text-align: center;
    }

    /* articles and article index */

    article-index ol:first-child{
        position: relative;
    }

    article-index ol ol,
    article-index li {
        gap: var(--space-micro);
        position: static;
    }

    article-index a {
        line-height: var(--line-reading);
        font-size: calc(var(--text-standard) / 1.2);
        font-weight: 200;
        background-color: transparent;
        padding: unset;
        position: static;
        padding-left: var(--space-micro);
    }

    article-index a.--active {
        font-weight: 700;
        color: rgb( var( --tone-white ) );
    }

    article-index a.--active::before {
        content: ' ';
        position: absolute;
        left: 0;
        height: 20px;
        border-left: 3px solid rgb( var(--tone-accent) );
        background: rgba( var( --tone-dark ) / var(--opacity-max) )
    }

    /* nav flaps */

    nav[axis],
    div-flap {
        background: rgb( var(--tone-light) );
        border: 1px solid rgb( var( --tone-gray ) );
    }

    nav[axis] {
        border-radius: cacl( var(--base-radius) * 2 );
    }

    div-flap[side]{
        padding: var(--space-big);
    }

    div-flap[side=bottom]{
        border-end-end-radius: cacl( var(--base-radius) * 2 );
    }

    nav[axis] li>a {
        border-radius: 0;
        justify-content: center;
        padding: var(--space-medium);
    }

    div-flap[extend="narrow"]::before {
        position: absolute;
        font-size: .75em;
        line-height: var(--line-display);
    }

    div-flap[side="top"][extend="narrow"] {
        margin-bottom: var(--space-small);
    }

    div-flap[side="top"][extend="narrow"]::before {
        content: '▼';
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
    }

    div-flap[side="bottom"][extend="narrow"] {
        margin-top: var(--space-small);
    }

    div-flap[side="bottom"][extend="narrow"]::before {
        content: '▲';
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
    }

    div-flap[side="left"][extend="narrow"] {
        margin-right: var(--space-small);
    }

    div-flap[side="left"][extend="narrow"]::before {
        content: '▶';
        top: 50%;
        left: 100%;
        transform: translateY(-50%);
    }

    div-flap[side="right"][extend="narrow"] {
        margin-left: var(--space-small);
    }

    div-flap[side="right"][extend="narrow"]::before {
        content: '◀';
        top: 50%;
        right: 100%;
        transform: translateY(-50%);
    }

    /* 
    //  feedback and overlays 
    */

    /* overlay */

    body-overlay {
        background-color: rgb(var(--tone-black) / 0% );
        transition: background-color .25s ease-out, z-index 0s linear .5s;
    }

    body:has(
        div-modal:popover-open,
        dialog[open]
    )   body-overlay,
        body-overlay.--active {
        background-color: rgb(var(--tone-black) / var(--opacity-max) );
        transition: background-color .25s ease-in, z-index 0s linear 0s;
    }

    /* optional modal page effects

    body:has(div-modal[side="center"][popover])>body-mainframe {
        transform: scale(100%);
        transition: transform var(--base-speed) ease;
    }
    body:has(div-modal[side="left"][popover])>body-mainframe {
        transform: translateX(0%);
        transition: transform var(--base-speed) ease;
    }
    body:has(div-modal[side="top"][popover])>body-mainframe {
        transform: translateY(0%);
        transition: transform var(--base-speed) ease;
    }
    body:has(div-modal[side="right"][popover])>body-mainframe {
        transform: translateX(0%);
        transition: transform var(--base-speed) ease;
    }
    body:has(div-modal[side="bottom"][popover])>body-mainframe {
        transform: translateY(0%);
        transition: transform var(--base-speed) ease;
    }
    body:has(div-modal[side="center"][popover]:popover-open)>body-mainframe {
        transform: scale(105%);
        transition: transform var(--base-speed) ease;
    }
    body:has(div-modal[side="left"][popover]:popover-open)>body-mainframe {
        transform: translateX(10%);
        transition: transform var(--base-speed) ease;
    }
    body:has(div-modal[side="top"][popover]:popover-open)>body-mainframe {
        transform: translateY(10%);
        transition: transform var(--base-speed) ease;
    }
    body:has(div-modal[side="right"][popover]:popover-open)>body-mainframe {
        transform: translateX(-10%);
        transition: transform var(--base-speed) ease;
    }
    body:has(div-modal[side="bottom"][popover]:popover-open)>body-mainframe {
        transform: translateY(-10%);
        transition: transform var(--base-speed) ease;
    }
    */

    /* panels */

    div-panel {
        border-radius: calc( var(--base-radius) * 3);
        border: 3px solid;
    }
    div-panel:not([type]),
    div-panel[type=message] {
        border-color: rgb(var( --tone-dark ) / var(--opacity-max) );
        background: rgb( var( --tone-dark ) / var(--opacity-min) );
    }

    div-panel[type] {
        border-color: rgb(var(--panel-tone) / var(--opacity-mid) );

        background:
            linear-gradient(
                rgb(var(--panel-tone) / var(--opacity-min)),
                rgb(var(--panel-back) / var(--opacity-min))
            ),
            rgb(var(--tone-black));
    }

    div-panel[type]:not(&>div-header) {
        padding: 20px;
    }

    div-panel[type=error] {
        --panel-tone: var(--tone-error);
    }

    div-panel[type=warning] {
        --panel-tone: var(--tone-warning);
    }

    div-panel[type=info] {
        --panel-tone: var(--tone-info);
    }

    div-panel[type=success] {
        --panel-tone: var(--tone-success);
    }

    div-panel>div-headbar{
        font-size: var(--text-lead);
        font-weight: bold;
        border-bottom-width: 2px;
    }

    div-panel>div-headbar,
    div-panel>div-contents {
        padding: var(--space-medium);
    }
    div-panel>div-statusbar{
        border-top-width: 2px;
        padding: var(--space-micro) var(--space-small) ;
        font-size: var(--text-caption);
    }

    /* progress and load bars */

    div-progressor {
        border: 1px solid rgb(var(--tone-gray));
        padding: var(--space-micro);
        border-radius: calc( var(--base-radius) * 2 );
    }

    div-progressor label {
        padding: var(--space-micro) var(--space-medium);
        font-weight: bolder;
        min-width: 18%;
    }

    div-loadbar {
        border-radius: var(--base-radius);
    }

    /* modals */

    :is( div-modal )[popover] {
        background: rgb( var( --tone-dark ) );
        transition: transform var(--base-speed) ease-in-out,
                    opacity var(--base-speed) ease-in-out,
                    display var(--base-speed) allow-discrete,
                    overlay var(--base-speed) allow-discrete;
    }


    div-modal[side=center]{
        border: 3px solid rgb(var(--tone-dark) / var(--opacity-mid));
        box-shadow: 0 20px 30px rgb( var(--tone-dark) );
        border-radius: calc(var(--base-radius) * 3);
        padding: var(--space-medium);
    }

        div-modal[side=center] [popovertargetaction=hide] {
            position: absolute;
            background: rgb(var(--tone-dark) / var(--opacity-mid));
            top: -2px;
            right: 0px;
            border-radius: 5px;
            font-size: 0;
            line-height: 0;
        }
        div-modal[side=center] [popovertargetaction=hide]::after{
            content: "🗙";
            color: rgb(var(--tone-black));
            display: block;
            line-height: 15px;
            width: 15px;
            font-size: 15px;
            padding: 5px;
        }

    div-modal[side=top]{
        border-bottom: 3px solid rgb(var(--tone-dark) / var(--opacity-mid));
        box-shadow: 0 0 100px 100px rgb( var(--tone-black) );
        padding: var(--space-big);
    }

        div-modal[side=top] [popovertargetaction=hide] {
            position: absolute;
            background: rgb(var(--tone-dark) / var(--opacity-mid));
            bottom: 0;
            left: 50%;
            padding: 0 10px;
            border-radius: 5px 5px 0 0;
            transform: translateX(-50%);
        }

    div-modal[side=right]{
        border-left: 3px solid rgb(var(--tone-dark) / var(--opacity-mid));
        box-shadow: 0 0 100px 100px rgb( var(--tone-black) );
        padding: var(--space-big);
    }

        div-modal[side=right] [popovertargetaction=hide] {
            position: absolute;
            background: rgb(var(--tone-dark) / var(--opacity-mid));
            left: -20px;
            top: var(--space-big);
            padding: 0 10px;
            border-radius: 5px;
            transform: rotate(90deg);
        }

    div-modal[side=bottom]{
        border-top: 3px solid rgb(var(--tone-dark) / var(--opacity-mid));
        box-shadow: 0 0 100px 100px rgb( var(--tone-black) );
        padding: var(--space-big);
    }

        div-modal[side=bottom] [popovertargetaction=hide] {
            position: absolute;
            background: rgb(var(--tone-dark) / var(--opacity-mid));
            top: 0;
            left: 50%;
            padding: 0 10px;
            border-radius: 0 0 5px 5px;
        }

    div-modal[side=left]{
        border-right: 3px solid rgb(var(--tone-dark) / var(--opacity-mid));
        box-shadow: 0 0 100px 100px rgb( var(--tone-black) );
        padding: var(--space-big);
    }

        div-modal[side=left] [popovertargetaction=hide] {
            position: absolute;
            background: rgb(var(--tone-dark) / var(--opacity-mid));
            right: -16px;
            top: var(--space-big);
            padding: 0 10px;
            border-radius: 5px 5px 0 0;
            transform: rotate(-90deg);
        }

    div-modal[side][align]{
        border-radius: var(--base-radius);
    }

    div-modal[side=left][align=start]{
        margin-left: var(--space-big);
        margin-top: var(--space-big);
    }
    div-modal[side=left][align=center]{
        margin-left: var(--space-big);
    }
    div-modal[side=left][align=end]{
        margin-left: var(--space-big);
        margin-bottom: var(--space-big);
    }

    div-modal[side=top][align=start]{
        margin-left: var(--space-big);
        margin-top: var(--space-big);
    }
    div-modal[side=top][align=center]{
        margin-top: var(--space-big);
    }
    div-modal[side=top][align=end]{
        margin-right: var(--space-big);
        margin-top: var(--space-big);
    }

    div-modal[side=right][align=start]{
        margin-left: calc( var(--space-big) *-1);
        margin-top: var(--space-big);
    }
    div-modal[side=right][align=center]{
        margin-left: calc( var(--space-big) *-1);
    }
    div-modal[side=right][align=end]{
        margin-left: calc( var(--space-big) *-1);
        margin-bottom: var(--space-big);
    }

    div-modal[side=bottom][align=start]{
        margin-left: var(--space-big);
        margin-top: calc( var(--space-big) *-1);
    }
    div-modal[side=bottom][align=center]{
        margin-top: calc( var(--space-big) *-1);
    }
    div-modal[side=bottom][align=end]{
        margin-right: var(--space-big);
        margin-top: calc( var(--space-big) *-1);
    }

    /* dialogs */

    dialog {
        box-shadow: 0px 20px 30px rgb( var(--tone-dark) );
        border: 3px solid rgb(var(--tone-light) / var(--opacity-mid));
        border-radius: calc(var(--base-radius) * 3);
        padding: var(--space-medium);
        background-color: rgb( var( --tone-black ) );
    }

    dialog>div>button-group:last-child{
        margin-top: var(--space-small);
    }

    /* snackbar and toast */

    div-snackbar{
        gap: var(--space-small);
        padding-bottom: var(--space-small);
    }
    div-snackbar>div-container{
        overflow: visible;
    }

    div-toast {
        width: 400px;
        overflow: hidden;
        display: flex; 
        border: 3px solid rgb(var(--tone-dark) / var(--opacity-mid));
        border-radius: calc(var(--base-radius) * 3);
        background: rgb(var(--tone-light));
        box-shadow: 0px 10px 45px rgb(var(--tone-gray));
    }

    div-toast>div-contents {
        padding: var(--space-small) 50px var(--space-small) var(--space-small);
        grid-area: contents;
        display: inline-block;
        text-align: left;
        border-radius: 0;
    }

    div-toast>a:hover,
    div-toast>a {
        position: absolute;
        border: 1px solid rgb(var(--tone-dark));
        display: grid;
        right: 0px;
        top: 0px;
        line-height: 0;
        width: 40px;
        height: 105%;
        border: 0;
        border-radius: 0 !important;
        background-color: transparent !important;
    }

    div-toast>div-loadbar{
        position: absolute;
        bottom: 0;
        height: 4px;
    }

    div-toast[type=success]{
        border: 3px solid rgb( var(--tone-success) );
    }
    div-toast[type=warn]{
        border: 3px solid rgb( var(--tone-warning) );
    }
    div-toast[type=error]{
        border: 3px solid rgb( var(--tone-error) );
    }
    div-toast[type=info]{
        border: 3px solid rgb( var(--tone-info) );
    }

    /* 
    //  controls 
    */

    /* buttons */

    button-item {
        padding: var( --space-small );
        border-color: rgb(var(--tone-gray));
        border-radius: calc( var(--base-radius) * 3);
        border-width: 2px;
    }

    button-item>a,
    button-item>button,
    button-item>input[type=submit],
    button-item>input[type=reset] {
        font-weight: 700;
        border-radius: calc( var(--base-radius) * 3);
        overflow: hidden;
    }

    button-item>label {
        font-weight: 400;
    }

    button-item.--active {
        background: rgb(var(--tone-accent));
    }

    button-item.--success {
        border-color: rgb( var(--tone-success) );
    }
    button-item.--warning {
        border-color: rgb( var(--tone-warning) );
    }
    button-item.--error {
        border-color: rgb( var(--tone-error) );
    }
    button-item.--info {
        border-color: rgb( var(--tone-info) );
    }


        /* --- */

        button-item[type=radio] label:not(:empty),
        button-item[type=checkbox] label:not(:empty) {
            padding-left: 40px;
            justify-content: left;
        }
        button-item[type=radio] label::after,
        button-item[type=checkbox] label::after {
            height: 14px;
            width: 16px;
            border-color: rgb(var(--tone-gray));
            border-radius: 4px;
            content: "🗙";
            text-align: center;
            padding: 1px 1px 4px 2px;
            font-weight: 700;
            color: rgb(var(--tone-white));
            display: grid;
            align-content: center;
            line-height: 0;
        }

        button-item[type=radio] :checked+label::after,
        button-item[type=checkbox] :checked+label::after {
            outline: rgb(var(--tone-success)) 2px solid;
            content: "✓";
        }

        button-item[type=radio] label:not(:empty)::after,
        button-item[type=checkbox] label:not(:empty)::after {
            margin-left: var(--space-small);
        }

        /* --- */

        button-item[type="tel"]:has(intl-list[open]){
            border-bottom-right-radius: 0;
            border-bottom-left-radius: 0;
        }
        button-item[type="tel"] > intl-list:not([open]) {
            border: 0;
        }
        button-item[type="tel"] > intl-list[open]{
            border-bottom-right-radius: calc( var(--base-radius) * 3 );
            border-bottom-left-radius: calc( var(--base-radius) * 3 );
            border: 2px solid rgb(var(--tone-gray));
            width: 100.5%;
            left: -1px;
        }
        button-item[type="tel"] [type=search] {
            padding: var(--space-micro) var(--space-small);
        }
        button-item[type="tel"] intl-list .options > a {
            padding: 0 var(--space-small);
        }
        button-item[type="tel"] intl-list .options > a:not(:last-child) {
            border-bottom: 2px dashed rgb( var( --tone-gray ) )
        }

        /* --- */

        button-item[type="file"] label {
            background-color: rgb( var( --tone-gray ) );
            border-radius: calc( var(--base-radius) * 2.5 );
            border-color: transparent;
        }
        button-item[type="file"] file-list span:not( :scope>span ) {
            padding: var(--space-micro) var(--space-small);
            border: 2px dashed rgb( var( --tone-gray ) )
        }
        button-item[type="file"] file-list span:not( :scope>span ):not(:last-child) {
            margin-right: 5px;
        }
        button-item[type="file"] file-list span small:first-child {
            border-right: 1px solid rgb( var( --tone-gray ) );
            margin-right: var(--space-small);
            padding-right: var(--space-small);
        }

        /* --- */

        button-item[type="password"]  {
            overflow: hidden;
        }
        button-item[type="password"] button  {
            background-color: rgb( var( --tone-gray ) );
        }
        button-item[type="password"] img-icon::before,
        button-item[type="password"] img-icon::after {
            width: 25px;
            transition: opacity .5s, width .5s;
        }
        button-item[type="password"][open] img-icon::before{
            opacity: .5;
        }
        button-item[type="password"][open] img-icon::after{
            opacity: 0;
        }
        button-item[type="password"][open] img-icon::before,
        button-item[type="password"][open] img-icon::after{
            width: 20px;
            transition: opacity .5s, width .5s;
        }

        /* --- */

        button-item[type="rating"] .all-stars svg{
            transition: transform .5s ease;
        }
        button-item[type="rating"] .all-stars .--active ~ svg {
            transform: scale(.75);
        }
        button-item[type="rating"] .all-stars svg:is( :hover, :has(~ svg:hover) ) {
            transform: scale(1.2);
        }
        button-item[type="rating"] .all-labels p {
            line-height: 0;
            margin: 0 0 0 5px;
            min-width: 150px;
        }

        /* --- */

        button-item[type="number"] img {
            transition: padding .15s ease-in-out;
            padding: calc( var(--space-small) / 1.25);
        }
        button-item[type="number"] img:active {
            padding: var(--space-small);
        }
        button-item[type="number"] .number-slider * { 
            background-color: rgb( var( --tone-white ) );
            z-index: 1;
            padding: 0 var(--space-small);
            border: 2px dashed rgb( var( --tone-gray ) );
            transform: scale(1);
            transition: transform .25s ease, box-shadow .5s ease .2s;
        }
        button-item[type="number"] .number-slider *:hover,
        button-item[type="number"] .number-slider *.--active{
            font-weight: 700;
            z-index: 2000;
            transform: scale(1.4);
            box-shadow: 0px 0px 150px rgb( var( --tone-black ) );
            transition: transform .25s ease, box-shadow .5s ease .2s;
        }

        /* --- */

        button-item[type="range"] label {
            padding: 0 9px 0 12px;
            font-size: 12px;
        }

        button-item[type="range"] .sliders b {
            padding: var(--space-micro);
            border-radius: 25%;
            z-index: 2000;
            outline: 6px solid rgb(var( --tone-light ) / 1 );
            transition: left .1s ease-in-out;
        }

        button-item[type="range"] .monitor {
            padding: 13px;
            border-radius: 20px;
        }


        /* --- */
        
        button-item[type="dropdown"]:has( .selectorbox.--active ){
            border-bottom-right-radius: 0;
            border-bottom-left-radius: 0;
        }
        button-item[type="dropdown"] > .selectorbox:not(.--active) {
            border: 0;
        }        
        button-item[type="dropdown"] > .selectorbox.--active {
            border-bottom-right-radius: calc( var(--base-radius) * 3 );
            border-bottom-left-radius: calc( var(--base-radius) * 3 );
            border: 2px solid rgb(var(--tone-gray));
            width: 100.5%;
            left: -1px;
            box-shadow: 0 10px 10px rgb(var(--tone-black) / var(--opacity-mid));
        }
        button-item[type="dropdown"] [type=search] {
            padding: var(--space-micro) var(--space-small);
        }
        button-item[type="dropdown"] .selectorbox .optiongroup {
            padding: var(--space-small);
        }
        button-item[type="dropdown"] .selectorbox .optiongroup a {
            padding: 0 var(--space-small);
            border-radius: 10px;
            border: 2px dashed rgb( var( --tone-gray ) )
        }
        button-item[type="dropdown"] .selectorbox .optiongroup a.--active {
            background-color: rgb( var( --tone-gray ) );
            font-weight: 700;
        }
        button-item[type="dropdown"] [type=search] {
            padding: var(--space-micro) var(--space-small);
            border-bottom: 2px solid rgb( var( --tone-gray ) );
        }
        button-item[type="dropdown"] button-item[type="checkbox"] {
            border-top: 0;
            border-left: 0;
            border-right: 0;
            border-radius: 0;
            border-style: dashed;
        }

        /* --- */

        .selectorbox:not(  [type="dropdown"] .selectorbox )>div:first-child {
            margin-bottom: 12px;
            padding-bottom: 12px;
            border-bottom: 2px dashed rgb(var(--tone-gray));
            font-weight: 700;
        }
        .selectorbox:not(  [type="dropdown"] .selectorbox ) .optiongroup a {
            padding: 0 var(--space-small);
            border-radius: 10px;
            border: 2px dashed rgb( var( --tone-gray ) )
        }
        .selectorbox:not(  [type="dropdown"] .selectorbox ) .optiongroup a.--active {
            background-color: rgb( var( --tone-gray ) );
            font-weight: 700;
        }
        .selectorbox:not(  [type="dropdown"] .selectorbox )>div:last-child {
            margin-top: 12px;
            padding-top: 12px;
            border-top: 2px dashed rgb( var( --tone-gray ) );
            min-width: 350px;
        }
        .selectorbox:not(  [type="dropdown"] .selectorbox ) button-item[type="checkbox"] {
            border-top: 0;
            border-left: 0;
            border-right: 0;
            border-radius: 0;
            border-style: dashed;
        }
        .selectorbox:not( [type="dropdown"] .selectorbox ) div-scroll {
            max-height: 500px;
        }
        
        /* --- */

        .clockbox>div:first-child {
            font-weight: bold;
        }
        .clockbox .clock{
            height: 250px;
            width: 250px;
            border-radius: 50%;
            margin: 15px;
        }
        .clockbox .clock::before {
            --dash-width: 2deg;
            --dash-length: 10px;

            content: "";
            position: absolute;
            inset: 8px;
            border-radius: 50%;
            pointer-events: none;

            background: repeating-conic-gradient(
                currentColor 0 var(--dash-width),
                transparent var(--dash-width) 30deg
            );

            mask: radial-gradient(
                farthest-side,
                transparent calc(100% - var(--dash-length)),
                #ccc 0
            );
        }
        .line-minutes::after,
        .line-hours::after{
            background: transparent;
        }
        .line-hours::before {
            width: 55%;
        }
        .line-minutes::before {
            width: 75%;
        }
        .clockbox .display {
            margin-top: calc( var(--space-medium) * 1.25 )
        }
        .clockbox .display input {
            text-align: center;
            font-weight: bold;
            color: rgb( var( --tone-black ) );
            font-family: monospace;
        }
        .clockbox .display>div{
            gap: 10px;
            width: 200px;
            margin: 10px auto;
        }
        .clockbox .warning {
            text-align: center;
            color: rgb( var(--tone-error) );
            border-top: 2px dashed rgb( var(--tone-gray) );
            margin: calc( var(--space-medium) * 1.25 )
        }

        /* --- */

        .datepicker>div:first-child {
            font-weight: bold;
        }

        .datepicker .years p, 
        .datepicker .months p{
            margin: 0 auto;
            font-weight: bold;
        }

        .datepicker>div:nth-child(3){
            margin: calc( var(--space-medium) * 1.25 ) 0;
            padding: calc( var(--space-medium) * 1.25 ) 0;
            border-top: 2px dashed rgb( var( --tone-gray ) );
            border-bottom: 2px dashed rgb( var( --tone-gray ) );
        }
        .datepicker>div:last-child{
            border-top: 2px dashed rgb( var( --tone-gray ) );
            margin-top: calc( var(--space-medium) * 1.25 );
            padding-top: calc( var(--space-medium) * 1.25 );
        }
        .datepicker .day_list .date-range-first,
        .datepicker .day_list .date-range-last {
            font-weight: bold;
            background: rgb( var( --tone-gray ) );
        }
        .datepicker .day_list .date-range {
            background: rgb( var( --tone-gray ) );
        }
        .datepicker .day_list .--active{
            font-weight: bold;
            background: rgb(var(--tone-accent));
        }
        .datepicker .day_list .day:not(.--active , .date-range-first , .date-range-last) {
            font-weight: bolder;
        }

        /* --- */

        .chronobox>div:first-child{
            margin-bottom: var(--space-medium);
        }

        .chronobox .display>button-group,
        .chronobox .display>div:first-child {
            margin-bottom: var(--space-medium);
        } 

        .chronobox .display>div:first-child input {
            text-align: center;
            left: 7px;
        }

    /* tags */

    div-taglist div-controller {
        margin-top: var(--space-medium);
        border-top: 2px dashed rgb(var(--tone-gray));
        padding-top: var(--space-medium);
    }

    div-tag {
        border-radius: var(--base-radius);
        border: 1px solid rgb(var(--tone-gray) );
        padding: var(--space-small);
        background: rgb(var(--tone-light));
        letter-spacing: 2px;
    }

    div-tag:hover{
        background: rgb( var( --tone-accent ) )
    }

    /* paginator */

    div-paginator{
        justify-content: center;
        margin: var(--space-medium) auto;
    }
    div-paginator>* {
        min-width: 50px;
        margin: var(--space-micro);
    }
    div-paginator button-group button-item {
        border-radius: 0;
        border-top: 0;
        border-bottom: 0;
    }
    div-paginator button-group>button-item:first-of-type{
        border-left: 0;
    }
    div-paginator button-group>button-item:last-of-type{
        border-right: 0;
    }
    div-paginator button-group {
        border-radius: calc( var(--base-radius) * 3);
        overflow: hidden;
        border: 2px solid rgb(var(--tone-gray));
    }

    #paginationtest > * {
        border: 1px dashed #ccc;
        padding: 10px;
        text-align: center;
    }

    /* tooltips */

    span-tooltip::before{
        font-style: italic;
        border-bottom: 1px dashed rgb( var( --tone-accent ) );
    }

    span-tooltip>:first-child{
        padding: var(--space-micro);
        border: 1px solid rgb( var( --tone-gray ) );
        background: rgb( var( --tone-light ) );
        border-radius: var(--base-radius);
    }

    /* 
    //  content components 
    */

    /* cards */

    div-card {
        border-radius: calc( var(--base-radius) * 2) ;
        border: 1px solid rgb(var(--tone-gray) );
        font-family: var(--font-codes);
        background: rgb(var(--tone-light));
        letter-spacing: 2px;
    }

    div-card>div-contents,
    div-card>div-expander {
        background: rgb(var(--tone-white));
    }

    div-card>div-contents{
        padding: var(--space-medium);
        flex-direction: column;
    }
    div-card>div-contents+a{
        display: block;
        visibility: hidden;
        height: 0;
    }


    div-card div-expander>div>div:first-child {
        padding: var(--space-medium) var(--space-medium) 0 var(--space-medium);
    }

    div-card div-expander>div>div:last-child{
        padding: var(--space-medium);
    }
    
    div-card div-expander figure {
        max-height: 50vh;
    }

    div-card div-loader {
        background: rgb(var(--tone-black) / var(--opacity-max));
        color: white;
        border-radius: inherit;
    }

    div-card .close{
        display: grid;
        top: 2%;
        right: 2%;
        background: rgb(var(--tone-black));
        font-size: var(--text-interface);
        line-height: var(--line-display);
        color: rgb(var(--tone-white));
        width: 43px;
        aspect-ratio: 1 / 1;
        text-align: center;
        align-self: center;
    }

    /* tabs */

    div-tabs {
        border-radius: calc( var(--base-radius) * 2) ;
        border: 1px solid rgb(var(--tone-gray) );
    }

    div-tabs[axis=x]>div-headbar {
        display: flex;
        gap: var(--space-small);
        position: relative;
        padding: var(--space-small);
        overflow: hidden;
        border-radius: inherit;
    }

    div-tabs[axis=x]>div-headbar>nav{
        display: grid;
        grid-auto-flow: column;
    }

    div-tabs[axis=x]>div-headbar>nav>.title{
        border-left: 1px solid rgb(var(--tone-gray) );
        padding-right: 20px;
        padding-left: 20px;
        font-weight: 400;
    }
    div-tabs[axis=x]>div-headbar>nav>.--active{
        font-weight: bold;
    }

    div-tabs[axis=x]>div-headbar>nav>.close{
        box-shadow: inset -34px 0 11px 0px rgb(var( --tone-black ) );
        width: 50px;
        justify-content: center;
    }

    div-tabs[axis=x]>div-container>div-contents.--active{
        border-top: 1px solid rgb(var(--tone-gray) );
        padding: var(--space-medium);
    }

    div-tabs[axis=y]>div-headbar {
        position: relative;
        border-left: 1px solid rgb(var(--tone-gray) );
        padding: 20px;
        font-weight: 400;
    }

    div-tabs[axis=y]>div-headbar:not(:first-child){
        border-top: 1px solid rgb(var(--tone-gray) );
    }
    div-tabs[axis=y]>div-headbar:not(:last-child){
        border-bottom: 1px solid rgb(var(--tone-gray) );
    }


    div-tabs[axis=y]>div-headbar.--active {
        font-weight: bold;
    }

    div-tabs[axis=y]>div-headbar>b.close {
        position: absolute;
        right:var(--space-small);
    }

    div-tabs[axis=y]>div-container.--active>div-contents{
        padding: var(--space-medium);
    }

    /* spoilers */

    details summary,
    div-spoiler>div-headbar{
        gap: 10px;
    }

    /* steppers */

    div-stepper {
        border-radius: calc( var(--base-radius) * 2 );
        border: 2px solid rgb( var( --tone-dark ) );
    }

    div-stepper ol:first-child {
        border-bottom: 1px solid rgb( var( --tone-dark ) );
    }

    div-stepper ol>li {
        padding: var(--space-medium);
    }

    div-stepper ol:first-child li.--active {
        font-weight: bold;
    }

    div-stepper>div-container>div-slide{
        position: relative;
        flex-direction: column;
    }

    div-stepper>div-container>div-slide>div-contents {
        padding: var(--space-big);
        height: 100%;
    }

    div-stepper>div-container>div-slide>div-controller {
        display: flex;
        justify-content: space-around;
        padding: var(--space-medium);
        width: 100%;
        background: rgb(var(--tone-black));
    }

    /* 
    //  interaction 
    */

    /* sliders */


    div-slider {
        border-radius: calc( var(--base-radius) * 2) ;
        border: 1px solid rgb(var(--tone-gray) );
    }

    div-slider slider-timer {
        z-index: 5000;
    }

    div-slider slider-dots {
        bottom: 95%;
        justify-content: center;
    }
    div-slider slider-dots>*{
        width: 10px;
        height: 10px;
        background: rgb(var(--tone-black));
        border-radius: var(--base-radius);
        margin-right: 5px;
    }
    div-slider slider-dots>*.--active{
        transform: scale(1.3);
    }

    div-slider::before,
    div-slider::after {
        content: '';
        display: block;
        position: absolute;
        z-index: 0;
        width: 0;
        border-left: 1px dashed rgb(var(--tone-gray));
        height: 100%;
    }
    div-slider::before{
        left: 15%;
    }
    div-slider::after{
        right: 15%;
    }

    div-slider .prev,
    div-slider .next {
        background: rgb(var(--tone-gray));
        color: rgb(var(--tone-blac));
        padding: var(--space-small);
        align-self: center;
        margin: 0;
    }

    div-slider[axis=x] .prev {
        top: 50%;
        left: 20px;
    }
    
    div-slider[axis=x] .next{
        top: 50%;
        right: 20px;
    }

    div-slider[axis=y] .prev {
        top: 20px;
        left: 50%;
        transform: translateY(0%);
        margin: 0;
    }

    div-slider[axis=y] .next{
        bottom: 20px;
        left: 50%;
        transform: translateY(0%);
    }

    div-slider > div-container > div-contents {
        z-index: 1000;
        border-radius: calc( var(--base-radius) * 2) ;
        border: 1px solid rgb(var(--tone-gray) );
        background: rgb(var(--tone-light) );
        overflow: hidden;
        opacity: 0.75;
        box-shadow: 0 0 0 transparent;
        margin-left: var(--space-small);
        margin-right: var(--space-small);
        transform: scale(0.95);
        transition: opacity .5s ease-out .25s, box-shadow .5s ease-out, transform .5s ease-out .25s;
    }

    div-slider[wide] > div-container > div-contents {
        margin-left:0;
        margin-right:0;
        min-height: 100%;
        display: flex;
    }

    div-slider > div-container > div-contents.--active {
        transform: scale(1);
        box-shadow: 0 0 25px rgb(var(--tone-gray));
        opacity: 1;
        transition: opacity .5s ease-in, box-shadow .5s ease-in, transform .5s ease-in;
    }

    div-slider > div-container > div-contents > div {
        padding-left: var(--space-small);
        padding-right: var(--space-small);
    }

    div-slider slider-labels>* {
        cursor: crosshair;
        background-color: rgb(var(--tone-dark));
        color: rgb(var(--tone-light));
        border-radius: var(--base-radius);
        font-weight: 200;
    }

    div-slider[axis=x] slider-labels>*,
    div-slider[axis=x] slider-labels>*+*{
        padding: 0 10px;
        margin: 0 10px -10px 0;
    }

    div-slider[axis=y] slider-labels {
        margin: 0;
        top: 50%;
    }

    div-slider[axis=y] slider-labels,
    div-slider[axis=y] slider-labels>* {
        left: 0;
        width: 200px;
        opacity: .5;
        margin:10px  0 10px 0;

    }

    div-slider slider-labels>*.--active{
        opacity: 1;
        font-weight:bold
    }

    /* drag and drop */

    div-slot{
        background: rgb(var(--tone-gray) );
        border: 2px solid rgb(var(--tone-gray) );
    }

    div-movable {
        padding: var(--space-medium);
        background: rgb(var(--tone-white) );
        border: 2px solid white;
        opacity: 1;
        transition: opacity .15s linear .1s,
                    box-shadow .15s ease-in-out;
    }

    div-slot.--stratum {
        border: 2px solid rgb( var( --tone-success ) );
    }

    div-movable.--active{
        box-shadow: 0 15px 10px rgb( var( --tone-gray ) );
    }

    div-movable.--dropping {
        --drop-scale: .75;
        opacity: 0;
        box-shadow: 0 0 0 rgba(0,0,0,0);
        transition: transform .15s ease-in-out,
                    opacity .15s linear .1s,
                    box-shadow .15s ease-in-out;
    }

    /* 
    //  media 
    */

    /* media players */

    div-audioplayer > div-container {
        border: 1px solid rgb( var(--tone-gray) );
        padding: var(--space-small);
        border-radius: var(--base-radius);
    }
    div-audioplayer > div-container div-controller {
        display: flex;
        gap: 10px;
    }
    div-audioplayer > div-container div-controller>*{
        background-color: rgb(var(--tone-gray));
        border-radius: var(--base-radius);
        padding: 0 var(--space-micro);
        align-items: center;
        display: flex;
    }

    div-audioplayer > div-container div-loadbar::before {
        background-color: rgb(var(--tone-light));
    }

    div-audioplayer > div-container div-headbar {
        max-width: 500px;
        text-overflow: ellipsis;
    }
    div-audioplayer > div-container figure {
        width: 125px;
        border-radius: 50%;
        overflow: hidden;
        height: 80px;
    }

    div-audioplayer > div-container figure+div-display {
        padding-left: 20px;
    }

    div-audioplayer[open] > div-container figure {
        animation:spin 4s linear infinite;
    }
    @keyframes spin { 
        100% { 
            -webkit-transform: rotate(360deg); 
            transform:rotate(360deg); 
        } 
    }

    /* --- */

    div-videoplayer > div-container {
        position: relative;
        border-radius: calc(var(--base-radius) * 2);
        overflow: hidden;
        padding: 5px;
        border: 1px solid rgb(var(--tone-dark));
        background: rgb(var(--tone-black));
    }

    div-videoplayer > div-container video {
        border-radius: calc(var(--base-radius) * 2.5);
    }

    div-videoplayer div-display {
        position: absolute;
        z-index: 5000;
        width: 100%;
        bottom: 0;
        left: 0;
        background: rgb(var(--tone-black) / var(--opacity-max));
        padding: 20px;
        opacity: 0;
        transition: opacity .5s ease
    }

    div-videoplayer div-display * {
        color: rgb( var( --tone-light ) );
    }

    div-videoplayer div-controller {
        align-items: center;
    }

    div-videoplayer .maximized,
    div-videoplayer .cinema,
    div-videoplayer .loop,
    div-videoplayer .play,
    div-videoplayer .volume::before {
        background-color: rgb(var(--tone-black));
        border-radius: var(--base-radius);
        padding: 0 var(--space-micro);
        align-items: center;
        display: flex;
        height: 25px;
        width: 25px;
        margin-right: 5px;
    }

    div-videoplayer .volume {
        display: flex;
        width: 320px;
        align-items: center;
    }

    div-videoplayer .duration {
        width: 320px;
        font-size: calc(var(--text-interface) / 2);
        padding: 0 10px 0 10px;
        text-align: center;
    }

    div-videoplayer:hover div-display,
    div-videoplayer:focus div-display {
        opacity: 1;
        transition: opacity .5s ease;
    }

    /* 
    //  page-specific rules 
    */

    /* page demo and corrections */

    body:has(a[href="flows.html"].--active) main div-flow {
        border: 1px dotted rgb( var( --tone-dark ) )
    } 
    body:has(a[href="flows.html"].--active) main div-flow > div-container {
        border: 1px dotted rgb( var( --tone-dark ) );
        padding: 20px;
    }

    body:has(a[href="grids.html"].--active) main div-grid {
        border: 1px dotted rgb( var( --tone-dark ) )
    } 
    body:has(a[href="grids.html"].--active) main div-grid > div-container {
        border: 1px dotted rgb( var( --tone-dark ) );
        padding: 20px;
    }

    body:has(a[href="navflaps.html"].--active) main > div-scroll > section > div:nth-of-type(2),
    body:has(a[href="navflaps.html"].--active) main > div-scroll > section > div:nth-of-type(3) {
        display: flex;
        flex-direction: row;
        justify-content: center;
    }
}
