﻿body {
    margin: 0;
    padding: 0;
    font-family: Calibri, Helvetica, sans-serif;
    background: #a1a1a1;
    color: #222;
	 padding-top: env(safe-area-inset-top);
}

/*makes it *possibly* respect top area on phones*/
@supports (padding-top: env(safe-area-inset-top)) {
    body::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: env(safe-area-inset-top);
        background: #a1a1a1;
        z-index: 9999;
        pointer-events: none;
    }
}

.resources-row {
	text-align:center;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.resources-card {
    grid-column: 1 / -1;
    justify-self: center;
	text-align:center;
    width: 48%;   /* same width as one card */
}

/*Added via chat 5/13 3:57pm*/
	html,
	body {
	    width: 100%;
	    max-width: 100%;
	    overflow-x: hidden;
	}
	
	.intro-block {
	    margin-bottom: 18px;
	}
	
	.homeP {
		text-align: justify;
	}
	
	.cxtMain {
		text-align: center;
		color: #000000; 
		font-size: 1.2rem;		
	}
	.cxtLink {
		text-align: center;
		color: #000000; 
		text-decoration: none; 
		font-size: 1.1rem;
	}
	
	.daButtons {
	  display: flex;
	  justify-content: center; /* Horizontal centering */
	 /* align-items: center;      Vertical centering */
	 /* height: 200px;            Required for vertical centering */
	}	
	
	.update-note {
		text-align:center;
		font-size: .9rem;
		color: #6a6a6a;
	}
	
.intro-title {
    display: block;
    text-align: center;
    font-weight: bold;
    font-style: italic;
    margin-bottom: 8px;   /* 👈 this gives you that small space */
	font-size: 1.1rem;
    letter-spacing: 0.3px;
    color: #2a2a2a;
	}

.intro-text {
    display: block;
    text-align: justify;
    max-width: 100%;
    overflow-wrap: break-word;
}

.bd {
    color: #ffffff;
    background-color: #7E481C;
    font-size: 24px;
    padding: 10px;
}

.gld {
    color: #e8c878;
    border-color: #e8c878;
}

.tab-btn.gld {
    background-color: #974806;
    color: #e8c878;
    border-color: #e8c878;
    border-width: 3px;
}

.tab-btn.active.gld {
    background-color: #974806;
    color: #e8c878;
    border-color: #e8c878;
    border-width: 3px;
}

.page-wrap {
    /*padding: 14px;*/
	padding: calc(14px + env(safe-area-inset-top)) 14px 14px 14px;
}

.container {
    width: 100%;
    /*max-width: 860px;*/
	max-width: 700px;
   /* margin: 0 auto;*/
   margin: auto;
    background: #ffffff;
    /*border: 1px solid #cfcfcf;*/
	border: thin solid #000000;
    border-radius: 12px;
    /*padding: 16px;*/
	padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    min-width: 0;
}

.top-banner {
    display: block;
    border-radius: 8px;
    margin-bottom: 16px;
}

h1 {
    margin: 0 0 8px 0;
    font-size: 1.9rem;
    color: #1f2937;
	border-top: 1px solid #c0c0c0;
	border-bottom: 1px solid #c0c0c0;
}

h2 {
    margin-top: 0;
    margin-bottom: 4px;
    font-size: 1.25rem;
    color: #1f2937;
}

h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.subtext {
    margin-top: 0;
    margin-bottom: 18px;
    color: #555;
}

.card {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #d6d6d6;
    border-radius: 10px;
    background: #fafafa;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 14px;
    min-width: 0;
    max-width: 100%;
}

.results-grid {
    min-width: 0;
    max-width: 100%;
}

.field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

label {
    font-weight: bold;
    margin-bottom: 6px;
    color: #333;
}

input[type="number"],
select,
textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #bcc4cd;
    border-radius: 6px;
    background: #fff;
}

