/* =========================================================
   THEME VARIABLES
   ========================================================= */

:root {
    --bg: #ffffff;
    --section-alt: #f5faf7;
    --surface: #ffffff;

    --border: #dfe6e2;
    --border-strong: #b9c5be;

    --text: #17211d;
    --muted: #55625b;

    --green: #0b8060;
    --green-ink: #086b50;
    --on-green: #ffffff;

    --green-tint: #eaf5ef;
    --green-line: #b7dcca;

    --danger: #b3261e;
    --danger-tint: #fdecea;

    --footer-bg: #f3f5f4;

    --radius-card: 6px;
    --radius-control: 6px;

    --font-ui: "Segoe UI", system-ui, -apple-system,
               "Helvetica Neue", Arial, sans-serif;

    --font-brand: "Poppins", "Segoe UI", system-ui, sans-serif;
}


/* =========================================================
   RESET
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* =========================================================
   BODY
   ========================================================= */

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    font-family: var(--font-ui);

    background: var(--bg);

    color: var(--text);

    min-height: 100vh;

    display: flex;
    flex-direction: column;
}


/* =========================================================
   CONTAINER
   ========================================================= */

.container {
    width: 90%;

    max-width: 1200px;

    margin: 0 auto;
}


/* =========================================================
   HEADER
   ========================================================= */

header {
    background: var(--surface);

    border-bottom: 1px solid var(--border);

    box-shadow: none;

    position: sticky;

    top: 0;

    z-index: 100;
}


/* =========================================================
   NAVIGATION
   ========================================================= */

nav {
    display: flex;

    justify-content: space-between;

    align-items: center;

    height: 68px;

    position: relative;
}

nav ul {
    list-style: none;

    display: flex;

    align-items: center;

    gap: 30px;

    margin: 0;

    padding: 0;
}

nav a {
    text-decoration: none;

    color: var(--text);

    font-family: var(--font-ui);

    font-weight: 500;

    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}

nav a:hover {
    color: var(--green-ink);
}


/* =========================================================
   LOGO
   ========================================================= */

.logo {
    display: flex;

    align-items: center;

    gap: 1rem;

    max-width: fit-content;

    color: var(--green);

    font-family: var(--font-brand);

    font-size: 30px;

    font-weight: 700;

    line-height: 1;

    letter-spacing: 0.06em;

    text-decoration: none;

    white-space: nowrap;

    background: none;

    -webkit-background-clip: initial;

    background-clip: initial;
}


/* Logo image */

#id_logo_img {
    width: 16px;

    height: 16px;

    display: block;
}


/* Logo image wrapper */

.logo-img-wrapper {
    position: relative;

    display: inline-block;
}


/* Logo text */

.logo-text {
    position: relative;

    display: inline-block;

    margin-top: 0;

    color: var(--green);

    font-family: var(--font-brand);

    font-size: 30px;

    font-weight: 700;

    line-height: 1;

    letter-spacing: 0.06em;
}


/* =========================================================
   LOGO TRADEMARK
   ========================================================= */

.logo-img-wrapper .trademark {
    position: absolute;

    top: -2px;

    right: -11px;

    font-size: 10px;

    color: var(--muted);

    font-weight: 700;

    line-height: 1;
}

.logo-text .trademark {
    position: relative;

    top: -9px;

    right: 5%;

    display: inline-block !important;

    font-size: 10px !important;

    line-height: 1;

    color: var(--muted);

    font-weight: 700;
}


/* =========================================================
   TOOLBAR BRAND
   ========================================================= */

.toolbar-brand {
    position: static;

    top: auto;

    left: auto;

    transform: none;

    display: inline-block;

    color: var(--green);

    font-family: var(--font-brand);

    font-size: 30px;

    font-weight: 700;

    letter-spacing: 0.06em;

    line-height: 1;

    text-decoration: none;

    white-space: nowrap;
}

.toolbar-brand sup {
    letter-spacing: 0;
    margin-left: 2px;
    vertical-align: top;
    font-size:10px;
}


