/* ═══════════════════════════════════════════════════════════════
   ASPHORA — שכבת העיצוב המשותפת לכל עמודי האתר.

   שחור־לבן. אין צבע מלבד שחור, לבן וגווני אפור — כדי שהלוגו
   הבוטני (logo1.png) והלוגוטייפ (logo2.svg) יובילו את העמוד.

   מי משתמש בקובץ:
     index.html · projects.html · about.html · terms.html
     login.html · register.html
   מי לא:
     landscape-app.html — נשאר single-file עם הצבעוניות שלו
     (DEV-CONTEXT §4.1). הקובץ הזה לא נוגע בו.
   ═══════════════════════════════════════════════════════════════ */

:root {
    --paper:      #ffffff;
    --paper-alt:  #fafafa;   /* רקע הדף — כמעט לבן, כדי שכרטיס לבן ייראה */
    --ink:        #111111;
    --ink-soft:   #3d3d3d;
    --muted:      #6e6e6e;
    --faint:      #a0a0a0;
    --line:       #e4e4e4;
    --line-mid:   #cfcfcf;
}

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

body {
    font-family: 'Heebo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--paper-alt);
    color: var(--ink-soft);
    direction: rtl;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); }

/* ═══ מסטהד — לוגו במרכז, ניווט מתחתיו ══════════════════════════
   אותו מבנה בכל העמודים: הפרח, הלוגוטייפ, ואז הקישורים.
   בעמוד הראשי הוא גדול; בשאר העמודים .compact מקטין אותו. */

.masthead {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 40px 24px 0;
    text-align: center;
}

.masthead-inner {
    max-width: 860px;
    margin: 0 auto;
}

/* הפרח */
.mark {
    display: block;
    margin: 0 auto 14px;
    width: 148px;
    max-width: 44vw;
    height: auto;
}

/* הלוגוטייפ ASPHORA */
.wordmark {
    display: block;
    margin: 0 auto;
    width: 286px;
    max-width: 70vw;
    height: auto;
}

.masthead .tagline {
    margin-top: 13px;
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 0.14em;
    color: var(--muted);
}

/* ── מסך נמוך: מכווץ את המסטהד כדי שהעמוד ייכנס בלי גלילה ──
   נבדק אמפירית מול scrollHeight ב-dev-tests\sitecheck.ps1. */
@media (max-height: 820px) {
    .masthead          { padding-top: 26px; }
    .mark              { width: 112px; margin-bottom: 10px; }
    .wordmark          { width: 230px; }
    .masthead .tagline { margin-top: 10px; font-size: 12px; }
}

/* גרסה מוקטנת — כל העמודים חוץ מהראשי */
.masthead.compact { padding-top: 26px; }
.masthead.compact .mark      { width: 62px;  margin-bottom: 10px; }
.masthead.compact .wordmark  { width: 168px; }
.masthead.compact .tagline   { margin-top: 10px; font-size: 11px; }

/* ═══ ניווט — במרכז, מתחת ללוגו ═══════════════════════════════ */

.site-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    margin-top: 26px;
    padding-bottom: 4px;
}

.masthead.compact .site-nav { margin-top: 16px; }

.site-nav a {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 400;
    letter-spacing: 0.04em;
    padding: 10px 18px;
    border-bottom: 2px solid transparent;
    transition: color 0.18s, border-color 0.18s;
    white-space: nowrap;
}

.site-nav a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* המפריד בין עמודי התוכן לכניסה/הרשמה */
.nav-sep {
    width: 1px;
    height: 15px;
    background: var(--line-mid);
    margin: 0 10px;
}

/* "התחברות" ו"פתיחת חשבון" — אותה שורה, משקל שונה */
.site-nav .nav-btn {
    font-weight: 600;
    color: var(--ink);
}

.site-nav .nav-btn.solid {
    background: var(--ink);
    color: var(--paper);
    border-radius: 2px;
    padding: 9px 20px;
    margin-inline-start: 10px;
    border-bottom: 2px solid var(--ink);
}

.site-nav .nav-btn.solid:hover { background: var(--ink-soft); border-bottom-color: var(--ink-soft); }

.site-nav button.nav-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-family: inherit;
    font-size: 13.5px;
    cursor: pointer;
}

.nav-user {
    font-size: 13px;
    color: var(--muted);
    padding: 10px 14px;
}

/* ═══ תוכן ════════════════════════════════════════════════════ */

.page-content {
    max-width: 860px;
    margin: 0 auto;
    padding: 36px 24px 44px;
    width: 100%;
    flex: 1 0 auto;      /* דוחף את הפוטר לתחתית גם בעמוד קצר */
}