.help-text {
    display: block;
    margin-top: 6px;
    font-size: 0.88rem;
    color: #666;
}

.checkbox-field {
    justify-content: flex-end;
}

.checkbox-field label {
    font-weight: normal;
    margin-top: 28px;
}

.section-block {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #ddd;
}

.tab-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.tab-btn {
    padding: 10px 16px;
    font-size: 16px;
    border: 1px solid #666;
    border-radius: 6px;
    background: #efefef;
    color: #111;
    cursor: pointer;
    font-weight: bold;
}

.tab-btn.active {
    background: #d9dde3;
    border-color: #555;
}

.button-row {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    align-items: center;
    margin: 18px 0;
}

.button-row .main-btn,
.button-row .secondary-btn {
    width: auto;
    min-width: 110px;
}

.main-btn,
.secondary-btn {
    padding: 10px 18px;
    font-size: 16px;
    border-radius: 6px;
    border: 1px solid #777;
    cursor: pointer;
	width: auto;
}

.main-btn {
/* Original*/
    background: #e3e7eb;
    color: #111;
    font-weight: bold;

	/*colors to make it look invisible
    background: #fafafa;
    color: #fafafa;
    font-weight: bold;
	border-color: #fafafa;
	*/		
}

.secondary-btn {
    background: #fff;
    color: #333;
}

.message-area {
    min-height: 22px;
    margin-bottom: 14px;
    font-weight: bold;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 12px;
}

.result-box {
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    padding: 12px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.result-label {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 6px;
}

.result-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #1f2937;
}

.result-box.red-border {
    border: 2px solid #c62828 !important;
}

.result-box.green-border {
    border: 2px solid #2e7d32 !important;
}

.breakdown {
    margin-top: 18px;
    padding: 14px;
    background: #fff;
    border: 1px solid #B05307;
/*   border: 1px solid #cdcdcd;*/
    border-radius: 8px;
}

.breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.breakdown-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 10px;
    padding: 2px 0;
    /*border-bottom: 1px solid #ececec;*/
	border-bottom: 1px solid #cdcdcd;
}

.breakdown-row span {
    line-height: 1.0;
}

.faq-answer {text-align: justify;}

.breakdown-row:last-child {
    border-bottom: none;
}

.breakdown-row span:first-child {
    font-weight: bold;
    color: #333;
}

/* ===== Trust Note ===== */

.trust-note {
    margin: 12px 0 16px 0;
    padding: 10px 12px;
    border-left: 4px solid #7E481C;
    background: #f7f7f7;
    color: #444;
    font-size: 0.9rem;
    line-height: 1.35;
}

.result-highlight {
    font-size: 1.15rem;
    font-weight: bold;
}

.result-highlight.premium {
    color: #c62828;
}

.result-highlight.discount {
    color: #2e7d32;
}

.breakdown-row:last-child span:first-child {
    font-size: 1.15rem;
}

.positive {
    color: darkgreen;
}

.negative {
    color: #b00020;
}

.hidden {
    display: none !important;
}

.melt-title-row {
/*    display: flex;
    align-items: flex-end;*/
	
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 6px;
    flex-wrap: wrap;
        align-items: stretch;
		display: block;	
}

.spot-strip .spot-label {
    display: block;
    /*
font-size: 0.85rem;
*/
	font-size: 1.3rem;
    color: #333;
    margin-bottom: 3px;
    font-weight: normal;
}

.spot-strip .spot-value {
    font-size: 1.35rem;
    font-weight: bold;
    color: #1f2937;
}

.info-row {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid #d6d6d6;
    border-radius: 10px;
    background: #fafafa;
    color: #444;
    line-height: 1.45;
}

.info-row p {
    margin: 0;
}