/* =========================================================
   HEADER BUTTON
   ========================================================= */

.button {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 40px;

    height: 40px;

    padding: 0 18px;

    border: 1px solid var(--green);

    border-radius: var(--radius-control);

    color: var(--on-green);

    background: var(--green);

    font-family: var(--font-ui);

    font-size: 15px;

    font-weight: 600;

    line-height: 1;

    text-decoration: none;

    white-space: nowrap;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;

    box-shadow: none;

    position: static;

    top: auto;

    right: auto;

    transform: none;
}

.button:hover {
    background: var(--green-ink);

    border-color: var(--green-ink);

    color: var(--on-green);
}


/* =========================================================
   BREADCRUMB
   ========================================================= */

.breadcrumb {
    margin-top: 12px;

    font-size: 13px;

    color: var(--muted);
}

.breadcrumb a {
    color: var(--muted);

    text-decoration: none;

    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--green-ink);

    text-decoration: underline;
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 28px 0 25px;

    border-bottom: 1px solid var(--border);

    background: var(--bg);
}

.hero-left {
    max-width: 650px;
}

.hero h1 {
    margin: 0 0 12px;

    font-family: var(--font-brand);

    font-size: 1.5rem;

    font-weight: 700;

    color: var(--text);
}

.hero p {
    margin: 0 0 16px;

    color: var(--muted);

    line-height: 1.6;

    font-size: 1.1rem;
}


/* =========================================================
   TAGS
   ========================================================= */

.tags {
    display: flex;

    gap: 8px;

    flex-wrap: wrap;
}

.tag {
    padding: 5px 11px;

    border-radius: var(--radius-control);

    background: var(--green-tint);

    color: var(--green-ink);

    border: 1px solid var(--green-line);

    font-size: 12px;

    font-weight: 600;
}

.tag.blue {
    background: var(--green-tint);

    color: var(--green-ink);

    border-color: var(--green-line);
}


/* =========================================================
   ROBOT ARM
   ========================================================= */

.robot-arm {
    position: relative;

    width: 190px;

    height: 120px;
}

.joint {
    position: absolute;

    width: 30px;

    height: 30px;

    border-radius: 50%;

    background: var(--green-ink);

    border: 5px solid var(--green-line);

    z-index: 3;
}

.joint-one {
    left: 25px;

    top: 65px;
}

.joint-two {
    left: 105px;

    top: 35px;
}

.link {
    position: absolute;

    height: 14px;

    background: var(--green);

    border-radius: 10px;

    transform-origin: left center;
}

.link-one {
    width: 90px;

    left: 40px;

    top: 77px;

    transform: rotate(-20deg);
}

.link-two {
    width: 75px;

    left: 120px;

    top: 47px;

    transform: rotate(35deg);
}


/* =========================================================
   TABS
   ========================================================= */

.tabs {
    display: flex;

    gap: 30px;

    border-bottom: 1px solid var(--border);

    margin-top: 10px;

    overflow-x: auto;
}

.tab {
    padding: 15px 4px 12px;

    font-size: 13px;

    color: var(--muted);

    text-decoration: none;

    white-space: nowrap;

    border-bottom: 2px solid transparent;

    cursor: pointer;

    transition:
        color 0.2s ease,
        border-color 0.2s ease;
}

.tab:hover {
    color: var(--green-ink);
}

.tab.active {
    color: var(--green);

    border-bottom-color: var(--green);

    font-weight: 600;
}


/* =========================================================
   MAIN CONTENT
   ========================================================= */

.content-layout {
    display: grid;

    grid-template-columns: 1fr 280px;

    gap: 20px;

    margin-top: 20px;

    margin-bottom: 40px;
}


/* =========================================================
   MAIN CARD
   ========================================================= */

.main-card {
    border: 1px solid var(--border);

    border-radius: var(--radius-card);

    padding: 22px;

    background: var(--surface);

    box-shadow:
        0 6px 20px rgba(12, 40, 30, 0.05);
}

