:root {
    --wf-bg: #ffffff;
    --wf-text: #000000;
    --wf-border: #000000;
    
    /* IEEE Color Palette - Clean & Professional */
    --color-input-output: #cfe2f3;
    --color-lstm: #fff2cc;
    --color-flatten: #d9ead3;
    --color-hidden: #f4cccc;
    
    --node-size: 40px;
    --lstm-width: 60px;
    --lstm-height: 35px;
    
    --font-main: "Times New Roman", serif;
    --font-size-label: 9pt;
    --font-size-dim: 8pt;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: #f0f0f0;
    font-family: var(--font-main);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

/* Simulated IEEE Column (approx 3.5 inches / 252pt) */
.paper-column {
    background: white;
    width: 480px; /* Slightly wider for web readability but scaled for print feel */
    min-height: 600px;
    margin: 20px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.figure-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
}

.figure-caption {
    margin-top: 20px;
    font-size: 9pt;
    text-align: center;
    font-weight: bold;
}

/* Layer Styles */
.layer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
    padding: 5px 0;
}

.layer-label {
    position: absolute;
    left: -120px;
    width: 110px;
    text-align: right;
    font-size: var(--font-size-dim);
    line-height: 1.1;
    color: #444;
}

/* Node Styles */
.node {
    border: 1px solid var(--wf-border);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: var(--font-size-label);
    background: white;
    z-index: 2;
}

.node.circle {
    width: var(--node-size);
    height: var(--node-size);
    border-radius: 50%;
    background-color: var(--color-input-output);
}

.node.rect {
    width: var(--lstm-width);
    height: var(--lstm-height);
    border-radius: 4px;
    background-color: var(--color-lstm);
}

.node.flatten {
    width: 120px;
    height: 45px;
    background-color: var(--color-flatten);
    flex-direction: column;
    line-height: 1.2;
}

.dots {
    font-weight: bold;
    font-size: 14pt;
    letter-spacing: 2px;
}

/* Connection Lines (Simulated with pseudo-elements and SVGs) */
.connections-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Utility to center content within column */
.viz-wrapper {
    margin-left: 120px; /* Offset for labels */
    width: calc(100% - 120px);
    display: flex;
    flex-direction: column-reverse; /* Build from bottom up */
    gap: 30px;
}

/* Flow Arrows */
.arrow-up {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 30px;
    background: black;
}

.arrow-up::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -3px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 6px solid black;
}

/* Recurring arrows */
.recurrence {
    position: absolute;
    right: -25px;
    top: 50%;
    width: 20px;
    height: 1px;
    background: black;
}

.recurrence::after {
    content: '';
    position: absolute;
    right: -2px;
    top: -3px;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 6px solid black;
}