.melt-card {
    overflow-x: auto;
}

	.melt-table {
	    width: 100%;
	    border-collapse: collapse;
	    table-layout: fixed;
	}

	.melt-table th,
	.melt-table td {
		 padding: 6px 10px;
		 border: 1px solid #cdcdcd;
	    text-align: left;
	    vertical-align: middle;
	}

	.melt-table tr:nth-child(even) td {
	    background: #f5f5f5;
	}
	
	.melt-table td,
	.melt-table th {
		line-height: 1.25;
	}
	
	/* Align ASW and composition columns */
	.melt-table td:nth-child(3),
	.melt-table th:nth-child(3),
	.melt-table td:nth-child(4),
	.melt-table th:nth-child(4) {
	    text-align: right;
	}	

	.ad-card {
	    margin: 14px 0 16px 0;
	    padding: 0;
	    text-align: center;
	    min-height: 0;
	}
	
	.ad-card .ad-label {
	    display: none;
	}
	
	.ad-card ins.adsbygoogle:empty {
	    display: none !important;
	}

.melt-table th {
    font-size: 0.92rem;
    color: #333;
    background: #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 1;
}

.melt-table .qty-col {
    width: 62px;
}

.melt-table .coin-col {
    width: auto;
}

.melt-table .comp-col {
	/*Changed from 72*/
    width: 62px;
}

.melt-table .asw-col {
    width: 88px;
	text-align:right;
}

.melt-table .melt-col {
    width: 108px;
    text-align: right;
}

.melt-table td:last-child,
.melt-table th:last-child {
    text-align: right;
}
/* 5/13 3:59pm 
.melt-table input[type="number"] {
    padding: 7px 6px;
    text-align: center;
    min-width: 0;
}
added replacement below:
*/

.melt-table input[type="number"] {
    width: 40px;
    max-width: 40px;
    min-width: 40px;
    padding: 4px 2px;
    text-align: center;
}


.coin-name {
    font-weight: bold;
    display: block;
	
	/*Added below:*/
	font-size: 1.1rem;
	padding-left: 10px;
	color: #444;
}

.coin-note {
    display: block;
    color: #666;
    font-size: 0.85rem;
    margin-top: 2px;
	/*Added:*/
	padding-left: 20px;
}

.melt-totals {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.melt-total-box {
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}

.melt-total-box .label {
    display: block;
    color: #555;
    font-size: 0.92rem;
    margin-bottom: 4px;
}

.melt-total-box .value {
    display: block;
    font-size: 1.35rem;
    font-weight: bold;
    color: #1f2937;
}

.melt-actions {
    margin-top: 16px;
}

.metal-buttons {
    display: flex;
    gap: 0;
    flex-wrap: nowrap;
    border: 1px solid #666;
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
    background: #efefef;
}

.metal-buttons .tab-btn {
    border: none;
    border-right: 1px solid #666;
    border-radius: 0;
    min-width: 120px;
    margin: 0;
}

.metal-buttons .tab-btn:last-child {
    border-right: none;
}

.metal-buttons .tab-btn.active {
    background: #d9dde3;
    color: #111;
}

.metal-buttons .tab-btn.active.gld {
    background: #974806;
    color: #e8c878;
}
.headerlinks {
	color: #222222; 
	text-decoration: none; 
	font-size: 1.3em; 
}

.headerMain {
	text-align:center;
	margin-bottom:7px;
	border-top: thin solid #c0c0c0; 
	padding-top: 7px;
	font-size: .9em; 
	margin-top: 0px;
}

.footerlinks {
	color: #909090; 
	text-decoration: none; 
	font-size: 1.3em; 
}

.footerMain {
	text-align:center;
	margin-bottom:55px;
	border-top: thin solid #909090; 
	padding-top: 7px;
	font-size: .9em; 
}

#StackUlator {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
} 
 
/*Suggestion by chat*/
.main-btn {
    width: 100%;
    text-align: left;
    transition: all 0.2s ease;
}

.main-btn:hover {
    background: #d9dde3;
    transform: translateY(-1px);
}