.main-card h2 {
    margin-top: 0;

    font-family: var(--font-brand);

    font-size: 20px;

    color: var(--text);
}

.main-card h3 {
    margin-top: 25px;

    margin-bottom: 12px;

    font-family: var(--font-brand);

    font-size: 18px;

    color: var(--text);
}

.main-card p {
    color: var(--muted);

    line-height: 1.7;

    font-size: 14px;
}


/* =========================================================
   FEATURE LIST
   ========================================================= */

.feature-list {
    list-style: none;

    padding: 0;

    margin: 20px 0;
}

.feature-list li {
    margin: 12px 0;

    font-size: 14px;

    color: var(--text);
}

.feature-list li::before {
    content: "✓";

    color: var(--green);

    font-weight: bold;

    margin-right: 10px;
}


/* =========================================================
   DIAGRAM
   ========================================================= */

.diagram {
    margin-top: 25px;

    padding: 20px;

    background: var(--section-alt);

    border: 1px solid var(--border);

    border-radius: var(--radius-card);

    text-align: center;
}

.diagram-title {
    font-size: 14px;

    font-weight: 600;

    margin-bottom: 20px;

    color: var(--text);
}

.diagram-row {
    display: flex;

    justify-content: center;

    align-items: center;

    gap: 12px;

    flex-wrap: wrap;
}

.diagram-box {
    min-width: 130px;

    padding: 15px 12px;

    background: var(--surface);

    border: 1px solid var(--border-strong);

    border-radius: var(--radius-control);

    font-size: 12px;

    color: var(--text);
}

.arrow {
    font-size: 20px;

    color: var(--green);
}


/* =========================================================
   QUICK FACTS
   ========================================================= */

.quick-facts {
    border: 1px solid var(--border);

    border-radius: var(--radius-card);

    padding: 20px;

    background: var(--section-alt);

    height: fit-content;
}

.quick-facts h3 {
    margin-top: 0;

    font-family: var(--font-brand);

    font-size: 16px;

    color: var(--text);
}

.fact {
    margin: 18px 0;
}

.fact-title {
    font-size: 11px;

    color: var(--muted);

    margin-bottom: 5px;
}

.fact-value {
    font-size: 13px;

    color: var(--text);

    font-weight: 500;
}


/* =========================================================
   HIDDEN SECTIONS
   ========================================================= */

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}


/* =========================================================
   DOWNLOAD / SIMULATION BUTTON
   ========================================================= */

#downloads .main-card p {
    margin-bottom: 20px;
}

#downloads .button {
    display: inline-flex;

    position: static;

    margin-top: 5px;

    text-decoration: none;

    line-height: 1.4;
}

#simulation .main-card p,
#downloads .main-card p {
    margin-bottom: 20px;
}

#simulation .button,
#downloads .button {
    display: inline-flex;

    margin-top: 5px;

    position: static;
}


/* =========================================================
   HERO VISUAL
   ========================================================= */

.hero-visual {
    width: 420px;

    height: 240px;

    border-radius: var(--radius-card);

    overflow: hidden;

    background: var(--section-alt);

    border: 1px solid var(--border);
}

.hero-visual iframe {
    width: 100%;

    height: 100%;

    border: 0;

    display: block;
}


/* =========================================================
   FOOTER
   ========================================================= */

footer {
    margin-top: auto;
    padding: 20px;
    background: transparent;
    color: var(--muted);
    text-align: center;
    border-top: 1px solid var(--border);
    font-size:13px;
}

/* =========================================================
   VERSION
   ========================================================= */

#id_version {
    position: absolute;

    font-family: var(--font-ui);

    bottom: 0.5%;

    right: 5%;

    color: var(--muted);

    font-size: 0.75em;
}


/* =========================================================
   CARD LINK
   ========================================================= */

.card-link {
    display: block;

    text-decoration: none;

    color: inherit;
}

.card-link:hover {
    text-decoration: none;
}


/* =========================================================
   TABLE
   ========================================================= */