.page-content.narrow { max-width: 560px; }

/* ── עמוד שאמור להיכנס למסך אחד בלי גלילה ──────────────────
   index · about · login. התוכן שלהם נכתב קצר בכוונה, וכאן
   מצטמצמים גם הריווחים. יש בדיקה ב-sitecheck.ps1 שמודדת
   scrollHeight מול innerHeight ב-1280×720 ו-1366×768. */
body.one-screen .page-content { padding: 28px 24px 30px; }

@media (max-height: 820px) {
    body.one-screen .page-content { padding: 20px 24px 22px; }
}

/* העמוד הראשי — טקסט פתיחה מתחת למסטהד */
.lede {
    text-align: center;
    max-width: 620px;
    margin: 0 auto;
}

.lede p {
    font-size: 15px;
    line-height: 1.85;
    color: var(--ink-soft);
    font-weight: 300;
}

.lede .rule {
    width: 46px;
    height: 1px;
    background: var(--ink);
    margin: 0 auto 22px;
}

/* ארבעת המרכיבים — שורה אחת. 2×2 היה יפה אבל הוסיף גובה
   שמנע כניסה למסך אחד. */
.feature-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    margin: 34px auto 0;
    max-width: 820px;
    text-align: center;
}

.feature-list h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 6px;
    letter-spacing: 0.03em;
}

.feature-list p {
    font-size: 12px;
    line-height: 1.7;
    color: var(--muted);
    font-weight: 300;
}

/* הקישור הזמני לפרויקטים — יורד בשלב א׳ */
.temp-access {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-size: 12.5px;
    font-weight: 300;
}

.temp-access a {
    color: var(--muted);
    text-decoration: none;
    border-bottom: 1px solid var(--line-mid);
    padding-bottom: 2px;
}

.temp-access a:hover { color: var(--ink); border-bottom-color: var(--ink); }

@media (max-height: 820px) {
    .lede p          { font-size: 14px; line-height: 1.75; }
    .lede .rule      { margin-bottom: 16px; }
    .feature-list    { margin-top: 24px; gap: 18px; }
    .feature-list p  { font-size: 11.5px; }
    .temp-access     { margin-top: 20px; padding-top: 14px; }
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 26px;
    gap: 16px;
    flex-wrap: wrap;
}

.section-title {
    font-size: 19px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: 0.02em;
}

/* ═══ עמודי טקסט — אודות, תנאי שימוש ══════════════════════════ */

.doc {
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 40px 42px 46px;
}

body.one-screen .doc { padding: 30px 34px 32px; }
body.one-screen .doc p,
body.one-screen .doc li { font-size: 14px; line-height: 1.8; }

@media (max-height: 820px) {
    /* המסטהד המוקטן מתכווץ עוד בעמודי מסך-אחד */
    body.one-screen .masthead.compact            { padding-top: 18px; }
    body.one-screen .masthead.compact .mark      { width: 44px; margin-bottom: 7px; }
    body.one-screen .masthead.compact .wordmark  { width: 132px; }
    body.one-screen .masthead.compact .site-nav  { margin-top: 12px; }
    body.one-screen .site-nav a                  { padding: 8px 14px; }
    body.one-screen .site-footer                 { padding: 14px 32px; }

    body.one-screen .doc { padding: 20px 26px 22px; }
    body.one-screen .doc p,
    body.one-screen .doc li { font-size: 13px; line-height: 1.65; margin-bottom: 9px; }
    body.one-screen .doc h1 { font-size: 21px; }
    body.one-screen .doc h2 { margin-top: 18px; font-size: 15px; }
    body.one-screen .doc-meta { margin-bottom: 16px; }
    body.one-screen .placeholder-note { margin-bottom: 16px; padding: 9px 13px; font-size: 12px; }

    body.one-screen .auth-card  { padding: 22px 28px 18px; }
    body.one-screen .auth-card h1 { font-size: 19px; }
    body.one-screen .auth-sub   { margin-bottom: 15px; font-size: 12.5px; }
    body.one-screen .form-group { margin-bottom: 12px; }
    body.one-screen .form-group input { padding: 9px 11px; }
    body.one-screen .btn-submit { padding: 10px 24px; }
    body.one-screen .auth-alt   { margin-top: 12px; }
}

.doc h1 {
    font-size: 25px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 6px;
}

.doc h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    margin: 32px 0 10px;
}

.doc p, .doc li {
    font-size: 15px;
    line-height: 1.9;
    color: var(--ink-soft);
    font-weight: 300;
}

