/* =========================================================
   BROKER LOCK DESIGN SYSTEM
   ---------------------------------------------------------
   Global source of truth for:
   - typography
   - application colors
   - radius
   - shadow
   - transition
   - base element behavior

   Component/page-specific layout does NOT belong here.
   ========================================================= */

:root {
    /* Typography */
    --estate-font-family:
        Pretendard,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "Noto Sans KR",
        sans-serif;

    --estate-font-size-small: 12px;
    --estate-font-size-body: 14px;
    --estate-font-size-section: 16px;
    --estate-font-size-title: 20px;

    --estate-font-weight-regular: 400;
    --estate-font-weight-medium: 500;
    --estate-font-weight-strong: 600;

    /* Backward-compatible aliases during migration */
    --broker-lock-font-family:
        var(--estate-font-family);

    --broker-lock-font-size-small:
        var(--estate-font-size-small);

    --broker-lock-font-size-body:
        var(--estate-font-size-body);

    --broker-lock-font-size-title:
        var(--estate-font-size-title);

    --broker-lock-font-weight-regular:
        var(--estate-font-weight-regular);

    --broker-lock-font-weight-medium:
        var(--estate-font-weight-medium);

    --broker-lock-font-weight-strong:
        var(--estate-font-weight-strong);

    /* Application surfaces */
    --estate-color-background: #f5f7fa;
    --estate-color-surface: #ffffff;
    --estate-color-surface-muted: #f8fafc;

    --estate-color-border: #e4e9f0;
    --estate-color-border-strong: #d8dee8;

    /* Typography colors */
    --estate-color-text: #182230;
    --estate-color-text-secondary: #526173;
    --estate-color-text-muted: #8692a3;

    /* Primary action */
    --estate-color-primary: #2563eb;
    --estate-color-primary-hover: #1d4ed8;
    --estate-color-primary-soft: #eff6ff;

    /* Sidebar baseline
       Brand layer may intentionally override these. */
    --estate-color-sidebar: #111827;
    --estate-color-sidebar-surface: #1b2534;
    --estate-color-sidebar-text: #d7deea;
    --estate-color-sidebar-muted: #8491a3;

    /* Radius */
    --estate-radius-small: 8px;
    --estate-radius-medium: 12px;
    --estate-radius-large: 18px;

    /* Shadow */
    --estate-shadow-small:
        0 1px 2px rgba(15, 23, 42, 0.05);

    --estate-shadow-panel:
        -12px 0 32px rgba(15, 23, 42, 0.12);

    /* Motion */
    --estate-transition-fast: 160ms ease;
    --estate-transition-default: 220ms ease;
}


/* ---------------------------------------------------------
   Base document contract
   --------------------------------------------------------- */

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;

    background:
        var(--estate-color-background);

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

body {
    margin: 0;

    color:
        var(--estate-color-text);

    background:
        var(--estate-color-background);

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

    font-size:
        var(--estate-font-size-body);

    font-weight:
        var(--estate-font-weight-regular);

    line-height: 1.4;

    -webkit-font-smoothing: antialiased;
}


/* ---------------------------------------------------------
   Controls inherit one typography system
   --------------------------------------------------------- */

button,
input,
select,
textarea {
    color: inherit;
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    color: inherit;
}


/* ---------------------------------------------------------
   Typography weight contract
   --------------------------------------------------------- */

strong,
b,
h1,
h2,
h3,
h4,
h5,
h6,
label,
th {
    font-weight:
        var(--estate-font-weight-strong);
}

small,
.estate-meta,
.estate-caption,
.estate-helper-text {
    font-size:
        var(--estate-font-size-small);
}


/* ---------------------------------------------------------
   Native hidden contract
   --------------------------------------------------------- */

[hidden] {
    display: none !important;
}
