/* ============================================================
   CALCNEST — AREA ENGINE STYLES (Light Theme)
============================================================ */

.calcnest-tool {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #1e293b;
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
}

.calcnest-tool *, .calcnest-tool *::before, .calcnest-tool *::after {
    box-sizing: border-box;
}

.calcnest-tool h1, .calcnest-tool h2, .calcnest-tool h3, .calcnest-tool h4 {
    margin: 0;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.calcnest-tool p { margin: 0; }

.bg-grid {
    background-size: 20px 20px;
    background-image:
        linear-gradient(to right, rgba(15, 23, 42, 0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15, 23, 42, 0.06) 1px, transparent 1px);
    background-color: #ffffff;
}

.vertex-node { cursor: pointer; transition: r 0.15s ease, fill 0.15s ease; }
.vertex-node:hover { r: 8; fill: #16a34a; }
.vertex-node:focus, .vertex-node:focus-visible {
    outline: 2px solid #f59e0b; outline-offset: 2px; r: 8; fill: #16a34a;
}

.dimension-line { stroke: #f59e0b; stroke-width: 1.5; }
.dimension-extension { stroke: #94a3b8; stroke-width: 1; stroke-dasharray: 3 3; }

.dimension-text {
    fill: #b45309; font-size: 11px; font-family: monospace; font-weight: 700;
    paint-order: stroke; stroke: #ffffff; stroke-width: 3px; stroke-linejoin: round;
}

.vertex-label {
    fill: #0f172a; font-size: 12px; font-weight: 700; font-family: monospace;
    paint-order: stroke; stroke: #ffffff; stroke-width: 3px;
}

.shape-label {
    fill: #64748b; font-size: 10px; font-family: monospace;
    paint-order: stroke; stroke: #ffffff; stroke-width: 3px;
}

.geometry-fill { fill: rgba(56, 189, 248, 0.18); stroke: #0284c7; stroke-width: 2; }
.geometry-fill-green { fill: rgba(34, 197, 94, 0.18); stroke: #16a34a; stroke-width: 2; }
.center-guide { stroke: #94a3b8; stroke-width: 1; stroke-dasharray: 4 4; }
.right-angle { fill: none; stroke: #f59e0b; stroke-width: 1.8; }

svg { touch-action: none; }

@keyframes fadein {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.calcnest-content {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #334155; line-height: 1.75;
}
.calcnest-content h2 { font-size: 1.5rem; font-weight: 700; margin: 2rem 0 0.75rem; color: #0f172a; }
.calcnest-content h3 { font-size: 1.125rem; font-weight: 600; margin: 1.5rem 0 0.5rem; color: #16a34a; }
.calcnest-content p { margin: 0 0 1rem; }
.calcnest-content ul, .calcnest-content ol { padding-left: 1.5rem; margin: 0 0 1rem; }
.calcnest-content li { margin-bottom: 0.5rem; }
.calcnest-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.9rem; }
.calcnest-content th, .calcnest-content td { border: 1px solid #cbd5e1; padding: 0.5rem 0.75rem; text-align: left; }
.calcnest-content th { background: #f0fdf4; color: #0f172a; font-weight: 600; }
.calcnest-content a { color: #16a34a; text-decoration: underline; text-underline-offset: 2px; }
.calcnest-content a:hover { color: #15803d; }
.calcnest-content code {
    background: #f1f5f9; padding: 0.125rem 0.375rem; border-radius: 0.25rem;
    font-family: monospace; font-size: 0.875em; color: #b45309;
}
.calcnest-content pre {
    background: #0f172a; color: #e2e8f0; border-radius: 0.5rem;
    padding: 1rem; overflow-x: auto; margin: 0 0 1rem; font-size: 0.875rem;
}
.calcnest-content pre code { background: transparent; color: inherit; padding: 0; }

/* Precision Draw limitation reminder */
.precision-limit-notice {
    background: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 13px;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 8px;
}