.doc p { margin-bottom: 12px; }
.doc ul, .doc ol { margin: 0 20px 14px 0; }
.doc li { margin-bottom: 6px; }
.doc strong { font-weight: 600; color: var(--ink); }

.doc-meta {
    font-size: 12px;
    color: var(--faint);
    margin-bottom: 28px;
}

/* טקסט שעוד לא נכתב סופית — מסומן ויזואלית כדי שלא ישוחרר בטעות */
.placeholder-note {
    background: var(--paper-alt);
    border-inline-start: 3px solid var(--ink);
    padding: 13px 17px;
    font-size: 13px;
    line-height: 1.75;
    color: var(--ink-soft);
    margin-bottom: 28px;
}

/* ═══ כרטיסי פרויקט ═══════════════════════════════════════════ */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
}

.project-card {
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 18px 18px 15px;
    cursor: pointer;
    transition: border-color 0.18s, box-shadow 0.18s;
    position: relative;
}

.project-card:hover {
    border-color: var(--ink);
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}

.project-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
    padding-left: 24px;
}

.project-number { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.project-meta   { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.project-date   { font-size: 11px; color: var(--faint); margin-top: 6px; }

.delete-project {
    position: absolute;
    top: 12px;
    left: 12px;
    background: transparent;
    color: var(--faint);
    border: none;
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-size: 17px;
    opacity: 0;
    transition: opacity 0.2s, color 0.2s;
    line-height: 1;
}

.project-card:hover .delete-project { opacity: 1; }
.delete-project:hover { color: var(--ink); }

.empty-state {
    text-align: center;
    padding: 66px 20px;
    color: var(--faint);
    grid-column: 1 / -1;
}

.empty-state p { margin-bottom: 6px; font-size: 15px; font-weight: 300; }
.empty-state p:last-child { font-size: 13px; }

.empty-state-icon {
    width: 54px;
    height: auto;
    margin: 0 auto 16px;
    display: block;
    opacity: 0.28;
}

/* ═══ כפתורים ═════════════════════════════════════════════════ */

.new-project-btn,
.btn-submit {
    background: var(--ink);
    color: var(--paper);
    border: 1px solid var(--ink);
    border-radius: 2px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
}

.new-project-btn {
    padding: 10px 22px;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.btn-submit {
    padding: 13px 24px;
    font-size: 14px;
    width: 100%;
}

.new-project-btn:hover,
.btn-submit:hover { background: var(--paper); color: var(--ink); }

.btn-submit:disabled {
    background: var(--line);
    border-color: var(--line);
    color: var(--faint);
    cursor: not-allowed;
}

/* ═══ טפסים ═══════════════════════════════════════════════════ */

.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--line-mid);
    border-radius: 2px;
    font-size: 14px;
    font-family: inherit;
    background: var(--paper);
    color: var(--ink);
}

.form-group input:focus,
.form-group select:focus { outline: none; border-color: var(--ink); }

.form-group input[type="checkbox"] { accent-color: var(--ink); }

.helper-text { font-size: 12px; color: var(--muted); margin-top: 5px; font-weight: 300; }

.divider { height: 1px; background: var(--line); margin: 22px 0; }

.segments-container { display: flex; flex-direction: column; gap: 8px; }
.segment-input { display: flex; align-items: center; gap: 10px; }

.segment-number {
    background: var(--paper-alt);
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 8px 12px;
    font-size: 13px;
    min-width: 32px;
    text-align: center;
}

/* ═══ כרטיס התחברות / הרשמה ═══════════════════════════════════ */

.auth-card {
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 38px 36px 32px;
}

.auth-card h1 {
    font-size: 21px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 7px;
}

.auth-sub {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 26px;
    line-height: 1.75;
    font-weight: 300;
}

.auth-sub strong { font-weight: 600; color: var(--ink-soft); }

.auth-alt {
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    margin-top: 24px;
    font-weight: 300;
}

.auth-alt a { font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line-mid); }
.auth-alt a:hover { border-bottom-color: var(--ink); }

/* הודעה שהמנגנון עדיין לא מחובר — תוסר בשלב א׳ */
.not-wired {
    background: var(--paper-alt);
    border-inline-start: 3px solid var(--ink);
    padding: 12px 15px;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--ink-soft);
    margin-bottom: 24px;
    font-weight: 300;
}

.field-error {
    color: var(--ink);
    font-size: 12px;
    margin-top: 5px;
    display: none;
    font-weight: 500;
}

.field-error::before { content: '— '; }
.field-error.show { display: block; }