/*Melt Value - one line*/
.total-row {
    white-space: nowrap;
}

/*Other Totals Row on melt page*/
.totals-wrap {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #cfcfcf;
}

.totals-heading {
    font-size: 1.05rem;
    font-weight: bold;
    color: #333;
    margin: 0 0 4px 2px;
    line-height: 1.1;
}

.totals-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.total-box {
	border: 1px solid #cfcfcf;
	border-radius: 6px;
    /*background: #fff;*/
	background: #f5f5f5;
    padding: 8px 6px;
    text-align: center;
}

.total-label {
    /*font-size: 0.88rem;*/
	font-size: 0.99rem;
    /*color: #555;*/
	/*color: #505050;*/
	color: #505050;
    margin-bottom: 4px;
    line-height: 1.1;
	font-weight: bold;
}

.total-value {
    font-size: 1rem;
    font-weight: bold;
    white-space: nowrap;
    line-height: 1.1;
}

/* Melt page title + spot strip final fix */



.melt-page-title {
    display: block;
    width: 100%;
    margin: 0 0 2px 0;
    padding: 0;
    border-top: 1px solid #c0c0c0;
    border-bottom: 1px solid #c0c0c0;
}

.melt-title-row .subtext {
    margin: 0 0 8px 0;
	padding: 0px;
    line-height: 1.25;
}

.spot-strip {
    width: 36%;
    min-width: 205px;
    margin: 0 0 10px 0;
    padding: 8px 12px;
    border: 1px solid #c0c0c0;
    border-radius: 8px;
    background: #f1f1f1;
    text-align: left;
}

.spot-label {
    display: block;
    font-size: 0.7rem;
    font-weight: normal;
    color: #333;
    margin-bottom: 4px;
}

.spot-value {
    display: block;
    font-size: 1.25rem;
    font-weight: bold;
    color: #1f2937;
    white-space: nowrap;
}

/* ===== Premium Page Polish - scoped only to premium.php ===== */

