:root {
    --background-color: #171717;
    --surface-color: #252525;
    --primary-color: #7A44D9;
    --primary-dark: #3D2585;
    --primary-magenta: #9F2FAD;
    --secondary-color: #00DAC6;
    --info-blue: #7999D5;
    --highlight-yellow: #F7FF00;
    --text-color: #FFFFFF;
    --text-muted: #BCBCBC;
    --border-color: #252525;
    --input-bg-color: #252525;
}

body {
    background: var(--background-color);
    color: var(--text-color);
    font-family: 'Fira Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    padding: 2rem 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
}

.intro-section, .results-section, .decoded-data-container {
    background: var(--surface-color) !important;
    border: none !important;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.10) !important;
    border-radius: 10px !important;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2.5vw;
    width: 100%;
    box-sizing: border-box;
}

header {
    background: var(--surface-color);
    padding: 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    min-width: 0;
}

header h1 {
    min-width: 0;
    overflow-wrap: anywhere;
    flex: 1 1 auto;
    margin: 0;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-color);
    display: inline-block;
    border-bottom: none;
    padding-bottom: 0;
}

.nav-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin: 0;
}

.nav-logo-img {
    height: 32px;
    width: 32px;
    margin-right: 0.5em;
    vertical-align: middle;
}

.nav-logo-text {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 1px;
    color: #fff;
    vertical-align: middle;
}

.nav-link {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s, border 0.15s;
    border-bottom: 2.5px solid transparent;
    display: inline-block;
}

.nav-link:hover {
    background: #232323;
    color: #a259ff;
    border-bottom: 2.5px solid #a259ff;
}

.nav-link.active {
    color: #ffff00;
    border-bottom: 2.5px solid #ffff00;
    background: #232323;
}

footer {
    padding: 1rem;
    text-align: center;
    margin-top: 2rem;
    border-top: 1px solid #444;
    color: var(--text-muted);
    font-size: 0.8rem;
    background: none;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

footer a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

main p, .intro-section p, .results-section p, .decoded-data-container p {
    color: var(--text-muted);
    opacity: 0.9;
    font-size: 1.05rem;
    margin-bottom: 1.2rem;
}

h2 {
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 700;
}

.content-section {
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    overflow-x: auto;
}

.content-section h2 {
    margin-top: 0;
    color: var(--text-color);
}

.content-section p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.content-section a {
    color: var(--info-blue);
    text-decoration: none;
}

.content-section a:hover {
    text-decoration: underline;
}

.intro-section {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.intro-section p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.intro-section .intro-definition {
    color: var(--text-color);
    background: var(--surface-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 6px;
    padding: 0.3em 0.7em;
    font-weight: 500;
    margin-top: 1.5rem;
    display: inline-block;
}

blockquote {
    border-left: 4px solid var(--primary-color);
    color: var(--text-muted);
    background: var(--surface-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-size: 1.1rem;
    font-style: italic;
    opacity: 0.95;
}

code {
    background: #181818;
    color: var(--secondary-color);
    border-radius: 4px;
    padding: 0.2em 0.4em;
    font-family: 'Fira Code', 'Menlo', monospace;
}

.demo-section {
    margin-bottom: 3rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
    transition: color 0.2s;
}

main textarea:focus + label,
main input[type="number"]:focus + label,
main input[type="text"]:focus + label,
main input[type="email"]:focus + label {
    color: var(--primary-color);
}

main textarea, main input[type="number"], main input[type="text"], main input[type="email"] {
    border: 1.5px solid var(--border-color);
    background: var(--input-bg-color);
    color: var(--text-color);
    transition: border-color 0.2s, box-shadow 0.2s;
}

main textarea:focus, main input[type="number"]:focus, main input[type="text"]:focus, main input[type="email"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px #7A44D955;
    outline: none;
}

main textarea:hover, main input[type="number"]:hover, main input[type="text"]:hover, main input[type="email"]:hover {
    box-shadow: 0 0 0 2px #00DAC633;
}

main textarea {
    min-height: 120px;
    resize: vertical;
    margin-bottom: 0.5rem;
    white-space: pre-wrap;
    overflow-x: hidden;
}

.decode-button {
    display: block;
    width: auto;
    padding: 0.5rem 1rem;
    margin-left: auto;
    background: var(--surface-color);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    font-size: 0.9rem;
}

/* Restrict button styles to only demo/form buttons */
.demo-section button,
main button,
.results-section button,
.decoded-data-container button {
    display: block;
    width: 100%;
    padding: 0.85rem;
    margin-top: 1rem;
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--primary-color) 20%, var(--primary-color) 80%, var(--highlight-yellow) 100%);
    color: var(--text-color);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: box-shadow 0.2s, filter 0.2s, background 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px 0 rgba(122,68,217,0.10);
}

.demo-section button:hover:not(:disabled),
main button:hover:not(:disabled),
.results-section button:hover:not(:disabled),
.decoded-data-container button:hover:not(:disabled) {
    filter: brightness(1.08) saturate(1.2);
    box-shadow: 0 4px 16px 0 rgba(122,68,217,0.18);
    background: linear-gradient(90deg, #00dac6 0%, #9f2fad 20%, #9f2fad 80%, #f7ff00 100%);
    color: var(--text-color);
}

.demo-section button:disabled,
main button:disabled,
.results-section button:disabled,
.decoded-data-container button:disabled {
    background: #393939;
    color: #aaa;
}

.results-section {
    margin-top: 2rem;
    padding: 1.5rem;
}

.results-section h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--highlight-yellow);
    font-size: 1.3rem;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.results-section pre,
.decoded-data-container pre {
    min-height: 120px;
    background: #181818;
    color: var(--secondary-color);
    border-radius: 6px;
    padding: 0.5rem 0.5rem;
    font-family: 'Fira Code', 'Menlo', monospace;
    font-size: 1.05rem;
    white-space: pre-wrap;
    overflow-x: hidden;
    word-break: break-all;
    overflow-wrap: anywhere;
    box-sizing: border-box;
    margin: 0;
    border: none;
    width: 100%;
}

.results-section,
.decoded-data-container {
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 2rem 0;
    padding: 1.2rem;
}

hr {
    border: none;
    border-top: 1px solid #444;
    margin: 2rem 0;
}

.qr-code-container {
    margin-top: 1rem;
    min-height: 272px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-color);
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
}

#qr-placeholder {
    color: #888;
    font-style: italic;
}