/* ═══ ניהול המשרד ═════════════════════════════════════════════ */

.panel {
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 24px 26px;
    margin-bottom: 20px;
}

.panel h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 4px;
}

.panel .panel-sub {
    font-size: 12.5px;
    color: var(--muted);
    font-weight: 300;
    margin-bottom: 18px;
    line-height: 1.7;
}

.seats {
    font-size: 12px;
    color: var(--muted);
    font-weight: 300;
    white-space: nowrap;
}

.seats strong { color: var(--ink); font-weight: 600; }

/* טבלת המשתמשים. גולשת אופקית במסך צר במקום לשבור את העמוד. */
.table-wrap { overflow-x: auto; }

table.team {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 520px;
}

table.team th {
    text-align: right;
    font-weight: 600;
    color: var(--muted);
    font-size: 11.5px;
    letter-spacing: 0.05em;
    padding: 0 10px 9px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

table.team td {
    padding: 11px 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

table.team tr:last-child td { border-bottom: none; }
table.team .cell-name { font-weight: 600; color: var(--ink); }
table.team .cell-sub  { font-size: 11.5px; color: var(--muted); font-weight: 300; direction: ltr; text-align: right; }

.tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border: 1px solid var(--line-mid);
    border-radius: 2px;
    color: var(--ink-soft);
    white-space: nowrap;
}

.tag.solid    { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tag.disabled { color: var(--faint); border-style: dashed; }

.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-start; }

.btn-mini {
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 500;
    padding: 5px 11px;
    background: var(--paper);
    color: var(--ink-soft);
    border: 1px solid var(--line-mid);
    border-radius: 2px;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.15s, color 0.15s;
}

.btn-mini:hover:not(:disabled) { border-color: var(--ink); color: var(--ink); }
.btn-mini:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-mini.danger:hover:not(:disabled) { border-color: var(--ink); color: var(--ink); font-weight: 600; }

/* הקישור שנוצר — מוצג פעם אחת בלבד */
.invite-link {
    margin-top: 16px;
    padding: 14px 16px;
    background: var(--paper-alt);
    border: 1px solid var(--ink);
}

.invite-link .link-label {
    font-size: 11.5px;
    color: var(--muted);
    font-weight: 300;
    margin-bottom: 8px;
    line-height: 1.6;
}

.invite-link input {
    width: 100%;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 11.5px;
    padding: 9px 10px;
    border: 1px solid var(--line-mid);
    background: var(--paper);
    color: var(--ink);
    direction: ltr;
    text-align: left;
}

.inline-form {
    display: grid;
    grid-template-columns: 1fr 150px auto;
    gap: 10px;
    align-items: end;
}

@media (max-width: 620px) {
    .inline-form { grid-template-columns: 1fr; }
}

.notice {
    font-size: 12.5px;
    padding: 10px 14px;
    border-inline-start: 3px solid var(--ink);
    background: var(--paper-alt);
    margin-bottom: 16px;
    font-weight: 300;
    line-height: 1.7;
}

/* ═══ פוטר ════════════════════════════════════════════════════ */

.site-footer {
    flex-shrink: 0;
    border-top: 1px solid var(--line);
    background: var(--paper);
    padding: 22px 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px 22px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--faint);
    font-weight: 300;
}

.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ═══ מודל ════════════════════════════════════════════════════ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active { display: flex; }

.modal-content {
    background: var(--paper);
    padding: 38px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 6px 34px rgba(0,0,0,0.28);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--line);
}

.modal-header h2 { font-size: 20px; font-weight: 600; color: var(--ink); }

.close-modal {
    background: transparent;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: var(--faint);
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.close-modal:hover { color: var(--ink); }

/* ═══ מסכים צרים ══════════════════════════════════════════════ */

/* ארבע עמודות נעשות צפופות מתחת ל-900px */
@media (max-width: 900px) {
    .feature-list { grid-template-columns: repeat(2, 1fr); gap: 26px 30px; max-width: 620px; }
}

@media (max-width: 640px) {
    .masthead { padding: 34px 16px 0; }
    .masthead.compact { padding-top: 20px; }
    .site-nav { margin-top: 18px; }
    .site-nav a { padding: 9px 12px; font-size: 13px; }
    .nav-sep { display: none; }
    .site-nav .nav-btn.solid { margin-inline-start: 6px; }
    .page-content { padding: 32px 16px 48px; }
    .doc { padding: 28px 20px 32px; }
    .auth-card { padding: 28px 22px 26px; }
    .feature-list { grid-template-columns: 1fr; margin-top: 40px; gap: 28px; }
}