.premium-page .card {
    background: linear-gradient(to bottom, #ffffff 0%, #f7f7f7 100%);
    border: 1px solid #c9c9c9;
}

.premium-page .card h2 {
    padding-bottom: 6px;
    border-bottom: 1px solid #d0d0d0;
    color: #1f2937;
}

.premium-page label {
    font-size: 0.96rem;
}

.premium-page input[type="number"],
.premium-page select {
    border: 1px solid #aeb6bf;
    background: #ffffff;
}

.premium-page input[type="number"]:focus,
.premium-page select:focus {
    outline: none;
    border-color: #7E481C;
    box-shadow: 0 0 0 2px rgba(126, 72, 28, 0.18);
}

.premium-page .main-btn,
.premium-page .secondary-btn {
    text-align: center;
}

.premium-page .result-box {
    background: #ffffff;
    border: 1px solid #cfcfcf;
}

.premium-page .result-label {
    font-weight: bold;
}

.premium-page .breakdown {
    background: #ffffff;
}
	
	/* ===== Button Interaction Polish ===== */
	
	.main-btn,
	.secondary-btn,
	.tab-btn {
	    transition: all 0.15s ease;
	}
	
	.main-btn:hover {
	    background: #d6dbe1;
	    transform: translateY(-1px);
	}
	
	.secondary-btn:hover {
	    background: #f5f5f5;
	}
	
	.tab-btn:hover {
	    background: #e5e9ee;
	}
	
	.main-btn:active,
	.secondary-btn:active,
	.tab-btn:active {
	    transform: translateY(0px) scale(0.98);
	}
	
	/* subtle "press" feel */
	.main-btn:focus,
	.secondary-btn:focus {
	    outline: none;
	    box-shadow: 0 0 0 2px rgba(126, 72, 28, 0.25);
	}
	
	/* ===== Tool Cards ===== */
	
	.tool-card {
	    padding: 10px;
	    border: 1px solid #d6d6d6;
	    border-radius: 8px;
	    background: #fafafa;
	    transition: all 0.15s ease;
	}
	
	.tool-card:hover {
	    background: #f1f3f5;
	    border-color: #bdbdbd;
	}
	
	.tool-desc {
	    font-size: 0.85rem;
	    color: #555;
	    margin-top: 6px;
	}

@media (max-width: 700px) {
    .page-wrap {
        padding: 8px;
    }

    .premium-page .card {
        padding: 12px;
    }

    .premium-page .form-grid {
        gap: 10px;
    }

    .premium-page label {
        margin-bottom: 3px;
    }

    .premium-page input[type="number"],
    .premium-page select {
        padding: 8px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .premium-page .button-row .main-btn,
    .premium-page .button-row .secondary-btn {
        min-width: 105px;
        width: auto;
    }
	
	.resources-card {
        width: 100%;
    }
	
	.coin-name {font-size: .9rem;}
	
    .container {
        padding: 12px;
        border-radius: 8px;
    }

    h1 {
        font-size: 1.45rem;
        line-height: 1.2;
    }

    h2 {
        font-size: 1.1rem;
    }

    .form-grid,
    .results-grid,
    .melt-totals {
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100%;
        max-width: 100%;
    }

    .tab-buttons {
        gap: 6px;
    }
	.headerlinks {
		font-size: .8em; 
	}

	.intro-title {
		font-size: .8rem;
		}
	
	.intro-text {
	    display: block;
	    text-align: justify;
		font-size: .8rem;
	}

	.tab-btn {
	    width: 100%;
	}
    .main-btn,
    .secondary-btn {
        width: 100%;
        padding: 12px;
        font-size: 15px;
    }

    .breakdown-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .checkbox-field label {
        margin-top: 4px;
    }

    input[type="number"],
    select,
    textarea {
        max-width: 100%;
        min-width: 0;
    }


    .melt-table th,
    .melt-table td {
        padding: 7px 4px;
        font-size: 0.88rem;
		background:#ffffff;
    }
	
	.melt-table tr:nth-child(even) td {
	    background: #fafafa;
	}	

    .melt-table .qty-col {
        width: 54px;
    }

    .melt-table .comp-col {
		/*Changed from 58:*/
        width: 48px;
    }

    .melt-table .asw-col {
        width: 72px;
		text-align:right;
    }

    .melt-table .melt-col {
		/*Changed from 92:*/
        width: 82px;
    }

    .melt-table input[type="number"] {
        width: 40px;
        max-width: 40px;
        min-width: 40px;
        padding: 4px 2px;
    }

    .coin-note {
        font-size: 0.77rem;
    }

    .metal-buttons {
        width: 100%;
    }

    .metal-buttons .tab-btn {
        width: 50%;
        min-width: 0;
    }	
	.footerlinks {
		font-size: 1.0em; 
		color: #444444;
	}
	
	.footerMain {
		font-size: .7em;
	}
/*More from last row of Melt page*/
    .totals-grid {
        gap: 6px;
    }

    .total-box {
        padding: 7px 4px;
    }

    .total-label {
        font-size: 0.78rem;
		white-space: nowrap;
    }

    .total-value {
        font-size: 0.9rem;
    }	

    .button-row {
        flex-wrap: nowrap;
        gap: 8px;
    }
	
    .button-row .main-btn,
    .button-row .secondary-btn {
        width: auto;
        flex: 0 0 auto;
        min-width: 100px;
        padding: 12px 14px;
        font-size: 15px;
    }

    .spot-strip {
        width: 48%;
        min-width: 0;
        margin-bottom: 16px;
    }

    .spot-label {
        font-size: 0.15rem;
    }

    .spot-value {
        font-size: 1.15rem;
    }

	.spot-strip .spot-label {
		font-size: .9rem;
	}
}

@media (max-width: 400px) {
    .total-label {
        white-space: normal;
    }
}