.decoded-data-container {
    margin-bottom: 2rem;
    background: var(--surface-color) !important;
    border: none !important;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.10) !important;
    border-radius: 10px !important;
    width: 100%;
    padding: 1.5rem;
}

.decoded-data-container pre:empty::before {
    content: "Decoded data will appear here...";
    color: #888;
    font-style: italic;
}

main a, .intro-section a, .results-section a, .decoded-data-container a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

main a:hover, .intro-section a:hover, .results-section a:hover, .decoded-data-container a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

@media (max-width: 1100px) {
    .container {
        max-width: 96vw;
    }
    header {
        gap: 2vw;
    }
}

@media (max-width: 900px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .nav-logo-link {
        margin-left: 0.5em;
        margin-right: 0.7rem;
    }
    .nav-logo-img {
        height: 24px;
        width: 24px;
        margin-right: 0.4em;
    }
    .nav-logo-text {
        font-size: 1rem;
    }
    .nav-link {
        font-size: 0.95rem;
        padding: 0.5rem 0.5rem;
    }
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }
    main {
        padding: 1rem 0;
    }
    header {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
        gap: 0.5rem;
    }
    
    header h1 {
        font-size: 1.3rem;
    }

    .nav-logo-img {
        height: 24px;
        width: 24px;
        margin-right: 0.4em;
    }
    .nav-logo-text {
        font-size: 1rem;
    }
    .nav-logo-link {
        margin-left: 0.5em;
        margin-right: 0.7rem;
    }

    .content-section {
        padding: 1rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .intro-section p {
        font-size: 1rem;
    }

    blockquote {
        font-size: 1rem;
        padding-left: 1rem;
    }

    .form-group label {
        font-size: 0.95rem;
    }

    button {
        font-size: 0.9rem;
        padding: 0.75rem;
    }

    .results-section {
        padding: 1rem;
    }

    .results-section h3 {
        font-size: 1.1rem;
    }

    footer {
        padding: 1rem;
        font-size: 0.8rem;
    }

    .container {
        max-width: 100vw;
        padding: 0 1rem;
    }
}

