/* FigureQuick prototype homepage — calculator.net style. Plain, white, simple. */
body { background: #fff; color: #222; font-family: Arial, Helvetica, sans-serif; margin: 0; font-size: 15px; line-height: 1.5; }
a { color: #0066cc; text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* header */
.site-header { border-bottom: 1px solid #ccc; padding: 10px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-header img { height: 34px; }
.site-header nav a { margin-left: 18px; font-size: 14px; }

/* search */
.search-block { padding: 22px 0 6px; text-align: center; }
.search-block h1 { font-size: 22px; margin: 0 0 12px; color: #222; }
.search-row { display: flex; max-width: 560px; margin: 0 auto; }
.search-row input { flex: 1; padding: 10px 12px; font-size: 16px; border: 1px solid #999; border-right: none; border-radius: 0; }
.search-row button { padding: 10px 18px; font-size: 15px; background: #0066cc; color: #fff; border: 1px solid #0066cc; cursor: pointer; }
.search-results { max-width: 560px; margin: 0 auto; text-align: left; border: 1px solid #ddd; border-top: none; display: none; }
.search-results.open { display: block; }
.search-results a { display: block; padding: 8px 12px; border-bottom: 1px solid #eee; }
.search-results a:last-child { border-bottom: none; }
.search-results .none { padding: 10px 12px; color: #666; }

/* generic calculator */
.gen-calc { width: 320px; margin: 26px auto 10px; border: 1px solid #999; background: #f7f7f7; padding: 12px; }
.gen-calc h2 { font-size: 16px; margin: 0 0 10px; color: #222; }
.gen-display { background: #fff; border: 1px solid #999; padding: 10px 12px; font-size: 26px; text-align: right; min-height: 30px; overflow: hidden; white-space: nowrap; }
.gen-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.gen-keys button { padding: 13px 0; font-size: 18px; border: 1px solid #999; background: #fff; cursor: pointer; border-radius: 0; }
.gen-keys button:hover { background: #eee; }
.gen-keys button.op { background: #e8eef5; }
.gen-keys button.eq { background: #0066cc; color: #fff; border-color: #0066cc; }
.gen-keys button.wide { grid-column: span 2; }
.gen-note { text-align: center; color: #666; font-size: 13px; margin: 0 0 8px; }

/* categories */
.cat-section { margin: 30px 0; }
.cat-section img.cat-img { display: block; width: 200px; height: auto; margin-bottom: 6px; }
.cat-section h2 { font-size: 20px; margin: 0 0 8px; color: #222; }
.cat-section h2 a { color: #222; }
.cat-bar { background: #0f2a44; color: #fff; padding: 6px 10px; font-size: 15px; font-weight: bold; margin: 0 0 10px; }
.cat-bar a { color: #fff; }
.calc-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; }
.calc-list li { margin: 0 0 7px; break-inside: avoid; }
.calc-list li span { color: #666; font-size: 13px; }
.more-cats { margin: 26px 0; font-size: 14px; }
.more-cats a { margin-right: 14px; }

/* niche pages */
.niche-head img { width: 200px; height: auto; margin: 18px 0 6px; }
.niche-head h1 { font-size: 22px; margin: 0 0 4px; }
.niche-list { list-style: none; margin: 14px 0 30px; padding: 0; }
.niche-list li { padding: 9px 0; border-bottom: 1px solid #eee; }
.niche-list li span { display: block; color: #666; font-size: 13px; }
.back-link { display: inline-block; margin: 14px 0 0; font-size: 14px; }

/* footer */
.site-footer { border-top: 1px solid #ddd; margin-top: 36px; padding: 16px 0 26px; font-size: 13px; color: #666; }
.site-footer a { margin-right: 14px; }
.site-footer p { margin: 8px 0; }

@media (max-width: 640px) {
  .calc-list { columns: 1; }
  .gen-calc { width: 100%; max-width: 320px; box-sizing: border-box; }
  .cat-section img.cat-img, .niche-head img { width: 160px; }
}

/* simple calculator pages */
.calc-intro { max-width: 760px; color: #444; }
.calc-form { width: 100%; max-width: 560px; border-collapse: collapse; margin: 14px 0; }
.calc-form td { padding: 7px 8px; border-bottom: 1px solid #eee; vertical-align: middle; }
.calc-form td:first-child { width: 46%; }
.calc-form input, .calc-form select, .calc-form textarea { width: 100%; padding: 8px 10px; font-size: 15px; border: 1px solid #999; border-radius: 0; box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; }
.calc-btn { padding: 10px 22px; font-size: 15px; background: #0066cc; color: #fff; border: 1px solid #0066cc; cursor: pointer; margin-right: 8px; }
.calc-btn.secondary { background: #fff; color: #0066cc; }
.calc-results { margin: 18px 0; padding: 14px 16px; background: #f7f7f7; border: 1px solid #ddd; max-width: 560px; }
.calc-results:empty { display: none; }
.res-line { font-size: 16px; padding: 4px 0; }
.res-line b { font-size: 18px; }
.calc-results table { border-collapse: collapse; margin-top: 10px; width: 100%; font-size: 14px; }
.calc-results td, .calc-results th { border: 1px solid #ddd; padding: 5px 8px; text-align: right; }
.calc-results th { background: #e8eef5; text-align: center; }
.explainer { max-width: 760px; color: #444; }
.cat-links { margin: 10px 0; font-size: 14px; }
.cat-links a { margin-right: 14px; }
.explainer h2 { font-size: 17px; color: #222; }
.sci-display { background: #fff; border: 1px solid #999; padding: 10px 12px; font-size: 24px; text-align: right; min-height: 30px; overflow: hidden; white-space: nowrap; max-width: 560px; margin: 14px 0 10px; }
.sci-keys { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; max-width: 560px; margin-bottom: 10px; }
.sci-keys button { padding: 12px 0; font-size: 16px; border: 1px solid #999; background: #fff; cursor: pointer; border-radius: 0; }
.sci-keys button:hover { background: #eee; }
.sci-keys button.fn { background: #e8eef5; }
.sci-keys button.eq { background: #0066cc; color: #fff; border-color: #0066cc; }