.main-card table {
    width: 100%;

    border-collapse: collapse;

    margin: 20px 0 30px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius-card);

    overflow: hidden;

    box-shadow:
        0 4px 14px rgba(12, 40, 30, 0.04);
}


/* Table header */

.main-card table thead {
    background: var(--green);

    color: var(--on-green);
}

.main-card table th {
    padding: 13px 15px;

    text-align: left;

    font-size: 14px;

    font-weight: 600;

    font-family: var(--font-ui);
}


/* Table body */

.main-card table td {
    padding: 12px 15px;

    border-bottom: 1px solid var(--border);

    font-size: 13px;

    color: var(--text);

    vertical-align: middle;
}

.main-card table tbody tr {
    transition: background-color 0.2s ease;
}

.main-card table tbody tr:hover {
    background: var(--green-tint);
}

.main-card table tbody tr:last-child td {
    border-bottom: none;
}


/* Table code */

.main-card table code {
    background: var(--green-tint);

    padding: 3px 7px;

    border-radius: 5px;

    border: 1px solid var(--green-line);

    font-family: monospace;

    font-size: 12px;

    color: var(--green-ink);
}


/* =========================================================
   CODE BLOCK
   ========================================================= */

.main-card pre {
    background: #1e1e1e;

    color: #d4d4d4;

    padding: 20px;

    border-radius: var(--radius-card);

    margin-top: 20px;

    font-family: "Courier New", Consolas, monospace;

    font-size: 14px;

    line-height: 1.6;

    overflow-x: auto;

    white-space: pre;

    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.12);

    border: 1px solid #333;
}


/* Code scrollbar */

.main-card pre::-webkit-scrollbar {
    height: 8px;
}

.main-card pre::-webkit-scrollbar-track {
    background: #2b2b2b;

    border-radius: 10px;
}

.main-card pre::-webkit-scrollbar-thumb {
    background: #555;

    border-radius: 10px;
}

.main-card pre::-webkit-scrollbar-thumb:hover {
    background: #777;
}


/* =========================================================
   FOCUS
   ========================================================= */

:focus-visible {
    outline: 2px solid var(--green);

    outline-offset: 2px;
}


/* =========================================================
   RESPONSIVE - 800px
   ========================================================= */

@media (max-width: 800px) {

    .hero {
        flex-direction: column;

        align-items: flex-start;

        gap: 25px;
    }

    .hero-visual {
        width: 100%;

        height: 240px;
    }

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

    .tabs {
        gap: 18px;
    }
}


/* =========================================================
   RESPONSIVE - 768px
   ========================================================= */

@media (max-width: 768px) {

    .hero h1 {
        font-size: 30px;
    }

    nav ul {
        display: none;
    }

    .container {
        width: 92%;
    }

    .toolbar-brand {
        font-size: 26px;
    }

    .toolbar-brand sup {
        font-size: 9px;
    }

    .logo {
        font-size: 26px;
    }

    .logo-text {
        font-size: 26px;
    }

    .button {
        min-height: 40px;

        height: 40px;

        padding: 0 16px;

        font-size: 14px;
    }

    .main-card {
        padding: 18px;
    }

    .hero-visual {
        width: 100%;
    }

    .main-card table {
        display: block;

        overflow-x: auto;

        white-space: nowrap;
    }

    .main-card table th,
    .main-card table td {
        padding: 10px 12px;

        font-size: 12px;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 380px) {

    .toolbar-brand {
        font-size: 24px;
    }

    .toolbar-brand sup {
        font-size: 9px;
    }

    .logo {
        font-size: 24px;
    }

    .logo-text {
        font-size: 24px;
    }

    .button {
        min-height: 40px;

        height: 40px;

        padding: 0 12px;

        font-size: 13px;
    }

    .hero {
        padding-top: 20px;

        padding-bottom: 20px;
    }

    .hero h1 {
        font-size: 26px;
    }

    .hero p {
        font-size: 15px;
    }

    .main-card {
        padding: 15px;
    }
}
