        html, body {
            margin: 0;
            font-family: 'Arial', monospace;
        }
        body {
            overflow-x: hidden;
        }
        td {
            padding: 3px;
            padding-left: 20px;
        }
        rect{
            mix-blend-mode: multiply;
        }
        .StatusTD{
            padding: 0px;
            padding-left: 20px;
        }
        #MouseOverInfo {
            white-space: pre-line;
        }
        .NoSpinArrows {
            -moz-appearance: textfield;
        }
        .NoSpinArrows::-webkit-outer-spin-button,
        .NoSpinArrows::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
        #ControlsGroup {
            position:absolute;
            bottom:0;   
            
            padding: 1%;
            width: 98%;
        }
        .StatusTableClass {
            padding: 0px;
            width: 100%;
        }

        .ChannelRectangle{
            mix-blend-mode: multiply;
            fill: var(--channel-fill);
            fill-opacity: 0.5;
            stroke: var(--channel-stroke);
            stroke-width: 1.0;
            vector-effect: non-scaling-stroke;
        }
        .ChannelRectangle.is-selected {
            fill: #FFbbcc;
            stroke: #ff0000;
        }
        .ChannelHoverGlow {
            fill: none;
            stroke: #ff0000;
            stroke-opacity: 0.5;
            stroke-width: 1.0;
            vector-effect: non-scaling-stroke;
            mix-blend-mode: normal;
            filter: drop-shadow(0 0 40px rgba(255, 0, 0, 0.5));
            pointer-events: none;
        }
        
        .OverlapHighlightRectangle {
            fill: yellow;
            fill-opacity: 0.8;
            stroke: #ff8800;
            stroke-width: 1.0;
            vector-effect: non-scaling-stroke;
            mix-blend-mode: normal;
            pointer-events: none !important;
        }


        .GridLine {
            stroke: #888888;
        }

        .GridLineText {
            stroke: none;
            fill: #000000; 
            alignment-baseline: central;
        }

        .ScreenRectangle{
            stroke: #1a1a1a;
            fill:rgb(215, 215, 215);
            fill-opacity: 0.3;
            stroke-width: 1.0;
            vector-effect: non-scaling-stroke;
        }
        .SmallNumericInput{
            width: 3em;
        }
        .MidNumericInput{
            width: 5em;
        }
        .BigNumericInput{
            width: 7em;
        }

        /* Fixed-width prefix on the "Horizontal:" / "Vertical:" spacing lines,
           so the Spacing and Align to selects of the two rows line up. */
        .AxisLabel {
            display: inline-block;
            width: 6.5em;
        }

        /* The "Align to" group is only usable while its own axis uses the
           overlap spacing mode; controls.js toggles DisabledControl accordingly. */
        .AlignGroup {
            padding-left: 15px;
        }

        .DisabledControl {
            opacity: 0.4;
        }


        .LeftOutPanel {
            position: absolute;
            top: 15px;
            z-index: 100000;
            padding: 0px;
            padding-left: 10px;
            padding-right: 25px;
            border-radius: 0px 20px 20px 0px;
            transition: 0.1s ease 0s;
        }

        .TopOutPanel {
            position: absolute;
            top: 10%;
            left: 33%;
            z-index: 100000;
            padding: 10px;
            border-radius: 20px 20px 20px;
            transition: 0.1s ease 0s;
        }
        
        .RightOutPanel {
            position: absolute;
            top: 15px;
            right: 250px; /* Initially hidden to the right */
            /* left: auto; Override the left property 
            width: 250px; /* Fixed width to prevent stretching */
            z-index: 100000;
            padding: 0px;
            padding-left: 25px;
            padding-right: 10px;
            border-radius: 20px 0px 0px 20px; /* Rounded corners on the left side */
            transition: 0.1s ease 0s;
        }

        .GridLine:hover{
            font-weight: bold;
            stroke: red;
            stroke-width: 1.5;
        }


        #drawing {
            padding-left: 20px;
            margin: 0;

            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
            -webkit-touch-callout: none;
            -webkit-tap-highlight-color: transparent;
        }

       #PositionAndDimensionsInputTable {
            padding: 0px;
            padding-right: 15px;
       }       

      .BottomSettingsToolbar {
          display: flex;
          justify-content: flex-end;
          padding: 5px 12px 3px;
      }

      .RectangleReportButton {
          padding: 6px 12px;
          border: 1px solid #245c72;
          border-radius: 4px;
          background: #245c72;
          color: #ffffff;
          font: inherit;
          cursor: pointer;
      }

      .RectangleReportButton:hover {
          background: #194658;
      }

      .RectangleReportDialog {
          width: max-content;
          max-width: calc(100vw - 32px);
          max-height: 80vh;
          padding: 18px;
          box-sizing: border-box;
          border: 1px solid #245c72;
          border-radius: 8px;
          background: #f7fbfc;
          color: #172a32;
      }

      .RectangleReportHeader {
          display: flex;
          align-items: center;
          justify-content: space-between;
          gap: 16px;
          margin-bottom: 12px;
      }

      .RectangleReportHeader h2 {
          margin: 0;
          font-size: 1.2rem;
      }

      .RectangleReportTableScroll {
          max-height: calc(80vh - 90px);
          overflow-x: hidden;
          overflow-y: auto;
      }

      .RectangleReportTable {
          width: max-content;
          min-width: 100%;
          max-width: 100%;
          border-collapse: collapse;
          background: #ffffff;
      }

      .RectangleReportTable th,
      .RectangleReportTable td {
          padding: 8px 10px;
          border: 1px solid #8da6ae;
          text-align: left;
          vertical-align: top;
          white-space: normal;
          overflow-wrap: anywhere;
      }

      .RectangleReportTable th {
          position: sticky;
          top: 0;
          z-index: 1;
          background: #dcebef;
      }

      .RectangleReportTable td:first-child {
          min-width: 150px;
          max-width: 260px;
          white-space: normal;
          overflow-wrap: anywhere;
      }

      .RectangleReportTable .RectangleReportEmpty {
          text-align: center;
          color: #52676e;
      }

      .RectangleReportSizeLine + .RectangleReportSizeLine {
          margin-top: 3px;
      }

      @media (max-width: 600px) {
          .RectangleReportDialog {
             max-height: 85vh;
             padding: 12px;
          }

          .RectangleReportTableScroll {
             max-height: calc(85vh - 76px);
          }
      }

       .RoundedCornersAreas {
            font-size:15px;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none; 
            user-select: none; 
            border-width: 1px;
            border-style: solid;
            border-color: #1C6EA4;
            border-radius: 20px 20px 20px 20px;
            background-color: rgba(156, 207, 241, 0.9);
       }

       .BackgroundImage{
            mix-blend-mode: multiply;
       }

       #copyrightwatermark {
        font-size:12px;
        opacity: 0.3;
        position:   absolute;
        padding: 20px;
        margin: 0px;
        top: 0px;   
        right: 0px;
       }

       #PageTitleCommentDiv {
        position:   absolute;
        padding-left: 7.5%;
        display:none;
        visibility: hidden;
       }

    #PrintLayout {
        display: none;
    }

    :root {
        color-scheme: light;
        --ink: #000000;
        --muted: #000000;
        --line: #bcbcbc;
        --surface: #dddddd;
        --surface-raised: #eeeeee;
        --workspace: #ffffff;
        --accent: #c84f38;
        --accent-hover: #a63c29;
        --control-focus: #27776a;
        --footer-height: 92px;
    }

    html,
    body {
        width: 100%;
        height: 100%;
        margin: 0;
        overflow: hidden;
        color: var(--ink);
        font: 14px/1.45 "Trebuchet MS", "Segoe UI", sans-serif;
    }

    * {
        box-sizing: border-box;
    }

    button,
    input,
    select,
    textarea {
        color: #000000;
        font: inherit;
    }

    button,
    select,
    input:not([type="checkbox"]):not([type="color"]):not([type="file"]),
    textarea {
        min-height: 30px;
        border: 1px solid #cbd3cd;
        border-radius: 4px;
        background: #fff;
    }

    button {
        padding: 6px 10px;
        cursor: pointer;
    }

    button:hover {
        border-color: #aab6ae;
        background-color: #f3f6f3;
    }

    button:focus-visible,
    input:focus-visible,
    select:focus-visible,
    textarea:focus-visible {
        outline: 2px solid var(--control-focus);
        outline-offset: 1px;
    }

    input:not([type="checkbox"]):not([type="color"]):not([type="file"]),
    select,
    textarea {
        width: 100%;
        padding: 3px 8px;
    }

    input[type="checkbox"] {
        width: 16px;
        height: 16px;
        margin: 0;
        accent-color: var(--control-focus);
    }

    input[type="color"] {
        width: 42px;
        height: 32px;
        padding: 2px;
        border: 1px solid var(--line);
        border-radius: 4px;
        background: #fff;
    }

    input[type="file"] {
        min-width: 0;
        max-width: 100%;
        font-size: 12px;
    }

    .AppShell {
        display: flex;
        width: 100%;
        height: 100dvh;
        min-height: 0;
        flex-direction: column;
        background: var(--workspace);
    }

    #copyrightwatermark {
        display: block;
        position: static;
        margin: 2px 0 0;
        padding: 0;
        font-size: 9px;
        line-height: 1.2;
        opacity: 0.5;
    }

    .AppHeader {
        z-index: 2;
        display: flex;
        min-height: 56px;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 6px 20px;
        border-bottom: 1px solid #d5dcd6;
        background: var(--surface);
    }

    .AppBrand {
        display: flex;
        align-items: center;
        gap: 11px;
    }

    .AppBrand h1 {
        margin: 0;
        font: 700 18px/1.15 Georgia, "Times New Roman", serif;
    }

    .AppBrand p {
        margin: 2px 0 0;
        color: var(--muted);
        font-size: 11px;
    }

    .AppHeaderActions {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .HeaderSecondaryButton {
        min-height: 36px;
        padding: 7px 12px;
        border: 1px solid var(--line);
        border-radius: 4px;
        background: var(--surface-raised);
        color: var(--ink);
        font-weight: 700;
    }

    .HeaderSecondaryButton:hover {
        background: #e5e5e5;
    }

    .Workspace {
        display: grid;
        min-height: 0;
        flex: 1;
        grid-template-columns: 330px minmax(0, 1fr);
    }

    .SettingsSidebar {
        z-index: 1;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        border-right: 1px solid var(--line);
        background: var(--surface);
        scrollbar-color: #b7c1ba transparent;
        scrollbar-width: thin;
    }

    .SettingsSection {
        border-bottom: 1px solid var(--line);
    }

    .SettingsSection summary {
        position: relative;
        padding: 10px 18px;
        background: #eeeeee;
        color: var(--ink);
        font-size: 13px;
        font-weight: 700;
        cursor: pointer;
        list-style: none;
    }

    .SettingsSection summary::-webkit-details-marker {
        display: none;
    }

    .SettingsSection summary::after {
        position: absolute;
        right: 18px;
        color: var(--muted);
        content: "+";
        font-size: 18px;
        font-weight: 400;
        line-height: 1;
    }

    .SettingsSection[open] summary::after {
        content: "−";
    }

    .SettingsSection summary:hover {
        background: #e5e5e5;
    }

    .SettingsContent {
        display: grid;
        gap: 8px;
        padding: 2px 18px 17px;
    }

    #BottomSettingsTables {
        display: grid;
        gap: 9px;
    }

    #BottomSettingsTables h3 {
        margin: 8px 0 0;
        color: var(--muted);
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    #BottomSettingsTables h3:first-child {
        margin-top: 0;
    }

    .ControlRow {
        display: grid;
        min-width: 0;
        align-items: center;
        gap: 8px;
        grid-template-columns: minmax(92px, 0.85fr) minmax(0, 1.15fr);
    }

    .ControlRow > label,
    .ControlRow > :first-child {
        min-width: 0;
        color: var(--muted);
        font-size: 12px;
    }

    .InputWithUnit,
    .InputPair {
        display: flex;
        min-width: 0;
        align-items: center;
        gap: 6px;
    }

    .InputWithUnit span,
    .InputPair span {
        flex: none;
        color: var(--muted);
        font-size: 11px;
    }

    .SmallNumericInput {
        max-width: 78px;
    }

    .MidNumericInput,
    .BigNumericInput {
        min-width: 0;
        width: 100%;
    }

    .AxisControl {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .AxisControl > label {
        font-weight: 600;
    }

    .AlignGroup {
        display: grid;
        align-items: center;
        gap: 8px;
        grid-template-columns: 44px minmax(0, 1fr);
        padding: 0;
        color: var(--muted);
        font-size: 12px;
    }

    .CheckRow {
        display: flex;
        min-height: 23px;
        align-items: center;
        gap: 9px;
        color: var(--ink);
        font-size: 12px;
    }

    .StackedControl {
        display: grid;
        gap: 5px;
        color: var(--muted);
        font-size: 12px;
    }

    .StackedControl textarea {
        min-height: 54px;
        resize: vertical;
    }

    .FileControl {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .FileActions {
        display: grid;
        gap: 7px;
        grid-template-columns: 1fr 1fr;
    }

    .FileActions button {
        min-width: 0;
        font-size: 12px;
    }

    .PrimaryButton,
    .RectangleReportButton {
        min-height: 33px;
        padding: 7px 12px;
        border: 1px solid var(--accent);
        border-radius: 4px;
        background: var(--accent);
        color: #000000;
        font-weight: 700;
    }

    .PrimaryButton:hover,
    .RectangleReportButton:hover {
        border-color: var(--accent-hover);
        background: var(--accent-hover);
        color: #000000;
    }

    .CanvasWorkspace {
        position: relative;
        display: grid;
        min-width: 0;
        min-height: 0;
        grid-template-rows: minmax(0, 1fr) var(--footer-height);
    }

    .CanvasLiveUpdateButton {
        position: absolute;
        top: 12px;
        left: 12px;
        z-index: 3;
        display: grid;
        width: 42px;
        height: 42px;
        padding: 6px;
        place-items: center;
        border: 1px solid #737b84;
        border-radius: 4px;
        background: rgba(255, 255, 255, 0.94);
        cursor: pointer;
    }

    .CanvasLiveUpdateButton:hover {
        background: #ffffff;
    }

    .CanvasLiveUpdateButton:focus-visible {
        outline: 2px solid #245c72;
        outline-offset: 2px;
    }

    .CanvasLiveUpdateButton[aria-pressed="true"] {
        border-color: #c85b1c;
    }

    .CanvasLiveUpdateButton img {
        display: block;
        width: 28px;
        height: 28px;
    }

    #drawing {
        width: 100%;
        height: 100%;
        min-height: 0;
        margin: 0;
        padding: 0;
        overflow: hidden;
        background: #ffffff;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }

    #drawing > svg {
        display: block;
        background: #ffffff;
    }

    #ControlsGroup {
        position: relative;
        bottom: auto;
        display: flex;
        width: auto;
        height: var(--footer-height);
        min-height: var(--footer-height);
        max-height: var(--footer-height);
        align-items: center;
        justify-content: space-between;
        gap: 18px;
        padding: 5px 16px;
        border-top: 1px solid var(--line);
        background: var(--surface);
    }

    .CanvasStatus {
        display: grid;
        min-width: 0;
        min-height: 1.45em;
        gap: 3px;
    }

    #SelectionStatus {
        font-size: 12px;
        font-weight: 700;
    }

    #MouseOverInfo {
        position: absolute;
        z-index: 1;
        right: 16px;
        bottom: calc(var(--footer-height) + 10px);
        left: 16px;
        width: max-content;
        max-width: calc(100% - 32px);
        margin: 0 auto;
        padding: 8px 13px;
        border: 1px solid #d5dad6;
        border-radius: 5px;
        background: rgba(255, 255, 255, 0.94);
        color: #000000;
        font-size: 15px;
        font-weight: 600;
        line-height: 1.4;
        text-align: center;
        white-space: pre-line;
        pointer-events: none;
    }

    #PositionAndDimensionsInputTable {
        border-collapse: separate;
        border-spacing: 8px 3px;
        padding: 0;
        text-align: right;
    }

    #PositionAndDimensionsInputTable td {
        padding: 0;
        white-space: nowrap;
    }

    #PositionAndDimensionsInputTable label {
        margin-right: 5px;
        color: var(--muted);
        font-size: 11px;
        font-weight: 700;
    }

    #PositionAndDimensionsInputTable input {
        width: 76px;
        min-height: 30px;
        padding: 3px 6px;
    }

    #PositionAndDimensionsInputTable span {
        margin-left: 4px;
        color: var(--muted);
        font-size: 10px;
    }

    .DisabledControl {
        opacity: 0.4;
    }

    .RectangleReportDialog {
        border-color: var(--line);
        border-radius: 6px;
        background: #fff;
        color: var(--ink);
    }

    .RectangleReportTable th {
        background: #edf2ee;
    }

    .AppHeader {
        border-bottom-color: var(--line);
    }

    .SettingsSection summary {
        color: var(--ink);
    }

    #BottomSettingsTables h3 {
        color: var(--muted);
    }

    .RectangleReportDialog {
        color: #000000;
    }

    @media (max-width: 760px) {
        .AppHeader {
            min-height: 48px;
            padding: 4px 12px;
        }

        .AppBrand h1 {
            font-size: 16px;
        }

        .Workspace {
            grid-template-columns: minmax(0, 1fr);
            grid-template-rows: minmax(170px, 42vh) minmax(0, 1fr);
        }

        .SettingsSidebar {
            border-right: 0;
            border-bottom: 1px solid var(--line);
        }

        .SettingsContent {
            padding-right: 14px;
            padding-left: 14px;
        }

        #ControlsGroup {
            align-items: flex-start;
            gap: 8px;
            padding: 8px 10px;
        }

        .CanvasStatus {
            align-self: center;
        }

        #PositionAndDimensionsInputTable {
            border-spacing: 4px 3px;
        }

        #PositionAndDimensionsInputTable input {
            width: 62px;
        }
    }

    @media (max-width: 420px) {
        .AppHeader {
            min-height: 44px;
            padding: 4px 8px;
        }

        .AppBrand h1 {
            font-size: 13px;
            white-space: nowrap;
        }

        .AppHeaderActions {
            flex: none;
            gap: 4px;
        }

        .HeaderSecondaryButton {
            min-height: 30px;
            padding: 4px 7px;
            font-size: 11px;
            white-space: nowrap;
        }

        .AppBrand p {
            display: none;
        }

        .RectangleReportButton {
            padding: 6px 9px;
            font-size: 12px;
        }

        .CanvasStatus {
            max-width: 42%;
        }

        #PositionAndDimensionsInputTable input {
            width: 52px;
        }

        #PositionAndDimensionsInputTable span {
            display: none;
        }
    }

    @page {
        margin: 12mm;
    }

    @media print {
        html,
        body {
            width: auto;
            height: auto;
            margin: 0;
            overflow: visible;
        }

        body > :not(#PrintLayout) {
            display: none !important;
        }

        #PrintLayout {
            display: block;
            color: #000000;
            font: 10pt Arial, sans-serif;
        }

        #PrintTitle {
            margin: 0 0 4mm;
            text-align: center;
            font-size: 18pt;
            font-weight: bold;
            overflow-wrap: anywhere;
        }

        #PrintComment {
            display: block;
            margin-bottom: 5mm;
            white-space: pre-wrap;
            overflow-wrap: anywhere;
        }

        #PrintDrawing {
            width: 100%;
            margin: 0 0 6mm;
            break-inside: avoid;
        }

        #PrintDrawing:empty {
            display: none;
        }

        #PrintDrawing svg {
            display: block;
            width: 100%;
            height: auto;
            max-width: 100%;
        }

        .GridLine {
            stroke: #000000;
        }

        .GridLineText {
            stroke: none;
            fill: #000000;
        }

        #PrintRectangleReportTable {
            width: 100%;
            max-width: 100%;
            font-size: 8pt;
            break-inside: auto;
        }

        #PrintRectangleReportTable thead {
            display: table-header-group;
        }

        #PrintRectangleReportTable tr {
            break-inside: avoid;
        }

        #PrintRectangleReportTable th {
            position: static;
        }
    }