#lnAddressInput {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Fira Code', 'Menlo', monospace;
    font-size: 0.9rem;
    background-color: var(--input-bg-color);
    color: var(--text-color);
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#lnAddressInput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px #7A44D955;
}

.form-group textarea,
.form-group input[type="text"],
.form-group input[type="number"] {
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    display: block;
    margin: 0;
}

#nofferInput {
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    display: block;
    margin: 0;
}

.main-nav {
    background: #181818;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid #393939;
    box-shadow: 0 2px 8px 0 rgba(0,0,0,0.08);
    padding: 0.5rem 0;
}

.nav-content-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2.5vw;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-group {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.nav-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.2rem;
}

.nav-burger {
    /* No margin-left: auto */
}

.burger-bars {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 24px;
    width: 28px;
    gap: 7px;
    margin: 0;
}

.burger-bars span {
    display: block;
    height: 3px;
    width: 100%;
    background: #fff;
    border-radius: 2px;
    transition: background 0.18s;
}

@media (max-width: 700px) {
    .nav-content-wrapper {
        padding: 0 1rem;
    }
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #181818;
        border-radius: 0 0 12px 12px;
        box-shadow: 0 6px 24px 0 #0005;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2em;
        padding: 0.7em 1em 1em 1em;
        display: none;
        width: 100vw;
        max-width: 100vw;
        z-index: 10;
    }
    .nav-burger {
        margin-right: 1.2em;
    }
}

.nav-burger.open {
    background: none !important;
}

body, html {
    overflow-x: hidden;
}

.spec-select {
    background: #181818;
    color: #fff;
    border: 1.5px solid var(--primary-color);
    border-radius: 8px;
    padding: 0.5em 2.2em 0.5em 1em;
    font-size: 1.08em;
    font-family: inherit;
    appearance: none;
    outline: none;
    box-shadow: 0 2px 12px 0 rgba(122,68,217,0.08);
    transition: border 0.18s, box-shadow 0.18s;
    cursor: pointer;
    min-width: 160px;
    margin-bottom: 0.5em;
    background-image: url("data:image/svg+xml;utf8,<svg fill=\"white\" height=\"16\" viewBox=\"0 0 20 20\" width=\"16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7.293 7.293a1 1 0 011.414 0L10 8.586l1.293-1.293a1 1 0 111.414 1.414l-2 2a1 1 0 01-1.414 0l-2-2a1 1 0 010-1.414z\"/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.8em center;
    background-size: 1.1em;
}
.spec-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px #00DAC655;
}

/* Diagram image tweaks on intro page */
.intro-diagram-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2.5rem;
}
.intro-diagram-container img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    box-shadow: 0 4px 32px 0 #0005;
    background: none !important;
    padding: 0 !important;
}

/* Remove legacy/duplicated nav/hamburger styles below this line */

/* Markdown code block styling for specs page */
.content-section pre {
    background: #181818;
    color: var(--secondary-color);
    border-radius: 6px;
    padding: 1em;
    font-family: 'Fira Code', 'Menlo', monospace;
    font-size: 1rem;
    margin: 1.5em 0;
    box-sizing: border-box;
    max-width: 100%;
    word-break: break-all;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    overflow-x: hidden;
}

.content-section code {
    background: #181818;
    color: var(--secondary-color);
    border-radius: 4px;
    padding: 0.2em 0.4em;
    font-family: 'Fira Code', 'Menlo', monospace;
    font-size: 1em;
    word-break: break-all;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    overflow-x: hidden;
}

/* --- STRONG BURGER BUTTON OVERRIDES --- */
.nav-burger,
.nav-burger:hover,
.nav-burger.open,
.nav-burger:active,
.nav-burger:focus {
  background: none !important;
  box-shadow: none !important;
  border: none !important;
  color: inherit !important;
  filter: none !important;
  outline: none !important;
}

@media (max-width: 700px) {
  .main-nav {
    padding-right: 0.7em;
  }
  .nav-burger {
    margin-right: 0;
    justify-self: end;
  }
} 
